Here's something that I haven't seen covered in previous posts.
I have a list of spells that I want to cast. Currently I use an alias "SPELLUP" which casts them all in a row, and I have a trigger to recast each spell that fails. What ends up happening is that all the spells get attempted, and any spells that fail are reattempted after the last spell on the list is tried. What I would like to do is use a script that looks something like this:
Is it possible to read X lines from the output window to catch a line that notes a spell's success or failure? I say X because the MUD's response to my casting may take a second or two, and other lines may be sent before it. Or would I have to use a Trigger to catch the line and send the results to a variable (is that possible without executing another script?), all while using a Do Loop to force the script to wait, say 3 seconds, then check the variable for results?
I have a list of spells that I want to cast. Currently I use an alias "SPELLUP" which casts them all in a row, and I have a trigger to recast each spell that fails. What ends up happening is that all the spells get attempted, and any spells that fail are reattempted after the last spell on the list is tried. What I would like to do is use a script that looks something like this:
For iSpell = 1 to UBound(List)
bSuccess = False
iAttempt = 0
Do
iAttempt = iAttempt + 1
Cast List(iSpell)
'Read a few lines from output to determine results
'If spell does not fail, bSuccess = true
Loop until bSuccess or (iAttempt = 5)
If Not (bSuccess) then
world.send "Unable to cast " & List(iSpell)
Exit Sub
End If
Next iSpell
Is it possible to read X lines from the output window to catch a line that notes a spell's success or failure? I say X because the MUD's response to my casting may take a second or two, and other lines may be sent before it. Or would I have to use a Trigger to catch the line and send the results to a variable (is that possible without executing another script?), all while using a Do Loop to force the script to wait, say 3 seconds, then check the variable for results?