|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Wed Oct 10, 2007 12:49 am
Variables not setting |
Not sure why variables not getting set correctly. Any help?
<class name="Grubs" id="583">
<alias name="fgrubs" id="429">
<value>//pmote working next to an empty wooden cart.
#unvar grcount
#unvar totalgrubs
#variable totalgrubs %1
#SHOW You will now gather upto @totalgrubs grubs.
#T+ find-grubs
find grubs</value>
</alias>
<trigger name="find-grubs" priority="7220" id="722">
<pattern>You turn over some rocks and boulders trying your hardest to find a grub. </pattern>
<value>#CASE %random {
#ALARM +3 {sweat}
} {
#ALARM +3 {emote stretches and cracks his back and goes back to looking for grubs.}
} {#ECHO NO MESSAGE TO MUD}
</value>
<trigger>
<pattern>You find a pale white grub beneath a rock. </pattern>
<value>look
</value>
</trigger>
<trigger>
<pattern>A pale white grub wriggles upon the ground. </pattern>
<value>#ADD grcount 1
#SHOW You have @grcount grub~(s~).
#IF (@grcount == @totalgrubs) {
#show You have gotten all @grcount grub~(s~).
#T- find-grubs
#var grcount 0
#var totalgrubs 0
} { #WA 2000
get grub
#WA 4000
put grub cart
#WA 4000
find grubs }</value>
</trigger>
</trigger>
<var name="grcount" id="737">1</var>
<var name="totalgrubs" type="String" id="755">24</var>
</class> |
|
_________________ 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) |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Oct 11, 2007 12:35 am |
What is the sample text that triggers this?
|
|
_________________ Asati di tempari! |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Thu Oct 11, 2007 12:42 am |
I just notice that this isn't the whole class when I exported it into xml.. I need to get this from my other computer tomorrow. :(
|
|
_________________ 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) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Oct 11, 2007 2:29 am |
Moving this to the Beta forum. Please remember to use the Beta forum when discussing issues in the 2.0x beta versions.
|
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Thu Oct 11, 2007 2:45 pm |
It looks like he's not sure if he's doing something wrong or if there is a bug though...
|
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Thu Oct 11, 2007 5:15 pm |
Okay.. I am posting each part of my craft class. Here is goes.
<cmud>
<alias name="fgrubs">
<value>
//pmote working next to an empty wooden cart.
#variable grcount ""
#variable totalgrubs ""
#variable totalgrubs %1
#SHOW You will now gather upto @totalgrubs grubs.
#T+ find-grubs
find grubs
</value>
</alias>
</cmud>
<cmud>
<trigger name="find-grubs" priority="7220">
<pattern>
You turn over some rocks and boulders trying your hardest to find a grub.
</pattern>
<value>
#CASE %random {
#ALARM +3 {sweat}
} {
#ALARM +3 {emote stretches and cracks his back and goes back to looking for grubs.}
} {#ECHO NO MESSAGE TO MUD}
</value>
<trigger>
<pattern>You find a pale white grub beneath a rock. </pattern>
<value>look
</value>
</trigger>
<trigger>
<pattern>A pale white grub wriggles upon the ground. </pattern>
<value>
#var grcounts ""
#MATH grcounts = @grcount+1
#ALARM {+5} {
#SHOW You have @grcount grub~(s~).
#IF (@grcounts == @totalgrubs) {
#show You have gotten all @grcount grub~(s~).
#T- find-grubs
#var grcount 0
#var totalgrubs 0
} {
#ALARM {+5} {
get grub
#WA 4000
put grub cart
#WA 4000
find grubs }
}
}
</value>
</trigger>
</trigger>
</cmud> |
|
_________________ 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) |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Oct 11, 2007 7:13 pm |
OK, but you still didn't give us any sample text that is used to fire your triggers. Nor have you really said what isn't working about this. What variables are not being set? What is it doing, and what do you expect it to do that it isn't doing?
|
|
|
|
|
|