Yoko http://forum.yoko.com.ua/ |
|
Подскажите... http://forum.yoko.com.ua/viewtopic.php?f=20&t=60 |
Page 1 of 1 |
Author: | ReaI [ 2004-04-10 13:57:55 ] |
Post subject: | Подскажите... |
Что тут надо исправить чтобы он по 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 |
Author: | Pummy [ 2004-04-10 15:20:04 ] |
Post subject: | |
Надо убрать вот это: 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 |
Author: | Pummy [ 2004-04-10 15:21:15 ] |
Post subject: | |
и про задержку не забудь |
Author: | ReaI [ 2004-04-10 16:50:23 ] |
Post subject: | |
ммм а как ее поставить задержку ? ) |
Author: | Pummy [ 2004-04-11 18:47:07 ] |
Post subject: | |
Ну чтоб вытаскивал рыбу прежде,чем закидывал удочку заново ![]() for 1 to 4 do #UO.Waittargettile("1341", str(i), str(j), str(mz)) #checklag() #UO.Usetype("0x0DBF") wait("по секундомеру посчитай =)") repeat |
Author: | Biga [ 2004-04-14 13:03:08 ] |
Post subject: | |
Pummy wrote: wait("по секундомеру посчитай =)") Лучше использовать uo.injournal() и ждать сообщения "You pull ..." Так надежнее.
|
Author: | Pummy [ 2004-04-15 07:53:16 ] |
Post subject: | |
Ты прав, но терь он знает как задержку ставить ) |
Page 1 of 1 | All times are UTC+02:00 |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |