|
talonnb Apprentice
Joined: 30 Oct 2004 Posts: 127
|
Posted: Wed Jun 15, 2005 3:05 am
#find, how to use it from an alias |
Ok, I just got a good portion map of my Mud done and what I'd like to do is have the ability to go to a person right from where I am.
Now, I use a skill to sense their location, which gives me the room name, and store it in a variable sucessfully. Now. How do I use that variable to search for the room or room Vnum, and go to it?
I tried
#find @location
#find @location Name
not sure what to use. Thanks for your time |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Wed Jun 15, 2005 3:24 am |
You'll have to use a mapquery to find the room. The alias I use is below:
#ALIAS findroom {#MAPQUERY {[Name] LIKE '%char( 37)%replace( %trim( %-1), "'", "''")%'}}
This brings up a list of all the rooms that match whatever is after the findroom alias. IE, "findroom A Market Square".
You could make a trigger something like:
#TR {You sense whoever at (*).} {findroom %1}
#FIND just sends the "look" command and tries to match the room you're in to one on the map. |
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
talonnb Apprentice
Joined: 30 Oct 2004 Posts: 127
|
Posted: Wed Jun 15, 2005 3:31 am |
Just out of curiousity though. That brings up a window showing the different location matches, but if I want to store the Vnum in a variable and just set it to walk to that Vnum, is there a way to do that?
I know #walk #vnum Zone has to be done, but can I capture that stuff? |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Wed Jun 15, 2005 3:57 am |
Hmm... It might be possible, but unless your mud is unlike any I have played, there are usually many rooms with the same name. How would you know which would need to be done?
Something like this should put all the room vnums into the variable "matchrooms".
#ALIAS findroom {#VAR matchrooms %mapquery([Name] LIKE '%char( 37)%replace( %trim( %-1), "'", "''")%')} |
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
talonnb Apprentice
Joined: 30 Oct 2004 Posts: 127
|
Posted: Wed Jun 15, 2005 4:07 am |
Actually, that just puts all rooms in there period. Vnums though, but one big array of room Vnums
|
|
|
|
|
|