Zafrusteria Wanderer
Joined: 11 Oct 2000 Posts: 94 Location: United Kingdom
|
Posted: 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 |
|