|
markb Beginner
Joined: 15 Jul 2010 Posts: 12
|
Posted: Wed Jul 28, 2010 3:56 pm
[3.22] BUG: Trigger text not being detected |
Trigger pattern for MUD prompt:
^(%d)h, (%d)m (*)$
for sample text:
1342h, 1342m dev-
which should put %1=1342, %2=1342, %3="dev-"
I've copied the script debugger which shows that the prompt is not being picked up by the trigger pattern every time it appears. In this case, I press enter a couple of times slowly, then spam enter three times which then gets detected by the trigger:
| a avalon-r |1342h, 1342m de-
0.0034 | j avalon-r >
0.8699 | a avalon-r |1342h, 1342m de-
0.0026 | j avalon-r >
1.0753 | a avalon-r |1342h, 1342m de-
0.0018 | j avalon-r >
3.8442 | a avalon-r |1342h, 1342m de-
0.0031 | j avalon-r >
0.1432 | a avalon-r |
0.0038 | j avalon-r >
0.1294 | a avalon-r |
0.0016 | j avalon-r >
1.8028 | a avalon-r |1342h, 1342m de-
0.0009 | f avalon-r | Pattern: ^(%d)h, (%d)m (*)$ : (%1=1342, %2=1342, %3="de- ")
0.0015 | c avalon-r | exec : Pattern "^(%d)h, (%d)m (*)$" : hp=%1; mana=%2 defences=""...
0.0028 | a avalon-r ]1342h, 1342m de-
0.0005 | a avalon-r |1342h, 1342m de-
0.0008 | f avalon-r | Pattern: ^(%d)h, (%d)m (*)$ : (%1=1342, %2=1342, %3="de- ")
0.0012 | c avalon-r | exec : Pattern "^(%d)h, (%d)m (*)$" : hp=%1; mana=%2 defences=""...
0.0027 | a avalon-r ]1342h, 1342m de-
0.0000 |
I've tried the pattern with and without the ^ and $ |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jul 28, 2010 4:56 pm |
Make sure you turn on the "Trigger on Prompt" option for the trigger and turn off the "Trigger on Newline" option for the trigger.
|
|
|
|
markb Beginner
Joined: 15 Jul 2010 Posts: 12
|
Posted: Wed Jul 28, 2010 5:33 pm |
I tried that but still have the same problem
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jul 29, 2010 4:53 pm |
Turn on the Raw Input/Output message in the Script Debugger and post the same log that you showed above so I can see the raw data coming from the MUD. It's possible your MUD does not support the Telnet GA/EOR options that tell the client when there is the end of a prompt.
|
|
|
|
markb Beginner
Joined: 15 Jul 2010 Posts: 12
|
Posted: Thu Jul 29, 2010 11:56 pm |
Here you go - 4 normal presses on the enter button and then a couple in quick succession. (I've changed the trigger pattern a little to the original one above to simplify the capture but shouldn't and hasn't made any material difference to this issue)
| a avalon-r |1293h, 1134m dev-
0.0023 | i avalon-r ><CR><LF>
0.1354 | i avalon-r <1293h, 1136m dev<ESC>[1m- <ESC>[0m<ESC>[40m<ESC>[30m<ESC>[0m
0.2279 | i avalon-r <<IAC><GA>
1.2078 | a avalon-r |1293h, 1136m dev-
0.0041 | i avalon-r ><CR><LF>
0.1870 | i avalon-r <1293h, 1136m dev<ESC>[1m- <ESC>[0m<ESC>[40m<ESC>[30m<ESC>[0m
0.3112 | i avalon-r <<IAC><GA>
0.9781 | a avalon-r |1293h, 1136m dev-
0.0010 | i avalon-r ><CR><LF>
0.1297 | i avalon-r <1293h, 1136m dev<ESC>[1m- <ESC>[0m<ESC>[40m<ESC>[30m<ESC>[0m
0.3005 | i avalon-r <<IAC><GA>
0.7401 | a avalon-r |1293h, 1136m dev-
0.0016 | i avalon-r ><CR><LF>
0.1298 | i avalon-r <1293h, 1136m dev<ESC>[1m- <ESC>[0m<ESC>[40m<ESC>[30m<ESC>[0m
0.0371 | a avalon-r |1293h, 1136m dev-
0.0016 | i avalon-r ><CR><LF>
0.1282 | i avalon-r <<IAC><GA>
0.0274 | a avalon-r |
0.0017 | i avalon-r ><CR><LF>
0.1631 | i avalon-r <1293h, 1136m dev<ESC>[1m- <ESC>[0m<ESC>[40m<ESC>[30m<ESC>[0m
0.2772 | i avalon-r <<IAC><GA>1293h, 1136m dev<ESC>[1m- <ESC>[0m<ESC>[40m<ESC>[30m<ESC>[0m<IAC><GA>
0.0010 | a avalon-r |1293h, 1136m dev-
0.0013 | a avalon-r ]1293h, 1136m dev-
0.0005 | f avalon-r | Pattern: ($hp:%d)h, ($mana:%d)m (*) : (%1=1293, %2=1136, %3="dev- ")
0.0013 | c avalon-r | exec : Pattern "($hp:%d)h, ($mana:%d)m (*)" : defences={} #loop ...
0.0003 | n avalon-r | Exec Trigger "($hp:%d)h, ($mana:%d)m (*)"
7.5009 | a avalon-r |1293h, 1136m dev-
0.0210 | i avalon-r ><CR><LF>
0.5730 | i avalon-r <1293h, 1138m dev<ESC>[1m- <ESC>[0m<ESC>[40m<ESC>[30m<ESC>[0m
0.2502 | i avalon-r <<IAC><GA> |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jul 30, 2010 4:42 pm |
OK, now you'll need to post the XML from the trigger so I can look at it too. Just right-click on the trigger in the tree-view on the left of the settings editor and select copy, then paste it into this forum within [code] tags.
Your MUD seems to be sending the IAC GA properly, and I'm assuming you already have the Use EOR/GA option enabled in your Preferences? |
|
|
|
markb Beginner
Joined: 15 Jul 2010 Posts: 12
|
Posted: Sat Jul 31, 2010 11:13 am |
Yes EOR/GA is enabled in prefs. Here's the xml - most of it is extracting data from the prompt...
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="1" newline="false" prompt="true" copy="yes">
<pattern>($hp:%d)h, ($mana:%d)m (*)</pattern>
<value>pdefences={}
#loop 1,%len(%3) {#additem pdefences %copy(%3,%i,1)}
#if (%ismember(d,@pdefences)) {#t- deaf} {#t+ deaf}
#if (%ismember(e,@pdefences)) {eq=1} {eq=0}
#if (%ismember(v,@pdefences)) {#t- veil} {#t+ veil}
#if (%ismember(l,@pdefences)) {#t- levitate} {#t+ levitate}
#if (%ismember(~(,@pdefences)) {#t- invisible} {#t+ invisible}
#if (%ismember(b,@pdefences)) {#t- blind} {#t+ blind}
#if (%ismember(i,@pdefences)) {#t- immunity} {#t+ immunity}
#if (%ismember(h,@pdefences)) {ahl=1} {ahl=0}
#if (%ismember(c,@pdefences)) {#t- diffusion} {#t+ diffusion}
#if (%ismember(p,@pdefences)) {potion=1} {potion=0}
#if (%ismember(y,@pdefences)) {unbalance=1} {unbalance=0}
#if (%ismember(x,@pdefences)) {unbalance=1} {unbalance=0}
</value>
<arglist>$hp,$mana</arglist>
</trigger>
</cmud>
|
|
|
|
|
|
|
|
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
|
|