What's new

Mod Menu [GSC] GSC Scripts for PC Mod Menu's

  • Thread starter Cryptic7s
  • Start date
  • Views 2,569
C

Cryptic7s

Enthusiast
Messages
379
Reaction score
48
So, been messing around on BO3 recently, and got pretty bored. Made a few scripts, and here we ended up xD.

BO3 and BO2 aren't all that different for GSC, minus the way some things are called. Im not 100% sure what parts of my code were included to make this work, so im gonna include all of my #using headers, and go from there. Enjoy!

Change round (Credit: me):

Code:
function RoundEdit(round)
{
    self thread zm_utility::zombie_goto_round(round);
    self iprintln("Round Set To: "+round);
}
Call it in your menu as AO("Sub1", "Set Round To %roundvalue", &RoundEdit, int value for round); where %roundvalue add number, and change int value to round for function


The Claw, Big Spawnable for Zombies

Credit: Me for original released BO2 script, AgreedBog and a few others for ideas.
Me for bo3? lol
Code:
Add this to your INIT CODE:

level.BuildSpaceFull = 0;


this goes in your GSC:


function modelSpawner(origin, model, angles, time)
{
    if(isDefined(time))
        wait time;
    obj = spawn("script_model", origin);
    obj setModel(model);
    if(isDefined(angles))
        obj.angles = angles;
    if(getentarray().size >= 2000)
    {
        self iprintln("^1Error^7: Please delete some other structures");
        obj delete();
    }
    return obj;
}

function Build_TheClaw()
{
    if (level.BuildSpaceFull == 1)
    {
        self iprintlnBold("[^1ERROR]^4You Already have a Spawnable in place.");
        self playlocalsound("cac_grid_nav");
    }
    else
    {
            self thread Build_TheClaw2();
            self iprintlnBold("Spawning The Claw");
            level.BuildSpaceFull = 1;
    }
}

function Build_TheClaw2()

{

    level endon("Destroy_Claw");

    level.clawOrg = self.origin;

    pos = level.clawOrg+(0,15,460);

   

    level.ClawSeats = [];

    level.claw = [];

    level.legs = [];

   

    level.attach = modelSpawner(level.clawOrg+(0,55,60),"tag_origin");

    level.ClawLink = modelSpawner(pos,"tag_origin");

   

    for(e=0;e<2;e++) for(a=0;a<8;a++)

        level.legs[level.legs.size] = modelSpawner(level.clawOrg + (-220,-145+e*320,0) + (a*28,0,a*60),"p7_barrel_metal_55gal_blue",(25,0,90),.1);

    for(e=0;e<2;e++) for(a=0;a<8;a++)

        level.legs[level.legs.size] = modelSpawner(level.clawOrg + (220,-145+e*320,0) + (a*-28,0,a*60),"p7_barrel_metal_55gal_blue",(-25,0,90),.1);

    for(a=0;a<5;a++) for(e=0;e<8;e++)

        level.claw[level.claw.size] = modelSpawner(level.clawOrg + (0,-125+a*70,460) + (sin(-90+e*45)*25, 0, sin(e*45)*25), "p7_barrel_metal_55gal_blue", ((e*45),180,0),.1);

    for(a=0;a<8;a++) for(e=0;e<6;e++)

        level.claw[level.claw.size] = modelSpawner(level.clawOrg + (0,15,460) + (cos(a*45)*30,sin(a*45)*30, e*-70), "p7_barrel_metal_55gal_blue", (0,(a*45)+90,90),.1);

    level.claw[level.claw.size] = modelSpawner(level.clawOrg + (0,15, 60), "p7_barrel_metal_55gal_blue", (0,90,90),.1);  

    for(a=0;a<2;a++) for(e=0;e<12;e++)

        level.claw[level.claw.size] = modelSpawner(level.clawOrg + (0,15,100) + (cos(e*30)*40+a*55,sin(e*30)*40+a*55, -70), "skybox_zm_zod", (0,(e*30)+-90+a*90,0),.1);

    for(e=0;e<12;e++) level.ClawSeats[level.ClawSeats.size] = modelSpawner(level.clawOrg + (0,15,95) + (cos(e*30)*95,sin(e*30)*95, -70), "skybox_zm_zod", Undefined,.1);

   

    foreach(model in level.claw)

        model linkTo(level.ClawLink);

    foreach(model in level.ClawSeats)

        model linkTo(level.ClawLink);

   

    level.ClawLink thread ClawMovements();

    level.attach thread monitorPlayersClaw( level.ClawSeats );

}


function ClawMovements()
{

    level endon("Destroy_Claw");

    for(a=0;a>=-40;a-=2)

    {

        self rotateTo((a,self.angles[1],0),.5);

        wait .1;

    }

    for(a=a;a<=60;a+=3)

    {

        self rotateTo((a,self.angles[1],0),.5);

        wait .1;

    }

    for(a=a;a>=-80;a-=3)

    {

        self rotateTo((a,self.angles[1],0),.5);

        wait .05;

    }

    for(a=a;a<=100;a+=4)

    {

        self rotateTo((a,self.angles[1],0),.5);

        wait .05;

    }

    while(true)

    {

        for(a=a;a>=-105;a-=5)

        {

            self rotateTo((a,self.angles[1],0),.5);

            wait .05;

        }

        for(a=a;a<=105;a+=5)

        {

            self rotateTo((a,self.angles[1],0),.5);

            wait .05;

        }

        wait .05;

    }

}

function monitorPlayersClaw(Array)
{

    level endon("Destroy_Claw");

    level.ClawTrig = spawnTrig(self.origin,150,80,"HINT_NOICON","Press &&1 To Enter / Exit The Claw!");

    while(isDefined(self))

    {

        level.ClawTrig waittill("trigger",i);

        if(i useButtonPressed() && !i.riding)

        {

            RandSeat = RandomIntRange( 0, 13 );

            if(!RandSeat.occupied)

            {

                i setStance("stand");

                i.riding = true;

                i playerLinkToDelta(Array[RandSeat]);

                i thread playerExitClaw(RandSeat);

                RandSeat.occupied = true;

            }

        }

    }

}

function playerExitClaw(seat,info)
{

    level endon("Destroy_Claw");

    while(isDefined(seat))

    {

        if(self fragButtonPressed()) break;

        wait .05;

    }

    info destroy();

    self allowSprint(true);

    self allowProne(true);

    seat.occupied = undefined;

    self unlink();

    self setStance("stand");

    wait 1;

    self.riding = undefined;

}
 
function createRoll( divide )
{

    roll = self getPlayerAngles()[1];

    wait 0.05;

    return (((roll-self getPlayerAngles()[1])*-6) / divide);

}

function calcDistance(speed,origin,moveTo)
{

    return (distance(origin, moveTo) / speed);

}

function spawnTrig(origin,width,height,cursorHint,string)
{

    trig = spawn("trigger_radius", origin, 1, width, height);

    trig setCursorHint(cursorHint, trig);

    trig setHintString( string );

    trig setvisibletoall();

    return trig;

}

function rotateEntYaw(yaw,time)
{

    while(isDefined(self))

    {

        self rotateYaw(yaw,time);

        wait time;

    }

}  

function SpawnPlayFx(Fx,pos,ID,Delay,DelayFx)
{  
    if(getentarray().size <= 2000)

    {

        if(!isDefined(pos))

            pos = (0,0,0);

        if(isDefined(Delay))

            wait Delay;

           

        if(ID == "Loop")

            level.SpawnedFx[level.SpawnedFx.size] = PlayLoopedFX(level._effect[Fx], DelayFx, (self.origin + (pos)));

        if(ID == "Normal")

            level.SpawnedFx[level.SpawnedFx.size] = spawnFx(level._effect[Fx], (self.origin + (pos)));

        triggerFx(level.SpawnedFx[level.SpawnedFx.size-1]);

    }  

}

Also, add these to your #using headers, and replace not necessary ones. Not sure which ones I used.

Code:
#using scripts\codescripts\struct;

#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#using scripts\shared\array_shared;
#using scripts\shared\aat_shared;
#using scripts\shared\math_shared;
#using scripts\shared\hud_util_shared;
#using scripts\shared\hud_message_shared;
#using scripts\zm\_zm_powerup_nuke;
#using scripts\zm\_zm_powerups;
#using scripts\shared\_oob;
#using scripts\shared\util_shared;
#using scripts\zm\_zm_game_module;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_score;


#insert scripts\shared\shared.gsh;
#precache("model", "p7_barrel_metal_55gal_blue"); //required for The Claw
#namespace clientids;
 
Top Bottom