Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Trigger/Delayed Output?

Trigger/Delayed Output?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Storm Dragon   Denmark  (45 posts)  Bio
Date Reply #15 on Wed 02 Jan 2002 12:44 PM (UTC)
Message
You are quite right Nick
I seem to keep making mistakes in this thread
but it is a learning experience ;)
Top

Posted by Elric   USA  (51 posts)  Bio
Date Reply #16 on Wed 02 Jan 2002 01:28 PM (UTC)
Message
LoL.. Well then I am happy that I started this thread however long ago that I did.. Hehe.. But it seems that after adding the commas I had a perfect experience.. And it works great.. Thanks mate.

"By the pricking of my thumbs, something wicked this way comes. Open locks, whoever knocks!" MacBeth, Shakespeare
Top

Posted by Elric   USA  (51 posts)  Bio
Date Reply #17 on Wed 02 Jan 2002 01:31 PM (UTC)
Message
Ugh.. Scratch that.. It doesn't work perfect.. It just installs perfectly.. Lmao.. I had someone test it and I still got the note "Incorrect usage, please read the comments of this subroutine"... And that is after a real person, not invis, entirely normal, says "spellup"

"By the pricking of my thumbs, something wicked this way comes. Open locks, whoever knocks!" MacBeth, Shakespeare
Top

Posted by Storm Dragon   Denmark  (45 posts)  Bio
Date Reply #18 on Wed 02 Jan 2002 03:51 PM (UTC)
Message
LOL - Oh well one minor fix.. my 'replace all' seemed to mess up one of the cases

change:
  case "SDspellupTRIGGER"

to:
  case "SDSPELLUPTRIGGER"


the select case checks on uppercase characters only so it never evaluates the before as true.. no need to install after this change. :)
Top

Posted by Elric   USA  (51 posts)  Bio
Date Reply #19 on Wed 02 Jan 2002 11:17 PM (UTC)
Message
Leetle problem again.. I changed that.. But now when someone says spellup, there is nothing.. I mean it.. Not one thing.. Lmao.. Any ideas now?

"By the pricking of my thumbs, something wicked this way comes. Open locks, whoever knocks!" MacBeth, Shakespeare
Top

Posted by Storm Dragon   Denmark  (45 posts)  Bio
Date Reply #20 on Thu 03 Jan 2002 11:51 AM (UTC)

Amended on Thu 03 Jan 2002 12:03 PM (UTC) by Storm Dragon

Message
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!
Top

Posted by Elric   USA  (51 posts)  Bio
Date Reply #21 on Fri 04 Jan 2002 05:03 AM (UTC)
Message
Yes, it worked perfectly.. Thanks mate..

"By the pricking of my thumbs, something wicked this way comes. Open locks, whoever knocks!" MacBeth, Shakespeare
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


54,620 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.