ID:144768
 
Code:
 Start_Budokai()
set category="Admin"
set name="Start Budokai"
world<<"<b><i><u><font face=arial><font color=black><font size=3>Budokai has been scheduled to start in 1 day, you can sign up if you make your way to the arena and make your way to the sign up Office"
Box_Office()
mob
proc
Box_Office(mob/M in world)
alert(usr,"You can now purchase tickets for the budokai event or you can sign up if you wish, Thank you for taking part.","Box Office")

mob
verb
Budokai()
set src in oview(1)
Box_Office2()

mob
proc
Box_Office2(mob/M in world)
var/list/L = new
L += "Ticket"
L += "Sign Up"
L += "Forget it"
var/answer = input("Hello what would you like to do? [M]?") in L
switch(answer)
if("Ticket")
M << "You have purchased a seating ticket, thank you"
del(M)
if("Sign Up")
src << "You have chosen to participate in the budokai"
if("Forget it")
src << "You've changed your mind"
return


Ok heres the deal I worked it all out, but I'm just having problem branching it all together, Ok all this code is trying to do the following: Ok Apon clicking start budokai, it's meant to give to a message saying, you can now purcahse your tickets etc as you can see in the code, then I want to make it so if and only if you click start budokai does it give you the tab option to ask the box office merchent for tickets etc, at the moment all it's doing is, start budokai, gives message, at any time you can go to the box office and ask for tickets, I just need to make it so apon clicking start budokai, it will only give you the verb to ask for tickets. It sounds confusing but I'm sure if you read through and the code it may make scense. Thanks for reading.:

You should use a list to store registered players.

e.g.
if(input("Register?") in list("Yes", "No") == "Yes")
list that contains mobs += src

proc/excuteTourny()
for(var/mob/m in list that contains mobs)
m.loc = tourny location

In response to DivineO'peanut
Thanks alot I will do that as soon as I can figure this little tree branch :), thanks for your help :)
In response to Nexus6669
Has anyone got any suggestions that may help me with this code, it's still racking my brain
In response to Nexus6669
*This problem has been solved, thanks for reading*
In response to DivineO'peanut
DivineO'peanut wrote:
You should use a list to store registered players.

e.g.
> if(input("Register?") in list("Yes", "No") == "Yes")
> list that contains mobs += src
>
> proc/excuteTourny()
> for(var/mob/m in list that contains mobs)
> m.loc = tourny location
>


I personally wouldn't actually store their mob in a list, as people can log off & the such. Instead, he should learn to associate text with the client.
In response to Teh Governator
Teh Governator wrote:
DivineO'peanut wrote:
You should use a list to store registered players.

e.g.
> > if(input("Register?") in list("Yes", "No") == "Yes")
> > list that contains mobs += src
> >
> > proc/excuteTourny()
> > for(var/mob/m in list that contains mobs)
> > m.loc = tourny location
> >


I personally wouldn't actually store their mob in a list, as people can log off & the such. Instead, he should learn to associate text with the client.

Well then add a check when the player logs out. -_-

In response to DivineO'peanut
DivineO'peanut wrote:
Teh Governator wrote:
DivineO'peanut wrote:
You should use a list to store registered players.

e.g.
> > > if(input("Register?") in list("Yes", "No") == "Yes")
> > > list that contains mobs += src
> > >
> > > proc/excuteTourny()
> > > for(var/mob/m in list that contains mobs)
> > > m.loc = tourny location
> > >


I personally wouldn't actually store their mob in a list, as people can log off & the such. Instead, he should learn to associate text with the client.

Well then add a check when the player logs out. -_-


Yes, he could. But, that's not always the better choice. I have a datum that controls every aspect of fighting tournaments. From choosing the opponents after voluntary sign-up, adding in PC opponents incase there's an un even number, TKO's, leaving the fighting area, leaving the game, and awarding the winner's money, championship status, etc...it even records the fight from a ringside reporter perspective for people to "read" about it that weren't there at the time.
In response to Teh Governator
Whether you create a datum or not, a list is the best choice to handle the registered players. Objections?