| Yoko http://forum.yoko.com.ua/ |
|
| Переделаите скрипт плиз. http://forum.yoko.com.ua/viewtopic.php?f=20&t=11994 |
Page 1 of 1 |
| Author: | Narick007 [ 2007-05-25 14:33:45 ] |
| Post subject: | Переделаите скрипт плиз. |
sub WarTraining() uo.setarm('current armor') var x = uo.getX() var y = uo.getY() var time = uo.timer(), tx, ty uo.addObject('opponent') while uo.targeting() wait(200) wend uo.addObject('bandages') while uo.targeting() wait(200) wend if uo.getX()-uo.getX('opponent') > 1 || uo.getX('opponent')-uo.getX() > 1 || uo.getY()-uo.getY('opponent') > 1 || uo.getY('opponent')-uo.getY() > 1 then uo.print('Ïåðñîíàæè äîëæíû ñòîÿòü ðÿäîì!') return endif if uo.getX() > uo.getX('opponent') then tx = x+1 ty = y else if uo.getX('opponent') > uo.getX() then tx = x-1 ty = y else if uo.getY() > uo.getY('opponent') then tx = x ty = y+1 else if uo.getY('opponent') > uo.getY() then tx = x ty = y-1 else uo.print('Âû äîëæíû áûòü íà ðàññòîÿíèè!!') return endif endif endif endif uo.warmode(true) uo.attack('opponent') repeat if uo.getHP() < uo.getMaxHP()/2 then Walk(tx,ty) uo.warmode(false) repeat uo.waittargetobject('self') uo.usetype(uo.getGraphic('bandages')) wait(350) until uo.getHP() == uo.getMaxHP() uo.arm('current armor') Walk(x,y) uo.warmode(true) uo.attack('opponent') endif if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then Walk(tx,ty) uo.warmode(false) repeat uo.waittargetobject('opponent') uo.usetype(uo.getGraphic('bandages')) wait(350) until uo.getHP('opponent') == uo.getMaxHP('opponent') uo.arm('current armor') Walk(x,y) uo.warmode(true) uo.attack('opponent') endif if uo.timer() > time + 9000 then time = uo.timer() UO.UseType('0x097B','0x0000') endif wait(700) until uo.dead() end sub sub Walk(x,y) go: while not uo.getX() == x || not uo.getY() == y if not uo.getX() == x then if uo.getX() > x then uo.press(36) else uo.press(34) endif endif if not uo.getY() == y && uo.getX() == x then if uo.getY() > y then uo.press(33) else uo.press(35) endif endif checklag() wend checklag() if not uo.getX() == x || not uo.getY() == y then goto go endif end sub sub CheckLag() if uo.Waiting()>0 then uo.Exec('canceltarget') end if uo.DeleteJournal() uo.Click('backpack') repeat wait(50) until uo.InJournal('backpack') while uo.injournal('backpack') uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!') wend end sub Когда я запускаю скрипт,он пишит,что второи чар должен стоять ближе,тоесть в притык,но впритык на дрв стрелять нельзя,может ктонеть переделать скрипт? |
|
| Author: | mez [ 2007-05-25 18:01:08 ] |
| Post subject: | Re: Переделаите скрипт плиз. |
Narick007 wrote: sub WarTraining()
uo.setarm('current armor') var x = uo.getX() var y = uo.getY() var time = uo.timer(), tx, ty uo.addObject('opponent') while uo.targeting() wait(200) wend uo.addObject('bandages') while uo.targeting() wait(200) wend if uo.getX()-uo.getX('opponent') > 1 || uo.getX('opponent')-uo.getX() > 1 || uo.getY()-uo.getY('opponent') > 1 || uo.getY('opponent')-uo.getY() > 1 then uo.print('Ïåðñîíàæè äîëæíû ñòîÿòü ðÿäîì!') return endif if uo.getX() > uo.getX('opponent') then tx = x+1 ty = y else if uo.getX('opponent') > uo.getX() then tx = x-1 ty = y else if uo.getY() > uo.getY('opponent') then tx = x ty = y+1 else if uo.getY('opponent') > uo.getY() then tx = x ty = y-1 else uo.print('Âû äîëæíû áûòü íà ðàññòîÿíèè!!') return endif endif endif endif uo.warmode(true) uo.attack('opponent') repeat if uo.getHP() < uo.getMaxHP()/2 then Walk(tx,ty) uo.warmode(false) repeat uo.waittargetobject('self') uo.usetype(uo.getGraphic('bandages')) wait(350) until uo.getHP() == uo.getMaxHP() uo.arm('current armor') Walk(x,y) uo.warmode(true) uo.attack('opponent') endif if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then Walk(tx,ty) uo.warmode(false) repeat uo.waittargetobject('opponent') uo.usetype(uo.getGraphic('bandages')) wait(350) until uo.getHP('opponent') == uo.getMaxHP('opponent') uo.arm('current armor') Walk(x,y) uo.warmode(true) uo.attack('opponent') endif if uo.timer() > time + 9000 then time = uo.timer() UO.UseType('0x097B','0x0000') endif wait(700) until uo.dead() end sub sub Walk(x,y) go: while not uo.getX() == x || not uo.getY() == y if not uo.getX() == x then if uo.getX() > x then uo.press(36) else uo.press(34) endif endif if not uo.getY() == y && uo.getX() == x then if uo.getY() > y then uo.press(33) else uo.press(35) endif endif checklag() wend checklag() if not uo.getX() == x || not uo.getY() == y then goto go endif end sub sub CheckLag() if uo.Waiting()>0 then uo.Exec('canceltarget') end if uo.DeleteJournal() uo.Click('backpack') repeat wait(50) until uo.InJournal('backpack') while uo.injournal('backpack') uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!') wend end sub Когда я запускаю скрипт,он пишит,что второи чар должен стоять ближе,тоесть в притык,но впритык на дрв стрелять нельзя,может ктонеть переделать скрипт? могу предложить такой скрипт! Code: sub main() |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|