ID:261326
 
how would i go about adding in a login code with 3 menus?

For example; You login in choose good or evil, then you choose blah1, blah2. Then Male or female for each blah.

thanks in advance.
mob/Login()
var/menu1 = input("Choose something from our first menu!","Menu 1: Main Dish") in list("Steak","Pork Chops","Filet of Salmon")
var/menu2 = input("Choose something from our second menu!","Menu 2: Side Dish") in list("Cooked Carrots","Baked Potato","Green Beans")
var/menu3 = input("Choose something from our third menu!","Menu 3: Drink") in list("Lager Beer","Coca Cola","Water")
src << "Hello, my name is Lord of Water and I will be your waiter tonight. You chose from our selections a [menu1] to go with a dish of [menu2]. You also chose [menu3] to drink. Your food will be ready within twenty minutes. Enjoy yourself!"
..()


Chew on that. (I'm so punny!)
In response to Lord of Water
lol, yeah thanks!
In response to Super saiyan3
One thing, LoW how do i make it so that if you chose a certain thing from menu 1 you can only get a certain thing on menu 2?
In response to Super saiyan3
if("menuitem")
var/menuitem2 = alksdjfla;sdjf;salkdjf
In response to Super saiyan3
I'm pretty bored, so I'll give you a example code;

mob
var
listone = list("One","Two")
listtwo = list()
class

mob/Login()
switch(src.listone)
if("One")
src.listtwo+="Cow"
src.listtwo+="Dog"
if("Two")
src.listtwo+="Monkey"
src.listtwo+="Cheese"
var/classsel = input("What class?")in list("[src.listtwo]")
src.class=classsel
In response to unimatrix
I am still completly lost. Can you use an example like this.

What pet have you got?
Dog
Cat

What do you want to buy them?
Bone
Yarn

What Colour?
Grey
Pink


Thanks in advance for any help.
In response to Super saiyan3
Super saiyan3 wrote:
I am still completly lost. Can you use an example like this.

You've had a bunch of people provide answers for you...have you tried actually typing any of them in to see how they work?

Don't keep asking for more help unless you've spend as much or more time studying the answers as people spent giving them to you. If you have studied them, then ask specific questions, don't keep saying "that's not quite right, do it again".

Also you can check the CharacterSaving demo for an example of this:

byond://Deadron.CharacterSaving
In response to Deadron
Thank you very much Deadron(i am not trying to sound or be rude in any way)

After looking at the first example i was given by LoW i understood but needed to find out how to add 1 more thing.

Then after Nadrews post(Sorry Nadrew; again no offence) I was confused with the list 1 and 2 and the cow and monkey cheese. The character Handling i have but that still does not give me an insight into what to do. I dont want Code Spoon Fed to me; i actually want to understand it then add it in. When i first started coding i skipped learning about the Login and now i am paying for it. :(

In response to Super saiyan3
Super saiyan3 wrote:
When i first started coding i skipped learning about the Login and now i am paying for it. :(

Your problem here isn't knowing about login, it's understanding how the input() command works.

input() sleeps the code while it waits for a response...so if you want to ask three menus in a row, you just do input() three times in a row and get each answer.
In response to Super saiyan3
Don't feel bad... Nadrew's code lost me too! It's certianly not the way I would have coded such a situation. Here is what I would do:

mob
verb/BuyPetPresent()
set name = "Buy Your Pet A Present" // this is not really part of the code, just setting the verb's name. :-D
var/pet_type = input("What type of pet do you want to buy for?","What Pet?") in list("Dog","Cat")
switch(pet_type)
if("Dog")
BuyForDog()
if("Cat")
BuyForCat()
// Here, we are asking what type of pet and calling a proc accordingly.
// Now, we'll define BuyForDog() and BuyForCat()
mob/proc/BuyForDog() // this will be called if they choose dog
var/item_choice = input("What do you want to buy for your dog?","What Item?") in list("Bone","Pig's Ear")
src << "Good choice! You buy a [item_choice] for your dog."
mob/proc/BuyForCat() // this will be called if they choose cat
var/item_choice = input("What do you want to buy for your cat?","What Item?") in list("Ball of Yarn","Tinkle Bell Ball")
src << "Good choice! You buy a [item_choice] for your cat!"

Another good way do do this would be to create seperate lists for what you can buy for a cat and for a dog, and work some words around to make one short proc. Since I thought that might confuse you though, I did it a way that is easier to follow.
In response to Deadron
I would just like to thank LoW for help wiht the code, and Deadron for explaining what i missed ;)