Replace your entire scriptfile with the one below
I've tested it and it works perfectly.
sub PromptParse (strTriggerName, trig_line, arrWildCards)
select case lcase(StrTriggerName)
case "install"
world.addtrigger "SendPrompt", "(*/*hp|*m|*mv)(*)<* coins>(#*)", "", 1, -1, 0, "", "PromptParse"
case "sendprompt" ' 1 2 3 4 5 6 7 - These are the wildcards
world.setvariable "CurrentHP", cint(arrWildCards(1))
world.setvariable "MaxHP", cint(arrWildCards(2))
world.setvariable "CurrentMana", cint(arrWildCards(3))
world.setvariable "CurrentVitality", cint(arrWildCards(4))
world.setvariable "CurrentCoins", arrWildCards(6)
case else
end select
' Below this line we can insert the subroutines that have to be checked everytime a prompt shows up.
call ManaCheck
end sub
sub ManaCheck
if world.getvariable("CurrentMana") <= world.getvariable("MinMana") then
world.send "Restore Self"
end if
end sub
sub SDspellup (strTriggerName, trig_line, arrWildCards)
' This subroutine is written in Visual Basic scripting for Mushclient
' to install type: /SDspellup "Install", "", ""
' Use however you like, modify at own risk
' SD in all triggernames are used to ID the writter of this script
' Storm Dragon of Gammon Software Solutions forum at : www.mushclient.com
select case ucase(strTriggerName)
case "INSTALL"
world.addtrigger "SDspelluptrigger", "* says 'spellup'", "", 17, -1, 0, "", "SDspellup"
world.note "Script installed, it should work properly"
case "SDSPELLUPTRIGGER"
world.setvariable "SDPerson", arrWildCards(1)
world.addtrigger "SDTOOLATE", "* says 'spellup'", "", 17, -1, 0, "", "SDspellup"
world.addtimer "SDCOMMENCE1", 0, 0, 1, "", 5, "SDspellup1"
case "SDTOOLATE"
world.send "say Sorry " + arrwildcards(1) + " but I am already casting spells on " + world.getvariable("SDPerson") + " please be patient"
case else
world.note "Incorrect usage, please read the comments of this subroutine"
end select
end sub
sub SDspellup1(StrTriggerName)
select case ucase(StrTriggerName)
case "SDCOMMENCE1"
world.send ",is now casting on " + world.getvariable("SDPERSON")
world.send "cast 'kindred strength' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE2", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE2"
world.send "cast 'elven beauty' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE3", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE3"
world.send "cast 'trollish vigor' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE4", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE4"
world.send "cast 'valiance' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE5", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE5"
world.send "cast 'fly' " + world.getvariable("SDPERSON")
world.send ",revs up the Turbo-Trancer 2000"
world.send ",enters Turbo-Trance 1 of 2"
world.addtimer "SDCOMMENCE6", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE6"
world.send "trance"
world.send ",enters Turbo-Trance 2 of 2"
world.send "smile " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE7", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE7"
world.send ",begins casting once more"
world.send "cast 'iceshield' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE8", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE8"
world.send "cast 'fireshield' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE9", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE9"
world.send "cast 'fireshield' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE10", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE10"
world.send "cast 'fireshield' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE11", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE11"
world.send "cast 'dragon wit' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE12", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE12"
world.send "cast 'slink' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE13", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE13"
world.send "cast 'sagacity' " + world.getvariable("SDPERSON")
world.addtimer "SDCOMMENCE99", 0, 0, 2, "", 5, "SDspellup1"
case "SDCOMMENCE99"
world.note "Done! Target has been spelled up!"
world.send ",looks about for others to cast on!"
world.deletetrigger "SDTOOLATE"
world.addtrigger "SDspelluptrigger", "* says 'spellup'", "", 17, -1, 0, "", "SDspellup"
end select
end sub
Odd problem, seems to work perfectly now though, I do not know what the problem was :\
but it is gone now, enjoy the script! |