 |
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sun Apr 27, 2008 12:05 pm
[2.22] BUG: Expression trig fault - possibly due to compile time |
The script:
| Quote: |
<class name="NewEqChaser" id="1296">
<var name="aq" usedef="true" id="1297">
<value>0</value>
<default>0</default>
</var>
<var name="nextAttack" id="1298">touch boar</var>
<alias name="setna" id="1299">
<value>#SA ---> Next attack is: %-1
nextAttack={%-1}
aq=1</value>
</alias>
<var name="armb" usedef="true" id="1300">
<value>lr</value>
<default>lr</default>
</var>
<var name="eqbal" usedef="true" id="1301">
<value>eb</value>
<default>eb</default>
</var>
<trigger type="Expression" priority="13020" id="1302">
<pattern><![CDATA[@aq && @eqbal="eb" && @armb="lr"]]></pattern>
<value>#EXEC @nextAttack
aq=0</value>
</trigger>
<trigger priority="9770" prompt="true" id="1303">
<pattern><![CDATA[H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<(%x)>>]]></pattern>
<value>eqbal=%4</value>
</trigger>
</class> |
For the old-school:
Its a prompt trig that is capturing only balance and eq changes to a single variable.
There are some defined variables.
There are also the following two settings:
#AL setna {#SA Next attack is: %-1;nextAttack={%-1};aq=1}
#TR {@aq && @eqbal="eb" && @armb="lr"} {#EXEC @nextAttack;aq=0} {expression}
Intended operation:
I can type in something like "setna touch boar" and if I have balance/eq/arm balance, it will send the command to touch boar. If I do not, then it will wait until I have them, and then send the command to touch boar. It works BUT..
The fault:
When I first open the session, it does not work. I type in "setna touch boar" and nothing happens. I can fiddle with the variable values (trying to make the expression trig fire) and it simply never works, until I do the following:
1. Open up the package editor
2. Select the expression trig
3. Click on the 'compiled code' tab
The moment I do this, 'touch boar' is sent, and after that the script works perfectly.
In the following debug output, I have bolded two lines.
The first bolded line is when I first enter "setna touch boar"
The second bolded line is when I open up the PE, select the expression trig, and click on 'Compiled Code'.
My guess is that expression triggers don't fire unless they are compiled.. but like other settings do not compile until they are first called, resulting in a catch-22. This bug has been around for a long time now (2.06 at least) but I wasn't able to explain it properly originally, and then sort of forgot about it for various reasons.
| Quote: |
|
0.0013 | c Irruel | [1] Irruel Comline : start :
0.0061 | a Irruel |Armb: lr Eqbal: eb AQ: 0
0.0038 | d Irruel | [1] Irruel Comline : stopped
13.095 | ---
0.0008 | c Irruel | [1] Irruel Comline : start :
0.0027 | l Irruel | Alias "setna" compiled (Normal) : #SA ---> Next attack is: %-1 nextAttack={%-1} aq=1
0.0014 | a Irruel |---> Next attack is: touch boar
0.0039 | k Irruel | [1] Var "aq" changed from "0" to "1"
0.0011 | d Irruel | [1] Irruel Comline : stopped
3.7986 | ---
0.0009 | c Irruel | [1] Irruel Comline : start :
0.0023 | a Irruel |Armb: lr Eqbal: eb AQ: 1
0.0038 | d Irruel | [1] Irruel Comline : stopped
5.4448 | a Irruel |
0.0036 | a Irruel |The stars wink into existence, familiar constellations illuminating the night with tales of myth and legend.
0.0098 | a Irruel ]H:3980|3260 100|100 100% Exp:5 <db> <eb> <<lr>> < 11:37:58:453 >
0.0018 | f Irruel | Pattern: H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<(%x)>> : (%1=3980, %2=3260, %3="db", %4="eb", %5="lr")
0.0016 | l Irruel | Trigger "H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<(%x)>>" compiled (Normal) : eqbal=%4
0.0005 | c Irruel | exec : Pattern "H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<...
11.756 | l Irruel | Trigger "@aq && @eqbal="eb" && @armb="lr"" compiled (Expression) : @aq && @eqbal="eb" && @armb="lr"
0.0010 | f Irruel | Expression: @aq && @eqbal="eb" && @armb="lr"
0.0019 | l Irruel | Trigger "@aq && @eqbal="eb" && @armb="lr"" compiled (Normal) : #EXEC @nextAttack aq=0
0.0007 | c Irruel | [2] ExpTrig : start : Expression "@aq && @eqbal="eb" && @armb="lr"" : #EXEC @ne...
0.0065 | l Irruel | Trigger "^qq$" compiled (Pattern) : ^qq$
0.0014 | l Irruel | Trigger "^cease (*)$" compiled (Pattern) : ^cease (*)$
0.0050 | a Irruel |H:3980|3260 100|100 100% Exp:5 <Prompt><db<Prompt>> <Prompt><eb<Prompt>> <Prompt><<lr<Prompt>>> <Prompt><<Prompt> 11:37:58:453 <Prompt>> touch boar
0.0033 | j Irruel >touch boar
0.0018 | k Irruel | [2] Var "aq" changed from "1" to "0"
0.0006 | d Irruel | [2] ExpTrig : stopped
0.0015 | l Irruel | Trigger "@aq && @eqbal="eb" && @armb="lr"" compiled (Normal) : #EXEC @nextAttack aq=0
0.0030 | d Irruel | [2] ExpTrig : terminated
0.2559 | a Irruel |
0.0038 | a Irruel |Your boar tattoo tingles slightly.
0.0047 | a Irruel |Balance Used: 4.25 seconds
0.0085 | a Irruel ]H:3980|3260 100|100 100% Exp:5 <db> <e-> <<lr>> < 11:38:10:500 >
0.0018 | f Irruel |Pattern: H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<(%x)>> : (%1=3980, %2=3260, %3="db", %4="e-", %5="lr")
0.0014 | c Irruel |exec : Pattern "H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<...
0.0006 | k Irruel |Var "eqbal" changed from "eb" to "e-"
4.1366 | a Irruel |H:3980|3260 100|100 100% Exp:5 <Prompt><db<Prompt>> <Prompt><e-<Prompt>> <Prompt><<lr<Prompt>>> <Prompt><<Prompt> 11:38:10:500 <Prompt>>
0.0045 | f Irruel |Pattern: H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<(%x)>> : (%1=3980, %2=3260, %3="db", %4="e-", %5="lr")
0.0014 | c Irruel |exec : Pattern "H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<...
0.0025 | a Irruel |You have recovered balance on all limbs.
0.0093 | a Irruel ]H:3980|3260 100|100 100% Exp:5 <db> <eb> <<lr>> < 11:38:14:671 >
0.0018 | f Irruel |Pattern: H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<(%x)>> : (%1=3980, %2=3260, %3="db", %4="eb", %5="lr")
0.0014 | c Irruel |exec : Pattern "H:(%d)~|(%d) %d~|%d %d~% Exp:%d <(%x)> <(%x)> <<...
0.0006 | k Irruel |Var "eqbal" changed from "e-" to "eb"
1.5658 | |
|
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
 |
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sun Apr 27, 2008 12:13 pm |
Sadly, I can no longer replicate this on a blank settings file. I did originally, then too it back to my main file, and now when I retest on the blank one, it works. I'm confused, but I will work on it.
Edit to add:
I thought it might be useful to compare the debugger output for it working correctly and incorrectly. The settings in the bottom quote are the only settings in a new session and new package. Tested on the same mud (Aetolia) but with a much simpler prompt. I bolded an interesting line. Compare that to the second bolded line in the debug output quote in the original post above. Why does the expression itself have to compile in the first example, but in this one it simply fires?
| Quote: |
|
0.0015 | c Aetolia | [1] Aetolia Comline : start :
0.0028 | l Aetolia | Alias "setna" compiled (Normal) : #SAY ---> Next attack is: %-1 nextAttack={%-1} aq=1
0.0011 | a Aetolia |H:1329 M:1040 [eb lr]---> Next attack is: touch boar
0.0012 | f Aetolia | Pattern: H:(%d) M:(%d) ~[(%x) (%x)~] : (%1=1329, %2=1040, %3="eb", %4="lr")
0.0011 | c Aetolia | exec : Pattern "Prompt_Capture" : hp=%1 mp=%2 eqbal=%3 armb=%4
0.0014 | k Aetolia | [1] Var "aq" changed from "0" to "1"
0.0006 | f Aetolia | Expression: @aq && @eqbal="eb" && @armb="lr"
0.0022 | l Aetolia | Trigger "@aq && @eqbal="eb" && @armb="lr"" compiled (Normal) : #EXEC @nextAttack aq=0
0.0008 | c Aetolia | [2] ExpTrig : start : Expression "@aq && @eqbal="eb" && @armb="lr"" : #EXEC @ne...
0.0025 | a Aetolia |touch boar
0.0010 | j Aetolia >touch boar
0.0013 | k Aetolia | [2] Var "aq" changed from "1" to "0"
0.0007 | d Aetolia | [2] ExpTrig : stopped
0.0015 | d Aetolia | [1] Aetolia Comline : stopped
0.0012 | d Aetolia | [2] ExpTrig : terminated
0.2608 | a Aetolia #Telnet 200: Char.Vitals<LF>H:1329/1329 M:1040/1140 E:5545/5545 W:4600/4600 NL:20/100
0.0013 | a Aetolia |
0.0010 | a Aetolia |Your boar tattoo tingles slightly.
0.0012 | a Aetolia ]H:1329 M:1040 [e- lr]
0.0007 | f Aetolia |Pattern: H:(%d) M:(%d) ~[(%x) (%x)~] : (%1=1329, %2=1040, %3="e-", %4="lr")
0.0012 | c Aetolia |exec : Pattern "Prompt_Capture" : hp=%1 mp=%2 eqbal=%3 armb=%4
0.0005 | k Aetolia |Var "eqbal" changed from "eb" to "e-"
|
| Quote: |
<class name="Prompt" id="1">
<trigger name="Prompt_Capture" priority="20" prompt="true" id="2">
<pattern>H:(%d) M:(%d) ~[(%x) (%x)~]</pattern>
<value>hp=%1
mp=%2
eqbal=%3
armb=%4</value>
</trigger>
<var name="hp" id="3">1329</var>
<var name="mp" id="4">1040</var>
<var name="eqbal" usedef="true" id="5">
<value>eb</value>
<default>eb</default>
</var>
<var name="armb" usedef="true" id="6">
<value>lr</value>
<default>lr</default>
</var>
<var name="maxMp" id="7">1140</var>
<var name="mapHp" id="8">1329</var>
<class name="EqChaser" id="9">
<alias name="setna" id="11">
<value>#SAY ---> Next attack is: %-1
nextAttack={%-1}
aq=1</value>
</alias>
<var name="nextAttack" id="13">touch boar</var>
<trigger type="Expression" priority="140" id="14">
<pattern><![CDATA[@aq && @eqbal="eb" && @armb="lr"]]></pattern>
<value>#EXEC @nextAttack
aq=0</value>
</trigger>
<var name="aq" id="15">0</var>
</class>
<class name="AutoSip" id="10"/>
</class>
|
|
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
 |
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sun Apr 27, 2008 12:59 pm |
I logged in on the main character settings, and changed the config prompt options to the same, simple prompt as the other test.
I then disabled the original prompt trigger, and wrote a new one:
<trigger priority="13040" prompt="true" id="1304">
<pattern>H:%d M:%d ~[%w (%x) (%x)~]</pattern>
<value>eqbal=%1
armb=%2</value>
</trigger>
I tried 'setna touch boar' again, and:
|
| Quote: |
0.0010 | c Irruel | [1] Irruel Comline : start :
0.0021 | l Irruel | Alias "setna" compiled (Normal) : #SA ---> Next attack is: %-1 nextAttack={%-1} aq=1
0.0012 | a Irruel |H:3980 M:3260 [cdb eb lr] [Vote]---> Next attack is: touch boar
0.0029 | f Irruel | Pattern: H:%d M:%d ~[%w (%x) (%x)~] : (%1="eb", %2="lr")
0.0012 | c Irruel | exec : Pattern "H:%d M:%d ~[%w (%x) (%x)~]" : eqbal=%1 armb=%2
0.0024 | k Irruel | [1] Var "aq" changed from "0" to "1"
0.0009 | d Irruel | [1] Irruel Comline : stopped
9.7431 | l Irruel | Trigger "@aq && @eqbal="eb" && @armb="lr"" compiled (Expression) : @aq && @eqbal="eb" && @armb="lr"
0.0007 | f Irruel | Expression: @aq && @eqbal="eb" && @armb="lr"
0.0018 | l Irruel | Trigger "@aq && @eqbal="eb" && @armb="lr"" compiled (Normal) : #EXEC @nextAttack aq=0
0.0006 | c Irruel | [2] ExpTrig : start : Expression "@aq && @eqbal="eb" && @armb="lr"" : #EXEC @ne...
0.0076 | a Irruel |touch boar
0.0011 | j Irruel >touch boar
0.0014 | k Irruel | [2] Var "aq" changed from "1" to "0"
0.0007 | d Irruel | [2] ExpTrig : stopped
0.0015 | l Irruel | Trigger "@aq && @eqbal="eb" && @armb="lr"" compiled (Normal) : #EXEC @nextAttack aq=0
0.0029 | d Irruel | [2] ExpTrig : terminated
0.1955 | a Irruel #Telnet 200: Char.Vitals<LF>H:3980/3740 M:3260/3260 E:17600/17600 W:15200/15200 NL:5/100
0.0025 | a Irruel |
0.0034 | a Irruel |Your boar tattoo tingles slightly.
0.0044 | a Irruel |Balance Used: 4.25 seconds
0.0047 | a Irruel ]H:3980 M:3260 [cdb e- lr] [Vote]
0.0016 | f Irruel |Pattern: H:%d M:%d ~[%w (%x) (%x)~] : (%1="e-", %2="lr")
0.0012 | c Irruel |exec : Pattern "H:%d M:%d ~[%w (%x) (%x)~]" : eqbal=%1 armb=%2
0.0005 | k Irruel |Var "eqbal" changed from "eb" to "e-"
|
There seems to be something wrong with my package file (again? Is the whole thing corrupted somehow?) since I cannot reproduce it in a new package file. Zugg, the package file in question is the 'lycanz.pkg' file that I emailed to you with regards to that other bug, subject: "[2.22) BUG REPORT - possible 'corrupted' package files"
I planned to copy this package and delete all extraneous settings from it, verify that the bug still exists upon having done all that, and then email it to you. However, when I load this package into a different session, the bug does not exist. I loaded all other packages as well, set up everything to be exactly the same - but the bug no longer exists.
I'm not sure I understand why this has fixed the problem -now- as I have lost count of the number of times I've 'rebuilt' my session and layout in that way, to date. I'm going to watch it closely over the next few days though, to see if it reoccurs. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
 |
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sun Apr 27, 2008 1:29 pm |
Final update on this matter:
The problem has reoccurred. No matter what I do though, I cannot cut the package down and reliably keep the problem present. It 'fixes' itself seemingly randomly. So the original package file I sent to you, Zugg, is pretty much the best I can do. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Apr 28, 2008 5:14 pm |
I'll try it in the files that you sent to see what I can find.
|
|
|
|
 |
|
|
|
|
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
|
|