|
Samus Novice
Joined: 01 Jan 2003 Posts: 32
|
Posted: Sun Apr 18, 2004 8:56 pm
DB HELP |
I started this alias to search for keywords in certain fields and than have a list of the names of the mobs to show up, but instead of showing the names of the mobs it shows #.d (1.d 2.d) anyone know what is wrong?
#ALIAS itemget {#VARIABLE itemsfound %find( "%1", %2)
)
#VARIABLE itemname %rec.name _nodef idsay
#DBGET %pick( "p:Select item", "o:1", "@itemsfound %rec.name")
#VARIABLE itemdesc %rec.desc _nodef idsay
#VARIABLE itemplane %rec.plane _nodef idsay
#VARIABLE itemshortdesc %rec.shortdesc _nodef idsay
#VARIABLE itemlvl %rec.level_nodef idsay
#VARIABLE itemeq %rec.eq _nodef idsay
#VARIABLE itemarea %rec.area _nodef idsay
#VARIABLE itemroom %rec.room _nodef idsay
#ECHO You have chosen ~"%rec.name~" as your item.
#SHOW @itemname
#SHOW @itemdesc
#SHOW @itemplane
#SHOW @itemshortdesc
#SHOW @itemlvl
#SHOW @itemeq
#SHOW @itemarea
#SHOW @itemroom} |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Sun Apr 18, 2004 10:12 pm |
A couple of typos
#ALIAS itemget {#VARIABLE itemsfound {%find( "%1", %2)}
#VARIABLE itemname {%rec.name} _nodef idsay
#DBGET %pick( "p:Select item", "o:1", "@itemsfound %rec.name")
#VARIABLE itemdesc {%rec.desc} _nodef idsay
#VARIABLE itemplane {%rec.plane} _nodef idsay
#VARIABLE itemshortdesc {%rec.shortdesc} _nodef idsay
#VARIABLE itemlvl {%rec.level} _nodef idsay
#VARIABLE itemeq {%rec.eq} _nodef idsay
#VARIABLE itemarea {%rec.area} _nodef idsay
#VARIABLE itemroom {%rec.room} _nodef idsay
#ECHO You have chosen ~"%rec.name~" as your item.
#SHOW @itemname
#SHOW @itemdesc
#SHOW @itemplane
#SHOW @itemshortdesc
#SHOW @itemlvl
#SHOW @itemeq
#SHOW @itemarea
#SHOW @itemroom} |
|
|
|
Samus Novice
Joined: 01 Jan 2003 Posts: 32
|
Posted: Mon Apr 19, 2004 5:02 am |
heres another question
when I type #ALIAS itemget {#SHOW %find (%1,%2)}
is there anyway that it can show the name of the item instead of showing 1.d? |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Mon Apr 19, 2004 4:33 pm |
Try: #alias ItemGet {#show %dbget(%find("%1",%2))}
|
|
|
|
Samus Novice
Joined: 01 Jan 2003 Posts: 32
|
Posted: Mon Apr 19, 2004 7:42 pm |
That doesn't display anything on the screen
|
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Mon Apr 19, 2004 8:27 pm |
err, try this:
#alias ItemGet {#show %db(%dbget(%find("%1",,%2)),Name)}
It will search the current Database view for an entry containing %1 in field %2, and return the name of the first matching entry. |
|
|
|
Samus Novice
Joined: 01 Jan 2003 Posts: 32
|
Posted: Tue Apr 20, 2004 12:06 am |
well anyone for it to work with my alias?
so it will have a list of all the keywords? |
|
|
|
|
|