Ко мне за помощью в настройке скрипта не лезть!!! Мне жалко своего времени. Извините.
Code:
sub fishing()
var x
var y
var mx
var fishtype
var fishpack
var i
var j
var pole=uo.ObjAtLayer("Lhand")
var fw=0
var mc=0;
var dir='Left';
uo.print(pole)
uo.set('injectecho','1')
uo.print('Выбери пак для мана-рыбы')
uo.deleteJournal()
uo.addObject('fishmanapack')
i=0
repeat
wait(100)
i=i+1
until uo.inJournal('Object updated') or i>100
uo.print('Выбери пак для трэш-рыбы')
uo.deleteJournal()
uo.addObject('fishbadpack')
i=0
repeat
wait(100)
i=i+1
until uo.inJournal('Object updated') or i>100
uo.print(uo.GetSerial('fishmanapack')+','+uo.GetSerial('fishbadpack'))
fishst:
y=-6
repeat
x=-6
repeat
fw=0
fishl1:
if uo.injournal("He-he") then
wait(7000)
end if
uo.DeleteJournal()
uo.exec('waittargettile tile '+Str(uo.GetX()+x)+' '+Str(uo.GetY()+y)+' 251')
uo.useObject(pole)
j=0
repeat
wait(200)
j=j+1
until uo.InJournal("You pull") or uo.InJournal("You fish a while") or uo.InJournal("There are no fish") or uo.InJournal("That is too far") or j>100
if uo.InJournal("There are no fish") or uo.InJournal("That is too far") then
uo.print("fishln1")
goto fishln1
end if
if uo.InJournal("You fish a while") then
fw=fw+1
uo.print("Попытка "+str(fw))
if fw>9 then
goto fishlnl
end if
end if
if uo.InJournal("You pull") then
fw=0
goto fishln1
end if
goto fishl1
fishln1:
x=x+1
until x>6
####### разбор рыбы начинается
grabtype('gr_fish',-1,'gr_fish_pack',0)
wait(100)
grabtype('kor_fish',-1,'kor_fish_pack',0)
wait(100)
grabtype('yel_fish',-1,'yel_fish_pack',0)
wait(100)
grabtype('blu_fish',-1,'blu_fish_pack',0)
wait(100)
uo.ignorereset()
fishgr:
repeat
uo.findtype('sm_fish',0,'ground')
if uo.findcount()==0 then
goto fishl2
end if
;brunex
uo.useobject('finditem')
;blondex
; grabtype('sm_fish',0,'fishbadpack',1)
; uo.findtype(-1,-1,'fishbadpack')
; if uo.findcount()>=254 then
; fishnewpack(1)
; end if
;/blond
uo.ignore('finditem')
wait(500)
until uo.findcount()==0
if uo.injournal("He-he") then
wait(7000)
end if
fishl2:
uo.ignorereset()
repeat
uo.findtype('sm_fish',0,'ground')
if uo.findcount()<>0 then
goto fishgr
end if
grabtype('sm_fish',0x078B,'fishbadpack',1)
uo.findtype(-1,-1,'fishbadpack')
if uo.findcount()>=255 then
fishnewpack(1)
end if
grabtype('sm_fish',0x0798,'fishbadpack',1)
uo.findtype(-1,-1,'fishbadpack')
if uo.findcount()>=255 then
fishnewpack(1)
end if
grabtype('sm_fish',0x0791,'fishmanapack',1)
uo.findtype(-1,-1,'fishmanapack')
if uo.findcount()>=255 then
fishnewpack(0)
end if
uo.findtype('sm_fish',-1,'ground')
until uo.findcount()==0
######## разбор рыбы закончен
fishl3:
uo.ignorereset()
y=y+1
until y>6
fishex:
mx=uo.GetX()
mc=0;
while (uo.GetX()-mx)*(uo.GetX()-mx)<169
uo.say(dir)
wait(2000)
uo.say('Stop')
wait(1000)
mc=mc+1
if mc>40 then
if dir=='Right' then
dir='Left'
mc=0
else
dir='Right'
mc=0
end if
end if
Wend
goto fishst
end sub
sub grabtype(tp,col,pck,bool)
uo.ignorereset()
uo.set('finddistance','4')
repeat
uo.findtype(tp,col,'ground')
if uo.findcount()==0 then
goto grabtypeex
end if
if bool==0 then
uo.moveitem('finditem','all',pck)
else
uo.exec('moveitem finditem all '+pck+' 100 100 0')
end if
uo.ignore('finditem')
wait(600)
until uo.findcount()==0
grabtypeex:
wait(400)
end sub
sub fishnewpack(ch)
var fpack
uo.ignorereset()
uo.ignore('fishmanapack')
uo.ignore('fishbadpack')
fnpst:
uo.findtype(0x0E75,-1,'myShipHatch')
if uo.findcount()==0 then
uo.print('Не хватает паков')
uo.closeuo()
end if
uo.print('>paks>'+str(uo.findcount()))
wait(500)
if ch==0 then
uo.addobject('fishmanapack','finditem')
fpack='fishmanapack'
else
uo.addobject('fishbadpack','finditem')
fpack='fishbadpack'
end if
uo.useobject(uo.GetSerial(fpack))
wait(2000)
uo.findtype(-1,-1,fpack)
uo.print('>>>>>'+str(uo.findcount()))
uo.print('>fpack>'+fpack)
uo.print('>Mana>>'+uo.GetSerial('fishmanapack'))
uo.print('>Bad>>>'+uo.GetSerial('fishbadpack'))
wait(500)
if uo.findcount()==1 then
goto fnpex
else
uo.ignore('fishmanapack')
uo.ignore('fishbadpack')
goto fnpst
end if
goto fnpst
fnpex:
uo.ignorereset()
wait(400)
end sub