 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: Fri Jul 23, 2004 2:22 pm
#FIND question |
trying out the #find for database searches and running into a snag.
| Code: |
#FIND 1 level
0 1 black Armband of Mourning Midgaard Hannitor
1 1 Evil Touch Vanir Aurvandil
2 1 pair of light leather sleeves Adventurers Guild small green dragon
Which is all correct
#FIND Pot Name
2606 0 backpack New Thalos shopkeeper
2607 0 yellow and green ring Moria large orc
2608 0 Broken Part Death Gate Room: Before the Kicksley Winsey
#FIND Glass Name
2606 0 backpack New Thalos shopkeeper
2607 0 yellow and green ring Moria large orc
2608 0 Broken Part Death Gate Room: Before the Kicksley Winsey
These two are obviously NOT...hell, they are the SAME THING....
|
Not sure whats the deal there :( And yes there are things that say glass, and things that say pot in the names in there.
Even does it with a single named item desire. it still gives me the above list.
This is distressing because I was planning on compiling a Room Name/Area Name database and be able to seach it, but it does not seem to work for me.
While on this train of thought, 2 more questions.
1) is there a way to do the #find WITHOUT needing to make sure that I have opened the database 1st?
2) #DBRESET does not seem to work for me. So far when i have done a #find, and gotten the results in the mud window, it has changed the database view and the only way to get it back to normal is to close the database and re-open it. #DBRESET, from what i understand of the description, is supposed to reset it so that it looks like it would if i opened it.
If #1 can be done, then #2 hardly matters to me, but would still be nice to do.
I am NOT commited to the #find, #QUERY (&Name =~ glass) All works GREAT for me. but damn it's alot to type :-)
if someone can show me how to do that in an alias that would be great. Something like:
#Alias room {#QUERY (&Name =~ %1)}
...
Edit, Holy crap, the alias worked.....k, yeah, i am amazed...thought there would be more to it than that. Now the question remains, is there a way to do this so that I dont have to open the database physically, but have it called from the command? I don't mind expanding the alias at all....but can't find anything about looking up data without the database open 1st, in the help files.
But am still curious as to why the #find was screwing me.... |
|
|
|
 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: Fri Jul 23, 2004 2:53 pm |
K, entered 3 areas into a database, and already ran into a snag when i did the search.
| Quote: |
| #Alias room {#QUERY (&Room =~ %1)} |
In order to search for a room using more than one word i need enclose the room in "".
typing:
gives me all the rooms that have 'the' in them and pretends 'tomb' isnt in there.
gives the desired results.
How can i get
| Quote: |
| #Alias room {#QUERY (&Room =~ "%1")} |
or something like it to work?
Also, found out about #DBLOAD :-) It also does not work.
the database is named Room.
Tried
I didn't get a msg that it was opened, and tried room "the tomb" and nothing happened.
Am i missing something?
The database is located in the DB part of the worlds folder.
Is it expecting it to be somewhere else?
And if it is, how do i smack it around and tell it where it is?
As usual, thanks for any help with my silly ramblings.[/quote] |
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Sat Jul 24, 2004 2:17 pm |
Databases are abbrieviated for commands like #DBLOAD. When you created your "Room" database it would have shown you that it would use "ro" as the short keyword for the DB. Unless you changed that use "#DBLOAD ro". Also if you aren't using any other databases then when you open the window this one will automatically be loaded anyway. If the datbase is already loaded then #DBLOAD will not load it again.
There is nothing in the help files about using a database without the window open because it can't be done. That's right there is something zMud won't do. The reasoning is simple, a database is meant to be looked at. Until the user opens the database window there is no reason the activate the database commands. Zugg designed it so that zMud would use less memory by not loading up the database commands and code unless the window was open. The same is true for the mapper.
For your alias you should use %-1 to get all arguements after, and including, the first. Also the arguement to #QUERY can be anything that works in an expression. I would use the %match function instead of the match operator, but that is a personal preference.
#ALIAS room {#QUERY (%match(&Room,"%-1"))} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: Mon Jul 26, 2004 12:34 pm |
Vijilante, thanks,
| Quote: |
| #QUERY (&Room =~ "%-1") |
worked great.
Also:
| Quote: |
| When you created your "Room" database it would have shown you that it would use "ro" as the short keyword for the DB. |
It showed me no such thing. I created the database from the DB program, not from starting it at the command line, so maybe that would be the diff.
Either way, tried "#dbload r" upto "#dbload rooms" and nothing seems to load up, cause the room seach alias fails to pull up anything.
 |
|
|
|
 |
DeathDealer Adept

Joined: 20 Jul 2004 Posts: 268
|
Posted: Wed Jul 28, 2004 3:29 pm |
| Quote: |
Also:
| Quote: |
| When you created your "Room" database it would have shown you that it would use "ro" as the short keyword for the DB. |
It showed me no such thing. I created the database from the DB program, not from starting it at the command line, so maybe that would be the diff.
Either way, tried "#dbload r" upto "#dbload rooms" and nothing seems to load up, cause the room seach alias fails to pull up anything.
 |
Still hoping for an answer with regards to this.  |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jul 28, 2004 5:57 pm |
#DBLOAD is used to load additional databases to an open database window or to change the active database. It cannot be used to open the database window.
#DBLOAD is a database command. It's part of the database module, which is only available while the database window is open.
To open the database window through script, use the #MENU command.
#MENU {Windows|Database} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
|
|
|
|
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
|
|