What's new

Discussion [Release] Universal Lunar Landers [Updated]

  • Thread starter coolbunnymodz
  • Start date
  • Views 929
C

coolbunnymodz

The Original Bunny
Messages
4,383
Reaction score
1,307
Here is the code from my upcoming strategy lobby for Universal Landers. I'll update the code later with the exact positions and a full code that you can just copy and paste to use for all maps, but for now, here is just the code and the arguments, so you can mess around with them yourself. Enjoy!

Code has been updated, just copy and paste!



Picture of Universal Lander in Shi No Numa

How to Use
Code:
self thread universalLunarLanders(pad,panel,pov1,pov2);
pad = Lunar Lander Pad Model
panel = Lunar Lander Control Panel Model
pov1 = Start Location
pov2 = End Location

Code for All 4 Maps

Code:
doLander(){
if(getMap()=="nzf")
    self thread doLunarLander("zombie_teleporter_pad","zombie_teleporter_control_panel",(52, -440, -1.2),(292, -1737, 52));
if(getMap()=="nzs")
    self thread doLunarLander("static_peleliu_palette","zombie_sumpf_zipcage_box",(9208, 1250, -650),(10988, -1755, -738));
if(getMap()=="nza")
    self thread doLunarLander("zombie_treasure_box","zombie_ammocan",(1380, 181, 64),(-490, 899, 226));
    self thread doLunarLander("zombie_treasure_box","zombie_ammocan",(1198, -592, 64),(-267, -542, 226));
if(getMap()=="nzp")
    self thread doLunarLander("zombie_treasure_box","zombie_ammocan",(6, -752, 6),(882, 874, 142));
}
doLunarLander(pad,panel,pov1,pov2){
self thread universalLunarLanders(pad,panel,pov1,pov2);
}


Code:
universalLunarLanders(pad,panel,pov1,pov2)
{
    lunar = [];
    lunar[0] = spawnStruct();
    lunar[0] = spawnSM(pov1, pad);
    lunar[1] = spawnSM(pov1, pad, (-180, 0, 0));
    if(getMap()=="nzf"){
    playFx(level._effect["zombie_flashback_american"], lunar[0].origin);
    playFx(level._effect["zombie_flashback_american"], pov2);
    }
    if(getMap()=="nzs"){
        self thread s_effect_();
    }
    lunar[1] linkTo(lunar[0]);
    lunar[0].seat = [];
    for(m = 0; m < 4; m++)
        lunar[0].seat[m] = spawnStruct();
    lunar[0].seat[0] = spawnSM(lunar[0].origin+(0, 50, 20), "tag_origin");
    lunar[0].seat[1] = spawnSM(lunar[0].origin+(0, -50, 20), "tag_origin");
    lunar[0].seat[2] = spawnSM(lunar[0].origin+(50, 0, 20), "tag_origin");
    lunar[0].seat[3] = spawnSM(lunar[0].origin+(-50, 0, 20), "tag_origin");
    for(m = 0; m < lunar[0].seat.size; m++)
    {
        lunar[0].seat[m] linkTo(lunar[0]);
        lunar[0].seat[m].occupied = false;
    }
    lunar[0].ctrlPanel = [];
    lunar[0].ctrlPanel[0] = spawnSM(lunar[0].origin+(0, -8, 40), panel);
    lunar[0].ctrlPanel[1] = spawnSM(lunar[0].origin+(0, 8, 40), panel, (0, 180, 0));
    for(m = 0; m < lunar[0].ctrlPanel.size; m++)
        lunar[0].ctrlPanel[m] linkTo(lunar[0]);
    lunar[0].trig = [];
    lunar[0].trig[0] = spawnTrig(lunar[0].origin, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
    lunar[0].trig[1] = spawnTrig(pov2, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Call Lunar Lander!");
    lunar[0].trig[0] thread lunarThink(lunar[0],pov1,pov2);
    lunar[0].trig[1] thread lunarThink(lunar[0],pov1,pov2);
    lunar[0].pos = "spawn";
}
 
lunarThink(lunar,pov1,pov2)
{
    for(;;)
    {
        self waittill("trigger", m);
        if(m useButtonPressed() && !m.is_zombie && !isDefined(m.revivetrigger) && !isDefined(lunar.isMoving) && !isDefined(level.lunarCooling))
        {
            time = 0;
            while(m useButtonPressed())
            {
                time+= .05;
                if(!m useButtonPressed())
                    break;
                if(time >= .3)
                {
                    distance1 = distance(m.origin, pov1); //start
                    distance2 = distance(m.origin, pov2); //second pos
                    if(lunar.pos == "spawn"){
                        pos1 = distance1; pos2 = distance2;}
                    else{
                        pos1 = distance2; pos2 = distance1;}
 
                    if(pos1 < pos2)
                    {
                        if(m.score < 750){
                            m playSound("plr_"+m getEntityNumber()+"_vox_nomoney_perk_0");
                            break;}
                        else
                            m maps\_zombiemode_score::minus_to_player_score(150);
                    }
                    lunar.isMoving = true;
                    for(e = 0; e < getPlayers().size; e++)
                        if(distance(getPlayers()[e].origin, lunar.origin) < 100)
                        {
                            getPlayers()[e] enableGodMode();
                            getPlayers()[e] playerLinkTo(lunar.seat[getPlayers()[e] getEntityNumber()]);
                            getPlayers()[e].isOnLunar = true;
                        }
                    if(lunar.pos == "spawn") lunar thread lunarSpawn2Courtyard(pov2);
                    else lunar thread lunarCourtyard2Spawn(pov1);
                    wait 8.5;
                    for(e = 0; e < getPlayers().size; e++)
                        if(isDefined(getPlayers()[e].isOnLunar))
                        {
                            getPlayers()[e] disableGodMode();
                            getPlayers()[e] unlink();
                            getPlayers()[e].isOnLunar = undefined;
                        }
                    lunar.isMoving = undefined;
                }
                wait .05;
            }
        }
    }
}
 
lunarSpawn2Courtyard(pov2)
{
    self.pos = "courtyard";
    self.trig[0] setHintString("Lunar Lander Is In Use!");
    self.trig[1] setHintString("Lunar Lander Is In Use!");
    self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    wait 3;
    self moveTo(pov2 + (0,0,200), 3, .5, 1);
    self rotateTo((5, 0, 10), 1, 0, .5);
    self rotateTo((0, 0, 0), 1);
    wait 3;
    self moveTo(pov2, 3, .5, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    self.trig[0] setHintString("Lunar Lander Is Cooling...");
    self.trig[1] setHintString("Lunar Lander Is Cooling...");
    level.lunarCooling = randomIntRange(15, 30);
    wait(level.lunarCooling);
    level.lunarCooling = undefined;
    self.trig[0] setHintString("Press & Hold &&1 To Call Lunar Lander");
    self.trig[1] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
}
 
lunarCourtyard2Spawn(pov1)
{
    self.pos = "spawn";
    self.trig[0] setHintString("Lunar Lander Is In Use!");
    self.trig[1] setHintString("Lunar Lander Is In Use!");
    self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    wait 3;
    self moveTo(pov1 + (0, 0, self.origin[2]), 3, .5, 1);
    self rotateTo((-5, 0, -10), 1, 0, .5);
    wait 2;
    self rotateTo((0, 0, 0), 1);
    wait 1;
    self moveTo(pov1, 3, 0, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    wait 3;
    self.trig[0] setHintString("Lunar Lander Is Cooling...");
    self.trig[1] setHintString("Lunar Lander Is Cooling...");
    level.lunarCooling = randomIntRange(15, 30);
    wait(level.lunarCooling);
    level.lunarCooling = undefined;
    self.trig[0] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
    self.trig[1] setHintString("Press & Hold &&1 To Call Lunar Lander");
}
 
spawnTrig(origin, width, height, cursorHint, string)
{
    trig = spawn("trigger_radius", origin, 1, width, height);
    trig setCursorHint(cursorHint);
    trig setHintString(string);
    return trig;
}
 
s_effect_(){
    for(;;){
        playFx(level._effect["lightning_dog_spawn"], (9208, 1250, -650));
        playFx(level._effect["lightning_dog_spawn"], (10988, -1755, -738));
        wait 3;
    }
}
 
//Functions Needed
spawnSM(origin, model, angles)
{
    level.modelsSpawns++;
    ent = spawn("script_model", origin);
    ent setModel(model);
    if(isDefined(angles))
        ent.angles = angles;
    return ent;
}
getMap()
{
    if(level.script == "nazi_zombie_prototype")
        return "nzp";
    if(level.script == "nazi_zombie_asylum")
        return "nza";
    if(level.script == "nazi_zombie_sumpf")
        return "nzs";
    if(level.script == "nazi_zombie_factory")
        return "nzf";
    return "";
}
enableGodMode()
{
    self enableInvulnerability();
}
 
disableGodMode()
{
    self disableInvulnerability();
}
 
Last edited:
E

Erza

Kieran Lavigne
Messages
236
Reaction score
109
You can clearly see that the picture is photoshop'd and the code is actually a RAT.
 
C

coolbunnymodz

The Original Bunny
Messages
4,383
Reaction score
1,307
You can clearly see that the picture is photoshop'd and the code is actually a RAT.

You and your kin shall perish for slandering my good name.
 
C

coolbunnymodz

The Original Bunny
Messages
4,383
Reaction score
1,307
Code has been updated for all 4 maps!

Code:
doLander(){
if(getMap()=="nzf")
    self thread doLunarLander("zombie_teleporter_pad","zombie_teleporter_control_panel",(52, -440, -1.2),(292, -1737, 52));
if(getMap()=="nzs")
    self thread doLunarLander("static_peleliu_palette","zombie_sumpf_zipcage_box",(9208, 1250, -650),(10988, -1755, -738));
if(getMap()=="nza")
    self thread doLunarLander("zombie_treasure_box","zombie_ammocan",(1380, 181, 64),(-490, 899, 226));
    self thread doLunarLander("zombie_treasure_box","zombie_ammocan",(1198, -592, 64),(-267, -542, 226));
if(getMap()=="nzp")
    self thread doLunarLander("zombie_treasure_box","zombie_ammocan",(6, -752, 6),(882, 874, 142));
}
 
doLunarLander(pad,panel,pov1,pov2){
    self thread universalLunarLanders(pad,panel,pov1,pov2);
}
 
universalLunarLanders(pad,panel,pov1,pov2)
{
    lunar = [];
    lunar[0] = spawnStruct();
    lunar[0] = spawnSM(pov1, pad);
    lunar[1] = spawnSM(pov1, pad, (-180, 0, 0));
    if(getMap()=="nzf"){
    playFx(level._effect["zombie_flashback_american"], lunar[0].origin);
    playFx(level._effect["zombie_flashback_american"], pov2);
    }
    if(getMap()=="nzs"){
        self thread s_effect_();
    }
    lunar[1] linkTo(lunar[0]);
    lunar[0].seat = [];
    for(m = 0; m < 4; m++)
        lunar[0].seat[m] = spawnStruct();
    lunar[0].seat[0] = spawnSM(lunar[0].origin+(0, 50, 20), "tag_origin");
    lunar[0].seat[1] = spawnSM(lunar[0].origin+(0, -50, 20), "tag_origin");
    lunar[0].seat[2] = spawnSM(lunar[0].origin+(50, 0, 20), "tag_origin");
    lunar[0].seat[3] = spawnSM(lunar[0].origin+(-50, 0, 20), "tag_origin");
    for(m = 0; m < lunar[0].seat.size; m++)
    {
        lunar[0].seat[m] linkTo(lunar[0]);
        lunar[0].seat[m].occupied = false;
    }
    lunar[0].ctrlPanel = [];
    lunar[0].ctrlPanel[0] = spawnSM(lunar[0].origin+(0, -8, 40), panel);
    lunar[0].ctrlPanel[1] = spawnSM(lunar[0].origin+(0, 8, 40), panel, (0, 180, 0));
    for(m = 0; m < lunar[0].ctrlPanel.size; m++)
        lunar[0].ctrlPanel[m] linkTo(lunar[0]);
    lunar[0].trig = [];
    lunar[0].trig[0] = spawnTrig(lunar[0].origin, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
    lunar[0].trig[1] = spawnTrig(pov2, 50, 20, "HINT_NOICON", "Press & Hold &&1 To Call Lunar Lander!");
    lunar[0].trig[0] thread lunarThink(lunar[0],pov1,pov2);
    lunar[0].trig[1] thread lunarThink(lunar[0],pov1,pov2);
    lunar[0].pos = "spawn";
}
 
lunarThink(lunar,pov1,pov2)
{
    for(;;)
    {
        self waittill("trigger", m);
        if(m useButtonPressed() && !m.is_zombie && !isDefined(m.revivetrigger) && !isDefined(lunar.isMoving) && !isDefined(level.lunarCooling))
        {
            time = 0;
            while(m useButtonPressed())
            {
                time+= .05;
                if(!m useButtonPressed())
                    break;
                if(time >= .3)
                {
                    distance1 = distance(m.origin, pov1); //start
                    distance2 = distance(m.origin, pov2); //second pos
                    if(lunar.pos == "spawn"){
                        pos1 = distance1; pos2 = distance2;}
                    else{
                        pos1 = distance2; pos2 = distance1;}
   
                    if(pos1 < pos2)
                    {
                        if(m.score < 100){
                            m playSound("plr_"+m getEntityNumber()+"_vox_nomoney_perk_0");
                            break;}
                        else
                            m maps\_zombiemode_score::minus_to_player_score(100);
                    }
                    lunar.isMoving = true;
                    for(e = 0; e < getPlayers().size; e++)
                        if(distance(getPlayers()[e].origin, lunar.origin) < 100)
                        {
                            getPlayers()[e] enableGodMode();
                            getPlayers()[e] playerLinkTo(lunar.seat[getPlayers()[e] getEntityNumber()]);
                            getPlayers()[e].isOnLunar = true;
                        }
                    if(lunar.pos == "spawn") lunar thread lunarSpawn2Courtyard(pov2);
                    else lunar thread lunarCourtyard2Spawn(pov1);
                    wait 8.5;
                    for(e = 0; e < getPlayers().size; e++)
                        if(isDefined(getPlayers()[e].isOnLunar))
                        {
                            if(getMap()=="nzp"){
                                getPlayers()[e] unlink();
                                getPlayers()[e].isOnLunar = undefined;
                            } else {
                                getPlayers()[e] disableGodMode();
                                getPlayers()[e] unlink();
                                getPlayers()[e].isOnLunar = undefined;
                            }
                        }
                    lunar.isMoving = undefined;
                }
                wait .05;
            }
        }
    }
}
 
lunarSpawn2Courtyard(pov2)
{
    self.pos = "courtyard";
    self.trig[0] setHintString("Lunar Lander Is In Use!");
    self.trig[1] setHintString("Lunar Lander Is In Use!");
    self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    wait 3;
    self moveTo(pov2 + (0,0,200), 3, .5, 1);
    self rotateTo((5, 0, 10), 1, 0, .5);
    self rotateTo((0, 0, 0), 1);
    wait 3;
    self moveTo(pov2, 3, .5, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    self.trig[0] setHintString("Lunar Lander Is Cooling...");
    self.trig[1] setHintString("Lunar Lander Is Cooling...");
    level.lunarCooling = randomIntRange(15, 30);
    wait(level.lunarCooling);
    level.lunarCooling = undefined;
    self.trig[0] setHintString("Press & Hold &&1 To Call Lunar Lander");
    self.trig[1] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
}
 
lunarCourtyard2Spawn(pov1)
{
    self.pos = "spawn";
    self.trig[0] setHintString("Lunar Lander Is In Use!");
    self.trig[1] setHintString("Lunar Lander Is In Use!");
    self moveTo((self.origin[0], self.origin[1], 800), 3, .5, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    wait 3;
    self moveTo(pov1 + (0, 0, self.origin[2]), 3, .5, 1);
    self rotateTo((-5, 0, -10), 1, 0, .5);
    wait 2;
    self rotateTo((0, 0, 0), 1);
    wait 1;
    self moveTo(pov1, 3, 0, 1);
    self vibrate((0, -100, 0), 1.5, .4, 3);
    wait 3;
    self.trig[0] setHintString("Lunar Lander Is Cooling...");
    self.trig[1] setHintString("Lunar Lander Is Cooling...");
    level.lunarCooling = randomIntRange(15, 30);
    wait(level.lunarCooling);
    level.lunarCooling = undefined;
    self.trig[0] setHintString("Press & Hold &&1 To Use Lunar Lander! [Cost: 150]");
    self.trig[1] setHintString("Press & Hold &&1 To Call Lunar Lander");
}
 
s_effect_(){
    for(;;){
        playFx(level._effect["lightning_dog_spawn"], (9208, 1250, -650));
        playFx(level._effect["lightning_dog_spawn"], (10988, -1755, -738));
        wait 3;
    }
}
 
//Functions Needed
spawnSM(origin, model, angles)
{
    level.modelsSpawns++;
    ent = spawn("script_model", origin);
    ent setModel(model);
    if(isDefined(angles))
        ent.angles = angles;
    return ent;
}
 
spawnTrig(origin, width, height, cursorHint, string)
{
    trig = spawn("trigger_radius", origin, 1, width, height);
    trig setCursorHint(cursorHint);
    trig setHintString(string);
    return trig;
}
 
enableGodMode()
{
    self enableInvulnerability();
}
 
disableGodMode()
{
    self disableInvulnerability();
}
 
getMap()
{
    if(level.script == "nazi_zombie_prototype")
        return "nzp";
    if(level.script == "nazi_zombie_asylum")
        return "nza";
    if(level.script == "nazi_zombie_sumpf")
        return "nzs";
    if(level.script == "nazi_zombie_factory")
        return "nzf";
    return "";
}

Here is a video as well!

 
Z

Zyroh

Nero <3
Messages
294
Reaction score
75
I like everything but the models :biggrin:
 
Top Bottom