Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
nutsnbolts
Apprentice


Joined: 01 May 2002
Posts: 188
Location: USA

PostPosted: Wed Jul 10, 2002 2:55 pm   

TRIGGERING / BUTTON Problem....question
 
Ok I have been tinkering with this for quite some time but this is a slight annoyance that I can't seem to figure out. Basically I have triggers that changes the state (color) of buttons depending on whether a specific spell wears off or is casted.

The problem is this. I have a spell called Protection and as the spell wears off and I type 'affects' it'll show me how long I will have the spell. This then changes the states of my button accordingly. However, if another spell called 'Room Protection' is there, it'll also trigger the 'Protection' button.

For instance, when I type affects:

Protection, which will wear of sometime today.
Room Protection, which will wear of soon.


These are two different spells, however, 'Room Protection' will trigger 'Protection's button as well. How do I go about making the trigger more specific and being able to differentiate between the two.

Thank you for everything, it's always appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jul 10, 2002 3:18 pm   
 
In this case, anchor it.
#TR {^Protection}

LightBulb
Senior Member
Reply with quote
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Wed Jul 10, 2002 3:22 pm   
 
have you got the trigger for room protection setup properly? wrapping it in ""'s may help, ala "Room Protection"

Why oh WHY did I have pass door on...
Reply with quote
nutsnbolts
Apprentice


Joined: 01 May 2002
Posts: 188
Location: USA

PostPosted: Thu Jul 11, 2002 4:06 am   
 
I forgot to mention, I that I have the trigger like this.

{Protection, will wear off half a day|Protection, will wear of many days!}

When I tried it with this:

{^Protection, will wear off half a day|^Protection, will wear of many days!}

It stopped working or detecting the trigger.

Any other suggestions?

Thank you for everything, it's always appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jul 11, 2002 4:36 am   
 
If for some reason you feel a need to include the entire line in your trigger and must have ONLY one trigger to cover all the possible lines for that spell:
{^Protection, will wear off {half a day|many days!}}

Of course your first post says the phrase is
Protection, which will wear of sometime today
so there's a good chance you just aren't bothering to match the Mud.

LightBulb
Senior Member
Reply with quote
nutsnbolts
Apprentice


Joined: 01 May 2002
Posts: 188
Location: USA

PostPosted: Thu Jul 11, 2002 2:47 pm   
 
oh damn, good tip lightbulb... Instead of repeating myself over and over again, I can just grab the "end parts"

On the other hand, I am just using examples of the affects of the spell. I'm not using verbatim text. I'm just proving a point that using the ^ wasn't triggering. I'll try other things...let me see what I can come up with.

Thank you for everything, it's always appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jul 11, 2002 7:22 pm   
 
Most problems are easier to fix when people do use verbatim text, preferably cut-and-paste. I have no way of seeing your actual script, so I will point out potential typos as they are GUARANTEED to stop triggers from working.

P.S. You have a bad habit of dropping the second f in off.

LightBulb
Senior Member
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Thu Jul 11, 2002 9:41 pm   
 
Here is an example of A trigger that will do what you want. If I have the proper text to work with.

#trig {^Protection, which will wear off (*)}

Remember that this is assuming that there is absolutely no text before the triggering text on the given line.

If there is then you would need something like.

#trig {{^room}Protection, which will wear off(*)$}

I'm not sure what your value is but, I imagine you are using if statements to make your buttons change colors. In that case you don't need to have the exact text in the triggering line.

Arminas, The Invisible horseman
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jul 11, 2002 11:30 pm   
 
quote:

Here is an example of A trigger that will do what you want. If I have the proper text to work with.

#trig {^Protection, which will wear off (*)}

Remember that this is assuming that there is absolutely no text before the triggering text on the given line.

If there is then you would need something like.

#trig {{^room}Protection, which will wear off(*)$}

I'm not sure what your value is but, I imagine you are using if statements to make your buttons change colors. In that case you don't need to have the exact text in the triggering line.

Arminas, The Invisible horseman



The stringlist special characters (curly brackets) used in a trigger denote a verbatim list of values and cannot be used with wildcards or other special symbols. Thus, this trigger:

#trigger {{^room|^area}} {#say Test}

Would ONLY fire if "^room" or "^area" appeared. It will not fire on "room" or "area". That's why your trigger stopped working, Nuts.

li'l shmoe of Dragon's Gate MUD
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net