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


Joined: 11 Aug 2004
Posts: 7

PostPosted: Thu Mar 02, 2006 11:50 pm   

trigger help
 
Hiya

I need help making a trigger and don't know how to do it.

Here is a sample line that I need to set up a trigger for.

You get a blistered and mangled corpse of Autognome, a rough amber and a small pile of gold coins from the corpse 1.


So I need a trigger that will recognize the first part...you get...then search the line (which can be sometimes 2 or 3 lines long) and search for the term corpse (which may also appear multiple times...then drop corpse.


Just so you are clear the above line could also read
You get a blistered and mangled corpse of Autognome, a blistered and mangled corpse of Autognome, a blistered and mangled corpse of Autognome, a rough amber and a small pile of gold coins from the corpse 1.


So there are three corpses in this line and I need them all dropped.

I would really appreciate any help you can offer. I have spent two days now trying to figure it out but I just can't get it to work.

Also along same line....if I do an inventory that has a bunch of gems show up...like this:

01 A cracked alexandrite 0.20
01 A cracked amber 0.20
01 A cracked rhinestone 0.20
01 A damaged garnet 0.20
01 A dull amber 0.20
01 A dull rhinestone 0.20
01 A flawed quartz 0.20
01 A flawed sardonyx 0.20
02 A lackluster aquamarine 0.20
01 A lackluster spinel 0.20

and wanted to drop all the flawed ones...what would be the trigger for that. the mud makes you be specific though...it would have to drop flawed quartz, flawed sardonyx and so on. So it would have to search each line for flawed something then drop flawed something.

My problem is I don't understand the various variables and strings.
Thanks ahead of time for any help.
Reply with quote
Iceclaw
Apprentice


Joined: 11 Sep 2005
Posts: 124

PostPosted: Fri Mar 03, 2006 1:11 am   
 
#trigger {A flawed (*)) {drop flawed "%1"}
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Mar 03, 2006 1:32 am   
 
#TRIGGER {^You get * corpse} {#LOOP %eval(%numwords(%line,"corpse")-1) {drop corpse}}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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