|
Deagan Newbie
Joined: 09 Mar 2005 Posts: 7
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
Deagan Newbie
Joined: 09 Mar 2005 Posts: 7
|
Posted: Sun May 07, 2006 2:38 am |
Thanks Vijilante!
That will work out perfectly!
Regards,
Deags |
|
|
|
|
|