| Yoko http://forum.yoko.com.ua/ |
|
| Help !!! Sparing http://forum.yoko.com.ua/viewtopic.php?f=20&t=2537 |
Page 1 of 1 |
| Author: | JustMan [ 2005-01-08 20:46:34 ] |
| Post subject: | Help !!! Sparing |
sub sparing() var MaxHP=90 UO.unSetArm('CWeapon') UO.SetArm('CWeapon') ;uo.addobject('gost','0x0011A543') uo.exec('addobject gost') while uo.targeting() wait(100) wend while 1 if uo.GetHP('self')< MaxHP then uo.WarMode(0) WalkN(4057,598,'') helings() endif if uo.life == uo.str and not uo.gety() == 1378 then UO.Arm('CWeapon') uo.WarMode(1) uo.attack('gost') WalkN(4054,598,'') wait(1000) uo.attack('gost') endif wait(300) wend end sub sub helings() while uo.GetHP('self') < uo.GetMaxHP('self') UO.WaitTargetSelf() UO.UseType('0x0e21') wait(300) if UO.Count('0x0e20')>0 then wait(500) uo.waittargettype('0x1008') uo.usetype('0x0E20') UO.DeleteJournal() endif wait(4500) wend end sub sub heling() while uo.GetHP('self') < uo.GetMaxHP('self') UO.WaitTargetSelf() UO.UseType('0x0e21') wait(300) if UO.Count('0x0e20')>0 then wait(500) uo.waittargettype('0x1008') uo.usetype('0x0E20') UO.DeleteJournal() endif wait(4500) wend UO.Arm('CWeapon') end sub #============================================================== # WalkN(X,Y,Serial) - char is walking by dX and dY step # sub using Home, End, PgUp, PgDown keys # d'not rebind this key from default action! # serial - Serial of target or "" - string # walkwait - delay after keypress # Example: # WalkN(2080,2113,'') - go to coordinates # WalkN(0,0,'0x12345678') - go to target position #-------------------------------------------------------------- sub WalkN(x,y,Target) VAR i,StepSucess VAR dx,dy,Exit=0 While Exit<>1 If Target<>"" Then dx=UO.GetX(Target)-UO.GetX() dy=UO.GetY(Target)-UO.GetY() ; UO.Print("Target locked!") If UO.GetDistance(Target)<2 Then Exit=1 Endif Else dx=x-UO.GetX() dy=y-UO.GetY() If dx==0 AND dy==0 Then Exit=1 Endif Endif If dx<>0 AND dy<>0 Then If dx>0 AND dy>0 Then StepSucess=Go(3,40,300) ;SE - DownArrow If StepSucess==-1 Then StepSucess=Go(7,38,300) ;WN - UpArrow StepSucess=Go(1,39,300) ;NE - RightArrow If StepSucess==-1 Then StepSucess=Go(5,37,300) ;SW - LeftArrow Endif Endif Endif If dx>0 AND dy<0 Then StepSucess=Go(1,39,300) ;NE - RightArrow If StepSucess==-1 Then StepSucess=Go(5,37,300) ;SW - LeftArrow StepSucess=Go(3,40,300) ;SE - DownArrow If StepSucess==-1 Then StepSucess=Go(7,38,300) ;WN - UpArrow Endif Endif Endif If dx<0 AND dy>0 Then StepSucess=Go(5,37,300) ;SW - LeftArrow If StepSucess==-1 Then StepSucess=Go(1,39,300) ;NE - RightArrow StepSucess=Go(7,38,300) ;WN - UpArrow If StepSucess==-1 Then StepSucess=Go(3,40,300) ;SE - DownArrow Endif Endif Endif If dx<0 AND dy<0 Then StepSucess=Go(7,38,300) ;WN - UpArrow If StepSucess==-1 Then StepSucess=Go(3,40,300) ;SE - DownArrow StepSucess=Go(5,37,300) ;SW - LeftArrow If StepSucess==-1 Then StepSucess=Go(1,39,300) ;NE - RightArrow Endif Endif Endif Endif If dx<>0 AND dy==0 Then If dx>0 Then StepSucess=Go(2,34,300) ;E - PgDown If StepSucess==-1 Then StepSucess=Go(3,40,300) ;SE - DownArrow If StepSucess==-1 Then StepSucess=Go(1,39,300) ;NE - RightArrow Endif StepSucess=Go(2,34,300) ;E - PgDown Endif Endif If dx<0 Then StepSucess=Go(6,36,300) ;W - Home If StepSucess==-1 Then StepSucess=Go(7,38,300) ;WN - UpArrow If StepSucess==-1 Then StepSucess=Go(5,37,300) ;SW - LeftArrow Endif StepSucess=Go(6,36,300) ;W - Home Endif Endif Endif If dx==0 AND dy<>0 Then If dy>0 Then StepSucess=Go(4,35,300) ;S - End If StepSucess==-1 Then StepSucess=Go(3,40,300) ;SE - DownArrow If StepSucess==-1 Then StepSucess=Go(5,37,300) ;SW - LeftArrow Endif StepSucess=Go(4,35,300) ;S - End Endif Endif If dy<0 Then StepSucess=Go(0,33,300) ;N - PgUp If StepSucess==-1 Then StepSucess=Go(1,39,300) ;NE - RightArrow If StepSucess==-1 Then StepSucess=Go(7,38,300) ;WN - UpArrow Endif StepSucess=Go(0,33,300) ;N - PgUp Endif Endif Endif Wend end sub sub Go(dir,key,walkwait) VAR x,y, OldDir x=UO.GetX() y=UO.GetY() OldDir=UO.GetDir() If UO.GetDir()<>dir Then UO.Press(key) wait(walkwait) If UO.GetDir()<>dir Then CheckLag() Endif Endif UO.Press(key) wait(walkwait) If x==UO.GetX() AND y==UO.GetY() Then CheckLag() Endif If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then UO.Press(key) wait(walkwait) Endif If x==UO.GetX() AND y==UO.GetY() Then CheckLag() Endif If x==UO.GetX() AND y==UO.GetY() Then UO.Print("Zasada!") return -1 Else return 1 Endif end sub #============================================================== # CheckLag() - click on backpack and awaiting "backpack" # message in journal. # # Journal has been deleted!!! #-------------------------------------------------------------- sub CheckLag() UO.DeleteJournal() UO.Click('backpack') Repeat wait(500) Until UO.InJournal('backpack') end sub Vot takoj u menja Script na Sparing,No ja Kupil Novij Dom i Hachu Pomenjat kordinati...No ja Dolga Parilsa i Nemog Nekak Ponjat kak eto delajetsa...Mozet Podskazite Kakaja Stroka i Otkuda brat Kordinati.... |
|
| Author: | joker_psix [ 2005-01-08 21:30:18 ] |
| Post subject: | |
Code: WalkN(4054,598,'') |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|