Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Icarus
Beginner


Joined: 18 Sep 2003
Posts: 23
Location: Norway

PostPosted: Thu Sep 18, 2003 10:36 pm   

Using triggers to alter map's view...
 
I'm trying to make my rooms on the map change colour according to a trigger (actually two) in the game.

I want to trigger on
'You search everywhere, but find no herbs.'
to
#if {zone="name_of_zone"} {this room should be specific colour} {}

and
'Your search reveals nothing special."
to
#if {zone="name_of_zone"} {this room should be original colour} {}

Any way to do this?

Thanks for all help!

Icarus
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Sep 19, 2003 8:21 am   
 
From Zmud help files:

roomcol



Syntax: %roomcol([vNum], [color])

Return or set the color of a room. The Color can be a string like "red", "blue", etc. Or it can be an RGB value in the format $RRGGBB where each value is a hexadecimal value. For example, $FF0000 sets the color to all red. If vNum is omitted, the current room is used.
Reply with quote
Icarus
Beginner


Joined: 18 Sep 2003
Posts: 23
Location: Norway

PostPosted: Fri Sep 19, 2003 4:03 pm   
 
Yes, but I still can't figure out how to use it.

I'm currently trying this:
#IF {%zonename="myherbzone"} {%roomcol{"grey")}

I've allso tried with #set %roomcol etc, and nothing seems to help me.

I.e. I have found that function, but am in no way able to figure out how to use it to actually do my work.

Icarus
Reply with quote
romciom
Beginner


Joined: 15 Oct 2002
Posts: 10
Location: Poland

PostPosted: Fri Sep 19, 2003 4:38 pm   
 
That should work:

#IF {%zonename="myherbzone"} {#NOOP %maplocked(0);#NOOP %roomcol(%roomnum,"grey");#NOOP %maplocked(1)}

P.S. Genesis rules ;)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Sep 19, 2003 5:15 pm   
 
The key here is that the first parameter of %roomcol is vNum. You can leave it blank, but it still has to be accounted for. Also, I think %zonename is a function which requires parentheses after it, rather than a predefined variable which doesn't.
#IF (%zonename()="myherbzone") {%roomcol( , "grey")}
Reply with quote
Icarus
Beginner


Joined: 18 Sep 2003
Posts: 23
Location: Norway

PostPosted: Sat Sep 20, 2003 3:20 am   
 
Romicom: Great, solved my problem excellently! Thanks a lot. And yes, Genesis rules, random herb locations sux :D

LightBulb: I tried, but that didn't work. Romicom's solution did.


Thanks for all the help!

Ic
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net