Recast-spell after cast.
Posted: 2004-08-12 23:49:17
I have to ask how to automatically recast spell (like lightning) in pvp imediatelly after cast. I think i cant use Journal becose that isnt perfect.
Code: Select all
sub Lightningstrike()
Lightningcast:
UO.Cast('Lightning','lasttarget')
Repeat
Wait(50)
Until UO.InJournal("fizzle") OR timeup>8000 #(or however long lightning takes to cast on your server)
goto Lightningcast
Nidht wrote:Simple.Code: Select all
sub Lightningstrike()
Lightningcast:
UO.Cast('Lightning','lasttarget')
Repeat
Wait(50)
Until UO.InJournal("fizzle") OR timeup>8000 #(or however long lightning takes to cast on your server)
goto Lightningcast
The quick Wait in the repeat should work with the journal since it will check every 0.05 secondsNothing is perfect.
Nidht wrote:Simple.Code: Select all
sub Lightningstrike()
Lightningcast:
UO.Cast('Lightning','lasttarget')
Repeat
Wait(50)
Until UO.InJournal("fizzle") OR timeup>8000 #(or however long lightning takes to cast on your server)
goto Lightningcast
The quick Wait in the repeat should work with the journal since it will check every 0.05 secondsNothing is perfect.
Code: Select all
sub Lightningstrike()
var timeup = 3000
var manabefore = 0
while (not uo.Injournal('MYCASTINGSTOP'))
uo.deletejournal()
manabefore = uo.mana
uo.cast('Lightning','lasttarget')
repeat
wait (50)
timeup = timeup + 50
until (uo.Injournal("fizzle") or (timeup > 800) or (manabefore > uo.mana)
wend
end sub
Drakull wrote:lazy guy...Code: Select all
sub Lightningstrike()
var timeup = 3000
var manabefore = 0
while (not uo.Injournal('MYCASTINGSTOP'))
uo.deletejournal()
manabefore = uo.mana
uo.cast('Lightning','lasttarget')
repeat
wait (50)
timeup = timeup + 50
until (uo.Injournal("fizzle") or (timeup > 800) or (manabefore > uo.mana)
wend
end sub
Nidht wrote:Why timeup > 800? Lightning isn't necessarily 0.8 seconds to cast. It takes longer on the server I play.
I think it should be:
VAR timeup,timetocast = (whatever time it takes to cast)
And by putting "manabefore > uo.mana" it will do absolutely nothing...
Code: Select all
sub Lightningstrike()
var timeup = 3000
var timecast = 0
var manabefore = 0
while (not uo.Injournal('MYCASTINGSTOP'))
uo.deletejournal()
timecast = 0
manabefore = uo.mana
uo.cast('Lightning','lasttarget')
repeat
wait (50)
timecast = timecast + 50
until (uo.Injournal("fizzle") or (timecast > timeup) or (manabefore > uo.mana)
wend
end sub