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 Goto page 1, 2  Next
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 11:11 am   

Confused about trigger on prompt and trigger on newline
 
Trigger on prompt just doesnt do anything at all ? In zmud it was simple to understand - if i wanted something to trigger in the presence of a prompt instantly and without newlines, i just selected trigger on prompt, if i wanted triggers to fire only after a new line is received and not care about prompt at all then i selected trigger on newline.

Now in CMUD this is not the case for some reason ?

For example i made a basic trigger and selected trigger on prompt.

#TR {(*) arrives} {#show test successful}
#TR {(*) leaves} {#show test successful}


Now here is a line from my mud and you can see that my triggers are not firing at all. Why ?


<770hp 756ma 280mv>Ragnar Stoneforge arrives from the east.

<770hp 756ma 280mv>Ragnar Stoneforge leaves west.

<770hp 756ma 280mv>An armored man arrives from the west.
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 11:24 am   
 
When tested in Zmud this works line this

<770hp 756ma 280mv>Ragnar Stoneforge arrives from the east. (trigger on prompt fires)
(trigger on newline fires)
<770hp 756ma 280mv>Ragnar Stoneforge leaves west. ( (trigger on prompt fires)
(trigger on newline fires)
<770hp 756ma 280mv>An armored man arrives from the west (trigger on prompt fires)
(trigger on newline fires)
Reply with quote
Moo
Apprentice


Joined: 10 Apr 2009
Posts: 145

PostPosted: Sat Dec 04, 2010 2:34 pm   
 
Maybe it isn't detecting anything there as a prompt. Look in Options - Session - Prompt.
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 2:47 pm   
 
Its empty, is that the reason ?
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 3:22 pm   
 
Nope, still doesnt work..
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Dec 04, 2010 5:16 pm   
 
It works exactly the same as in ZMud. Which means you need to look at typical reasons why a setting won't fire: corruption, proper options selection, in a disabled class, etc.
_________________
EDIT: I didn't like my old signature
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 5:31 pm   
 
Ow, i tried and tested this multiple times, it just fails to work..
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2010 6:01 pm   
 
Anrok,
Turn on the debugger and post the output. I'll put money that there isn't a consistency from the mud. Also post the XML output of your trigger.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 6:13 pm   
 
Trigger is the above example, i'll get debugger logs and get back to you.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2010 6:15 pm   
 
Anrok wrote:
Trigger is the above example, i'll get debugger logs and get back to you.

Yes that is the trigger, but it isn't the xml output. We might see something in the xml output that you aren't showing here.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 6:44 pm   
 
Do you want an xml of all my triggers or just those 2 triggers?
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2010 7:08 pm   
 
Post any that you think will help
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 7:09 pm   
 
Debugger just doesnt show any trigger output for that mud message.. it just shows the text and thats it. If i change that trigger setting to trigger on newline it starts working..
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2010 7:11 pm   
 
Goto to the messages menu in the debug window and check them all. This will give you everything,
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 7:29 pm   
 
checked everything, there's no trigger action happening on debugger related to that command when trigger on prompt option is selected, once i select trigger on newline it debugs fine...


Last edited by Anrok on Sat Dec 04, 2010 7:32 pm; edited 1 time in total
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2010 7:31 pm   
 
okay. that means the trigger isn't matching the line.. So there is something wrong with the trgger. Post the trigger in XML and the text EXACTLY how it appears from the mud that you want to match. Make sure you put in into the code bbcode.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 7:32 pm   
 
Yeah but why does it match fine when i select trigger on newline ?
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 7:35 pm   
 
How do i put an xml file or should i open with notepad and copy/paste it here ?
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2010 7:39 pm   
 
Post the xml output into the code bbcode tag and the mud output.
To get the xml output.. Select the trigger from the editor window. Select the xml tab shown below the code. This will show you the xml code. Now copy it into your clipboard.
Now come back here and post it into the code bbcode tags. Which looks like this minus the spaces: [ code ] put text here [ /code ].

Make sure you do the same for the mud output that you are trying to match. Post what the debugger shows for that line of text.. The mud be sending that line, but not consistantly each time. I would look at the debugger window and see if it sends it the same way each time.. If it is different post BOTH outputs.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat Dec 04, 2010 9:04 pm   
 
Just right click on the trigger, then click COPY, then paste it into code tags in your post. You don't have to export to XML.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat Dec 04, 2010 9:14 pm   
 
Quote:
Yeah but why does it match fine when i select trigger on newline ?


That is why they asked you to post the raw I/O from the MUD for that line that shows up in the #DEBUG Window. They want to see the if it has <CR><LF> or <IAC><EOR> after it most likely.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sat Dec 04, 2010 9:18 pm   
 
oldguy2 wrote:
Quote:
Yeah but why does it match fine when i select trigger on newline ?


That is why they asked you to post the raw I/O from the MUD for that line that shows up in the #DEBUG Window. They want to see the if it has <CR><LF> or <IAC><EOR> after it most likely.

Exactly
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Anrok
Apprentice


Joined: 19 Nov 2010
Posts: 119

PostPosted: Sat Dec 04, 2010 9:22 pm   
 
Not sure if thats what you wanted, but..made a slightly different trigger as i could capture it more easily and not wait for timed events..

<trigger priority="10" newline="false" prompt="true" id="1">
<pattern>You are already standing.</pattern>
<value>#show prompt test success!</value>
</trigger>

<770hp 701ma 280mv>wake
sta
You are already awake...
<770hp 701ma 280mv>You are already standing.
<770hp 701ma 280mv>wake
sta
You are already awake...
<770hp 701ma 280mv>You are already standing.

0.3855 | ---
0.0018 | c testmud | [2423] testmud Comline : start :
0.0020 | a testmud |<770hp 701ma 280mv>wake
0.0017 | h testmud |<770hp 701ma 280mv><ESC>[2Swake<ESC>[0m
0.0039 | i testmud >wake<CR><LF>
0.0042 | a testmud |sta
0.0021 | h testmud |<ESC>[2Ssta<ESC>[0m
0.0040 | i testmud >sta<CR><LF>
0.0041 | d testmud | [2423] testmud Comline : stopped
0.5691 | i testmud *You are already awake...<ESC>[0m<LF><CR><LF><CR>
0.0000 | <770hp 701ma 280mv>
0.0025 | a testmud |You are already awake...
0.0024 | a testmud |
0.0018 | a testmud ]<770hp 701ma 280mv>
0.3854 | i testmud *You are already standing.<ESC>[0m<LF><CR><LF><CR>
0.0000 | <770hp 701ma 280mv>
0.0026 | a testmud |<770hp 701ma 280mv>You are already standing.
0.0015 | h testmud |<770hp 701ma 280mv>You are already standing.
0.0025 | a testmud |
0.0017 | a testmud ]<770hp 701ma 280mv>

============================================

Now as trigger on newline..

<trigger priority="10" id="1">
<pattern>You are already standing.</pattern>
<value>#show prompt test success!</value>
</trigger>

<770hp 700ma 280mv>wake
sta
You are already awake...
<770hp 701ma 280mv>You are already standing.
prompt test success!
<770hp 701ma 280mv>wake
sta
You are already awake...
<770hp 701ma 280mv>You are already standing.
prompt test success!

0.0018 | c testmud | [2423] testmud Comline : start :
0.0019 | a testmud |<770hp 701ma 280mv>wake
0.0017 | h testmud |<770hp 701ma 280mv><ESC>[2Swake<ESC>[0m
0.0036 | i testmud >wake<CR><LF>
0.0019 | a testmud |sta
0.0016 | h testmud |<ESC>[2Ssta<ESC>[0m
0.0035 | i testmud >sta<CR><LF>
0.0018 | d testmud | [2423] testmud Comline : stopped
0.4923 | i testmud *You are already awake...<ESC>[0m<LF><CR><LF><CR>
0.0000 | <770hp 701ma 280mv>
0.0025 | a testmud |You are already awake...
0.0023 | a testmud |
0.0016 | a testmud ]<770hp 701ma 280mv>
0.9931 | i testmud *You are already standing.<ESC>[0m<LF><CR><LF><CR>
0.0000 | <770hp 701ma 280mv>
0.0026 | a testmud |<770hp 701ma 280mv>You are already standing.
0.0014 | h testmud |<770hp 701ma 280mv>You are already standing.
0.0025 | f testmud | Pattern: You are already standing.
0.0020 | c testmud | exec : Pattern "You are already standing." : #show prompt test s...
0.0017 | n testmud | Exec Trigger "You are already standing."
0.0019 | a testmud |prompt test success!
0.0022 | a testmud |
0.0029 | a testmud ]<770hp 701ma 280mv>
15.000 | ---
0.0017 | c testmud | [2423] testmud Comline : start :
0.0019 | a testmud |<770hp 701ma 280mv>wake
0.0016 | h testmud |<770hp 701ma 280mv><ESC>[2Swake<ESC>[0m
0.0040 | i testmud >wake<CR><LF>
0.0020 | a testmud |sta
0.0016 | h testmud |<ESC>[2Ssta<ESC>[0m
0.0036 | i testmud >sta<CR><LF>
0.0017 | d testmud | [2423] testmud Comline : stopped
0.3161 | i testmud *You are already awake...<ESC>[0m<LF><CR><LF><CR>
0.0000 | <770hp 701ma 280mv>
0.0025 | a testmud |You are already awake...
0.0023 | a testmud |
0.0017 | a testmud ]<770hp 701ma 280mv>
0.3945 | i testmud *You are already standing.<ESC>[0m<LF><CR><LF><CR>
0.0000 | <770hp 701ma 280mv>
0.0025 | a testmud |<770hp 701ma 280mv>You are already standing.
0.0014 | h testmud |<770hp 701ma 280mv>You are already standing.
0.0024 | f testmud | Pattern: You are already standing.
0.0021 | c testmud | exec : Pattern "You are already standing." : #show prompt test s...
0.0018 | n testmud | Exec Trigger "You are already standing."
0.0016 | a testmud |prompt test success!
0.0024 | a testmud |
0.0035 | a testmud ]<770hp 701ma 280mv>
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat Dec 04, 2010 10:49 pm   
 
Looks to me like a problem with your MUD.

Use Trigger on New Line option and uncheck Trigger on Prompt.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Sun Dec 05, 2010 12:15 am   
 
Yep, You mud isn't consistent how they send the data. Try what oldguy2 said.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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