|
Sauce Newbie
Joined: 12 Jul 2006 Posts: 2
|
Posted: Wed Jul 12, 2006 1:56 pm
Database help |
I want to create a list of all the mobs in an area and the sw to each of them. I've seen it done so that a word is typed, such as labyroom, and a window pops up with a list of all the mobs in the area. Then, the name of the mob you want can be clicked and you would run to that mob. I dont know how to make this window pop up or where i would put in the mobs and sw. Any help would be greatly appreciated.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Jul 12, 2006 10:12 pm |
To pop up a window of limited choices, you use the #PICK command, or if you want to do some special testing or setup for the selected option you can use the %pick() function (I find the function a lot more useful, honestly).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Sauce Newbie
Joined: 12 Jul 2006 Posts: 2
|
Posted: Wed Jul 12, 2006 11:14 pm |
ok cool so the #pick thing works, but how do i use that to reference say a database of mobs? Or better yet how would i use the #pick command to be able to pick from several different choices and not just one?
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Jul 13, 2006 5:18 am |
Here's an untested example of how to get critters from a database
#FORALL %query(Zone=%prompt(,"where do you want to go to hunt today?")) {#additem ListofMobs &%i.name}
&%i.name is a DB syntax for referring to a record fieldname, allowing you to reference its contents for a particular record.
once names have been gotten, here's an example of how to show the pick list
HuntTheseCritters = %pick("p:These are the critters found at the specified location.","o:3",@ListofMobs)
the p: is for the prompt you want to show in the list window. o: is for specifying the max number of selections. If you want to have unlimited, leave this blank. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|