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


Joined: 06 Nov 2008
Posts: 1

PostPosted: Thu Nov 06, 2008 3:37 am   

auto target... assassinate
 
I am expected to target a mob and kill it as i walk in to a room.

ha!

I want to link a mobs description with a command and have the description trigger the command.

Lord Harry potter would trigger assassinate yellow
Satan swine rider would trigger assassinate purple


what i need is a way to store the names and the command together so my trigger could do something like this.

#tr {assassinationlist.mobdescription.(what record?)}
{send command assassinationlist.command.(that record)}

I would really apprciate ideas on this one. I am getting pretty frustrated.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Nov 06, 2008 4:33 am   
 
I can't remember how this works in zMUD, but you want to take a look at data record variables. At one point, if you put a data record variable into a trigger pattern, the variable keys would be used in the pattern. So {@DataRecord} would be what you're after. Then, the value for each key is the command you want to do. So you'll end up with something like:

#trigger {^({@DescriptionList})$} {assassinate %db(@DescriptionList,%1)}

but I can't remember if this is how it works in the current version of zMUD, so you'll want to check that. If it isn't, you'll need to use two variables - one of them a string list of the descriptions, the other a data record variable where keys are those same descriptions and values are whatever command you want to send. Then you'll do something like:

#trigger {^({@DescriptionList})$} {assassinate %db(@CommandVar,%1)}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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