Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Generic custom logic v7.3 by Erwin Smith#6637
- // Made with love <3
- // TERMS AND CONDITIONS
- // 1. Do not alter the /credits command. The people worked hard on this logic, and removing their effort is disrespectfull.
- // 2. You are free to change the configuration settings.
- // 3. If you wish to implement some minor/major changes, rather contact Erwin Smith#6637 to make the change available to everyone once approved. For feedback and improvements you may also contact me.
- // TODO:
- // Refactor help commands system
- OnRoundStart()
- {
- // -- CONFIGURE THESE SETTINGS TO YOUR OWN PREFERENCE --
- // EXPEDITION DIFFICULTY - 0 = easy, 1 = normal, 2 = hard. See --Expedition Difficulty Settings-- to change factors.
- VariableInt.Set("ExpeditionDifficulty", 1);
- // -- Difficulty easy --
- VariableFloat.Set("HealthFactor0", 0.4);
- VariableFloat.Set("SpeedFactor0", 0.8);
- VariableFloat.Set("RegenSpeedFactor0", 0.5);
- VariableFloat.Set("RegenLimitFactor0", 0.7);
- VariableFloat.Set("TitanAmountFactor0", 0.8);
- VariableFloat.Set("ViewDistanceFactor0", 0.8);
- // -- Difficulty normal --
- VariableFloat.Set("HealthFactor1", 1.0);
- VariableFloat.Set("SpeedFactor1", 1.0);
- VariableFloat.Set("RegenSpeedFactor1", 1.0);
- VariableFloat.Set("RegenLimitFactor1", 1.0);
- VariableFloat.Set("TitanAmountFactor1", 1.0);
- VariableFloat.Set("ViewDistanceFactor1", 1.0);
- // -- Difficulty hard --
- VariableFloat.Set("HealthFactor2", 1.5);
- VariableFloat.Set("SpeedFactor2", 1.3);
- VariableFloat.Set("RegenSpeedFactor2", 4.0);
- VariableFloat.Set("RegenLimitFactor2", 1.7);
- VariableFloat.Set("TitanAmountFactor2", 1.2);
- VariableFloat.Set("ViewDistanceFactor2", 2.0);
- // -- TOGGABLE SETTINGS --
- VariableBool.Set("EnablePlayerScaling", true); // Default true
- VariableBool.Set("EnableRandomTitanAnimation", false); // Default false
- VariableBool.Set("EnableRandomTitanSpeed", true); // Default true
- VariableBool.Set("EnableRandomTitanSkins", true); // Default true
- VariableBool.Set("EnableTitanHealth", true); // Default true
- VariableBool.Set("EnableTitanRegeneration", false); // Default false
- VariableBool.Set("EnableTitanViewDistance", false); // Default false
- // Start message
- Game.PrintMessage("<size=15><color=#2ecc71>Welcome to the Expeditions Beyond the Walls!</color></size>");
- Game.PrintMessage("<size=12><color=#2ecc71>Map version 072</color></size>");
- Game.PrintMessage("<size=12><color=#123456>Custom Logic Version 7f WIP</color></size>");
- Game.PrintMessage("<size=12><color=#123456>Created with passion and love by Erwin Smith#6637</color></size>");
- Game.PrintMessage("<size=12><color=#654321>Special thanks to Syeo Potato Axel AnnieSwe & Marazul</color></size>");
- // Timer message - Credits to Potato
- VariableString.Set("0", "<b><color=#00FF00>[Commander]</color>: Advance In 10 Seconds!</b>");
- VariableString.Set("1", "<b> 10</b>");
- VariableString.Set("2", "<b> 9</b>");
- VariableString.Set("3", "<b> 8</b>");
- VariableString.Set("4", "<b> 7</b>");
- VariableString.Set("5", "<b> 6</b>");
- VariableString.Set("6", "<b> 5</b>");
- VariableString.Set("7", "<b> 4</b>");
- VariableString.Set("8", "<b> 3</b>");
- VariableString.Set("9", "<b> 2</b>");
- VariableString.Set("10", "<b> 1</b>");
- VariableString.Set("11", "<b><color=#00FF00>[Commander]</color>: All Soldiers! Advance!!!</b>");
- // -- TITAN SETTINGS --
- // TITAN TYPE: 0 = normie, 1 = abby, 2 = jumper, 3 = crawler, 4 = punk
- // TITAN CLASS: 0 = small, 1 = medium, 2 = large, 3 = extreme
- // TitanTypeX = The chance that this titan type spawns
- // TitanClass_ChanceX = the chance for this class to spawn
- // Min size = the minumun size of this titan class
- // Max size = the maximun size of this titan class
- // HP Min = the minumun HP this class has
- // HP Max = the maximun HP this class has
- // Speed Min = Randomize how much less speed this class can have
- // Speed Max = Randomize how much more speed this class can have
- // Regen limit = the max HP this titan class can regenerate to
- // Regen ticks = the amount of HP this titan class will regenarate per second
- // Min Animation = the minumun Animation Speed this class has
- // Max Animation = the maximun Animation Speed this class has
- // Titan eye = A random eye skin that may be chosen
- // Titan skin = A random body skin that may be chosen
- // -- TITAN TYPE CHANCES --
- VariableInt.Set("TitanType0", 15); // Default 15 - 0 = 15 percentage chance
- VariableInt.Set("TitanType1", 50); // Default 50 - 15 = 35 percentage chance
- VariableInt.Set("TitanType2", 83); // Default 75 - 50 = 25 percentage chance
- VariableInt.Set("TitanType3", 85); // Default 83 - 75 = 8 percentage chance
- VariableInt.Set("TitanType4", 100); // Default 100 - 83 = 17 percentage chance
- // -- TITAN CLASS TYPES --
- VariableInt.Set("TitanClass_Chance0", 10); // Default 10 - 0 = 10 percentage chance
- VariableInt.Set("TitanClass_Chance1", 45); // Default 45 - 10 = 35 percentage chance
- VariableInt.Set("TitanClass_Chance2", 95); // Default 95 - 45 = 50 percentage chance
- VariableInt.Set("TitanClass_Chance3", 100); // Default 100 - 95 = 5 percentage chance
- // -- TITAN CLASS SMALL --
- VariableFloat.Set("TitanClass_MinSize0", 1.5); // Default 1.5
- VariableFloat.Set("TitanClass_MaxSize0", 2.1); // Default 2.1
- VariableInt.Set("TitanClass_HPMin0", 200); // Default 200
- VariableInt.Set("TitanClass_HPMax0", 500); // Default 500
- VariableInt.Set("TitanClass_MinSpeed0", -5); // Default -5
- VariableInt.Set("TitanClass_MaxSpeed0", 5); // Default 5
- VariableInt.Set("TitanClass_RegenLimit0", 500); // Default 500
- VariableInt.Set("TitanClass_RegenTicks0", 1); // Default 1
- VariableFloat.Set("TitanClass_MinAnimation0", 1.0); // Default 1.0
- VariableFloat.Set("TitanClass_MaxAnimation0", 1.0); // Default 1.0
- VariableInt.Set("TitanClass_ViewDistance0", 1250); // Default 1250
- // -- TITAN CLASS Medium --
- VariableFloat.Set("TitanClass_MinSize1", VariableFloat("TitanClass_MaxSize0"));
- VariableFloat.Set("TitanClass_MaxSize1", 3.5); // Default 3.5
- VariableInt.Set("TitanClass_HPMin1", 500); // Default 500
- VariableInt.Set("TitanClass_HPMax1", 700); // Default 700
- VariableInt.Set("TitanClass_MinSpeed1", -10); // Default -10
- VariableInt.Set("TitanClass_MaxSpeed1", 10); // Default 10
- VariableInt.Set("TitanClass_RegenLimit1", 1000); // Default 1000
- VariableInt.Set("TitanClass_RegenTicks1", 2); // Default 2
- VariableFloat.Set("TitanClass_MinAnimation1", 1.0); // Default 1.0
- VariableFloat.Set("TitanClass_MaxAnimation1", 1.0); // Default 1.0
- VariableInt.Set("TitanClass_ViewDistance1", 2500); // Default 2500
- // -- TITAN CLASS Large --
- VariableFloat.Set("TitanClass_MinSize2", VariableFloat("TitanClass_MaxSize1"));
- VariableFloat.Set("TitanClass_MaxSize2", 4.1); // Default 4.1
- VariableInt.Set("TitanClass_HPMin2", 700); // Default 700
- VariableInt.Set("TitanClass_HPMax2", 900); // Default 900
- VariableInt.Set("TitanClass_MinSpeed2", -10); // Default -10
- VariableInt.Set("TitanClass_MaxSpeed2", 10); // Default 10
- VariableInt.Set("TitanClass_RegenLimit2", 1500); // Default 1500
- VariableInt.Set("TitanClass_RegenTicks2", 5); // Default 5
- VariableFloat.Set("TitanClass_MinAnimation2", 1.0); // Default 1.0
- VariableFloat.Set("TitanClass_MaxAnimation2", 1.0); // Default 1.0
- VariableInt.Set("TitanClass_ViewDistance2", 4000); // Default 4000
- // -- TITAN CLASS Extreme --
- VariableFloat.Set("TitanClass_MinSize3", VariableFloat("TitanClass_MaxSize2"));
- VariableFloat.Set("TitanClass_MaxSize3", 6.0); // Default 6.0
- VariableInt.Set("TitanClass_HPMin3", 1000); // Default 1000
- VariableInt.Set("TitanClass_HPMax3", 1500); // Default 1500
- VariableInt.Set("TitanClass_MinSpeed3", -10); // Default -10
- VariableInt.Set("TitanClass_MaxSpeed3", 10); // Default 10
- VariableInt.Set("TitanClass_RegenLimit3", 5000); // Default 5000
- VariableInt.Set("TitanClass_RegenTicks3", 10); // Default 10
- VariableFloat.Set("TitanClass_MinAnimation3", 1.0); // Default 1.0
- VariableFloat.Set("TitanClass_MaxAnimation3", 1.0); // Default 1.0
- VariableInt.Set("TitanClass_ViewDistance3", 6000); // Default 6000
- // -- TITAN SKINS --
- // Titan Eyes
- VariableInt.Set("TitanEyes", 17); // total eye skins + 1
- VariableString.Set("Titan_Eye", "");
- VariableString.Set("TitanEye1", "https://i[d]imgur[d]com/PEC8gPA[d]png");
- VariableString.Set("TitanEye2", "https://i[d]imgur[d]com/8fsSGqF[d]png");
- VariableString.Set("TitanEye3", "https://i[d]imgur[d]com/2DVFfJa[d]png ");
- VariableString.Set("TitanEye4", "https://i[d]imgur[d]com/JrCH46x[d]png");
- VariableString.Set("TitanEye5", "https://i[d]imgur[d]com/Ynp8ay3[d]png");
- VariableString.Set("TitanEye6", "https://i[d]imgur[d]com/hnPYbLC[d]png");
- VariableString.Set("TitanEye7", "https://i[d]imgur[d]com/vXdOo6t[d]png");
- VariableString.Set("TitanEye8", "https://i[d]imgur[d]com/JUyhkVs[d]png");
- VariableString.Set("TitanEye9", "https://i[d]imgur[d]com/ZUZwYiJ[d]png");
- VariableString.Set("TitanEye10", "http://i[d]imgur[d]com/ZbCl2Mz[d]png");
- VariableString.Set("TitanEye11", "https://i[d]imgur[d]com/KGjykcY[d]png");
- VariableString.Set("TitanEye12", "https://i[d]imgur[d]com/IL7KwM6[d]png");
- VariableString.Set("TitanEye13", "http://i[d]imgur[d]com/V8fVoEa[d]png");
- VariableString.Set("TitanEye14", "http://i[d]imgur[d]com/o2Eqgyo[d]png");
- VariableString.Set("TitanEye15", "https://i[d]imgur[d]com/iYUJ5ZC[d]png");
- VariableString.Set("TitanEye16", "https://i[d]imgur[d]com/wga4usM[d]png");
- VariableString.Set("TitanEye17", "");
- VariableString.Set("TitanEye18", "");
- VariableString.Set("TitanEye19", "");
- VariableString.Set("TitanEye20", "");
- // Titan bodies
- VariableInt.Set("TitanSkins", 11); // Total body skins + 1
- VariableString.Set("Titan_Skin", "");
- VariableString.Set("TitanSkin1", "https://i[d]imgur[d]com/cO4nVMy[d]jpg");
- VariableString.Set("TitanSkin2", "https://i[d]imgur[d]com/s4nG4f0[d]png");
- VariableString.Set("TitanSkin3", "https://i[d]imgur[d]com/DjfElmk[d]png");
- VariableString.Set("TitanSkin4", "https://i[d]imgur[d]com/DjfElmk[d]png");
- VariableString.Set("TitanSkin5", "https://i[d]imgur[d]com/p0G6G7t[d]png");
- VariableString.Set("TitanSkin6", "https://cdn[d]discordapp[d]com/attachments/345361079708155904/546363704984207362/titan[d]png");
- VariableString.Set("TitanSkin7", "https://cdn[d]discordapp[d]com/attachments/345361079708155904/546363829475344384/xx[d]png");
- VariableString.Set("TitanSkin8", "https://i[d]imgur[d]com/tTEkWbX[d]jpg");
- VariableString.Set("TitanSkin9", "https://i[d]imgur[d]com/zWFuznD[d]jpg");
- VariableString.Set("TitanSkin10", "https://i[d]imgur[d]com/QdEMjdE[d]jpg");
- VariableString.Set("TitanSkin11", "http://pre04[d]deviantart[d]net/dc24/th/pre/f/2015/238/2/1/deviant_titan_no_regrets_part_2_by_smalderhaldefan-d977rps[d]png");
- VariableString.Set("TitanSkin12", "");
- VariableString.Set("TitanSkin13", "");
- VariableString.Set("TitanSkin14", "");
- VariableString.Set("TitanSkin15", "");
- VariableString.Set("TitanSkin16", "");
- VariableString.Set("TitanSkin17", "");
- VariableString.Set("TitanSkin18", "");
- VariableString.Set("TitanSkin19", "");
- VariableString.Set("TitanSkin20", "");
- // Titan speed default values
- // Speed = X * size + Z
- VariableFloat.Set("TitanSpeedX0", 2.371); // Default 2.371
- VariableFloat.Set("TitanSpeedZ0", 6.900); // Default 6.900
- VariableFloat.Set("TitanSpeedX1", 7.254); // Default 7.254
- VariableFloat.Set("TitanSpeedZ1", 20.03); // Default 20.03
- VariableFloat.Set("TitanSpeedX2", 7.254); // Default 7.254
- VariableFloat.Set("TitanSpeedZ2", 20.03); // Default 20.03
- VariableFloat.Set("TitanSpeedX3", 14.22); // Default 14.22
- VariableFloat.Set("TitanSpeedZ3", 40.47); // Default 40.47
- VariableFloat.Set("TitanSpeedX4", 7.254); // Default 7.254
- VariableFloat.Set("TitanSpeedZ4", 20.03); // Default 20.03
- // -- SCORE VARIABLES --
- VariableInt.Set("TimePoints", -1); // -1 point / time
- VariableInt.Set("RevivePoints", -25); // -25 points / revive
- VariableInt.Set("KillPoints", 50); // 10 points / kill
- VariableInt.Set("DeathPoints", -25); // -25 points / death
- VariableInt.Set("ObjectivePoints", 1000); // 1000 points / objective
- VariableInt.Set("BonusObjectivePoints", 500); // 500 points / objective
- // -- PLAYER SCALING --
- VariableFloat.Set("PlayerFactorSmall", 0.7); // Less than 10 players
- VariableFloat.Set("PlayerFactorMedium", 1.0); // 10 to 15 players
- VariableFloat.Set("PlayerFactorLarge", 1.2); // 15 to 20 players
- VariableFloat.Set("PlayerFactorExtreme", 1.5); // 20+
- // END OF CONFIGURABLE SETTINGS IGNORE THE SETTINGS BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
- VariableBool.Set("CountDown", false);
- VariablePlayer.Set("MCPlayer", VariablePlayer("null")); // MC player
- VariablePlayer.Set("EPlayer", VariablePlayer("null")); // Player Collection Variable
- VariablePlayer.Set("CPlayer", VariablePlayer("null"));
- VariableInt.Set("Score", 0); // The total score
- VariableBool.Set("Timer", false);
- VariableInt.Set("Time", 0); // Total time
- VariableInt.Set("Revives", 0); // Total amount of revives
- VariableInt.Set("Kills", 0); // Total kills
- VariableInt.Set("Objectives", 0); // Total objectives completed
- VariableInt.Set("BonusObjectives", 0); // Total objectives completed
- // Revive cords
- VariableFloat.Set("Revive_X", 0.0); // used for /reviveatpos
- VariableFloat.Set("Revive_Y", 0.0); // used for /reviveatpos
- VariableFloat.Set("Revive_Z", 0.0); // used for /reviveatpos
- // Region cords
- VariableFloat.Set("X+", 2500.0); // positive X
- VariableFloat.Set("X-", -2500.0); // negative X
- VariableFloat.Set("Y+", 2500.0); // positive Y
- VariableFloat.Set("Y-", -2500.0); // negative Y
- // Titan variables - ommit default values otherwise NullReferrenceExceptions!
- VariableFloat.Set("Titan_X", 0.0); // titan X cord
- VariableFloat.Set("Titan_Y", 0.0); // titan Y cord
- VariableFloat.Set("Titan_Z", 0.0); // titan Z cord
- VariableInt.Set("Titan_Type", 0); // 0 - normie, 1 abby, 2 jump, 3 crawler, 4 punk
- VariableInt.Set("Titan_Class", 0); // 0 - small, 1 - medium, 2 - large, 3 - extreme
- VariableFloat.Set("Titan_Size", 1.0); // 1 - 1000
- VariableInt.Set("Titan_HP", 0);
- VariableInt.Set("Titan_Speed", 0);
- VariableFloat.Set("Titan_Animation", 1.0);
- VariableInt.Set("Titan_ViewDistance", 2500);
- VariableInt.Set("TitanAmount", 0);
- // Titan difficulty
- VariableFloat.Set("HealthFactor", 1.0);
- VariableFloat.Set("SpeedFactor", 1.0);
- VariableFloat.Set("RegenLimitFactor", 1.0);
- VariableFloat.Set("RegenSpeedFactor", 1.0);
- VariableFloat.Set("TitanAmountFactor", 1.0);
- VariableFloat.Set("ViewDistanceFactor", 1.0);
- VariableString.Set("Message", "");
- // Player balance
- VariableInt.Set("TotalPlayers", 0);
- VariableInt.Set("TotalPlayersTimer", 0);
- VariableFloat.Set("PlayerFactor", 1.0); // Default 1.0
- // Auto player revive
- VariableBool.Set("AutoPosRevive", false);
- VariableInt.Set("AutoPosReviveTimer", 0);
- VariableInt.Set("AutoPosReviveTimeLimit", 30); // Auto revive every 30s
- // V6 additions
- VariableBool.Set("SetVariableNameValue", false);
- VariableBool.Set("SetVariableTypeValue", false);
- VariableBool.Set("SetVariable", false);
- VariableString.Set("SetVariableName", "");
- VariableInt.Set("SetVariableType", 0); // 0 = integer, 1 = boolean, 2 = string, 3 = float
- VariableString.Set("SetVariableName", "WhileCommand");
- Game.PrintMessage("EM/Commands//startup"); // Execute a few commands on start up
- Game.PrintMessage("Please<size=1>____</size>type<size=1>____</size>'/init<size=1>____</size>'<size=1>____</size>to<size=1>____</size>initialize<size=1>____</size>the<size=1>____</size>script");
- Game.PrintMessage("Include<size=1>____</size>the<size=1>____</size>space");
- VariableBool.Set("runScript", false);
- VariableBool.Set("firstRun", true);
- }
- // Titan kill count
- OnTitanDie("DeadTitan", "MurdererPlayer")
- {
- VariableInt.Add("Kills", 1);
- }
- OnUpdate()
- {
- If(Bool.Equals(VariableBool("runScript"), true))
- {
- If(Bool.Equals(VariableBool("firstRun"), true))
- {
- VariableString.Set("char0", "0");
- VariableString.Set("char1", "1");
- VariableString.Set("char2", "2");
- VariableString.Set("char3", "3");
- VariableString.Set("char4", "4");
- VariableString.Set("char5", "5");
- VariableString.Set("char6", "6");
- VariableString.Set("char7", "7");
- VariableString.Set("char8", "8");
- VariableString.Set("char9", "9");
- VariableString.Set("char10", "a");
- VariableString.Set("char11", "b");
- VariableString.Set("char12", "c");
- VariableString.Set("char13", "d");
- VariableString.Set("char14", "e");
- VariableString.Set("char15", "f");
- VariableString.Set("char16", "A");
- VariableString.Set("char17", "B");
- VariableString.Set("char18", "C");
- VariableString.Set("char19", "D");
- VariableString.Set("char20", "E");
- VariableString.Set("char21", "F");
- VariableString.Set("char22", "g");
- VariableString.Set("char23", "h");
- VariableString.Set("char24", "i");
- VariableString.Set("char25", "j");
- VariableString.Set("char26", "k");
- VariableString.Set("char27", "l");
- VariableString.Set("char28", "m");
- VariableString.Set("char29", "n");
- VariableString.Set("char30", "o");
- VariableString.Set("char31", "p");
- VariableString.Set("char32", "q");
- VariableString.Set("char33", "r");
- VariableString.Set("char34", "s");
- VariableString.Set("char35", "t");
- VariableString.Set("char36", "u");
- VariableString.Set("char37", "v");
- VariableString.Set("char38", "w");
- VariableString.Set("char39", "x");
- VariableString.Set("char40", "y");
- VariableString.Set("char41", "z");
- VariableString.Set("char42", "G");
- VariableString.Set("char43", "H");
- VariableString.Set("char44", "I");
- VariableString.Set("char45", "J");
- VariableString.Set("char46", "K");
- VariableString.Set("char47", "L");
- VariableString.Set("char48", "M");
- VariableString.Set("char49", "N");
- VariableString.Set("char50", "O");
- VariableString.Set("char51", "P");
- VariableString.Set("char52", "Q");
- VariableString.Set("char53", "R");
- VariableString.Set("char54", "S");
- VariableString.Set("char55", "T");
- VariableString.Set("char56", "U");
- VariableString.Set("char57", "V");
- VariableString.Set("char58", "W");
- VariableString.Set("char59", "X");
- VariableString.Set("char60", "Y");
- VariableString.Set("char61", "Z");
- VariableString.Set("char62", "'");
- VariableFloat.Set("radius", 50.0);
- VariableInt.Set("revTime", 5);
- VariableInt.Set("deathTime", 120);
- VariableInt.Set("cooldown", 30);
- VariableInt.Set("counterMain", 0);
- VariableInt.Set("cooldown0", 0);
- VariableInt.Set("cooldown1", 0);
- VariableInt.Set("cooldown2", 0);
- VariableInt.Set("cooldown3", 0);
- VariableInt.Set("cooldown4", 0);
- VariableInt.Set("cooldown5", 0);
- VariableInt.Set("cooldown6", 0);
- VariableInt.Set("cooldown7", 0);
- VariableInt.Set("cooldown8", 0);
- VariableInt.Set("cooldown9", 0);
- VariableInt.Set("cooldown10", 0);
- VariableInt.Set("cooldown11", 0);
- VariableInt.Set("cooldown12", 0);
- VariableInt.Set("cooldown13", 0);
- VariableInt.Set("cooldown14", 0);
- VariableInt.Set("cooldown15", 0);
- VariableInt.Set("cooldown16", 0);
- VariableInt.Set("cooldown17", 0);
- VariableInt.Set("cooldown18", 0);
- VariableInt.Set("cooldown19", 0);
- VariableInt.Set("cooldown20", 0);
- VariableInt.Set("cooldown21", 0);
- VariableInt.Set("cooldown22", 0);
- VariableInt.Set("cooldown23", 0);
- VariableInt.Set("cooldown24", 0);
- VariableInt.Set("cooldown25", 0);
- VariableInt.Set("cooldown26", 0);
- VariableInt.Set("cooldown27", 0);
- VariableInt.Set("cooldown28", 0);
- VariableInt.Set("cooldown29", 0);
- VariableString.Concat("radiusWhat", "<size=10>revive</size><size=1>___</size><size=10>radius</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableFloat("radius").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>meters</size>");
- Game.PrintMessage(VariableString("radiusWhat"));
- VariableString.Concat("revTimeWhat", "<size=10>revive</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("revTime").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
- Game.PrintMessage(VariableString("revTimeWhat"));
- VariableString.Concat("deathWhat", "<size=10>death</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("deathTime").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
- Game.PrintMessage(VariableString("deathWhat"));
- VariableString.Concat("cooldownWhat", "<size=10>cooldown</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("cooldown").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
- Game.PrintMessage(VariableString("cooldownWhat"));
- Game.PrintMessage("Script<size=1>____</size>initialized");
- VariableBool.Set("firstRun", false);
- }
- VariableInt.Set("counterPlayer", 0);
- VariablePlayer.Set("player", VariablePlayer("null"));
- ForeachPlayer("player")
- {
- VariableString.Concat("xDir","x",VariableInt("counterPlayer").ConvertToString());
- VariableString.Concat("yDir","y",VariableInt("counterPlayer").ConvertToString());
- VariableString.Concat("zDir","z",VariableInt("counterPlayer").ConvertToString());
- VariableString.Concat("revDir","rev",VariableInt("counterPlayer").ConvertToString());
- VariableString.Concat("deathDir","death",VariableInt("counterPlayer").ConvertToString());
- VariableString.Concat("cooldownDirMain","cooldown",VariableInt("counterPlayer").ConvertToString());
- If(Bool.Equals(VariablePlayer("player").GetIsAlive(), true))
- {
- VariableFloat.Set("x", VariablePlayer("player").GetPositionX());
- VariableFloat.Set("y", VariablePlayer("player").GetPositionY());
- VariableFloat.Set("z", VariablePlayer("player").GetPositionZ());
- If(Float.NotEquals(VariableFloat("x"), 0.0))
- {
- VariableFloat.Set(VariableString("xDir"), VariableFloat("x"));
- }
- If(Float.NotEquals(VariableFloat("y"), 0.0))
- {
- VariableFloat.Set(VariableString("yDir"), VariableFloat("y"));
- }
- If(Float.NotEquals(VariableFloat("z"), 0.0))
- {
- VariableFloat.Set(VariableString("zDir"), VariableFloat("z"));
- }
- VariableInt.Set(VariableString("revDir"), 0);
- VariableInt.Set(VariableString("deathDir"), 0);
- }
- If(Bool.Equals(VariablePlayer("player").GetIsAlive(), false))
- {
- If(Int.LessThan(VariableInt(VariableString("deathDir")), VariableInt("deathTime")))
- {
- VariableInt.Set("counterPlayerMedic", 0);
- VariablePlayer.Set("playerMedic", VariablePlayer("null"));
- ForeachPlayer("playerMedic")
- {
- VariableString.Concat("cooldownDirSub","cooldown",VariableInt("counterPlayerMedic").ConvertToString());
- If(Player.NotEquals(VariablePlayer("player"), VariablePlayer("playerMedic")))
- {
- If(String.Equals(VariablePlayer("playerMedic").GetGuildName(), "[ffffff][ffffff]Medic"))
- {
- If(Bool.Equals(VariablePlayer("playerMedic").GetIsAlive(), true))
- {
- If(Int.LessThanOrEqual(VariableInt(VariableString("cooldownDirSub")), 0))
- {
- VariableFloat.Set("xgreater", VariableFloat(VariableString("xDir")));
- VariableFloat.Add("xgreater", VariableFloat("radius"));
- If(Float.LessThan(VariablePlayer("playerMedic").GetPositionX(), VariableFloat("xgreater")))
- {
- VariableFloat.Set("xless", VariableFloat(VariableString("xDir")));
- VariableFloat.Subtract("xless", VariableFloat("radius"));
- If(Float.GreaterThan(VariablePlayer("playerMedic").GetPositionX(), VariableFloat("xless")))
- {
- VariableFloat.Set("zgreater", VariableFloat(VariableString("zDir")));
- VariableFloat.Add("zgreater", VariableFloat("radius"));
- If(Float.LessThan(VariablePlayer("playerMedic").GetPositionZ(), VariableFloat("zgreater")))
- {
- VariableFloat.Set("zless", VariableFloat(VariableString("zDir")));
- VariableFloat.Subtract("zless", VariableFloat("radius"));
- If(Float.GreaterThan(VariablePlayer("playerMedic").GetPositionZ(), VariableFloat("zless")))
- {
- VariableInt.Add(VariableString("revDir"), 1);
- If(Int.Equals(VariableInt(VariableString("revDir")), 1))
- {
- VariableString.Set("playerName", VariablePlayer("player").GetName())
- VariableInt.Set("playerPartCounter", 0);
- While(String.StartsWith(VariableString("playerName"), "["))
- {
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```[", "");
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerHexDir"), "")
- VariableInt.Set("hexCounterMaster", 0);
- While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
- {
- VariableInt.Set("hexCounter", 0);
- While(Int.LessThan(VariableInt("hexCounter"), 22))
- {
- VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("hexCounter", 1);
- }
- VariableInt.Add("hexCounterMaster", 1);
- }
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```]", "");
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerABCDir"), "")
- VariableInt.Set("ABCCounterMaster", 0);
- While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
- {
- VariableInt.Set("ABCCounter", 0);
- While(Int.LessThan(VariableInt("ABCCounter"), 64))
- {
- VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("ABCCounter", 1);
- }
- VariableInt.Add("ABCCounterMaster", 1);
- }
- VariableInt.Add("playerPartCounter", 1);
- }
- VariableString.Set("playerPrintName", "");
- VariableInt.Set("printNameCounter", 0);
- While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
- {
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
- VariableString.Append("playerPrintName", "<color=#");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
- VariableString.Append("playerPrintName", ">");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
- VariableString.Append("playerPrintName", "</color>");
- VariableInt.Add("printNameCounter", 1);
- }
- VariableString.Concat("reviveWho", "<size=10>reviving</size><size=1>___</size><size=13>", VariableString("playerPrintName"), "</size><size=1>___</size><size=10>wait</size><size=1>___</size>","<size=15><color=#ff0000>", VariableInt("revTime").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
- Game.PrintMessage(VariableString("reviveWho"));
- }
- If(Int.GreaterThanOrEqual(VariableInt(VariableString("revDir")), VariableInt("revTime")))
- {
- Player.SpawnPlayerAt(VariablePlayer("player"), VariablePlayer("playerMedic").GetPositionX(), VariablePlayer("playerMedic").GetPositionY(), VariablePlayer("playerMedic").GetPositionZ());
- VariableInt.Set(VariableString("revDir"), 0);
- VariableInt.Set(VariableString("cooldownDirSub"), VariableInt("cooldown"));
- }
- }
- }
- }
- }
- }
- }
- }
- }
- VariableInt.Add("counterPlayerMedic", 1);
- }
- }
- If(Int.Equals(VariableInt(VariableString("deathDir")), VariableInt("deathTime")))
- {
- VariableString.Set("playerName", VariablePlayer("player").GetName())
- VariableInt.Set("playerPartCounter", 0);
- While(String.StartsWith(VariableString("playerName"), "["))
- {
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```[", "");
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerHexDir"), "")
- VariableInt.Set("hexCounterMaster", 0);
- While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
- {
- VariableInt.Set("hexCounter", 0);
- While(Int.LessThan(VariableInt("hexCounter"), 22))
- {
- VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("hexCounter", 1);
- }
- VariableInt.Add("hexCounterMaster", 1);
- }
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```]", "");
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerABCDir"), "")
- VariableInt.Set("ABCCounterMaster", 0);
- While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
- {
- VariableInt.Set("ABCCounter", 0);
- While(Int.LessThan(VariableInt("ABCCounter"), 64))
- {
- VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("ABCCounter", 1);
- }
- VariableInt.Add("ABCCounterMaster", 1);
- }
- VariableInt.Add("playerPartCounter", 1);
- }
- VariableString.Set("playerPrintName", "");
- VariableInt.Set("printNameCounter", 0);
- While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
- {
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
- VariableString.Append("playerPrintName", "<color=#");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
- VariableString.Append("playerPrintName", ">");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
- VariableString.Append("playerPrintName", "</color>");
- VariableInt.Add("printNameCounter", 1);
- }
- VariableString.Concat("whoHasBeenLost", "<size=13>", VariableString("playerPrintName"), "</size><size=1>___</size><size=10>has</size><size=1>___</size><size=10>been</size><size=1>___</size><size=10>lost</size>");
- Game.PrintMessage(VariableString("whoHasBeenLost"));
- }
- VariableInt.Add(VariableString("deathDir"), 1);
- }
- VariableInt.Add("counterPlayer", 1);
- VariableInt.Subtract(VariableString("cooldownDirMain"), 1);
- }
- VariableInt.Add("counterMain", 1);
- }
- // Titan regeneration
- If(Bool.Equals(VariableBool("EnableTitanRegeneration"), true))
- {
- VariableString.Concat("RegenLimitF", "RegenLimitFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
- VariableString.Concat("RegenSpeedF", "RegenLimitFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
- ForeachTitan("RTitan")
- {
- VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
- VariableFloat.Set("TitanSize", VariableTitan("RTitan").GetSize());
- // Titan class small
- If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize0")))
- {
- VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
- VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit0").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
- If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
- {
- VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
- VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
- VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks0").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
- VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
- Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
- }
- }
- // titan class medium
- If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize1")))
- {
- If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize1")))
- {
- VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
- VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit1").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
- If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
- {
- VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
- VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
- VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks1").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
- VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
- Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
- }
- }
- }
- // titan class large
- If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize2")))
- {
- If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize2")))
- {
- VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
- VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit2").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
- If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
- {
- VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
- VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
- VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks2").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
- VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
- Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
- }
- }
- }
- // titan class extreme
- If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize3")))
- {
- VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
- VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit3").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
- If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
- {
- VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
- VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
- VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks3").ConvertToFloat());
- VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
- VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
- Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
- }
- }
- }
- }
- // Time count
- If(Bool.Equals(VariableBool("Timer"), true))
- {
- VariableInt.Add("Time", 1); // Add 1 / seconds
- }
- // Exp start counter
- If(Bool.Equals(VariableBool("CountDown"), true))
- {
- VariableString.Set("Temp", VariableInt("Count").ConvertToString());
- Game.PrintMessage(VariableString(VariableString("Temp")));
- VariableInt.Add("Count", 1);
- If(VariableInt.Equals(VariableInt("Count"), 12))
- {
- VariableBool.Set("CountDown", false);
- }
- }
- // Player scaling
- If(Bool.Equals(VariableBool("EnablePlayerScaling"), true))
- {
- // Player balance. Check amount of players every 5 minutes for player balancing
- If(VariableInt.GreaterThanOrEqual(VariableInt("TotalPlayersTimer"), 300))
- {
- VariableInt.Set("TotalPlayers", 0);
- VariableInt.Set("TotalPlayersTimer", 0);
- ForeachPlayer("EPlayer")
- {
- VariableInt.Add("TotalPlayers", 1);
- }
- Game.PrintMessage("EM/Commands//setplayerfactor");
- }
- VariableInt.Add("TotalPlayersTimer", 1);
- }
- // Auto player revive
- If(Bool.Equals(VariableBool("AutoPosRevive"), true))
- {
- VariableInt.Add("AutoPosReviveTimer", 1);
- If(VariableInt.GreaterThanOrEqual(VariableInt("AutoPosReviveTimer"), VariableInt("AutoPosReviveTimeLimit")))
- {
- Game.PrintMessage("EM/Commands//revpos");
- VariableInt.Set("AutoPosReviveTimer", 0);
- }
- }
- }
- // -- CHAT COMMANDS --
- OnChatInput("input")
- {
- If(String.StartsWith(VariableString("input"), "/medic"))
- {
- VariableString.Concat("medicScraper", "/medic", VariableString("char63"));
- VariableString.Remove("input", VariableString("medicScraper"));
- VariablePlayer.Set("player", VariablePlayer("null"));
- ForeachPlayer("player")
- {
- VariableBool.Set("passNotMedic", false);
- VariableString.Set("playerName", VariablePlayer("player").GetName())
- VariableInt.Set("playerPartCounter", 0);
- While(String.StartsWith(VariableString("playerName"), "["))
- {
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```[", "");
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerHexDir"), "")
- VariableInt.Set("hexCounterMaster", 0);
- While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
- {
- VariableInt.Set("hexCounter", 0);
- While(Int.LessThan(VariableInt("hexCounter"), 22))
- {
- VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("hexCounter", 1);
- }
- VariableInt.Add("hexCounterMaster", 1);
- }
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```]", "");
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerABCDir"), "")
- VariableInt.Set("ABCCounterMaster", 0);
- While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
- {
- VariableInt.Set("ABCCounter", 0);
- While(Int.LessThan(VariableInt("ABCCounter"), 64))
- {
- VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("ABCCounter", 1);
- }
- VariableInt.Add("ABCCounterMaster", 1);
- }
- VariableInt.Add("playerPartCounter", 1);
- }
- VariableString.Set("playerPrintName", "");
- VariableInt.Set("printNameCounter", 0);
- While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
- {
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
- VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
- VariableInt.Add("printNameCounter", 1);
- }
- If(String.Contains(VariableString("playerPrintName"), VariableString("input")))
- {
- VariableString.Set("playerName", VariablePlayer("player").GetName())
- VariableInt.Set("playerPartCounter", 0);
- While(String.StartsWith(VariableString("playerName"), "["))
- {
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```[", "");
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerHexDir"), "")
- VariableInt.Set("hexCounterMaster", 0);
- While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
- {
- VariableInt.Set("hexCounter", 0);
- While(Int.LessThan(VariableInt("hexCounter"), 22))
- {
- VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("hexCounter", 1);
- }
- VariableInt.Add("hexCounterMaster", 1);
- }
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```]", "");
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerABCDir"), "")
- VariableInt.Set("ABCCounterMaster", 0);
- While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
- {
- VariableInt.Set("ABCCounter", 0);
- While(Int.LessThan(VariableInt("ABCCounter"), 64))
- {
- VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("ABCCounter", 1);
- }
- VariableInt.Add("ABCCounterMaster", 1);
- }
- VariableInt.Add("playerPartCounter", 1);
- }
- VariableString.Set("playerPrintName", "");
- VariableInt.Set("printNameCounter", 0);
- While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
- {
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
- VariableString.Append("playerPrintName", "<color=#");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
- VariableString.Append("playerPrintName", ">");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
- VariableString.Append("playerPrintName", "</color>");
- VariableInt.Add("printNameCounter", 1);
- }
- If(String.NotEquals(VariablePlayer("player").GetGuildName(), "[ffffff][ffffff]Medic"))
- {
- Player.SetGuildName(VariablePlayer("player"), "[ffffff][ffffff]Medic");
- VariableString.Concat("AM", VariableString("playerPrintName"), "<size=1>____</size>is<size=1>____</size>now<size=1>____</size>medic");
- Game.PrintMessage(VariableString("AM"));
- VariableBool.Set("passNotMedic", true);
- }
- If(Bool.Equals(VariableBool("passNotMedic"), false))
- {
- If(String.Equals(VariablePlayer("player").GetGuildName(), "[ffffff][ffffff]Medic"))
- {
- Player.SetGuildName(VariablePlayer("player"), "");
- VariableString.Concat("ANM", VariableString("playerPrintName"), "<size=1>____</size>is<size=1>____</size>no<size=1>____</size>longer<size=1>____</size>medic");
- Game.PrintMessage(VariableString("ANM"));
- }
- }
- }
- }
- }
- If(String.StartsWith(VariableString("input"), "/revtime"))
- {
- VariableString.Remove("input", "/revtime");
- VariableInt.Set("revTime", VariableString("input").ConvertToInt());
- VariableString.Concat("revTimeWhat", "<size=10>revive</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("revTime").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
- Game.PrintMessage(VariableString("revTimeWhat"));
- }
- If(String.StartsWith(VariableString("input"), "/revradius"))
- {
- VariableString.Remove("input", "/revradius");
- VariableFloat.Set("radius", VariableString("input").ConvertToInt().ConvertToFloat());
- VariableString.Concat("radiusWhat", "<size=10>revive</size><size=1>___</size><size=10>radius</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableFloat("radius").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>meters</size>");
- Game.PrintMessage(VariableString("radiusWhat"));
- }
- If(String.StartsWith(VariableString("input"), "/deathtime"))
- {
- VariableString.Remove("input", "/deathtime");
- VariableInt.Set("deathTime", VariableString("input").ConvertToInt());
- VariableString.Concat("deathWhat", "<size=10>death</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("deathTime").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
- Game.PrintMessage(VariableString("deathWhat"));
- }
- If(String.StartsWith(VariableString("input"), "/cooldown"))
- {
- VariableString.Remove("input", "/cooldown");
- VariableInt.Set("cooldown", VariableString("input").ConvertToInt());
- VariableString.Concat("cooldownWhat", "<size=10>cooldown</size><size=1>___</size><size=10>time</size><size=1>___</size><size=10>is</size><size=1>___</size>","<size=12><color=#ff4444>", VariableInt("cooldown").ConvertToString(),"</color></size>", "<size=1>___</size><size=10>seconds</size>");
- Game.PrintMessage(VariableString("cooldownWhat"));
- }
- If(String.StartsWith(VariableString("input"), "/init"))
- {
- VariableString.Set("char63", VariableString("input"));
- VariableString.Replace("char63", "/init", "");
- VariableBool.Set("runScript", true);
- }
- If(String.Equals(VariableString("input"), "/players"))
- {
- VariablePlayer.Set("player", VariablePlayer("null"));
- ForeachPlayer("player")
- {
- VariableString.Set("playerName", VariablePlayer("player").GetName())
- VariableInt.Set("playerPartCounter", 0);
- While(String.StartsWith(VariableString("playerName"), "["))
- {
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```[", "");
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerHexDir"), "")
- VariableInt.Set("hexCounterMaster", 0);
- While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
- {
- VariableInt.Set("hexCounter", 0);
- While(Int.LessThan(VariableInt("hexCounter"), 22))
- {
- VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("hexCounter", 1);
- }
- VariableInt.Add("hexCounterMaster", 1);
- }
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Replace("playerName", "```]", "");
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
- VariableString.Set(VariableString("playerABCDir"), "")
- VariableInt.Set("ABCCounterMaster", 0);
- While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
- {
- VariableInt.Set("ABCCounter", 0);
- While(Int.LessThan(VariableInt("ABCCounter"), 64))
- {
- VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
- If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
- {
- VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
- VariableString.Concat("playerName", "```", VariableString("playerName"));
- VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
- VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
- }
- VariableInt.Add("ABCCounter", 1);
- }
- VariableInt.Add("ABCCounterMaster", 1);
- }
- VariableInt.Add("playerPartCounter", 1);
- }
- VariableString.Set("playerPrintName", "");
- VariableInt.Set("printNameCounter", 0);
- While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
- {
- VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
- VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
- VariableString.Append("playerPrintName", "<color=#");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
- VariableString.Append("playerPrintName", ">");
- VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
- VariableString.Append("playerPrintName", "</color>");
- VariableInt.Add("printNameCounter", 1);
- }
- Game.PrintMessage(VariableString("playerPrintName"));
- }
- }
- // DONT EVER TOUCH THESE COMMANDS
- If(String.StartsWith(VariableString("input"), "/"))
- {
- // Handle set variable logic. Needs to be at top.
- If(Bool.Equals(VariableBool("SetVariable"), true))
- {
- Game.PrintMessage("Final");
- VariableBool.Set("SetVariable", false);
- If(Int.Equals(VariableInt("SetVariableType"), 0))
- {
- VariableInt.Set(VariableString("SetVariableName"), VariableString("input").ConvertToInt());
- }
- If(Int.Equals(VariableInt("SetVariableType"), 1))
- {
- VariableBool.Set(VariableString("SetVariableName"), VariableString("input").ConvertToBool());
- }
- If(Int.Equals(VariableInt("SetVariableType"), 2))
- {
- VariableString.Set(VariableString("SetVariableName"), VariableString("input"));
- }
- If(Int.Equals(VariableInt("SetVariableType"), 3))
- {
- VariableFloat.Set(VariableString("SetVariableName"), VariableString("input").ConvertToString());
- }
- }
- // Set a variable type
- If(Bool.Equals(VariableBool("SetVariableTypeValue"), true))
- {
- Game.PrintMessage("Type");
- VariableBool.Set("SetVariableTypeValue", false);
- VariableInt.Set("SetVariableType", VariableString("input").ConvertToInt());
- VariableBool.Set("SetVariable", true);
- Game.PrintMessage("<b><color=#D46565>[LOGIC]</color>: Enter a variable value:</b>");
- }
- // Set a variable name
- If(Bool.Equals(VariableBool("SetVariableNameValue"), true))
- {
- Game.PrintMessage("Value");
- VariableBool.Set("SetVariableNameValue", false);
- VariableString.Set("SetVariableName", VariableString("input"));
- VariableBool.Set("SetVariableTypeValue", true);
- Game.PrintMessage("<b><color=#D46565>[LOGIC]</color>: Enter a variable type:</b>");
- }
- // Execute some commands on start up
- If(String.Equals(VariableString("input"),"/startup"))
- {
- Game.PrintMessage("EM/Commands//mcset");
- Game.PrintMessage("EM/Commands//setplayerfactor");
- Game.PrintMessage("EM/Commands//");
- }
- }
- // Help commands
- If(String.Equals(VariableString("input"),"/com"))
- {
- Game.PrintMessage("<b><i><color=#000000>**List of commands:**</color></i></b>");
- Game.PrintMessage("<color=#ffff00> /start - to Start Expedition</color>");
- Game.PrintMessage("<color=#ffff00> /stop - to End Expedition</color>");
- Game.PrintMessage("<color=#ffff00> /enableregen - To Enable Titan Regeneration</color>");
- Game.PrintMessage("<color=#ffff00> /disableregen - To Disable Titan Regeneration</color>");
- Game.PrintMessage("<color=#ffff00> /stats - To Get Expedition Statistics</color>");
- Game.PrintMessage("<color=#ffff00> /score - To Get Expedition Score(WIP)</color>");
- Game.PrintMessage("<color=#ffff00> /mcset - Set Region Player To MC</color>");
- Game.PrintMessage("<color=#ffff00> /setnewmc - Set Region Player To Top Alive Player</color>");
- Game.PrintMessage(" ");
- Game.PrintMessage("<b><i><color=#000000>**Other list of commands:**</color></i></b>");
- Game.PrintMessage("<color=#ffff00> /lrev - List of Revive Commands</color>");
- Game.PrintMessage("<color=#ffff00> /lreg - List of Dynamic Region Commands</color>");
- Game.PrintMessage("<color=#ffff00> /ltit - List of Titan Commands</color>");
- }
- // GENERIC COMMANDS
- If(String.StartsWith(VariableString("input"), "/"))
- {
- // Set the MC. Last player is always the lowest ID, so in this case, the MC
- If(String.Equals(VariableString("input"),"/mcset"))
- {
- ForeachPlayer("EPlayer")
- {
- VariablePlayer.Set("MCPlayer", VariablePlayer("EPlayer"));
- }
- }
- // Select another player as MC if the current MC is dead. Useful to still spawn titans and/or revive points
- If(String.Equals(VariableString("input"),"/setnewmc"))
- {
- ForeachPlayer("EPlayer")
- {
- VariablePlayer.Set("MCPlayer", VariablePlayer("EPlayer"));
- }
- VariableBool.Set("isMCAlive",VariablePlayer("MCPlayer").GetIsAlive());
- If(Bool.Equals(VariableBool("isMCAlive"), false))
- {
- Game.PrintMessage("The_MC_is_dead!_Finding_another_player!");
- VariableBool.Set("BackupMCFound", false);
- ForeachPlayer("EPlayer")
- {
- If(Bool.Equals(VariableBool("BackupMCFound"), false))
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), true))
- {
- VariableString.Set("PlayerName", VariablePlayer("EPlayer").GetName());
- VariableString.Concat("Message", "New Player: ", " ", VariableString("PlayerName"));
- Game.PrintMessage(VariableString("Message"));
- VariablePlayer.Set("MCPlayer", VariablePlayer("EPlayer"));
- VariableBool.Set("BackupMCFound", true);
- }
- }
- }
- }
- }
- If(String.Equals(VariableString("input"), "/start"))
- {
- VariableBool.Set("CountDown", true); // Count down variable
- VariableBool.Set("Timer", true);
- VariableInt.Set("Count", 0); // Amount of counts
- VariableInt.Set("Time", 0);
- VariableInt.Set("Revives", 0);
- VariableInt.Set("Kills", 0);
- VariableInt.Set("Objectives", 0);
- VariableInt.Set("BonusObjectives", 0);
- }
- If(String.Equals(VariableString("input"), "/timer"))
- {
- VariableBool.Set("CountDown", true); // Count down variable
- VariableInt.Set("Count", 0);
- }
- If(String.Equals(VariableString("input"), "/stop"))
- {
- Game.PrintMessage("Expedition has ended!");
- VariableBool.Set("Timer", false);
- }
- If(String.Equals(VariableString("input"), "/stats"))
- {
- VariableString.Concat("Message", "Kill: ", " ", VariableInt("Kills").ConvertToString());
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "Revives: ", " ", VariableInt("Revives").ConvertToString());
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "Times(seconds): ", " ", VariableInt("Time").ConvertToString());
- Game.PrintMessage(VariableString("Message"));
- }
- If(String.Equals(VariableString("input"), "/score"))
- {
- VariableInt.Set("Score", 0); // reset the score, otherwise total score would just add itself again after using this command multiple times
- // Kills calculation
- VariableInt.Set("KillScore", 0);
- VariableInt.Set("KillCount", VariableInt("Kills"));
- While(Int.GreaterThan(VariableInt("KillCount"), 0))
- {
- VariableInt.Add("KillScore", VariableInt("KillPoints"))
- VariableInt.Subtract("KillCount", 1);
- }
- VariableInt.Add("Score", VariableInt("KillScore"));
- // Revives calculation
- VariableInt.Set("ReviveScore", 0);
- VariableInt.Set("ReviveCount", VariableInt("Revives"));
- While(Int.GreaterThan(VariableInt("ReviveCount"), 0))
- {
- VariableInt.Add("ReviveScore", VariableInt("RevivePoints"))
- VariableInt.Subtract("ReviveCount", 1);
- }
- VariableInt.Add("Score", VariableInt("ReviveScore"));
- // Time calculation
- VariableInt.Set("TimeScore", 0);
- VariableInt.Set("TimeCount", VariableInt("Time"));
- While(Int.GreaterThan(VariableInt("TimeCount"), 0))
- {
- VariableInt.Add("TimeScore", VariableInt("TimePoints"))
- VariableInt.Subtract("TimeCount", 1);
- }
- VariableInt.Add("Score", VariableInt("TimeScore"));
- VariableString.Concat("Message", "Total Score: ", " ", VariableInt("Score").ConvertToString());
- Game.PrintMessage(VariableString("Message"));
- }
- }
- // OPTION COMMANDS
- If(String.StartsWith(VariableString("input"), "/"))
- {
- If(String.Equals(VariableString("input"), "/hoption"))
- {
- Game.PrintMessage("<b><i><color=#000000>** --- Option commands --- **</color></i></b>");
- Game.PrintMessage("<color=#ffff00> --- /coption > Check the current option values</color>");
- Game.PrintMessage("<color=#ffff00> --- /setexpdifficulty[0/1/2] > Set expedition difficulty</color>");
- Game.PrintMessage("<color=#ffff00> --- /tplayerscaling > Toggle player scaling</color>");
- Game.PrintMessage("<color=#ffff00> --- /tanim > Toggle random titan animation</color>");
- Game.PrintMessage("<color=#ffff00> --- /tspeed > Toggle random titan speed</color>");
- Game.PrintMessage("<color=#ffff00> --- /tskin > Toggle titan skins</color>");
- Game.PrintMessage("<color=#ffff00> --- /thealth > Toggle titan health</color>");
- Game.PrintMessage("<color=#ffff00> --- /tregen > Toggle titan regeneration</color>");
- Game.PrintMessage("<color=#ffff00> --- /tview > Toggle titan view distance</color>");
- }
- If(String.Equals(VariableString("input"), "/coption"))
- {
- Game.PrintMessage("<b><i><color=#000000>** --- Expedition Settings --- **</color></i></b>");
- If(Int.Equals(VariableInt("ExpeditionDifficulty"), 0))
- {
- Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Easy --- </color>");
- }
- If(Int.Equals(VariableInt("ExpeditionDifficulty"), 1))
- {
- Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Normal --- </color>");
- }
- If(Int.Equals(VariableInt("ExpeditionDifficulty"), 2))
- {
- Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Hard --- </color>");
- }
- VariableString.Concat("Message", "<color=#ffff00> --- Player Scaling: ", VariableBool("EnablePlayerScaling").ConvertToString(), " --- </color>");
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "<color=#ffff00> --- Random Titan Animation: ", VariableBool("EnableRandomTitanAnimation").ConvertToString(), " --- </color>");
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "<color=#ffff00> --- Random Titan Speed: ", VariableBool("EnableRandomTitanSpeed").ConvertToString(), " --- </color>");
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "<color=#ffff00> --- Titan Skins: ", VariableBool("EnableRandomTitanSkins").ConvertToString(), " --- </color>");
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "<color=#ffff00> --- Titan HP: ", VariableBool("EnableTitanHealth").ConvertToString(), " --- </color>");
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "<color=#ffff00> --- Titan Regeneration: ", VariableBool("EnableTitanRegeneration").ConvertToString(), " --- </color>");
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "<color=#ffff00> --- Titan View Distance: ", VariableBool("EnableTitanViewDistance").ConvertToString(), " --- </color>");
- Game.PrintMessage(VariableString("Message"));
- }
- // Exp difficulty
- If(String.Equals(VariableString("input"), "/setexpdifficulty0"))
- {
- VariableInt.Set("ExpeditionDifficulty", 0);
- Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Easy --- </color>");
- }
- If(String.Equals(VariableString("input"), "/setexpdifficulty1"))
- {
- VariableInt.Set("ExpeditionDifficulty", 1);
- Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Normal --- </color>");
- }
- If(String.Equals(VariableString("input"), "/setexpdifficulty2"))
- {
- VariableInt.Set("ExpeditionDifficulty", 2);
- Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Hard --- </color>");
- }
- //Player scaling
- If(String.Equals(VariableString("input"), "/tplayerscaling"))
- {
- VariableBool.Set("Done", false);
- If(Bool.Equals(VariableBool("EnablePlayerScaling"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Player scaling: Enabled --- </color>");
- VariableBool.Set("EnablePlayerScaling", true);
- VariableBool.Set("Done", true);
- }
- If(Bool.Equals(VariableBool("Done"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Player scaling: Disabled --- </color>");
- VariableBool.Set("EnablePlayerScaling", false);
- VariableFloat.Set("PlayerFactor", 1.0);
- }
- }
- // Titan Animation
- If(String.Equals(VariableString("input"), "/tanim"))
- {
- VariableBool.Set("Done", false);
- If(Bool.Equals(VariableBool("EnableRandomTitanAnimation"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Random Titan Animation: Enabled --- </color>");
- VariableBool.Set("EnableRandomTitanAnimation", true);
- VariableBool.Set("Done", true);
- }
- If(Bool.Equals(VariableBool("Done"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Random Titan Animation: Disabled --- </color>");
- VariableBool.Set("EnableRandomTitanAnimation", false);
- }
- }
- // Titan Speed
- If(String.Equals(VariableString("input"), "/tspeed"))
- {
- VariableBool.Set("Done", false);
- If(Bool.Equals(VariableBool("EnableRandomTitanSpeed"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Random Titan Speed: Enabled --- </color>");
- VariableBool.Set("EnableRandomTitanSpeed", true);
- VariableBool.Set("Done", true);
- }
- If(Bool.Equals(VariableBool("Done"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Random Titan Speed: Disabled --- </color>");
- VariableBool.Set("EnableRandomTitanSpeed", false);
- }
- }
- // Titan Skins
- If(String.Equals(VariableString("input"), "/tskin"))
- {
- VariableBool.Set("Done", false);
- If(Bool.Equals(VariableBool("EnableRandomTitanSkins"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan Skins: Enabled --- </color>");
- VariableBool.Set("EnableRandomTitanSkins", true);
- VariableBool.Set("Done", true);
- }
- If(Bool.Equals(VariableBool("Done"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan Skins: Disabled --- </color>");
- VariableBool.Set("EnableRandomTitanSkins", false);
- }
- }
- // Titan Health
- If(String.Equals(VariableString("input"), "/thealth"))
- {
- VariableBool.Set("Done", false);
- If(Bool.Equals(VariableBool("EnableTitanHealth"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan HP: Enabled --- </color>");
- VariableBool.Set("EnableTitanHealth", true);
- VariableBool.Set("Done", true);
- }
- If(Bool.Equals(VariableBool("Done"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan HP: Disabled --- </color>");
- VariableBool.Set("EnableTitanHealth", false);
- }
- }
- // Titan Regeneration
- If(String.Equals(VariableString("input"), "/tregen"))
- {
- VariableBool.Set("Done", false);
- If(Bool.Equals(VariableBool("EnableTitanRegeneration"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan Regeneration: Enabled --- </color>");
- VariableBool.Set("EnableTitanRegeneration", true);
- VariableBool.Set("Done", true);
- }
- If(Bool.Equals(VariableBool("Done"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan Regeneration: Disabled --- </color>");
- VariableBool.Set("EnableTitanRegeneration", false);
- }
- }
- // Titan View Distance
- If(String.Equals(VariableString("input"), "/tview"))
- {
- VariableBool.Set("Done", false);
- If(Bool.Equals(VariableBool("EnableTitanViewDistance"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan View Distance: Enabled --- </color>");
- VariableBool.Set("EnableTitanViewDistance", true);
- VariableBool.Set("Done", true);
- }
- If(Bool.Equals(VariableBool("Done"), false))
- {
- Game.PrintMessage("<color=#ffff00> --- Titan View Distance: Disabled --- </color>");
- VariableBool.Set("EnableTitanViewDistance", false);
- }
- }
- }
- // REVIVE COMMANDS
- If(String.StartsWith(VariableString("input"), "/"))
- {
- If(String.Equals(VariableString("input"), "/hrevive"))
- {
- Game.PrintMessage("<b><i><color=#000000>** --- Revive commands --- **</color></i></b>");
- Game.PrintMessage("<color=#ffff00> --- /setrev > Set a revive point at current location </color>");
- Game.PrintMessage("<color=#ffff00> --- /revpos > Revive at the /setrev location</color>");
- Game.PrintMessage("<color=#ffff00> --- /setrevauto > Automatically revive players at current location every 30s</color>");
- Game.PrintMessage("<color=#ffff00> --- /dsetrevauto > Disable Auto Revive At Position</color>");
- Game.PrintMessage("<color=#ffff00> --- /revmc > Revive all at MC Player</color>");
- }
- If(String.Equals(VariableString("input"), "/revpos"))
- {
- ForeachPlayer("EPlayer")
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), false))
- {
- VariableInt.Add("Revives", 1);
- Player.SpawnPlayerAt(VariablePlayer("EPlayer"), VariableFloat("Pos_X"), VariableFloat("Pos_Y"), VariableFloat("Pos_Z"));
- }
- }
- If(Bool.Equals(VariableBool("AutoPosRevive"), false))
- {
- Game.PrintMessage("<b><color=#58a27c><size=15>Reinforcements have arrived at the camp!</size></color></b>");
- }
- }
- If(String.Equals(VariableString("input"), "/setrev"))
- {
- VariableFloat.Set("Pos_X", VariablePlayer("MCPlayer").GetPositionX());
- VariableFloat.Set("Pos_Y", VariablePlayer("MCPlayer").GetPositionY());
- VariableFloat.Set("Pos_Z", VariablePlayer("MCPlayer").GetPositionZ());
- Game.PrintMessage("<b><color=#58a27c><size=15>A camp has been established!</size></color></b>");
- Game.PrintMessage("<b><color=#58a27c><size=15>Reinforcements can now arrive to this location!!</size></color></b>");
- }
- If(String.Equals(VariableString("input"), "/setrevauto"))
- {
- VariableBool.Set("AutoPosRevive", true);
- VariableFloat.Set("Pos_X", VariablePlayer("MCPlayer").GetPositionX());
- VariableFloat.Set("Pos_Y", VariablePlayer("MCPlayer").GetPositionY());
- VariableFloat.Set("Pos_Z", VariablePlayer("MCPlayer").GetPositionZ());
- Game.PrintMessage("<b><color=#58a27c><size=15>A camp has been established!</size></color></b>");
- Game.PrintMessage("<b><color=#58a27c><size=15>Reinforcements will now arrive to this location every 30 seconds!!</size></color></b>");
- }
- If(String.Equals(VariableString("input"), "/dsetrevauto"))
- {
- VariableBool.Set("AutoPosRevive", false);
- Game.PrintMessage("<b><color=#58a27c><size=15>A camp has been destroyed!</size></color></b>");
- }
- If(String.Equals(VariableString("input"), "/revmc"))
- {
- If(Player.NotEquals(VariablePlayer("MCPlayer"), VariablePlayer("null")))
- {
- // Get the last known location of the MC
- VariableFloat.Set("MC_X", VariablePlayer("MCPlayer").GetPositionX());
- VariableFloat.Set("MC_Y", VariablePlayer("MCPlayer").GetPositionY());
- VariableFloat.Set("MC_Z", VariablePlayer("MCPlayer").GetPositionZ());
- Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The MC</size></color></b>");
- ForeachPlayer("EPlayer")
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), false))
- {
- VariableInt.Add("Revives", 1);
- Player.SpawnPlayerAt(VariablePlayer("EPlayer"), VariableFloat("MC_X"), VariableFloat("MC_Y"), VariableFloat("MC_Z"));
- }
- }
- }
- }
- }
- // TITANS - these functions are used for titan spawning
- If(String.StartsWith(VariableString("input"), "/"))
- {
- If(String.Equals(VariableString("input"), "/htitan"))
- {
- Game.PrintMessage("<b><i><color=#000000>** --- Titan commands --- **</color></i></b>");
- Game.PrintMessage("<color=#ffff00> --- /titans[1-50] > Spawn titans at dynamic region</color>");
- Game.PrintMessage("<color=#ffff00> --- /tptitans > Teleport all titans to dynamic region</color>");
- }
- // Random titans at the MC region
- If(String.StartsWith(VariableString("input"), "/titans"))
- {
- VariableString.Set("ParameterCommand", "/titans");
- VariableString.Set("ParameterCommandInput", VariableString("input"));
- VariableInt.Set("ParameterLoopStart", 1);
- VariableInt.Set("ParameterLoopEnd", 50);
- VariableInt.Set("ParameterLoopStep", 1);
- VariableString.Set("ParameterName", "TitanAmount");
- Game.PrintMessage("EM/Commands//setcommandparameter");
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanmc");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- // Random titans at the region
- If(String.StartsWith(VariableString("input"), "/spawntitansatregion"))
- {
- VariableString.Set("ParameterCommand", "/spawntitansatregion");
- VariableString.Set("ParameterCommandInput", VariableString("input"));
- VariableInt.Set("ParameterLoopStart", 1);
- VariableInt.Set("ParameterLoopEnd", 50);
- VariableInt.Set("ParameterLoopStep", 1);
- VariableString.Set("ParameterName", "TitanAmount");
- Game.PrintMessage("EM/Commands//setcommandparameter");
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- // Teleport all titans to the MC region
- If(String.Equals(VariableString("input"),"/tptitans"))
- {
- ForeachTitan("TitanMy")
- {
- Game.PrintMessage("EM/Commands//setrandomtitancordsfloat");
- Titan.MoveTitan(VariableTitan("TitanMy"), VariableFloat("Titan_X"),VariableFloat("Titan_Y"),VariableFloat("Titan_Z"));
- }
- Game.PrintMessage("Titans TPed to Region!");
- }
- // Set random titan cords
- If(String.Equals(VariableString("input"), "/setrandomtitancords"))
- {
- VariableFloat.Set("MC_X", VariablePlayer("MCPlayer").GetPositionX());
- VariableFloat.Set("MC_Y", VariablePlayer("MCPlayer").GetPositionY());
- VariableFloat.Set("MC_Z", VariablePlayer("MCPlayer").GetPositionZ());
- VariableInt.Set("TitanY", VariableFloat("MC_Y").ConvertToInt());
- VariableInt.Add("TitanY", 500);
- VariableInt.SetRandom("TitanX", VariableFloat("X-").ConvertToInt(), VariableFloat("X+").ConvertToInt());
- VariableInt.Add("TitanX", VariableFloat("MC_X").ConvertToInt());
- VariableInt.SetRandom("TitanZ", VariableFloat("Y-").ConvertToInt(), VariableFloat("Y+").ConvertToInt());
- VariableInt.Add("TitanZ", VariableFloat("MC_Z").ConvertToInt());
- }
- // Set random titan cords based on a float
- If(String.Equals(VariableString("input"), "/setrandomtitancordsfloat"))
- {
- VariableFloat.Set("MC_X", VariablePlayer("MCPlayer").GetPositionX());
- VariableFloat.Set("MC_Y", VariablePlayer("MCPlayer").GetPositionY());
- VariableFloat.Set("MC_Z", VariablePlayer("MCPlayer").GetPositionZ());
- VariableFloat.Set("Titan_Y", VariableFloat("MC_Y"));
- VariableFloat.Add("Titan_Y", 500.0);
- VariableFloat.SetRandom("Titan_X", VariableFloat("X-"), VariableFloat("X+"));
- VariableFloat.Add("Titan_X", VariableFloat("MC_X"));
- VariableFloat.SetRandom("Titan_Z", VariableFloat("Y-"), VariableFloat("Y+"));
- VariableFloat.Add("Titan_Z", VariableFloat("MC_Z"));
- }
- // Determine the player factor. This is used for generic titan spawners to increase / reduce the amount of titans spawned because of the players
- If(String.Equals(VariableString("input"), "/setplayerfactor"))
- {
- If(Int.LessThan(VariableInt("TotalPlayers"), 10))
- {
- VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorSmall"));
- }
- If(Int.LessThan(VariableInt("TotalPlayers"), 15))
- {
- If(Int.GreaterThanOrEqual(VariableInt("TotalPlayers"), 10))
- {
- VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorMedium"));
- }
- }
- If(Int.LessThan(VariableInt("TotalPlayers"), 20))
- {
- If(Int.GreaterThanOrEqual(VariableInt("TotalPlayers"), 15))
- {
- VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorLarge"));
- }
- }
- If(Int.GreaterThan(VariableInt("TotalPlayers"), 20))
- {
- VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorExtreme"));
- }
- }
- // Determine the amount of titans that should be spawned, based on the player factor.
- If(String.Equals(VariableString("input"), "/settitanamount"))
- {
- VariableFloat.Set("TitanAmountF", VariableInt("TitanAmount").ConvertToFloat());
- VariableFloat.Multiply("TitanAmountF", VariableFloat("PlayerFactor"));
- VariableInt.Set("TitanAmount", VariableFloat("TitanAmountF").ConvertToInt());
- // Titan health
- VariableString.Concat("VariableF", "TitanAmountFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
- VariableFloat.Set("TitanAmountFactor", VariableFloat(VariableString("VariableF")));
- VariableFloat.Multiply("TitanAmountFactor", VariableInt("TitanAmount").ConvertToFloat());
- VariableInt.Set("TitanAmount", VariableFloat("TitanAmountFactor").ConvertToInt());
- }
- // Determine the titan size based on class
- If(String.Equals(VariableString("input"), "/setrandomtitanhealth"))
- {
- VariableString.Concat("TitanClassMinHPVar", "TitanClass_HPMin", VariableInt("Titan_Class").ConvertToString());
- VariableString.Concat("TitanClassMaxHPVar", "TitanClass_HPMax", VariableInt("Titan_Class").ConvertToString());
- VariableInt.SetRandom("Titan_HP", VariableInt(VariableString("TitanClassMinHPVar")), VariableInt(VariableString("TitanClassMaxHPVar")));
- }
- // Determine the titan size based on class
- If(String.Equals(VariableString("input"), "/settitanviewdistance"))
- {
- VariableString.Concat("Variable", "TitanClass_ViewDistance", VariableInt("Titan_Class").ConvertToString());
- VariableInt.Set("Titan_ViewDistance", VariableInt(VariableString("Variable")));
- }
- // Determine the animation speed based on class
- If(String.Equals(VariableString("input"), "/setrandomtitananimationspeed"))
- {
- VariableString.Concat("TitanClassMinAnimationVar", "TitanClass_MinAnimation", VariableInt("Titan_Class").ConvertToString());
- VariableString.Concat("TitanClassMaxAnimationVar", "TitanClass_MaxAnimation", VariableInt("Titan_Class").ConvertToString());
- VariableFloat.SetRandom("Titan_Animation", VariableFloat(VariableString("TitanClassMinAnimationVar")), VariableFloat(VariableString("TitanClassMaxAnimationVar")));
- }
- // Determine the titan size based on class
- If(String.Equals(VariableString("input"), "/setrandomtitansize"))
- {
- VariableString.Concat("TitanClassMinSizeVar", "TitanClass_MinSize", VariableInt("Titan_Class").ConvertToString());
- VariableString.Concat("TitanClassMaxSizeVar", "TitanClass_MaxSize", VariableInt("Titan_Class").ConvertToString());
- VariableFloat.SetRandom("Titan_Size", VariableFloat(VariableString("TitanClassMinSizeVar")), VariableFloat(VariableString("TitanClassMaxSizeVar")));
- }
- // Determine the titan speed based on class and type
- If(String.Equals(VariableString("input"), "/setrandomtitanspeed"))
- {
- VariableString.Concat("TitanClassMinSpeedVar", "TitanClass_MinSpeed", VariableInt("Titan_Class").ConvertToString());
- VariableString.Concat("TitanClassMaxSpeedVar", "TitanClass_MaxSpeed", VariableInt("Titan_Class").ConvertToString());
- VariableInt.SetRandom("Titan_Speed_Random", VariableInt(VariableString("TitanClassMinSpeedVar")), VariableInt(VariableString("TitanClassMaxSpeedVar")));
- VariableInt.Add("Titan_Speed", VariableInt("Titan_Speed_Random"));
- }
- // Determine the titan speed based on class and type
- If(String.Equals(VariableString("input"), "/settitanspeedbysize"))
- {
- VariableString.Concat("TitanSpeedXVar", "TitanSpeedX", VariableInt("Titan_Type").ConvertToString());
- VariableString.Concat("TitanSpeedZVar", "TitanSpeedZ", VariableInt("Titan_Type").ConvertToString());
- VariableFloat.Set("TitanSpeedF", VariableFloat("Titan_Size"));
- VariableFloat.Multiply("TitanSpeedF", VariableFloat(VariableString("TitanSpeedXVar")));
- VariableFloat.Add("TitanSpeedF", VariableFloat(VariableString("TitanSpeedZVar")));
- VariableInt.Set("Titan_Speed", VariableFloat("TitanSpeedF").ConvertToInt());
- }
- // Determine the titan class and set its stats
- If(String.Equals(VariableString("input"), "/setrandomtitanclass"))
- {
- VariableInt.SetRandom("RandomTitanClass", 0, 100);
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance0")))
- {
- VariableInt.Set("Titan_Class", 0);
- }
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance1")))
- {
- If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance0")))
- {
- VariableInt.Set("Titan_Class", 1);
- }
- }
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance2")))
- {
- If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance1")))
- {
- VariableInt.Set("Titan_Class", 2);
- }
- }
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance3")))
- {
- If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance2")))
- {
- VariableInt.Set("Titan_Class", 3);
- }
- }
- }
- // Set a random titan type
- If(String.Equals(VariableString("input"), "/setrandomtitantype"))
- {
- VariableInt.SetRandom("RandomTitanType", 0, 100);
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType0")))
- {
- VariableInt.Set("Titan_Type", 0);
- }
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType1")))
- {
- If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType0")))
- {
- VariableInt.Set("Titan_Type", 1);
- }
- }
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType2")))
- {
- If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType1")))
- {
- VariableInt.Set("Titan_Type", 2);
- }
- }
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType3")))
- {
- If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType2")))
- {
- VariableInt.Set("Titan_Type", 3);
- }
- }
- If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType4")))
- {
- If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType3")))
- {
- VariableInt.Set("Titan_Type", 4);
- }
- }
- }
- // Set random titan skin
- If(String.Equals(VariableString("input"), "/setrandomtitanskin"))
- {
- VariableInt.SetRandom("TitanEyeRandom", 1, VariableInt("TitanEyes"));
- VariableString.Concat("Titan_Eye_Temp", "TitanEye", VariableInt("TitanEyeRandom").ConvertToString());
- VariableString.Set("Titan_Eye", VariableString("Titan_Eye_Temp"));
- VariableInt.SetRandom("TitanSkinRandom", 1, VariableInt("TitanSkins"));
- VariableString.Concat("Titan_Skin_Temp", "TitanSkin", VariableInt("TitanSkinRandom").ConvertToString());
- VariableString.Set("Titan_Skin", VariableString("Titan_Skin_Temp"));
- }
- // Set random titan skin
- If(String.Equals(VariableString("input"), "/settitanattributesbyexpeditiondifficulty"))
- {
- // Titan health
- VariableString.Concat("VariableF", "HealthFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
- VariableFloat.Set("HealthFactor", VariableFloat(VariableString("VariableF")));
- VariableFloat.Multiply("HealthFactor", VariableInt("Titan_HP").ConvertToFloat());
- VariableInt.Set("Titan_HP", VariableFloat("HealthFactor").ConvertToInt());
- // Titan speed
- VariableString.Concat("VariableF", "SpeedFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
- VariableFloat.Set("SpeedFactor", VariableFloat(VariableString("VariableF")));
- VariableFloat.Multiply("SpeedFactor", VariableInt("Titan_Speed").ConvertToFloat());
- VariableInt.Set("Titan_Speed", VariableFloat("SpeedFactor").ConvertToInt());
- // View distance
- VariableString.Concat("VariableF", "ViewDistanceFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
- VariableFloat.Set("ViewDistanceFactor", VariableFloat(VariableString("VariableF")));
- VariableFloat.Multiply("ViewDistanceFactor", VariableInt("Titan_ViewDistance").ConvertToFloat());
- VariableInt.Set("Titan_ViewDistance", VariableFloat("ViewDistanceFactor").ConvertToInt());
- }
- // Set some default values again
- If(String.Equals(VariableString("input"), "/resettitanvalues"))
- {
- VariableString.Set("Titan_Eye", "");
- VariableString.Set("Titan_Skin", "");
- VariableFloat.Set("Titan_Animation", 1.0);
- }
- // Spawn an EM titan
- If(String.Equals(VariableString("input"), "/spawntitan"))
- {
- Game.PrintMessage("EM/Commands//setrandomtitanclass");
- Game.PrintMessage("EM/Commands//setrandomtitantype");
- If(Bool.Equals(VariableBool("EnableTitanHealth"), true))
- {
- Game.PrintMessage("EM/Commands//setrandomtitanhealth");
- }
- Game.PrintMessage("EM/Commands//setrandomtitansize");
- Game.PrintMessage("EM/Commands//settitanspeedbysize");
- If(Bool.Equals(VariableBool("EnableTitanViewDistance"), true))
- {
- Game.PrintMessage("EM/Commands//settitanviewdistance");
- }
- If(Bool.Equals(VariableBool("EnableRandomTitanSpeed"), true))
- {
- Game.PrintMessage("EM/Commands//setrandomtitanspeed");
- }
- If(Bool.Equals(VariableBool("EnableRandomTitanSkins"), true))
- {
- Game.PrintMessage("EM/Commands//setrandomtitanskin");
- }
- If(Bool.Equals(VariableBool("EnableRandomTitanAnimation"), true))
- {
- Game.PrintMessage("EM/Commands//setrandomtitananimationspeed");
- }
- Game.PrintMessage("EM/Commands//settitanattributesbyexpeditiondifficulty");
- If(Bool.Equals(VariableBool("EnableTitanViewDistance"), false))
- {
- VariableInt.Set("Titan_ViewDistance", 99999);
- }
- If(Bool.Equals(VariableBool("EnableTitanHealth"), false))
- {
- VariableInt.Set("Titan_HP", 10); // setting this value to 0 makes titans follow the RC settings, so 10 is the lowest valid input
- }
- VariableString.Concat("TitanSpawner", "EM/Commands//sptit[-]", VariableInt("Titan_Type").ConvertToString() ,"[-]",VariableFloat("Titan_Size").ConvertToString(),"[-]", VariableInt("Titan_HP").ConvertToString(),"[-]", VariableInt("Titan_Speed").ConvertToString(),"[-]1[-]", VariableInt("Titan_ViewDistance").ConvertToString() ,"[-]0[-]", VariableInt("TitanX").ConvertToString(), "[-]", VariableInt("TitanY").ConvertToString(), " ", VariableInt("TitanZ").ConvertToString(), "[-]1[-]", VariableString(VariableString("Titan_Skin")), "[-]", VariableString(VariableString("Titan_Eye")), "[-]", VariableFloat("Titan_Animation").ConvertToString());
- Game.PrintMessage(VariableString("TitanSpawner"));
- Game.PrintMessage("EM/Commands//resettitanvalues");
- }
- // Set values specific for the region commands
- If(String.Equals(VariableString("input"), "/spawntitanregion"))
- {
- VariableInt.Set("TitanX", RegionRandomX(VariableString("Region")).ConvertToInt());
- VariableInt.Set("TitanY", RegionRandomY(VariableString("Region")).ConvertToInt());
- VariableInt.Set("TitanZ", RegionRandomZ(VariableString("Region")).ConvertToInt());
- Game.PrintMessage("EM/Commands//spawntitan");
- }
- // This is how to spawn a titan inside a mc region with the /sptit command
- If(String.Equals(VariableString("input"), "/spawntitanmc"))
- {
- Game.PrintMessage("EM/Commands//setrandomtitancords");
- Game.PrintMessage("EM/Commands//spawntitan");
- }
- }
- // MISC - Other commands
- If(String.StartsWith(VariableString("input"), "/"))
- {
- // Daylight
- If(String.Equals(VariableString("input"),"/day"))
- {
- Game.PrintMessage("<b>[<color=#F2C00E>Time</color><color=#FFFFFF>]: Daylight has arrived!</color></b>");
- Game.PrintMessage("EM/Commands//setdaylightcolor[-]0[d]6");
- Game.PrintMessage("EM/Commands//skybox[-]https://cdn[d]discordapp[d]com/attachments/312353767074955266/513077338582548481/unknown[d]png[-]https://cdn[d]discordapp[d]com/attachments/312353767074955266/513077416344813591/unknown[d]png[-]https://cdn[d]discordapp[d]com/attachments/312353767074955266/513077451140890634/unknown[d]png[-]https://cdn[d]discordapp[d]com/attachments/312353767074955266/513077380630446090/unknown[d]png[-]https://cdn[d]discordapp[d]com/attachments/312353767074955266/513434233449218073/temp[d]jpg[-]https://cdn[d]discordapp[d]com/attachments/312353767074955266/513434233449218073/temp[d]jpg")
- }
- // Nighttime
- If(String.Equals(VariableString("input"),"/night"))
- {
- Game.PrintMessage("<b>[<color=#F2C00E>Time</color><color=#FFFFFF>]: Darkness has arrived!</color></b>");
- Game.PrintMessage("<b>[<color=#2ECC71>Command</color><color=#FFFFFF>]: Equip your flash flares!</color></b>");
- Game.PrintMessage("EM/Commands//setdaylightcolor[-]0[d]04");
- Game.PrintMessage("EM/Commands//skybox[-]http://t[d]motionelements[d]com/stock-video/nature/me2448083-stars-black-sky-hd-a0540-poster[d]jpg[-]http://t[d]motionelements[d]com/stock-video/nature/me2448083-stars-black-sky-hd-a0540-poster[d]jpg[-]http://t[d]motionelements[d]com/stock-video/nature/me2448083-stars-black-sky-hd-a0540-poster[d]jpg[-]http://t[d]motionelements[d]com/stock-video/nature/me2448083-stars-black-sky-hd-a0540-poster[d]jpg[-]http://t[d]motionelements[d]com/stock-video/nature/me2448083-stars-black-sky-hd-a0540-poster[d]jpg[-]http://t[d]motionelements[d]com/stock-video/nature/me2448083-stars-black-sky-hd-a0540-poster[d]jpg")
- }
- // Set generic variable
- If(String.Equals(VariableString("input"),"/setvariable"))
- {
- VariableBool.Set("SetVariableNameValue", true);
- Game.PrintMessage("<b><color=#D46565>[LOGIC]</color>: Enter a variable name:</b>");
- }
- }
- // Utils - These functions are used by other functions
- If(String.StartsWith(VariableString("input"), "/"))
- {
- // Simulate a parameter
- If(String.Equals(VariableString("input"),"/setcommandparameter"))
- {
- VariableInt.Add("ParameterLoopEnd", VariableInt("ParameterLoopStep"))
- While(VariableInt.LessThanOrEqual(VariableInt("ParameterLoopStart"), VariableInt("ParameterLoopEnd")))
- {
- VariableString.Concat("WhileCommand", VariableString("ParameterCommand"), VariableInt("ParameterLoopStart").ConvertToString());
- If(String.Equals(VariableString("ParameterCommandInput"), VariableString("WhileCommand")))
- {
- VariableInt.Set(VariableString("ParameterName"), VariableInt("ParameterLoopStart"));
- VariableInt.Set("ParameterLoopStart", "ParameterLoopEnd");
- }
- VariableInt.Add("ParameterLoopStart", VariableInt("ParameterLoopStep"));
- }
- }
- // Simulate a parameter float
- If(String.Equals(VariableString("input"),"/setcommandparameterf"))
- {
- VariableInt.Add("ParameterLoopEnd", VariableInt("ParameterLoopStep"))
- While(VariableInt.LessThanOrEqual(VariableInt("ParameterLoopStart"), VariableInt("ParameterLoopEnd")))
- {
- VariableString.Concat("WhileCommand", VariableString("ParameterCommand"), VariableInt("ParameterLoopStart").ConvertToString());
- If(String.Equals(VariableString("ParameterCommandInput"), VariableString("WhileCommand")))
- {
- VariableFloat.Set(VariableString("ParameterName"), VariableInt("ParameterLoopStart").ConvertToFloat());
- VariableInt.Set("ParameterLoopStart", "ParameterLoopEnd");
- }
- VariableInt.Add("ParameterLoopStart", VariableInt("ParameterLoopStep"));
- }
- VariableString.Set("WhileCommand", "");
- }
- }
- // Generic regions - Generic region commands
- If(String.StartsWith(VariableString("input"), "/"))
- {
- If(String.Equals(VariableString("input"), "/hregion"))
- {
- Game.PrintMessage("<b><i><color=#000000>** --- Dynamic region commands --- **</color></i></b>");
- Game.PrintMessage("<i><color=#000000>--- Dynamic region allows you to spawn titans anywhere based on your location --- **</color></i>");
- Game.PrintMessage("<color=#ffff00> --- /checkregion > Check current dynamic region cords</color>");
- Game.PrintMessage("<color=#ffff00> --- /setxp[-10000 till 10000] > Set the X+ cord</color>");
- Game.PrintMessage("<color=#ffff00> --- /setxn[-10000 till 10000] > Set the X- cord</color>");
- Game.PrintMessage("<color=#ffff00> --- /setyp[-10000 till 10000] > Set the Y+ cord</color>");
- Game.PrintMessage("<color=#ffff00> --- /setyn[-10000 till 10000] > Set the Y- cord</color>");
- }
- // Check the current values of the regions
- If(String.Equals(VariableString("input"), "/checkregion"))
- {
- VariableInt.Set("IntX+", VariableFloat("X+").ConvertToInt());
- VariableInt.Set("IntX-", VariableFloat("X-").ConvertToInt());
- VariableInt.Set("IntY+", VariableFloat("Y+").ConvertToInt());
- VariableInt.Set("IntY-", VariableFloat("Y-").ConvertToInt());
- VariableString.Concat("Message", "X ", VariableInt("IntX-").ConvertToString(), " until ", VariableInt("IntX+").ConvertToString());
- Game.PrintMessage(VariableString("Message"));
- VariableString.Concat("Message", "Y ", VariableInt("IntY-").ConvertToString(), " until ", VariableInt("IntY+").ConvertToString());
- Game.PrintMessage(VariableString("Message"));
- }
- // Generic MC based region commands
- If(String.StartsWith(VariableString("input"), "/setxp"))
- {
- VariableString.Set("ParameterCommand", "/setxp");
- VariableString.Set("ParameterCommandInput", VariableString("input"));
- VariableInt.Set("ParameterLoopStart", -10000);
- VariableInt.Set("ParameterLoopEnd", 10000);
- VariableInt.Set("ParameterLoopStep", 100);
- VariableString.Set("ParameterName", "X+");
- Game.PrintMessage("EM/Commands//setcommandparameterf");
- }
- If(String.StartsWith(VariableString("input"), "/setxn"))
- {
- VariableString.Set("ParameterCommand", "/setxn");
- VariableString.Set("ParameterCommandInput", VariableString("input"));
- VariableInt.Set("ParameterLoopStart", -10000);
- VariableInt.Set("ParameterLoopEnd", 10000);
- VariableInt.Set("ParameterLoopStep", 100);
- VariableString.Set("ParameterName", "X-");
- Game.PrintMessage("EM/Commands//setcommandparameterf");
- }
- If(String.StartsWith(VariableString("input"), "/setyp"))
- {
- VariableString.Set("ParameterCommand", "/setyp");
- VariableString.Set("ParameterCommandInput", VariableString("input"));
- VariableInt.Set("ParameterLoopStart", -10000);
- VariableInt.Set("ParameterLoopEnd", 10000);
- VariableInt.Set("ParameterLoopStep", 100);
- VariableString.Set("ParameterName", "Y+");
- Game.PrintMessage("EM/Commands//setcommandparameterf");
- }
- If(String.StartsWith(VariableString("input"), "/setyn"))
- {
- VariableString.Set("ParameterCommand", "/setyn");
- VariableString.Set("ParameterCommandInput", VariableString("input"));
- VariableInt.Set("ParameterLoopStart", -10000);
- VariableInt.Set("ParameterLoopEnd", 10000);
- VariableInt.Set("ParameterLoopStep", 100);
- VariableString.Set("ParameterName", "Y-");
- Game.PrintMessage("EM/Commands//setcommandparameterf");
- }
- }
- // Commander Commands
- If(String.StartsWith(VariableString("input"), "/"))
- {
- If(String.Equals(VariableString("input"),"/ready"))
- {
- Game.PrintMessage("<size=16>[<color=#86d493>COMMAND</color>]: Section Commanders deploy <color=#2881ff>Blue Flare</color> when your position is ready!</size>");
- }
- If(String.Equals(VariableString("input"),"/b"))
- {
- Game.PrintMessage("<size=20>[<color=#2881ff>BLUE FLARE</color>]: Fall back!</size>");
- }
- If(String.Equals(VariableString("input"),"/fl"))
- {
- Game.PrintMessage("<size=16><color=#86d493>COMMAND</color>: Fire green flares to the <b>LEFT</b>!</size>");
- }
- If(String.Equals(VariableString("input"),"/fr"))
- {
- Game.PrintMessage("<size=16><color=#86d493>COMMAND</color>: Fire green flares to the <b>RIGHT</b>!</size>");
- }
- If(String.Equals(VariableString("input"),"/ff"))
- {
- Game.PrintMessage("<size=16><color=#86d493>COMMAND</color>: Fire green flares FORWARD!</size>");
- }
- If(String.Equals(VariableString("input"),"/y"))
- {
- Game.PrintMessage("<size=18>[<color=#f4e129>YELLOW FLARE</color>]: Mission succes!</size>");
- }
- If(String.Equals(VariableString("input"),"/lf"))
- {
- Game.PrintMessage("[<color=#0061e7>LW</color>]: Move further from the center!");
- }
- If(String.Equals(VariableString("input"),"/lc"))
- {
- Game.PrintMessage("[<color=#0061e7>LW</color>]: Get Closer To Center!");
- }
- If(String.Equals(VariableString("input"),"/le"))
- {
- Game.PrintMessage("[<color=#0061e7>LW</color>]: Engage!");
- }
- If(String.Equals(VariableString("input"),"/lce"))
- {
- Game.PrintMessage("[<color=#0061e7>LW</color>]: Engage_Titans At Center!");
- }
- If(String.Equals(VariableString("input"),"/rf"))
- {
- Game.PrintMessage("[<color=#cc2e71>RW</color>]: Move further from the center!");
- }
- If(String.Equals(VariableString("input"),"/rc"))
- {
- Game.PrintMessage("[<color=#cc2e71>RW</color>]: Get Closer To Center!");
- }
- If(String.Equals(VariableString("input"),"/re"))
- {
- Game.PrintMessage("[<color=#cc2e71>RW</color>]: Engage!");
- }
- If(String.Equals(VariableString("input"),"/rce"))
- {
- Game.PrintMessage("[<color=#cc2e71>RW</color>]: Engage Titans At Center!");
- }
- If(String.Equals(VariableString("input"),"/ve"))
- {
- Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: <size=15>Engage</size>!");
- }
- If(String.Equals(VariableString("input"),"/vr"))
- {
- Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: <size=15>Regroup</size>!");
- }
- If(String.Equals(VariableString("input"),"/vf"))
- {
- Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: Move further from the center!!");
- }
- If(String.Equals(VariableString("input"),"/vc"))
- {
- Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: Move close to the center!");
- }
- If(String.Equals(VariableString("input"),"/sr"))
- {
- Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Right Wing!");
- }
- If(String.Equals(VariableString("input"),"/sl"))
- {
- Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Left Wing!");
- }
- If(String.Equals(VariableString("input"),"/sv"))
- {
- Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Vanguard");
- }
- If(String.Equals(VariableString("input"),"/g"))
- {
- Game.PrintMessage("[<color=#ff6400>COMMAND</color>]: ALL FIRE <color=#00ff00>GREEN</color> FLARES");
- }
- If(String.Equals(VariableString("input"),"/sg"))
- {
- Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Rear Guard!");
- }
- If(String.Equals(VariableString("input"),"/sce"))
- {
- Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Engage Titans At Center!");
- }
- If(String.Equals(VariableString("input"),"/sc"))
- {
- Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Move to center!");
- }
- If(String.Equals(VariableString("input"),"/gr"))
- {
- Game.PrintMessage("[<color=#7e1b75>REAR GUARD</color>]: Help the Right Wing!");
- }
- If(String.Equals(VariableString("input"),"/gl"))
- {
- Game.PrintMessage("[<color=#7e1b75>REAR GUARD</color>]: Help the Left Wing!");
- }
- If(String.Equals(VariableString("input"),"/gc"))
- {
- Game.PrintMessage("[<color=#7e1b75>REAR GUARD</color>]: Help the Center!");
- }
- If(String.Equals(VariableString("input"),"/lrf"))
- {
- Game.PrintMessage("<color=#2ecc71><size=20>Form Long Range Formation!</size></color>");
- }
- If(String.Equals(VariableString("input"),"/crf"))
- {
- Game.PrintMessage("<color=#2ecc71><size=20>Form Close Range Formation!</size></color>");
- }
- }
- // ADD MAP SPECIFIC LOGIC HERE
- If(String.Equals(VariableString("input"),"/annie"))
- {
- Game.PrintMessage("EM/Commands//annie[-]5467[-]0[-]7941[-]3666[-]5[-]80[-]180[-]20[-]0[-]60");
- VariableString.Set("Message", "EM/Commands//pm[-]1[-]Annie[-]is[-]spawned[-]");
- Game.PrintMessage("EM/Commands//pm[-]1[-]Annie[-]is[-]spawned[-]");
- }
- If(String.Equals(VariableString("input"), "/tproad"))
- {
- ForeachTitan("TitanMy")
- {
- Titan.MoveTitan(VariableTitan("TitanMy"), RegionRandomX("road_to_forest"),RegionRandomY("road_to_forest"),RegionRandomZ("road_to_forest"));
- }
- }
- // Commander Commands
- If(String.Equals(VariableString("input"), "/randompos"))
- {
- ForeachPlayer("EPlayer")
- {
- VariableFloat.Set("TC_X", VariablePlayer("MCPlayer").GetPositionX());
- VariableFloat.Set("TC_Y", VariablePlayer("MCPlayer").GetPositionY());
- VariableFloat.Set("TC_Z", VariablePlayer("MCPlayer").GetPositionZ());
- VariableInt.SetRandom("Teams", 1, 5);
- If(Int.Equals(VariableInt("Teams"), 1))
- {
- VariableFloat.Add("TC_X", 1000.0);
- }
- If(Int.Equals(VariableInt("Teams"), 2))
- {
- VariableFloat.Add("TC_X", -1000.0);
- }
- If(Int.Equals(VariableInt("Teams"), 3))
- {
- VariableFloat.Add("TC_Z", 1000.0);
- }
- If(Int.Equals(VariableInt("Teams"), 4))
- {
- VariableFloat.Add("TC_Z", -1000.0);
- }
- Player.MovePlayer(VariablePlayer("EPlayer"), VariableFloat("TC_X"), VariableFloat("TC_Y"), VariableFloat("TC_Z"));
- }
- }
- // Road to Forest commands
- // Titans
- If(String.Equals(VariableString("input"),"/road1"))
- {
- Game.PrintMessage("<size=20><color=#2ecc71>Erwin</color>: The 57th Expedition has begun! All Scouts move out!</size>");
- VariableString.Set("Region", "road_to_forest");
- Game.PrintMessage("EM/Commands//spawntitansatregion20");
- }
- If(String.Equals(VariableString("input"),"/road2"))
- {
- Game.PrintMessage("<size=20><color=#000000>Levi</color>: The Female Titan is approaching!</size>");
- Game.PrintMessage("<size=20><color=#2ecc71>Erwin</color>: All Scouts move to the Titan Forest!</size>");
- VariableString.Set("Region", "road_to_forest2");
- Game.PrintMessage("EM/Commands//spawntitansatregion23");
- }
- // DESERT
- If(String.Equals(VariableString("input"),"/desert"))
- {
- Game.PrintMessage("<size=20><color=#2ecc71>Erwin</color>: All Scouts move to the Wasteland!</size>");
- // -- TITAN CLASS TYPES --
- VariableInt.Set("TitanClass_Chance0", 0); // 10
- VariableInt.Set("TitanClass_Chance1", 101); // 45
- VariableInt.Set("TitanClass_Chance2", 102); // 95
- VariableInt.Set("TitanClass_Chance3", 103); // 100
- VariableString.Set("Region", "desert");
- VariableInt.Set("TitanAmount", 25);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- VariableInt.Set("TitanClass_Chance0", 10); // 10
- VariableInt.Set("TitanClass_Chance1", 45); // 45
- VariableInt.Set("TitanClass_Chance2", 95); // 95
- VariableInt.Set("TitanClass_Chance3", 100); // 100
- }
- // DESERT
- If(String.Equals(VariableString("input"),"/desert2"))
- {
- Game.PrintMessage("Unfinished you say? It is progress! Just like it all started two years ago");
- Game.PrintMessage("Every day is a victory");
- Game.PrintMessage("Every day is a step closer to our dreams");
- Game.PrintMessage("Do not think! Advance!");
- }
- // DESERT
- If(String.Equals(VariableString("input"),"/sethsall"))
- {
- VariableInt.Set("hsloop", 80);
- While(VariableInt.GreaterThan(VariableInt("hsloop"), 0))
- {
- VariableString.Concat("hsz", "EM/Commands//seths[-]", VariableInt("hsloop").ConvertToString(), "[-]300");
- Game.PrintMessage(VariableString("hsz"));
- VariableInt.Subtract("hsloop", 1);
- }
- }
- // DESERT
- If(String.Equals(VariableString("input"),"/resethsall"))
- {
- VariableInt.Set("hsloop", 80);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("hsloop"), 0))
- {
- VariableString.Concat("hsz", "EM/Commands//seths[-]", VariableInt("hsloop").ConvertToString(), "[-]45");
- Game.PrintMessage(VariableString("hsz"));
- VariableInt.Subtract("hsloop", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/forest"))
- {
- Game.PrintMessage("[<color=#406d32>SCOUT</color>]: The forest has been swarmed with titans!");
- VariableString.Set("Region", "forest_hell");
- VariableInt.Set("TitanAmount", 7);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/cannon"))
- {
- Game.PrintMessage("[<color=#406d32>SCOUT</color>]: Cannon town has been lost!");
- VariableString.Set("Region", "cannon_town");
- VariableInt.Set("TitanAmount", 10);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- // Revives
- If(String.Equals(VariableString("input"),"/revforest"))
- {
- Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Forest!</size></color></b>");
- ForeachPlayer("EPlayer")
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), false))
- {
- VariableInt.Add("Revives", 1);
- Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("RP_Forest_Zone"),RegionRandomY("RP_Forest_Zone"),RegionRandomZ("RP_Forest_Zone"));
- }
- }
- }
- // Teleports
- If(String.Equals(VariableString("input"),"/tpforest"))
- {
- ForeachTitan("TitanMy")
- {
- Titan.MoveTitan(VariableTitan("TitanMy"), RegionRandomX("Titan_Forest"),RegionRandomY("Titan_Forest"),RegionRandomZ("Titan_Forest"));
- }
- Game.PrintMessage("The_remaining_titans_entered_the_titan_forest_take_them_down!");
- }
- // Road to Castle
- // Titan
- If(String.Equals(VariableString("input"),"/black1"))
- {
- Game.PrintMessage("<color=#2ecc71>Erwin Smith</color>:Scouts move out! The expedition to retake <color=#d8bb0c>Wall Maria</color> has begun!");
- VariableString.Set("Region", "Black_Route1");
- VariableInt.Set("TitanAmount", 25);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/black2"))
- {
- VariableString.Set("Region", "Bridge1");
- VariableInt.Set("TitanAmount", 9);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/black3"))
- {
- VariableString.Set("Region", "Bridge2");
- VariableInt.Set("TitanAmount", 12);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/black4"))
- {
- Game.PrintMessage("A cave has been spotted! Move out!");
- VariableString.Set("Region", "Black_Route2");
- VariableInt.Set("TitanAmount", 10);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/black5"))
- {
- Game.PrintMessage("We spotted a castle in the distance move out and regroup there!");
- VariableString.Set("Region", "Black_Route3");
- VariableInt.Set("TitanAmount", 11);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/messruins"))
- {
- Game.PrintMessage("<b><color=#0066CC><size=14>Levi squad has started to fight near the ruins!</size></color></b>");
- Titan.SpawnTitanAt(4, 6.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
- Titan.SpawnTitanAt(4, 5.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
- Titan.SpawnTitanAt(4, 4.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
- Titan.SpawnTitanAt(4, 3.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
- }
- If(String.Equals(VariableString("input"),"/bridge"))
- {
- Game.PrintMessage("[<color=#406d32>SCOUT</color>]: The bridge has been lost!");
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
- }
- If(String.Equals(VariableString("input"),"/forest2"))
- {
- Game.PrintMessage("[<color=#406d32>SCOUT</color>]: The forest has been swarmed with titans!");
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
- }
- If(String.Equals(VariableString("input"),"/castle1"))
- {
- VariableString.Set("Region", "Castle_North");
- VariableInt.Set("TitanAmount", 12);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- If(String.Equals(VariableString("input"),"/castle2"))
- {
- VariableString.Set("Region", "Castle_West");
- VariableInt.Set("TitanAmount", 12);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- // Castle Spawn wave (25) South
- If(String.Equals(VariableString("input"),"/castle3"))
- {
- VariableString.Set("Region", "Castle_South");
- VariableInt.Set("TitanAmount", 12);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- // Castle Spawn wave (25) North
- If(String.Equals(VariableString("input"),"/castle4"))
- {
- VariableString.Set("Region", "Castle_East");
- VariableInt.Set("TitanAmount", 12);
- Game.PrintMessage("EM/Commands//settitanamount");
- While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
- {
- Game.PrintMessage("EM/Commands//spawntitanregion");
- VariableInt.Subtract("TitanAmount", 1);
- }
- }
- // Revives
- If(String.Equals(VariableString("input"), "/revfort"))
- {
- Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Fort</size></color></b>");
- ForeachPlayer("EPlayer")
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), false))
- {
- VariableInt.Add("Revives", 1);
- Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("fort_revive"),RegionRandomY("fort_revive"),RegionRandomZ("fort_revive"));
- }
- }
- }
- If(String.Equals(VariableString("input"), "/revbridge1"))
- {
- Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Bridge</size></color></b>");
- ForeachPlayer("EPlayer")
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), false))
- {
- VariableInt.Add("Revives", 1);
- Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("rev_bridge1"),RegionRandomY("rev_bridge1"),RegionRandomZ("rev_bridge1"));
- }
- }
- }
- If(String.Equals(VariableString("input"), "/revbridge2"))
- {
- Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Bridge</size></color></b>");
- ForeachPlayer("EPlayer")
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), false))
- {
- VariableInt.Add("Revives", 1);
- Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("rev_bridge2"),RegionRandomY("rev_bridge2"),RegionRandomZ("rev_bridge2"));
- }
- }
- }
- If(String.Equals(VariableString("input"), "/revcastle"))
- {
- Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Castle</size></color></b>");
- ForeachPlayer("EPlayer")
- {
- VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
- If(Bool.Equals(VariableBool("isAlive"), false))
- {
- VariableInt.Add("Revives", 1);
- Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("MC_Castle"),RegionRandomY("MC_Castle"),RegionRandomZ("MC_Castle"));
- }
- }
- }
- // Teleports
- If(String.Equals(VariableString("input"),"/tpcastle"))
- {
- ForeachTitan("TitanMy")
- {
- Titan.MoveTitan(VariableTitan("TitanMy"), RegionRandomX("Castle_Zone"),RegionRandomY("Castle_Zone"),RegionRandomZ("Castle_Zone"));
- }
- Game.PrintMessage("The_remaining_titans_have_entered_the_castle!");
- }
- // Crawler fun
- If(String.Equals(VariableString("input"),"/crawler"))
- {
- ForeachPlayer("EPlayer")
- {
- VariableFloat.Set("CP_X", VariablePlayer("EPlayer").GetPositionX());
- VariableFloat.Set("CP_Y", VariablePlayer("EPlayer").GetPositionY());
- VariableFloat.Set("CP_Z", VariablePlayer("EPlayer").GetPositionZ());
- VariableFloat.Add("CP_Y", 500.0);
- Titan.SpawnTitanAt(3, 2.0, VariableInt("TitanClass_HPMax0"), 1, VariableFloat("CP_X"),VariableFloat("CP_Y"),VariableFloat("CP_Z"));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment