// =============================================================================== // DESCRIPTION: Abstract class for game // CALLED BY: // PARAMS: // TYPE: Server-Side // =============================================================================== // Init ========================================================================== @INIT if [__debug == 1] goto DEBUG goto SCRIPT // =============================================================================== // Debug ========================================================================= @DEBUG Echo #__debug_prefix#"Calling script _SVR_GAME" goto SCRIPT // =============================================================================== // Script ======================================================================== @SCRIPT if [__debug == 1] Echo #__debug_prefix#"Calling method _SVR_GAME::"#GetScriptParam(::)# goto #GetScriptParam(::)# goto EOF @RESET Set __game_blocking true Set __reset_max_idx [__clients_max_idx + 50] Set parter_idx 0 goto PARTER goto EOF @RESET_JOIN Set joiner_idx 0 Set __join_max_idx [__clients_max_idx + 50] sleep 1000 goto JOINER goto EOF @PARTER Set _tmp_index #GetIndexFromClientNum(|#parter_idx|#)# if [_tmp_index > 0] "ExecScript _SVR_PLAYER :: PART clientid #parter_idx#; sleep 100" @nextParter Set parter_idx [parter_idx + 1] if [parter_idx < __reset_max_idx] "goto PARTER" goto RESET_JOIN goto EOF @JOINER Set _tmp_index #GetIndexFromClientNum(|#joiner_idx|#)# if [_tmp_index > 0] "ExecScript _SVR_PLAYER :: JOIN clientid #joiner_idx#; sleep 100" @nextJoiner Set joiner_idx [joiner_idx + 1] if [joiner_idx < __join_max_idx] "goto JOINER" Set __game_blocking false goto #GetScriptParam(do)# goto EOF @START if [__game_started] goto EOF if [__game_blocking] goto EOF if [__clients < __start_game_min] goto EOF Set __game_started true ExecScript __FRAME_LOOP :: START_PROGRESS SendMessage -1 "^r[DUAL ARENA] ^y Game has STARTED!" ExecScript _SVR_POWERUP :: CREATE_ALLY_RECALL location 0 goto EOF @STOP if [! __game_started] goto EOF if [__game_blocking] goto EOF Set __game_started false ExecScript __FRAME_LOOP :: STOP_PROGRESS SendMessage -1 "^r[DUAL ARENA] ^y Game has ended!" goto EOF @WINNER SendMessage -1 "^r[DUAL ARENA] ^y WINNER! TEAM"#GetScriptParam(teamidx)#" WINS! respawning in 5 seconds." ExecScript _SVR_GAME :: STOP sleep 5000 ExecScript _SVR_GAME :: RESET goto EOF @EOF