Results 1 to 1 of 1
  1. #1
    Red X Clan
    Join Date
    Jun 2011
    Location
    pluto
    Posts
    264
    Points
    228
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Location
    pluto
    Posts
    264
    Points
    228

    Default protect the king should be updated

    ok so it seems that protect the king was made like 2 months ago and was never updated like it was posed to. so i wonder if anyone would take the time to update it ect. so we have a fully working one. here is the script that was posted a while back and if im correct the guns need to cycle like they should and the king needs to be updated so you know who the king is from a past video i seen.

    Code:
    #include common_scripts\utility;
    #include custom_scripts\_utility;
    
    #include maps\mp\_utility;
    
    #include maps\mp\gametypes\_hud_util;
    
    
    init()
    {
            thread onPlayerConnect();
            thread onPlayerConnected();
            thread setDecision();
            thread globalVariables();
    }
    
    onPlayerConnect()
    {       
            for(;;)
            {
                    level waittill( "connecting", player );
    
                    player thread onPlayerSpawned();
                    player thread onJoinedSpectators();
                    player thread playerVariables();
            }
    }
    
    onPlayerConnected()
    {       
            for(;;)
            {
                    level waittill( "connected", player );
                    player thread displayHP();
                    player thread playerVariables();
                    player thread setupGame();
                    player thread ifKingKilled();
                    player thread ifGuardKilled();
            }
    }
    
    onPlayerSpawned()
    {
            for(;;)
            {
                    self waittill( "spawned_player" );
            }
    }
    
    onJoinedSpectators()
    {
            self endon( "disconnect" );
            
            for(;;)
            {
                    self waittill( "joined_spectators" );
            }
    }
    
    playerVariables()
    {
            for(;;)
            {
                    self waittill( "spawned_player" );
    
                    if( self.playerStatus == "guard" && self.team == "allies" )
                    {
                            self thread guardSettings();
                            self maps\mp\gametypes\_hud_message::hintMessage("Defend the King");
                    }
                    else if( self.playerStatus == "king" && self.team == "allies" )
                    {
                            self thread kingSettings();
                            self thread infCrossbow();
                            self maps\mp\gametypes\_hud_message::hintMessage("You are the King");
                    }
                    else if( self.playerStatus == "ninja" && self.team == "axis" )
                    {
                            self thread ninjaSettings();
                            self maps\mp\gametypes\_hud_message::hintMessage("Kill the King, He's on the Radar");
                    }
                    else if( self.playerStatus == "ninja" && self.team == ( "allies" || "spectator" || "none" || undefined ) )
                    {
                            self.playerStatus = "ninja";
                            self notify( "menuresponse", game["menu_team"], "axis" );
                    }
                    else if( self.playerStatus == "guard" && self.team == ( "allies" || "spectator" || "none" || undefined ) )
                    {
                            self.playerStatus = "guard";
                            self notify( "menuresponse", game["menu_team"], "allies" );
                    }
            }
    }
    
    setupGame()
    {
            if( self.team == ( "axis" || "spectator" || "none" || undefined ) )
            {
                    self notify( "menuresponse", game["menu_team"], "allies" );
                    wait 0.2;
            }
            else if( self.team == ( "allies" ) )
            {
                    wait 0.2;
            }
    
            self.playerStatus = "guard";
            self setMoveSpeedScale( 1.0 );
    }
    
    setDecision()
    {
            setupText = createServerFontString( "objective", 1.5 );
            setupText defineElement( ( 1, 1, 1 ), false, "center", "middle", 0, 40, 1, 1001 );
    
            timeRemaining = "^5Setting Up Game: ^7";
    
            for( i = 30; i > 0; i-- )
            {
                    setupText setText( timeRemaining + i );
    
                    wait 1.0;
            }
    
            setupText destroy();
    
            wait 0.5;
    
            //ninja decision
            level thread pickedNinja();
            wait 0.2;
    
            //waiting...
            wait 0.5;
    
            //king decision
            level thread pickedKing();
            wait 0.2;
            
            self iPrintlnBold("^5Game has Officially Started");
    }
    
    globalVariables()
    {
            self setClientDvar( "cg_brass", 0 );
            self setClientDvar( "g_maxDroppedWeapons", 0 );
            self setClientDvar( "scr_game_forceuav", 0 );
            self setClientDvar( "sv_cheats", 0 );
    
            setDvar( "g_TeamName_Allies", "King & Guards" );
            setDvar( "g_TeamName_Axis", "Ninjas" );
            setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
            setDvar( "scr_disable_weapondrop", 1 );
    }
    
    //Weapons and Etc.
    
    guardSettings()
    {
            startingWeapon = "commando_mp";
    
            self takeAllWeapons();
            self clearPerks();
            self giveWeapon( startingWeapon );
            self giveMaxAmmo( startingWeapon );
            self switchToWeapon( startingWeapon );
            self giveWeapon( "frag_grenade_mp" );
            self giveWeapon( "knife_mp" );
            self setPerk( "specialty_pistoldeath" );
            self setPerk( "specialty_finalstand" );
            self setPerk( "specialty_scavenger" );
    }
    
    kingSettings()
    {
            kingWeapon = "crossbow_explosive_mp";
    
            self takeAllWeapons();
            self clearPerks();
            self giveWeapon( kingWeapon );
            self giveMaxAmmo( kingWeapon );
            self switchToWeapon( kingWeapon );
            self giveWeapon( "knife_mp" );
            self setPerk( "specialty_loudenemies" );
            self setPerk("specialty_showonradar");
            self.maxHealth = 200;
            self.health = 200;
    
            //self attach("t5_weapon_acoustic_sensor_world_detect", "tag_eye", false);
    }
    
    ninjaSettings()
    {
            ninjaWeapon = "l96a1_mp";
    
            self takeAllWeapons();
            self clearPerks();
            self giveWeapon( ninjaWeapon );
            self giveMaxAmmo( ninjaWeapon );
            self switchToWeapon( ninjaWeapon );
            self giveWeapon( "knife_mp" );
            self giveWeapon( "tabun_gas_mp" );
            self setPerk( "specialty_loudenemies" );
            self setPerk( "specialty_scavenger" );
            
            self setMoveSpeedScale( 1.5 );
    }
    
    infCrossbow()
    {
            self endon( "map_restarting" );
    
            for(;;)
            {
                    self waittill( "weapon_fired" );
    
                    weapon = self getCurrentWeapon();
                    ammo_left = self getWeaponAmmoClip( weapon );
                    new_ammo = self getWeaponAmmoStock( weapon );
    
                    if( ammo_left != new_ammo )
                    {
                            self setWeaponAmmoClip( weapon, new_ammo );
                            wait 1;
                    }
            }
    }
    
    //If Killed Functions
    
    ifGuardKilled()
    {
            for(;;)
            {
                    self waittill( "death" );
    
                    if( self.playerStatus == "guard" && self.team == "allies" )
                    {
                            self.playerStatus = "ninja";
                            self notify( "menuresponse", game["menu_team"], "axis" );
                            wait 0.2;
                    }
            }
    }
    
    ifKingKilled()
    {
            for(;;)
            {
                    self waittill( "death" );
    
                    if( self.playerStatus == "king" && self.team == "allies" )
                    {
                            wait 0.2;
                            iPrintln("^2King was killed!");
                            thread maps\mp\gametypes\_globallogic::forceEnd( false );
                    }
            }
    }
    
    //Misc.
    
    displayHP()
    {
            self.displayHP = self createFontString( "objective", 1.40 );
            self.displayHP  setPoint( "TOPRIGHT", "TOPRIGHT", 0, 10 );
    
            while( 1 )
            {
                    self.displayHP setText( "^1Health: " + self.health + "/" + self.maxHealth );
                    wait 1.0;
            }
    }
    
    pickedNinja()
    {
            ninja = randomIntRange( 0, level.players.size );
    
            level.players[ninja].playerStatus = "ninja";
            level.players[ninja] suicide();
            level.players[ninja] notify( "menuresponse", game["menu_team"], "axis" );
            //tells who's Ninja
            iPrintln(level.players[ninja].name + " is Ninja");
    }
    
    pickedKing()
    {
            king = randomIntRange( 0, level.players.size );
    
            level.players[king].playerStatus = "king";
            level.players[king] thread kingSettings();
            level.players[king] thread infCrossbow();
            //tells who's King
            iPrintln(level.players[king].name + " is King");
    }
    by the looks this is what it should do and maybe someone can just port this from pc since it hasnt been done might be easier to edit from there.

    Code:
    Teams
    There are 2 teams, the Guards (Inclusive the king) and the Ninja's.
    When the game starts a counter will start and a king will be picked.
    Straight after that another counter will be started and the first ninja will be picked.
    We also changed the icons for teams.
    
    Guards
    
    Objective
    Protecting the king from getting killed by a ninja.
    
    Loadout
    Weapons: Guards start with a pistol, they can upgrade there weapon by getting kills, 
    after a while they reach the best upgraded weapon. (Minigun)
    
    Other: Last Stand Pro, C4 X2
    Health: 100
    Killstreaks: Mortar at 10 Kills, Napalm at 2 revives
    Terminator mode: One guard gets randomly picked as a terminator during the match and 
    will get the grim reaper.
    Model: Flack Jacket model
    Shop: In the map are randomweaponboxes & juggernaugh machines, 
    by spending 500 points (from there score) they can buy one of these things.
    Other facts:
    -If a guard gets shot by a ninja he will respawn as a ninja.
    -If a guard dies close-range with the king he will still respawn as a guard.
    
    Ninjas
    
    Objective
    Killing the king.
    
    Loadout
    Weapons: All ninjas spawn with a L96A1 Sniper Rifle
    Other: The first ninja gets instant tomahawk on spawn.
    Health: 200
    Killstreaks: 2 Kills = Tomahawk, 3 Kills = RCXD, 5 Kills = Dog
    Model: Guilli suit.
    Other facts:
    -If a ninja gets killed by the king he will return as a guard.
    -If a ninja gets killed by a guard he will stay ninja.
    -The ninja that kills the king, will be chosen as king the next round.
    
    the King
    
    Objective
    Hiding/Staying alive
    
    Loadout
    Weapons: A golden Crossbow with infinite crossbow bolts.
    Other: A camera spike, Last stand pro
    Health: 300
    Model: Flack jacket model with a Motion sensor as crown!
    Icon: A defend icon above head and on the minimap a green circle.
    Battlechatter menu: The king can activate a ''aim'' operated shoutout menu by holding F, 
    after that he has to point his view into the right direction to shout someting such 
    as ''ENEMY", or "SNIPER".
    Other facts:
    -A king can't buy stuff.
    
    VIP's
    Extras:
    -Increased health
    -An easier gun-traject when guard, starting with an SMG + only need 3 kills for getting minigun.
    -Ability to open the adminmenu.
    -Icon above head showing they are vip's.
    -Always have tomahawk on ninja team.
    
    HUD TEXT
    -Welcome text and little objective hint.
    -List of features and playername.
    -A newsbar showing off text and explaining the mod.
    
    ADMINMENU
    The host can open an mouse-operated admin menu by pressing '4' and standing.
    Options:
    
    Players -->
    - Give Weapon
    - Slay, Ban, Kick
    - Say someting stupid
    - Change team
    
    Map -->
    - Change map
    - Change mode
    idk if anyone is willing to take time to edit it but to me it would be a nice game mode that everyone likes.

    0 Not allowed! Not allowed!
    Last edited by xREXx; 08-12-2011 at 12:23 PM.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 10:45 PM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.