;Alan's Pictionary Script. ;Put this in a 'new drawing' spot. ;When a person selects this spot the next thing they say will be saved ;as the picture they're going to draw. ;The script will alert the room if anybody guesses the picture and keep ;each person's score. ON ENTER { object GLOBAL "null" object = pictionaryscore GLOBAL 0 pictionaryscore = "Say RULES to list them in your log." STATUSMSG } ON INCHAT { object GLOBAL pictionaryscore GLOBAL team GLOBAL team1 GLOBAL team2 GLOBAL ; { ")applause" SAY "You got it " WHOCHAT WHONAME & " ... " & object & SAY "null" object = 0 ME SETSPOTSTATE } CHATSTR object SUBSTR WHOCHAT ME GETSPOTSTATE == NOT AND IF ; { { pictionaryscore ++ { team1 GETSPOTSTATE 1 + team1 SETSPOTSTATE } team 1 == IF { team2 GETSPOTSTATE 1 + team2 SETSPOTSTATE } team 2 == IF } "$1" GREPSUB USERNAME SUBSTR IF } CHATSTR "You got it (.*)" GREPSTR IF ; { "I have solved " pictionaryscore ITOA & " pictures." & SAY "" CHATSTR = } CHATSTR ";scores" == IF ; { "I solved " pictionaryscore ITOA & " pictures." & SAY 0 pictionaryscore = PAINTCLEAR } CHATSTR ";resetscores" == IF } ON OUTCHAT { object GLOBAL ; { "Use your paint pallet to draw your picture." LOGMSG "You'll have to turn off painting to use the game buttons." LOGMSG "Team play is optional." LOGMSG "Scripts are turned off in this room to protect the drawing." LOGMSG "" CHATSTR = } "rules" CHATSTR == IF ; { CHATSTR object = "You have entered the following object ... " object & LOCALMSG "You can start guessing now." SAY "" CHATSTR = } object "null" == WHOME ME GETSPOTSTATE == AND IF } ON SELECT { object GLOBAL "null" object = WHOME ME SETSPOTSTATE "I'm starting a new drawing." SAY PAINTCLEAR "Say the name of the object you're going to draw." LOCALMSG "If you make a mistake, select 'New Drawing' again." LOCALMSG } ON LEAVE { { CLEARLOOSEPROPS PAINTCLEAR 0 ME SETSPOTSTATE } NBRROOMUSERS 2 < IF } ;Place this script in a 'Join Team 1" spot ON ENTER { team1 GLOBAL ME team1 = } ON SELECT { team GLOBAL 1 team = "I've joined Team 1." SAY } ;Place this script in a 'Join Team 2" spot ON ENTER { team2 GLOBAL ME team2 = } ON SELECT { team GLOBAL 2 team = "I've joined Team 2." SAY } ;Place this script in a 'scores' spot ON SELECT { team1 GLOBAL team2 GLOBAL "Team 1 has " team1 GETSPOTSTATE ITOA & " points. Team 2 has " & team2 GETSPOTSTATE ITOA & " points." & ROOMMSG ";scores" SAY } ;Place this script in a 'reset scores' spot. ON SELECT { team1 GLOBAL team2 GLOBAL team1 GETSPOTSTATE score1 = team2 GETSPOTSTATE score2 = "Team 1 got " score1 ITOA & " points. Team 2 got " & score2 ITOA & " points." & ROOMMSG { "Its a tie!" ROOMMSG } { {"Team 1 Wins!" ROOMMSG } { "Team 2 Wins!" ROOMMSG } score1 score2 > IFELSE } score1 score2 == IFELSE "Resetting scores." ROOMMSG 0 team1 SETSPOTSTATE 0 team2 SETSPOTSTATE ";resetscores" SAY }