|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Oct 14, 2007 3:31 pm
[2.06] XML Trigger Create Problem |
I have a trigger, that I built and edited in 2.06, I can't seem to copy the XML to create the trigger elsewhere. Can someone try this? I want to confirm something isn't wrong with my files.
Code: |
<trigger name="Score" priority="190" id="19">
<pattern>+===============================================================+</pattern>
<value>#MODULE Variables</value>
<notes>Test</notes>
<trigger>
<pattern>|%sScore sheet for the (%w) known as%s|</pattern>
<value>//Variables/Race=%1</value>
</trigger>
<trigger>
<pattern>|%s-~* (%w) of (%w) ~*-%s|</pattern>
<value>//Variables/Name=%1
//Variables/City=%2</value>
</trigger>
<trigger>
<pattern>|%s (%d) years, (%d) months and (%d) days %s |</pattern>
<value>//Variables/Age=%concat(%1," yrs,")</value>
</trigger>
<trigger>
<pattern>+===============================================================+</pattern>
</trigger>
<trigger regex="true">
<pattern>\|\s*(\d+)/\s*(\d+) Hit\s*(\d+)/\s*(\d+) Mana\s*(\d+)/\s*(\d+) Movement\s*(\d+) Practices \|</pattern>
<value>//Variables/HP=%1;
//Variables/MxHP=%2;
//Variables/M=%3;
//Variables/MxM=%4;
//Variables/Mv=%5;
//Variables/MxMv=%6;
//Variables/Practice=%7;
#RAISEEVENT onHealthUpdate</value>
</trigger>
<trigger name="|%s ~[ Str:&%d{Str}/&%d{MxStr} Int:&%d{Int}/&%d{MxInt} Wis:&%d">
<pattern>|%s ~[ Str:(%d)/(%d) Int:(%d)/(%d) Wis:(%d)/(%d) Dex:(%d)/(%d) Con:(%d)/(%d) ~] %s |</pattern>
<value>//Variables/Str=%1;
//Variables/MxStr=%2;
//Variables/Int=%3;
//Variables/MxInt=%4;
//Variables/Wis=%5;
//Variables/MxWis=%6;
//Variables/Dex=%7;
//Variables/MxDex=%8;
//Variables/Con=%9;
//Variables/MxCon=%10;</value>
</trigger>
<trigger regex="true">
<pattern>\|\s+ ((\a+):\s?(\d+))? ((\a+):\s?(\d+))? ((\a+):\s?(\d+))? \s+\|</pattern>
<value>//Variables/Class1=%2
//Variables/Class1Lvl=%3
#IF (%4 != %null) {
//Variables/Class2=%5
//Variables/Class2Lvl=%6
}
#IF (%7 != %null) {
//Variables/Class2=%8
//Variables/Class2Lvl=%9
}
#TEMP SecondRow {\|\s+ ((\a+):\s?(\d+))? ((\a+):\s?(\d+))? \s+\|} {
//Variables/AdvCls1=%2;
//Variables/AdvCls1Lvl=%3;
#IF (%4 != %null) {
//Variables/AdvCls2=%5;
//Variables/AdvCls2Lvl=%6;
}
} {Stats} {regex}</value>
</trigger>
<trigger>
<pattern>|%s Psuedo level: (%d) %s |</pattern>
<value>//Variables/PLvl=%1</value>
</trigger>
<trigger>
<pattern>|%s Class Order: (%w) (%w) (%w) %s |</pattern>
</trigger>
<trigger>
<pattern>X========= Exps:%s(%d) ========= Quest Points:%s(%d) ========X</pattern>
<value>//Variables/XP=%1
//Variables/QPts=%2</value>
</trigger>
<trigger>
<pattern>| You are carrying%s (%d)/%s(%d) items, weight (%d.%d)/%s (%d) kg.%s|</pattern>
<value>//Variables/Items=%1
//Variables/MxItems=%2
//Variables/Wgt=%float(%3)
//Variables/MxWgt=%4</value>
</trigger>
<trigger>
<pattern>|%s Autoexit: ~*({OFF|ON})~* %s Autoloot: ~*({OFF|ON})~* %s Autosac: ~*({OFF|ON})~* %s |</pattern>
</trigger>
<trigger>
<pattern>|%s Autogold: ~*({OFF|ON})~* %s Autoassist: ~*({OFF|ON})~* %s |</pattern>
</trigger>
<trigger>
<pattern>|%s Wimpy Set to (%d) HitPoints. Page Length is %d lines. %s |</pattern>
<value>//Variables/Wimpy=%1</value>
</trigger>
<trigger>
<pattern>|%s Drunk:%s(%w) Thirsty:%s(%w) Hungry:%s(%w) %s |</pattern>
</trigger>
<trigger>
<pattern>|%s You have assumed the Stance of the (*). %s |</pattern>
<value>//Variables/Stance=%1</value>
</trigger>
<trigger>
<pattern>|%sYou are (%w).%s|</pattern>
</trigger>
<trigger>
<pattern>|%sArmor Class:%s(%n). You are (*).%s|</pattern>
<value>//Variables/AC=%1</value>
</trigger>
<trigger>
<pattern>|%sHitroll: (%d)%sDamroll: (%d)%s|</pattern>
<value>//Variables/HRoll=%1
//Variables/DRoll=%1</value>
</trigger>
<trigger>
<pattern>|%sAlignment:%s (%n).%s You are (%w).%s|</pattern>
<value>//Variables/Alignment=%1</value>
</trigger>
<trigger>
<pattern>|%sSaving throws: &%n{SavingThrow}%s|</pattern>
<value>//Variables/SavingThrow=%1</value>
</trigger>
<trigger>
<pattern>+===============================================================+</pattern>
</trigger>
</trigger>
|
|
|
_________________ Asati di tempari! |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sun Oct 14, 2007 4:13 pm |
I found the problem...
<trigger name="|%s ~[ Str:&%d{Str}/&%d{MxStr} Int:&%d{Int}/&%d{MxInt} Wis:&%d">
For whatever reason if you use & in the name property then the xml save fails. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Oct 14, 2007 7:08 pm |
Doh! Thanks for the sharp eye.
Hmm, it was fine before. What's odd is that occured while I was updating the trigger. The pattern doesn't even have the '&' in it any more.
I'll fix that now. |
|
_________________ Asati di tempari! |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Sun Oct 14, 2007 8:26 pm |
I thought I'd check if patterns containing & can be saved, copied and pasted OK, and they can...
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Oct 15, 2007 11:06 pm |
Looks like the & within the XML "name" attribute isn't being converted to a proper XML & amp ; entity. The Pattern tag field works, but not the Name attribute in the Trigger tag. This probably causes problems anywhere else that the & character is used in a name (or button caption, etc).
Added to bug list. |
|
|
|
|
|