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


Joined: 03 Sep 2006
Posts: 1

PostPosted: Sun Sep 03, 2006 5:52 am   

Odd coloring trigger problem: please help
 
I wrote a small script to color the status bar.

My problem is that the trigger won't fire at the prompt. It will only fire and change the colors if I type something making the old prompt move up the screen. I tried changing it to "trigger on prompt" and "trigger on newline" but it made no difference. Any ideas?

My prompt looks like this:

HP: [ 215 / 215 ] SP: [ 132 / 132 ] EP: [ 150 / 184 ]

My trigger is as follows:

Code:
Pattern:

HP: ~[ (%d) / (%d) ] SP: ~[ (%d) / (%d) ] EP: ~[ (%d) / (%d) ]


Code:
Value:

#cw %1 high,red
#cw %2 high,red
#cw %3 high,cyan
#cw %4 high,cyan
#cw %5 high,lightgreen
#cw %6 high,lightgreen
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Sep 04, 2006 3:15 am   
 
Quote:

My problem is that the trigger won't fire at the prompt. It will only fire and change the colors if I type something making the old prompt move up the screen. I tried changing it to "trigger on prompt" and "trigger on newline" but it made no difference. Any ideas?


Check the trigger on prompt option, uncheck the trigger on newline option. Your description of the problem is the classic description of a newline (ie, the normal type) trigger, so apparently having that option checked takes precedence or overrides the prompt option.
_________________
EDIT: I didn't like my old signature
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Sep 05, 2006 10:34 am   
 
The problem is that your trigger is actually (re)creating 6 other triggers everytime it fires. A correct value field would be:
Code:
#PSUB {<color red>%1</color>} %x1
#PSUB {<color red>%2</color>} %x2
#PSUB {<color cyan>%3</color>} %x3
#PSUB {<color cyan>%4</color>} %x4
#PSUB {<color lightgreen>%5</color>} %x5
#PSUB {<color lightgreen>%6</color>} %x6
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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