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
geosmith
Wanderer


Joined: 23 Apr 2005
Posts: 57

PostPosted: Sun Mar 19, 2006 6:50 am   

Sorry, another mapper question
 
Is it in any way possible to define an attribute for a room, and to later interract with all rooms that bear that attribute?

Basically what I'm trying to do is set an "environment type" for each room - for example "Grasslands" "Mountain" "Freshwater" - and then to later be able to enter a command such that all rooms of a particular attribute are set to a specific colour.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Mar 19, 2006 8:54 am   
 
If there's not a more appropriate setting (%roomflags()?), you could always make use of the %roomnote() function. Not much of a helpfile on either one, but %roomnote() seems extremely open-ended.
_________________
EDIT: I didn't like my old signature
Reply with quote
geosmith
Wanderer


Joined: 23 Apr 2005
Posts: 57

PostPosted: Sun Mar 19, 2006 11:46 am   
 
Actually starting to get a little closer with this. I've determined I can set the roomflag to whatever word describes the particular environment, and can search for the numbers of rooms matching a particular roomflag using:

%mapquery("[userstr] like 'mountains'")

What I'm struggling to do, though, is to use the numbers produced to set the colour of the rooms in question.

I've tried the following:

#noop %roomcol(%mapquery("[userstr] like 'mountains'"),red)

But thusfar with no success.

I suspect the problem results at least in part from the format in which %mapquery returns its result - which basically looks like (348|872|322). If it were possible to add each of these numbers as seperate entries to a string list variable, even that would be a great help.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Mar 19, 2006 6:30 pm   
 
Use a #forall loop:

#forall %mapquery("[userstr] like 'mountains'") {#call %roomcol(%i, red)}
_________________
EDIT: I didn't like my old signature
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