Yoko

All sides of Injection
It is currently 2025-12-26 06:45:39

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Ламбер
PostPosted: 2007-12-25 18:40:23 
Offline

Joined: 2007-06-08 11:44:35
Posts: 80
Code:
var command_use = 0 
var wood_needed = 1

var near_lodka_x = 2519
var near_lodka_y = 254

var on_board_x = 2517
var on_board_y = 255

var id_keys = "0x404FE2B1"
var id_trap = "0x405006AE"

var opt_weight = 150

sub main()
uo.exec ("terminate reconnector")
uo.exec ("exec reconnector")
uo.deletejournal()
uo.exec ("set finddistance 1")
uo.exec ("useobject backpack")
var i,b,f,tile,xx,yy,j
dim x[50]
dim y[50]
dim t[50]
dim a[50]

start:

a[1] = "3277 2534 260 0"
a[2] = "3283 2537 257 0"
a[3] = "3296 2532 255 0"
a[4] = "3286 2528 255 0"
a[5] = "3280 2527 258 0"
a[6] = "3302 2532 252 0"
a[7] = "3286 2532 249 0"
a[8] = "3277 2536 249 0"
a[9] = "3290 2540 249 0"
a[10] = "3280 2540 246 0"
a[11] = "3299 2540 243 0"
a[12] = "3286 2536 243 0"
a[13] = "3296 2532 246 0"
a[14] = "3280 2532 243 0"
a[15] = "3294 2524 252 0"
a[16] = "3290 2524 249 0"
a[17] = "3280 2520 249 0"
a[18] = "3286 2524 246 0"
a[19] = "3277 2520 246 0"
a[20] = "3290 2524 243 0"
a[21] = "3277 2528 240 0"
a[22] = "3302 2528 237 0"
a[23] = "3286 2524 237 0"
a[24] = "3280 2528 234 0"
a[25] = "3280 2532 237 0"
a[26] = "3288 2532 234 0"
a[27] = "3294 2536 234 0"
a[28] = "3288 2536 228 0"
a[29] = "3286 2536 225 0"
a[30] = "3296 2532 228 0"
a[31] = "3286 2532 225 0"
a[32] = "3290 2528 225 0"
a[33] = "3299 2528 228 0"
a[34] = "3299 2520 228 0"
a[35] = "3277 2516 225 0"
a[36] = "3296 2512 228 0"
a[37] = "3290 2512 234 0"
a[38] = "3290 2508 234 0"
a[39] = "3294 2508 231 0"
a[40] = "3294 2508 228 0"
a[41] = "3299 2508 222 0"
a[42] = "3302 2504 228 0"
a[43] = "3302 2504 222 0"
a[44] = "3283 2500 225 0"
a[45] = "3299 2500 222 0"
a[46] = "3290 2496 225 0"
a[47] = "3290 2492 219 0"
a[48] = "3283 2488 222 0"
a[49] = "3277 2488 225 0"
a[50] = "3294 2488 228 0"
#a[51] = "3286 2356 1212 5"
#a[52] = "3296 2356 1215 5"
#a[53] = "3299 2356 1218 0"
#a[54] = "3294 2356 1224 0"
#a[55] = "3283 2352 1221 0"
#a[56] = "3277 2352 1227 0"
#a[57] = "3299 2352 1230 0"
#a[58] = "3286 2356 1230 0"
#a[59] = "3277 2360 1221 0"
#a[60] = "3280 2360 1215 3"
#a[61] = "3277 2360 1212 5"
#a[62] = "3302 2360 1209 5"
#a[63] = "3299 2360 1206 5"
#a[64] = "3299 2360 1200 5"
#a[65] = "3291 2364 1200 5"
#a[66] = "3296 2364 1203 5"
#a[67] = "3280 2368 1200 5"
#a[68] = "3296 2372 1197 5"
#a[69] = "3277 2376 1197 5"
#a[70] = "3302 2376 1200 5"
#a[71] = "3286 2380 1200 5"
#a[72] = "3299 2380 1197 5"
#a[73] = "3280 2384 1200 0"
#a[74] = "3296 2384 1203 0"
#a[75] = "3286 2388 1203 0"
#a[76] = "3302 2388 1194 0"
#a[77] = "3299 2392 1194 0"
#a[78] = "3280 2392 1197 0"
#a[79] = "3283 2392 1200 0"
#a[80] = "3299 2392 1203 0"
#a[81] = "3280 2392 1206 0"
#a[82] = "3296 2392 1209 0"
#a[83] = "3283 2392 1212 0"
#a[84] = "3291 2388 1209 0"
#a[85] = "3283 2384 1209 0"
#a[86] = "3289 2384 1212 0"
#a[87] = "3302 2380 1212 0"
#a[88] = "3302 2380 1209 0"
#a[89] = "3286 2376 1209 0"
#a[90] = "3230 2376 1210 0"
#a[91] = "3296 2376 1206 0"
#a[92] = "3286 2376 1203 0"

lodka()
for j = 1 to 92
if a[j] then
b = a[j]
i = 1
t[j] = b[0]
while b[i] <> " "
t[j] = t[j] + b[i]
i = i + 1
wend
i = i + 1
x[j] = b[i]
while b[i] <> " "
x[j] = x[j] + b[i+1]
i = i + 1
wend
i = i + 1
y[j] = b[i]
while b[i] <> " "
y[j] = y[j] + b[i+1]
i = i + 1
wend
xx = val(x[j])
yy = val(y[j])
tile = val(t[j])
uo.print("Tile: "+t[j]+" X: "+x[j]+" Y: "+y[j])
uo.print("Tree number "+str(j))
rubka(xx,yy,tile)
endif
next
goto start:
end sub

sub rubka(xx,yy,tile)
uo.deletejournal()
var a,b,c
uo.print (str(xx)+" "+str(yy))
var D = 1
var T = "True"
var x = xx
var y = yy
GoToTile(x,y,d,t)
c = uo.timer()
uo.exec ("waittargettile "+str(tile)+" "+str(xx)+" "+str(yy)+" 0")
wait (500)
uo.exec ("usetype 0x0F43") ### hachet
repeat
wait (500)
until uo.injournal("There's not enough wood here to chop") or uo.timer() > c + 1800 or uo.injournal("That is too far away")
vibros()
wait(2000)
a = uo.getx()
b = uo.gety()
lodka()
end sub


sub lodka()
var x = near_lodka_x
var y = near_lodka_y
var prec = 0
if uo.weight > opt_weight or command() == 1 then
var d,t
var f = 0
d = 1
t = "True"
gototile(x,y,d,t)
while uo.getdistance(id_trap) > 1
uo.exec ("useobject "+id_trap+";useobject "+id_trap) ### ID trapa
wait (2000)
wend
vibros()
if command() == 1 then
uo.print("terminate")
f = 1
endif
hungry()
if f == 1 then
uo.exec ("closeuo")
uo.exec("terminate all")
endif
while uo.getdistance(id_trap) < 2
uo.exec ("useobject "+id_trap)
gotoxy(uo.getx(id_trap),uo.gety(id_trap),0)
wait (3000)
wend
endif
end sub

sub vibros()
uo.exec ("set finddistance 1")
var i,l
var type = "0x1BDD"
var container, color
dim derevo[17]
derevo[1] = "0x0000" # normum
derevo[2] = "0x0362" # jade
derevo[3] = "0x010D" # oak
derevo[4] = "0x0094" # karund
derevo[5] = "0x01B0" # leshram
derevo[6] = "0x01A2" # turmalit
derevo[7] = "0x0026" # emerint
derevo[8] = "0x00CB" # legrand
derevo[9] = "0x094A" # solmur
derevo[10] = "0x092B" # kleor
derevo[11] = "0x0931" # logradum
derevo[12] = "0x093F" # vialonit
derevo[13] = "0x0074" # stardust
derevo[14] = "0x09EF" # pironil
derevo[15] = "0x006F" # mystic
derevo[16] = "0x0119" # elvin
derevo[17] = "0x000B" # elkris
var nugnoe = wood_needed
# vibros ne nugnogo dereva
if nugnoe > 1 then
for i = 1 to nugnoe - 1
color = derevo[i]
l = 0
container = "ground"
drop(type,color,l,container)
next
endif
# skladivanie nugnogo dereva
if uo.getx() == on_board_x and uo.gety() == on_board_y then
uo.print ("Dropping")
for i = nugnoe to 17
if uo.count(type) <> 0 then
color = derevo[i]
l = 1
container = "ground"
drop(type,color,l,container)
wait (750)
endif
next
endif
if uo.count("0x097B") <= 1 then
uo.exec ("findtype 0x097B -1 ground")
uo.exec ("moveitem finditem 10 backpack")
endif
end sub

sub drop(type,color,l,container)
var serial=0
if l == 1 then
UO.FindType(type,color,"backpack")
if uo.findcount() <> 0 then
serial=UO.GetSerial("finditem")
UO.Ignore(serial)
if container=="ground" then
UO.FindType(type,color,"ground")
if UO.FindCount()>0 then
if uo.getquantity("finditem") < 59000 then
UO.MoveItem(serial,"0","finditem","0","0","0")
else
UO.DropHere(serial)
endif
else
uo.ignore ("finditem")
UO.DropHere(serial)
endif
else
UO.MoveItem(serial,"0",container)
endif

wait(1000)
endif
else
uo.findtype(type,color,"backpack")
if uo.findcount() <> 0 then
uo.exec ("drop 0 0 0 0 finditem")
wait (500)
endif
wait (500)
endif
UO.IgnoreReset()
end sub

var need_hungry_level = 1
sub hungry()
var i,htest,htime,htest2
dim a[11]
a[0] = "You are absolutely stuffed"
a[1] = "You are stuffed"
a[2] = "You aren't hungry at all"
a[3] = "You are a little hungry"
a[4] = "You are somewhat hungry"
a[5] = "You are REALLY hungry"
a[6] = "Your stomash hurts"
a[7] = "Your stomash hurts and you feel dizzy"
a[8] = "You are starving"
a[9] = "You are almost dying of hunger"
a[10] = "You are DYING of hunger"
htest = 0
repeat
uo.deletejournal()
uo.serverprint(".hungry")
wait (1000)
i = 0
htest2 = 0
if uo.count("0x097B") > 0 then
repeat
if uo.injournal(a[i]) then
if (i - need_hungry_level) > 0 then
uo.exec("usetype 0x097B")
repeat
wait (50)
until uo.injournal("Tasty!") or uo.injournal("Good!") or uo.injournal("Yum!") or uo.injournal("I am already") or uo.injournal("123")
htest2 = 1
else
htest = 1
htest2 = 1
endif
endif
i = i + 1
until i == 11 or htest2 == 1
else
htest = 1
endif
until htest == 1
endsub

#îÏÕ ÏÞÀÍÐÅ ÄÍÊÔÌÞ ÀØÐÝ "ÍÐÔÞÐÞ" ÉÌÍÎÉÞ NumLock
Var MoveDelay=500 # îÏÍËÅÔÑÐÍÉ ËÅÔÄÑ ÜÞÖÞËÕ
Var MoveNumber=1 # éÍÊÕÂÅßÐÁÍ ÜÞÖÍÁ ÎÏÕ ßËÅÌÅ ÄÕßÊÍÉÞÆÕÕ
Var Ep=0.172 # ãÌÞÂÅÌÕÅ ÜÕÏÕÌØ ÑÖÊÞ ÓÍÔÄÅÌÕÚ ÎÏÕ ÍÎÏÅÄÅÊÅÌÕÕ ÌÞÎÏÞÁÊÅÌÕÚ. åßÊÕ ÌÞ ÎÑÐÕ ÁßÐÏÅÂÞ×ÐßÚ ßÊÍÔÌØÅ Õ ÜÕÏÍÉÕÅ ÎÏÅÎÚÐßÐÁÕÚ - ÑÁÅÊÕÂÕÐÝ. 0.172 - ßÀÞÊÞÌÂÕÏÍÁÞÌÌØÈ.
Sub Perp(Dir)
Var D
D=Dir
If Dir==1 Then
D=3
EndIf
If Dir==2 Then
D=4
EndIf
If Dir==3 Then
D=-1
EndIf
If Dir==4 Then
D=-2
EndIf
If Dir==-1 Then
D=-3
EndIf
If Dir==-2 Then
D=-4
EndIf
If Dir==-3 Then
D=1
EndIf
If Dir==-4 Then
D=2
EndIf
RETURN D
EndSub

Sub MoveOnce(Dir,Del,Rev)
Var Num
If Rev Then
Num=MoveNumber+1
Else
Num=MoveNumber
EndIf
If (Num>0) and (Dir<>0) Then
If Dir==1 Then
UO.Press(38,Num,Del)
EndIf
If Dir==2 Then
UO.Press(33,Num,Del)
EndIf
If Dir==3 Then
UO.Press(39,Num,Del)
EndIf
If Dir==4 Then
UO.Press(34,Num,Del)
EndIf
If Dir==-1 Then
UO.Press(40,Num-1,Del)
EndIf
If Dir==-2 Then
UO.Press(35,Num,Del)
EndIf
If Dir==-3 Then
UO.Press(37,Num,Del)
EndIf
If Dir==-4 Then
UO.Press(36,Num,Del)
EndIf
If Rev Then
If Dir<>-1 Then
UO.Press(40,1,Del)
EndIf
EndIf
EndIf
EndSub

Sub GetQDir(x,y)
Var J=0
If X==0 Then
J=1
Else
If (Y/X)<ep Then
J=3
Else
If (X/Y)<ep Then
J=1
Else
J=2
EndIf
EndIf
EndIf
RETURN J
EndSub

sub GetDir(myx,myy,ox,oy)
Var I,J
J=0
Var X=ox-myx
Var Y=oy-myy
I=GetQDir(Abs(X),Abs(Y))
If X>=0 Then
If Y>=0 Then
If I==1 Then
J=-2
Else
If I==2 Then
J=-1
Else
If I==3 Then
J=4
EndIf
EndIf
EndIf
Else
If I==1 Then
J=2
Else
If I==2 Then
J=3
Else
If I==3 Then
J=4
EndIf
EndIf
EndIf
EndIf
Else
If Y>=0 Then
If I==1 Then
J=-2
Else
If I==2 Then
J=-3
Else
If I==3 Then
J=-4
EndIf
EndIf
EndIf
Else
If I==1 Then
J=2
Else
If I==2 Then
J=1
Else
If I==3 Then
J=-4
EndIf
EndIf
EndIf
EndIf
EndIf
RETURN J
endsub

sub abs(a)
Var b
If a<0 Then
b=-a
Else
b=a
endif
return b
endsub

Sub PermResend()
Var Mn=9
Repeat
UO.Resend()
Wait(MoveDelay*Mn)
Until (1>2)
EndSub

sub max(A,B)
Var C
If A>B Then
C=A
Else
C=B
EndIf
Return C
EndSub

sub GetDistance(X,Y)
return max(abs(X-uo.getx()),abs(Y-uo.gety()))
endsub

sub GoToTile(OX,OY,N,S)
var myx, myy, MD, J
var Lx1 ,Ly1
var Lx2 ,Ly2
var Sx ,Sy
var T
var Des=N
J=1
MD=MoveDelay*1.5
myx=uo.getx()
myy=uo.gety()
MoveOnce(GetDir(uo.getx(),uo.gety(),ox,oy),MD,False)
Sx=0
Sy=0
Lx1=uo.getx()/2
Ly1=uo.gety()/2
Lx2=Lx1/2
Ly2=Ly1/2
T=UO.Timer()
If (GetDistance(ox,oy)<>N) or ((not S) and GetDistance(ox,oy)>N) Then
UO.Exec('exec PermResend')
EndIf
While ((GetDistance(ox,oy)<>N) or ((not S) and GetDistance(ox,oy)>N)) and (OX>=0) and (OY>=0)
If ((UO.Timer()-T)*15>MoveDelay) Then
T=UO.Timer()
UO.Print(Str(uo.getx())+' '+Str(uo.gety())+' '+Str(ox)+' '+Str(oy)+' '+Str(GetDir(uo.getx(),uo.gety(),ox,oy))+' '+Str(T))
Lx2=Lx1
Ly2=Ly1
Lx1=myx
Ly1=myy
myx=uo.getx()
myy=uo.gety()
endIf
MD=MoveDelay
If ((OX-uo.getx())*(OX-uo.getx())+(OY-uo.gety())*(OY-uo.gety())>0) Then
MD=MD*3/GetDistance(ox,oy)
EndIf
wait(MD)
If GetDistance(OX,OY)>Des Then
MoveOnce(GetDir(uo.GetX(),uo.GetY(),ox,oy),MD,False)
Else
If S Then
If GetDistance(OX,OY)<Des Then
If GetDistance(OX,OY)<>0 Then
MoveOnce(GetDir(ox,oy,uo.GetX(),uo.GetY()),MD,False)
Else
MoveOnce(GetDir(uo.GetX(),uo.GetY(),Lx2,Ly2),MD,False)
EndIf
EndIf
EndIf
EndIf
If GetDistance(OX,OY)<>Des Then
If (Lx2==uo.getx()) and (Ly2==uo.gety()) Then
If (Sx<>uo.getx()) or (Sy<>uo.gety()) Then
J=1
EndIf
J=J+1
UO.Resend()
Sx = uo.getx()
Sy = uo.gety()
Stun(ox,oy,J)
EndIf
EndIf
Wend
UO.Exec('terminate PermResend')
endsub

Sub Stun(X,Y,N)
Var I
Var myx
Var myy
myx = uo.getx()
myy = uo.gety()
For I=1 to N
MoveOnce(perp(GetDir(myx,myy,x,y)),MoveDelay,False)
Next
Wait(MoveDelay)
UO.Resend()
If (myx==uo.getx()) and (myy==uo.gety()) Then
For I=1 to N
MoveOnce(-perp(GetDir(myx,myy,x,y)),MoveDelay,False)
Next
Wait(MoveDelay)
UO.Resend()
EndIf
If (myx==uo.getx()) and (myy==uo.gety()) Then
For I=1 to N
MoveOnce(-GetDir(myx,myy,x,y),MoveDelay,False)
Next
Wait(MoveDelay)
Stun(x,y,N)
EndIf
EndSub

sub NearTile(Obj,Des)
var ox, oy, myx, myy, MD, J
var Lx1 ,Ly1
var Lx2 ,Ly2
var Sx ,Sy
var T
UO.Click(Obj)
MD=MoveDelay*1.5
ox=uo.GetX(Obj)
oy=uo.GetY(Obj)
J=1
myx = uo.getx()
myy = uo.gety()
Sx=0
Sy=0
Lx1=myx/2
Ly1=myy/2
Lx2=Lx1/2
Ly2=Ly1/2
T=UO.Timer()
If not (UO.GetDistance(Obj)==Des) Then
UO.Exec('exec PermResend')
EndIf
While not (UO.GetDistance(Obj)==Des)
ox=uo.GetX(Obj)
oy=uo.GetY(Obj)
If ((UO.Timer()-T)*15>MoveDelay) Then
T=UO.Timer()
UO.Print('Go to '+Str(Des)+' to '+UO.GetName(Obj))
UO.Print(Str(UO.GetDistance(Obj)))
UO.Print(Str(uo.GetX())+' '+Str(uo.GetY())+' '+Str(uo.GetX(Obj))+' '+Str(uo.GetY(Obj))+' '+Str(GetDir(uo.GetX(),uo.GetY(),uo.GetX(Obj),uo.GetY(Obj)))+' '+Str(T))
Lx2=Lx1
Ly2=Ly1
Lx1=myx
Ly1=myy
myx=uo.getx()
myy=uo.gety()
endIf
MD=MoveDelay*1.5
If (UO.GetDistance(Obj)>0) Then
MD=MD/UO.GetDistance(Obj)
EndIf
wait(MD)
If UO.GetDistance(Obj)>Des Then
MoveOnce(GetDir(uo.GetX(),uo.GetY(),uo.GetX(Obj),uo.GetY(Obj)),MD,False)
Else
If UO.GetDistance(Obj)<Des Then
If UO.GetDistance(Obj)<>0 Then
MoveOnce(GetDir(uo.GetX(obj),uo.GetY(obj),uo.GetX(),uo.GetY()),MD,False)
Else
MoveOnce(GetDir(uo.GetX(),uo.GetY(),Lx2,Ly2),MD,False)
EndIf
EndIf
EndIf
If UO.GetDistance(Obj)<>Des Then
If (Lx2==uo.getx()) and (Ly2==uo.gety()) Then
If (Sx<>uo.getx()) or (Sy<>uo.gety()) Then
J=1
EndIf
J=J+1
UO.Resend()
Sx = uo.getx()
Sy = uo.gety()
Stun(uo.GetX(Obj),uo.GetY(Obj),J)
EndIf
EndIf
Wend
UO.Exec('terminate PermResend')
endsub



var max_wait = 3 #(v secundax)
sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
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("Lag")
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>max_wait then
uo.print("Can not reach location!")
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 command()
if command_use == 0 then
if uo.injournal("go to log out") then
uo.serverprint("Logouting...")
return 1
endif

if uo.injournal("wait here") then
repeat
wait (1000)
until uo.injournal("continue script")
endif

if uo.injournal("openup") then
if uo.getdistance(id_trap) > 1 then
gototile(near_lodka_x,near_lodka_y,1,"True")
endif
var trap = id_trap
var kl = id_keys
uo.exec ("waittargetobject "+trap+"; useobject "+kl)
uo.serverprint ("Come in on board my friends.")
var t = uo.timer()
repeat
wait (10000)
uo.exec ("msg .c Hey, man, don't forget to close my ship.")
until uo.injournal("closedup") or uo.timer() > t + 1200
if uo.timer() > t + 120 then
uo.exec ("msg .c Autoclosing")
endif
uo.exec ("waittargetobject "+trap+"; useobject "+kl)
uo.serverprint ("Closed.")
uo.exec ("showjournal 100")
endif
if uo.injournal("speak to you") then
wait (5000)
uo.textprint("SPEAKING TO ME:")
uo.exec ("showjournal 100")
endif
return 0
endif
endsub



################################################################################
############
sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub

sub Reconnector()
var ReconnectTime, RFlag, DisconnectTime
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(30000) # WorldSave Protection
if (UO.ObjAtLayer('Bpack') == '') then
DisconnectTime = Maketime()
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LDblClick(357,164)
UO.LClick(616,459)
Wait(3000)
endif
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
UO.Exec('terminate main')
UO.Exec('exec main')
UO.TextOpen()
UO.TextPrint('Disconnected '+DisconnectTime)
UO.TextPrint('Reconnected '+Maketime())
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub

sub test()
uo.textprint(str(uo.asmmapgettile(2482,3979,0)))
end sub

sub vvvv()

var i, color
var type = "0x1BDD" # òèï ïðåäìåòà
var container = 'ground' # êîíòåéíåð "çåìëÿ"
var nugnoe = 10 # óêàçûâàåì íîìåð òîãî ÷òî õîòèì îñòàâèòü

Dim derevo[17]
derevo[1] = "0x0000" # normum
derevo[2] = "0x0362" # pine
derevo[3] = "0x010D" # cedar
derevo[4] = "0x0094" # cherry
derevo[5] = "0x01B0" # mahogany
derevo[6] = "0x01A2" # oak
derevo[7] = "0x0026" # ash
derevo[8] = "0x00CB" # legrand
derevo[9] = "0x094A" # solmur
derevo[10] = "0x092B" # kleor



# vibros ne nugnogo dereva
While 1
For i = 1 To 10
If i <> nugnoe Then # åñëè íå ðàâíî íóæíîìó
UO.FindType(type, derevo[i], 2) # èøåì íóæíîå äåðåâî
If UO.FindCount() > 0 Then # åñëè åñòü
UO.DropHere('finditem') # âûáðàñûâàåì òî ÷òî íàøëè
Wait(600) # æäåì
End If
End If
Next
Wend

end sub



Вот сркрипт на ламеб ходить рубит деревья и ложит логи в лодку !
Проблема в том что он срубил 5 деревьев положил логи в лодку и стоит возле нее открывает треп и пишет Can not reach location! Но стоит мне начать бежать самому в другую сторону от лотки и он тода уже наченает ити рубить следуйшее дерево . Помогите что нада исправить чтобы такого небыло ?


Top
   
 Post subject:
PostPosted: 2007-12-26 15:05:19 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
Code:
gotoxy(uo.getx(id_trap),uo.gety(id_trap),0)


Может лучше подойти к трапу, а не на трап, а потом UO.AddStep() или UO.Press() ??


Top
   
 Post subject:
PostPosted: 2007-12-28 11:36:27 
Offline

Joined: 2007-06-08 11:44:35
Posts: 80
ZeroDX wrote:
Code:
gotoxy(uo.getx(id_trap),uo.gety(id_trap),0)


Может лучше подойти к трапу, а не на трап, а потом UO.AddStep() или UO.Press() ??


ну так в лотку он нормально заходит токо вот после того как он вышл с лодки не хочет ити некуда токо стоит и открывает треп и все


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB® Forum Software © phpBB Limited