*The Conjuror approaches the bench and faces all of the Gurus.
Judge: State your problem!
The Conjuror: Well, sir, I was just wondering how to make it so that I could display a switch statement to the other player when I click on a verb...
Judge: Give us an example
The Conjuror: Well, say I click a verb called goto_club_house()
and when the user clicked on this, a list would be displayed of all the players in the world, and the user could select one person to come with him or her to the club house.
Judge: ...And?
The Conjuror: Well, say the user clicked the verb and selected someone named, say, judge. How would I make it so that the person named Judge could be displayed with a prompt that says, [usr] has asked you to come to the club house with /her, will you come? And the person called judge would be displayed with two answeres, yes and no.
Judge: What happens if each of these are clicked?
The Conuror: Ok, so if the person called judge clicks yes, the judge and the user are teleported to the club house's coordinates. If no is selected though, the user is displayed with a text saying so and so(this case being the judge) has declined your offer. And then everyone goes on normally.
Judge: Do you have any idea what your getting into here?
The Conjuror: Of course, here, I shall give a snippet of what I have so far, basically my failure.
*The Conjuror takes out a piece of paper from his pocket and hands it to the judge.
*The judge reads:...
mob/verb/Goto_Club_House()
set category = "Commands"
set name = "Club_House_Invite"
set desc= "Ask another player to come with you to the club house."
var/list/players=list()
for(var/mob/M in world)
players += M
players += "Cancel"
var/mob/C = input("Who would you like to invite [usr]?") in players
if(ismob(C))
switch(input("[usr] has asked you to come to his club house with him, do you accept?")in list("Yes","No"))
if("Yes")
usr.loc = locate(2,2,2)
C.loc = locate(2,2,2)
if("No")
return
else
..()
The Conjuror: There it is Judge, I know where the problem is but not how to fix it. You see, where I wrote switch(input, that displays the prompt to the originial user, any ideas? I would really appretiate any help, thanks.
Judge: Well? Jury?
Jury: The Jury needs some time to discuss the problem and see what the proper answere is, thank you.
Thanks for any help everyone!
Copyright © 2025 BYOND Software.
All rights reserved.
Basically, the first argument you pass is who you want to get the input or alert. The default is usr.