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
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Sat Mar 09, 2002 10:25 am   

%quote Function
 
In my MUD, I play a guild that is responsible for a certain protection spell, called Iron Will. When my tank's Iron Will falls, I need a trigger to #beep me and #input the command to cast it at him/her. The problem is is that I party with numerous different tanks, and each one has a different message that they can change at any time. I set it up like this, but for some reason it won't work.

Alias name: tank_iw -> value: #pr tank_iw {Exact Iron Will fall msg}

Variable: tank_iw -> value: Tombslayer [party]: Iron Will Off!

Trigger: %quote(@tank_iw} -> value: #beep;#input {iw tombslayer}


Basically, I need to know how to make a trigger match a variable with special characters in it. I can't seem to make the %quote function work like it's meant to.

Thanks for any help you can give.

Fat Tony
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Mar 09, 2002 4:44 pm   
 
Hint #1: You are the one casting the spell, so instead of asking each tank for the message they prefer pick one of your own and tell them to use it. (tell tank if you want me to cast iron will, party tell Iron Will Off!)

Hint #2: If special characters are giving you problems, write your trigger so it doesn't use them (drop the part of the trigger that has the special characters):
Variable: tank_iw -> Iron Will Off!

Hint #3: If attempting to trigger from variables which contain special characters doesn't work, move the portion containing special characters into the constant part of the trigger phrase:
Trigger: {@tank ~[party~]: @tank_iw} -> value: iw @tank

Hint #4: Drop the #INPUT and let the trigger do the command, as in the example for Hint #3.

Hint #5: I would guess that most people will have the words "Iron Will" or "Ironwill" in their message. So, just write two general triggers on that basis and have done with it:
#TR {(%w) ~[party~]*iron will} {iw %1}
#TR {(%w) ~[party~]*ironwill} {iw %1}


LightBulb
All scripts untested unless otherwise noted
Reply with quote
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Sun Mar 10, 2002 2:28 am   
 
Thanks for your input, but those wouldn't work. There are many variations of how different tanks can express it, it would be more effective if it is possible to match a variable containing special characters. I've tried every way I can think of, was just wondering if I missed something, or if someone knows how.

Fat Tony
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Mar 10, 2002 3:08 am   
 
Those triggers are pretty open as it is.
Lightbulb's triggers cover all your examples
to date.

Perhaps as you are offering the trigger
service they could express it the way that
will "work" (ie you'll cast)?

If you start opening things up more than
Lightbulb suggests you are open to being
toasted by a grief player.

TonDiening
Beta Upgrading to 6.26
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Mar 10, 2002 5:47 am   
 
As I said in Hint #1, you are the one providing the service so you can dictate what the tank must do to receive it. All they can do is refuse to tank for you, but if your service is of great value you shouldn't have any trouble finding others who are willing to do it your way.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
crobb
Newbie


Joined: 10 Mar 2002
Posts: 3
Location: Iraq

PostPosted: Sun Mar 10, 2002 1:57 pm   
 
First, congrats for making an awesome forum, now i might be able to learn a few things about zmud and make it much easier for me when mudding.

Second, amazingly enough i think i might know the mud this guy is talking about. Because there is a character in it called Tombslayer. If its the one im thinking about, the tanks all have complex triggers of there own which they wont want to change their automessages for fear of messing their own triggers up...

But in any case you guys are doing a great job!
Reply with quote
crobb
Newbie


Joined: 10 Mar 2002
Posts: 3
Location: Iraq

PostPosted: Sun Mar 17, 2002 11:34 am   
 
is it possible that this mud is case sensitive. ie. if the value for @tank is Tombslayer then your trigger will send iw Tomslayer to the mud instead of iw tombslayer which should work ?

Sorry im not a programmer so maybe someone else could offer a way to overcome this..
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