Turn()
for(var/mob/M in world)
pl = list()
pl.Add(M.ckey)
world << pl
var/p1 = rand(1,pl.len)
painter = pl[p1]
for(var/mob/M in world)
if(M.ckey == painter)
world << "<b><big><center>It is [painter]'s turn to paint. You have 1 minute to guess what it is.</center></big></b>"
cword = wordlist[rand(1,wordlist.len)]
M << "The word is: [cword]"
M.muted = 1
M.color = "circle"
M.flood()
M.color = "black"
sleep(600)
world << "<b><big><center>Time is up! The word was: <font color=\"red\">[cword]</font>!</center></big></b>"
for(var/mob/Mm in world)
if(Mm.ckey != M.ckey)
world << "[Mm] earned [M.rps] points this round."
rrps += 1
Mm.rps = 0
Mm.muted = 0
if(rrps)
world << "[M] has earned 20 points this round."
M.points += 20
M.muted = 0
else
world << "[M] has earned 0 points this round."
M.muted = 0
turns += 1
if(turns >= 10)
world << "<b><big><center>The game has ended! Here are the scores!</center></big></b>"
for(var/mob/Mmm in world)
Mmm.scoreboard()
Mmm.points = 0
Mmm.rps = 0
gs = 0
rrps = 0
painter = null
cword = null
turns = 0
else
p1 = rand(1,pl.len)
painter = pl[p1]
Turn()
Problem description:
The problem is: the painter never randomizes. Until the game is started again.
Just a tip for the future when dealing with picking a random entry in a list.
And look back at your first loop:
What you are doing here is, everytime the loop is looped, pl is initialized back to null with the entry being the current looped M.ckey (not to mention this may add any NPCs you may have).
In other words, right here what you are doing is keep erasing the list entries and just placing in one value.
My recommendation is to change the above to something like this: