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
ChaoticCry
Beginner


Joined: 21 Feb 2002
Posts: 11
Location: USA

PostPosted: Thu Feb 28, 2002 8:03 am   

delayed trigger
 
i want to make a trigger to delay for 40 seconds so that when i sleep i wake automatically 40 seconds later and wear my silk scarf. the source is "You go to sleep."
what would i need to type to make my trigger as such?

*->MadPimp<-*
Reply with quote
bgunther
Novice


Joined: 20 Dec 2001
Posts: 39
Location: USA

PostPosted: Thu Feb 28, 2002 9:50 am   
 
What you want to do is make a 1 time alarm:

#trigger {^You go to sleep.} {#alarm +40 {wake;wear scarf}}

Thats designed to be entered from the command line, and assumes that the You go to sleep is at the start of a line. I also assume that the command to wake up is wake.





Bob, aka Kayd on SWMud and a few others.
Reply with quote
ChaoticCry
Beginner


Joined: 21 Feb 2002
Posts: 11
Location: USA

PostPosted: Fri Mar 01, 2002 10:39 pm   
 
it says #alarm +40 ( with an arrow pointing to the ( saying expression not allowed. *shrug* didnt work...

*->MadPimp<-*
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Mar 02, 2002 12:20 am   
 
I think your problem is a simple one. There are 3 sets of delimiting characters used to seperate potions of a script: () {} []. I believe you used ()when you needed to use {}.
Reply with quote
ChaoticCry
Beginner


Joined: 21 Feb 2002
Posts: 11
Location: USA

PostPosted: Sat Mar 02, 2002 7:18 am   
 
that isnt working. can someone tell me what to type in the pattern and command sections without the #TR?

*->MadPimp<-*
Reply with quote
bgunther
Novice


Joined: 20 Dec 2001
Posts: 39
Location: USA

PostPosted: Sat Mar 02, 2002 9:19 am   
 
If you are entering the trigger from the settings editor:
Pattern: ^You go to sleep.
value:
#alarm +40 {wake;wear scarf}

Please note: Those are curly braces {}, not parentheses ().



Bob, aka Kayd on SWMud and a few others.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Mar 02, 2002 1:34 pm   
 
When someone writes a script using #TRIGGER it is to be entered into the command line. Cut & Paste from the forums work great for this, plus we don't have to explain every time the steps involved in creating a setting using the Settings Editor. That is why most scripts you see people post are this way.

However, if you prefer to make your scripts using the Settings Editor, try looking at the syntax of the various commands used to create settings (#ALIAS, #TRIGGER, etc.) in the help file, so you know what part goes into which box in the Settings Editor. Basically, with triggers it is very easy, because it has the form:
#TRIGGER {pattern} {commands}

So you take pattern (without the braces) and put it in the Pattern box, and then you take commands (again, without the braces) and put it in the Value box.

Kjata
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