|
jenwin Beginner
Joined: 05 Jul 2003 Posts: 24 Location: Sweden
|
Posted: 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 you |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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... |
|
|
|
jenwin Beginner
Joined: 05 Jul 2003 Posts: 24 Location: Sweden
|
Posted: 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? |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Jul 12, 2003 8:16 pm |
How about:
#variable Result %pick("p:Weaves","o:2","arm|shi|pfe|haste")
#FORALL @Result {%i} |
|
|
|
|
|