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
Eyeless
Wanderer


Joined: 02 Dec 2001
Posts: 80
Location: Canada

PostPosted: Sat Mar 13, 2004 5:40 am   

#SAYP
 
My script:
#TR {~* * joins the adventure.} {#CAP LOG:#GAG}
#TR {~* * was just struck down!} {#CAP LOG;#GAG}
#CLASS {LOG}
#TRIGGER {~* * joins the adventure.} {#SAYP {%time( "h:nn am/pm")}}
#TRIGGER {~* (*) was just struck down!} {#SAYP %time( "h:nn AM/PM")}
#CLASS 0

My problem:
7:38 pm * XXXXX joins the adventure.
7:38 pm * XXXXX was just struck down!
7:38 PM * XXXXX joins the adventure.
7:38 pm * XXXXX joins the adventure.

I'll point out the error for any who missed it... the time stamp is one line off, any way to correct this?

Also I have a trigger to suppress prompts created by these deaths and logins, but every once in a bit it causes screen scroll jitters (only a problem in that it's annoying) A better trigger than,:
#TR {>%s$} {#GAG}

for doing what I desire? (one that doesnt give you scroll jitters)
Reply with quote
Pega
Magician


Joined: 08 Jan 2001
Posts: 341
Location: Singapore

PostPosted: Sat Mar 13, 2004 6:11 am   
 
Use output substitutions:

#CLASS {LOG}
#TRIGGER {~* * joins the adventure.} {#SUB {%time("h:nn am/pm") %trigger}}
#TRIGGER {~* (*) was just struck down!} {#SUB {%time("h:nn AM/PM") * %1 was just struck down!}}
#CLASS 0
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Mar 13, 2004 9:33 pm   
 
With a trigger in the child window, the timestamp occurs AFTER the trigger text causing it to appear on the next line. To have it on the same line, you need to do the timestamp BEFORE the text. This can be done by the same trigger which does the #CAPTURE.

#TR {~* * joins the adventure.} {:LOG:#SAYP {%time( "h:nn am/pm")};#CAP LOG:#GAG}
#TR {~* * was just struck down!} {:LOG:#SAYP {%time( "h:nn AM/PM")};#CAP LOG;#GAG}

It might help to use the Prompt option with your prompt suppression trigger.
#TR {>%s$} {#GAG} {} {prompt|nocr}
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