Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: 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
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: 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.

Reply with quote
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: 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?
Reply with quote
Eowyn
Apprentice


Joined: 19 Jan 2001
Posts: 117
Location: Norway

PostPosted: 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?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net