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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Sat May 23, 2009 7:00 pm   

[3.08] Prompt trigger does not fire when no command is sent to the mud
 
Been beating my head against the wall on this one for awhile now... haven't gotten anywhere.

My prompt is this:
Code:
241/323 75391 >


My trigger for matching it is this:
Code:
&%dHP/&%dMaxHP &%dEXP ~>


It works great when I send any commands... however if I just press enter with a blank command line, the mud returns another prompt and the trigger does not fire. I can do this repeatedly and the trigger will not fire until I actually send something (even gibberish). Trigger on prompt is checked, trigger on newline isn't.

Anyone know have any idea what's going on here?

Some script debugger output, showing the trigger firing when I enter a command, and not firing when I just press enter.
Code:
a w
j w
a Divots have been taken out of the empty north wall by what appears to be
a automatic blaster fire.  A hellish battle was fought here and seems to have
a continued on to the east, judging by the concentration of scorch marks and
a destroyed machinery in that direction.  Everything that could possibly be shot
a up has been, leaving the area looking like a forgotten war zone.   
a There are five obvious exits: west, east, southeast, south, and southwest.
a
a 281/323 75419 >
f   Pattern: &%dHP/&%dMaxHP &%dEXP ~> : (%1=281, %2=323, %3=75419)
a 281/323 75419 >
j
a 281/323 75419 >
j
a 281/323 75419 >
j
a 281/323 75419 >
j
---
a 287/323 75419 > swhsagfsdqa
j swhsagfsdqa
a What?
a 305/323 75419 >
f   Pattern: &%dHP/&%dMaxHP &%dEXP ~> : (%1=305, %2=323, %3=75419)
a 305/323 75419 >


Last edited by Smooth on Tue May 26, 2009 11:52 pm; edited 1 time in total
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Sat May 23, 2009 7:20 pm   
 
Have you enabled all message types in the debugger? If no, enable them all, repeat your test and post it here.
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Sat May 23, 2009 7:34 pm   
 
As requested...

Code:
0.0014 | c   [1] SWmudAeterna Comline : start :
0.0011 | a w
0.0009 | h <ESC>[2Sw<ESC>[0m
0.0023 | i w<CR><LF>
0.0013 | d   [1] SWmudAeterna Comline : stopped
0.1347 | i 228/334 6065 > <ESC>[0;37;40m<IAC><GA>
0.0017 | a 228/334 6065 >
0.0008 | h <ESC>[37m228/334 6065 > <ESC>[0m
0.0011 | k   Var "EXP" changed from "6062" to "6065"
0.0008 | f   Pattern: &%dHP/&%dMaxHP &%dEXP ~> : (%1=228, %2=334, %3=6065)
0.0014 | c   exec : Pattern "&%dHP/&%dMaxHP &%dEXP ~>" : #MATH PercentHP 100*...
0.0009 | n   Exec Trigger "&%dHP/&%dMaxHP &%dEXP ~>"
0.0008 | k   Var "EXPtnl" changed from "91938" to "91935"
0.3240 | i Divots have been taken out of the empty north wall by what appears to be<CR><LF>
0.0000 | automatic blaster fire.  A hellish battle was fought here and seems to have<CR><LF>
0.0000 | continued on to the east, judging by the concentration of scorch marks and<CR><LF>
0.0000 | destroyed machinery in that direction.  Everything that could possibly be shot<CR><LF>
0.0000 | up has been, leaving the area looking like a forgotten war zone.   <CR><LF>
0.0000 | <ESC>[0;37;40m<ESC>[36mThere are five obvious exits: west, east, southeast, south, and southwest.<CR><LF><CR><LF>
0.0000 | <ESC>[0;37;40m228/334 6065 > <ESC>[0;37;40m<IAC><GA>
0.0034 | a 228/334 6065 >
0.0008 | h <ESC>[37m228/334 6065 > <ESC>[0m
0.0009 | a Divots have been taken out of the empty north wall by what appears to be
0.0010 | a automatic blaster fire.  A hellish battle was fought here and seems to have
0.0013 | a continued on to the east, judging by the concentration of scorch marks and
0.0027 | a destroyed machinery in that direction.  Everything that could possibly be shot
0.0017 | a up has been, leaving the area looking like a forgotten war zone.   
0.0010 | a There are five obvious exits: west, east, southeast, south, and southwest.
0.0010 | a
0.0008 | a 228/334 6065 >
0.0008 | h <ESC>[37m228/334 6065 > <ESC>[0m
0.0011 | f   Pattern: &%dHP/&%dMaxHP &%dEXP ~> : (%1=228, %2=334, %3=6065)
0.0013 | c   exec : Pattern "&%dHP/&%dMaxHP &%dEXP ~>" : #MATH PercentHP 100*...
0.0008 | n   Exec Trigger "&%dHP/&%dMaxHP &%dEXP ~>"
26.234 | a 228/334 6065 >
0.0021 | h <ESC>[37m228/334 6065 > <ESC>[0m
0.0023 | i <CR><LF>
0.1356 | i 234/334 6065 > <ESC>[0;37;40m
0.3300 | i <IAC><GA>
3.2733 | a 234/334 6065 >
0.0012 | h <ESC>[37m234/334 6065 > <ESC>[0m
0.0023 | i <CR><LF>
0.1361 | i 240/334 6065 > <ESC>[0;37;40m
0.3310 | i <IAC><GA>
0.5052 | a 240/334 6065 >
0.0012 | h <ESC>[37m240/334 6065 > <ESC>[0m
0.0024 | i <CR><LF>
0.1401 | i 240/334 6065 > <ESC>[0;37;40m
0.3379 | i <IAC><GA>
0.2942 | a 240/334 6065 >
0.0012 | h <ESC>[37m240/334 6065 > <ESC>[0m
0.0026 | i <CR><LF>
0.1358 | i 240/334 6065 > <ESC>[0;37;40m
0.3249 | i <IAC><GA>
0.3269 | a 240/334 6065 >
0.0012 | h <ESC>[37m240/334 6065 > <ESC>[0m
0.0022 | i <CR><LF>
0.1357 | i 240/334 6065 > <ESC>[0;37;40m
0.3477 | i <IAC><GA>
1.7969 | ---
0.0012 | c   [1] SWmudAeterna Comline : start :
0.0012 | a 240/334 6065 > dskfjsaf
0.0010 | h <ESC>[37m240/334 6065 > <ESC>[2Sdskfjsaf<ESC>[0m
0.0064 | i dskfjsaf<CR><LF>
0.0017 | d   [1] SWmudAeterna Comline : stopped
0.1334 | i What?
0.3260 | i <CR><LF>
0.0000 | 240/334 6065 > <ESC>[0;37;40m<IAC><GA>
0.0015 | a What?
0.0017 | a 240/334 6065 >
0.0010 | h <ESC>[37m240/334 6065 > <ESC>[0m
0.0010 | k   Var "HP" changed from "228" to "240"
0.0017 | f   Pattern: &%dHP/&%dMaxHP &%dEXP ~> : (%1=240, %2=334, %3=6065)
0.0012 | c   exec : Pattern "&%dHP/&%dMaxHP &%dEXP ~>" : #MATH PercentHP 100*...
0.0008 | n   Exec Trigger "&%dHP/&%dMaxHP &%dEXP ~>"
0.0008 | k   Var "PercentHP" changed from "68" to "71"
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat May 23, 2009 9:35 pm   
 
You probably don't have the "Trigger on Prompt" option selected for your prompt trigger.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Sat May 23, 2009 10:15 pm   
 
I do, I said that in my original post :/
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Tue May 26, 2009 5:14 pm   
 
You are posting this in the beta forum therefore I can only assume that you are using a beta version. Possibly you used 3.07 which had an odd bug where although the GUI showed that a particular option of a trigger was ticked in actual fact it wasn't as far as the low level xml was concerned. If I were you I would untick and retick it and save the trigger.
_________________
Taz :)
Reply with quote
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Tue May 26, 2009 11:26 pm   
 
Good thought Taz, I was using 3.05 and upgraded to 3.08 but it didn't help any. Also have I double checked the XML lots of times to make sure the options were actually what they were supposed to be.

The thing is, the trigger works fine as long as I send a command to the mud. It's not like it doesn't trigger on the prompt at all... it only doesn't trigger when I send a blank command line. This makes me think it is something else, maybe a bug in cMUD, I don't know. Back when I used zMUD I do not ever recall having this problem with prompt triggers (it would've bothered the hell out of me then like it does now lol). I still play on the same mud, so it's not differences in muds causing the problem.

I am hoping when Zugg gets back from his vacation that he will see this and be able to shed some light on it.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed May 27, 2009 1:05 pm   
 
Are you certain that the construction &%dHP works? I haven't actually played much with the &varname syntax, but I don't see anything in the documentation suggesting that you can combine the &varname syntax with the %d syntax.

Also, could you post the XML code for your trigger?
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Wed May 27, 2009 4:27 pm   
 
He asked "Why my trigger don't fire", not "Why my trigger don't capture values" so I guess he has no troubles with setting values.

His trigger always fire on "a+h" message, but never if there were "i" messages before "a"
Reply with quote
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Wed May 27, 2009 6:34 pm   
 
Rahab: Yes, I'm certain that &%dHP works. I got that from somewhere in the documentation, actually. Here is the xml from my trigger:
Code:
<trigger priority="50" repeat="true" newline="false" prompt="true" id="5">
  <pattern><![CDATA[&%dHP/&%dMaxHP &%dEXP ~>]]></pattern>
  <value>#MATH PercentHP 100*@HP/@MaxHP
#MATH EXPtnl @EXPtotal-@EXP
#MATH PercentEXP 100*@EXP/@EXPtotal</value>
</trigger>
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Sun May 31, 2009 5:23 am   
 
Check the newline option as well. I know it makes no sense, but try it anyway because (for me at least) prompt triggers behave oddly without both 'prompt' AND 'newline' checked.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Wed Jun 03, 2009 5:15 am   
 
Fairly sure I've tried the newline option before, but I tried it again anyways. It didn't make any difference :(
Reply with quote
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Thu Jun 18, 2009 8:25 pm   
 
*crickets*
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Jun 19, 2009 1:55 pm   
 
What mud is this for? Since the straight forward things aren't helping it could be that your mud is sending something unexpected with the prompt. Maybe I can login and recreate the problem.
_________________
Asati di tempari!
Reply with quote
Smooth
Beginner


Joined: 05 Aug 2002
Posts: 25

PostPosted: Fri Jun 19, 2009 8:38 pm   
 
It's SWmud, swmud.org 6666.

Edit: Thanks a lot for trying to figure this out :)
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Jun 19, 2009 10:16 pm   
 
I logged and buggered if I can't figure out what's happening either. This should work. There may be a bug, or you MUDs sending something funky. Note how the codes follow you prompt when you send nothing are different from when you type a command. I even tried recreating the trigger just in case that one was just not working.
_________________
Asati di tempari!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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