Yoko

All sides of Injection
It is currently 2025-12-03 03:13:34

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: ТРабла
PostPosted: 2005-05-05 11:45:16 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
################################################################
###############################################################
# Начинаем капать #############################################################
sub Dig_Cave(Current_Tree)
var coords


uo.deletejournal()
coords="waittargettile "+ Current_Tree #копаем
uo.exec(coords)
uo.usetype('0x0E85') #Pick Axe

wait_for_end_chop(Current_Tree)

endsub

################################################################
# Ждем пока выкапает ################################################################


sub wait_for_end_chop(Current_Tree)
var tj=uo.getname()+': You loosen some rocks but fail to find any ',tj1
var tj2='There is no ore here to mine .'


--------------------------------------------------
После неудачной попытки выкапать,идет к следующей точке.Ув.Скриптеры,помогите разобраться =(


Top
   
 Post subject:
PostPosted: 2005-05-05 13:04:17 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
А где вторая половина скрипта?


Top
   
 Post subject:
PostPosted: 2005-05-05 18:16:51 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
#Ïðè ðàáîòå äîëæíà áûòü "îòæàòà" êíîïêà NumLock
Var MoveDelay=500 # Ïðîìåæóòîê ìåæäó øàãàìè
Var MoveNumber=2 # Êîëè÷åñòâî øàãîâ ïðè ñìåíå äèñëîêàöèè
Var Ep=0.172 # Çíà÷åíèå øèðèíû óãëà õîæäåíèÿ ïðè îïðåäåëåíèè íàïðàâëåíèÿ. Åñëè íà ïóòè âñòðå÷àþòñÿ ñëîæíûå è øèðîêèå ïðåïÿòñòâèÿ - óâåëè÷èòü. 0.172 - ñáàëàí÷èðîâàííûé.
var zamahCount=10 # Ñ÷¸ò÷èê êîëè÷åñòâà íåóäà÷, ïîñëå êîòîðûõ çàáèâàåì íà äåðåâî è èä¸ì ê ñëåäóþùåìó.
var colvoZamahov=100 # Êîëè÷åñòâî ïîïûòîê ïîëó÷èòü ëîã ñ äåðåâà
var maxweight=750 # 248 Ìàêñèìàëüíûé âåñ äî ðåêîëà
var bank='0x400CE667' # id áàíêà (,info lastcontainer)
var Wait1="You put"
var Wait2="heavy"
var Wait3="location"
var Wait4="no ore"
var Wait5="but fail"
var Wait6="far away"
var Wait7="in rock"
var Wait8="You can't"
var Wait9="nothing here"
var Wait10="You have found some"





sub main()
Dig()
end sub

sub Dig()
var i

DIM Cave[170] #Â ñêîáêàõ óêàçàòü êîë-âî äåðåâüåâ
# ,infotile

Cave[0]="1353 4547 3165 0"
Cave[1]="1353 4547 3165 0"
Cave[2]="1357 4548 3165 0"
Cave[3]="1358 4550 3165 0"
Cave[4]="1359 4549 3165 0"
Cave[5]="1352 4551 3165 0"
Cave[6]="1355 4547 3166 0"
Cave[7]="1343 4548 3166 0"
Cave[8]="1343 4549 3166 0"
Cave[9]="1343 4550 3166 0"
Cave[10]="1361 4551 3166 0"
Cave[11]="1356 4547 3167 0"
Cave[12]="1343 4548 3167 0"
Cave[13]="1343 4549 3167 0"
Cave[14]="1343 4550 3167 0"
Cave[15]="1358 4551 3167 0"
Cave[16]="1353 4546 3168 0"
Cave[17]="1343 4547 3168 0"
Cave[18]="1343 4548 3168 0"
Cave[19]="1343 4549 3168 0"
Cave[20]="1343 4550 3168 0"
Cave[21]="1343 4551 3168 0"
Cave[22]="1353 4545 3169 0"
Cave[23]="1343 4546 3169 0"
Cave[24]="1343 4547 3169 0"
Cave[25]="1343 4550 3169 0"
Cave[26]="1343 4551 3169 0"
Cave[27]="1343 4552 3169 0"
Cave[28]="1361 4553 3169 0"
Cave[29]="1355 4545 3170 0"
Cave[30]="1343 4546 3170 0"
Cave[31]="1343 4547 3170 0"
Cave[32]="1343 4549 3170 0"
Cave[33]="1343 4550 3170 0"
Cave[34]="1340 4551 3170 0"
Cave[35]="1343 4552 3170 0"
Cave[36]="1340 4553 3170 0"
Cave[37]="1343 4553 3171 0"
Cave[38]="1343 4551 3171 0"
Cave[39]="1339 4550 3171 0"
Cave[40]="1343 4549 3171 0"
Cave[41]="1343 4548 3171 0"
Cave[42]="1343 4547 3171 0"
Cave[43]="1343 4546 3171 0"
Cave[44]="1356 4545 3171 0"
Cave[45]="1354 4545 3172 0"
Cave[46]="1343 4546 3172 0"
Cave[47]="1343 4547 3172 0"
Cave[48]="1343 4548 3172 0"
Cave[49]="1343 4549 3172 0"
Cave[50]="1343 4550 3172 0"
Cave[51]="1343 4551 3172 0"
Cave[52]="1343 4552 3172 0"
Cave[53]="1343 4553 3172 0"
Cave[54]="1343 4553 3173 0"
Cave[55]="1340 4551 3173 0"
Cave[56]="1343 4550 3173 0"
Cave[57]="1340 4549 3173 0"
Cave[58]="1343 4548 3173 0"
Cave[59]="1343 4547 3173 0"
Cave[60]="1343 4546 3173 0"
Cave[61]="1354 4545 3173 0"
Cave[62]="1362 4545 3174 0"
Cave[63]="1343 4546 3174 0"
Cave[64]="1343 4547 3174 0"
Cave[65]="1343 4548 3174 0"
Cave[66]="1343 4549 3174 0"
Cave[67]="1339 4550 3174 0"
Cave[68]="1343 4551 3174 0"
Cave[69]="1344 4552 3175 0"
Cave[70]="1343 4551 3175 0"
Cave[71]="1343 4549 3175 0"
Cave[72]="1343 4548 3175 0"
Cave[73]="1343 4547 3175 0"
Cave[74]="1351 4546 3175 0"
Cave[75]="1362 4547 3176 0"
Cave[76]="1343 4548 3176 0"
Cave[77]="1343 4549 3176 0"
Cave[78]="1351 4548 3177 0"
Cave[79]="1347 4549 3177 0"
Cave[80]="1346 4550 3177 0"
Cave[81]="1344 4551 3177 0"


#.... Add more tree here....
while 1==1
for i=0 to 81 #Äîëæíî áûòü ðàâíî êîë-âó äåðåâüåâ !!!
uo.print("We'r going to dig some ore: " + str(i) )
gtt (Cave[i])
Dig_Cave( Cave[i] )
next

wend
end sub

sub pereplavka()
uo.print( "Ïëàâèì....")
var a
uo.Findtype('0x19B9','','0x400CE63C')
while uo.GetQuantity('finditem')<>0
uo.Findtype('0x19B9','',0x4029A115)
if uo.GetQuantity('finditem')<>0 then
uo.MoveItem('finditem',1,'0x400CE63C')
wait(500)
end if

uo.Findtype('0x19B9','','0x400CE63C')
uo.MoveItem('finditem','1','0x4029A115')
wait (1000)
uo.usetype(0x19B7)
wait (500)

uo.Findtype('0x19B9','','0x400CE63C')
wend

#!!!!GoToBank()
end sub

sub IngToBank()

uo.say('bank')
wait (1000)

uo.Findtype('0x1BEF',0,'0x400CE63C')
while uo.GetQuantity('finditem')<>0
uo.Findtype('0x1BEF',0,'0x400CE63C')
if uo.GetQuantity('finditem')<>0 then
uo.MoveItem('finditem',1,bank)
wait(500)
end if
wend
GoToCave()
end sub

sub gtt(Current_Tree)
var x,y
if Current_Tree[8]==' ' then #
x=Current_Tree[5]+Current_Tree[6]+Current_Tree[7]
if Current_Tree[12]=='' then
y = Current_Tree[9]+Current_Tree[10]+Current_Tree[11]
else
y = Current_Tree[9]+Current_Tree[10]+Current_Tree[11]+Current_Tree[12]
endif
else
x=Current_Tree[5]+Current_Tree[6]+Current_Tree[7]+Current_Tree[8]
if Current_Tree[13]=='' then
y = Current_Tree[10]+Current_Tree[11]+Current_Tree[12]
else
y = Current_Tree[10]+Current_Tree[11]+Current_Tree[12]+Current_Tree[13]
endif
endif

gototile(val(x),val(y),2,false)
endsub

###############################################################
# Íà÷èíàåì êîïàòü
###############################################################
sub Dig_Cave(Current_Tree)
var coords


uo.deletejournal()
coords="waittargettile "+ Current_Tree #Êîïàåì
uo.exec(coords) #
uo.usetype('0x0E85') #Pick Axe

wait_for_end_chop(Current_Tree)

endsub

################################################################
# Æä¸ì ïîêà âûêàïàåò
################################################################


sub wait_for_end_chop(Current_Tree)
var tj=uo.getname()+': You loosen some rocks but fail to find any ',tj1
var tj2='There is no ore here to mine .'



for var i=0 to 1500
tj1=uo.Journal(0)
if zamahCount==30 then
uo.print(" =( ...")
zamahCount=0

return 0
endif
if uo.Weight >440 then

#!!! GoToForge()
mark_here()
recall_home()
wait_for_recall()
wait(1000)
logs_to_box()
wait(1000)
logs_to_box1()
wait(1000)
logs_to_box2()
wait(1000)
logs_to_box3()
wait(1000)
go_yew()
Dig_Cave(Current_Tree)
wait(1000)
end if
if uo.Journal(0)==tj then
uo.print('Fuck ! Fucking cave ! Crooked arms !')
zamahCount=zamahCount+1
Dig_Cave(Current_Tree)
wait(10)
return 0
end if
if tj1[0]=='Y' and tj1[1]=='o' and tj1[2]=='u' and tj1[3]==' ' and tj1[4]=='p' then
uo.print('Yes ! Good ! Super good ! I have put some ore in my pack...')
zamahCount=0
Dig_Cave(Current_Tree)
wait(10)
return 0
end if
if uo.Journal(0)==tj2 then
uo.print('Ooooohhhhh ! Nothing left to chop. Ok, we will go to the next tree and hack it !')
return 0
end if

wait(10)
next

endsub

sub GoToForge()
var i
DIM WayPoint[150]

WayPoint[0]="4963 1522 1507 0"
WayPoint[1]="4963 1521 1531 40"
WayPoint[2]="4963 1429 1542 30"
WayPoint[3]="4963 1425 1556 30"
WayPoint[4]=""
WayPoint[5]=""
WayPoint[6]=""
WayPoint[7]=""
WayPoint[8]=""
WayPoint[9]=""

for i=0 to 170 #Äîëæíî áûòü ðàâíî êîë-âó äåðåâüåâ !!!
uo.print("We'r going to dig some ore: " + str(i) )
gtt (WayPoint[i])
next
pereplavka()
end sub

sub GoToCave()
var i
DIM WayPoint[150]

WayPoint[0]="4963 1417 1676 6"
WayPoint[1]="4963 1420 1638 20"
WayPoint[2]="4963 1421 1622 20"
WayPoint[3]="4963 1426 1614 20"
WayPoint[4]="4963 1426 1588 20"
WayPoint[5]="4963 1437 1586 20"
WayPoint[6]="4963 1432 1571 30"
WayPoint[7]="4963 1429 1542 30"
WayPoint[8]="4963 1494 1535 30"
WayPoint[9]="4963 1524 1528 40"
WayPoint[10]="4963 1522 1518 23"

for i=0 to 170 #Äîëæíî áûòü ðàâíî êîë-âó äåðåâüåâ !!!
uo.print("We'r going to dig some ore: " + str(i) )
gtt (WayPoint[i])
next
Dig()
end sub

sub GoToBank()
var i
DIM WayPoint[150]

WayPoint[0]="4963 1435 1573 30"
WayPoint[1]="4963 1434 1588 20"
WayPoint[2]="4963 1425 1590 20"
WayPoint[3]="4963 1420 1631 20"
WayPoint[4]="4963 1420 1642 20"
WayPoint[5]="4963 1420 1679 3"
WayPoint[6]=""
WayPoint[7]=""
WayPoint[8]=""
WayPoint[9]=""

for i=0 to 170 #Äîëæíî áûòü ðàâíî êîë-âó äåðåâüåâ !!!
uo.print("We'r going to dig some ore: " + str(i) )
gtt (WayPoint[i])
next

IngToBank()
end sub

sub gz_mode()
var vas=uo.gethp()
while 1
if vas>uo.GetHP() then
uo.say('guards')
wait(300)
uo.say('guards')
wait(300)
uo.say('guards')
wait(300)
uo.say('guards')
wait(300)
vas=uo.gethp()
endif
vas=uo.gethp()
wait(30)
wend
end sub

sub wait_for_recall()

var tj=uo.getname()+": The spell fizzles.",tj1="You lack sufficient mana for this spell"
var x=uo.getx(),y=uo.gety()
uo.print('Æä¸ì ðåêîëà...')
for var i=0 to 200

if uo.Journal(0)==tj then
uo.print('Fuck ! Fizzle ! Repeat cast...')
uo.cast('Recall','0x4002CF02')
wait(3000)
wait_for_recall()
return 0
end if
if uo.Journal(0)==tj1 then
uo.print('Ooohhhh ! Shit ! Where is my mana ? Meditation - rulezzzz...')
meditation()
uo.cast('Recall','0x4002CF02')
wait_for_recall()
return 0
end if
wait(1)
next

wait(3000)

if uo.Journal(0)==tj or uo.Journal(1)==tj or uo.Journal(2)==tj and x==uo.getx() and y==uo.gety() then
uo.print("Oooooo =( I'm here again ! Repeat cast !")
uo.cast('Recall','0x4002CF02')
wait(4000)
wait_for_recall()
end if

endsub

sub wait_for_cast()

var tj=uo.getname()+": The spell fizzles.",tj1="You lack sufficient mana for this spell"
for var i=0 to 400
if uo.Journal(0)==tj then
uo.print('Fuck ! Fizzle ! Repeat cast...')
uo.cast('last','lasttarget')
wait(3000)
wait_for_cast()
return 0
end if
if uo.Journal(0)==tj1 then
uo.print('Ooohhhh ! Shit ! Where is my mana ? Meditation - rulezzzz...')
meditation()
uo.cast('Recall','lasttarget')
wait_for_cast()
return 0
end if
wait(10)
next

endsub

sub meditation()

var tj=uo.getname()+": You lose your concentration"
uo.deletejournal()
uo.useskill('Meditation')
wait(1500)

for var i=0 to 150 #Ìîæíî áûëî â îäíîì öèêëå ñäåëàòü,
if uo.journal(0)==tj then #íî ðåøèë ñ ðåêóðñèåé íå øóòèòü
meditation() #èç-çà ãëþ÷íîñòè èíæè.
return 0
end if
wait(10)
next

while uo.mana<>uo.int
if uo.journal(0)==tj then
meditation()
return 0
end if
wait(10)
#uo.print("I'm still in trance........"+str(uo.mana)+" "+str(uo.int))
wend

endsub

sub logs_to_box()
uo.findtype('0x19B9',-1,'0x4001FE5A') #Backpack
if uo.findCount()>0 then
for var i=0 to uo.findCount()-1
uo.findtype('0x19B9',-1,'my') # Ëîãè
uo.moveitem('finditem',-1,0x4001E753)
wait(1000)
next
endif
endsub
sub logs_to_box1()
uo.findtype('0x19B8',-1,'0x4001FE5A') #Backpack
if uo.findCount()>0 then
for var i=0 to uo.findCount()-1
uo.findtype('0x19B8',-1,'my') # Ëîãè
uo.moveitem('finditem',-1,0x4001E753)
wait(1000)
next
endif
endsub
sub logs_to_box2()
uo.findtype('0x19B7',-1,'0x4001FE5A') #Backpack
if uo.findCount()>0 then
for var i=0 to uo.findCount()-1
uo.findtype('0x19B7',-1,'my') # Ëîãè
uo.moveitem('finditem',-1,0x4001E753)
wait(1000)
next
endif
endsub
sub logs_to_box3()
uo.findtype('0x19BA',-1,'0x4001FE5A') #Backpack
if uo.findCount()>0 then
for var i=0 to uo.findCount()-1
uo.findtype('0x19BA',-1,'my') # Ëîãè
uo.moveitem('finditem',-1,0x4001E753)
wait(1000)
next
endif
endsub

sub recall_home()
uo.cast('Recall','0x4002CF02')
wait_for_recall()
endsub


sub mark_here()
uo.cast('Mark','0x4002CEFB')
wait_for_cast()
endsub

sub go_yew()
var x=uo.getx()
var y=uo.gety()

uo.cast('Recall','0x4002CEFB')
wait_for_recall()
wait(1500)
var xmax=uo.getx()+10
var ymax=uo.gety()+10
var xmin=uo.getx()-10
var ymin=uo.gety()-10

if x<xmax and y<ymax and x>xmin and y>ymin then
go_yew()
endif
endsub



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)*55>MoveDelay) Then #15
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

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

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

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


#================================================================
# Extra rune (Britain) - Ýêñòðåííûé ðåêîë ïî çàäàííîé ðóíå
#
#----------------------------------------------------------------
sub Erune()
UO.WaitTargetObject('0x4037C4C6')
UO.Cast('Recal')
end sub
sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then
ReconnectTime=MakeTime()
rFlag=0
end if
wait(20000)
uo.Say('')
wait(3000)
uo.Say('')
wait(3000)
uo.Say('')
wait(3000)
uo.LdblClick(357,164)
uo.Lclick(616,459)
wait(3000)
wend
wait(3000)
if (rFlag==0) and (ReconnectTime<>'0') then
uo.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
rFlag=1
ReconnectTime='0'
end if
until false
end sub



--------------------------------------------------------------
Вот весь скрипт.


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 2 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