BO3 Code List

broken avatar :(
Created 1083 days ago
by Cxwh
0 Members and 1 Guest are viewing this topic.
4,070 views
broken avatar :(
×
broken avatar :(
Location: at
Date Registered: 26 November 2016
Last active: 448 days ago
Posts
45
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Signature
12 year old music critic, quadrasexual Minecrafter, Linkin Park fan, Hentai enthusiast, intelligent atheist and vegan.
×
Cxwh's Groups
Cxwh's Contact & Social LinksCxwhModsGodAspire
First
This is a list of everything you'd need for scripting. I will update the thread to add or fix things. On a side note: I tested the game for overflow errors and at first I thought that BO3 doesn't even have stringtables, but I eventually got an error. The string limit is 2048 and 26 for uiElements.

Code List:

Lists/Dumps

Sorry but you are not allowed to view spoiler contents.

Fonts

Sorry but you are not allowed to view spoiler contents.

Button Codes

Sorry but you are not allowed to view spoiler contents.

Math Functions

Sorry but you are not allowed to view spoiler contents.

Type Identifiers

Sorry but you are not allowed to view spoiler contents.

Game Session Settings

Sorry but you are not allowed to view spoiler contents.

Death Types

Sorry but you are not allowed to view spoiler contents.

Weapon Fields

Sorry but you are not allowed to view spoiler contents.

GSC Functions

Sorry but you are not allowed to view spoiler contents.

GSC Methods

Sorry but you are not allowed to view spoiler contents.

CSC Functions

Sorry but you are not allowed to view spoiler contents.

CSC Methods

Sorry but you are not allowed to view spoiler contents.

Some Random Functions

[Spoiler]
Godmode (toggle)
function god_mode()
{
    if(!isDefined(self.god_mode))
    {
        self.god_mode = true;
        self enableInvulnerability();
        self iprintln("God Mode: [^2ON^7]");
    }
    else
    {
        self.god_mode = undefined;
        self disableInvulnerability();
        self iprintln("God Mode: [^1OFF^7]");
    }
}

Change Map
Map(mapname, true);

Restart Map
Map_Restart(true);

Remove Deathbarrier
function deathBarrier()
{
ents = getEntArray();
for(index = 0; index < ents.size; index++)
{
    if(isSubStr(ents[index].classname, "trigger_hurt"))
    ents[index].origin = (0, 0, 9999999);
}
}

Ban and Kick Player
ban(player GetEntityNumber()); //just means the player won't be able to join back
kick(player GetEntityNumber());

Disable Cheats
//CabCon

//add this to the very bottom of your mapname.gsc
function disable_cheats()
{
    ModVar("god", 0);
    ModVar("demigod", 0);
    ModVar("noclip", 0);
    ModVar("ufo", 0);
    ModVar("give", 0);
    ModVar("notarget", 0);
}

//put this right below main
level disable_cheats();

Unlimited Ammo (toggle)
//CabCon
function unlimited_ammo()
{
    if(!isDefined(self.unlim_ammo))
    {
        self notify("unlim_ammo");
        self thread restock_ammo();
        self iprintln("Unlimited Ammo: [^2ON^7]");
        self.unlim_ammo = true;
    }
    else
    {
        self notify("stop_ammo");
        self.unlim_ammo = undefined;
        self iprintln("Unlimited Ammo [^1OFF]");
    }
}

function restock_ammo()
{
    self endon("unlim_ammo");

    for(;;)
    {
        if(self.unlim_ammo)
        {
            if (self getcurrentweapon() != "none")
            {
                self setweaponammostock( self getcurrentweapon(), 1337 );
                self setweaponammoclip( self getcurrentweapon(), 1337 );
            }
        }
        wait 0.1;
    }
}

Multiplayer movement
//doesn't work on soe as far as I know (probably something with zones idk)
function newMovment()
{
    SetDvar("doublejump_enabled", 1);
    SetDvar("juke_enabled", 1);
    SetDvar("playerEnergy_enabled", 1);
    SetDvar("wallrun_enabled", 1);
    SetDvar("sprintLeap_enabled", 1);
    SetDvar("traverse_mode", 1);
    SetDvar("weaponrest_enabled", 1);
}

Forge Mode (toggle)
//Joker and NGU
function togge_forge()
{
    if(!self.forge_mode)
    {
        self thread forge_mode();
        self iPrintln("Forge Mode: [^2ON^7]\nHold [{+speed_throw}] to move objects");
        self.forge_mode = true;
    }
    else
    {
        self notify("forge_mode");
        self iPrintln("^7Forge Mode: [^1OFF^7]");
        self.forge_mode = false;
    }
}

function forge_mode()
{
    self endon("death");
    self endon("forge_mode");
    for(;;)
    {
        while(self adsbuttonpressed())
        {
            trace = bulletTrace(self GetTagOrigin("j_head"), self GetTagOrigin("j_head") + anglesToForward(self GetPlayerAngles())*1000000, true, self);
            while(self adsbuttonpressed())
            {
                trace["entity"] setOrigin(self GetTagOrigin("j_head") + anglesToForward(self GetPlayerAngles())*200);
                trace["entity"].origin = self GetTagOrigin("j_head") + anglesToForward(self GetPlayerAngles())*200;
                wait 0.05;
            }
        }
        wait 0.05;
    }
}

Disable Player Collision (toggle)
function toggle_player_collision()
{
    if(!isDefined(level.player_collision))
    {
        self thread set_player_collision(false);
        self iPrintln("Forge Mode [^2ON^7]\nHold [{+speed_throw}] to move objects");
        self.player_collision: = true;
    }
    else
    {
        self thread set_player_collision(true);
        self iPrintln("^7Forge Mode: [^1OFF^7]");
        self.player_collision = undefined;
    }
}

function set_player_collision(bool, include_self = true)
{
players = getPlayers(self.team);
for(i = 0; i < players.size; i++)
{
if(players[i] == self && !include_self)
continue;

players[i] SetPlayerCollision(bool);
}
}

Unlimited Boost (toggle)
//Aspire
function toggle_boost()
{
if(!isDefined(self.toggle_boost))
{
self thread maintain_boost();
self iPrintln("Unlimited Boost: [^2ON^7]");
self.toggle_boost = 1;
}
else
{
self notify("unlim_boost");
self iPrintln("Unlimited Boost: [^1OFF]");
self.toggle_boost = undefined;
}
}

function maintain_boost()
{
self endon("unlim_boost");

for(;;)
{
if(isDefined(self) && isAlive(self))
{
if(self IsPlayerDoubleJumping())
{
self SetDoubleJumpEnergy(100);
wait 0.05;
}
}
wait 0.05;
}
}

Healthbar (toggle)
//CabCon
function toggle_healthbar()
{
if(!isDefined(self.healthbar))
{
self thread healthbar();
self iPrintln("Unlimited Boost: [^2ON^7]");
self.healthbar = 1;
}
else
{
self notify("health_bar");
self.health_bar destroy();
self.health_text destroy();

self iPrintln("Unlimited Boost: [^1OFF^7]");
self.healthbar = undefined;
}
}

function healthbar()
{
    self endon("disconnect");
    x = 80;
    y = 40;
    self.health_bar = newClientHudElem( self );
    self.health_bar.x = x + 80;
    self.health_bar.y = y + 2;
    self.health_bar.alignx = "left";
    self.health_bar.aligny = "top";
    self.health_bar.horzalign = "fullscreen";
    self.health_bar.vertalign = "fullscreen";
    self.health_bar.alpha = 1;
    self.health_bar.foreground = 1;
    self.health_bar setshader( "black", 1, 8 );
    self.health_text = newClientHudElem( self );
    self.health_text.x = x + 80;
    self.health_text.y = y;
    self.health_text.alignx = "left";
    self.health_text.aligny = "top";
    self.health_text.horzalign = "fullscreen";
    self.health_text.vertalign = "fullscreen";
    self.health_text.alpha = 1;
    self.health_text.fontscale = 1;
    self.health_text.foreground = 1;

    if(!isDefined(self.maxhealth) || self.maxhealth <= 0)
        self.maxhealth = 100;
    self thread update_healthbar();
}

function update_healthbar()
{
self endon("health_bar");
for(;;)
    {
        wait 0.05;
        width = (self.health / self.maxhealth) * 300;
        width = int( max(width, 1) );

        self.health_bar setshader("black", width, 8);
        self.health_text setvalue(self.health);
    }
}
Last Edit: December 17, 2016, 05:14:21 pm by Cxwh
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 24 June 2016
Last active: 1069 days ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
morphiac's Groups
morphiac's Contact & Social Links
Thanks!, +1

 

Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Twitch
Loading ...