|
Reygar Novice
Joined: 22 Aug 2004 Posts: 32
|
Posted: Sun Aug 22, 2004 11:19 pm
Can mapper do this? |
I have just about the whole mud mapped and what I want to know is....can zmud take the following info from the mud:
Players in your Zone
--------------------
Ryuoni - Caemlyn Central Square
Bromax - Caemlyn Central Square
Jrac - Caemlyn Central Square
Lothar - Caemlyn Central Square
Niska - The Tarnished Shield Armory
Irele - Middle of a Wide Boulevard
Oban - Caemlyn Central Square
Frieda - Caemlyn Central Square
and highlight all the rooms that are displayed there? This will need to reset each time the "where" command is used..and if there are multiple rooms with the same name I want them all highlighted. Thanks to all you zmud smarties for your help. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Aug 23, 2004 12:34 am |
You will need to have zMapper installed and in trial or registered mode to control the highlighting of a room. An alternate method would be to change the color of the rooms and change them back before the next where. The coloring method has the benefit of not losing its markers when you click on the mapper, and could provide distinct colorings for different people.
I think a search of the forums will actually yield a system for coloring rooms based on search results and restoring them to the orginal colors. I seem to recall writing a script for this sometime ago. Certainly if you find it it should be updated to take advantage of the latest features in zMud, like %mapquery. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Reygar Novice
Joined: 22 Aug 2004 Posts: 32
|
Posted: Mon Dec 12, 2005 3:55 am |
I gave this up a while ago....but I am trying again...I tried searching the forums but to no avail....any help with this would be appreciated.
-R |
|
|
|
Vodoc Apprentice
Joined: 11 Apr 2003 Posts: 119 Location: Sweden
|
Posted: Mon Dec 12, 2005 8:31 am |
Here is an alias to grab the rooms in the current zone with a particular name:
Code: |
#ALIAS search_map {#VARIABLE map_rooms {%mapquery( %concat( "[Name] LIKE '%", %replace( %-1, "'", "''"), "%' AND [ZoneID] = ", %zonenum))};#SAY {search for ~"%-1~" in %zonename ~(%zonenum~) found %numitems( @map_rooms) rooms}} |
Then loop over all rooms (saved in our variable) and colour them.
Code: |
#ALIAS color_map {#VARIABLE map_lock %maplocked;#CALL %maplocked(0);#FORALL {@map_rooms} {#CALL %roomcol( %i, %1);#SAY New color set for %roomname( %i) ~(%i~) in %zonename( %roomzone( %i));}};#CALL %maplocked(@map_lock);#SAY Updates done.}
|
Example of use:
Code: |
search_map Caemlyn Central Square
color_map 255 |
Calling %roomcol on a large number of rooms can be slow though and maybe you should add checks to see if the rooms are already coloured and what not.
This should be enough to get you started though but please note that I haven't actually run the aliases to see if it works but they should do it since I grabbed them out of some old settings and hopefully didn't mess up any brackets while dissecting the code. |
|
|
|
Reygar Novice
Joined: 22 Aug 2004 Posts: 32
|
Posted: Wed Dec 14, 2005 12:16 am |
Thats a start...but most of my rooms are already colored...is there a way to make mapper highlight the rooms like when you speedwalk?
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Dec 14, 2005 12:41 am |
As in hilite the path to each player?
(no way can i help ya with this, but thought it might clarify it for the gurus)
EDIT:
PATHHIGH
Syntax: #PATHHIGH path [roomid]
Highlights a path on the map. If RoomID is missing, the current room is used.
PATHHIGH Example
#PATHHIGH 3ne
Highlights the path from the current room to the room 3 rooms north, and one room east.
combine that with a room name finder
room_to_find = %replace( %0, ', %)
#MAPQUERY {Name LIKE '%@room_to_find%' AND ZONEID LIKE '%zonenum( )'}
then just have to type
#pathhigh "roomnumber"
from what pops up
not ideal, but it's what i can come up with. |
|
|
|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Wed Dec 14, 2005 3:57 am |
I was reading through the #ALIAS, and I was wondering what is the difference between %-1 and %1?
%-1 is used in this...
#ALIAS search_map {#VARIABLE map_rooms {%mapquery( %concat( "[Name] LIKE '%", %replace( %-1, "'", "''"), "%' AND [ZoneID] = ", %zonenum))};#SAY {search for ~"%-1~" in %zonename ~(%zonenum~) found %numitems( @map_rooms) rooms}}
%1 is used in this...
#ALIAS color_map {#VARIABLE map_lock %maplocked;#CALL %maplocked(0);#FORALL {@map_rooms} {#CALL %roomcol( %i, %1);#SAY New color set for %roomname( %i) ~(%i~) in %zonename( %roomzone( %i));}};#CALL %maplocked(@map_lock);#SAY Updates done.} |
|
|
|
Slaem Apprentice
Joined: 20 Sep 2005 Posts: 135
|
Posted: Wed Dec 14, 2005 8:14 am |
%-1 appears to be used for the entire Room Name.
%1 appears to be used for the room number. |
|
|
|
Vodoc Apprentice
Joined: 11 Apr 2003 Posts: 119 Location: Sweden
|
Posted: Wed Dec 14, 2005 8:17 am |
Reygar wrote: |
Thats a start...but most of my rooms are already colored...is there a way to make mapper highlight the rooms like when you speedwalk? |
Yes, you can highlite specified rooms if you have the zMapper plugin in zMUD. Search the zMapper helpfile for how to do this.
ToyMage wrote: |
I was reading through the #ALIAS, and I was wondering what is the difference between %-1 and %1? |
- %1 = the first input parameter
- %-1 = parameter 1 and everything after it
Code: |
example_alias How are you
%1 = How
%2 = are
%3 = you
%-1 = How are you
example_alias "How are" you
%1 = How are
%2 = you
|
|
|
|
|
Reygar Novice
Joined: 22 Aug 2004 Posts: 32
|
Posted: Fri Jun 30, 2006 5:12 am |
Years later and I am back to trying to do this. What Vodoc gave me works, but I need to tie that into typing the where command, getting a list of names and locations and then using zmapper to highlight each of those rooms....coloring the rooms wont work unless it changes all of them back to their orginal colors.
|
|
|
|
|
|