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
Yvonne
Newbie


Joined: 03 Apr 2006
Posts: 7
Location: Houston, TX

PostPosted: Thu Jul 06, 2006 7:35 am   

Help starting a stringlist....
 
How can I begin a stringlist of names for example Jane, John, Lucy, and Joe. Then to make it into a trigger that if one of them send me a tell stating something specific, like jump. My system will then trigger the effect I want done. I'm totally not understanding how to make a stringlist of names to trigger something. A visual example would be good if possible.
Reply with quote
Reygar
Novice


Joined: 22 Aug 2004
Posts: 32

PostPosted: Thu Jul 06, 2006 2:15 pm   
 
something like

Code:
#CLASS {Actions}
#ALIAS af {#ADDITEM friendlist}
#ALIAS df {#DELITEM friendlist}
#VAR Friendlist {Luke|Jane|John|Joe}
#TRIGGER {^{@friendlist} tells you '(*)'.} {%1}
#CLASS 0


"af Bob" will add bob to the list of people that can tell you what to do
"df Bob" will remove him from the list

be careful with this one....you will do EXACTLY what they tell you even if it is bad for your health.....you can also limit the actions that you will respond to.

A couple of lines of text from your mud would help me match the trigger if you need more help.
Reply with quote
Yvonne
Newbie


Joined: 03 Apr 2006
Posts: 7
Location: Houston, TX

PostPosted: Thu Jul 06, 2006 4:43 pm   stringlist help
 
Ok, to be more exact, like a list of friends as stated before, and anyone of them can send me a tell to beckon, which will trigger my skill to beckon all on my enemy list

like: Jane tells you, "beckon" and my trigger would be "cast 'beckon"


which will then beckon all my enemies from an adjacent room.
Reply with quote
Reygar
Novice


Joined: 22 Aug 2004
Posts: 32

PostPosted: Thu Jul 06, 2006 4:48 pm   
 
Code:
#CLASS {Actions}
#ALIAS af {#ADDITEM friendlist}
#ALIAS df {#DELITEM friendlist}
#VAR Friendlist {Luke|Jane|John|Joe}
#TRIGGER {^{@friendlist} tells you, "(*)".} {cast '%1'}
#CLASS 0


if that doesn't work copy and paste some lines of output from your mud.
Reply with quote
Yvonne
Newbie


Joined: 03 Apr 2006
Posts: 7
Location: Houston, TX

PostPosted: Fri Jul 07, 2006 3:42 am   
 
Would I also need some #if expressions or wild cards?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 07, 2006 4:45 am   
 
It's all in Reygar's script. The aliases can be made pickier, but otherwise are fully functional. The ^ tells ZMud to only match this trigger at the start of a line.

The {@friendlist} is a stringlist pattern that limits the trigger match to just the names in your friendlist variable.

(*) is there so you can specify what to cast. Now, if you're going to expand on this, your different spells may have different formats (ie, some might require a target). If so, you will have to parenthesize the stringlist pattern and use #IF and related commands to determine what spell is wanted and what information is needed to cast it.
_________________
EDIT: I didn't like my old signature
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