Sub when_you_die_for_ctf(index) If GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing") = 1 Then Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing", 0) If GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag") = 1 Then Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag", 0) If GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color") = 1 Then Call PutVar("CTF.ini " , "CTF", "blue_captured", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 0) Call PlayerMsg(index, "You had the Blue flag when you died... You Have Been Removed From the game. Good Luck Next Time", 2) ElseIf GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color") = 2 Then Call PutVar("CTF.ini " , "CTF", "red_captured", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 0) Call PlayerMsg(index, "You had the Red flag when you died... You Have Been Removed From the game. Good Luck Next Time", 2) End If ElseIf GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag") = 0 Then Call PlayerMsg(index, "You Didnt have the flag when you died... You Have Been Removed From the game.", 2) End If Else Call PlayerMsg(index, "I see you have once played Capture The Flag Come Play Again!", 2) End IfEnd Sub'******************************************Sub start_C_T_F_red(index)'***************'By Brutal <-- (must stay if code edited)**'******************************************On Error Resume nextDim playing_redDim players_playing_redDim color_redDim amount_needed_redDim red_start_mapDim red_start_yDim red_start_xDim red_banDim red_gamered_start_map = GetVar("CTF.ini ", "CTF", "red_start_map")red_start_x = GetVar("CTF.ini ", "CTF", "red_start_x")red_start_y = GetVar("CTF.ini ", "CTF", "red_start_y")red_ban = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "banned")playing_red = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing")color_red = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color")players_playing_red = GetVar("CTF.ini ", "CTF", "playersplayingred")amount_needed_red = GetVar("CTF.ini ", "CTF", "amountofplayersneededforred")red_game = GetVar("CTF.ini ", "CTF", "gamegoing")if red_game = 0 ThenIf red_ban = 0 Then If playing_red = 0 Then Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing", Int(1)) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 2) If players_playing_red = 0 Then players_playing_red = 1 Call PutVar("CTF.ini " , "CTF", "playersplaying", Int(players_playing_red)) Call MapMsg(GetPlayerMap(index), "There is now " & players_playing_red & " Player and you need " & amount_needed_red & " Players to start the game once there is enough players please step on the portal again to start the game!!!", 6) ElseIf players_playing_red > 0 Then Call PutVar("CTF.ini " , "CTF", "playersplaying", players_playing_red+1) Call MapMsg(GetPlayerMap(index), "There is now " & players_playing_red+1 & " Players and you need " & amount_needed_red & " Players to start the game once there is enough players please step on the portal again to start the game!!!", 6) End If ElseIf playing_red > 0 Then If color_red = 1 Then If players_playing_red = amount_needed_red Then Call PlayerWarp(index, red_start_map, red_start_x, red_start_y) Call PutVar("CTF.ini " , "CTF", "gamegoing", 1) Else If color_red = 2 Then Call PlayerMsg(index, "You Are Already Waiting for a game to start. you are the color Red going for the Blue flag", 2) Else Call PlayerMsg(index, "You Are Already Waiting for a game to start. you are the color Blue going for the Red flag", 2) End If End If Else Call PlayerMsg(index, "Get On your own portal!!!!", 2) End If End IfElseIf red_ban = 1 ThenCall PlayerMsg(index, "you have been banned do not return here until a mod unbans you...", 2)End IfElseIf red_game = 1 ThenCall PlayerMsg(index, "Sorry there is already a game going", 2)End IfEnd Sub'******************************************Sub start_C_T_F_blue(index)'***************'By Brutal <-- (must stay if code edited)**'******************************************On Error Resume nextDim playing_blueDim players_playing_blueDim color_blueDim amount_neededDim blue_start_mapDim blue_start_yDim blue_start_xDim blue_banblue_start_map = GetVar("CTF.ini ", "CTF", "blue_start_map")blue_start_x = GetVar("CTF.ini ", "CTF", "blue_start_x")blue_start_y = GetVar("CTF.ini ", "CTF", "blue_start_y")blue_ban = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "banned")playing_blue = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing")color_blue = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color")players_playing_blue = GetVar("CTF.ini ", "CTF", "playersplaying")amount_needed = GetVar("CTF.ini ", "CTF", "amountofplayersneeded")blue_game = GetVar("CTF.ini ", "CTF", "gamegoing")if blue_game = 0 Then If blue_ban = 0 Then If playing_blue = 0 Then Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing", Int(1)) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 2) If players_playing_blue = 0 Then players_playing_blue = 1 Call PutVar("CTF.ini " , "CTF", "playersplaying", Int(players_playing_blue)) Call MapMsg(GetPlayerMap(index), "There is now " & players_playing_blue & " Player and you need " & amount_needed & " Players to start the game once there is enough players please step on the portal again to start the game!!!", 6) ElseIf players_playing_blue > 0 Then Call PutVar("CTF.ini " , "CTF", "playersplaying", players_playing_blue+1) Call MapMsg(GetPlayerMap(index), "There is now " & players_playing_blue+1 & " Players and you need " & amount_needed & " Players to start the game once there is enough players please step on the portal again to start the game!!!", 6) End If ElseIf playing_blue > 0 Then If color_blue = 2 Then If players_playing_blue = amount_needed Then Call PlayerWarp(index, blue_start_map, blue_start_x, blue_start_y) Call PutVar("CTF.ini " , "CTF", "gamegoing", 1) Else If color_blue = 2 Then Call PlayerMsg(index, "You Are Already Waiting for a game to start. you are the color blue going for the red flag", 2) Else Call PlayerMsg(index, "You Are Already Waiting for a game to start. you are the color red going for the blue flag", 2) End If End If ElseIf color_blue = 1 Then Call PlayerMsg(index, "Get On your own portal!!!!", 2) End If End IfElseIf blue_ban = 1 ThenCall PlayerMsg(index, "you have been banned do not return here until a mod unbans you...", 2)End IfElseIf blue_game = 1 ThenCall PlayerMsg(index, "Sorry there is already a game going", 2)End IfEnd Sub'******************************************Sub blue_flag(index)'**********************'By Brutal <-- (must stay if code edited)**'******************************************Dim Get_ColorDim Get_Red_MapDim Get_Blue_MapDim Get_Has_FlagDim game_portals_MapDim game_portals_YDim game_portals_XDim players_playing_blue2Dim Game_OverGet_Color = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color")Get_Red_Map = GetVar("CTF.ini ", "CTF", "red_start_map")Get_Blue_Map = GetVar("CTF.ini ", "CTF", "blue_start_map")Game_Over = GetVar("CTF.ini ", "CTF", "game_over")game_portals_Map = GetVar("CTF.ini ", "CTF", "game_portals_map")game_portals_X = GetVar("CTF.ini ", "CTF", "game_portals_x")game_portals_Y = GetVar("CTF.ini ", "CTF", "game_portals_y")players_playing_blue2 = GetVar("CTF.ini ", "CTF", "playersplaying")Get_Has_Flag = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag")If Get_Color = 1 Then Call PlayerMsg(index, "You Got There Flag Now Take It Back To Your Flag and Stand UNder Yours!!! Hurry and dont die!!!", 2) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag", 1) Call MapMsg(Get_Red_Map, GetPlayerName(index) & "Has The Red Flag You Better Kill Him Red Team!!!", 15) Call MapMsg(Get_Blue_Map, GetPlayerName(index) & "Has The Red Flag You Better Kill Him Red Team!!!", 15)ElseIf Get_Color = 2 Then Get_Has_Flag = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag") If Get_Has_Flag = 1 Then Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag", 0) Call PutVar("CTF.ini ", "CTF", "game_over", 1) Call MapMsg(Get_Red_Map, GetPlayerName(index) & "Has Won The Game For The Red Team!!! Return to a flag to be warp out(a new game cannot be started while someone is in the playing field and mods can ban you from the game)", 15) Call MapMsg(Get_Blue_Map, GetPlayerName(index) & "Has Won The Game For The Red Team!!!Return to a flag to be warp out(a new game cannot be started while someone is in the playing field and mods can ban you from the game)", 15) Else If Game_Over = 1 Then If players_playing_blue2 > 1 Then Call PutVar("CTF.ini " , "CTF", "playersplaying", Int(players_playing_blue2-1)) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing", 0) Call PlayerWarp(index, game_portals_Map, game_portals_X, game_portals_Y) ElseIf players_playing_blue2 = 1 Then Call PutVar("CTF.ini " , "CTF", "playersplaying", Int(players_playing_blue2-1)) Call PutVar("CTF.ini " , "CTF", "gamegoing", 0) Call PutVar("CTF.ini " , "CTF", "gave_over", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing", 0) Call PlayerWarp(index, game_portals_Map, game_portals_X, game_portals_Y) End If ElseIf Game_Over = 0 Then Call PlayerMsg(index, "Return Once You Have The Flag!!! Or the game is over!", 2) End If End IfEnd IfEnd Sub'******************************************Sub red_flag(index)'**********************'By Brutal <-- (must stay if code edited)**'******************************************Dim Get_Color2Dim Get_Red_Map2Dim Get_Blue_Map2Dim Get_Has_Flag2Dim game_portals_Map2Dim game_portals_Y2Dim game_portals_X2Dim players_playing_blue22Dim Game_Over2Get_Color2 = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color")Get_Red_Map2 = GetVar("CTF.ini ", "CTF", "red_start_map")Get_Blue_Map2 = GetVar("CTF.ini ", "CTF", "blue_start_map")Game_Over2 = GetVar("CTF.ini ", "CTF", "game_over")game_portals_Map2 = GetVar("CTF.ini ", "CTF", "game_portals_map")game_portals_X2 = GetVar("CTF.ini ", "CTF", "game_portals_x")game_portals_Y2 = GetVar("CTF.ini ", "CTF", "game_portals_y")players_playing_blue22 = GetVar("CTF.ini ", "CTF", "playersplaying")Get_Has_Flag = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag")If Get_Color2 = 2 Then Call PlayerMsg(index, "You Got There Flag Now Take It Back To Your Flag and Stand UNder Yours!!! Hurry and dont die!!!", 2) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag", 1) Call MapMsg(Get_Red_Map, GetPlayerName(index) & "Has The Red Flag You Better Kill Him Red Team!!!", 15) Call MapMsg(Get_Blue_Map, GetPlayerName(index) & "Has The Red Flag You Better Kill Him Red Team!!!", 15)ElseIf Get_Color2 = 1 Then Get_Has_Flag2 = GetVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag") If Get_Has_Flag2 = 1 Then Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "has_flag", 0) Call PutVar("CTF.ini ", "CTF", "game_over", 1) Call MapMsg(Get_Red_Map2, GetPlayerName(index) & "Has Won The Game For The Red Team!!! Return to a flag to be warp out(a new game cannot be started while someone is in the playing field and mods can ban you from the game)", 15) Call MapMsg(Get_Blue_Map2, GetPlayerName(index) & "Has Won The Game For The Red Team!!!Return to a flag to be warp out(a new game cannot be started while someone is in the playing field and mods can ban you from the game)", 15) Else If Game_Over2 = 1 Then If players_playing_blue22 > 1 Then Call PutVar("CTF.ini " , "CTF", "playersplaying", Int(players_playing_blue22-1)) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing", 0) Call PlayerWarp(index, game_portals_Map2, game_portals_X2, game_portals_Y2) ElseIf players_playing_blue22 = 1 Then Call PutVar("CTF.ini " , "CTF", "playersplaying", Int(players_playing_blue22-1)) Call PutVar("CTF.ini " , "CTF", "gamegoing", 0) Call PutVar("CTF.ini " , "CTF", "gave_over", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "color", 0) Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CTF", "playing", 0) Call PlayerWarp(index, game_portals_Map2, game_portals_X2, game_portals_Y2) End If ElseIf Game_Over2 = 0 Then Call PlayerMsg(index, "Return Once You Have The Flag!!! Or the game is over!", 2) End If End IfEnd IfEnd Sub
Sub OnDeath(index)Dim mapnumDim xDim yDim II = GetPlayerClass(index)mapnum = GetVar("Classes\Class" & I & ".ini", "CLASS", "Map")y = GetVar("Classes\Class" & I & ".ini", "CLASS", "y")x = GetVar("Classes\Class" & I & ".ini", "CLASS", "x")Call PlayerWarp(index, mapnum, x, y)End Sub
Sub OnDeath(index)Dim mapnumDim xDim yDim II = GetPlayerClass(index)mapnum = GetVar("Classes\Class" & I & ".ini", "CLASS", "Map")y = GetVar("Classes\Class" & I & ".ini", "CLASS", "y")x = GetVar("Classes\Class" & I & ".ini", "CLASS", "x")Call PlayerWarp(index, mapnum, x, y)Call when_you_die_for_ctf(index)End Sub
'********************************Sub ScriptedTile(index, Script) '********************************Select Case Script
'<><><><><>Case 0Call start_C_T_F_red(index)'<><><><><>Case 1Call start_C_T_F_blue(index)'<><><><><>Case 2Call blue_flag(index)'<><><><><>Case 3Call red_flag(index)
[CTF]amountofplayersneeded=#replace with amount of players you want per game#red_start_map=#replace with map with the red flag#red_start_x=#replace this with an x right next to the red flag#red_start_y=#replace this with an y right next to the red flag#blue_start_map=#replace with map with the blue flag#blue_start_x=#replace this with an x right next to the blue flag#blue_start_y=#replace this with an y right next to the blue flag#playersplaying=0game_portals_map=#replace with map that the blue and red portals are on#game_portals_x=#replace with A x that the blue and red portals are on#game_portals_y=#replace with A y that the blue and red poertals are on#game_over=0gamegoing=0
[CTF]amountofplayersneeded=2red_start_map=1red_start_x=14red_start_y=1blue_start_map=1blue_start_x=13blue_start_y=1playersplaying=0game_portals_map=1game_portals_x=12game_portals_y=1game_over=0gamegoing=0