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
➜ Spell store variable
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Neverwhere
USA (40 posts) Bio
|
| Date
| Tue 01 Jan 2002 03:00 AM (UTC) |
| Message
| Okie.. I know I'm asking a ton of questions, but this should be the last one im gonna need.
When someone casts a spell such as (spell cast msg)"resistin lotsa phys", i want it to store what that spell was (not using the spell cast msg, but one defined by myself) so that when that particular spell wears off it will recall what type of spell it was. I'm asking this because there are a bunch of spells in the mud that I play that have the same down message, and if i set a trig, its only rigged to one of the types of that spell.. :/
Could someone tell me howto do it? :)
Neverwhere |
ChaosMUD: chaosmud.org:23
Always looking for new players/coders. Willing to train if your willing to lear. Contact Neverwhere or just mention that I sent you. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 01 Jan 2002 06:49 AM (UTC) |
| Message
| | Can you give an example of the MUD output that you expect to see? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Neverwhere
USA (40 posts) Bio
|
| Date
| Reply #2 on Thu 03 Jan 2002 09:31 PM (UTC) |
| Message
| umm... ok, I think that your wanting a bunch of different spell incantations, so im going to give you a few:
resistin lotsa phys - Physical
major burn res - Fire
klizu antifreez merc - Cold
major brain shield - Psionic
each of those spells are greater invulnerability spells, and they all have the same down message: "Your greater invulnerability spell wears off." I want it to store what type of spell it is, then put it in the msg to the world kinda like: "party say -=- Greater {XXX} is OFF -=-" or sumthin. Since they all have the exact down message, i need it to recall what spell was cast.
Neverwhere |
ChaosMUD: chaosmud.org:23
Always looking for new players/coders. Willing to train if your willing to lear. Contact Neverwhere or just mention that I sent you. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Fri 04 Jan 2002 12:37 AM (UTC) |
| Message
| | It isn't really clear to me what you want to do here, but perhaps one of the scripting experts can help you. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Neverwhere
USA (40 posts) Bio
|
| Date
| Reply #4 on Fri 04 Jan 2002 12:55 AM (UTC) |
| Message
| okay,
In the mud that I play, there are spells that protect against different damage types. Greater & lesser invulnerability spells, and they have different messages for when they are casted, but they all have the same down message, either "Your greater invulnerability spell wears off."(greater) or "Your lesser invulnerability spell wears off."(lesser).
I created a trigger for the greater down message, but that only works for the one spell that i created it for. I want the trigger to store what type of greater spell was cast, and then have it recall what type was cast when the spell wears off so that i dont have to have the same down msg for the different types.
I dont know if it makes any sense, but i could just create one generic one, but that wouldnt be very cool at all. :)
Wishing I knew VB,
Neverwhere |
ChaosMUD: chaosmud.org:23
Always looking for new players/coders. Willing to train if your willing to lear. Contact Neverwhere or just mention that I sent you. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #5 on Fri 04 Jan 2002 01:08 AM (UTC) |
| Message
| So far, so good. When the spell wears off you see ...
Your greater invulnerability spell wears off.
However what do you see exactly then the spell is cast?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Neverwhere
USA (40 posts) Bio
|
| Date
| Reply #6 on Fri 04 Jan 2002 01:59 AM (UTC) |
| Message
| there are a variety of different messages that you can recieve when its cast upon you..
You feel more resistant to XXX damage.
Fire, Psionic, Electric, Cold, Physical, etc.
those are just a few, but if you could give me the scripting needed for just one of those, then i can figure out the rest.
Neverwhere |
ChaosMUD: chaosmud.org:23
Always looking for new players/coders. Willing to train if your willing to lear. Contact Neverwhere or just mention that I sent you. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #7 on Fri 04 Jan 2002 04:26 AM (UTC) Amended on Fri 04 Jan 2002 04:30 AM (UTC) by Nick Gammon
|
| Message
| OK, I get it. You might be able to squeeze the desired results out without scripting, assuming you only have one spell type cast at once.
First, is to record the type of resistance you now have, based on the message when the spell is cast, so do this:
Trigger: You feel more resistant to * damage.
Send: %1
Send to: Variable (label is name)
Label: SpellType
You might want to set "change colour to" a different colour to confirm that you have matched on the trigger, and to alert you to it. Also maybe play a sound if you want.
What this does is send %1 (the first wildcard, namely the spell type) to the variable "spelltype".
You can test this by getting the spell cast, then checking the MUSHclient variables configuration screen. You should see a variable "spelltype" set to the type of spell, eg. "fire".
Then make a second trigger for when the spell wears off ...
Trigger: ^Your (greater|lesser) invulnerability spell wears off\.$
Send: Your resistance to @spelltype has now worn off.
Send to: Output
Regular expression: checked
Expand variables: checked
When the message about the greater/lesser invulnerability spell wearing off arives, it will send the message to "output" (ie. your own window, not the MUD), and include the "spelltype" variable (because of the "@").
This is what I saw in my test ...
Your greater invulnerability spell wears off.
Your resistance to Fire has now worn off.
The only thing this won't do is handle if you have multiple simultaneous spells. In that case you would need to use some scripting to store more than one of them. However I don't see how it could work out which one had worn off, as the "wear off" message is the same all the time, which is why you wanted to do this in the first place.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Neverwhere
USA (40 posts) Bio
|
| Date
| Reply #8 on Fri 04 Jan 2002 01:56 PM (UTC) |
| Message
| hey, thanks. This should work, and since you can have greater/lessers both on, could i just change the @spelltype variable to maybe a different variable name and still recieve the same variable effect?
Neverwhere |
ChaosMUD: chaosmud.org:23
Always looking for new players/coders. Willing to train if your willing to lear. Contact Neverwhere or just mention that I sent you. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #9 on Fri 04 Jan 2002 10:35 PM (UTC) |
| Message
| Sure, just change it to spelltype_G and spelltype_L or whatever you want to distinguish it.
In that case you need two triggers for casting the spell, and two for when it wears off. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
28,395 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top