|
Nju togda ewo odin voprosik: no uze nepoteme:
Kak v skript dobavitj, chtobi, jesli v odnoi kletke lovit 5 raz necho nepoluchaetsja poimatj, perehodil k sledujuwei kletke?
sub fishing() var mx, my, mz, i, j while uo.targeting() wait(100) wend
mx = UO.GetX("self") my = UO.GetY("self") mz = UO.GetZ("self") while not uo.dead() UO.DeleteJournal() for i = mx-6 to mx+6 for j = my -6 to my+6 if UO.dead() then return endif while not UO.Hidden() UO.Warmode("0") uo.print("hiding...") UO.UseSkill("Hiding") wait(4000) wend
UO.Print("Now Fishing In: "+str(mx-i)+" "+str(my-j)) while not UO.InJournal("no fish here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("Try fishing elsewhere") UO.DeleteJournal() UO.Waittargettile("1341", str(i), str(j), str(mz)) UO.Usetype("0x0DBF") ;FishingPole if UO.dead() then return endif if UO.Weight>660 then return endif while not UO.InJournal("You pull") and not UO.InJournal("location") and not UO.InJournal("no fish") and not UO.InJournal("but fail") and not UO.InJournal("Try fishing elsewhere") and not UO.InJournal("You fail to catch anything.") wait (100) if UO.InJournal("You pull") then UO.SetReceivingContainer('0x4001B048') #UO.findtype('0x09CC','0x0000','ground') ;fish #UO.grab ('3','finditem') #wait (200) #UO.findtype('0x09CD','0x0000','ground') ;fish #UO.grab ('3','finditem') #wait (200) #UO.findtype('0x09CE','0x0000','ground') ;fish #UO.grab ('3','finditem') #wait (200) UO.findtype('0x09CC','0x0445','ground') ;golden fish UO.grab ('3','finditem') wait (200) UO.findtype('0x14EB','0x09B1','ground') ;tattered map UO.grab ('1','finditem') wait (200) UO.findtype('0x0DD6','0x05F6','ground') ;Truly rare fish UO.grab ('1','finditem') wait (200) UO.findtype('0x0DD6','0x01BB','ground') ;Prize fish UO.grab ('1','finditem') wait (200) UO.findtype('0x0E2D','0x07A0','ground') ;a Status Ball UO.grab ('1','finditem') wait (200) UO.UnSetReceivingContainer() end if wend wend UO.DeleteJournal() next next wend end sub
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) uo.exec("exec fishing") 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
|