p2svox

medic_0.4.0

Oct 8th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.89 KB | None | 0 0
  1. OnRoundStart()
  2. {
  3. 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");
  4. Game.PrintMessage("Include<size=1>____</size>the<size=1>____</size>space");
  5.  
  6. VariableBool.Set("runScript", false);
  7. VariableBool.Set("firstRun", true);
  8. }
  9.  
  10. OnUpdate()
  11. {
  12. If(Bool.Equals(VariableBool("runScript"), true))
  13. {
  14. If(Bool.Equals(VariableBool("firstRun"), true))
  15. {
  16. VariableString.Set("char0", "0");
  17. VariableString.Set("char1", "1");
  18. VariableString.Set("char2", "2");
  19. VariableString.Set("char3", "3");
  20. VariableString.Set("char4", "4");
  21. VariableString.Set("char5", "5");
  22. VariableString.Set("char6", "6");
  23. VariableString.Set("char7", "7");
  24. VariableString.Set("char8", "8");
  25. VariableString.Set("char9", "9");
  26. VariableString.Set("char10", "a");
  27. VariableString.Set("char11", "b");
  28. VariableString.Set("char12", "c");
  29. VariableString.Set("char13", "d");
  30. VariableString.Set("char14", "e");
  31. VariableString.Set("char15", "f");
  32. VariableString.Set("char16", "A");
  33. VariableString.Set("char17", "B");
  34. VariableString.Set("char18", "C");
  35. VariableString.Set("char19", "D");
  36. VariableString.Set("char20", "E");
  37. VariableString.Set("char21", "F");
  38. VariableString.Set("char22", "g");
  39. VariableString.Set("char23", "h");
  40. VariableString.Set("char24", "i");
  41. VariableString.Set("char25", "j");
  42. VariableString.Set("char26", "k");
  43. VariableString.Set("char27", "l");
  44. VariableString.Set("char28", "m");
  45. VariableString.Set("char29", "n");
  46. VariableString.Set("char30", "o");
  47. VariableString.Set("char31", "p");
  48. VariableString.Set("char32", "q");
  49. VariableString.Set("char33", "r");
  50. VariableString.Set("char34", "s");
  51. VariableString.Set("char35", "t");
  52. VariableString.Set("char36", "u");
  53. VariableString.Set("char37", "v");
  54. VariableString.Set("char38", "w");
  55. VariableString.Set("char39", "x");
  56. VariableString.Set("char40", "y");
  57. VariableString.Set("char41", "z");
  58. VariableString.Set("char42", "G");
  59. VariableString.Set("char43", "H");
  60. VariableString.Set("char44", "I");
  61. VariableString.Set("char45", "J");
  62. VariableString.Set("char46", "K");
  63. VariableString.Set("char47", "L");
  64. VariableString.Set("char48", "M");
  65. VariableString.Set("char49", "N");
  66. VariableString.Set("char50", "O");
  67. VariableString.Set("char51", "P");
  68. VariableString.Set("char52", "Q");
  69. VariableString.Set("char53", "R");
  70. VariableString.Set("char54", "S");
  71. VariableString.Set("char55", "T");
  72. VariableString.Set("char56", "U");
  73. VariableString.Set("char57", "V");
  74. VariableString.Set("char58", "W");
  75. VariableString.Set("char59", "X");
  76. VariableString.Set("char60", "Y");
  77. VariableString.Set("char61", "Z");
  78. VariableString.Set("char62", "'");
  79.  
  80. VariableFloat.Set("radius", 50.0);
  81. VariableInt.Set("revTime", 5);
  82. VariableInt.Set("deathTime", 120);
  83. VariableInt.Set("cooldown", 30);
  84. VariableInt.Set("counterMain", 0);
  85. VariableInt.Set("cooldown0", 0);
  86. VariableInt.Set("cooldown1", 0);
  87. VariableInt.Set("cooldown2", 0);
  88. VariableInt.Set("cooldown3", 0);
  89. VariableInt.Set("cooldown4", 0);
  90. VariableInt.Set("cooldown5", 0);
  91. VariableInt.Set("cooldown6", 0);
  92. VariableInt.Set("cooldown7", 0);
  93. VariableInt.Set("cooldown8", 0);
  94. VariableInt.Set("cooldown9", 0);
  95. VariableInt.Set("cooldown10", 0);
  96. VariableInt.Set("cooldown11", 0);
  97. VariableInt.Set("cooldown12", 0);
  98. VariableInt.Set("cooldown13", 0);
  99. VariableInt.Set("cooldown14", 0);
  100. VariableInt.Set("cooldown15", 0);
  101. VariableInt.Set("cooldown16", 0);
  102. VariableInt.Set("cooldown17", 0);
  103. VariableInt.Set("cooldown18", 0);
  104. VariableInt.Set("cooldown19", 0);
  105. VariableInt.Set("cooldown20", 0);
  106. VariableInt.Set("cooldown21", 0);
  107. VariableInt.Set("cooldown22", 0);
  108. VariableInt.Set("cooldown23", 0);
  109. VariableInt.Set("cooldown24", 0);
  110. VariableInt.Set("cooldown25", 0);
  111. VariableInt.Set("cooldown26", 0);
  112. VariableInt.Set("cooldown27", 0);
  113. VariableInt.Set("cooldown28", 0);
  114. VariableInt.Set("cooldown29", 0);
  115. 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>");
  116. Game.PrintMessage(VariableString("radiusWhat"));
  117. 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>");
  118. Game.PrintMessage(VariableString("revTimeWhat"));
  119. 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>");
  120. Game.PrintMessage(VariableString("deathWhat"));
  121. 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>");
  122. Game.PrintMessage(VariableString("cooldownWhat"));
  123.  
  124. Game.PrintMessage("Script<size=1>____</size>initialized");
  125. VariableBool.Set("firstRun", false);
  126. }
  127.  
  128. VariableInt.Set("counterPlayer", 0);
  129. VariablePlayer.Set("player", VariablePlayer("null"));
  130. ForeachPlayer("player")
  131. {
  132. VariableString.Concat("xDir","x",VariableInt("counterPlayer").ConvertToString());
  133. VariableString.Concat("yDir","y",VariableInt("counterPlayer").ConvertToString());
  134. VariableString.Concat("zDir","z",VariableInt("counterPlayer").ConvertToString());
  135. VariableString.Concat("revDir","rev",VariableInt("counterPlayer").ConvertToString());
  136. VariableString.Concat("deathDir","death",VariableInt("counterPlayer").ConvertToString());
  137. VariableString.Concat("cooldownDirMain","cooldown",VariableInt("counterPlayer").ConvertToString());
  138. If(Bool.Equals(VariablePlayer("player").GetIsAlive(), true))
  139. {
  140. VariableFloat.Set("x", VariablePlayer("player").GetPositionX());
  141. VariableFloat.Set("y", VariablePlayer("player").GetPositionY());
  142. VariableFloat.Set("z", VariablePlayer("player").GetPositionZ());
  143. If(Float.NotEquals(VariableFloat("x"), 0.0))
  144. {
  145. VariableFloat.Set(VariableString("xDir"), VariableFloat("x"));
  146. }
  147. If(Float.NotEquals(VariableFloat("y"), 0.0))
  148. {
  149. VariableFloat.Set(VariableString("yDir"), VariableFloat("y"));
  150. }
  151. If(Float.NotEquals(VariableFloat("z"), 0.0))
  152. {
  153. VariableFloat.Set(VariableString("zDir"), VariableFloat("z"));
  154. }
  155. VariableInt.Set(VariableString("revDir"), 0);
  156. VariableInt.Set(VariableString("deathDir"), 0);
  157. }
  158. If(Bool.Equals(VariablePlayer("player").GetIsAlive(), false))
  159. {
  160. If(Int.LessThan(VariableInt(VariableString("deathDir")), VariableInt("deathTime")))
  161. {
  162. VariableInt.Set("counterPlayerMedic", 0);
  163. VariablePlayer.Set("playerMedic", VariablePlayer("null"));
  164. ForeachPlayer("playerMedic")
  165. {
  166. VariableString.Concat("cooldownDirSub","cooldown",VariableInt("counterPlayer").ConvertToString());
  167. If(Player.NotEquals(VariablePlayer("player"), VariablePlayer("playerMedic")))
  168. {
  169. If(String.Equals(VariablePlayer("playerMedic").GetGuildName(), "[ffffff][ffffff]Medic"))
  170. {
  171. If(Bool.Equals(VariablePlayer("playerMedic").GetIsAlive(), true))
  172. {
  173. If(Int.LessThanOrEqual(VariableInt(VariableString("cooldownDirSub")), 0))
  174. {
  175. VariableFloat.Set("xgreater", VariableFloat(VariableString("xDir")));
  176. VariableFloat.Add("xgreater", VariableFloat("radius"));
  177. If(Float.LessThan(VariablePlayer("playerMedic").GetPositionX(), VariableFloat("xgreater")))
  178. {
  179. VariableFloat.Set("xless", VariableFloat(VariableString("xDir")));
  180. VariableFloat.Subtract("xless", VariableFloat("radius"));
  181. If(Float.GreaterThan(VariablePlayer("playerMedic").GetPositionX(), VariableFloat("xless")))
  182. {
  183. VariableFloat.Set("zgreater", VariableFloat(VariableString("zDir")));
  184. VariableFloat.Add("zgreater", VariableFloat("radius"));
  185. If(Float.LessThan(VariablePlayer("playerMedic").GetPositionZ(), VariableFloat("zgreater")))
  186. {
  187. VariableFloat.Set("zless", VariableFloat(VariableString("zDir")));
  188. VariableFloat.Subtract("zless", VariableFloat("radius"));
  189. If(Float.GreaterThan(VariablePlayer("playerMedic").GetPositionZ(), VariableFloat("zless")))
  190. {
  191. VariableInt.Add(VariableString("revDir"), 1);
  192. If(Int.Equals(VariableInt(VariableString("revDir")), 1))
  193. {
  194. VariableString.Set("playerName", VariablePlayer("player").GetName())
  195.  
  196. VariableInt.Set("playerPartCounter", 0);
  197. While(String.StartsWith(VariableString("playerName"), "["))
  198. {
  199. VariableString.Concat("playerName", "```", VariableString("playerName"));
  200. VariableString.Replace("playerName", "```[", "");
  201.  
  202. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  203. VariableString.Set(VariableString("playerHexDir"), "")
  204.  
  205. VariableInt.Set("hexCounterMaster", 0);
  206. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  207. {
  208. VariableInt.Set("hexCounter", 0);
  209. While(Int.LessThan(VariableInt("hexCounter"), 22))
  210. {
  211. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  212.  
  213. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  214. {
  215. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  216.  
  217. VariableString.Concat("playerName", "```", VariableString("playerName"));
  218. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  219. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  220. }
  221.  
  222. VariableInt.Add("hexCounter", 1);
  223. }
  224. VariableInt.Add("hexCounterMaster", 1);
  225. }
  226.  
  227. VariableString.Concat("playerName", "```", VariableString("playerName"));
  228. VariableString.Replace("playerName", "```]", "");
  229.  
  230. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  231. VariableString.Set(VariableString("playerABCDir"), "")
  232.  
  233. VariableInt.Set("ABCCounterMaster", 0);
  234. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  235. {
  236. VariableInt.Set("ABCCounter", 0);
  237. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  238. {
  239. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  240.  
  241. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  242. {
  243. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  244.  
  245. VariableString.Concat("playerName", "```", VariableString("playerName"));
  246. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  247. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  248. }
  249.  
  250. VariableInt.Add("ABCCounter", 1);
  251. }
  252. VariableInt.Add("ABCCounterMaster", 1);
  253. }
  254.  
  255. VariableInt.Add("playerPartCounter", 1);
  256. }
  257.  
  258. VariableString.Set("playerPrintName", "");
  259. VariableInt.Set("printNameCounter", 0);
  260. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  261. {
  262. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  263. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  264.  
  265. VariableString.Append("playerPrintName", "<color=#");
  266. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  267. VariableString.Append("playerPrintName", ">");
  268. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  269. VariableString.Append("playerPrintName", "</color>");
  270.  
  271. VariableInt.Add("printNameCounter", 1);
  272. }
  273. 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>");
  274. Game.PrintMessage(VariableString("reviveWho"));
  275. }
  276. If(Int.GreaterThanOrEqual(VariableInt(VariableString("revDir")), VariableInt("revTime")))
  277. {
  278. Player.SpawnPlayerAt(VariablePlayer("player"), VariablePlayer("playerMedic").GetPositionX(), VariablePlayer("playerMedic").GetPositionY(), VariablePlayer("playerMedic").GetPositionZ());
  279. VariableInt.Set(VariableString("revDir"), 0);
  280. VariableInt.Set(VariableString("cooldownDirSub"), VariableInt("cooldown"));
  281. }
  282. }
  283. }
  284. }
  285. }
  286. }
  287. }
  288. }
  289. }
  290. VariableInt.Add("counterPlayerMedic", 1);
  291. }
  292. }
  293. If(Int.Equals(VariableInt(VariableString("deathDir")), VariableInt("deathTime")))
  294. {
  295. VariableString.Set("playerName", VariablePlayer("player").GetName())
  296.  
  297. VariableInt.Set("playerPartCounter", 0);
  298. While(String.StartsWith(VariableString("playerName"), "["))
  299. {
  300. VariableString.Concat("playerName", "```", VariableString("playerName"));
  301. VariableString.Replace("playerName", "```[", "");
  302.  
  303. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  304. VariableString.Set(VariableString("playerHexDir"), "")
  305.  
  306. VariableInt.Set("hexCounterMaster", 0);
  307. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  308. {
  309. VariableInt.Set("hexCounter", 0);
  310. While(Int.LessThan(VariableInt("hexCounter"), 22))
  311. {
  312. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  313.  
  314. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  315. {
  316. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  317.  
  318. VariableString.Concat("playerName", "```", VariableString("playerName"));
  319. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  320. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  321. }
  322.  
  323. VariableInt.Add("hexCounter", 1);
  324. }
  325. VariableInt.Add("hexCounterMaster", 1);
  326. }
  327.  
  328. VariableString.Concat("playerName", "```", VariableString("playerName"));
  329. VariableString.Replace("playerName", "```]", "");
  330.  
  331. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  332. VariableString.Set(VariableString("playerABCDir"), "")
  333.  
  334. VariableInt.Set("ABCCounterMaster", 0);
  335. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  336. {
  337. VariableInt.Set("ABCCounter", 0);
  338. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  339. {
  340. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  341.  
  342. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  343. {
  344. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  345.  
  346. VariableString.Concat("playerName", "```", VariableString("playerName"));
  347. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  348. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  349. }
  350.  
  351. VariableInt.Add("ABCCounter", 1);
  352. }
  353. VariableInt.Add("ABCCounterMaster", 1);
  354. }
  355.  
  356. VariableInt.Add("playerPartCounter", 1);
  357. }
  358.  
  359. VariableString.Set("playerPrintName", "");
  360. VariableInt.Set("printNameCounter", 0);
  361. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  362. {
  363. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  364. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  365.  
  366. VariableString.Append("playerPrintName", "<color=#");
  367. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  368. VariableString.Append("playerPrintName", ">");
  369. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  370. VariableString.Append("playerPrintName", "</color>");
  371.  
  372. VariableInt.Add("printNameCounter", 1);
  373. }
  374. 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>");
  375. Game.PrintMessage(VariableString("whoHasBeenLost"));
  376. }
  377. VariableInt.Add(VariableString("deathDir"), 1);
  378. }
  379. VariableInt.Add("counterPlayer", 1);
  380. VariableInt.Subtract(VariableString("cooldownDirMain"), 1);
  381. }
  382. VariableInt.Add("counterMain", 1);
  383. }
  384. }
  385.  
  386. OnChatInput("chatInput")
  387. {
  388. If(String.StartsWith(VariableString("chatInput"), "/medic"))
  389. {
  390. VariableString.Concat("medicScraper", "/medic", VariableString("char63"));
  391. VariableString.Remove("chatInput", VariableString("medicScraper"));
  392. VariablePlayer.Set("player", VariablePlayer("null"));
  393. ForeachPlayer("player")
  394. {
  395. VariableBool.Set("passNotMedic", false);
  396.  
  397. VariableString.Set("playerName", VariablePlayer("player").GetName())
  398.  
  399. VariableInt.Set("playerPartCounter", 0);
  400. While(String.StartsWith(VariableString("playerName"), "["))
  401. {
  402. VariableString.Concat("playerName", "```", VariableString("playerName"));
  403. VariableString.Replace("playerName", "```[", "");
  404.  
  405. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  406. VariableString.Set(VariableString("playerHexDir"), "")
  407.  
  408. VariableInt.Set("hexCounterMaster", 0);
  409. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  410. {
  411. VariableInt.Set("hexCounter", 0);
  412. While(Int.LessThan(VariableInt("hexCounter"), 22))
  413. {
  414. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  415.  
  416. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  417. {
  418. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  419.  
  420. VariableString.Concat("playerName", "```", VariableString("playerName"));
  421. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  422. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  423. }
  424.  
  425. VariableInt.Add("hexCounter", 1);
  426. }
  427. VariableInt.Add("hexCounterMaster", 1);
  428. }
  429.  
  430. VariableString.Concat("playerName", "```", VariableString("playerName"));
  431. VariableString.Replace("playerName", "```]", "");
  432.  
  433. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  434. VariableString.Set(VariableString("playerABCDir"), "")
  435.  
  436. VariableInt.Set("ABCCounterMaster", 0);
  437. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  438. {
  439. VariableInt.Set("ABCCounter", 0);
  440. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  441. {
  442. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  443.  
  444. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  445. {
  446. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  447.  
  448. VariableString.Concat("playerName", "```", VariableString("playerName"));
  449. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  450. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  451. }
  452.  
  453. VariableInt.Add("ABCCounter", 1);
  454. }
  455. VariableInt.Add("ABCCounterMaster", 1);
  456. }
  457.  
  458. VariableInt.Add("playerPartCounter", 1);
  459. }
  460.  
  461. VariableString.Set("playerPrintName", "");
  462. VariableInt.Set("printNameCounter", 0);
  463. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  464. {
  465. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  466. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  467.  
  468. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  469.  
  470. VariableInt.Add("printNameCounter", 1);
  471. }
  472.  
  473. If(String.Contains(VariableString("playerPrintName"), VariableString("chatInput")))
  474. {
  475. VariableString.Set("playerName", VariablePlayer("player").GetName())
  476.  
  477. VariableInt.Set("playerPartCounter", 0);
  478. While(String.StartsWith(VariableString("playerName"), "["))
  479. {
  480. VariableString.Concat("playerName", "```", VariableString("playerName"));
  481. VariableString.Replace("playerName", "```[", "");
  482.  
  483. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  484. VariableString.Set(VariableString("playerHexDir"), "")
  485.  
  486. VariableInt.Set("hexCounterMaster", 0);
  487. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  488. {
  489. VariableInt.Set("hexCounter", 0);
  490. While(Int.LessThan(VariableInt("hexCounter"), 22))
  491. {
  492. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  493.  
  494. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  495. {
  496. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  497.  
  498. VariableString.Concat("playerName", "```", VariableString("playerName"));
  499. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  500. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  501. }
  502.  
  503. VariableInt.Add("hexCounter", 1);
  504. }
  505. VariableInt.Add("hexCounterMaster", 1);
  506. }
  507.  
  508. VariableString.Concat("playerName", "```", VariableString("playerName"));
  509. VariableString.Replace("playerName", "```]", "");
  510.  
  511. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  512. VariableString.Set(VariableString("playerABCDir"), "")
  513.  
  514. VariableInt.Set("ABCCounterMaster", 0);
  515. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  516. {
  517. VariableInt.Set("ABCCounter", 0);
  518. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  519. {
  520. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  521.  
  522. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  523. {
  524. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  525.  
  526. VariableString.Concat("playerName", "```", VariableString("playerName"));
  527. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  528. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  529. }
  530.  
  531. VariableInt.Add("ABCCounter", 1);
  532. }
  533. VariableInt.Add("ABCCounterMaster", 1);
  534. }
  535.  
  536. VariableInt.Add("playerPartCounter", 1);
  537. }
  538.  
  539. VariableString.Set("playerPrintName", "");
  540. VariableInt.Set("printNameCounter", 0);
  541. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  542. {
  543. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  544. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  545.  
  546. VariableString.Append("playerPrintName", "<color=#");
  547. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  548. VariableString.Append("playerPrintName", ">");
  549. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  550. VariableString.Append("playerPrintName", "</color>");
  551.  
  552. VariableInt.Add("printNameCounter", 1);
  553. }
  554.  
  555. If(String.NotEquals(VariablePlayer("player").GetGuildName(), "[ffffff][ffffff]Medic"))
  556. {
  557. Player.SetGuildName(VariablePlayer("player"), "[ffffff][ffffff]Medic");
  558. VariableString.Concat("AM", VariableString("playerPrintName"), "<size=1>____</size>is<size=1>____</size>now<size=1>____</size>medic");
  559. Game.PrintMessage(VariableString("AM"));
  560. VariableBool.Set("passNotMedic", true);
  561. }
  562. If(Bool.Equals(VariableBool("passNotMedic"), false))
  563. {
  564. If(String.Equals(VariablePlayer("player").GetGuildName(), "[ffffff][ffffff]Medic"))
  565. {
  566. Player.SetGuildName(VariablePlayer("player"), "");
  567. VariableString.Concat("ANM", VariableString("playerPrintName"), "<size=1>____</size>is<size=1>____</size>no<size=1>____</size>longer<size=1>____</size>medic");
  568. Game.PrintMessage(VariableString("ANM"));
  569. }
  570. }
  571. }
  572. }
  573. }
  574. If(String.StartsWith(VariableString("chatInput"), "/revtime"))
  575. {
  576. VariableString.Remove("chatInput", "/revtime");
  577. VariableInt.Set("revTime", VariableString("chatInput").ConvertToInt());
  578. 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>");
  579. Game.PrintMessage(VariableString("revTimeWhat"));
  580. }
  581. If(String.StartsWith(VariableString("chatInput"), "/revradius"))
  582. {
  583. VariableString.Remove("chatInput", "/revradius");
  584. VariableFloat.Set("radius", VariableString("chatInput").ConvertToInt().ConvertToFloat());
  585. 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>");
  586. Game.PrintMessage(VariableString("radiusWhat"));
  587. }
  588. If(String.StartsWith(VariableString("chatInput"), "/deathtime"))
  589. {
  590. VariableString.Remove("chatInput", "/deathtime");
  591. VariableInt.Set("deathTime", VariableString("chatInput").ConvertToInt());
  592. 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>");
  593. Game.PrintMessage(VariableString("deathWhat"));
  594. }
  595. If(String.StartsWith(VariableString("chatInput"), "/cooldown"))
  596. {
  597. VariableString.Remove("chatInput", "/cooldown");
  598. VariableInt.Set("cooldown", VariableString("chatInput").ConvertToInt());
  599. 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>");
  600. Game.PrintMessage(VariableString("cooldownWhat"));
  601. }
  602.  
  603. If(String.StartsWith(VariableString("chatInput"), "/init"))
  604. {
  605. VariableString.Set("char63", VariableString("chatInput"));
  606. VariableString.Replace("char63", "/init", "");
  607. VariableBool.Set("runScript", true);
  608. }
  609.  
  610. If(String.Equals(VariableString("chatInput"), "/players"))
  611. {
  612. VariablePlayer.Set("player", VariablePlayer("null"));
  613. ForeachPlayer("player")
  614. {
  615. VariableString.Set("playerName", VariablePlayer("player").GetName())
  616.  
  617. VariableInt.Set("playerPartCounter", 0);
  618. While(String.StartsWith(VariableString("playerName"), "["))
  619. {
  620. VariableString.Concat("playerName", "```", VariableString("playerName"));
  621. VariableString.Replace("playerName", "```[", "");
  622.  
  623. VariableString.Concat("playerHexDir", "playerHex", VariableInt("playerPartCounter").ConvertToString())
  624. VariableString.Set(VariableString("playerHexDir"), "")
  625.  
  626. VariableInt.Set("hexCounterMaster", 0);
  627. While(Int.LessThan(VariableInt("hexCounterMaster"), 6))
  628. {
  629. VariableInt.Set("hexCounter", 0);
  630. While(Int.LessThan(VariableInt("hexCounter"), 22))
  631. {
  632. VariableString.Concat("charDir", "char", VariableInt("hexCounter").ConvertToString());
  633.  
  634. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  635. {
  636. VariableString.Append(VariableString("playerHexDir"), VariableString(VariableString("charDir")));
  637.  
  638. VariableString.Concat("playerName", "```", VariableString("playerName"));
  639. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  640. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  641. }
  642.  
  643. VariableInt.Add("hexCounter", 1);
  644. }
  645. VariableInt.Add("hexCounterMaster", 1);
  646. }
  647.  
  648. VariableString.Concat("playerName", "```", VariableString("playerName"));
  649. VariableString.Replace("playerName", "```]", "");
  650.  
  651. VariableString.Concat("playerABCDir", "playerABC", VariableInt("playerPartCounter").ConvertToString())
  652. VariableString.Set(VariableString("playerABCDir"), "")
  653.  
  654. VariableInt.Set("ABCCounterMaster", 0);
  655. While(Int.LessThan(VariableInt("ABCCounterMaster"), 30))
  656. {
  657. VariableInt.Set("ABCCounter", 0);
  658. While(Int.LessThan(VariableInt("ABCCounter"), 64))
  659. {
  660. VariableString.Concat("charDir", "char", VariableInt("ABCCounter").ConvertToString());
  661.  
  662. If(String.StartsWith(VariableString("playerName"), VariableString(VariableString("charDir"))))
  663. {
  664. VariableString.Append(VariableString("playerABCDir"), VariableString(VariableString("charDir")));
  665.  
  666. VariableString.Concat("playerName", "```", VariableString("playerName"));
  667. VariableString.Concat("playerCharScraper", "```", VariableString(VariableString("charDir")));
  668. VariableString.Replace("playerName", VariableString("playerCharScraper"), "");
  669. }
  670.  
  671. VariableInt.Add("ABCCounter", 1);
  672. }
  673. VariableInt.Add("ABCCounterMaster", 1);
  674. }
  675.  
  676. VariableInt.Add("playerPartCounter", 1);
  677. }
  678.  
  679. VariableString.Set("playerPrintName", "");
  680. VariableInt.Set("printNameCounter", 0);
  681. While(Int.LessThan(VariableInt("printNameCounter"), VariableInt("playerPartCounter")))
  682. {
  683. VariableString.Concat("playerABCDir", "playerABC", VariableInt("printNameCounter").ConvertToString());
  684. VariableString.Concat("playerHexDir", "playerHex", VariableInt("printNameCounter").ConvertToString());
  685.  
  686. VariableString.Append("playerPrintName", "<color=#");
  687. VariableString.Append("playerPrintName", VariableString(VariableString("playerHexDir")));
  688. VariableString.Append("playerPrintName", ">");
  689. VariableString.Append("playerPrintName", VariableString(VariableString("playerABCDir")));
  690. VariableString.Append("playerPrintName", "</color>");
  691.  
  692. VariableInt.Add("printNameCounter", 1);
  693. }
  694. Game.PrintMessage(VariableString("playerPrintName"));
  695. }
  696. }
  697. }
Add Comment
Please, Sign In to add comment