ROOM ID 117 PRIVATE NOCYBORGS NAME "Tank Game" PICT "tankgame.gif" ARTIST "Tandika Star" PICTURE ID 1 NAME "arrowll.gif" TRANSCOLOR 56 ENDPICTURE PICTURE ID 2 NAME "arrowrr.gif" TRANSCOLOR 56 ENDPICTURE SPOT ID 3 NAME "InchatRoutines" OUTLINE 62,9 85,9 85,31 62,31 LOC 125,99 SCRIPT ON INCHAT { score GLOBAL ;React to being hit { "!" WHOCHAT WHONAME + " scores a hit!" + SAY [ 904326610 ] SETPROPS 5 DELAY [ 904326618 ] SETPROPS 5 DELAY [ 904326624 ] SETPROPS 5 DELAY [ 904326634 ] SETPROPS "" CHATSTR = } CHATSTR "^gotcha$" GREPSTR WHOME WHOCHAT != AND IF ;Tell everyone user's score { "\x3b" score ITOA + SAY } CHATSTR "allscores" == IF } ENDSCRIPT ENDSPOT SPOT ID 1 NAME "BasicScripts" OUTLINE 3,9 26,9 26,30 3,30 LOC 127,99 SCRIPT ON ENTER { score GLOBAL 0 score = 30 1 SETALARM "To play the game, position your mouse over the target," LOCALMSG "and say \x22fire\x22. Say \x22score\x22 to see your score." LOCALMSG "To see all the scores, say \x22allscore\x22. The scores will appear in your log." LOCALMSG { CLEARLOOSEPROPS PAINTCLEAR } NBRROOMUSERS 2 < IF } ON ALARM { ;Dresses user appropriately depending on which side of the screen they're on. { [ 1056593251 1056593241 1056593233 1056593220 ] SETPROPS } { [ -1332310125 -1332310008 904184936 -1332309918 ] SETPROPS } POSX 256 > IFELSE 30 1 SETALARM } ENDSCRIPT ENDSPOT SPOT ID 2 NAME "OutChatRoutines" OUTLINE 32,10 56,10 56,31 32,31 LOC 126,99 SCRIPT ON OUTCHAT { score GLOBAL { MOUSEPOS my = mx = ;Make sure mouse is actually on the screen! { "@" POSX ITOA + "," + POSY ITOA + "!Your mouse is off the screen!" + LOCALMSG } { my 22 - mymin = my 22 + mymax = ;set up maximum and minimum x target positions mx 22 - mxmin = mx 22 + mxmax = ;set up maximum and minimum y target positions { [ 904182671 ] SETPROPS } { [ 879852403 ] SETPROPS } POSX 256 > IFELSE "boom" SOUND ;Check for a hit. 0 i = 0 hit = { i ROOMUSER WHOPOS targy = targx = ;get user x and y { { i ROOMUSER hit = } targx mxmin > targx mxmax < AND IF } targy mymin > targy mymax < AND IF i ++ } { i NBRROOMUSERS < } WHILE ;Do this if there is a hit. { { score -- ;Decrement score for hitting yourself! [ 904326610 ] SETPROPS 5 DELAY [ 904326618 ] SETPROPS 5 DELAY [ 904326624 ] SETPROPS 5 DELAY [ 904326634 ] SETPROPS "!" USERNAME + " stupidly hit themself!" + SAY } { score ++ ;Increment score "gotcha" hit PRIVATEMSG } WHOME hit == IFELSE } ;Do this if there is not a hit. { 899439353 mx my ADDLOOSEPROP { CLEARLOOSEPROPS } 60 ALARMEXEC } hit IFELSE } mx 0 < mx 511 > OR my 0 < OR my 383 > OR IFELSE "" CHATSTR = } CHATSTR "fire" == IF ;Tell user their own score { "@" POSX ITOA + "," + POSY ITOA + "Your score is: " + score ITOA + "." + LOCALMSG "" CHATSTR = } CHATSTR "score" == IF ;Tell user everyone's score { "@" POSX ITOA + "," + POSY ITOA + "The scores are in the log!" + LOCALMSG } CHATSTR "allscores" == IF } ENDSCRIPT ENDSPOT DOOR ID 6 DONTMOVEHERE DEST 244 OUTLINE 2,353 51,353 52,381 1,381 LOC 26,367 PICTS 1,0,0 ENDPICTS ENDDOOR DOOR ID 7 DONTMOVEHERE DEST 245 OUTLINE 454,351 509,351 509,378 454,378 LOC 481,364 PICTS 2,0,0 ENDPICTS SCRIPT ON INCHAT { nDoIt GLOBAL nDoIt EXEC } ENDSCRIPT ENDDOOR ENDROOM