|
Zapple Newbie
Joined: 29 Apr 2001 Posts: 8
|
Posted: Sat Aug 10, 2002 6:51 pm
Database output question |
I'd like to 'say' item names and their stats when i query the dbase. Here is the alias im using:
#al {find} {#FORALL %find("%-1") {%dbget(%i)," ");say &Item - &Stats}}
I have three fields in the dbase: Item, Stats and Date.
so if I type:
find glimmering
It should 'say': Item name - Stats. Here is my output:
(Num789arItema suit of glimmering chainmailStatsAC18 +2+1 noburn Anti-Mage-Cleric Anti-EvilDate20020805, )
then:
You say 'a purple silk shawl - AC4 5hps 9cha'
a purple shawl is the first record in my dbase and is 'said' no matter what item I query.
Any ideas how to get the output to be the correct items stats instead of the first item in my dbase all the time? :)
Thanks in advance for any help. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Aug 10, 2002 9:38 pm |
You have the correct idea, but you are using some stuff from other zMUD commands. What you want is this:
#ALIAS find {#FORALL %find("%-1") {say %db(%dbget(%i), "Item") - %db(%dbget(%i), "Stats")}}
Kjata |
|
|
|
Zapple Newbie
Joined: 29 Apr 2001 Posts: 8
|
Posted: Sat Aug 10, 2002 11:25 pm |
Thanks so much! Works perfectly :)
|
|
|
|
|
|