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 ScriptQuote:
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 ScriptQuote:
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