 |
Icarus Beginner
Joined: 18 Sep 2003 Posts: 23 Location: Norway
|
Posted: Fri Feb 01, 2013 11:24 am
Map-colouring by trigger |
I have an old system of triggers based on herb-mapping an area by colour codes on the rooms. However, the trigger system that worked nicely in zMud doesn't seem to do the trick in CMud and I fail to see the problem...
So... I guess the word is ...'HEEEEELP!!!' ... or something quite similar.
| Code: |
<class name="Finding">
<var name="herbs_random_gray">skunk berries|mittikna|nethra|suranie|kuko</var>
<trigger priority="3960">
<pattern>find a small red berry!</pattern>
<value>#add suranie 1
#CALL %maplocked( 0)
#CALL %roomcol( ,red)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="3970">
<pattern>find a small black berry!</pattern>
<value>#add bilberry 1
#CALL %maplocked( 0)
#CALL %roomcol( ,darkgray)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="3990">
<pattern>find a green leaf!</pattern>
<value>#add athelas 1
#CALL %maplocked( 0)
#CALL %roomcol( ,darkblue)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4000">
<pattern>find a little blue berry!</pattern>
<value>#add attanar 1
#CALL %maplocked( 0)
#CALL %roomcol( ,blue)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4030">
<pattern>find a red weed!</pattern>
<value>#add redweed 1
#CALL %maplocked( 0)
#CALL %roomcol( ,orange)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4040">
<pattern>find a red heart-shaped flower!</pattern>
<value>#add lothore 1
#CALL %maplocked( 0)
#CALL %roomcol( ,pink)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4150">
<pattern>find a small white berry!</pattern>
<value>#add whitehorn 1
#CALL %maplocked( 0)
#CALL %roomcol( ,white)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4170">
<pattern>find a golden flower!</pattern>
<value>#add alfirin 1
#CALL %maplocked( 0)
#CALL %roomcol( ,yellow)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4180">
<pattern>find a piece of pale green lichen!</pattern>
<value>#add tuo 1
#CALL %maplocked( 0)
#CALL %roomcol( ,lightgreen)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4190">
<pattern>find a handful of purple flowers!</pattern>
<value>#add foxglove 1
#CALL %maplocked( 0)
#CALL %roomcol( ,purple)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="4390">
<pattern>You find a*</pattern>
<value>#if (@herb_loc=="") {#if (@herb_here=="") {search here for herbs} {search here for @herb_here}} {#if (@herb_loc=="") {search here for @herb_here} {search @herb_loc for @herb_here}}</value>
</trigger>
<trigger priority="6420">
<pattern>find a handful of small purple berries!</pattern>
<value>#CALL %maplocked( 0)
#CALL %roomcol( ,purple)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="6430">
<pattern>Your search reveals nothing special.</pattern>
<value>#IF %ismember( @herb_here, @herbs_random_gray) {
#CALL %maplocked( 0)
#CALL %roomcol( ,lightgray)
#CALL %maplocked( 1)
}</value>
</trigger>
<trigger priority="6450">
<pattern>find a slender luminous vine!</pattern>
<value>#CALL %maplocked( 0)
#CALL %roomcol( ,white)
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="6470">
<pattern>You search everywhere, but find no herbs.</pattern>
<value>#CALL %maplocked( 0)
#if (@herb_here=="skunk berries") {#CALL %roomcol( ,purple)}
#if (@herb_here=="mittikna") {#CALL %roomcol( ,white)}
#if (@herb_here=="suranie") {#CALL %roomcol( ,red)}
#if (@herb_here=="nethra") {#CALL %roomcol( ,pink)}
#if (@herb_here=="kuko") {#CALL %roomcol( ,yellow)}
#CALL %maplocked( 1)</value>
</trigger>
<trigger priority="6490">
<pattern>find a bright yellow leaf!</pattern>
<value>#CALL %maplocked( 0)
#CALL %roomcol( ,yellow)
#CALL %maplocked( 1)</value>
</trigger>
</class>
|
A big thank you for anyone who can actually tell me what the problem is...
Ic |
|
|
|
 |
Icarus Beginner
Joined: 18 Sep 2003 Posts: 23 Location: Norway
|
Posted: Fri Feb 01, 2013 11:54 am |
Update, for some reason it seems to work some places, but not all, even though the system does have the same functions and variables needed...
Ic |
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Feb 01, 2013 2:25 pm |
There is a known bug in Cmud that certain named colors aren't recognized properly. You haven't explained which ones work and which ones don't, but that may be part of the problem. As a solution, you could use $RRGGBB values instead.
Another possible problem is whether the @herb_here and @herb_loc values are set properly, since you haven't shown us that part. |
|
|
|
 |
Icarus Beginner
Joined: 18 Sep 2003 Posts: 23 Location: Norway
|
Posted: Fri Feb 01, 2013 11:49 pm |
| Rahab wrote: |
There is a known bug in Cmud that certain named colors aren't recognized properly. You haven't explained which ones work and which ones don't, but that may be part of the problem. As a solution, you could use $RRGGBB values instead.
Another possible problem is whether the @herb_here and @herb_loc values are set properly, since you haven't shown us that part. |
My biggest problem then is not knowing how to find the $RRGGBB values, and with the variables, I have a work-around where I set those manually, so that makes it work, it's shitty, but it work ;) |
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
|
|
|
 |
|
|
|
|
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
|
|