 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4772 Location: Pensacola, FL, USA
|
Posted: Sun Nov 23, 2008 10:13 pm
$LOCAL vs #COND |
Code: |
<trigger priority="1730" id="173">
<pattern>^(*) starts to teach you (*) for (%d) xp.$</pattern>
<value>$learning=%params(2)
$learningFrom=%params(1)
$learningXp=%params(3)</value>
<trigger>
<pattern>You finish learning $learning from $learningFrom.$</pattern>
<value>#ADD xpSpent $learningXp</value>
</trigger>
</trigger> |
Is there a better way to make a variable condition pattern without making variables that stick?
I trid the following but its not working either
Code: |
<trigger priority="1730" id="173">
<pattern>^(*) starts to teach you (*) for (%d) xp.$</pattern>
<trigger>
<pattern>You finish learning (*) from (*).$</pattern>
<value>#SAY %t1 %t2 %t3 %t4 %t5
#SAY @xpSpent
#IF (%t1=%t5 AND %t2=%t4) {#ADD xpSpent %t3}
#SAY @xpSpent</value>
</trigger>
</trigger> |
|
|
_________________ Discord: Shalimarwildcat |
|
|
 |
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sun Nov 23, 2008 10:31 pm |
The following basically mimicing code of your second example works for me in Untitled session.
Code: |
<window name="untitled">
<uid>{189D4896-7EAC-4B2B-A43D-3D30FD973F19}</uid>
<packages>untitled</packages>
<trigger priority="10" id="1">
<pattern>^(*) starts to teach you (*) for (%d) xp.$</pattern>
<trigger>
<pattern>You finish learning (*) from (*).$</pattern>
<value>#say %t1 %t2 %t3;#say %1 %2
$xpspent=""
#if (%t1=%2 AND %t2=%1) {#add $xpspent %t3}
#say $xpspent</value>
</trigger>
</trigger>
</window>
|
|
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4772 Location: Pensacola, FL, USA
|
Posted: Sun Nov 23, 2008 11:24 pm |
i dont see how any other settings could hamper this, but even your version isnt working in my active mud session
for some reason the #IF is not evaluating as true |
|
_________________ Discord: Shalimarwildcat |
|
|
 |
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sun Nov 23, 2008 11:40 pm |
Hrm, it should work. Weird stuff.
I'm sure you did, but in case you haven't, perhaps check for trigger pattern duplicates lying around? Maybe the #cond pattern one for instance.
No idea what else to suggest really. Best bet it's something like that.
To determine if it's your active mud session or something wrong your CMud, try the same code in Untitled session just to be sure. |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4772 Location: Pensacola, FL, USA
|
Posted: Sun Nov 23, 2008 11:51 pm |
works fine in untitled, which makes me think my package is corrupted
|
|
_________________ Discord: Shalimarwildcat |
|
|
 |
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Mon Nov 24, 2008 12:29 am |
Aye, not really many other options...
|
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
 |
|
|