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
jenwin
Beginner


Joined: 05 Jul 2003
Posts: 24
Location: Sweden

PostPosted: Fri Jul 11, 2003 9:33 pm   

Menus problems
 
Heya...

[8D]
I was wondering if anyoen could show me a sample code of how to build menues that I can choose several of the menu options for example....

menu
1.get knife
2.get bread
3.get backpack

and I want to choose only 1 and three...

I tried reading the help file but could not figure it out...
Thank youVery HappyVery Happy
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 11, 2003 10:23 pm   
 
Use a picklist. If needed, you can simulate menus by nesting the picklists.

#variable Result %pick("p:prompt message goes here","o:number of selections goes here","option1|option2|option3|etc")

If you want to execute commands from a list, check out the #PICK command.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jul 11, 2003 11:19 pm   
 
Your request is very similar to one of the examples under #MENU.

#MENU "Get knife" {get knife}
#MENU "Get bread" {get bread}
#MENU "Get backpack" {get backpack}

Oops, I missed the part where you said you wanted to choose several options (in this case knife and backpack). Of course, you could just bring up the menu twice...
Reply with quote
jenwin
Beginner


Joined: 05 Jul 2003
Posts: 24
Location: Sweden

PostPosted: Sat Jul 12, 2003 7:20 pm   
 
Oki, lets say I have a selection of 20 weaves(spells)
I want to use the entire list BUT I want to be able to pick
only 5-6 of them from the list at a time to weave.

How do I do that? I tried with
#variable Result %pick("p:Weaves","o:2","arm|shi|pfe|haste")
and then make and alias to just @result
but the actual result would be for example if I choose arm and pfe
it would give the output arm|pfe and not individually arm;pfe as I wanted....

how can I do that?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sat Jul 12, 2003 8:16 pm   
 
How about:

#variable Result %pick("p:Weaves","o:2","arm|shi|pfe|haste")

#FORALL @Result {%i}
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