| Yoko http://forum.yoko.com.ua/ |
|
| Magic Resistance http://forum.yoko.com.ua/viewtopic.php?f=17&t=16902 |
Page 1 of 1 |
| Author: | jonnybmac [ 2012-02-15 16:06:42 ] |
| Post subject: | Magic Resistance |
Hello, I am trying to raise magery and though it best to do my resistance first and finish off with magery if I need to once I GM resistance. Me and my friend are wanting to spar at the same time therefore I am trying to modify a resistance script to work with each other. I've tried inputting the lines Quote: Repeat UO.DeleteJournal() While NOT UO.InJournal("In Por Ylem") Wait(200) into the script so that if my target is casting magic arrow, I will wait until he is done before I start to cast my sequence. Maybe im doing it wrong casting until out of mana? Maybe we should just cast one at a time, meditate then go again? What I would like is for the script to understand that my target is casting magic arrow and wait until he has finished his 10-12 casts before I cast mine and vice versa. Many thanks Original Script Quote: sub main() var target='0x001A34CD' var chest='0x40328B45' uo.useobject(chest) wait(1000) while 1 while uo.mana > 10 if uo.bp<5 then uo.findtype('0x0F7A',-1,chest) if uo.findcount() then uo.moveitem('finditem','50','backpack') checklag() wait(600) endif endif if uo.ns<5 then uo.findtype('0x0F88',-1,chest) if uo.findcount() then uo.moveitem('finditem','50','backpack') checklag() wait(600) endif endif checklag() uo.cast('Magic Arrow',target) WaitForMana() wend if uo.mana < 10 then meditation() endif wend endsub sub checklag() repeat UO.DeleteJournal() UO.Click('backpack') until backpack()==1 endsub sub backpack() var n for n=0 to 200 if uo.injournal('a backpack') then return 1 endif wait(200) next endsub sub meditation() uo.findtype('0x0F0E','0x09DF','backpack') if uo.findcount() then uo.useobject('finditem') wait(700) else while uo.mana < uo.int if uo.Journal(0)=='You are preoccupied with thoughts of battle.' then uo.warmode(0) endif checklag() Uo.Useskill('Meditation') waitformed() wend endif endsub sub waitformed() var n for n=0 to 100 if uo.injournal('You lose|at peace') then return endif wait(500) next endsub Sub WaitForMana() VAR w,m=uo.mana for w=0 to 100 if uo.mana<m then return endif wait(200) next endsub Edited Script Quote: sub main()
uo.addobject('target') while uo.targeting() wait(4000) wend uo.addobject('chest') while uo.targeting() wait(4000) wend uo.useobject('chest') wait(1000) while 1 while uo.mana > 10 if uo.bp<5 then uo.findtype('0x0F7A',-1,'chest') if uo.findcount() then uo.moveitem('finditem','50','backpack') checklag() wait(600) endif endif if uo.ns<5 then uo.findtype('0x0F88',-1,'chest') if uo.findcount() then uo.moveitem('finditem','50','backpack') checklag() wait(600) endif endif Repeat UO.DeleteJournal() While NOT UO.InJournal("In Por Ylem") Wait(200) checklag() uo.cast('Magic Arrow','target') WaitForMana() wend if uo.mana < 10 then meditation() endif wend endsub sub checklag() repeat UO.DeleteJournal() UO.Click('backpack') until backpack()==1 endsub sub backpack() var n for n=0 to 200 if uo.injournal('a backpack') then return 1 endif wait(200) next endsub sub meditation() uo.findtype('0x0F0E','0x09DF','backpack') if uo.findcount() then uo.useobject('finditem') wait(700) else while uo.mana < uo.int if uo.Journal(0)=='You are preoccupied with thoughts of battle.' then uo.warmode(0) endif checklag() Uo.Useskill('Meditation') waitformed() wend endif endsub sub waitformed() var n for n=0 to 100 if uo.injournal('You lose|at peace') then return endif wait(500) next endsub Sub WaitForMana() VAR w,m=uo.mana for w=0 to 100 if uo.mana<m then return endif wait(200) next endsub |
|
| Author: | ZeroDX [ 2012-02-15 17:12:46 ] |
| Post subject: | Re: Magic Resistance |
Code: sub main() |
|
| Author: | Nmy [ 2012-02-15 17:13:14 ] |
| Post subject: | Re: Magic Resistance |
There's no need to cast magic for both of you. One of you should cast until your friends magic resistance is 100 then other one does the same thing. |
|
| Author: | jonnybmac [ 2012-02-15 17:17:39 ] |
| Post subject: | Re: Magic Resistance |
Wont we save time doing it both at the same time though? |
|
| Author: | jonnybmac [ 2012-02-15 17:22:30 ] |
| Post subject: | Re: Magic Resistance |
What about: I cast spell magic arrow until mana < 10 uo.say 'done' - other client reads the done and starts his cycle i start meditating through his spam once his cycle is complete he then says done and i proceed to repeat mine whilst he meditates |
|
| Author: | Nmy [ 2012-02-15 17:37:11 ] |
| Post subject: | Re: Magic Resistance |
If attacking you won't stop meditation, then yes, you would save some of the time. Otherwise it's the same. uo.msg('stop/go') thats what i would do |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|