Помогите со скриптом
Posted: 2004-04-25 09:02:28
У меня самый простейший скрипт, вылавливает всю рыбу кругом, а потом плывет. Вот тока он после отплытия почему то не ловит.......Стоит на месте и говорит stop-right и усё. Помогите пожалуйста
sub fishing()
var x
var y
var mx
var i
var j
var pole=uo.ObjAtLayer("Lhand") ; удочка
var fw=0
uo.set('injectecho','1')
uo.deleteJournal()
i=0
repeat
wait(100)
i=i+1
until uo.inJournal('Object updated') or i>100
fishst:
y=-6
repeat
x=-6
repeat
fw=0 ; - количество попыток выловить с данной клетки.
fishl1:
uo.DeleteJournal()
uo.exec('waittargettile tile '+Str(uo.GetX()+x)+' '+Str(uo.GetY()+y)+' 251') ; 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("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
end if
if not ( uo.InJournal("There are no fish") or uo.InJournal("That is too far")) then
goto fishl1
end if
fishlnl:
x=x+1
until x>6
uo.ignorereset()
y=y+1
until y>6
fishex:
mx=uo.GetX()
while uo.GetX()<mx+13
uo.say('Right')
wait(2000)
uo.say('Stop')
wait(1000)
Wend
goto fishst
end sub
sub fishing()
var x
var y
var mx
var i
var j
var pole=uo.ObjAtLayer("Lhand") ; удочка
var fw=0
uo.set('injectecho','1')
uo.deleteJournal()
i=0
repeat
wait(100)
i=i+1
until uo.inJournal('Object updated') or i>100
fishst:
y=-6
repeat
x=-6
repeat
fw=0 ; - количество попыток выловить с данной клетки.
fishl1:
uo.DeleteJournal()
uo.exec('waittargettile tile '+Str(uo.GetX()+x)+' '+Str(uo.GetY()+y)+' 251') ; 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("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
end if
if not ( uo.InJournal("There are no fish") or uo.InJournal("That is too far")) then
goto fishl1
end if
fishlnl:
x=x+1
until x>6
uo.ignorereset()
y=y+1
until y>6
fishex:
mx=uo.GetX()
while uo.GetX()<mx+13
uo.say('Right')
wait(2000)
uo.say('Stop')
wait(1000)
Wend
goto fishst
end sub