;Pong Room 2.0 by Hex - http://hex.palaceplanet.net ON OUTCHAT { trippin GLOBAL speed GLOBAL rise GLOBAL run GLOBAL changeDirec GLOBAL {{ rise 3 RANDOM { + } { - } 2 RANDOM IFELSE rise = run 3 RANDOM { + } { - } 2 RANDOM IFELSE run = { 15 rise = } rise 15 > IF { 15 run = } run 15 > IF { -15 rise = } rise -15 < IF { -15 run = } run -15 < IF } changeDirec DEF 1 trippin = 10 speed = 11 SETFACE 16 RANDOM SETCOLOR 20 RANDOM 10 - run = 20 RANDOM 10 - rise = "" CHATSTR = 10 ME SETALARM "You are now pongin!" LOCALMSG } CHATSTR "pong on" == IF { 0 trippin = "" CHATSTR = "You are no longer pongin!" LOCALMSG } CHATSTR "pong off" == IF { "$1" GREPSUB ATOI speed = "" CHATSTR = "Speed is now: " speed ITOA & LOCALMSG } CHATSTR "^speed ([0-9]+)$" GREPSTR IF } ON ALARM { trippin GLOBAL speed GLOBAL rise GLOBAL run GLOBAL changeDirec GLOBAL { POSX run + POSY rise + SETPOS { 0 rise 2 * - rise = changeDirec EXEC } POSY 362 >= POSY 22 <= OR IF { 0 run 2 * - run = changeDirec EXEC } POSX 490 >= POSX 22 <= OR IF speed ME SETALARM } trippin IF }