Подскажите...

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
ReaI
Posts: 3
Joined: 2004-04-09 16:52:50

Подскажите...

Post by ReaI »

Что тут надо исправить чтобы он по 5 раз ловил рыбу в 1 клетке (а не до полного вылавливания).


sub fishing()
var mx, my, mz, i, j
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
hide()
for i = mx-4 to mx+4
for j = my -4 to my+4
if UO.dead() then
return
endif
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("in water")
UO.usetype (0x400B1E26) ;kushaet zhareniy fishsteak
UO.DeleteJournal()
UO.Waittargettile("1341", str(i), str(j), str(mz))
checklag()
UO.Usetype("0x0DBF")
if UO.dead() then
return
endif
if UO.Weight>720 then
checklag()
recalltorazgruzka()
;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("far away") and not UO.InJournal("in water")
wait (100)
if UO.InJournal("You pull") then
UO.findtype('0x09CC','0x0000','ground') ;fish
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x09CD','0x0000','ground') ;fish
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x09CE','0x0000','ground') ;fish
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x09CF','0x0000','ground') ;fish
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x14EB','0x0000','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)
end if
wend
wend
UO.DeleteJournal()
next
next
end sub


sub hide()
while NOT UO.Hidden()
UO.DeleteJournal()
UO.Exec('warmode 0')
UO.UseSkill('Stealth')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied')
endif
wend
end sub

sub razgruzka()
UO.findtype('0x09CC','0x0000','backpack') ;fish
UO.usetype ('dagger')
UO.waittargetobject('finditem')
wait (500)
UO.findtype('0x09CD','0x0000','backpack') ;fish
UO.usetype ('dagger')
UO.waittargetobject('finditem')
wait (500)
UO.findtype('0x09CE','0x0000','backpack') ;fish
UO.usetype ('dagger')
UO.waittargetobject('finditem')
wait (500)
UO.findtype('0x09CF','0x0000','backpack') ;fish
UO.usetype ('dagger')
UO.waittargetobject('finditem')
wait (500)
VAR Cont=0x40112799 ; sunduk dlya razgruzki
var i
for i=1 to 5
UO.FindType('0x097A','0x0000','backpack')
UO.SetReceivingContainer(Cont)

UO.Grab('0','finditem')
UO.UnSetReceivingContainer()
wait (500)
next
UO.findtype('0x14EB','0x0000','backpack') ;tattered map
UO.SetReceivingContainer(Cont)
UO.Grab('0','finditem')
UO.UnSetReceivingContainer()
wait (500)
UO.SetReceivingContainer(Cont)
UO.Grab('0','finditem')
UO.UnSetReceivingContainer()
UO.findtype('0x0DD6','0x05F6','backpack') ;Truly rare fish
UO.SetReceivingContainer(Cont)
UO.Grab('0','finditem')
UO.UnSetReceivingContainer()
wait (500)
UO.findtype('0x0DD6','0x01BB','backpack') ;Prize fish
UO.SetReceivingContainer(Cont)
UO.Grab('0','finditem')
UO.UnSetReceivingContainer()
wait (500)
UO.Print("razgruzka zakonchena")
recalltofishing()
end sub

sub recalltorazgruzka()
uo.recall('0x40068C7C')
checklag()
wait (10000)
razgruzka()
end sub

sub recalltofishing()
uo.waittargetobject('ID=0x40165F4B')
uo.cast ('Recall')
checklag()
wait (5000)
remark()
end sub

sub remark()
checklag()
UO.Click('0x401A9678')
if UO.InJournal("(1 charges)") then
uo.waittargetobject('0x401A9678')
uo.cast ('Mark')
wait(3000)
fishing()
else
fishing()
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')

repeat
wait(50)
until UO.InJournal('backpack')
end sub
Pummy
Posts: 18
Joined: 2004-04-04 07:39:27

Post by Pummy »

Надо убрать вот это: not UO.Journal("no fish here")
и добавить:
for 1 to 4 do
#UO.Waittargettile("1341", str(i), str(j), str(mz))
#checklag()
#UO.Usetype("0x0DBF")
repeat
Pummy
Posts: 18
Joined: 2004-04-04 07:39:27

Post by Pummy »

и про задержку не забудь
ReaI
Posts: 3
Joined: 2004-04-09 16:52:50

Post by ReaI »

ммм а как ее поставить задержку ? )
Pummy
Posts: 18
Joined: 2004-04-04 07:39:27

Post by Pummy »

Ну чтоб вытаскивал рыбу прежде,чем закидывал удочку заново :)
for 1 to 4 do
#UO.Waittargettile("1341", str(i), str(j), str(mz))
#checklag()
#UO.Usetype("0x0DBF")
wait("по секундомеру посчитай =)")
repeat
Biga
Posts: 76
Joined: 2004-04-04 21:04:43
Contact:

Post by Biga »

Pummy wrote:wait("по секундомеру посчитай =)")
Лучше использовать uo.injournal() и ждать сообщения "You pull ..." Так надежнее.
Pummy
Posts: 18
Joined: 2004-04-04 07:39:27

Post by Pummy »

Ты прав, но терь он знает как задержку ставить )
Post Reply