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


Joined: 19 Jan 2011
Posts: 5

PostPosted: Sat Feb 26, 2011 5:45 am   

Help creating a target trigger
 
Not able to get my head wrapped around this one.

So for now, I have static mobs listed, so I run a scan and see :

A Very Odd Looking Man, nearby to the (%w).

dash (%1) @{bsstate} odd

This works, our mud has backstab and knife, so I have a trigger set to modify that state

What I'd like is a target command, so I could type

target Odd

Then have it trigger on the variable, dash me into the room variable, and get to stabbing. This obviously work work in pvp, that'd be fantastic.
Reply with quote
Myrkul
Wanderer


Joined: 21 Aug 2008
Posts: 85

PostPosted: Sat Feb 26, 2011 4:16 pm   
 
[edit][/edit]


Last edited by Myrkul on Thu Apr 14, 2011 10:58 pm; edited 1 time in total
Reply with quote
RevFeuerFrei
Newbie


Joined: 19 Jan 2011
Posts: 5

PostPosted: Sat Feb 26, 2011 5:50 pm   
 
Ok, so I created the target alias


Code:

<alias name="target" id="165">
  <value>#var target %-1</value>
</alias>


Then, in my trigger, I did this
Code:

<trigger priority="1670" id="167">
  <pattern>{^*{@target}*, nearby to the (%w).$}</pattern>
  <value>{dash (%1);#send %concat(@bsstate," ",@target)}</value>
</trigger>

And when I ran a scan, I got this.
Code:
A tiny ant, nearby to the east.
ERROR: Trigger "{^*{@target}*, nearby to the (%w).$}" fired but did not compile


Where did I go astray?
Reply with quote
Myrkul
Wanderer


Joined: 21 Aug 2008
Posts: 85

PostPosted: Sat Feb 26, 2011 6:31 pm   
 
[edit][/edit]


Last edited by Myrkul on Thu Apr 14, 2011 10:58 pm; edited 1 time in total
Reply with quote
RevFeuerFrei
Newbie


Joined: 19 Jan 2011
Posts: 5

PostPosted: Sat Feb 26, 2011 8:06 pm   
 
Ah ha! made it too easy, had to tweak it a hair for our mud (dash is a single command, so just removed the semi colon and #send)

Thank you very much, that was it :)
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