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
➜ VBscript
➜ alias/trigger/script question
|
alias/trigger/script question
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Dradicus
(4 posts) Bio
|
| Date
| Sun 07 Nov 2004 07:46 AM (UTC) |
| Message
| I want to create an alias called detect that does this:
memorize detect invis
c detect
memorize detect good
c detect
memorize detect evil
c detect
memorize detect magic
c detect
there is a chnace that the memorization fails
if it does it outputs the text: "You failed to memorize it."
however, any single one of these can fail. I want it to on a fail retype in "memorize detect <which ever it failed on>" before it outputs out the "c detect"
can someone help me with this | | Top |
|
| Posted by
| Dradicus
(4 posts) Bio
|
| Date
| Reply #1 on Sun 07 Nov 2004 07:47 AM (UTC) |
| Message
| | what would be REALLY awesome is if it was a trigger or script that would for any spell I fail to memorize it would automatically memorize the correct spell (even if multiple memorizes were put in at one time) | | Top |
|
| Posted by
| Dradicus
(4 posts) Bio
|
| Date
| Reply #2 on Tue 09 Nov 2004 08:07 PM (UTC) |
| Message
| | I really know nothing about how to script with mushclient. I know the basics to aliasing and triggering, and I even know a little C++ code. If someone could at least help me get started, I might be able to figure out more from there. | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #3 on Tue 09 Nov 2004 08:33 PM (UTC) |
| Message
| Youll have to have a trigger for the memorization failed, do you get a success message?
If you do, have an alias to start it, then trigger for failure/success, on success you move onto the next thing (cast it, and then memorize the next spell) if you fail, send it again.
You'll have to keep track of 'where' you are (either have a trigger for each that you toggle on off, so 8(?) total) or you can have a variable that keeps track (1,2,3,4).
Or you can use the command history, and get the last command (which would be the spell) and then recast it. You'd still need some way to keep track of where you were though, so you'd know what to move onto next. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Tue 09 Nov 2004 08:35 PM (UTC) |
| Message
| Do you get a message when you *have* memorized it? If so, what?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Dradicus
(4 posts) Bio
|
| Date
| Reply #5 on Tue 09 Nov 2004 10:36 PM (UTC) |
| Message
| the failed message is generic for all spells
the success message is "Spell memorized." which is generic for all spells
I kinda see where you are going with that flannel, but I have no idea how one would do it using the mushclient scripting code | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #6 on Wed 10 Nov 2004 01:12 AM (UTC) Amended on Wed 10 Nov 2004 01:13 AM (UTC) by Flannel
|
| Message
| Well, since you have a success message, you'll need a trigger for that, and a trigger for a failure message.
If youre comfortable with scripting, pick up the VBscript Doc (its on the scripting download page). And go ahead and use that.
If youre not, (unless you plan on learning to script using this snippet) I suggest you use a daisychain of triggers.
You'll need two (failure, success) per spell, as well as an alias to kick off the whole thing.
Your alias sends the memorize message, and turns on the first round of triggers (youll need to name them, and then use the MC inbuilt script function EnableTrigger to enable/disable triggers throughout this). The rest of them should be turned off (they start that way), and the failure trigger sends memorize again, the success trigger sends the cast, and the next memorize, as well as turning the first round of triggers off, and the second one on.
Continue through this, for all your spells.
I only suggest doing it that way since yes, we can give you some script, but if you need to change it, you'll be lost.
But the list of script functions (mushclient forum, then there is a link on the top), the VBscript help file (link on the same page as the script engines), and then further inquiries (like how on earth these script things fit into my triggers) in the forum are your best friends. You'll do well perusing the functions (MC ones) and getting a feel for whats possible without any real scripting at all.
Otherwise (if you only want to use two triggers and an alias, with a variable) youll be incrementing that variable, and using If statements, in the same fashion as the daisy chain above, but the If statement will determine what to cast (in failure, just cast the spell, in success, increment the variable, and cast the 'current' spell (but you already added one) and then at the end, youll have to disable the triggers. With the alias starting it off like before. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | 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.
20,801 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top