Помогите плиз добавить суда продажу рыбы...
Vendor name: Aislinn.
Sell list: fish.
Code: sub DropFish() ###################################################### ################################################################### Вместо этова продажа. end sub ############################################################
Code: sub nazad() gotoxy(1678,3531, 0) end sub ## no fish here sub adad()
uo.Print('Выбери контейнер...') uo.Exec('addobject Bag') while uo.Targeting() wait(100) wend
uo.Print('Выбери удочку...') uo.Exec('addobject FishPole') while uo.Targeting() wait(100) wend
uo.Print('Руна-Домой :') uo.Exec('addobject RuneHome') while uo.Targeting() wait(100) wend
uo.Print('Руна-Озеро №1 :') uo.Exec('addobject RuneFish1') while uo.Targeting() wait(100) wend
wait(1000) uo.Exec('exec RecallFishing1') wait(4000)
UO.Exec('terminate Reconnector') wait(1000) UO.Exec('exec Reconnector') wait(1000) begin: gotoxy(1678,3531, 0) Fishing() gotoxy(1683,3523, 0) Fishing() gotoxy(1688,3514, 0) Fishing() gotoxy(1694,3502, 0) Fishing() gotoxy(1702,3493, 0) Fishing() gotoxy(1709,3486, 0) Fishing()
nazad() goto begin end sub
sub tohide() while NOT UO.Hidden() UO.DeleteJournal() UO.UseSkill('Stealth') repeat wait(50) until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') wend end sub
sub CheckLag() UO.DeleteJournal() UO.Click('backpack') repeat wait(50) until UO.InJournal('backpack') end sub
sub getcoord() var a,b,c a = UO.GetX("self") b = UO.GetY("self") c = UO.GetZ("self") UO.Print("Position "+STR(a)+", "+STR(b)+", "+STR(c)) 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!") 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 Fishing() var mX, mY, mZ, i, j var f var a=0 #################### ### Меню/Options ### #################### ######################################################################### ### var TryToHide=0 ## 1 - Включить уход(перед ловлей) в хайд, 0 - выключить. ### var TakeFish=1 ## 1 - Включить сбор обычной рыбы, 0 - выключить. ### var TakeMaps=1 ## 1 - Включить сбор карт, 0 - выключить. ### var TakeRareFish=1 ## 1 - Включить сбор рарной рыбы, 0 - выключить. ### var TakePrizeFish=1 ## 1 - Включить сбор приз рыбы, 0 - выключить. ### var MaxWeight=420 ## - Вес при котором скрипт выключиться. ### ######################################################################### ################### ### Массив рыбы ### ################### dim Fish[6] Fish[0]=0x09CC Fish[1]=0x09CD Fish[2]=0x09CE Fish[3]=0x09CF Fish[4]=0x14EB Fish[5]=0x0DD6 Fish[6]=0x0DCA
Beginning: uo.Set('finddistance','6') mX = uo.getX("self") mY = uo.getY("self") mZ = uo.getZ("self") uo.DeleteJournal() for i = mX-6 to mX+6 for j = mY-6 to mY+6 if uo.Dead() then return end if
if TryToHide==1 then ToHide() end if
uo.Print("Сейчас ловим: "+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("in water") uo.DeleteJournal() uo.Waittargettile("1341", str(i), str(j), str(mZ)) uo.UseObject("FishPole") if uo.Dead() then return end if if uo.Weight>MaxWeight then wait(3000) uo.Exec('exec RecallHome') wait(4000) uo.Exec('exec DropFish') wait(17000) uo.Exec('exec RecallFishing1') wait(4000) goto Beginning end if 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("far away") and not uo.InJournal("in water") wait (100) if uo.InJournal("You pull") then
if a>0 then uo.print(STR(a)) end if
if TakeFish==1 then uo.Print('Собираем рыбу.') for f=0 to 3 uo.FindType(Fish[f],"-1","ground") if uo.Count(Fish[2])> 0 then a= a+1 end if uo.MoveItem("finditem","1","Fishs") wait(200) next end if
if TakeMaps==1 then uo.Print('Собираем карты.') for f=4 to 4 uo.FindType(Fish[f],"-1","ground") uo.MoveItem("finditem","-1","Maps") wait(200) next end if
if TakeRareFish==1 then uo.Print('Собираем рар рыбу.') for f=5 to 5 uo.FindType(Fish[f],"-1","ground") uo.MoveItem("finditem","-1","RareFish") wait(200) next end if
if TakePrizeFish==1 then uo.Print('Собираем приз рыбу.') for f=6 to 6 uo.FindType(Fish[f],"-1","ground") uo.MoveItem("finditem","-1","PrizeFish") wait(200) next end if end if wend wend uo.DeleteJournal() next next end sub
sub ToHide() while not uo.Hidden() uo.Exec('warmode 0') uo.Print('Пытаемся уйти в хайд...') uo.DeleteJournal() uo.UseSkill('Stealth') wait(4100) wend wait(100) end sub
sub DropFish() ###################################################### ################################################################### Вместо этова продажа. end sub ############################################################
sub RecallHome() var mX, mY reccal: uo.DeleteJournal() if uo.Waiting() then uo.CancelTarget() end if mX = uo.GetX("self") mY = uo.GetY("self") uo.DeleteJournal() uo.WaittargetObject('RuneHome') wait(500) uo.Cast('Recall') wait(4500) if not uo.GetX("self") <> mX and not uo.GetY("self") <> mY then goto reccal end if end sub
sub RecallFishing1() var mX, mY reccal: uo.DeleteJournal() if uo.Waiting() then uo.CancelTarget() end if mX = uo.GetX("self") mY = uo.GetY("self") uo.DeleteJournal() uo.WaittargetObject('RuneFish1') wait(500) uo.Cast('Recall') wait(4500) if not uo.GetX("self") <> mX and not uo.GetY("self") <> mY then goto reccal end if 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) 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
sub rasklad() var map='0x14EB' uo.Exec('addobject meshok') while uo.Targeting() wait(100) wend uo.FindType(map,'-1','backpack') while uo.FindCount() uo.FindType(map,'-1','backpack') uo.moveitem('finditem','1','meshok') wait(500) wend end sub
|