Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Grishnak
Newbie


Joined: 13 Oct 2008
Posts: 2

PostPosted: Mon Oct 20, 2008 12:46 pm   

[2.36] Trigger stops working
 
Ok, not sure if this is a bug, but at least it doesn't work as I think it should: I'm writing a system for Achaea, and most of it is based on a Prompt Trigger that should fire on every prompt line. Which it usually does, up to a point where I heal some break afflictions. The vitals are taken from ATCP, not from the prompt line, in case anyone wonders.

The prompt trigger has a echoprompt line, so my output looks like this:

Quote:

5107h, 3606m, 22877e, 17035w cexk-[TarSys]
You are:
afflicted by a crippled right leg.
afflicted by a crippled left leg.
an insomniac.
5281h, 3627m, 22897e, 17031w cxk-[TarSys]
You take out some salve and quickly rub it on your legs.
The bones in your right leg mend.
5281h, 3627m, 22897e, 17031w cxk-[TarSys]
You have recovered equilibrium.
5281h, 3627m, 22897e, 17031w cexk-
You may apply another salve to yourself.
5281h, 3627m, 22897e, 17043w cexk-


I've run it through the debugger, and the output is the following:

Quote:

0.0023 | a Achaea ]5281h, 3627m, 22897e, 17031w cxk-
0.0011 | f Achaea | Pattern: ^%dh, %dm, %de, %dw &Promptline$ : (%1="cxk-")
0.0015 | c Achaea | exec : Pattern "Prompt_Trigger" : #echoprompt {@Tarsys_color} sy...
0.0009 | a Achaea ]5281h, 3627m, 22897e, 17031w cxk-[TarSys]
0.4958 | i Achaea >apply mending to legs<CR><LF>
0.1872 | i Achaea <You take out some salve and quickly rub it on your legs.<CR><LF>
0.0001 | The bones in your right leg mend.<CR><LF>
0.0000 | <IAC><SB><200>Char.Vitals<LF>
0.0001 | H:5281/5281 M:3627/4319 E:22897/24050 W:17031/17600 NL:59/100 <IAC><SE><ESC>[32m5281h, <ESC>[37m<ESC>[32m3627m, <ESC>[37m<ESC>[32m22897e, <ESC>[37m<ESC>[32m17031w <ESC>[37mcxk-<IAC><EOR>
0.0037 | a Achaea #Telnet 200: Char.Vitals<LF>H:5281/5281 M:3627/4319 E:22897/24050 W:17031/17600 NL:59/100
0.0026 | f Achaea | Telnet: Char\.Vitals\12H:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) ... : (%1=5281, %2=5281, %3=3627, %4=4319, %5=22897, %6=24050, %7=17031, %8=17600, %9=59)
0.0024 | c Achaea | exec : Telnet "1" : #var current_health {%1} #var max_health {%2...
0.0027 | a Achaea |5281h, 3627m, 22897e, 17031w cxk-[TarSys]
0.0028 | f Achaea | Pattern: ^%dh, %dm, %de, %dw
0.0026 | c Achaea | exec : Pattern "^%dh, %dm, %de, %dw" : #t- {TarSys|Tracking|Affl...
0.0032 | a Achaea |You take out some salve and quickly rub it on your legs.
0.0035 | a Achaea |The bones in your right leg mend.
0.0024 | f Achaea | Pattern: ^You take out some salve and quickly rub it on your {arms... : (%1="right", %2="leg")
0.0035 | c Achaea | exec : Pattern "^You take out some salve and quickly rub it on y...
0.0066 | a Achaea ]5281h, 3627m, 22897e, 17031w cxk-
0.0024 | f Achaea | Pattern: ^%dh, %dm, %de, %dw &Promptline$ : (%1="cxk-")
0.0027 | c Achaea | exec : Pattern "Prompt_Trigger" : #echoprompt {@Tarsys_color} sy...
0.0022 | a Achaea ]5281h, 3627m, 22897e, 17031w cxk-[TarSys]
0.0661 | f Achaea | Alarm: +1
0.0030 | c Achaea | exec : Alarm "_Alarm33" : #t- {TarSys|Tracking|Diagnose|At_D...
0.4622 | i Achaea <<CR><LF>
0.0001 | You have recovered equilibrium.<CR><LF>
0.0000 | <IAC><SB><200>Char.Vitals<LF>
0.0001 | H:5281/5281 M:3627/4319 E:22897/24050 W:17031/17600 NL:59/100 <IAC><SE><ESC>[32m5281h, <ESC>[37m<ESC>[32m3627m, <ESC>[37m<ESC>[32m22897e, <ESC>[37m<ESC>[32m17031w <ESC>[37mcexk-<IAC><EOR>
0.0035 | a Achaea #Telnet 200: Char.Vitals<LF>H:5281/5281 M:3627/4319 E:22897/24050 W:17031/17600 NL:59/100
0.0024 | f Achaea | Telnet: Char\.Vitals\12H:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) ... : (%1=5281, %2=5281, %3=3627, %4=4319, %5=22897, %6=24050, %7=17031, %8=17600, %9=59)
0.0023 | c Achaea | exec : Telnet "1" : #var current_health {%1} #var max_health {%2...
0.0030 | a Achaea |5281h, 3627m, 22897e, 17031w cxk-[TarSys]
0.0034 | a Achaea |You have recovered equilibrium.
0.0024 | f Achaea | Pattern: ^You have recovered equilibrium.$
0.0029 | c Achaea | exec : Pattern "^You have recovered equilibrium.$" : gain_bal eq...
0.0039 | a Achaea ]5281h, 3627m, 22897e, 17031w cexk-
0.6538 | i Achaea <<CR><LF>
0.0001 | You may apply another salve to yourself.<CR><LF>
0.0001 | <IAC><SB><200>Char.Vitals<LF>
0.0001 | H:5281/5281 M:3627/4319 E:22897/24050 W:17043/17600 NL:59/100 <IAC><SE><ESC>[32m5281h, <ESC>[37m<ESC>[32m3627m, <ESC>[37m<ESC>[32m22897e, <ESC>[37m<ESC>[32m17043w <ESC>[37mcexk-<IAC><EOR>
0.0033 | a Achaea #Telnet 200: Char.Vitals<LF>H:5281/5281 M:3627/4319 E:22897/24050 W:17043/17600 NL:59/100
0.0020 | f Achaea | Telnet: Char\.Vitals\12H:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) ... : (%1=5281, %2=5281, %3=3627, %4=4319, %5=22897, %6=24050, %7=17043, %8=17600, %9=59)
0.0023 | c Achaea | exec : Telnet "1" : #var current_health {%1} #var max_health {%2...
0.0059 | a Achaea |5281h, 3627m, 22897e, 17031w cexk-
0.0032 | a Achaea |You may apply another salve to yourself.
0.0025 | f Achaea | Pattern: ^You may apply another salve to yourself.$
0.0034 | c Achaea | exec : Pattern "^You may apply another salve to yourself.$" : ga...
0.1091 | a Achaea ]5281h, 3627m, 22897e, 17043w cexk-


The only way I've found to get the trigger working again is by cutting and pasting it into the same directory. Nothing else works that I've tried. The trigger itself looks like this:

Quote:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger name="Prompt_Trigger" priority="10" newline="false" prompt="true" copy="yes">
<pattern>^%dh, %dm, %de, %dw &amp;Promptline$</pattern>
<value>#echoprompt {@Tarsys_color}
sys_close_classes
#if (%pos( e, @Promptline)) {gain_bal equi} {lose_bal equi}
#if (%pos( x, @Promptline)) {gain_bal balance} {lose_bal balance}
#if (%pos( b, @Promptline)) {gain_def blindness} {lose_def blindness}
#if (%pos( d, @Promptline)) {gain_def deafness} {lose_def deafness}
#if (%pos( k, @Promptline)) {gain_def kola} {lose_def kola}
#if (%pos( c, @Promptline)) {gain_def cloak} {lose_def cloak}
#if (!@sys_auto_status.pause) {prompt_fire}</value>
</trigger>
</cmud>
Reply with quote
Grishnak
Newbie


Joined: 13 Oct 2008
Posts: 2

PostPosted: Thu Oct 23, 2008 7:56 am   
 
Hm, no ideas whatsoever?

This bug is making playing a real pain, and I have absolutely no idea how to fix it (other than manually copy/pasting the trigger each time it stops working, so if anyone has an idea what to do, I'd really appreciate that.

Also, if you need any additional data, let me know and I'll provide it, of course.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Oct 23, 2008 12:19 pm   
 
As advice for the future, posting a huge bunch of debugger lines isn't great - it looks a mess. Mark out the important lines in some way and remove the irrelevant ones. It takes quite a lot of effort to sift through that and find the lines where the trigger isn't firing, which would've been made much easier if you'd just said which they were.

So yeah, I'm trying in vain to interpret this log file - what does it look like in the debugger when a single prompt comes in? Are they always the same? Because in that file I can spot prompts like

Quote:
0.0000 | <IAC><SB><200>Char.Vitals<LF>
0.0001 | H:5281/5281 M:3627/4319 E:22897/24050 W:17031/17600 NL:59/100 <IAC><SE><ESC>[32m5281h, <ESC>[37m<ESC>[32m3627m, <ESC>[37m<ESC>[32m22897e, <ESC>[37m<ESC>[32m17031w <ESC>[37mcxk-<IAC><EOR>
0.0037 | a Achaea #Telnet 200: Char.Vitals<LF>H:5281/5281 M:3627/4319 E:22897/24050 W:17031/17600 NL:59/100
0.0026 | f Achaea | Telnet: Char\.Vitals\12H:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) ... : (%1=5281, %2=5281, %3=3627, %4=4319, %5=22897, %6=24050, %7=17031, %8=17600, %9=59)
0.0024 | c Achaea | exec : Telnet "1" : #var current_health {%1} #var max_health {%2...
0.0027 | a Achaea |5281h, 3627m, 22897e, 17031w cxk-[TarSys]
0.0028 | f Achaea | Pattern: ^%dh, %dm, %de, %dw
0.0026 | c Achaea | exec : Pattern "^%dh, %dm, %de, %dw" : #t- {TarSys|Tracking|Affl...


and prompts like

Quote:
0.0066 | a Achaea ]5281h, 3627m, 22897e, 17031w cxk-
0.0024 | f Achaea | Pattern: ^%dh, %dm, %de, %dw &Promptline$ : (%1="cxk-")
0.0027 | c Achaea | exec : Pattern "Prompt_Trigger" : #echoprompt {@Tarsys_color} sy...
0.0022 | a Achaea ]5281h, 3627m, 22897e, 17031w cxk-[TarSys]


Both of which are working fine. The ones that aren't working fine are:

Quote:
0.0039 | a Achaea ]5281h, 3627m, 22897e, 17031w cexk-


and

Quote:
0.0001 | <IAC><SB><200>Char.Vitals<LF>
0.0001 | H:5281/5281 M:3627/4319 E:22897/24050 W:17043/17600 NL:59/100 <IAC><SE><ESC>[32m5281h, <ESC>[37m<ESC>[32m3627m, <ESC>[37m<ESC>[32m22897e, <ESC>[37m<ESC>[32m17043w <ESC>[37mcexk-<IAC><EOR>
0.0033 | a Achaea #Telnet 200: Char.Vitals<LF>H:5281/5281 M:3627/4319 E:22897/24050 W:17043/17600 NL:59/100
0.0020 | f Achaea | Telnet: Char\.Vitals\12H:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) ... : (%1=5281, %2=5281, %3=3627, %4=4319, %5=22897, %6=24050, %7=17043, %8=17600, %9=59)
0.0023 | c Achaea | exec : Telnet "1" : #var current_health {%1} #var max_health {%2...
0.0059 | a Achaea |5281h, 3627m, 22897e, 17031w cexk-


which I just can't see any difference in. So firstly, am I correct in dividing the log up this way? Secondly, why do you some prompts not give an i message and others do?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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