mob/verb/Join()
if(src.isplayer == 0)
if(gamestarted == 0)
if(players == 3)
return 0
else
players += 1
src.player = players
src.isplayer = 1
world <<"<b>[src]</b> joins as player [src.player]."
if(players == 3)
world <<"Game started."
gamestarted = 1
Next_Turn()
proc
Next_Turn()
currentturn += 1
if(currentturn > 3)
currentturn = 1
for(var/mob/M2 in world)
if(M2.player == currentturn)
world <<"It's <b>[M2]</b>'s turn."
M2.take_turn()
mob
proc
take_turn()
var/I = input("What do you want to do?","Your Turn")in list("Suggestion","Accusation","End")
if(I == "Suggestion")
var/mob/M = input("Who do you wish to suggest this to?","Suggestion")as mob in world
var/S = input("Who did it?","Suggestion")in list("Colonel Mustard","Miss Scarlet","Professor Plum","Mr. Green","Mrs. White","Mrs. Peacock")
var/W = input("With what?","Suggestion")in list("Rope","Lead Pipe","Knife","Wrench","Candlestick","Revolver")
var/R = input("Where did it happen?","Suggestion")in list("Hall","Lounge","Dining Room","Kitchen","Ballroom","Conservatory","Billard Room","Library","Study")
world <<"<b>[src]</b> suggests to <b>[M]</b> that <b>[S]</b> commited the murder with a <b>[W]</b> in the <b>[R]</b>."
Next_Turn()
if(I == "Accusation")
var/S = input("Who did it?","Accusation")in list("Colonel Mustard","Miss Scarlet","Professor Plum","Mr. Green","Mrs. White","Mrs. Peacock")
var/W = input("With what?","Accusation")in list("Rope","Lead Pipe","Knife","Wrench","Candlestick","Revolver")
var/R = input("Where did it happen?","Accusation")in list("Hall","Lounge","Dining Room","Kitchen","Ballroom","Conservatory","Billard Room","Library","Study")
world <<"<b>[src]</b> attempts to solve the murder, and states that <b>[S]</b> commited the murder with a <b>[W]</b> in the <b>[R]</b>."
sleep(30)
if(S == suspect && W == weapon && R == room)
world <<"<b><font size = 5>[src] has solved the murder!"
else
world <<"<b>[src]</b> fails to solve the murder, and is off the case."
Next_Turn()
if(I == "End")
Next_Turn()
The player who joins as the third player always gets the pop-up window.
src should be equal to whatever M2 was pointing at in Next_Turn().