Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Sauce
Newbie


Joined: 12 Jul 2006
Posts: 2

PostPosted: 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.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Sauce
Newbie


Joined: 12 Jul 2006
Posts: 2

PostPosted: 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?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net