|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Wed Mar 01, 2006 4:41 pm
roomexit setup in map |
I was wondering if there is a system to order a group of exits such as j|h|u|n|s|w, and so on for any other variety of room exits into the same format that is produced from %roomexit. so my mud gives out the exits which i capture and format into j|h|u|n|s|w, but %roomexit gives these same exits in a different order, is there a system to the ordering of roomexit? Also, in my script i would like to narrow down the selection from mapquery, but I am horrid at the syntax in it.
#CALL %mapfilter(%concat("ZoneID = ",%zonenum())) would call entirely too many rooms, I have the room name captured into rname, and if my roomexit problem is solved those exits would be formatted and then put into texits. So how would this new mapfilter look to only include rooms with matching room name & exits? I'm going to be tinkering with this for a while, but any help is appreciated. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Mar 02, 2006 11:12 am |
First for something like this you should use %mapquery instead of %mapfilter.
Exits have to be compared by code. The best I way found to do this is store a list of your mud output exits, and fetch the room exits from the mapper into another variable. Then #FORALL through either list. As you go through the list if it %ismember of the other list delete it from both lists. Once done if either list contains anything then they don't mtach.
This can be shortened using a #WHILE and some creative coding. Most likely you will want to use that slightly faster method, because your %mapquery will often return multiple rooms from a name check. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Fri Mar 03, 2006 1:51 am |
solved the problem, i'll post back when i run into another issue. thanks a lot vijilante. instead of using that #forall to get the roomexits setup, i just stored my texits variable and did a %sort on it, then did a %sort(%roomexit...).
|
|
|
|
|
|
|
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
|
|