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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Oct 05, 2006 12:35 am   

Hilighting Rooms on the map
 
I'm often in the situation where I'm trying to avoid other individuals in an area while I go about my business. Right now I can see the room name of the room they are in and then I look at the rooms nearby tab and I select the room and it hilights on my map so I can see where they are in relation to me.

What I'd really like to do is to grab the room name of the person and do a database lookup to get the number. This part I know how to do already.

The next step is that I'd like to then feed this room number to the mapper and tell it to hilight that room or rooms. Like it can hilight the path you are taking if you tell it to walk to you a place.

Does anyone know a command that will cause the mapper to hilight a room based on the room number?
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Thu Oct 05, 2006 3:27 am   
 
highlights a room based on the room number:

#pathhigh %null 36

highlights a room or multiple rooms with the name @room in the current zone:

#call %mapfilter(%concat("ZoneID = ",%zonenum))
#loop %numrooms {#if (%roomname(%roomvnum(%i)) = @room) {#pathhigh %null %roomvnum(%i)}}
#call %mapfilter(%null)
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Oct 05, 2006 4:00 am   
 
Fantastic! Exactly what I needed. Thanks a million!
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Oct 05, 2006 4:10 pm   
 
http://forums.zuggsoft.com/phpbb/viewtopic.php?p=94851


Code:
#CLASS {Locate}
#TRIGGER {^(%w)(%s)~- (*)} {
  #VAR location {}
  #VAR locations {}
  room_to_find = %replace( %3, ', %)
  #ADDITEM locations {%MAPQUERY( {Name LIKE '%@room_to_find%' AND ZONEID LIKE '%zonenum( )'})}
  #FORALL @locations {#PATHHIGH path %i}
  #VAR location {} {}
  #VAR locations {} {}
  #VAR room_to_find {} {}
  }
#CLASS 0


Modify the trigger to work from what I will assume is a where command?
_________________
http://www.Aardwolf.com
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