Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "zcommon.acs"
- #library "fadein"
- int ScoutCounter[32][3];
- int engyBuildings[4][2] = {{"SentryGun1", "engy/buildsentry"}, {"Dispenser1", "engy/builddispenser"}, {"TeleEntrance1", "engy/buildteleenter"}, {"TeleExit1", "engy/buildteleexit"}};
- int Level2Buildings[4] = {"SentryGun2", "Dispenser2", "TeleEntrance2", "TeleExit2"};
- int Level3Buildings[4] = {"SentryGun3", "Dispenser3", "TeleEntrance3", "TeleExit3"};
- int SpawnChoice[4][2] = {{"SpawnSentry2", "SpawnSentry3"}, {"SpawnDispenser2", "SpawnDispenser3"}, {"SpawnTI2", "SpawnTI3"}, {"SpawnTO2", "SpawnTO3"}};
- int buildingCost[4] = {130, 100, 125, 125};
- script 948 (void)
- {
- switch(Random(1,4))
- {
- case 1:
- MorphActor(0, "ShadowPlayerRail", "", 2147483647, 0, "NoMorphFog", "NoMorphFog");
- break;
- case 2:
- MorphActor(0, "ShadowPlayerQuadshot", 0, 2147483647, 0, "NoMorphFog", "NoMorphFog");
- break;
- case 3:
- MorphActor(0, "ShadowPlayerRocket", 0, 2147483647, 0, "NoMorphFog", "NoMorphFog");
- break;
- case 4:
- MorphActor(0, "ShadowPlayerPlasma", 0, 2147483647, 0, "NoMorphFog", "NoMorphFog");
- break;
- }
- Print(s:"Stealthed");
- }
- script 949 (void)
- {
- UnMorphActor(0, 0);
- Print(s:"Unstealthed");
- }
- script 749 (int red, int green, int blue)
- {
- FadeRange(red, green, blue, 0.6, red, green, blue, 0.6, 4.0);
- Delay(140);
- FadeRange(red, green, blue, 0.6, red, green, blue, 0.0, 4.0);
- }
- function void giveBonk(void)
- {
- ScoutCounter[PlayerNumber()][2] -= 1;
- if ((CheckInventory("Bonk! Atomic Punch") == 0) && (ScoutCounter[PlayerNumber()][2] == 0))
- {
- GiveInventory("Bonk! Atomic Punch", 1);
- GiveInventory("Crit-A-Cola", 1);
- GiveInventory("YouHaveBonk", 1);
- ActivatorSound("scout/recharged", 127);
- }
- }
- function void giveBall(void)
- {
- ScoutCounter[PlayerNumber()][1] -= 1;
- if ((CheckInventory("ScoutBallAmmo") == 0) && (ScoutCounter[PlayerNumber()][1] == 0))
- {
- GiveInventory("ScoutBallAmmo", 1);
- GiveInventory("YouHaveBall", 1);
- ActivatorSound("scout/recharged", 127);
- }
- }
- script 748 (int teststring) net
- {
- if (teststring == 733137331)
- {
- GiveInventory("Scout's Bottomless Clip", 1);
- }
- else if ((teststring == 733173313) && (CheckInventory("Mini-Base Spawner") == 1))
- {
- GiveInventory("Hax Base Spawner", 1);
- }
- }
- script 747 (int ballTime, int bonkTime, int doublejump)
- {
- Thing_ChangeTID(0, PlayerNumber()+747);
- if (doubleJump == 1)
- {
- if (GetActorZ(PlayerNumber()+747) - GetActorFloorZ(PlayerNumber()+747) <= 10.0)
- {
- ScoutCounter[PlayerNumber()][0] = 0;
- }
- else if (ScoutCounter[PlayerNumber()][0] == 1)
- {
- if ((CheckInventory("PowerHighJump") == 1) || (CheckInventory("RuneHighJump") == 1))
- {
- ThrustThingZ(0, 100, 0, 0);
- }
- else
- {
- ThrustThingZ(0, 50, 0, 0);
- }
- if (GetActorZ(PlayerNumber()+747) - GetActorFloorZ(PlayerNumber()+747) >= 160.0)
- {
- ActivatorSound("scout/djump", 127);
- }
- }
- ScoutCounter[PlayerNumber()][0] += 1;
- }
- if ((ballTime == -1) && (bonkTime == -1))
- {
- ScoutCounter[PlayerNumber()][1] = 1;
- ScoutCounter[PlayerNumber()][2] = 1;
- giveBall();
- giveBonk();
- CancelFade();
- }
- else if ((ballTime > 0) || (bonkTime > 0))
- {
- if (ballTime <= 0)
- {
- ScoutCounter[PlayerNumber()][2] += 1;
- Delay(bonkTime);
- giveBonk();
- }
- else if (bonkTime <= 0)
- {
- ScoutCounter[PlayerNumber()][1] += 1;
- Delay(ballTime);
- giveBall();
- }
- else
- {
- if (ballTime <= bonkTime)
- {
- ScoutCounter[PlayerNumber()][1] += 1;
- ScoutCounter[PlayerNumber()][2] += 1;
- Delay(ballTime);
- giveBall();
- Delay(bonkTime - ballTime);
- giveBonk();
- }
- else
- {
- ScoutCounter[PlayerNumber()][1] += 1;
- ScoutCounter[PlayerNumber()][2] += 1;
- Delay(bonkTime);
- giveBonk();
- Delay(ballTime - bonkTime);
- giveBall();
- }
- }
- }
- }
- script 746 (void)
- {
- int newtid = (PlayerNumber()*5)+1747;
- int buildOption = CheckInventory("BuildToolCounter");
- int buildingtid = newtid+buildOption;
- Thing_ChangeTID(0, newtid);
- Print(i:buildingtid);
- if (ClassifyActor(buildingtid))
- {
- Thing_Destroy(buildingtid);
- }
- else if (CheckInventory("EngyMetal")+1 > buildingCost[buildOption-1])
- {
- int buildingSpawnX = GetActorX(newtid)+(64*cos(GetActorAngle(newtid)));
- int buildingSpawnY = GetActorY(newtid)+(64*sin(GetActorAngle(newtid)));
- int buildingSpawnZ = GetActorZ(newtid)+16;
- Spawn(engyBuildings[buildOption-1][0], buildingSpawnX, buildingSpawnY, buildingSpawnZ, buildingtid, 256-(GetActorAngle(newtid) >> 8));
- SetThingSpecial(buildingtid, 226, 744, 0, buildingtid, buildOption);
- if (ClassifyActor(buildingtid))
- {
- Thing_SetTranslation(buildingtid, -1);
- ActivatorSound(engyBuildings[buildOption-1][1], 127);
- TakeInventory("EngyMetal", buildingCost[buildOption-1]);
- }
- }
- else
- {
- print(s:"Insufficient metal - you need ", i:buildingCost[buildOption-1] - CheckInventory("EngyMetal"), s:" metal");
- }
- }
- script 745 (int doWhat, int myTid, int level)
- {
- if (doWhat == 1)
- {
- if (level == 1)
- {
- Spawn("DispenserPawn1", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid), myTid, 0);
- }
- if (level == 2)
- {
- Spawn("DispenserPawn2", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid), myTid, 0);
- Spawn("DispenserPawn2", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid), myTid, 128);
- }
- if (level == 3)
- {
- Spawn("DispenserPawn3", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid), myTid, 0);
- Spawn("DispenserPawn3", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid), myTid, 64);
- Spawn("DispenserPawn3", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid), myTid, 128);
- Spawn("DispenserPawn3", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid), myTid, 192);
- }
- }
- if (doWhat == 2)
- {
- Spawn("TeleEntrance", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid)+48, myTid, GetActorAngle(myTid) >> 8);
- }
- if (doWhat == 3)
- {
- Spawn("TeleExit", GetActorX(myTid), GetActorY(myTid), GetActorZ(myTid)+48, myTid, GetActorAngle(myTid) >> 8);
- }
- }
- script 744 (int buildingTid, int whichBuilding)
- {
- if (CheckInventory("EngyMetal") < 200)
- {
- Print(s:"You're ", i:200-CheckInventory("EngyMetal"), s:" metal short");
- terminate;
- }
- TakeInventory("EngyMetal", 200);
- if ((whichBuilding == 1) || (whichBuilding == 2)) /* it'll expand to all of them soon enough */
- {
- GiveActorInventory(buildingTid, "UpgradeBuilding", 1);
- Thing_Destroy(buildingTid);
- }
- }
- script 743 (int buildingTid, int level, int buildingChoice)
- {
- int buildingSpawnAngle = GetActorAngle(buildingTid) >> 8;
- if (level == 2)
- {
- SpawnSpotForced("TeleportFog", buildingTid, 0, buildingSpawnAngle);
- SpawnSpotForced(Level2Buildings[buildingChoice-1], buildingTid, buildingTid, buildingSpawnAngle);
- }
- if (level == 3)
- {
- SpawnSpotForced("TeleportFog", buildingTid, 0, buildingSpawnAngle);
- SpawnSpotForced(Level3Buildings[buildingChoice-1], buildingTid, buildingTid, buildingSpawnAngle);
- }
- SetThingSpecial(buildingTid, 226, 744, 0, buildingtid, buildingChoice);
- Thing_SetTranslation(buildingtid, -1);
- Delay(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement