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
Thandril
Adept


Joined: 03 Dec 2000
Posts: 260

PostPosted: Wed Jul 10, 2002 2:55 am   

TEMP triggers
 
A couple times I've found that I want to make a #TEMP trigger that, if it fails, will set itself up to trigger again. Is there a way to do this easily? A command to tell a temp trigger 'Don't delete yourself, run again' or 'Create a new temp trigger from yourself?' Hmm, maybe I can store the body of the trigger in a variable and pass that to temp? That might work. Other ideas?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jul 10, 2002 3:43 am   
 
Don't create it as a TEMP trigger. Create it as a full fleshed trigger with an id.

Format
#TRIGGER "ID" {Pattern} {Commands} "Class" {Options}

Then when it is succesful have it #UNTRIGGER itself by its ID.
Reply with quote
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Wed Jul 10, 2002 4:42 am   
 
or put your trigger in a class buy itself, this is an easy way to manage them.
then you can make a trigger turn the class on and off. I also have made a class of triggers that just turn other triggers on and off.
Reply with quote
doomfyre
Apprentice


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Wed Jul 10, 2002 2:36 pm   
 
Is there some reason why turning off classes from within a trigger wouldn't work? It works fine from the command line. I have a spellbot thats activated by an emote. I put the trigger to activate the bot in its own class (because i couldn't seem to get it to shut off the trigger using an ID), then i have a trigger that _should_ turn off that class, which is triggered off a response by my bot. Just a basic example:

#TR {Joe says spell me up} {#T+ spellup; say Casting on Joe} <--- inside it's own class called activate

#TR {You say Casting on Joe} {#T- activate; dospellup} <--- in a class called spellup

#TR {You cast the last spell in your spell prog} {#T+ activate; #T- spellup} <-- spellup class

This is just a dumbed down example, but should make the point. The reason for this, is to prevent Joe from saying the trigger phrase 5 times in a row and spamming me off the mud.

Thanks for the help
Reply with quote
Thandril
Adept


Joined: 03 Dec 2000
Posts: 260

PostPosted: Wed Jul 10, 2002 2:46 pm   
 
Thanks for the suggestions. Yes, I'm fully aware of classes. I just really didn't want to make a class for these triggers I don't expect to use often. I will probably try using the trigger ID and #UNTRIGGER.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jul 10, 2002 3:21 pm   
 
A #TEMP trigger remains until it fires, so the only way it could fail is to still be waiting when you quit. Even then, it hasn't really failed -- it just hasn't succeeded yet.

LightBulb
Senior Member
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