|
Eowyn Apprentice
Joined: 19 Jan 2001 Posts: 117 Location: Norway
|
Posted: Thu Feb 14, 2002 1:41 am
Suggestion for the new mapper. |
This should probably be in the betaforum, but I don't have access there, so I'm posting it here. I've got an idea for the new mapper-program that's on the way.
How about making it possible to change the color of a room on the map temporarily.
Let me give an example:
Lets say that I'm hunting in a big area. I've mapped it, but dunno every roomname by heart. My huntingpartner gets lost and asks me to find him.
Today, what I do is hit the where command, and get up something like this:
>Where
----------------------
YourFriend In the treacherous mire.
So I hold my mouse over one room at a time to find the room with that roomtitle (this mud has very few equal roomnames).
I don't think it's possible with the current map, but perhaps it could be made possible in the new mapper to have a trigger that captures the roomnames when I use where, and change the roomcolor of those rooms who have the roomname of the Where-command to for example blue for 3 seconds. That way, you would no longer fumble to find your friends, even if you've just gone through the area once before to map it. The possible rooms would light up.
Perhaps it's possible with the current mapper too. If so - I'd love to know how :) |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Feb 14, 2002 9:46 am |
You can do that with #FIND and %btncol with and #ALARM.
quote:
roomcol
Syntax: %roomcol( room, [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..
Not in front of zMud but that is the idea.
I had my map colorize the room I wanted to go
as I manually moved there.
TonDiening
Beta Upgrading to 6.26
All keys, aliases, variables, paths, triggers, tabs, menus, status bars deleted |
|
|
|
Eowyn Apprentice
Joined: 19 Jan 2001 Posts: 117 Location: Norway
|
Posted: Thu Feb 14, 2002 1:44 pm |
Wow! Cool!
Just one problem - how do I convert a roomname to a roomnumber?
#echo %roomcol( 169,[red])
will color room number 169 red.
But it don't work if I use the roomname. What's the command to translate a roomname to a roomnumber? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Feb 14, 2002 9:07 pm |
%roomnum(name)
Kjata |
|
|
|
itsr0y Beginner
Joined: 20 Jan 2002 Posts: 25
|
Posted: Thu Feb 14, 2002 11:07 pm |
the %roomnum(name) only works for the short name for a room. Is there any way to get a room number from the real name of it?
|
|
|
|
EdwinDroom Wanderer
Joined: 25 Jan 2002 Posts: 77 Location: Ireland
|
Posted: Fri Feb 15, 2002 12:37 am |
Heres one i used to colour my main map for each of a few kinds of area (e.g. You are walking through a desert.
Make an alias with the following
RoomNumber=0;#LOOP 10000 {#IF {%pos( @RmStr, %roomname( @RoomNumber))>0} {%roomcol( @RoomNumber, @RmCol)};#ADD RoomNumber 1}
NB the 10000 is the max number of rooms in your map - change as appropriate.
To use, type
RmStr=Whatever the Name of the Room Is
(in fact, will match if you type part of the room name)
RmCol=Colour you want it to be
(I used numeric values here, not in front of zmud so not sure if words will work - I think it should)
then call your alias, it will fly through the map and color any room with a name matching what you set it to.
As for switching it for a few secs, store the colour it is first (roomcol without the second argument) and set it back afterwards with an alarm.
You can use this also to colour all rooms with, say, Temple or Road or whatever in the name.
Sorry it's a bit basic - was written when i couldnt sleep the other night. NB it will freeze mud for a little while, is a very basic approach - someone fix it? Too late at night here. E.g. make it possible to pass RmStr, RmCol as parameters instead of setting separately
All the best freaks are here, please stop staring at me |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Feb 15, 2002 3:36 am |
%numrooms() returns the max number of rooms in the zone (if the map is all in one zone, then this is also the max number of rooms in the map.)
Kjata |
|
|
|
itsr0y Beginner
Joined: 20 Jan 2002 Posts: 25
|
Posted: Sat Feb 16, 2002 8:23 pm |
#LOOP 1000 or #LOOP 10000 would work better because %numrooms() only gives the number of rooms, not the highest numbered room. If you are making a map and delete a room, there will be a number for which there is no actual room. So if I have a map with 53 rooms, delete 3 rooms, then make 2 more. %numrooms() will say 52, but i'd have to go up to 54 (rooms start at 0) to see all of them.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Feb 17, 2002 1:11 am |
That is what %mapvnum is for. Anyhow back to the original topic of question, there is no perfectly easy way to do it currently, since the map functions that are accessible by scripts will not work off room names directly. So you would have to either use the mappers built in find routine (in the edit menu). Regrettably there is no script way to enter data directly into that dialog, you can pop up the dialog within a script though #MENU {Mapper|Edit|Find}. That leaves only a scripted search for your friend. Sound like something fun to write...
#CLASS FriendFinder {disable}
#VAR CurrentRoom {}
#VAR TargetRoomName {}
#VAR PossibleTargetRoomNums {}
#VAR RoomsAltered {}
#VAR SearchState {0}
#VAR SearchingCounter {0}
#ST {%if(@SearchState=1,Searching: @SearchCounter of %numrooms)}
#ALIAS DoSearch {
#IF (@SearchState=2) {
#ADD SearchCounter 1
#IF (@SearchCounter>%numitems(@PossibleTargetRoomNums) {SearchCounter=1}
#TELEPORT %item(@PossibleTargetRoomNums)
#ALARM "SearchFlasher" {+3} {DoSearch}
} {
#IF (@SearchState=-1) {
#UNTRIGGER SearchFlasher
#TELEPORT @CurrentRoom
#FORALL @RoomsAltered {#NOOP %roomcol(%i,"blue")}
RoomsAltered=""
SearchState=0
#T- FriendFinder
} {
SearchCounter=1
CurrentRoom=%roomnum
#WHILE ((@SearchCounter<=%numrooms)&(@SearchState=1)) {
#IF (@TargetRoomName=%roomname(%mapvnum(@SearchCounter))) {
#ADDITEM PossibleTargetRoomNums %mapvnum(@SearchCounter)
#NOOP %roomcol(%mapvnum(@SearchCounter),"red")
#ADDITEM RoomsAltered %mapvnum(@SearchCounter)
}
#ADD SearchCounter 1
}
#IF (@SearchState!=-1) {
SearchState=2
}
#ALARM {+1} {DoSearch}
}
}
}
#CLASS 0
#BUTTON FindBuddy {%if(%trigger(FriendFinder)=0,Start Search,%if(@SearchState=1),Getting Name,%if(@SearchState=2,Found %numitems(@PossibleTargetRoomNums),Aborting)))} {#IF (%trigger(FriendFinder)=0) {#T+ FriendFinder;SearchState=0;where} {SearchState=-1}}
Most of those will be filled in by the alias...assuming I write it without too many flaws. TargetRoomName you will have to make a trigger to fill in put that trigger into the FriendFinderClass and have it call the alias. The alais was done up in a pretty format in an effort to reduce the number of typos I would make, so may just want to copy it into the settings editor. What it does is checks the room name for every room in the map then teleports you on the map and colors all the ones it found, the teleporting keeps going till you hit the button again. It would also be possible to have it lay out a colored "bread crumb" trail to each location, or even automatically walk you to each location, or just about anything else after it has built the found list. Hopefully I didn't make too many typos. If you want it to draw a colored bread crumb trail to each location, then undraw it just ask. That one would be fun to write too. Automattically walking you to each location wouldn't be as much fun since it would depend on your setup, and current scripts. I suppose it could also do what you asked, and just change the color for a few seconds, but that seemed to be no fun. You might want to remove the teleporting thing and just have the collor changes then when you click the button it will change them back. Also you will want to select colors more to your liking. |
|
|
|
|
|
|
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
|
|