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


Joined: 09 Mar 2005
Posts: 7

PostPosted: Sat May 06, 2006 11:43 pm   

Tagging a player to avoid a Trigger Repeat
 
Hi All,

I need help with a trigger. Basically I want to have a trigger that fires when someone enters a room, but tag that person so that if they re-enter the room the trigger will not fire again.

ie.

Brutus enters from west door.

<trigger fires>
<tags Brutus>

tell Brutus If you would like to see a list of spells available please 'ask about spells'

Brutus leaves through west door.

<1 minute later>

Brutus enters from west door.
<check tags>
<Brutus is found>
<trigger ignored>

Sorry if this is sounding confusing, just trying to figure out where to start.

Thanks,

Deags.

Extra Credit Question: If I can get this to work I would like to set it up so that the trigger will work again for that same person after a defined amount of time. (ie. After 10 minutes the trigger will work for this person again)

<Zmud
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun May 07, 2006 1:10 am   
 
#CLASS PeopleRecorder
#VARIABLE RecentPeople {} {}
#TRIGGER {^(%w) enters from} {#IF (%ismember("%1",@RecentPeople)=0) {#ADDITEM RecentPeople {%1};tell %1 If you would like to see a list of spells available please 'ask about spells';#ALARM +600 {#DELITEM RecentPeople {%1}}}}
#CLASS 0

That should about cover everything. Thank you for posting lovely mud outputs that could readily be worked with instead of some vague stuff. Hopefully I didn't have any typos.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Deagan
Newbie


Joined: 09 Mar 2005
Posts: 7

PostPosted: Sun May 07, 2006 2:38 am   
 
Thanks Vijilante!

That will work out perfectly!

Regards,

Deags
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