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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Wed Aug 11, 2010 9:10 pm   

simple trigger help
 
I would like to be able to cast a spell on someone, should they ask for it.

I see this: Steve says 'invisibility'

I would then like to have the trigger send cast invisibility steve to the mudd!


Tia!
Reply with quote
robecks
Beginner


Joined: 22 Jun 2010
Posts: 17

PostPosted: Thu Aug 12, 2010 1:13 am   
 
#trigger {^(%w) says 'invisibility'} {cast invis %1} ... thats the most basic version ....
Reply with quote
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Thu Aug 12, 2010 3:47 pm   
 
Thanks for the help. I tried that and it just caused me to cast invisibility on myself.
I changed the %w to %1 and it worked.

I don't quite understand what the #trigger or the curly brackets and the carot are for. I just use the GUI and created a new trigger, put (in the 'Pattern' dialog box) %1 says 'invisibility please'$ and then in the window below pattern I put cast invis %1

Thanks!
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Aug 12, 2010 6:14 pm   
 
The text robecks gave was something you could type into the command line. The curly brackets would tell Cmud which part was the trigger pattern and which part was the trigger value.

The reason the trigger didn't work is probably because you didn't use parentheses. The parentheses are an important part of the pattern. You should _not_ use %1, %2, etc. inside the trigger pattern. Zmud allowed this, and it is still present in Cmud for backward compatibility, but it is deprecated and could be removed in future versions. The correct pattern would be:
Code:
^(%w) says 'invisibility'
Reply with quote
Morpheus666
Beginner


Joined: 11 Aug 2010
Posts: 22

PostPosted: Thu Aug 12, 2010 9:08 pm   
 
Thanks for the information, I have it all squared away now, and the triggers are firing away like they are suppose to , yes I am using %w

Thanks again!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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