Yoko

All sides of Injection
It is currently 2026-01-21 08:47:15

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2006-07-10 14:22:54 
Offline

Joined: 2006-07-10 13:47:54
Posts: 27
Мининг , под РанУо(1)

Незнаю как подогнать под своего чара :(


Code:
Var FileName='d:\Games\UO\Injection\iron2.txt'
Var Box='0x40090F10'
Var Tool='0x1EB8'
var runemine='0x1F14'
var runebook='0x22C5'
var prosp='0x0FB4'
Var Iron='0x401AF67A'
Var MaxWeight= 400-10 #Вес
Var Pickaxe= '0x0F39' #Кирка которой копаем
Var RecKey=145     # Клавиша на которую в УО забито Sacred Journey -это Scroll
Lock
Var MoveDelay=1000 # Промежуток между шагами
Var MoveNumber=1   # Количество шагов при смене дислокации
Var Ep=0.172 # Значение ширины угла хождения при определении направления.
#Если на пути встречаются сложные и широкие препятствия - увеличить.
#0.172 - сбалансированный.
var XN = 2064
var YN = 1748
var Stoplocation
Var StopAxe

Sub Main()
if uo.count(Pickaxe) < 1 then
   Recaling(runebook)
   uo.useobject(Box)
   GrAxe()
end if
  UO.Exec('exec Mine')
EndSub
;---------------------------------------
Sub Mine()
Var Tl,T,X,Y,Z
Var F
var Tim
var Jurn
 Dim Сli[9]
Сli[0]="cliloc# 0xA867"  ;You can't mine...
Сli[1]="cliloc# 0xAD03"  ;You loosen
Сli[2]="cliloc# 0xAD00"  ;there no metal
Сli[3]="cliloc# 0x6B31"  ;backpack full
Сli[4]="cliloc# 0xEE46"  ;worn out tool!
Сli[5]="cliloc# 0x5DE1"  ;dull cuper
Сli[6]="cliloc# 0x5DE6"  ;agapit
Сli[7]="cliloc# 0xA2DE"  ;is too far away
Сli[8]="cliloc# 0xACF9"  ;where do you wish to dig
Сli[9]="cliloc# 0xA866"  ;You can't mine...
;----------------------------
Begin:
recaling(runemine)
Stoplocation = 0
UO.SetGlobal('process','yes')
F=File(FileName)
F.Open()
Beg:
Tl=safecall F.Readln()
Tl=Trim(Tl)
If Tl=='File read error' Then
  GoTo Ext
EndIf
T=GetNumb(Tl,0)
X=GetNumb(Tl,1)
Y=GetNumb(Tl,2)
Z=GetNumb(Tl,3)

UO.Print('GoTo next mine')
UO.Print('Tile '+Tl)
gotoxy(X,Y,1)

if Stoplocation == 1 then
  Recaling(runebook)
  SmOre()
  GrOre()
  GrAxe()
  GoTo Ext
EndIf

StopAxe=uo.count(Pickaxe)
UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z))
     UO.usetype(prosp)
wait(800)
REPEAT
   uo.deletejournal()
     UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z))
     UO.usetype(Pickaxe)
   wait(200)
   Tim = UO.Timer()
REPEAT
                 wait(150)
                 Jurn=UO.Journal(0)
UNTIL ((UO.Timer()-Tim) > 40 or (not UO.Weight < MaxWeight) or Jurn[10] == "5"
or Jurn == Сli[1] or Jurn == Сli[2] or Jurn == Сli[3] or Jurn == Сli[4] or Jurn
== Сli[0] or Jurn == Сli[9] or UO.GetHP()==0)

UNTIL  Jurn == Сli[3] or (not UO.Weight < MaxWeight) or Jurn == Сli[2] or
uo.count(Pickaxe)==0 or Jurn == Сli[7] or Jurn == Сli[0] or Jurn == Сli[9]
If Jurn == Сli[2] or Jurn == Сli[0] or Jurn == Сli[7] or Jurn == Сli[9] then
  UO.Print('there no metal !!!')
  GoTo Beg
EndIf

If Jurn == Сli[3] or (not UO.Weight < MaxWeight) or uo.count(Pickaxe)==0 then
  UO.Print('backpack full!!!')
  Recaling(runebook)
  SmOre()
  GrOre()
  GrAxe()
EndIf
Ext:
F.Close()
UO.SetGlobal('process','no')
 UO.Print('S T O P!!!')
GoTo Begin
EndSub
;---------------------------
Sub GetNumb(C,I)
var J,T,K
J=0
K=1
While K>0
  J=J+1
  If (Mid(C,J,1)==' ') Or (J>=Len(C)-1) Then
   If I==0 Then
    T=Val(Left(C,J))
   Else
    T=GetNumb(Right(C,Len(C)-J-1),I-1)
   EndIf
   K=0
  EndIf
wend
UO.Print(T)
return T
end sub
;---------------------------------------------
sub SmOre()
repeat
uo.findtype("0x19B9") #ore
uo.waittargetground("0x0FB1") ;смол анвил
uo.useobject("finditem")
  wait(900)
until not uo.count("0x19B9")
end sub
;---------------------------------------------
sub GrOre()
repeat
  uo.findtype("0x1BF2")          ;ingots
  uo.moveitem("finditem","0",Box)
  wait(1000)
until not uo.count("0x1BF2")
end sub
;---------------------------------------------
sub GrAxe()
UO.SetGlobal('Countaxe','Yes')
if uo.count(prosp) <1 then
uo.useobject(Box)
   uo.findtype(prosp,"-1",Box)
   wait(700)
   UO.grab("1","finditem")
      Wait(1200)
end if
if uo.count(Pickaxe) < 2 then
   uo.useobject(Box)
   uo.findtype(Pickaxe,"-1",Box)
    Wait(600)
   if (uo.findCount()+uo.count(Pickaxe)>=2) then
   repeat
      uo.findtype(Pickaxe,"-1",Box)
      UO.grab("1","finditem")
      Wait(1200)
   until uo.count(Pickaxe)==2
     else
     UO.print("--NET KIROK!!!!----")
     UO.Exec('terminate all')
   end if
end if
end sub
;--------------------------
Sub Recaling(rune)
var myx, myy,Tim
var Cli="cliloc# 0xA8B6"
var Cli2="cliloc# 0xAA57" ;перегруз
var recOk = false
 wait(500)
myx=uo.getx()
myy=uo.gety()
Tim = UO.Timer()
REPEAT
              UO.waittargettype(rune) ;runebook
              uo.Press(RecKey)
              wait(2500)
If (myx<>uo.getx() or myy<>uo.gety() or UO.Journal(0)==Cli) Then
recOk = True
else
  if UO.Journal(0)==Cli2 then
     uo.findtype("0x19B9") #ore
     uo.moveitem("finditem","1","ground")
     wait(800)
  end if
EndIf
UNTIL recOk
End Sub
;---------------------------------
sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
;uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if

ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:

mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if

if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
  uo.print("Can not reach location!")
  Stoplocation = 1
  return
end if
else
ld=dx
end if

if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub

sub GtAxe()
repeat
  uo.findtype("0x0F39")    ;shovel
  uo.moveitem("finditem","0",Box)
  wait(1000)
until not uo.count("0x0F39")
end sub

sub tet()
uo.useobject(Box)
uo.findtype(Iron,"-1",Box)
wait(600)
uo.grab("200","finditem")
wait (1000)
uo.findtype(Tool)
wait(500)
uo.usetype(Tool)
wait(600)
repeat
uo.lclick(326,452)
until uo.count(Tool)==0 or uo.count(Iron)==0
end sub

sub Sm()
var vech="0x1403";Sspear
REPEAT
UO.waittargettype (vech)
 wait(100)
UO.LClick(67,392)
 wait(900)
UNTIL not uo.count(vech)
end sub


Top
   
 Post subject:
PostPosted: 2006-07-10 15:40:45 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Если ты не знаешь, то кто может знать-то? Телепаты в отпуске.

_________________
Ни один скрипт не работает? Пора обновить Инжект...
Все работает, но хочется большего? Пора переходить на стелс...


Top
   
 Post subject:
PostPosted: 2006-07-10 17:18:02 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
пробуй описать траблы чотко и ясно, будем копать в скрипте...

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-07-10 17:30:46 
Offline

Joined: 2006-07-10 13:47:54
Posts: 27
NMY wrote:
пробуй описать траблы чотко и ясно, будем копать в скрипте...


Ругается вот на ету линию :) (91)
Code:
== Сli[0] or Jurn == Сli[9] or UO.GetHP()==0)


Не ясно что ето за типы:
Code:
Var Tool='0x1EB8'

Code:
var prosp='0x0FB4'


И в начале указывается путь к файлу с координатами , а где взять-то ети координаты или как ввести :P

Заранее благодарен


Top
   
 Post subject:
PostPosted: 2006-07-10 17:38:16 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
ошыбка потому что строки продолжаются в другой строке а это должна быть одна строка- как исправить... кидаеш скрипт в ноутпад и с помощю бекспейся равняеш строки...

тоол есть наверное кирка

файл с координатами... ищи там где достал этот скрипт, ищо 1 скрипт каторый делает(собирает) кординаты

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-07-10 17:48:49 
Offline

Joined: 2006-07-10 13:47:54
Posts: 27
NMY wrote:
ошыбка потому что строки продолжаются в другой строке а это должна быть одна строка- как исправить... кидаеш скрипт в ноутпад и с помощю бекспейся равняеш строки...

тоол есть наверное кирка

файл с координатами... ищи там где достал этот скрипт, ищо 1 скрипт каторый делает(собирает) кординаты


Ясно , спасибо ...

Врядли т.к. Туул и Пикакс имеют разные типы

Ну ето не важно ща буду править и смотреть какую инфу для размышления даст инжа :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited