|
Eowyn Apprentice
Joined: 19 Jan 2001 Posts: 117 Location: Norway
|
Posted: Thu Sep 04, 2003 9:52 pm
Extracting map door-data. |
What is the syntax to extract map data about exits?
i.e. if I want to open or close all doors in the room I'm standing in (current location) - how would I get hold of those doornames?
Thanx |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Sep 05, 2003 6:09 am |
Play with
quote:
doorname
Syntax: %doorname( direction)
Return the name of the door in the specified direction.
doorname Example
#SHOW %doorname(n)
Display the name of the door for the North exit of the room
#SHOW %doorname(portal)
Display the name of the door for the exit of the room called "portal"
and
quote:
roomexit
Syntax: %roomexit([vNum], [s])
Return or set the exit string of the room to string s. The exit string is a string list, with each direction code (speedwalk character) separated by |. If vNum is omitted, the current room is used.
|
|
|
|
Eowyn Apprentice
Joined: 19 Jan 2001 Posts: 117 Location: Norway
|
Posted: Fri Sep 05, 2003 8:12 pm |
Thank you.
#echo %doorname( , n)
works well when the door has a name.
However, if it's just a door with no specific name (I've set Default door name if %2 is not defined: "door") - i.e. a door named just "door" - the command returns nothing. Not even an indication that there is a door in that direction.
Is there any way to fetch the information that there is a door in the direction, but without a specific name? |
|
|
|
Eowyn Apprentice
Joined: 19 Jan 2001 Posts: 117 Location: Norway
|
Posted: Mon Sep 08, 2003 7:57 pm |
It's got to be some way of getting hold of this data? It's a db after all..?
Will a correct syntax similar to this work:
#VAR OldFilter %mapfilter( )
#NOOP %mapfilter( %concat( "[RoomExit] LIKE '' WHERE [ExitType] LIKE door"))
#IF (%numrooms( ) = 0) {#VAR numordinarydoors 0}
#IF (%numrooms( ) = 1) {#VAR numordinarydoors 1}
And is there a reference somewhere what objects (as in this case - exits, exittype etc.) are called what when using SQL? |
|
|
|
|
|