Code: Select all
sub fishing()
var mx, my, mz, i, j
uo.print('À ãäå âåäðî?')
uo.exec('addobject Bag')
while uo.targeting()
wait(100)
wend
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
endif
UO.Print("Now Fishing In: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("Çäåñü áîëüøå íåò ðûáû...") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("Â ýòîì ìåñòå íåëüçÿ ëîâèòü ðûáó!")
UO.DeleteJournal()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype("0x0DC0") ;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("Çäåñü áîëüøå íåò ðûáû...") and not UO.InJournal("but fail") and not UO.InJournal("invalid object") and not UO.InJournal("Â ýòîì ìåñòå íåëüçÿ ëîâèòü ðûáó!")
wait (100)
if UO.InJournal("You pull") then
UO.SetReceivingContainer('Bag')
UO.findtype('0x09CB','0x0000','ground')
UO.grab ('5','finditem')
wait (100)
UO.UnSetReceivingContainer()
end if
wend
wend
UO.DeleteJournal()
next
next
end sub
Моя задача состоит в том, чтобы сделать
if not UO.findtype('0x09CB','0x0000','ground') then
и он должен начинать рыбачить в следующем квадрате...
помогите пожалуйста, а то я никак не соображу?