p2svox

custom_logic_outside_v7.3_and_medic_v0.4.1

Oct 9th, 2019
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 125.94 KB | None | 0 0
  1. // Generic custom logic v7.3 by Erwin Smith#6637
  2. // Made with love <3
  3.  
  4. // TERMS AND CONDITIONS
  5. // 1. Do not alter the /credits command. The people worked hard on this logic, and removing their effort is disrespectfull.
  6. // 2. You are free to change the configuration settings.
  7. // 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.
  8.  
  9. // TODO:
  10. // Refactor help commands system
  11.  
  12. OnRoundStart()
  13. {
  14. // -- CONFIGURE THESE SETTINGS TO YOUR OWN PREFERENCE --
  15.  
  16. // EXPEDITION DIFFICULTY - 0 = easy, 1 = normal, 2 = hard. See --Expedition Difficulty Settings-- to change factors.
  17. VariableInt.Set("ExpeditionDifficulty", 1);
  18.  
  19. // -- Difficulty easy --
  20. VariableFloat.Set("HealthFactor0", 0.4);
  21. VariableFloat.Set("SpeedFactor0", 0.8);
  22. VariableFloat.Set("RegenSpeedFactor0", 0.5);
  23. VariableFloat.Set("RegenLimitFactor0", 0.7);
  24. VariableFloat.Set("TitanAmountFactor0", 0.8);
  25. VariableFloat.Set("ViewDistanceFactor0", 0.8);
  26.  
  27. // -- Difficulty normal --
  28. VariableFloat.Set("HealthFactor1", 1.0);
  29. VariableFloat.Set("SpeedFactor1", 1.0);
  30. VariableFloat.Set("RegenSpeedFactor1", 1.0);
  31. VariableFloat.Set("RegenLimitFactor1", 1.0);
  32. VariableFloat.Set("TitanAmountFactor1", 1.0);
  33. VariableFloat.Set("ViewDistanceFactor1", 1.0);
  34.  
  35. // -- Difficulty hard --
  36. VariableFloat.Set("HealthFactor2", 1.5);
  37. VariableFloat.Set("SpeedFactor2", 1.3);
  38. VariableFloat.Set("RegenSpeedFactor2", 4.0);
  39. VariableFloat.Set("RegenLimitFactor2", 1.7);
  40. VariableFloat.Set("TitanAmountFactor2", 1.2);
  41. VariableFloat.Set("ViewDistanceFactor2", 2.0);
  42.  
  43. // -- TOGGABLE SETTINGS --
  44. VariableBool.Set("EnablePlayerScaling", true); // Default true
  45. VariableBool.Set("EnableRandomTitanAnimation", false); // Default false
  46. VariableBool.Set("EnableRandomTitanSpeed", true); // Default true
  47. VariableBool.Set("EnableRandomTitanSkins", true); // Default true
  48. VariableBool.Set("EnableTitanHealth", true); // Default true
  49. VariableBool.Set("EnableTitanRegeneration", false); // Default false
  50. VariableBool.Set("EnableTitanViewDistance", false); // Default false
  51.  
  52. // Start message
  53. Game.PrintMessage("<size=15><color=#2ecc71>Welcome to the Expeditions Beyond the Walls!</color></size>");
  54. Game.PrintMessage("<size=12><color=#2ecc71>Map version 072</color></size>");
  55. Game.PrintMessage("<size=12><color=#123456>Custom Logic Version 7f WIP</color></size>");
  56. Game.PrintMessage("<size=12><color=#123456>Created with passion and love by Erwin Smith#6637</color></size>");
  57. Game.PrintMessage("<size=12><color=#654321>Special thanks to Syeo Potato Axel AnnieSwe & Marazul</color></size>");
  58.  
  59. // Timer message - Credits to Potato
  60. VariableString.Set("0", "<b><color=#00FF00>[Commander]</color>: Advance  In 10 Seconds!</b>");
  61. VariableString.Set("1", "<b>  10</b>");
  62. VariableString.Set("2", "<b>  9</b>");
  63. VariableString.Set("3", "<b>  8</b>");
  64. VariableString.Set("4", "<b>  7</b>");
  65. VariableString.Set("5", "<b>  6</b>");
  66. VariableString.Set("6", "<b>  5</b>");
  67. VariableString.Set("7", "<b>  4</b>");
  68. VariableString.Set("8", "<b>  3</b>");
  69. VariableString.Set("9", "<b>  2</b>");
  70. VariableString.Set("10", "<b>  1</b>");
  71. VariableString.Set("11", "<b><color=#00FF00>[Commander]</color>: All Soldiers! Advance!!!</b>");
  72.  
  73. // -- TITAN SETTINGS --
  74.  
  75. // TITAN TYPE: 0 = normie, 1 = abby, 2 = jumper, 3 = crawler, 4 = punk
  76. // TITAN CLASS: 0 = small, 1 = medium, 2 = large, 3 = extreme
  77.  
  78. // TitanTypeX = The chance that this titan type spawns
  79. // TitanClass_ChanceX = the chance for this class to spawn
  80. // Min size = the minumun size of this titan class
  81. // Max size = the maximun size of this titan class
  82. // HP Min = the minumun HP this class has
  83. // HP Max = the maximun HP this class has
  84. // Speed Min = Randomize how much less speed this class can have
  85. // Speed Max = Randomize how much more speed this class can have
  86. // Regen limit = the max HP this titan class can regenerate to
  87. // Regen ticks = the amount of HP this titan class will regenarate per second
  88. // Min Animation = the minumun Animation Speed this class has
  89. // Max Animation = the maximun Animation Speed this class has
  90. // Titan eye = A random eye skin that may be chosen
  91. // Titan skin = A random body skin that may be chosen
  92.  
  93. // -- TITAN TYPE CHANCES --
  94. VariableInt.Set("TitanType0", 15); // Default 15 - 0 = 15 percentage chance
  95. VariableInt.Set("TitanType1", 50); // Default 50 - 15 = 35 percentage chance
  96. VariableInt.Set("TitanType2", 83); // Default 75 - 50 = 25 percentage chance
  97. VariableInt.Set("TitanType3", 85); // Default 83 - 75 = 8 percentage chance
  98. VariableInt.Set("TitanType4", 100); // Default 100 - 83 = 17 percentage chance
  99.  
  100. // -- TITAN CLASS TYPES --
  101. VariableInt.Set("TitanClass_Chance0", 10); // Default 10 - 0 = 10 percentage chance
  102. VariableInt.Set("TitanClass_Chance1", 45); // Default 45 - 10 = 35 percentage chance
  103. VariableInt.Set("TitanClass_Chance2", 95); // Default 95 - 45 = 50 percentage chance
  104. VariableInt.Set("TitanClass_Chance3", 100); // Default 100 - 95 = 5 percentage chance
  105.  
  106. // -- TITAN CLASS SMALL --
  107. VariableFloat.Set("TitanClass_MinSize0", 1.5); // Default 1.5
  108. VariableFloat.Set("TitanClass_MaxSize0", 2.1); // Default 2.1
  109.  
  110. VariableInt.Set("TitanClass_HPMin0", 200); // Default 200
  111. VariableInt.Set("TitanClass_HPMax0", 500); // Default 500
  112.  
  113. VariableInt.Set("TitanClass_MinSpeed0", -5); // Default -5
  114. VariableInt.Set("TitanClass_MaxSpeed0", 5); // Default 5
  115.  
  116. VariableInt.Set("TitanClass_RegenLimit0", 500); // Default 500
  117. VariableInt.Set("TitanClass_RegenTicks0", 1); // Default 1
  118.  
  119. VariableFloat.Set("TitanClass_MinAnimation0", 1.0); // Default 1.0
  120. VariableFloat.Set("TitanClass_MaxAnimation0", 1.0); // Default 1.0
  121.  
  122. VariableInt.Set("TitanClass_ViewDistance0", 1250); // Default 1250
  123.  
  124. // -- TITAN CLASS Medium --
  125. VariableFloat.Set("TitanClass_MinSize1", VariableFloat("TitanClass_MaxSize0"));
  126. VariableFloat.Set("TitanClass_MaxSize1", 3.5); // Default 3.5
  127.  
  128. VariableInt.Set("TitanClass_HPMin1", 500); // Default 500
  129. VariableInt.Set("TitanClass_HPMax1", 700); // Default 700
  130.  
  131. VariableInt.Set("TitanClass_MinSpeed1", -10); // Default -10
  132. VariableInt.Set("TitanClass_MaxSpeed1", 10); // Default 10
  133.  
  134. VariableInt.Set("TitanClass_RegenLimit1", 1000); // Default 1000
  135. VariableInt.Set("TitanClass_RegenTicks1", 2); // Default 2
  136.  
  137. VariableFloat.Set("TitanClass_MinAnimation1", 1.0); // Default 1.0
  138. VariableFloat.Set("TitanClass_MaxAnimation1", 1.0); // Default 1.0
  139.  
  140. VariableInt.Set("TitanClass_ViewDistance1", 2500); // Default 2500
  141.  
  142. // -- TITAN CLASS Large --
  143. VariableFloat.Set("TitanClass_MinSize2", VariableFloat("TitanClass_MaxSize1"));
  144. VariableFloat.Set("TitanClass_MaxSize2", 4.1); // Default 4.1
  145.  
  146. VariableInt.Set("TitanClass_HPMin2", 700); // Default 700
  147. VariableInt.Set("TitanClass_HPMax2", 900); // Default 900
  148.  
  149. VariableInt.Set("TitanClass_MinSpeed2", -10); // Default -10
  150. VariableInt.Set("TitanClass_MaxSpeed2", 10); // Default 10
  151.  
  152. VariableInt.Set("TitanClass_RegenLimit2", 1500); // Default 1500
  153. VariableInt.Set("TitanClass_RegenTicks2", 5); // Default 5
  154.  
  155. VariableFloat.Set("TitanClass_MinAnimation2", 1.0); // Default 1.0
  156. VariableFloat.Set("TitanClass_MaxAnimation2", 1.0); // Default 1.0
  157.  
  158. VariableInt.Set("TitanClass_ViewDistance2", 4000); // Default 4000
  159.  
  160. // -- TITAN CLASS Extreme --
  161. VariableFloat.Set("TitanClass_MinSize3", VariableFloat("TitanClass_MaxSize2"));
  162. VariableFloat.Set("TitanClass_MaxSize3", 6.0); // Default 6.0
  163.  
  164. VariableInt.Set("TitanClass_HPMin3", 1000); // Default 1000
  165. VariableInt.Set("TitanClass_HPMax3", 1500); // Default 1500
  166.  
  167. VariableInt.Set("TitanClass_MinSpeed3", -10); // Default -10
  168. VariableInt.Set("TitanClass_MaxSpeed3", 10); // Default 10
  169.  
  170. VariableInt.Set("TitanClass_RegenLimit3", 5000); // Default 5000
  171. VariableInt.Set("TitanClass_RegenTicks3", 10); // Default 10
  172.  
  173. VariableFloat.Set("TitanClass_MinAnimation3", 1.0); // Default 1.0
  174. VariableFloat.Set("TitanClass_MaxAnimation3", 1.0); // Default 1.0
  175.  
  176. VariableInt.Set("TitanClass_ViewDistance3", 6000); // Default 6000
  177.  
  178. // -- TITAN SKINS --
  179.  
  180. // Titan Eyes
  181. VariableInt.Set("TitanEyes", 17); // total eye skins + 1
  182. VariableString.Set("Titan_Eye", "");
  183.  
  184. VariableString.Set("TitanEye1", "https://i[d]imgur[d]com/PEC8gPA[d]png");
  185. VariableString.Set("TitanEye2", "https://i[d]imgur[d]com/8fsSGqF[d]png");
  186. VariableString.Set("TitanEye3", "https://i[d]imgur[d]com/2DVFfJa[d]png ");
  187. VariableString.Set("TitanEye4", "https://i[d]imgur[d]com/JrCH46x[d]png");
  188. VariableString.Set("TitanEye5", "https://i[d]imgur[d]com/Ynp8ay3[d]png");
  189. VariableString.Set("TitanEye6", "https://i[d]imgur[d]com/hnPYbLC[d]png");
  190. VariableString.Set("TitanEye7", "https://i[d]imgur[d]com/vXdOo6t[d]png");
  191. VariableString.Set("TitanEye8", "https://i[d]imgur[d]com/JUyhkVs[d]png");
  192. VariableString.Set("TitanEye9", "https://i[d]imgur[d]com/ZUZwYiJ[d]png");
  193. VariableString.Set("TitanEye10", "http://i[d]imgur[d]com/ZbCl2Mz[d]png");
  194. VariableString.Set("TitanEye11", "https://i[d]imgur[d]com/KGjykcY[d]png");
  195. VariableString.Set("TitanEye12", "https://i[d]imgur[d]com/IL7KwM6[d]png");
  196. VariableString.Set("TitanEye13", "http://i[d]imgur[d]com/V8fVoEa[d]png");
  197. VariableString.Set("TitanEye14", "http://i[d]imgur[d]com/o2Eqgyo[d]png");
  198. VariableString.Set("TitanEye15", "https://i[d]imgur[d]com/iYUJ5ZC[d]png");
  199. VariableString.Set("TitanEye16", "https://i[d]imgur[d]com/wga4usM[d]png");
  200. VariableString.Set("TitanEye17", "");
  201. VariableString.Set("TitanEye18", "");
  202. VariableString.Set("TitanEye19", "");
  203. VariableString.Set("TitanEye20", "");
  204.  
  205. // Titan bodies
  206. VariableInt.Set("TitanSkins", 11); // Total body skins + 1
  207. VariableString.Set("Titan_Skin", "");
  208.  
  209. VariableString.Set("TitanSkin1", "https://i[d]imgur[d]com/cO4nVMy[d]jpg");
  210. VariableString.Set("TitanSkin2", "https://i[d]imgur[d]com/s4nG4f0[d]png");
  211. VariableString.Set("TitanSkin3", "https://i[d]imgur[d]com/DjfElmk[d]png");
  212. VariableString.Set("TitanSkin4", "https://i[d]imgur[d]com/DjfElmk[d]png");
  213. VariableString.Set("TitanSkin5", "https://i[d]imgur[d]com/p0G6G7t[d]png");
  214. VariableString.Set("TitanSkin6", "https://cdn[d]discordapp[d]com/attachments/345361079708155904/546363704984207362/titan[d]png");
  215. VariableString.Set("TitanSkin7", "https://cdn[d]discordapp[d]com/attachments/345361079708155904/546363829475344384/xx[d]png");
  216. VariableString.Set("TitanSkin8", "https://i[d]imgur[d]com/tTEkWbX[d]jpg");
  217. VariableString.Set("TitanSkin9", "https://i[d]imgur[d]com/zWFuznD[d]jpg");
  218. VariableString.Set("TitanSkin10", "https://i[d]imgur[d]com/QdEMjdE[d]jpg");
  219. 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");
  220. VariableString.Set("TitanSkin12", "");
  221. VariableString.Set("TitanSkin13", "");
  222. VariableString.Set("TitanSkin14", "");
  223. VariableString.Set("TitanSkin15", "");
  224. VariableString.Set("TitanSkin16", "");
  225. VariableString.Set("TitanSkin17", "");
  226. VariableString.Set("TitanSkin18", "");
  227. VariableString.Set("TitanSkin19", "");
  228. VariableString.Set("TitanSkin20", "");
  229.  
  230. // Titan speed default values
  231. // Speed = X * size + Z
  232. VariableFloat.Set("TitanSpeedX0", 2.371); // Default 2.371
  233. VariableFloat.Set("TitanSpeedZ0", 6.900); // Default 6.900
  234. VariableFloat.Set("TitanSpeedX1", 7.254); // Default 7.254
  235. VariableFloat.Set("TitanSpeedZ1", 20.03); // Default 20.03
  236. VariableFloat.Set("TitanSpeedX2", 7.254); // Default 7.254
  237. VariableFloat.Set("TitanSpeedZ2", 20.03); // Default 20.03
  238. VariableFloat.Set("TitanSpeedX3", 14.22); // Default 14.22
  239. VariableFloat.Set("TitanSpeedZ3", 40.47); // Default 40.47
  240. VariableFloat.Set("TitanSpeedX4", 7.254); // Default 7.254
  241. VariableFloat.Set("TitanSpeedZ4", 20.03); // Default 20.03
  242.  
  243. // -- SCORE VARIABLES --
  244. VariableInt.Set("TimePoints", -1); // -1 point / time
  245. VariableInt.Set("RevivePoints", -25); // -25 points / revive
  246. VariableInt.Set("KillPoints", 50); // 10 points / kill
  247. VariableInt.Set("DeathPoints", -25); // -25 points / death
  248. VariableInt.Set("ObjectivePoints", 1000); // 1000 points / objective
  249. VariableInt.Set("BonusObjectivePoints", 500); // 500 points / objective
  250.  
  251. // -- PLAYER SCALING --
  252. VariableFloat.Set("PlayerFactorSmall", 0.7); // Less than 10 players
  253. VariableFloat.Set("PlayerFactorMedium", 1.0); // 10 to 15 players
  254. VariableFloat.Set("PlayerFactorLarge", 1.2); // 15 to 20 players
  255. VariableFloat.Set("PlayerFactorExtreme", 1.5); // 20+
  256.  
  257. // END OF CONFIGURABLE SETTINGS IGNORE THE SETTINGS BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
  258.  
  259. VariableBool.Set("CountDown", false);
  260.  
  261. VariablePlayer.Set("MCPlayer", VariablePlayer("null")); // MC player
  262. VariablePlayer.Set("EPlayer", VariablePlayer("null")); // Player Collection Variable
  263. VariablePlayer.Set("CPlayer", VariablePlayer("null"));
  264.  
  265. VariableInt.Set("Score", 0); // The total score
  266.  
  267. VariableBool.Set("Timer", false);
  268. VariableInt.Set("Time", 0); // Total time
  269. VariableInt.Set("Revives", 0); // Total amount of revives
  270. VariableInt.Set("Kills", 0); // Total kills
  271. VariableInt.Set("Objectives", 0); // Total objectives completed
  272. VariableInt.Set("BonusObjectives", 0); // Total objectives completed
  273.  
  274. // Revive cords
  275. VariableFloat.Set("Revive_X", 0.0); // used for /reviveatpos
  276. VariableFloat.Set("Revive_Y", 0.0); // used for /reviveatpos
  277. VariableFloat.Set("Revive_Z", 0.0); // used for /reviveatpos
  278.  
  279. // Region cords
  280. VariableFloat.Set("X+", 2500.0); // positive X
  281. VariableFloat.Set("X-", -2500.0); // negative X
  282. VariableFloat.Set("Y+", 2500.0); // positive Y
  283. VariableFloat.Set("Y-", -2500.0); // negative Y
  284.  
  285. // Titan variables - ommit default values otherwise NullReferrenceExceptions!
  286. VariableFloat.Set("Titan_X", 0.0); // titan X cord
  287. VariableFloat.Set("Titan_Y", 0.0); // titan Y cord
  288. VariableFloat.Set("Titan_Z", 0.0); // titan Z cord
  289. VariableInt.Set("Titan_Type", 0); // 0 - normie, 1 abby, 2 jump, 3 crawler, 4 punk
  290. VariableInt.Set("Titan_Class", 0); // 0 - small, 1 - medium, 2 - large, 3 - extreme
  291. VariableFloat.Set("Titan_Size", 1.0); // 1 - 1000
  292. VariableInt.Set("Titan_HP", 0);
  293. VariableInt.Set("Titan_Speed", 0);
  294. VariableFloat.Set("Titan_Animation", 1.0);
  295. VariableInt.Set("Titan_ViewDistance", 2500);
  296. VariableInt.Set("TitanAmount", 0);
  297.  
  298. // Titan difficulty
  299. VariableFloat.Set("HealthFactor", 1.0);
  300. VariableFloat.Set("SpeedFactor", 1.0);
  301. VariableFloat.Set("RegenLimitFactor", 1.0);
  302. VariableFloat.Set("RegenSpeedFactor", 1.0);
  303. VariableFloat.Set("TitanAmountFactor", 1.0);
  304. VariableFloat.Set("ViewDistanceFactor", 1.0);
  305.  
  306. VariableString.Set("Message", "");
  307.  
  308. // Player balance
  309. VariableInt.Set("TotalPlayers", 0);
  310. VariableInt.Set("TotalPlayersTimer", 0);
  311. VariableFloat.Set("PlayerFactor", 1.0); // Default 1.0
  312.  
  313. // Auto player revive
  314. VariableBool.Set("AutoPosRevive", false);
  315. VariableInt.Set("AutoPosReviveTimer", 0);
  316. VariableInt.Set("AutoPosReviveTimeLimit", 30); // Auto revive every 30s
  317.  
  318. // V6 additions
  319.  
  320. VariableBool.Set("SetVariableNameValue", false);
  321. VariableBool.Set("SetVariableTypeValue", false);
  322. VariableBool.Set("SetVariable", false);
  323. VariableString.Set("SetVariableName", "");
  324. VariableInt.Set("SetVariableType", 0); // 0 = integer, 1 = boolean, 2 = string, 3 = float
  325.  
  326. VariableString.Set("SetVariableName", "WhileCommand");
  327.  
  328. Game.PrintMessage("EM/Commands//startup"); // Execute a few commands on start up
  329.  
  330.  
  331. 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");
  332. Game.PrintMessage("Include<size=1>____</size>the<size=1>____</size>space");
  333.  
  334. VariableBool.Set("runScript", false);
  335. VariableBool.Set("firstRun", true);
  336.  
  337. }
  338.  
  339. // Titan kill count
  340. OnTitanDie("DeadTitan", "MurdererPlayer")
  341. {
  342. VariableInt.Add("Kills", 1);
  343. }
  344.  
  345. OnUpdate()
  346. {
  347. If(Bool.Equals(VariableBool("runScript"), true))
  348. {
  349. If(Bool.Equals(VariableBool("firstRun"), true))
  350. {
  351. VariableString.Set("char0", "0");
  352. VariableString.Set("char1", "1");
  353. VariableString.Set("char2", "2");
  354. VariableString.Set("char3", "3");
  355. VariableString.Set("char4", "4");
  356. VariableString.Set("char5", "5");
  357. VariableString.Set("char6", "6");
  358. VariableString.Set("char7", "7");
  359. VariableString.Set("char8", "8");
  360. VariableString.Set("char9", "9");
  361. VariableString.Set("char10", "a");
  362. VariableString.Set("char11", "b");
  363. VariableString.Set("char12", "c");
  364. VariableString.Set("char13", "d");
  365. VariableString.Set("char14", "e");
  366. VariableString.Set("char15", "f");
  367. VariableString.Set("char16", "A");
  368. VariableString.Set("char17", "B");
  369. VariableString.Set("char18", "C");
  370. VariableString.Set("char19", "D");
  371. VariableString.Set("char20", "E");
  372. VariableString.Set("char21", "F");
  373. VariableString.Set("char22", "g");
  374. VariableString.Set("char23", "h");
  375. VariableString.Set("char24", "i");
  376. VariableString.Set("char25", "j");
  377. VariableString.Set("char26", "k");
  378. VariableString.Set("char27", "l");
  379. VariableString.Set("char28", "m");
  380. VariableString.Set("char29", "n");
  381. VariableString.Set("char30", "o");
  382. VariableString.Set("char31", "p");
  383. VariableString.Set("char32", "q");
  384. VariableString.Set("char33", "r");
  385. VariableString.Set("char34", "s");
  386. VariableString.Set("char35", "t");
  387. VariableString.Set("char36", "u");
  388. VariableString.Set("char37", "v");
  389. VariableString.Set("char38", "w");
  390. VariableString.Set("char39", "x");
  391. VariableString.Set("char40", "y");
  392. VariableString.Set("char41", "z");
  393. VariableString.Set("char42", "G");
  394. VariableString.Set("char43", "H");
  395. VariableString.Set("char44", "I");
  396. VariableString.Set("char45", "J");
  397. VariableString.Set("char46", "K");
  398. VariableString.Set("char47", "L");
  399. VariableString.Set("char48", "M");
  400. VariableString.Set("char49", "N");
  401. VariableString.Set("char50", "O");
  402. VariableString.Set("char51", "P");
  403. VariableString.Set("char52", "Q");
  404. VariableString.Set("char53", "R");
  405. VariableString.Set("char54", "S");
  406. VariableString.Set("char55", "T");
  407. VariableString.Set("char56", "U");
  408. VariableString.Set("char57", "V");
  409. VariableString.Set("char58", "W");
  410. VariableString.Set("char59", "X");
  411. VariableString.Set("char60", "Y");
  412. VariableString.Set("char61", "Z");
  413. VariableString.Set("char62", "'");
  414.  
  415. VariableFloat.Set("radius", 50.0);
  416. VariableInt.Set("revTime", 5);
  417. VariableInt.Set("deathTime", 120);
  418. VariableInt.Set("cooldown", 30);
  419. VariableInt.Set("counterMain", 0);
  420. VariableInt.Set("cooldown0", 0);
  421. VariableInt.Set("cooldown1", 0);
  422. VariableInt.Set("cooldown2", 0);
  423. VariableInt.Set("cooldown3", 0);
  424. VariableInt.Set("cooldown4", 0);
  425. VariableInt.Set("cooldown5", 0);
  426. VariableInt.Set("cooldown6", 0);
  427. VariableInt.Set("cooldown7", 0);
  428. VariableInt.Set("cooldown8", 0);
  429. VariableInt.Set("cooldown9", 0);
  430. VariableInt.Set("cooldown10", 0);
  431. VariableInt.Set("cooldown11", 0);
  432. VariableInt.Set("cooldown12", 0);
  433. VariableInt.Set("cooldown13", 0);
  434. VariableInt.Set("cooldown14", 0);
  435. VariableInt.Set("cooldown15", 0);
  436. VariableInt.Set("cooldown16", 0);
  437. VariableInt.Set("cooldown17", 0);
  438. VariableInt.Set("cooldown18", 0);
  439. VariableInt.Set("cooldown19", 0);
  440. VariableInt.Set("cooldown20", 0);
  441. VariableInt.Set("cooldown21", 0);
  442. VariableInt.Set("cooldown22", 0);
  443. VariableInt.Set("cooldown23", 0);
  444. VariableInt.Set("cooldown24", 0);
  445. VariableInt.Set("cooldown25", 0);
  446. VariableInt.Set("cooldown26", 0);
  447. VariableInt.Set("cooldown27", 0);
  448. VariableInt.Set("cooldown28", 0);
  449. VariableInt.Set("cooldown29", 0);
  450. 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>");
  451. Game.PrintMessage(VariableString("radiusWhat"));
  452. 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>");
  453. Game.PrintMessage(VariableString("revTimeWhat"));
  454. 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>");
  455. Game.PrintMessage(VariableString("deathWhat"));
  456. 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>");
  457. Game.PrintMessage(VariableString("cooldownWhat"));
  458.  
  459. Game.PrintMessage("Script<size=1>____</size>initialized");
  460. VariableBool.Set("firstRun", false);
  461. }
  462.  
  463. VariableInt.Set("counterPlayer", 0);
  464. VariablePlayer.Set("player", VariablePlayer("null"));
  465. ForeachPlayer("player")
  466. {
  467. VariableString.Concat("xDir","x",VariableInt("counterPlayer").ConvertToString());
  468. VariableString.Concat("yDir","y",VariableInt("counterPlayer").ConvertToString());
  469. VariableString.Concat("zDir","z",VariableInt("counterPlayer").ConvertToString());
  470. VariableString.Concat("revDir","rev",VariableInt("counterPlayer").ConvertToString());
  471. VariableString.Concat("deathDir","death",VariableInt("counterPlayer").ConvertToString());
  472. VariableString.Concat("cooldownDirMain","cooldown",VariableInt("counterPlayer").ConvertToString());
  473. If(Bool.Equals(VariablePlayer("player").GetIsAlive(), true))
  474. {
  475. VariableFloat.Set("x", VariablePlayer("player").GetPositionX());
  476. VariableFloat.Set("y", VariablePlayer("player").GetPositionY());
  477. VariableFloat.Set("z", VariablePlayer("player").GetPositionZ());
  478. If(Float.NotEquals(VariableFloat("x"), 0.0))
  479. {
  480. VariableFloat.Set(VariableString("xDir"), VariableFloat("x"));
  481. }
  482. If(Float.NotEquals(VariableFloat("y"), 0.0))
  483. {
  484. VariableFloat.Set(VariableString("yDir"), VariableFloat("y"));
  485. }
  486. If(Float.NotEquals(VariableFloat("z"), 0.0))
  487. {
  488. VariableFloat.Set(VariableString("zDir"), VariableFloat("z"));
  489. }
  490. VariableInt.Set(VariableString("revDir"), 0);
  491. VariableInt.Set(VariableString("deathDir"), 0);
  492. }
  493. If(Bool.Equals(VariablePlayer("player").GetIsAlive(), false))
  494. {
  495. If(Int.LessThan(VariableInt(VariableString("deathDir")), VariableInt("deathTime")))
  496. {
  497. VariableInt.Set("counterPlayerMedic", 0);
  498. VariablePlayer.Set("playerMedic", VariablePlayer("null"));
  499. ForeachPlayer("playerMedic")
  500. {
  501. VariableString.Concat("cooldownDirSub","cooldown",VariableInt("counterPlayerMedic").ConvertToString());
  502. If(Player.NotEquals(VariablePlayer("player"), VariablePlayer("playerMedic")))
  503. {
  504. If(String.Equals(VariablePlayer("playerMedic").GetGuildName(), "[ffffff][ffffff]Medic"))
  505. {
  506. If(Bool.Equals(VariablePlayer("playerMedic").GetIsAlive(), true))
  507. {
  508. If(Int.LessThanOrEqual(VariableInt(VariableString("cooldownDirSub")), 0))
  509. {
  510. VariableFloat.Set("xgreater", VariableFloat(VariableString("xDir")));
  511. VariableFloat.Add("xgreater", VariableFloat("radius"));
  512. If(Float.LessThan(VariablePlayer("playerMedic").GetPositionX(), VariableFloat("xgreater")))
  513. {
  514. VariableFloat.Set("xless", VariableFloat(VariableString("xDir")));
  515. VariableFloat.Subtract("xless", VariableFloat("radius"));
  516. If(Float.GreaterThan(VariablePlayer("playerMedic").GetPositionX(), VariableFloat("xless")))
  517. {
  518. VariableFloat.Set("zgreater", VariableFloat(VariableString("zDir")));
  519. VariableFloat.Add("zgreater", VariableFloat("radius"));
  520. If(Float.LessThan(VariablePlayer("playerMedic").GetPositionZ(), VariableFloat("zgreater")))
  521. {
  522. VariableFloat.Set("zless", VariableFloat(VariableString("zDir")));
  523. VariableFloat.Subtract("zless", VariableFloat("radius"));
  524. If(Float.GreaterThan(VariablePlayer("playerMedic").GetPositionZ(), VariableFloat("zless")))
  525. {
  526. VariableInt.Add(VariableString("revDir"), 1);
  527. If(Int.Equals(VariableInt(VariableString("revDir")), 1))
  528. {
  529. VariableString.Set("playerName", VariablePlayer("player").GetName())
  530.  
  531. VariableInt.Set("playerPartCounter", 0);
  532. While(String.StartsWith(VariableString("playerName"), "["))
  533. {
  534. VariableString.Concat("playerName", "```", VariableString("playerName"));
  535. VariableString.Replace("playerName", "```[", "");
  536.  
  537. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  538. VariableString.Set(VariableString("playerHexDir"), "")
  539.  
  540. VariableInt.Set("hexCounterMaster", 0);
  541. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  542. {
  543. VariableInt.Set("hexCounter", 0);
  544. While(Int.LessThan(VariableInt("hexCounter"), 22))
  545. {
  546. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  547.  
  548. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  549. {
  550. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  551.  
  552. VariableString.Concat("playerName", "```", VariableString("playerName"));
  553. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  554. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  555. }
  556.  
  557. VariableInt.Add("hexCounter", 1);
  558. }
  559. VariableInt.Add("hexCounterMaster", 1);
  560. }
  561.  
  562. VariableString.Concat("playerName", "```", VariableString("playerName"));
  563. VariableString.Replace("playerName", "```]", "");
  564.  
  565. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  566. VariableString.Set(VariableString("playerABCDir"), "")
  567.  
  568. VariableInt.Set("ABCCounterMaster", 0);
  569. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  570. {
  571. VariableInt.Set("ABCCounter", 0);
  572. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  573. {
  574. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  575.  
  576. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  577. {
  578. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  579.  
  580. VariableString.Concat("playerName", "```", VariableString("playerName"));
  581. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  582. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  583. }
  584.  
  585. VariableInt.Add("ABCCounter", 1);
  586. }
  587. VariableInt.Add("ABCCounterMaster", 1);
  588. }
  589.  
  590. VariableInt.Add("playerPartCounter", 1);
  591. }
  592.  
  593. VariableString.Set("playerPrintName", "");
  594. VariableInt.Set("printNameCounter", 0);
  595. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  596. {
  597. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  598. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  599.  
  600. VariableString.Append("playerPrintName", "<color=#");
  601. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  602. VariableString.Append("playerPrintName", ">");
  603. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  604. VariableString.Append("playerPrintName", "</color>");
  605.  
  606. VariableInt.Add("printNameCounter", 1);
  607. }
  608. 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>");
  609. Game.PrintMessage(VariableString("reviveWho"));
  610. }
  611. If(Int.GreaterThanOrEqual(VariableInt(VariableString("revDir")), VariableInt("revTime")))
  612. {
  613. Player.SpawnPlayerAt(VariablePlayer("player"), VariablePlayer("playerMedic").GetPositionX(), VariablePlayer("playerMedic").GetPositionY(), VariablePlayer("playerMedic").GetPositionZ());
  614. VariableInt.Set(VariableString("revDir"), 0);
  615. VariableInt.Set(VariableString("cooldownDirSub"), VariableInt("cooldown"));
  616. }
  617. }
  618. }
  619. }
  620. }
  621. }
  622. }
  623. }
  624. }
  625. VariableInt.Add("counterPlayerMedic", 1);
  626. }
  627. }
  628. If(Int.Equals(VariableInt(VariableString("deathDir")), VariableInt("deathTime")))
  629. {
  630. VariableString.Set("playerName", VariablePlayer("player").GetName())
  631.  
  632. VariableInt.Set("playerPartCounter", 0);
  633. While(String.StartsWith(VariableString("playerName"), "["))
  634. {
  635. VariableString.Concat("playerName", "```", VariableString("playerName"));
  636. VariableString.Replace("playerName", "```[", "");
  637.  
  638. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  639. VariableString.Set(VariableString("playerHexDir"), "")
  640.  
  641. VariableInt.Set("hexCounterMaster", 0);
  642. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  643. {
  644. VariableInt.Set("hexCounter", 0);
  645. While(Int.LessThan(VariableInt("hexCounter"), 22))
  646. {
  647. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  648.  
  649. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  650. {
  651. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  652.  
  653. VariableString.Concat("playerName", "```", VariableString("playerName"));
  654. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  655. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  656. }
  657.  
  658. VariableInt.Add("hexCounter", 1);
  659. }
  660. VariableInt.Add("hexCounterMaster", 1);
  661. }
  662.  
  663. VariableString.Concat("playerName", "```", VariableString("playerName"));
  664. VariableString.Replace("playerName", "```]", "");
  665.  
  666. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  667. VariableString.Set(VariableString("playerABCDir"), "")
  668.  
  669. VariableInt.Set("ABCCounterMaster", 0);
  670. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  671. {
  672. VariableInt.Set("ABCCounter", 0);
  673. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  674. {
  675. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  676.  
  677. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  678. {
  679. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  680.  
  681. VariableString.Concat("playerName", "```", VariableString("playerName"));
  682. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  683. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  684. }
  685.  
  686. VariableInt.Add("ABCCounter", 1);
  687. }
  688. VariableInt.Add("ABCCounterMaster", 1);
  689. }
  690.  
  691. VariableInt.Add("playerPartCounter", 1);
  692. }
  693.  
  694. VariableString.Set("playerPrintName", "");
  695. VariableInt.Set("printNameCounter", 0);
  696. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  697. {
  698. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  699. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  700.  
  701. VariableString.Append("playerPrintName", "<color=#");
  702. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  703. VariableString.Append("playerPrintName", ">");
  704. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  705. VariableString.Append("playerPrintName", "</color>");
  706.  
  707. VariableInt.Add("printNameCounter", 1);
  708. }
  709. 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>");
  710. Game.PrintMessage(VariableString("whoHasBeenLost"));
  711. }
  712. VariableInt.Add(VariableString("deathDir"), 1);
  713. }
  714. VariableInt.Add("counterPlayer", 1);
  715. VariableInt.Subtract(VariableString("cooldownDirMain"), 1);
  716. }
  717. VariableInt.Add("counterMain", 1);
  718. }
  719. // Titan regeneration
  720. If(Bool.Equals(VariableBool("EnableTitanRegeneration"), true))
  721. {
  722.  
  723. VariableString.Concat("RegenLimitF", "RegenLimitFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
  724. VariableString.Concat("RegenSpeedF", "RegenLimitFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
  725. ForeachTitan("RTitan")
  726. {
  727.  
  728. VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
  729. VariableFloat.Set("TitanSize", VariableTitan("RTitan").GetSize());
  730. // Titan class small
  731. If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize0")))
  732. {
  733.  
  734. VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
  735. VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit0").ConvertToFloat());
  736. VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
  737.  
  738. If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
  739. {
  740. VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
  741.  
  742. VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
  743. VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks0").ConvertToFloat());
  744. VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
  745.  
  746. VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
  747. Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
  748. }
  749. }
  750.  
  751. // titan class medium
  752. If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize1")))
  753. {
  754. If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize1")))
  755. {
  756.  
  757. VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
  758. VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit1").ConvertToFloat());
  759. VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
  760.  
  761. If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
  762. {
  763. VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
  764.  
  765. VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
  766. VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks1").ConvertToFloat());
  767. VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
  768.  
  769. VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
  770. Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
  771. }
  772.  
  773. }
  774. }
  775.  
  776. // titan class large
  777. If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize2")))
  778. {
  779. If(Float.LessThan(VariableFloat("TitanSize"), VariableFloat("TitanClass_MaxSize2")))
  780. {
  781.  
  782. VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
  783. VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit2").ConvertToFloat());
  784. VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
  785.  
  786. If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
  787. {
  788. VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
  789.  
  790. VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
  791. VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks2").ConvertToFloat());
  792. VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
  793.  
  794. VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
  795. Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
  796. }
  797.  
  798. }
  799. }
  800.  
  801. // titan class extreme
  802. If(Float.GreaterThanOrEqual(VariableFloat("TitanSize"), VariableFloat("TitanClass_MinSize3")))
  803. {
  804.  
  805. VariableFloat.Set("RegenLimitFactor", VariableFloat(VariableString("RegenLimitF")));
  806. VariableFloat.Multiply("RegenLimitFactor", VariableInt("TitanClass_RegenLimit3").ConvertToFloat());
  807. VariableInt.Set("TitanClass_RegenLimit", VariableFloat("RegenLimitFactor").ConvertToInt());
  808.  
  809. If(Int.LessThan(VariableInt("TitanHP"), VariableInt("TitanClass_RegenLimit")))
  810. {
  811. VariableInt.Set("TitanHP", VariableTitan("RTitan").GetHealth());
  812.  
  813. VariableFloat.Set("RegenSpeedFactor", VariableFloat(VariableString("RegenSpeedF")));
  814. VariableFloat.Multiply("RegenSpeedFactor", VariableInt("TitanClass_RegenTicks3").ConvertToFloat());
  815. VariableInt.Set("TitanClass_RegenTicks", VariableFloat("RegenSpeedFactor").ConvertToInt());
  816.  
  817. VariableInt.Add("TitanHP", VariableInt("TitanClass_RegenTicks"));
  818. Titan.SetHealth(VariableTitan("RTitan"), VariableInt("TitanHP"));
  819. }
  820. }
  821.  
  822. }
  823. }
  824.  
  825. // Time count
  826. If(Bool.Equals(VariableBool("Timer"), true))
  827. {
  828. VariableInt.Add("Time", 1); // Add 1 / seconds
  829. }
  830.  
  831. // Exp start counter
  832. If(Bool.Equals(VariableBool("CountDown"), true))
  833. {
  834. VariableString.Set("Temp", VariableInt("Count").ConvertToString());
  835. Game.PrintMessage(VariableString(VariableString("Temp")));
  836. VariableInt.Add("Count", 1);
  837. If(VariableInt.Equals(VariableInt("Count"), 12))
  838. {
  839. VariableBool.Set("CountDown", false);
  840. }
  841. }
  842.  
  843. // Player scaling
  844. If(Bool.Equals(VariableBool("EnablePlayerScaling"), true))
  845. {
  846. // Player balance. Check amount of players every 5 minutes for player balancing
  847. If(VariableInt.GreaterThanOrEqual(VariableInt("TotalPlayersTimer"), 300))
  848. {
  849. VariableInt.Set("TotalPlayers", 0);
  850. VariableInt.Set("TotalPlayersTimer", 0);
  851. ForeachPlayer("EPlayer")
  852. {
  853. VariableInt.Add("TotalPlayers", 1);
  854. }
  855. Game.PrintMessage("EM/Commands//setplayerfactor");
  856. }
  857. VariableInt.Add("TotalPlayersTimer", 1);
  858. }
  859.  
  860. // Auto player revive
  861. If(Bool.Equals(VariableBool("AutoPosRevive"), true))
  862. {
  863. VariableInt.Add("AutoPosReviveTimer", 1);
  864. If(VariableInt.GreaterThanOrEqual(VariableInt("AutoPosReviveTimer"), VariableInt("AutoPosReviveTimeLimit")))
  865. {
  866. Game.PrintMessage("EM/Commands//revpos");
  867. VariableInt.Set("AutoPosReviveTimer", 0);
  868. }
  869.  
  870. }
  871.  
  872. }
  873.  
  874.  
  875. // -- CHAT COMMANDS --
  876. OnChatInput("input")
  877. {
  878. If(String.StartsWith(VariableString("input"), "/medic"))
  879. {
  880. VariableString.Concat("medicScraper", "/medic", VariableString("char63"));
  881. VariableString.Remove("input", VariableString("medicScraper"));
  882. VariablePlayer.Set("player", VariablePlayer("null"));
  883. ForeachPlayer("player")
  884. {
  885. VariableBool.Set("passNotMedic", false);
  886.  
  887. VariableString.Set("playerName", VariablePlayer("player").GetName())
  888.  
  889. VariableInt.Set("playerPartCounter", 0);
  890. While(String.StartsWith(VariableString("playerName"), "["))
  891. {
  892. VariableString.Concat("playerName", "```", VariableString("playerName"));
  893. VariableString.Replace("playerName", "```[", "");
  894.  
  895. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  896. VariableString.Set(VariableString("playerHexDir"), "")
  897.  
  898. VariableInt.Set("hexCounterMaster", 0);
  899. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  900. {
  901. VariableInt.Set("hexCounter", 0);
  902. While(Int.LessThan(VariableInt("hexCounter"), 22))
  903. {
  904. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  905.  
  906. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  907. {
  908. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  909.  
  910. VariableString.Concat("playerName", "```", VariableString("playerName"));
  911. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  912. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  913. }
  914.  
  915. VariableInt.Add("hexCounter", 1);
  916. }
  917. VariableInt.Add("hexCounterMaster", 1);
  918. }
  919.  
  920. VariableString.Concat("playerName", "```", VariableString("playerName"));
  921. VariableString.Replace("playerName", "```]", "");
  922.  
  923. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  924. VariableString.Set(VariableString("playerABCDir"), "")
  925.  
  926. VariableInt.Set("ABCCounterMaster", 0);
  927. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  928. {
  929. VariableInt.Set("ABCCounter", 0);
  930. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  931. {
  932. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  933.  
  934. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  935. {
  936. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  937.  
  938. VariableString.Concat("playerName", "```", VariableString("playerName"));
  939. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  940. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  941. }
  942.  
  943. VariableInt.Add("ABCCounter", 1);
  944. }
  945. VariableInt.Add("ABCCounterMaster", 1);
  946. }
  947.  
  948. VariableInt.Add("playerPartCounter", 1);
  949. }
  950.  
  951. VariableString.Set("playerPrintName", "");
  952. VariableInt.Set("printNameCounter", 0);
  953. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  954. {
  955. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  956. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  957.  
  958. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  959.  
  960. VariableInt.Add("printNameCounter", 1);
  961. }
  962.  
  963. If(String.Contains(VariableString("playerPrintName"), VariableString("input")))
  964. {
  965. VariableString.Set("playerName", VariablePlayer("player").GetName())
  966.  
  967. VariableInt.Set("playerPartCounter", 0);
  968. While(String.StartsWith(VariableString("playerName"), "["))
  969. {
  970. VariableString.Concat("playerName", "```", VariableString("playerName"));
  971. VariableString.Replace("playerName", "```[", "");
  972.  
  973. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  974. VariableString.Set(VariableString("playerHexDir"), "")
  975.  
  976. VariableInt.Set("hexCounterMaster", 0);
  977. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  978. {
  979. VariableInt.Set("hexCounter", 0);
  980. While(Int.LessThan(VariableInt("hexCounter"), 22))
  981. {
  982. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  983.  
  984. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  985. {
  986. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  987.  
  988. VariableString.Concat("playerName", "```", VariableString("playerName"));
  989. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  990. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  991. }
  992.  
  993. VariableInt.Add("hexCounter", 1);
  994. }
  995. VariableInt.Add("hexCounterMaster", 1);
  996. }
  997.  
  998. VariableString.Concat("playerName", "```", VariableString("playerName"));
  999. VariableString.Replace("playerName", "```]", "");
  1000.  
  1001. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  1002. VariableString.Set(VariableString("playerABCDir"), "")
  1003.  
  1004. VariableInt.Set("ABCCounterMaster", 0);
  1005. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  1006. {
  1007. VariableInt.Set("ABCCounter", 0);
  1008. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  1009. {
  1010. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  1011.  
  1012. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  1013. {
  1014. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  1015.  
  1016. VariableString.Concat("playerName", "```", VariableString("playerName"));
  1017. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  1018. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  1019. }
  1020.  
  1021. VariableInt.Add("ABCCounter", 1);
  1022. }
  1023. VariableInt.Add("ABCCounterMaster", 1);
  1024. }
  1025.  
  1026. VariableInt.Add("playerPartCounter", 1);
  1027. }
  1028.  
  1029. VariableString.Set("playerPrintName", "");
  1030. VariableInt.Set("printNameCounter", 0);
  1031. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  1032. {
  1033. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  1034. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  1035.  
  1036. VariableString.Append("playerPrintName", "<color=#");
  1037. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  1038. VariableString.Append("playerPrintName", ">");
  1039. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  1040. VariableString.Append("playerPrintName", "</color>");
  1041.  
  1042. VariableInt.Add("printNameCounter", 1);
  1043. }
  1044.  
  1045. If(String.NotEquals(VariablePlayer("player").GetGuildName(), "[ffffff][ffffff]Medic"))
  1046. {
  1047. Player.SetGuildName(VariablePlayer("player"), "[ffffff][ffffff]Medic");
  1048. VariableString.Concat("AM", VariableString("playerPrintName"), "<size=1>____</size>is<size=1>____</size>now<size=1>____</size>medic");
  1049. Game.PrintMessage(VariableString("AM"));
  1050. VariableBool.Set("passNotMedic", true);
  1051. }
  1052. If(Bool.Equals(VariableBool("passNotMedic"), false))
  1053. {
  1054. If(String.Equals(VariablePlayer("player").GetGuildName(), "[ffffff][ffffff]Medic"))
  1055. {
  1056. Player.SetGuildName(VariablePlayer("player"), "");
  1057. VariableString.Concat("ANM", VariableString("playerPrintName"), "<size=1>____</size>is<size=1>____</size>no<size=1>____</size>longer<size=1>____</size>medic");
  1058. Game.PrintMessage(VariableString("ANM"));
  1059. }
  1060. }
  1061. }
  1062. }
  1063. }
  1064. If(String.StartsWith(VariableString("input"), "/revtime"))
  1065. {
  1066. VariableString.Remove("input", "/revtime");
  1067. VariableInt.Set("revTime", VariableString("input").ConvertToInt());
  1068. 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>");
  1069. Game.PrintMessage(VariableString("revTimeWhat"));
  1070. }
  1071. If(String.StartsWith(VariableString("input"), "/revradius"))
  1072. {
  1073. VariableString.Remove("input", "/revradius");
  1074. VariableFloat.Set("radius", VariableString("input").ConvertToInt().ConvertToFloat());
  1075. 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>");
  1076. Game.PrintMessage(VariableString("radiusWhat"));
  1077. }
  1078. If(String.StartsWith(VariableString("input"), "/deathtime"))
  1079. {
  1080. VariableString.Remove("input", "/deathtime");
  1081. VariableInt.Set("deathTime", VariableString("input").ConvertToInt());
  1082. 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>");
  1083. Game.PrintMessage(VariableString("deathWhat"));
  1084. }
  1085. If(String.StartsWith(VariableString("input"), "/cooldown"))
  1086. {
  1087. VariableString.Remove("input", "/cooldown");
  1088. VariableInt.Set("cooldown", VariableString("input").ConvertToInt());
  1089. 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>");
  1090. Game.PrintMessage(VariableString("cooldownWhat"));
  1091. }
  1092.  
  1093. If(String.StartsWith(VariableString("input"), "/init"))
  1094. {
  1095. VariableString.Set("char63", VariableString("input"));
  1096. VariableString.Replace("char63", "/init", "");
  1097. VariableBool.Set("runScript", true);
  1098. }
  1099.  
  1100. If(String.Equals(VariableString("input"), "/players"))
  1101. {
  1102. VariablePlayer.Set("player", VariablePlayer("null"));
  1103. ForeachPlayer("player")
  1104. {
  1105. VariableString.Set("playerName", VariablePlayer("player").GetName())
  1106.  
  1107. VariableInt.Set("playerPartCounter", 0);
  1108. While(String.StartsWith(VariableString("playerName"), "["))
  1109. {
  1110. VariableString.Concat("playerName", "```", VariableString("playerName"));
  1111. VariableString.Replace("playerName", "```[", "");
  1112.  
  1113. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  1114. VariableString.Set(VariableString("playerHexDir"), "")
  1115.  
  1116. VariableInt.Set("hexCounterMaster", 0);
  1117. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  1118. {
  1119. VariableInt.Set("hexCounter", 0);
  1120. While(Int.LessThan(VariableInt("hexCounter"), 22))
  1121. {
  1122. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  1123.  
  1124. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  1125. {
  1126. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  1127.  
  1128. VariableString.Concat("playerName", "```", VariableString("playerName"));
  1129. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  1130. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  1131. }
  1132.  
  1133. VariableInt.Add("hexCounter", 1);
  1134. }
  1135. VariableInt.Add("hexCounterMaster", 1);
  1136. }
  1137.  
  1138. VariableString.Concat("playerName", "```", VariableString("playerName"));
  1139. VariableString.Replace("playerName", "```]", "");
  1140.  
  1141. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  1142. VariableString.Set(VariableString("playerABCDir"), "")
  1143.  
  1144. VariableInt.Set("ABCCounterMaster", 0);
  1145. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  1146. {
  1147. VariableInt.Set("ABCCounter", 0);
  1148. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  1149. {
  1150. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  1151.  
  1152. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  1153. {
  1154. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  1155.  
  1156. VariableString.Concat("playerName", "```", VariableString("playerName"));
  1157. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  1158. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  1159. }
  1160.  
  1161. VariableInt.Add("ABCCounter", 1);
  1162. }
  1163. VariableInt.Add("ABCCounterMaster", 1);
  1164. }
  1165.  
  1166. VariableInt.Add("playerPartCounter", 1);
  1167. }
  1168.  
  1169. VariableString.Set("playerPrintName", "");
  1170. VariableInt.Set("printNameCounter", 0);
  1171. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  1172. {
  1173. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  1174. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  1175.  
  1176. VariableString.Append("playerPrintName", "<color=#");
  1177. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  1178. VariableString.Append("playerPrintName", ">");
  1179. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  1180. VariableString.Append("playerPrintName", "</color>");
  1181.  
  1182. VariableInt.Add("printNameCounter", 1);
  1183. }
  1184. Game.PrintMessage(VariableString("playerPrintName"));
  1185. }
  1186. }
  1187. // DONT EVER TOUCH THESE COMMANDS
  1188. If(String.StartsWith(VariableString("input"), "/"))
  1189. {
  1190.  
  1191. // Handle set variable logic. Needs to be at top.
  1192. If(Bool.Equals(VariableBool("SetVariable"), true))
  1193. {
  1194. Game.PrintMessage("Final");
  1195. VariableBool.Set("SetVariable", false);
  1196.  
  1197. If(Int.Equals(VariableInt("SetVariableType"), 0))
  1198. {
  1199. VariableInt.Set(VariableString("SetVariableName"), VariableString("input").ConvertToInt());
  1200. }
  1201.  
  1202. If(Int.Equals(VariableInt("SetVariableType"), 1))
  1203. {
  1204. VariableBool.Set(VariableString("SetVariableName"), VariableString("input").ConvertToBool());
  1205. }
  1206.  
  1207. If(Int.Equals(VariableInt("SetVariableType"), 2))
  1208. {
  1209. VariableString.Set(VariableString("SetVariableName"), VariableString("input"));
  1210. }
  1211.  
  1212. If(Int.Equals(VariableInt("SetVariableType"), 3))
  1213. {
  1214. VariableFloat.Set(VariableString("SetVariableName"), VariableString("input").ConvertToString());
  1215. }
  1216.  
  1217. }
  1218.  
  1219. // Set a variable type
  1220. If(Bool.Equals(VariableBool("SetVariableTypeValue"), true))
  1221. {
  1222. Game.PrintMessage("Type");
  1223. VariableBool.Set("SetVariableTypeValue", false);
  1224. VariableInt.Set("SetVariableType", VariableString("input").ConvertToInt());
  1225. VariableBool.Set("SetVariable", true);
  1226. Game.PrintMessage("<b><color=#D46565>[LOGIC]</color>: Enter a variable value:</b>");
  1227. }
  1228.  
  1229. // Set a variable name
  1230. If(Bool.Equals(VariableBool("SetVariableNameValue"), true))
  1231. {
  1232. Game.PrintMessage("Value");
  1233. VariableBool.Set("SetVariableNameValue", false);
  1234. VariableString.Set("SetVariableName", VariableString("input"));
  1235. VariableBool.Set("SetVariableTypeValue", true);
  1236. Game.PrintMessage("<b><color=#D46565>[LOGIC]</color>: Enter a variable type:</b>");
  1237. }
  1238.  
  1239. // Execute some commands on start up
  1240. If(String.Equals(VariableString("input"),"/startup"))
  1241. {
  1242. Game.PrintMessage("EM/Commands//mcset");
  1243. Game.PrintMessage("EM/Commands//setplayerfactor");
  1244. Game.PrintMessage("EM/Commands//");
  1245. }
  1246.  
  1247. }
  1248.  
  1249. // Help commands
  1250. If(String.Equals(VariableString("input"),"/com"))
  1251. {
  1252. Game.PrintMessage("<b><i><color=#000000>**List of commands:**</color></i></b>");
  1253. Game.PrintMessage("<color=#ffff00> /start          - to Start Expedition</color>");
  1254. Game.PrintMessage("<color=#ffff00> /stop           - to End Expedition</color>");
  1255. Game.PrintMessage("<color=#ffff00> /enableregen    - To Enable Titan Regeneration</color>");
  1256. Game.PrintMessage("<color=#ffff00> /disableregen   - To Disable Titan Regeneration</color>");
  1257. Game.PrintMessage("<color=#ffff00> /stats          - To Get Expedition Statistics</color>");
  1258. Game.PrintMessage("<color=#ffff00> /score          - To Get Expedition Score(WIP)</color>");
  1259. Game.PrintMessage("<color=#ffff00> /mcset          - Set Region Player To MC</color>");
  1260. Game.PrintMessage("<color=#ffff00> /setnewmc       - Set Region Player To Top Alive Player</color>");
  1261. Game.PrintMessage(" ");
  1262. Game.PrintMessage("<b><i><color=#000000>**Other list of commands:**</color></i></b>");
  1263. Game.PrintMessage("<color=#ffff00> /lrev   - List of Revive Commands</color>");
  1264. Game.PrintMessage("<color=#ffff00> /lreg   - List of Dynamic Region Commands</color>");
  1265. Game.PrintMessage("<color=#ffff00> /ltit   - List of Titan Commands</color>");
  1266.  
  1267. }
  1268.  
  1269.  
  1270. // GENERIC COMMANDS
  1271. If(String.StartsWith(VariableString("input"), "/"))
  1272. {
  1273.  
  1274.  
  1275. // Set the MC. Last player is always the lowest ID, so in this case, the MC
  1276. If(String.Equals(VariableString("input"),"/mcset"))
  1277. {
  1278. ForeachPlayer("EPlayer")
  1279. {
  1280. VariablePlayer.Set("MCPlayer", VariablePlayer("EPlayer"));
  1281. }
  1282. }
  1283.  
  1284. // Select another player as MC if the current MC is dead. Useful to still spawn titans and/or revive points
  1285. If(String.Equals(VariableString("input"),"/setnewmc"))
  1286. {
  1287. ForeachPlayer("EPlayer")
  1288. {
  1289. VariablePlayer.Set("MCPlayer", VariablePlayer("EPlayer"));
  1290. }
  1291. VariableBool.Set("isMCAlive",VariablePlayer("MCPlayer").GetIsAlive());
  1292. If(Bool.Equals(VariableBool("isMCAlive"), false))
  1293. {
  1294. Game.PrintMessage("The_MC_is_dead!_Finding_another_player!");
  1295. VariableBool.Set("BackupMCFound", false);
  1296. ForeachPlayer("EPlayer")
  1297. {
  1298. If(Bool.Equals(VariableBool("BackupMCFound"), false))
  1299. {
  1300. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  1301. If(Bool.Equals(VariableBool("isAlive"), true))
  1302. {
  1303. VariableString.Set("PlayerName", VariablePlayer("EPlayer").GetName());
  1304. VariableString.Concat("Message", "New Player: ", " ", VariableString("PlayerName"));
  1305. Game.PrintMessage(VariableString("Message"));
  1306. VariablePlayer.Set("MCPlayer", VariablePlayer("EPlayer"));
  1307. VariableBool.Set("BackupMCFound", true);
  1308. }
  1309. }
  1310. }
  1311. }
  1312. }
  1313.  
  1314.  
  1315. If(String.Equals(VariableString("input"), "/start"))
  1316. {
  1317. VariableBool.Set("CountDown", true); // Count down variable
  1318. VariableBool.Set("Timer", true);
  1319. VariableInt.Set("Count", 0); // Amount of counts
  1320. VariableInt.Set("Time", 0);
  1321. VariableInt.Set("Revives", 0);
  1322. VariableInt.Set("Kills", 0);
  1323. VariableInt.Set("Objectives", 0);
  1324. VariableInt.Set("BonusObjectives", 0);
  1325. }
  1326.  
  1327. If(String.Equals(VariableString("input"), "/timer"))
  1328. {
  1329. VariableBool.Set("CountDown", true); // Count down variable
  1330. VariableInt.Set("Count", 0);
  1331. }
  1332.  
  1333. If(String.Equals(VariableString("input"), "/stop"))
  1334. {
  1335. Game.PrintMessage("Expedition has ended!");
  1336. VariableBool.Set("Timer", false);
  1337. }
  1338.  
  1339.  
  1340.  
  1341. If(String.Equals(VariableString("input"), "/stats"))
  1342. {
  1343. VariableString.Concat("Message", "Kill: ", " ", VariableInt("Kills").ConvertToString());
  1344. Game.PrintMessage(VariableString("Message"));
  1345. VariableString.Concat("Message", "Revives: ", " ", VariableInt("Revives").ConvertToString());
  1346. Game.PrintMessage(VariableString("Message"));
  1347. VariableString.Concat("Message", "Times(seconds): ", " ", VariableInt("Time").ConvertToString());
  1348. Game.PrintMessage(VariableString("Message"));
  1349. }
  1350.  
  1351. If(String.Equals(VariableString("input"), "/score"))
  1352. {
  1353.  
  1354. VariableInt.Set("Score", 0); // reset the score, otherwise total score would just add itself again after using this command multiple times
  1355.  
  1356. // Kills calculation
  1357. VariableInt.Set("KillScore", 0);
  1358. VariableInt.Set("KillCount", VariableInt("Kills"));
  1359. While(Int.GreaterThan(VariableInt("KillCount"), 0))
  1360. {
  1361. VariableInt.Add("KillScore", VariableInt("KillPoints"))
  1362. VariableInt.Subtract("KillCount", 1);
  1363. }
  1364.  
  1365. VariableInt.Add("Score", VariableInt("KillScore"));
  1366.  
  1367. // Revives calculation
  1368. VariableInt.Set("ReviveScore", 0);
  1369. VariableInt.Set("ReviveCount", VariableInt("Revives"));
  1370. While(Int.GreaterThan(VariableInt("ReviveCount"), 0))
  1371. {
  1372. VariableInt.Add("ReviveScore", VariableInt("RevivePoints"))
  1373. VariableInt.Subtract("ReviveCount", 1);
  1374. }
  1375.  
  1376. VariableInt.Add("Score", VariableInt("ReviveScore"));
  1377.  
  1378. // Time calculation
  1379. VariableInt.Set("TimeScore", 0);
  1380. VariableInt.Set("TimeCount", VariableInt("Time"));
  1381. While(Int.GreaterThan(VariableInt("TimeCount"), 0))
  1382. {
  1383. VariableInt.Add("TimeScore", VariableInt("TimePoints"))
  1384. VariableInt.Subtract("TimeCount", 1);
  1385. }
  1386.  
  1387. VariableInt.Add("Score", VariableInt("TimeScore"));
  1388.  
  1389. VariableString.Concat("Message", "Total Score: ", " ", VariableInt("Score").ConvertToString());
  1390. Game.PrintMessage(VariableString("Message"));
  1391.  
  1392. }
  1393. }
  1394.  
  1395.  
  1396. // OPTION COMMANDS
  1397. If(String.StartsWith(VariableString("input"), "/"))
  1398. {
  1399.  
  1400. If(String.Equals(VariableString("input"), "/hoption"))
  1401. {
  1402. Game.PrintMessage("<b><i><color=#000000>** --- Option commands --- **</color></i></b>");
  1403. Game.PrintMessage("<color=#ffff00> --- /coption > Check the current option values</color>");
  1404. Game.PrintMessage("<color=#ffff00> --- /setexpdifficulty[0/1/2] > Set expedition difficulty</color>");
  1405. Game.PrintMessage("<color=#ffff00> --- /tplayerscaling > Toggle player scaling</color>");
  1406. Game.PrintMessage("<color=#ffff00> --- /tanim  > Toggle random titan animation</color>");
  1407. Game.PrintMessage("<color=#ffff00> --- /tspeed  > Toggle random titan speed</color>");
  1408. Game.PrintMessage("<color=#ffff00> --- /tskin  > Toggle titan skins</color>");
  1409. Game.PrintMessage("<color=#ffff00> --- /thealth  > Toggle titan health</color>");
  1410. Game.PrintMessage("<color=#ffff00> --- /tregen  > Toggle titan regeneration</color>");
  1411. Game.PrintMessage("<color=#ffff00> --- /tview  > Toggle titan view distance</color>");
  1412. }
  1413.  
  1414. If(String.Equals(VariableString("input"), "/coption"))
  1415. {
  1416. Game.PrintMessage("<b><i><color=#000000>** --- Expedition Settings --- **</color></i></b>");
  1417.  
  1418. If(Int.Equals(VariableInt("ExpeditionDifficulty"), 0))
  1419. {
  1420. Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Easy --- </color>");
  1421. }
  1422.  
  1423. If(Int.Equals(VariableInt("ExpeditionDifficulty"), 1))
  1424. {
  1425. Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Normal --- </color>");
  1426. }
  1427.  
  1428. If(Int.Equals(VariableInt("ExpeditionDifficulty"), 2))
  1429. {
  1430. Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Hard --- </color>");
  1431. }
  1432.  
  1433. VariableString.Concat("Message", "<color=#ffff00> --- Player Scaling: ", VariableBool("EnablePlayerScaling").ConvertToString(), " --- </color>");
  1434. Game.PrintMessage(VariableString("Message"));
  1435. VariableString.Concat("Message", "<color=#ffff00> --- Random Titan Animation: ", VariableBool("EnableRandomTitanAnimation").ConvertToString(), " --- </color>");
  1436. Game.PrintMessage(VariableString("Message"));
  1437. VariableString.Concat("Message", "<color=#ffff00> --- Random Titan Speed: ", VariableBool("EnableRandomTitanSpeed").ConvertToString(), " --- </color>");
  1438. Game.PrintMessage(VariableString("Message"));
  1439. VariableString.Concat("Message", "<color=#ffff00> --- Titan Skins: ", VariableBool("EnableRandomTitanSkins").ConvertToString(), " --- </color>");
  1440. Game.PrintMessage(VariableString("Message"));
  1441. VariableString.Concat("Message", "<color=#ffff00> --- Titan HP: ", VariableBool("EnableTitanHealth").ConvertToString(), " --- </color>");
  1442. Game.PrintMessage(VariableString("Message"));
  1443. VariableString.Concat("Message", "<color=#ffff00> --- Titan Regeneration: ", VariableBool("EnableTitanRegeneration").ConvertToString(), " --- </color>");
  1444. Game.PrintMessage(VariableString("Message"));
  1445. VariableString.Concat("Message", "<color=#ffff00> --- Titan View Distance: ", VariableBool("EnableTitanViewDistance").ConvertToString(), " --- </color>");
  1446. Game.PrintMessage(VariableString("Message"));
  1447. }
  1448.  
  1449. // Exp difficulty
  1450. If(String.Equals(VariableString("input"), "/setexpdifficulty0"))
  1451. {
  1452. VariableInt.Set("ExpeditionDifficulty", 0);
  1453. Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Easy --- </color>");
  1454. }
  1455.  
  1456. If(String.Equals(VariableString("input"), "/setexpdifficulty1"))
  1457. {
  1458. VariableInt.Set("ExpeditionDifficulty", 1);
  1459. Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Normal --- </color>");
  1460. }
  1461.  
  1462. If(String.Equals(VariableString("input"), "/setexpdifficulty2"))
  1463. {
  1464. VariableInt.Set("ExpeditionDifficulty", 2);
  1465. Game.PrintMessage("<color=#ffff00> --- Expedition difficulty: Hard --- </color>");
  1466. }
  1467.  
  1468. //Player scaling
  1469. If(String.Equals(VariableString("input"), "/tplayerscaling"))
  1470. {
  1471. VariableBool.Set("Done", false);
  1472. If(Bool.Equals(VariableBool("EnablePlayerScaling"), false))
  1473. {
  1474. Game.PrintMessage("<color=#ffff00> --- Player scaling: Enabled --- </color>");
  1475. VariableBool.Set("EnablePlayerScaling", true);
  1476. VariableBool.Set("Done", true);
  1477. }
  1478. If(Bool.Equals(VariableBool("Done"), false))
  1479. {
  1480. Game.PrintMessage("<color=#ffff00> --- Player scaling: Disabled --- </color>");
  1481. VariableBool.Set("EnablePlayerScaling", false);
  1482. VariableFloat.Set("PlayerFactor", 1.0);
  1483. }
  1484. }
  1485.  
  1486. // Titan Animation
  1487. If(String.Equals(VariableString("input"), "/tanim"))
  1488. {
  1489. VariableBool.Set("Done", false);
  1490. If(Bool.Equals(VariableBool("EnableRandomTitanAnimation"), false))
  1491. {
  1492. Game.PrintMessage("<color=#ffff00> --- Random Titan Animation: Enabled --- </color>");
  1493. VariableBool.Set("EnableRandomTitanAnimation", true);
  1494. VariableBool.Set("Done", true);
  1495. }
  1496. If(Bool.Equals(VariableBool("Done"), false))
  1497. {
  1498. Game.PrintMessage("<color=#ffff00> --- Random Titan Animation: Disabled --- </color>");
  1499. VariableBool.Set("EnableRandomTitanAnimation", false);
  1500. }
  1501. }
  1502.  
  1503. // Titan Speed
  1504. If(String.Equals(VariableString("input"), "/tspeed"))
  1505. {
  1506. VariableBool.Set("Done", false);
  1507. If(Bool.Equals(VariableBool("EnableRandomTitanSpeed"), false))
  1508. {
  1509. Game.PrintMessage("<color=#ffff00> --- Random Titan Speed: Enabled --- </color>");
  1510. VariableBool.Set("EnableRandomTitanSpeed", true);
  1511. VariableBool.Set("Done", true);
  1512. }
  1513. If(Bool.Equals(VariableBool("Done"), false))
  1514. {
  1515. Game.PrintMessage("<color=#ffff00> --- Random Titan Speed: Disabled --- </color>");
  1516. VariableBool.Set("EnableRandomTitanSpeed", false);
  1517. }
  1518. }
  1519.  
  1520. // Titan Skins
  1521. If(String.Equals(VariableString("input"), "/tskin"))
  1522. {
  1523. VariableBool.Set("Done", false);
  1524. If(Bool.Equals(VariableBool("EnableRandomTitanSkins"), false))
  1525. {
  1526. Game.PrintMessage("<color=#ffff00> --- Titan Skins: Enabled --- </color>");
  1527. VariableBool.Set("EnableRandomTitanSkins", true);
  1528. VariableBool.Set("Done", true);
  1529. }
  1530. If(Bool.Equals(VariableBool("Done"), false))
  1531. {
  1532. Game.PrintMessage("<color=#ffff00> --- Titan Skins: Disabled --- </color>");
  1533. VariableBool.Set("EnableRandomTitanSkins", false);
  1534. }
  1535. }
  1536.  
  1537. // Titan Health
  1538. If(String.Equals(VariableString("input"), "/thealth"))
  1539. {
  1540. VariableBool.Set("Done", false);
  1541. If(Bool.Equals(VariableBool("EnableTitanHealth"), false))
  1542. {
  1543. Game.PrintMessage("<color=#ffff00> --- Titan HP: Enabled --- </color>");
  1544. VariableBool.Set("EnableTitanHealth", true);
  1545. VariableBool.Set("Done", true);
  1546. }
  1547. If(Bool.Equals(VariableBool("Done"), false))
  1548. {
  1549. Game.PrintMessage("<color=#ffff00> --- Titan HP: Disabled --- </color>");
  1550. VariableBool.Set("EnableTitanHealth", false);
  1551. }
  1552. }
  1553.  
  1554. // Titan Regeneration
  1555. If(String.Equals(VariableString("input"), "/tregen"))
  1556. {
  1557. VariableBool.Set("Done", false);
  1558. If(Bool.Equals(VariableBool("EnableTitanRegeneration"), false))
  1559. {
  1560. Game.PrintMessage("<color=#ffff00> --- Titan Regeneration: Enabled --- </color>");
  1561. VariableBool.Set("EnableTitanRegeneration", true);
  1562. VariableBool.Set("Done", true);
  1563. }
  1564. If(Bool.Equals(VariableBool("Done"), false))
  1565. {
  1566. Game.PrintMessage("<color=#ffff00> --- Titan Regeneration: Disabled --- </color>");
  1567. VariableBool.Set("EnableTitanRegeneration", false);
  1568. }
  1569. }
  1570.  
  1571. // Titan View Distance
  1572. If(String.Equals(VariableString("input"), "/tview"))
  1573. {
  1574. VariableBool.Set("Done", false);
  1575. If(Bool.Equals(VariableBool("EnableTitanViewDistance"), false))
  1576. {
  1577. Game.PrintMessage("<color=#ffff00> --- Titan View Distance: Enabled --- </color>");
  1578. VariableBool.Set("EnableTitanViewDistance", true);
  1579. VariableBool.Set("Done", true);
  1580. }
  1581. If(Bool.Equals(VariableBool("Done"), false))
  1582. {
  1583. Game.PrintMessage("<color=#ffff00> --- Titan View Distance: Disabled --- </color>");
  1584. VariableBool.Set("EnableTitanViewDistance", false);
  1585. }
  1586. }
  1587.  
  1588.  
  1589. }
  1590.  
  1591.  
  1592. // REVIVE COMMANDS
  1593. If(String.StartsWith(VariableString("input"), "/"))
  1594. {
  1595.  
  1596. If(String.Equals(VariableString("input"), "/hrevive"))
  1597. {
  1598. Game.PrintMessage("<b><i><color=#000000>** --- Revive commands --- **</color></i></b>");
  1599. Game.PrintMessage("<color=#ffff00> --- /setrev > Set a revive point at current location </color>");
  1600. Game.PrintMessage("<color=#ffff00> --- /revpos > Revive at the /setrev location</color>");
  1601. Game.PrintMessage("<color=#ffff00> --- /setrevauto > Automatically revive players at current location every 30s</color>");
  1602. Game.PrintMessage("<color=#ffff00> --- /dsetrevauto  > Disable Auto Revive At Position</color>");
  1603. Game.PrintMessage("<color=#ffff00> --- /revmc  > Revive all at MC Player</color>");
  1604. }
  1605.  
  1606. If(String.Equals(VariableString("input"), "/revpos"))
  1607. {
  1608. ForeachPlayer("EPlayer")
  1609. {
  1610. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  1611. If(Bool.Equals(VariableBool("isAlive"), false))
  1612. {
  1613. VariableInt.Add("Revives", 1);
  1614. Player.SpawnPlayerAt(VariablePlayer("EPlayer"), VariableFloat("Pos_X"), VariableFloat("Pos_Y"), VariableFloat("Pos_Z"));
  1615. }
  1616. }
  1617. If(Bool.Equals(VariableBool("AutoPosRevive"), false))
  1618. {
  1619. Game.PrintMessage("<b><color=#58a27c><size=15>Reinforcements have arrived at the camp!</size></color></b>");
  1620. }
  1621. }
  1622.  
  1623. If(String.Equals(VariableString("input"), "/setrev"))
  1624. {
  1625. VariableFloat.Set("Pos_X", VariablePlayer("MCPlayer").GetPositionX());
  1626. VariableFloat.Set("Pos_Y", VariablePlayer("MCPlayer").GetPositionY());
  1627. VariableFloat.Set("Pos_Z", VariablePlayer("MCPlayer").GetPositionZ());
  1628. Game.PrintMessage("<b><color=#58a27c><size=15>A camp has been established!</size></color></b>");
  1629. Game.PrintMessage("<b><color=#58a27c><size=15>Reinforcements can now arrive to this location!!</size></color></b>");
  1630. }
  1631.  
  1632. If(String.Equals(VariableString("input"), "/setrevauto"))
  1633. {
  1634. VariableBool.Set("AutoPosRevive", true);
  1635. VariableFloat.Set("Pos_X", VariablePlayer("MCPlayer").GetPositionX());
  1636. VariableFloat.Set("Pos_Y", VariablePlayer("MCPlayer").GetPositionY());
  1637. VariableFloat.Set("Pos_Z", VariablePlayer("MCPlayer").GetPositionZ());
  1638. Game.PrintMessage("<b><color=#58a27c><size=15>A camp has been established!</size></color></b>");
  1639. Game.PrintMessage("<b><color=#58a27c><size=15>Reinforcements will now arrive to this location every 30 seconds!!</size></color></b>");
  1640. }
  1641.  
  1642. If(String.Equals(VariableString("input"), "/dsetrevauto"))
  1643. {
  1644. VariableBool.Set("AutoPosRevive", false);
  1645. Game.PrintMessage("<b><color=#58a27c><size=15>A camp has been destroyed!</size></color></b>");
  1646. }
  1647.  
  1648. If(String.Equals(VariableString("input"), "/revmc"))
  1649. {
  1650.  
  1651. If(Player.NotEquals(VariablePlayer("MCPlayer"), VariablePlayer("null")))
  1652. {
  1653. // Get the last known location of the MC
  1654. VariableFloat.Set("MC_X", VariablePlayer("MCPlayer").GetPositionX());
  1655. VariableFloat.Set("MC_Y", VariablePlayer("MCPlayer").GetPositionY());
  1656. VariableFloat.Set("MC_Z", VariablePlayer("MCPlayer").GetPositionZ());
  1657. Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The MC</size></color></b>");
  1658.  
  1659. ForeachPlayer("EPlayer")
  1660. {
  1661. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  1662. If(Bool.Equals(VariableBool("isAlive"), false))
  1663. {
  1664. VariableInt.Add("Revives", 1);
  1665. Player.SpawnPlayerAt(VariablePlayer("EPlayer"), VariableFloat("MC_X"), VariableFloat("MC_Y"), VariableFloat("MC_Z"));
  1666. }
  1667. }
  1668. }
  1669. }
  1670.  
  1671. }
  1672.  
  1673.  
  1674. // TITANS - these functions are used for titan spawning
  1675. If(String.StartsWith(VariableString("input"), "/"))
  1676. {
  1677.  
  1678. If(String.Equals(VariableString("input"), "/htitan"))
  1679. {
  1680. Game.PrintMessage("<b><i><color=#000000>** --- Titan commands --- **</color></i></b>");
  1681. Game.PrintMessage("<color=#ffff00> --- /titans[1-50] > Spawn titans at dynamic region</color>");
  1682. Game.PrintMessage("<color=#ffff00> --- /tptitans > Teleport all titans to dynamic region</color>");
  1683. }
  1684.  
  1685. // Random titans at the MC region
  1686. If(String.StartsWith(VariableString("input"), "/titans"))
  1687. {
  1688. VariableString.Set("ParameterCommand", "/titans");
  1689. VariableString.Set("ParameterCommandInput", VariableString("input"));
  1690. VariableInt.Set("ParameterLoopStart", 1);
  1691. VariableInt.Set("ParameterLoopEnd", 50);
  1692. VariableInt.Set("ParameterLoopStep", 1);
  1693. VariableString.Set("ParameterName", "TitanAmount");
  1694. Game.PrintMessage("EM/Commands//setcommandparameter");
  1695.  
  1696. Game.PrintMessage("EM/Commands//settitanamount");
  1697. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  1698. {
  1699. Game.PrintMessage("EM/Commands//spawntitanmc");
  1700. VariableInt.Subtract("TitanAmount", 1);
  1701. }
  1702. }
  1703.  
  1704. // Random titans at the region
  1705. If(String.StartsWith(VariableString("input"), "/spawntitansatregion"))
  1706. {
  1707. VariableString.Set("ParameterCommand", "/spawntitansatregion");
  1708. VariableString.Set("ParameterCommandInput", VariableString("input"));
  1709. VariableInt.Set("ParameterLoopStart", 1);
  1710. VariableInt.Set("ParameterLoopEnd", 50);
  1711. VariableInt.Set("ParameterLoopStep", 1);
  1712. VariableString.Set("ParameterName", "TitanAmount");
  1713. Game.PrintMessage("EM/Commands//setcommandparameter");
  1714.  
  1715. Game.PrintMessage("EM/Commands//settitanamount");
  1716. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  1717. {
  1718. Game.PrintMessage("EM/Commands//spawntitanregion");
  1719. VariableInt.Subtract("TitanAmount", 1);
  1720. }
  1721. }
  1722.  
  1723. // Teleport all titans to the MC region
  1724. If(String.Equals(VariableString("input"),"/tptitans"))
  1725. {
  1726. ForeachTitan("TitanMy")
  1727. {
  1728. Game.PrintMessage("EM/Commands//setrandomtitancordsfloat");
  1729. Titan.MoveTitan(VariableTitan("TitanMy"), VariableFloat("Titan_X"),VariableFloat("Titan_Y"),VariableFloat("Titan_Z"));
  1730. }
  1731. Game.PrintMessage("Titans TPed to Region!");
  1732. }
  1733.  
  1734. // Set random titan cords
  1735. If(String.Equals(VariableString("input"), "/setrandomtitancords"))
  1736. {
  1737. VariableFloat.Set("MC_X", VariablePlayer("MCPlayer").GetPositionX());
  1738. VariableFloat.Set("MC_Y", VariablePlayer("MCPlayer").GetPositionY());
  1739. VariableFloat.Set("MC_Z", VariablePlayer("MCPlayer").GetPositionZ());
  1740.  
  1741. VariableInt.Set("TitanY", VariableFloat("MC_Y").ConvertToInt());
  1742. VariableInt.Add("TitanY", 500);
  1743. VariableInt.SetRandom("TitanX", VariableFloat("X-").ConvertToInt(), VariableFloat("X+").ConvertToInt());
  1744. VariableInt.Add("TitanX", VariableFloat("MC_X").ConvertToInt());
  1745. VariableInt.SetRandom("TitanZ", VariableFloat("Y-").ConvertToInt(), VariableFloat("Y+").ConvertToInt());
  1746. VariableInt.Add("TitanZ", VariableFloat("MC_Z").ConvertToInt());
  1747. }
  1748.  
  1749. // Set random titan cords based on a float
  1750. If(String.Equals(VariableString("input"), "/setrandomtitancordsfloat"))
  1751. {
  1752. VariableFloat.Set("MC_X", VariablePlayer("MCPlayer").GetPositionX());
  1753. VariableFloat.Set("MC_Y", VariablePlayer("MCPlayer").GetPositionY());
  1754. VariableFloat.Set("MC_Z", VariablePlayer("MCPlayer").GetPositionZ());
  1755.  
  1756. VariableFloat.Set("Titan_Y", VariableFloat("MC_Y"));
  1757. VariableFloat.Add("Titan_Y", 500.0);
  1758. VariableFloat.SetRandom("Titan_X", VariableFloat("X-"), VariableFloat("X+"));
  1759. VariableFloat.Add("Titan_X", VariableFloat("MC_X"));
  1760. VariableFloat.SetRandom("Titan_Z", VariableFloat("Y-"), VariableFloat("Y+"));
  1761. VariableFloat.Add("Titan_Z", VariableFloat("MC_Z"));
  1762. }
  1763.  
  1764. // Determine the player factor. This is used for generic titan spawners to increase / reduce the amount of titans spawned because of the players
  1765. If(String.Equals(VariableString("input"), "/setplayerfactor"))
  1766. {
  1767. If(Int.LessThan(VariableInt("TotalPlayers"), 10))
  1768. {
  1769. VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorSmall"));
  1770. }
  1771.  
  1772. If(Int.LessThan(VariableInt("TotalPlayers"), 15))
  1773. {
  1774. If(Int.GreaterThanOrEqual(VariableInt("TotalPlayers"), 10))
  1775. {
  1776. VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorMedium"));
  1777. }
  1778. }
  1779.  
  1780. If(Int.LessThan(VariableInt("TotalPlayers"), 20))
  1781. {
  1782. If(Int.GreaterThanOrEqual(VariableInt("TotalPlayers"), 15))
  1783. {
  1784. VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorLarge"));
  1785. }
  1786. }
  1787.  
  1788. If(Int.GreaterThan(VariableInt("TotalPlayers"), 20))
  1789. {
  1790. VariableFloat.Set("PlayerFactor", VariableFloat("PlayerFactorExtreme"));
  1791. }
  1792. }
  1793.  
  1794. // Determine the amount of titans that should be spawned, based on the player factor.
  1795. If(String.Equals(VariableString("input"), "/settitanamount"))
  1796. {
  1797. VariableFloat.Set("TitanAmountF", VariableInt("TitanAmount").ConvertToFloat());
  1798. VariableFloat.Multiply("TitanAmountF", VariableFloat("PlayerFactor"));
  1799. VariableInt.Set("TitanAmount", VariableFloat("TitanAmountF").ConvertToInt());
  1800.  
  1801. // Titan health
  1802. VariableString.Concat("VariableF", "TitanAmountFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
  1803. VariableFloat.Set("TitanAmountFactor", VariableFloat(VariableString("VariableF")));
  1804. VariableFloat.Multiply("TitanAmountFactor", VariableInt("TitanAmount").ConvertToFloat());
  1805. VariableInt.Set("TitanAmount", VariableFloat("TitanAmountFactor").ConvertToInt());
  1806. }
  1807.  
  1808. // Determine the titan size based on class
  1809. If(String.Equals(VariableString("input"), "/setrandomtitanhealth"))
  1810. {
  1811. VariableString.Concat("TitanClassMinHPVar", "TitanClass_HPMin", VariableInt("Titan_Class").ConvertToString());
  1812. VariableString.Concat("TitanClassMaxHPVar", "TitanClass_HPMax", VariableInt("Titan_Class").ConvertToString());
  1813. VariableInt.SetRandom("Titan_HP", VariableInt(VariableString("TitanClassMinHPVar")), VariableInt(VariableString("TitanClassMaxHPVar")));
  1814. }
  1815.  
  1816. // Determine the titan size based on class
  1817. If(String.Equals(VariableString("input"), "/settitanviewdistance"))
  1818. {
  1819. VariableString.Concat("Variable", "TitanClass_ViewDistance", VariableInt("Titan_Class").ConvertToString());
  1820. VariableInt.Set("Titan_ViewDistance", VariableInt(VariableString("Variable")));
  1821. }
  1822.  
  1823. // Determine the animation speed based on class
  1824. If(String.Equals(VariableString("input"), "/setrandomtitananimationspeed"))
  1825. {
  1826. VariableString.Concat("TitanClassMinAnimationVar", "TitanClass_MinAnimation", VariableInt("Titan_Class").ConvertToString());
  1827. VariableString.Concat("TitanClassMaxAnimationVar", "TitanClass_MaxAnimation", VariableInt("Titan_Class").ConvertToString());
  1828. VariableFloat.SetRandom("Titan_Animation", VariableFloat(VariableString("TitanClassMinAnimationVar")), VariableFloat(VariableString("TitanClassMaxAnimationVar")));
  1829. }
  1830.  
  1831. // Determine the titan size based on class
  1832. If(String.Equals(VariableString("input"), "/setrandomtitansize"))
  1833. {
  1834. VariableString.Concat("TitanClassMinSizeVar", "TitanClass_MinSize", VariableInt("Titan_Class").ConvertToString());
  1835. VariableString.Concat("TitanClassMaxSizeVar", "TitanClass_MaxSize", VariableInt("Titan_Class").ConvertToString());
  1836. VariableFloat.SetRandom("Titan_Size", VariableFloat(VariableString("TitanClassMinSizeVar")), VariableFloat(VariableString("TitanClassMaxSizeVar")));
  1837. }
  1838.  
  1839. // Determine the titan speed based on class and type
  1840. If(String.Equals(VariableString("input"), "/setrandomtitanspeed"))
  1841. {
  1842. VariableString.Concat("TitanClassMinSpeedVar", "TitanClass_MinSpeed", VariableInt("Titan_Class").ConvertToString());
  1843. VariableString.Concat("TitanClassMaxSpeedVar", "TitanClass_MaxSpeed", VariableInt("Titan_Class").ConvertToString());
  1844. VariableInt.SetRandom("Titan_Speed_Random", VariableInt(VariableString("TitanClassMinSpeedVar")), VariableInt(VariableString("TitanClassMaxSpeedVar")));
  1845. VariableInt.Add("Titan_Speed", VariableInt("Titan_Speed_Random"));
  1846. }
  1847.  
  1848. // Determine the titan speed based on class and type
  1849. If(String.Equals(VariableString("input"), "/settitanspeedbysize"))
  1850. {
  1851. VariableString.Concat("TitanSpeedXVar", "TitanSpeedX", VariableInt("Titan_Type").ConvertToString());
  1852. VariableString.Concat("TitanSpeedZVar", "TitanSpeedZ", VariableInt("Titan_Type").ConvertToString());
  1853.  
  1854. VariableFloat.Set("TitanSpeedF", VariableFloat("Titan_Size"));
  1855. VariableFloat.Multiply("TitanSpeedF", VariableFloat(VariableString("TitanSpeedXVar")));
  1856. VariableFloat.Add("TitanSpeedF", VariableFloat(VariableString("TitanSpeedZVar")));
  1857. VariableInt.Set("Titan_Speed", VariableFloat("TitanSpeedF").ConvertToInt());
  1858. }
  1859.  
  1860. // Determine the titan class and set its stats
  1861. If(String.Equals(VariableString("input"), "/setrandomtitanclass"))
  1862. {
  1863. VariableInt.SetRandom("RandomTitanClass", 0, 100);
  1864.  
  1865. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance0")))
  1866. {
  1867. VariableInt.Set("Titan_Class", 0);
  1868. }
  1869.  
  1870. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance1")))
  1871. {
  1872. If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance0")))
  1873. {
  1874. VariableInt.Set("Titan_Class", 1);
  1875. }
  1876. }
  1877.  
  1878. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance2")))
  1879. {
  1880. If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance1")))
  1881. {
  1882. VariableInt.Set("Titan_Class", 2);
  1883. }
  1884. }
  1885.  
  1886. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance3")))
  1887. {
  1888. If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanClass_Chance2")))
  1889. {
  1890. VariableInt.Set("Titan_Class", 3);
  1891. }
  1892. }
  1893.  
  1894.  
  1895. }
  1896.  
  1897. // Set a random titan type
  1898. If(String.Equals(VariableString("input"), "/setrandomtitantype"))
  1899. {
  1900. VariableInt.SetRandom("RandomTitanType", 0, 100);
  1901.  
  1902. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType0")))
  1903. {
  1904. VariableInt.Set("Titan_Type", 0);
  1905. }
  1906.  
  1907. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType1")))
  1908. {
  1909. If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType0")))
  1910. {
  1911. VariableInt.Set("Titan_Type", 1);
  1912. }
  1913. }
  1914.  
  1915. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType2")))
  1916. {
  1917. If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType1")))
  1918. {
  1919. VariableInt.Set("Titan_Type", 2);
  1920. }
  1921. }
  1922.  
  1923. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType3")))
  1924. {
  1925. If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType2")))
  1926. {
  1927. VariableInt.Set("Titan_Type", 3);
  1928. }
  1929. }
  1930.  
  1931. If(Int.LessThanOrEqual(VariableInt("RandomTitanClass"), VariableInt("TitanType4")))
  1932. {
  1933. If(Int.GreaterThan(VariableInt("RandomTitanClass"), VariableInt("TitanType3")))
  1934. {
  1935. VariableInt.Set("Titan_Type", 4);
  1936. }
  1937. }
  1938.  
  1939. }
  1940.  
  1941. // Set random titan skin
  1942. If(String.Equals(VariableString("input"), "/setrandomtitanskin"))
  1943. {
  1944. VariableInt.SetRandom("TitanEyeRandom", 1, VariableInt("TitanEyes"));
  1945. VariableString.Concat("Titan_Eye_Temp", "TitanEye", VariableInt("TitanEyeRandom").ConvertToString());
  1946. VariableString.Set("Titan_Eye", VariableString("Titan_Eye_Temp"));
  1947.  
  1948. VariableInt.SetRandom("TitanSkinRandom", 1, VariableInt("TitanSkins"));
  1949. VariableString.Concat("Titan_Skin_Temp", "TitanSkin", VariableInt("TitanSkinRandom").ConvertToString());
  1950. VariableString.Set("Titan_Skin", VariableString("Titan_Skin_Temp"));
  1951. }
  1952.  
  1953. // Set random titan skin
  1954. If(String.Equals(VariableString("input"), "/settitanattributesbyexpeditiondifficulty"))
  1955. {
  1956.  
  1957. // Titan health
  1958. VariableString.Concat("VariableF", "HealthFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
  1959. VariableFloat.Set("HealthFactor", VariableFloat(VariableString("VariableF")));
  1960. VariableFloat.Multiply("HealthFactor", VariableInt("Titan_HP").ConvertToFloat());
  1961. VariableInt.Set("Titan_HP", VariableFloat("HealthFactor").ConvertToInt());
  1962.  
  1963. // Titan speed
  1964. VariableString.Concat("VariableF", "SpeedFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
  1965. VariableFloat.Set("SpeedFactor", VariableFloat(VariableString("VariableF")));
  1966. VariableFloat.Multiply("SpeedFactor", VariableInt("Titan_Speed").ConvertToFloat());
  1967. VariableInt.Set("Titan_Speed", VariableFloat("SpeedFactor").ConvertToInt());
  1968.  
  1969. // View distance
  1970. VariableString.Concat("VariableF", "ViewDistanceFactor", VariableInt("ExpeditionDifficulty").ConvertToString());
  1971. VariableFloat.Set("ViewDistanceFactor", VariableFloat(VariableString("VariableF")));
  1972. VariableFloat.Multiply("ViewDistanceFactor", VariableInt("Titan_ViewDistance").ConvertToFloat());
  1973. VariableInt.Set("Titan_ViewDistance", VariableFloat("ViewDistanceFactor").ConvertToInt());
  1974.  
  1975. }
  1976.  
  1977. // Set some default values again
  1978. If(String.Equals(VariableString("input"), "/resettitanvalues"))
  1979. {
  1980. VariableString.Set("Titan_Eye", "");
  1981. VariableString.Set("Titan_Skin", "");
  1982. VariableFloat.Set("Titan_Animation", 1.0);
  1983. }
  1984.  
  1985. // Spawn an EM titan
  1986. If(String.Equals(VariableString("input"), "/spawntitan"))
  1987. {
  1988. Game.PrintMessage("EM/Commands//setrandomtitanclass");
  1989. Game.PrintMessage("EM/Commands//setrandomtitantype");
  1990.  
  1991. If(Bool.Equals(VariableBool("EnableTitanHealth"), true))
  1992. {
  1993. Game.PrintMessage("EM/Commands//setrandomtitanhealth");
  1994. }
  1995.  
  1996. Game.PrintMessage("EM/Commands//setrandomtitansize");
  1997. Game.PrintMessage("EM/Commands//settitanspeedbysize");
  1998.  
  1999. If(Bool.Equals(VariableBool("EnableTitanViewDistance"), true))
  2000. {
  2001. Game.PrintMessage("EM/Commands//settitanviewdistance");
  2002. }
  2003.  
  2004. If(Bool.Equals(VariableBool("EnableRandomTitanSpeed"), true))
  2005. {
  2006. Game.PrintMessage("EM/Commands//setrandomtitanspeed");
  2007. }
  2008. If(Bool.Equals(VariableBool("EnableRandomTitanSkins"), true))
  2009. {
  2010. Game.PrintMessage("EM/Commands//setrandomtitanskin");
  2011. }
  2012. If(Bool.Equals(VariableBool("EnableRandomTitanAnimation"), true))
  2013. {
  2014. Game.PrintMessage("EM/Commands//setrandomtitananimationspeed");
  2015. }
  2016.  
  2017. Game.PrintMessage("EM/Commands//settitanattributesbyexpeditiondifficulty");
  2018.  
  2019. If(Bool.Equals(VariableBool("EnableTitanViewDistance"), false))
  2020. {
  2021. VariableInt.Set("Titan_ViewDistance", 99999);
  2022. }
  2023.  
  2024. If(Bool.Equals(VariableBool("EnableTitanHealth"), false))
  2025. {
  2026. VariableInt.Set("Titan_HP", 10); // setting this value to 0 makes titans follow the RC settings, so 10 is the lowest valid input
  2027. }
  2028.  
  2029. 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());
  2030.  
  2031. Game.PrintMessage(VariableString("TitanSpawner"));
  2032. Game.PrintMessage("EM/Commands//resettitanvalues");
  2033. }
  2034.  
  2035. // Set values specific for the region commands
  2036. If(String.Equals(VariableString("input"), "/spawntitanregion"))
  2037. {
  2038. VariableInt.Set("TitanX", RegionRandomX(VariableString("Region")).ConvertToInt());
  2039. VariableInt.Set("TitanY", RegionRandomY(VariableString("Region")).ConvertToInt());
  2040. VariableInt.Set("TitanZ", RegionRandomZ(VariableString("Region")).ConvertToInt());
  2041. Game.PrintMessage("EM/Commands//spawntitan");
  2042. }
  2043.  
  2044. // This is how to spawn a titan inside a mc region with the /sptit command
  2045. If(String.Equals(VariableString("input"), "/spawntitanmc"))
  2046. {
  2047. Game.PrintMessage("EM/Commands//setrandomtitancords");
  2048. Game.PrintMessage("EM/Commands//spawntitan");
  2049. }
  2050.  
  2051. }
  2052.  
  2053.  
  2054. // MISC - Other commands
  2055. If(String.StartsWith(VariableString("input"), "/"))
  2056. {
  2057. // Daylight
  2058. If(String.Equals(VariableString("input"),"/day"))
  2059. {
  2060. Game.PrintMessage("<b>[<color=#F2C00E>Time</color><color=#FFFFFF>]: Daylight has arrived!</color></b>");
  2061. Game.PrintMessage("EM/Commands//setdaylightcolor[-]0[d]6");
  2062. 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")
  2063. }
  2064.  
  2065. // Nighttime
  2066. If(String.Equals(VariableString("input"),"/night"))
  2067. {
  2068. Game.PrintMessage("<b>[<color=#F2C00E>Time</color><color=#FFFFFF>]: Darkness has arrived!</color></b>");
  2069. Game.PrintMessage("<b>[<color=#2ECC71>Command</color><color=#FFFFFF>]: Equip your flash flares!</color></b>");
  2070. Game.PrintMessage("EM/Commands//setdaylightcolor[-]0[d]04");
  2071. 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")
  2072. }
  2073.  
  2074. // Set generic variable
  2075. If(String.Equals(VariableString("input"),"/setvariable"))
  2076. {
  2077. VariableBool.Set("SetVariableNameValue", true);
  2078. Game.PrintMessage("<b><color=#D46565>[LOGIC]</color>: Enter a variable name:</b>");
  2079. }
  2080.  
  2081. }
  2082.  
  2083.  
  2084. // Utils - These functions are used by other functions
  2085. If(String.StartsWith(VariableString("input"), "/"))
  2086. {
  2087. // Simulate a parameter
  2088. If(String.Equals(VariableString("input"),"/setcommandparameter"))
  2089. {
  2090. VariableInt.Add("ParameterLoopEnd", VariableInt("ParameterLoopStep"))
  2091. While(VariableInt.LessThanOrEqual(VariableInt("ParameterLoopStart"), VariableInt("ParameterLoopEnd")))
  2092. {
  2093. VariableString.Concat("WhileCommand", VariableString("ParameterCommand"), VariableInt("ParameterLoopStart").ConvertToString());
  2094. If(String.Equals(VariableString("ParameterCommandInput"), VariableString("WhileCommand")))
  2095. {
  2096. VariableInt.Set(VariableString("ParameterName"), VariableInt("ParameterLoopStart"));
  2097. VariableInt.Set("ParameterLoopStart", "ParameterLoopEnd");
  2098. }
  2099. VariableInt.Add("ParameterLoopStart", VariableInt("ParameterLoopStep"));
  2100. }
  2101. }
  2102.  
  2103. // Simulate a parameter float
  2104. If(String.Equals(VariableString("input"),"/setcommandparameterf"))
  2105. {
  2106. VariableInt.Add("ParameterLoopEnd", VariableInt("ParameterLoopStep"))
  2107. While(VariableInt.LessThanOrEqual(VariableInt("ParameterLoopStart"), VariableInt("ParameterLoopEnd")))
  2108. {
  2109. VariableString.Concat("WhileCommand", VariableString("ParameterCommand"), VariableInt("ParameterLoopStart").ConvertToString());
  2110. If(String.Equals(VariableString("ParameterCommandInput"), VariableString("WhileCommand")))
  2111. {
  2112. VariableFloat.Set(VariableString("ParameterName"), VariableInt("ParameterLoopStart").ConvertToFloat());
  2113. VariableInt.Set("ParameterLoopStart", "ParameterLoopEnd");
  2114. }
  2115. VariableInt.Add("ParameterLoopStart", VariableInt("ParameterLoopStep"));
  2116. }
  2117. VariableString.Set("WhileCommand", "");
  2118. }
  2119.  
  2120. }
  2121.  
  2122.  
  2123. // Generic regions - Generic region commands
  2124. If(String.StartsWith(VariableString("input"), "/"))
  2125. {
  2126.  
  2127. If(String.Equals(VariableString("input"), "/hregion"))
  2128. {
  2129. Game.PrintMessage("<b><i><color=#000000>** --- Dynamic region commands --- **</color></i></b>");
  2130. Game.PrintMessage("<i><color=#000000>--- Dynamic region allows you to spawn titans anywhere based on your location --- **</color></i>");
  2131. Game.PrintMessage("<color=#ffff00> --- /checkregion > Check current dynamic region cords</color>");
  2132. Game.PrintMessage("<color=#ffff00> --- /setxp[-10000 till 10000] > Set the X+ cord</color>");
  2133. Game.PrintMessage("<color=#ffff00> --- /setxn[-10000 till 10000] > Set the X- cord</color>");
  2134. Game.PrintMessage("<color=#ffff00> --- /setyp[-10000 till 10000] > Set the Y+ cord</color>");
  2135. Game.PrintMessage("<color=#ffff00> --- /setyn[-10000 till 10000] > Set the Y- cord</color>");
  2136. }
  2137.  
  2138. // Check the current values of the regions
  2139. If(String.Equals(VariableString("input"), "/checkregion"))
  2140. {
  2141. VariableInt.Set("IntX+", VariableFloat("X+").ConvertToInt());
  2142. VariableInt.Set("IntX-", VariableFloat("X-").ConvertToInt());
  2143. VariableInt.Set("IntY+", VariableFloat("Y+").ConvertToInt());
  2144. VariableInt.Set("IntY-", VariableFloat("Y-").ConvertToInt());
  2145. VariableString.Concat("Message", "X   ", VariableInt("IntX-").ConvertToString(), " until ", VariableInt("IntX+").ConvertToString());
  2146. Game.PrintMessage(VariableString("Message"));
  2147. VariableString.Concat("Message", "Y   ", VariableInt("IntY-").ConvertToString(), " until ", VariableInt("IntY+").ConvertToString());
  2148. Game.PrintMessage(VariableString("Message"));
  2149. }
  2150.  
  2151. // Generic MC based region commands
  2152. If(String.StartsWith(VariableString("input"), "/setxp"))
  2153. {
  2154. VariableString.Set("ParameterCommand", "/setxp");
  2155. VariableString.Set("ParameterCommandInput", VariableString("input"));
  2156. VariableInt.Set("ParameterLoopStart", -10000);
  2157. VariableInt.Set("ParameterLoopEnd", 10000);
  2158. VariableInt.Set("ParameterLoopStep", 100);
  2159. VariableString.Set("ParameterName", "X+");
  2160. Game.PrintMessage("EM/Commands//setcommandparameterf");
  2161. }
  2162.  
  2163. If(String.StartsWith(VariableString("input"), "/setxn"))
  2164. {
  2165. VariableString.Set("ParameterCommand", "/setxn");
  2166. VariableString.Set("ParameterCommandInput", VariableString("input"));
  2167. VariableInt.Set("ParameterLoopStart", -10000);
  2168. VariableInt.Set("ParameterLoopEnd", 10000);
  2169. VariableInt.Set("ParameterLoopStep", 100);
  2170. VariableString.Set("ParameterName", "X-");
  2171. Game.PrintMessage("EM/Commands//setcommandparameterf");
  2172. }
  2173.  
  2174. If(String.StartsWith(VariableString("input"), "/setyp"))
  2175. {
  2176. VariableString.Set("ParameterCommand", "/setyp");
  2177. VariableString.Set("ParameterCommandInput", VariableString("input"));
  2178. VariableInt.Set("ParameterLoopStart", -10000);
  2179. VariableInt.Set("ParameterLoopEnd", 10000);
  2180. VariableInt.Set("ParameterLoopStep", 100);
  2181. VariableString.Set("ParameterName", "Y+");
  2182. Game.PrintMessage("EM/Commands//setcommandparameterf");
  2183. }
  2184.  
  2185. If(String.StartsWith(VariableString("input"), "/setyn"))
  2186. {
  2187. VariableString.Set("ParameterCommand", "/setyn");
  2188. VariableString.Set("ParameterCommandInput", VariableString("input"));
  2189. VariableInt.Set("ParameterLoopStart", -10000);
  2190. VariableInt.Set("ParameterLoopEnd", 10000);
  2191. VariableInt.Set("ParameterLoopStep", 100);
  2192. VariableString.Set("ParameterName", "Y-");
  2193. Game.PrintMessage("EM/Commands//setcommandparameterf");
  2194. }
  2195. }
  2196.  
  2197.  
  2198. // Commander Commands
  2199. If(String.StartsWith(VariableString("input"), "/"))
  2200. {
  2201.  
  2202.  
  2203. If(String.Equals(VariableString("input"),"/ready"))
  2204. {
  2205. Game.PrintMessage("<size=16>[<color=#86d493>COMMAND</color>]: Section Commanders deploy <color=#2881ff>Blue Flare</color> when your position is ready!</size>");
  2206. }
  2207.  
  2208. If(String.Equals(VariableString("input"),"/b"))
  2209. {
  2210. Game.PrintMessage("<size=20>[<color=#2881ff>BLUE FLARE</color>]: Fall back!</size>");
  2211. }
  2212.  
  2213. If(String.Equals(VariableString("input"),"/fl"))
  2214. {
  2215. Game.PrintMessage("<size=16><color=#86d493>COMMAND</color>: Fire green flares to the <b>LEFT</b>!</size>");
  2216. }
  2217.  
  2218. If(String.Equals(VariableString("input"),"/fr"))
  2219. {
  2220. Game.PrintMessage("<size=16><color=#86d493>COMMAND</color>: Fire green flares to the <b>RIGHT</b>!</size>");
  2221. }
  2222.  
  2223. If(String.Equals(VariableString("input"),"/ff"))
  2224. {
  2225. Game.PrintMessage("<size=16><color=#86d493>COMMAND</color>: Fire green flares FORWARD!</size>");
  2226. }
  2227.  
  2228. If(String.Equals(VariableString("input"),"/y"))
  2229. {
  2230. Game.PrintMessage("<size=18>[<color=#f4e129>YELLOW FLARE</color>]: Mission succes!</size>");
  2231. }
  2232.  
  2233. If(String.Equals(VariableString("input"),"/lf"))
  2234. {
  2235. Game.PrintMessage("[<color=#0061e7>LW</color>]: Move further from the center!");
  2236. }
  2237.  
  2238. If(String.Equals(VariableString("input"),"/lc"))
  2239. {
  2240. Game.PrintMessage("[<color=#0061e7>LW</color>]: Get Closer To Center!");
  2241. }
  2242.  
  2243. If(String.Equals(VariableString("input"),"/le"))
  2244. {
  2245. Game.PrintMessage("[<color=#0061e7>LW</color>]: Engage!");
  2246. }
  2247.  
  2248. If(String.Equals(VariableString("input"),"/lce"))
  2249. {
  2250. Game.PrintMessage("[<color=#0061e7>LW</color>]: Engage_Titans At Center!");
  2251. }
  2252.  
  2253. If(String.Equals(VariableString("input"),"/rf"))
  2254. {
  2255. Game.PrintMessage("[<color=#cc2e71>RW</color>]: Move further from the center!");
  2256. }
  2257.  
  2258. If(String.Equals(VariableString("input"),"/rc"))
  2259. {
  2260. Game.PrintMessage("[<color=#cc2e71>RW</color>]: Get Closer To Center!");
  2261. }
  2262.  
  2263. If(String.Equals(VariableString("input"),"/re"))
  2264. {
  2265. Game.PrintMessage("[<color=#cc2e71>RW</color>]: Engage!");
  2266. }
  2267.  
  2268. If(String.Equals(VariableString("input"),"/rce"))
  2269. {
  2270. Game.PrintMessage("[<color=#cc2e71>RW</color>]: Engage Titans At Center!");
  2271. }
  2272.  
  2273. If(String.Equals(VariableString("input"),"/ve"))
  2274. {
  2275. Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: <size=15>Engage</size>!");
  2276. }
  2277.  
  2278. If(String.Equals(VariableString("input"),"/vr"))
  2279. {
  2280. Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: <size=15>Regroup</size>!");
  2281. }
  2282.  
  2283. If(String.Equals(VariableString("input"),"/vf"))
  2284. {
  2285. Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: Move further from the center!!");
  2286. }
  2287.  
  2288. If(String.Equals(VariableString("input"),"/vc"))
  2289. {
  2290. Game.PrintMessage("[<color=#d8bb0c>VANGUARD</color>]: Move close to the center!");
  2291. }
  2292.  
  2293. If(String.Equals(VariableString("input"),"/sr"))
  2294. {
  2295. Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Right Wing!");
  2296. }
  2297.  
  2298. If(String.Equals(VariableString("input"),"/sl"))
  2299. {
  2300. Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Left Wing!");
  2301. }
  2302.  
  2303. If(String.Equals(VariableString("input"),"/sv"))
  2304. {
  2305. Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Vanguard");
  2306. }
  2307.  
  2308. If(String.Equals(VariableString("input"),"/g"))
  2309. {
  2310. Game.PrintMessage("[<color=#ff6400>COMMAND</color>]: ALL FIRE <color=#00ff00>GREEN</color> FLARES");
  2311. }
  2312.  
  2313. If(String.Equals(VariableString("input"),"/sg"))
  2314. {
  2315. Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Rear Guard!");
  2316. }
  2317.  
  2318. If(String.Equals(VariableString("input"),"/sce"))
  2319. {
  2320. Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Engage Titans At Center!");
  2321. }
  2322.  
  2323. If(String.Equals(VariableString("input"),"/sc"))
  2324. {
  2325. Game.PrintMessage("[<color=#ff6400>SUPPORT</color>]: Move to center!");
  2326. }
  2327.  
  2328. If(String.Equals(VariableString("input"),"/gr"))
  2329. {
  2330. Game.PrintMessage("[<color=#7e1b75>REAR GUARD</color>]: Help the Right Wing!");
  2331. }
  2332.  
  2333. If(String.Equals(VariableString("input"),"/gl"))
  2334. {
  2335. Game.PrintMessage("[<color=#7e1b75>REAR GUARD</color>]: Help the Left Wing!");
  2336. }
  2337.  
  2338. If(String.Equals(VariableString("input"),"/gc"))
  2339. {
  2340. Game.PrintMessage("[<color=#7e1b75>REAR GUARD</color>]: Help the Center!");
  2341. }
  2342.  
  2343. If(String.Equals(VariableString("input"),"/lrf"))
  2344. {
  2345. Game.PrintMessage("<color=#2ecc71><size=20>Form Long Range Formation!</size></color>");
  2346. }
  2347.  
  2348. If(String.Equals(VariableString("input"),"/crf"))
  2349. {
  2350. Game.PrintMessage("<color=#2ecc71><size=20>Form Close Range Formation!</size></color>");
  2351. }
  2352.  
  2353. }
  2354.  
  2355.  
  2356. // ADD MAP SPECIFIC LOGIC HERE
  2357.  
  2358. If(String.Equals(VariableString("input"),"/annie"))
  2359. {
  2360. Game.PrintMessage("EM/Commands//annie[-]5467[-]0[-]7941[-]3666[-]5[-]80[-]180[-]20[-]0[-]60");
  2361. VariableString.Set("Message", "EM/Commands//pm[-]1[-]Annie[-]is[-]spawned[-]");
  2362. Game.PrintMessage("EM/Commands//pm[-]1[-]Annie[-]is[-]spawned[-]");
  2363. }
  2364.  
  2365. If(String.Equals(VariableString("input"), "/tproad"))
  2366. {
  2367. ForeachTitan("TitanMy")
  2368. {
  2369. Titan.MoveTitan(VariableTitan("TitanMy"), RegionRandomX("road_to_forest"),RegionRandomY("road_to_forest"),RegionRandomZ("road_to_forest"));
  2370. }
  2371. }
  2372.  
  2373. // Commander Commands
  2374.  
  2375.  
  2376. If(String.Equals(VariableString("input"), "/randompos"))
  2377. {
  2378. ForeachPlayer("EPlayer")
  2379. {
  2380. VariableFloat.Set("TC_X", VariablePlayer("MCPlayer").GetPositionX());
  2381. VariableFloat.Set("TC_Y", VariablePlayer("MCPlayer").GetPositionY());
  2382. VariableFloat.Set("TC_Z", VariablePlayer("MCPlayer").GetPositionZ());
  2383. VariableInt.SetRandom("Teams", 1, 5);
  2384.  
  2385. If(Int.Equals(VariableInt("Teams"), 1))
  2386. {
  2387. VariableFloat.Add("TC_X", 1000.0);
  2388. }
  2389.  
  2390. If(Int.Equals(VariableInt("Teams"), 2))
  2391. {
  2392. VariableFloat.Add("TC_X", -1000.0);
  2393. }
  2394.  
  2395. If(Int.Equals(VariableInt("Teams"), 3))
  2396. {
  2397. VariableFloat.Add("TC_Z", 1000.0);
  2398. }
  2399.  
  2400. If(Int.Equals(VariableInt("Teams"), 4))
  2401. {
  2402. VariableFloat.Add("TC_Z", -1000.0);
  2403. }
  2404. Player.MovePlayer(VariablePlayer("EPlayer"), VariableFloat("TC_X"), VariableFloat("TC_Y"), VariableFloat("TC_Z"));
  2405. }
  2406. }
  2407.  
  2408.  
  2409. // Road to Forest commands
  2410.  
  2411. // Titans
  2412.  
  2413. If(String.Equals(VariableString("input"),"/road1"))
  2414. {
  2415. Game.PrintMessage("<size=20><color=#2ecc71>Erwin</color>: The 57th Expedition has begun! All Scouts move out!</size>");
  2416. VariableString.Set("Region", "road_to_forest");
  2417. Game.PrintMessage("EM/Commands//spawntitansatregion20");
  2418. }
  2419.  
  2420. If(String.Equals(VariableString("input"),"/road2"))
  2421. {
  2422.  
  2423. Game.PrintMessage("<size=20><color=#000000>Levi</color>: The Female Titan is approaching!</size>");
  2424. Game.PrintMessage("<size=20><color=#2ecc71>Erwin</color>: All Scouts move to the Titan Forest!</size>");
  2425.  
  2426. VariableString.Set("Region", "road_to_forest2");
  2427. Game.PrintMessage("EM/Commands//spawntitansatregion23");
  2428.  
  2429. }
  2430.  
  2431. // DESERT
  2432. If(String.Equals(VariableString("input"),"/desert"))
  2433. {
  2434.  
  2435. Game.PrintMessage("<size=20><color=#2ecc71>Erwin</color>: All Scouts move to the Wasteland!</size>");
  2436.  
  2437. // -- TITAN CLASS TYPES --
  2438. VariableInt.Set("TitanClass_Chance0", 0); // 10
  2439. VariableInt.Set("TitanClass_Chance1", 101); // 45
  2440. VariableInt.Set("TitanClass_Chance2", 102); // 95
  2441. VariableInt.Set("TitanClass_Chance3", 103); // 100
  2442.  
  2443. VariableString.Set("Region", "desert");
  2444. VariableInt.Set("TitanAmount", 25);
  2445. Game.PrintMessage("EM/Commands//settitanamount");
  2446. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2447. {
  2448. Game.PrintMessage("EM/Commands//spawntitanregion");
  2449. VariableInt.Subtract("TitanAmount", 1);
  2450. }
  2451.  
  2452. VariableInt.Set("TitanClass_Chance0", 10); // 10
  2453. VariableInt.Set("TitanClass_Chance1", 45); // 45
  2454. VariableInt.Set("TitanClass_Chance2", 95); // 95
  2455. VariableInt.Set("TitanClass_Chance3", 100); // 100
  2456.  
  2457. }
  2458.  
  2459. // DESERT
  2460. If(String.Equals(VariableString("input"),"/desert2"))
  2461. {
  2462. Game.PrintMessage("Unfinished you say? It is progress! Just like it all started two years ago");
  2463. Game.PrintMessage("Every day is a victory");
  2464. Game.PrintMessage("Every day is a step closer to our dreams");
  2465. Game.PrintMessage("Do not think! Advance!");
  2466. }
  2467.  
  2468. // DESERT
  2469. If(String.Equals(VariableString("input"),"/sethsall"))
  2470. {
  2471. VariableInt.Set("hsloop", 80);
  2472. While(VariableInt.GreaterThan(VariableInt("hsloop"), 0))
  2473. {
  2474. VariableString.Concat("hsz", "EM/Commands//seths[-]", VariableInt("hsloop").ConvertToString(), "[-]300");
  2475. Game.PrintMessage(VariableString("hsz"));
  2476. VariableInt.Subtract("hsloop", 1);
  2477. }
  2478. }
  2479.  
  2480. // DESERT
  2481. If(String.Equals(VariableString("input"),"/resethsall"))
  2482. {
  2483. VariableInt.Set("hsloop", 80);
  2484. Game.PrintMessage("EM/Commands//settitanamount");
  2485. While(VariableInt.GreaterThan(VariableInt("hsloop"), 0))
  2486. {
  2487. VariableString.Concat("hsz", "EM/Commands//seths[-]", VariableInt("hsloop").ConvertToString(), "[-]45");
  2488. Game.PrintMessage(VariableString("hsz"));
  2489. VariableInt.Subtract("hsloop", 1);
  2490. }
  2491. }
  2492.  
  2493. If(String.Equals(VariableString("input"),"/forest"))
  2494. {
  2495. Game.PrintMessage("[<color=#406d32>SCOUT</color>]: The forest has been swarmed with titans!");
  2496. VariableString.Set("Region", "forest_hell");
  2497. VariableInt.Set("TitanAmount", 7);
  2498. Game.PrintMessage("EM/Commands//settitanamount");
  2499. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2500. {
  2501. Game.PrintMessage("EM/Commands//spawntitanregion");
  2502. VariableInt.Subtract("TitanAmount", 1);
  2503. }
  2504. }
  2505.  
  2506. If(String.Equals(VariableString("input"),"/cannon"))
  2507. {
  2508. Game.PrintMessage("[<color=#406d32>SCOUT</color>]: Cannon town has been lost!");
  2509. VariableString.Set("Region", "cannon_town");
  2510. VariableInt.Set("TitanAmount", 10);
  2511. Game.PrintMessage("EM/Commands//settitanamount");
  2512. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2513. {
  2514. Game.PrintMessage("EM/Commands//spawntitanregion");
  2515. VariableInt.Subtract("TitanAmount", 1);
  2516. }
  2517. }
  2518.  
  2519. // Revives
  2520.  
  2521. If(String.Equals(VariableString("input"),"/revforest"))
  2522. {
  2523. Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Forest!</size></color></b>");
  2524. ForeachPlayer("EPlayer")
  2525. {
  2526. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  2527. If(Bool.Equals(VariableBool("isAlive"), false))
  2528. {
  2529. VariableInt.Add("Revives", 1);
  2530. Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("RP_Forest_Zone"),RegionRandomY("RP_Forest_Zone"),RegionRandomZ("RP_Forest_Zone"));
  2531. }
  2532. }
  2533. }
  2534.  
  2535. // Teleports
  2536.  
  2537. If(String.Equals(VariableString("input"),"/tpforest"))
  2538. {
  2539. ForeachTitan("TitanMy")
  2540. {
  2541. Titan.MoveTitan(VariableTitan("TitanMy"), RegionRandomX("Titan_Forest"),RegionRandomY("Titan_Forest"),RegionRandomZ("Titan_Forest"));
  2542. }
  2543. Game.PrintMessage("The_remaining_titans_entered_the_titan_forest_take_them_down!");
  2544. }
  2545.  
  2546. // Road to Castle
  2547.  
  2548. // Titan
  2549.  
  2550. If(String.Equals(VariableString("input"),"/black1"))
  2551. {
  2552.  
  2553. Game.PrintMessage("<color=#2ecc71>Erwin Smith</color>:Scouts move out! The expedition to retake <color=#d8bb0c>Wall Maria</color> has begun!");
  2554. VariableString.Set("Region", "Black_Route1");
  2555. VariableInt.Set("TitanAmount", 25);
  2556. Game.PrintMessage("EM/Commands//settitanamount");
  2557. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2558. {
  2559. Game.PrintMessage("EM/Commands//spawntitanregion");
  2560. VariableInt.Subtract("TitanAmount", 1);
  2561. }
  2562.  
  2563. }
  2564.  
  2565. If(String.Equals(VariableString("input"),"/black2"))
  2566. {
  2567. VariableString.Set("Region", "Bridge1");
  2568. VariableInt.Set("TitanAmount", 9);
  2569. Game.PrintMessage("EM/Commands//settitanamount");
  2570. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2571. {
  2572. Game.PrintMessage("EM/Commands//spawntitanregion");
  2573. VariableInt.Subtract("TitanAmount", 1);
  2574. }
  2575. }
  2576.  
  2577. If(String.Equals(VariableString("input"),"/black3"))
  2578. {
  2579. VariableString.Set("Region", "Bridge2");
  2580. VariableInt.Set("TitanAmount", 12);
  2581. Game.PrintMessage("EM/Commands//settitanamount");
  2582. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2583. {
  2584. Game.PrintMessage("EM/Commands//spawntitanregion");
  2585. VariableInt.Subtract("TitanAmount", 1);
  2586. }
  2587. }
  2588.  
  2589. If(String.Equals(VariableString("input"),"/black4"))
  2590. {
  2591. Game.PrintMessage("A cave has been spotted! Move out!");
  2592. VariableString.Set("Region", "Black_Route2");
  2593. VariableInt.Set("TitanAmount", 10);
  2594. Game.PrintMessage("EM/Commands//settitanamount");
  2595. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2596. {
  2597. Game.PrintMessage("EM/Commands//spawntitanregion");
  2598. VariableInt.Subtract("TitanAmount", 1);
  2599. }
  2600. }
  2601.  
  2602. If(String.Equals(VariableString("input"),"/black5"))
  2603. {
  2604. Game.PrintMessage("We spotted a castle in the distance move out and regroup there!");
  2605. VariableString.Set("Region", "Black_Route3");
  2606. VariableInt.Set("TitanAmount", 11);
  2607. Game.PrintMessage("EM/Commands//settitanamount");
  2608. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2609. {
  2610. Game.PrintMessage("EM/Commands//spawntitanregion");
  2611. VariableInt.Subtract("TitanAmount", 1);
  2612. }
  2613. }
  2614.  
  2615. If(String.Equals(VariableString("input"),"/messruins"))
  2616. {
  2617. Game.PrintMessage("<b><color=#0066CC><size=14>Levi squad has started to fight near the ruins!</size></color></b>");
  2618. Titan.SpawnTitanAt(4, 6.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
  2619. Titan.SpawnTitanAt(4, 5.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
  2620. Titan.SpawnTitanAt(4, 4.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
  2621. Titan.SpawnTitanAt(4, 3.0, 600, 1, RegionRandomX("mess_ruins"),RegionRandomY("mess_ruins"),RegionRandomZ("mess_ruins"));
  2622. }
  2623.  
  2624. If(String.Equals(VariableString("input"),"/bridge"))
  2625. {
  2626.  
  2627. Game.PrintMessage("[<color=#406d32>SCOUT</color>]: The bridge has been lost!");
  2628.  
  2629. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
  2630. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
  2631. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
  2632. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
  2633. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
  2634. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
  2635. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("Black_Bridge"),RegionRandomY("Black_Bridge"),RegionRandomZ("Black_Bridge"));
  2636.  
  2637. }
  2638.  
  2639. If(String.Equals(VariableString("input"),"/forest2"))
  2640. {
  2641. Game.PrintMessage("[<color=#406d32>SCOUT</color>]: The forest has been swarmed with titans!");
  2642.  
  2643. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2644. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2645. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2646. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2647. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2648. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2649. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2650. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2651. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2652. Titan.SpawnTitanAt(1, 4.4, 200, 1, RegionRandomX("forest_hell2"),RegionRandomY("forest_hell2"),RegionRandomZ("forest_hell2"));
  2653.  
  2654. }
  2655.  
  2656. If(String.Equals(VariableString("input"),"/castle1"))
  2657. {
  2658. VariableString.Set("Region", "Castle_North");
  2659. VariableInt.Set("TitanAmount", 12);
  2660. Game.PrintMessage("EM/Commands//settitanamount");
  2661. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2662. {
  2663. Game.PrintMessage("EM/Commands//spawntitanregion");
  2664. VariableInt.Subtract("TitanAmount", 1);
  2665. }
  2666. }
  2667.  
  2668. If(String.Equals(VariableString("input"),"/castle2"))
  2669. {
  2670. VariableString.Set("Region", "Castle_West");
  2671. VariableInt.Set("TitanAmount", 12);
  2672. Game.PrintMessage("EM/Commands//settitanamount");
  2673. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2674. {
  2675. Game.PrintMessage("EM/Commands//spawntitanregion");
  2676. VariableInt.Subtract("TitanAmount", 1);
  2677. }
  2678. }
  2679.  
  2680. // Castle Spawn wave (25) South
  2681. If(String.Equals(VariableString("input"),"/castle3"))
  2682. {
  2683. VariableString.Set("Region", "Castle_South");
  2684. VariableInt.Set("TitanAmount", 12);
  2685. Game.PrintMessage("EM/Commands//settitanamount");
  2686. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2687. {
  2688. Game.PrintMessage("EM/Commands//spawntitanregion");
  2689. VariableInt.Subtract("TitanAmount", 1);
  2690. }
  2691. }
  2692.  
  2693. // Castle Spawn wave (25) North
  2694. If(String.Equals(VariableString("input"),"/castle4"))
  2695. {
  2696. VariableString.Set("Region", "Castle_East");
  2697. VariableInt.Set("TitanAmount", 12);
  2698. Game.PrintMessage("EM/Commands//settitanamount");
  2699. While(VariableInt.GreaterThan(VariableInt("TitanAmount"), 0))
  2700. {
  2701. Game.PrintMessage("EM/Commands//spawntitanregion");
  2702. VariableInt.Subtract("TitanAmount", 1);
  2703. }
  2704. }
  2705.  
  2706. // Revives
  2707.  
  2708. If(String.Equals(VariableString("input"), "/revfort"))
  2709. {
  2710. Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Fort</size></color></b>");
  2711. ForeachPlayer("EPlayer")
  2712. {
  2713. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  2714. If(Bool.Equals(VariableBool("isAlive"), false))
  2715. {
  2716. VariableInt.Add("Revives", 1);
  2717. Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("fort_revive"),RegionRandomY("fort_revive"),RegionRandomZ("fort_revive"));
  2718. }
  2719. }
  2720. }
  2721.  
  2722. If(String.Equals(VariableString("input"), "/revbridge1"))
  2723. {
  2724. Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Bridge</size></color></b>");
  2725. ForeachPlayer("EPlayer")
  2726. {
  2727. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  2728. If(Bool.Equals(VariableBool("isAlive"), false))
  2729. {
  2730. VariableInt.Add("Revives", 1);
  2731. Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("rev_bridge1"),RegionRandomY("rev_bridge1"),RegionRandomZ("rev_bridge1"));
  2732. }
  2733. }
  2734. }
  2735.  
  2736. If(String.Equals(VariableString("input"), "/revbridge2"))
  2737. {
  2738. Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Bridge</size></color></b>");
  2739. ForeachPlayer("EPlayer")
  2740. {
  2741. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  2742. If(Bool.Equals(VariableBool("isAlive"), false))
  2743. {
  2744. VariableInt.Add("Revives", 1);
  2745. Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("rev_bridge2"),RegionRandomY("rev_bridge2"),RegionRandomZ("rev_bridge2"));
  2746. }
  2747. }
  2748. }
  2749.  
  2750. If(String.Equals(VariableString("input"), "/revcastle"))
  2751. {
  2752. Game.PrintMessage("<b><color=#0066CC><size=15>Reinforcements have arrived at The Castle</size></color></b>");
  2753. ForeachPlayer("EPlayer")
  2754. {
  2755. VariableBool.Set("isAlive",VariablePlayer("EPlayer").GetIsAlive()); // is the current player alive?
  2756. If(Bool.Equals(VariableBool("isAlive"), false))
  2757. {
  2758. VariableInt.Add("Revives", 1);
  2759. Player.SpawnPlayerAt(VariablePlayer("EPlayer"), RegionRandomX("MC_Castle"),RegionRandomY("MC_Castle"),RegionRandomZ("MC_Castle"));
  2760. }
  2761. }
  2762. }
  2763.  
  2764. // Teleports
  2765.  
  2766. If(String.Equals(VariableString("input"),"/tpcastle"))
  2767. {
  2768. ForeachTitan("TitanMy")
  2769. {
  2770. Titan.MoveTitan(VariableTitan("TitanMy"), RegionRandomX("Castle_Zone"),RegionRandomY("Castle_Zone"),RegionRandomZ("Castle_Zone"));
  2771. }
  2772. Game.PrintMessage("The_remaining_titans_have_entered_the_castle!");
  2773. }
  2774.  
  2775. // Crawler fun
  2776.  
  2777. If(String.Equals(VariableString("input"),"/crawler"))
  2778. {
  2779. ForeachPlayer("EPlayer")
  2780. {
  2781. VariableFloat.Set("CP_X", VariablePlayer("EPlayer").GetPositionX());
  2782. VariableFloat.Set("CP_Y", VariablePlayer("EPlayer").GetPositionY());
  2783. VariableFloat.Set("CP_Z", VariablePlayer("EPlayer").GetPositionZ());
  2784. VariableFloat.Add("CP_Y", 500.0);
  2785. Titan.SpawnTitanAt(3, 2.0, VariableInt("TitanClass_HPMax0"), 1, VariableFloat("CP_X"),VariableFloat("CP_Y"),VariableFloat("CP_Z"));
  2786. }
  2787. }
  2788.  
  2789. }
Advertisement
Add Comment
Please, Sign In to add comment