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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Zafrusteria
Wanderer


Joined: 11 Oct 2000
Posts: 94
Location: United Kingdom

PostPosted: Fri Apr 18, 2003 9:34 am   

Find the Zone or area from a room name
 
Paste the script below into your zMud editor
Note: YOU MUST change <Full path to the mapper mdb> to something like
C:ZMudmapper.mdb, I.e. to point at your own map database

Usage: findRoom <room name>|<parcial room name>

Eg
findroom the living room
finfroom living

Have fun.

================== cut here =====================

; %1 is the name or partcial name of a room
; it returns a list of :- zone, name
;
; open the connection to the Map DB
#VARIABLE Conn %comcreate( "ADODB.Connection")
#CALL @Conn.Open( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<Full path to the mapper mdb>")
#IF (@Conn.ConnectionString ="") {
#SHOW "could not open connection to database"
#ABORT
}
; send request for data to Jet DB
#VARIABLE rs @Conn.Execute( %concat( "SELECT z.name, o.name FROM ObjectTbl o, ZoneTbl z WHERE o.name LIKE '%", %-1, "%' and o.zoneid = z.zoneid ORDER BY z.name, o.name"))
; display the data on the main screen
#ECHO @rs.GetString
#CALL @rs.Close
#VARIABLE rs ""
#VARIABLE Conn ""
=========script ends here =================


Zaf
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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