ragemode.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. event.load("inv_click");
  2. event.load("inv_close");
  3. event.load("item_air_click");
  4. event.load("player_toss");
  5. event.load("item_hit");
  6. event.load("function_key");
  7. rankingtable = "rmranks";
  8. game_short = "rm";
  9. specific_lobby_handling = true;
  10. no_core_reset = true;
  11. agelist = list.new();
  12. gamename = "§cRageMode";
  13. no_emerald = false;
  14. gosub("setstart");
  15. times = map.new();
  16. time = time.getMillis();
  17. for(i = 0; i < list.getSize(spawns); i++) {
  18. map.add(times, list.getIndex(spawns, i), time);
  19. }
  20. arrow_type = "minecraft:arrow";
  21. bow = read.item("{id:\"minecraft:bow\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:infinity\"}],display:{Name:'{\"text\":\"§eRageBow\"}'}}}");
  22. sword = read.item("minecraft:iron_sword", 1, "§cRageKnife");
  23. axe = read.item("minecraft:iron_axe", 1, "§bCombatAxe");
  24. chest = read.item("minecraft:chest", 1, "§7Inventarsortierung");
  25. arrow = read.item(arrow_type);
  26. speed = read.item("{id:\"minecraft:potion\",Count:1b,tag:{Potion:\"minecraft:swiftness\"}}");
  27. item.hide(speed, "potion_effects");
  28. item.setName(speed, "§eGeschwindigkeit");
  29. lore_list = list.new();
  30. list.add(lore_list, "§7Verdopple deine Geschwindigkeit");
  31. list.add(lore_list, "§rPreis: §a15 Emeralds");
  32. item.setLore(speed, lore_list);
  33. lightning = read.item("minecraft:blaze_rod");
  34. item.setName(lightning, "§eGottes Hand");
  35. lore_list = list.new();
  36. list.add(lore_list, "§7Töte deine Gegner mit der Hilfe von Gottes Hand");
  37. list.add(lore_list, "§rPreis: §a30 Emeralds");
  38. item.setLore(lightning, lore_list);
  39. shopmenu = inv.new("220000000");
  40. inv.setItem(shopmenu, 0, speed);
  41. inv.setItem(shopmenu, 1, lightning);
  42. goto("simplelobby");
  43. @specificLobbyHandling
  44. if(event == "player_join") {
  45. resetplayer(player);
  46. player.setSaturation(player, 1000000);
  47. display.add(player, 1, gamename);
  48. display.add(player, 2, "§cTeams are forbidden");
  49. display.add(player, 3, "§eMap");
  50. display.add(player, 4, mapname);
  51. stacks.clear(player);
  52. stacks.set(player, 0, "minecraft:chest");
  53. return;
  54. }
  55. if(event == "player_toss") {
  56. cancel = true;
  57. player.giveItem(player, item);
  58. inv.update(player);
  59. return;
  60. }
  61. if(event == "inv_close") {
  62. counter = 0;
  63. for(i = 0; i <= 8; i++) {
  64. if(item.getType(inv.getItem(inv, i)) == "minecraft:air") {
  65. counter++;
  66. }
  67. }
  68. if(counter == 5) {
  69. msg.prefix(player, gamename, "§eChanges saved.");
  70. } else {
  71. saveDefaultInventory(player);
  72. msg.prefix(player, gamename, "§eInvalid change. Set to default.");
  73. }
  74. return;
  75. }
  76. if(event == "function_key") {
  77. if(key == 1) {
  78. showRmInventory(player);
  79. }
  80. return;
  81. }
  82. return;
  83. @finalstart
  84. player_list = minigame.getPlayers(script_id);
  85. starttime = time.getMillis();
  86. kills = map.new();
  87. theoretickills = list.new();
  88. deaths = map.new();
  89. killstreak = map.new();
  90. maxkillstreak = map.new();
  91. messerkills = map.new();
  92. axekills = map.new();
  93. emeralds = map.new();
  94. lastposition = map.new();
  95. nemesis = map.new();
  96. wither_sound = sound.get("minecraft:entity.wither.spawn");
  97. join_sound = sound.get("minecraft:block.note_block.harp");
  98. ambient_sound_category = sound.getCategory("ambient");
  99. minigame.displayAll(1, "§6RageMode");
  100. minigame.displayAll(2, "§aGoal: §r25");
  101. id = 3;
  102. for(i = 0; i < size; i++) {
  103. for_p = player.get(list.getIndex(player_list, i));
  104. for_pname = player.getName(for_p);
  105. msg.prefix(for_p, gamename, "The game has started.");
  106. minigame.displayAll(id, concat("0 §8", for_pname));
  107. display.add(for_p, id, concat("0 §e", for_pname));
  108. stacks.setActive(player, false);
  109. id++;
  110. @position
  111. position = list.getIndex(spawns, math.random(0, list.getSize(spawns) - 1));
  112. if(time.getMillis() - map.get(times, position) < 5000) {
  113. goto("position");
  114. }
  115. if(map.get(lastposition, for_pname) == position) {
  116. goto("position");
  117. }
  118. map.add(lastposition, for_pname, position);
  119. entity.teleport(for_p, position);
  120. map.add(times, position, time.getMillis());
  121. sound.spawnForPlayer(for_p, join_sound, ambient_sound_category);
  122. player.setGamemode(for_p, "survival");
  123. player.setFly(for_p, false);
  124. player.clearInventory(for_p);
  125. giveRmInventory(for_p);
  126. inv.close(for_p);
  127. map.add(kills, for_pname, 0);
  128. array = array.new(2);
  129. array[0] = for_pname;
  130. array[1] = 0;
  131. list.add(theoretickills, array);
  132. map.add(deaths, for_pname, 0);
  133. map.add(killstreak, for_pname, 0);
  134. map.add(maxkillstreak, for_pname, 0);
  135. map.add(messerkills, for_pname, 0);
  136. map.add(axekills, for_pname, 0);
  137. map.add(emeralds, for_pname, 0);
  138. }
  139. minigame.displayAll(id, "Emeralds: §a0");
  140. sgoto(16800, "lastminute");
  141. sgoto(18000, "endgame");
  142. entity.removeAll("net.minecraft.entity.item.ItemEntity", middleloc, radius);
  143. @wait
  144. wait();
  145. if(event == "living_pre_hurt") {
  146. if(!isPlayer(living_entity)) {
  147. goto("wait");
  148. }
  149. player = living_entity;
  150. } elseif(event == "item_hit") {
  151. if(!isPlayer(shooter)) {
  152. goto("wait");
  153. }
  154. player = shooter;
  155. }
  156. if(player.hasMinigameId(player, script_id)) {
  157. player_name = player.getName(player);
  158. ignoreGoto(event);
  159. }
  160. goto("wait");
  161. @item_hit
  162. attacker = shooter;
  163. if(entity_hit != null) {
  164. entity.remove(projectile);
  165. attacker_name = player.getName(attacker);
  166. attacker_uuid = player.getUuid(attacker);
  167. if(!list.contains(player_list, attacker_uuid)) {
  168. //Illegaler Spieler
  169. goto("wait");
  170. }
  171. defender = entity_hit;
  172. defender_uuid = player.getUuid(defender);
  173. if(!list.contains(player_list, defender_uuid)) {
  174. //Kein PlayerEntity oder illegaler Spieler
  175. goto("wait");
  176. }
  177. defender_name = player.getName(defender);
  178. if(defender_uuid == attacker_uuid) {
  179. goto("wait");
  180. }
  181. goto("axeCore");
  182. }
  183. goto("wait");
  184. @block_place
  185. cancel = true;
  186. @item_air_click
  187. player_item_type = item.getType(living.getEquip(player, "hand"));
  188. if(player_item_type == "minecraft:iron_axe") {
  189. list.add(agelist, living.shootProjectile(player, "me.km.entities.EntityItemProjectile", 1, axe));
  190. sgoto(10, "setage");
  191. player.removeItem(player, living.getEquip(player, "hand"));
  192. goto("wait");
  193. }
  194. if(player_item_type == "minecraft:chest") {
  195. inv.open(shopmenu, player, "§8Shop");
  196. }
  197. goto("wait");
  198. @living_pre_hurt
  199. cancel = true;
  200. defender = player;
  201. defender_name = player.getName(defender);
  202. defender_uuid = player.getUuid(defender);
  203. if(!list.contains(player_list, defender_uuid)) {
  204. msg.prefix(player, gamename, "§eIllegal player in game.");
  205. goto("wait");
  206. }
  207. attacker = player.getFromDamageSource(damage_source);
  208. if(attacker == null) {
  209. goto("wait");
  210. }
  211. attacker_uuid = player.getUuid(attacker);
  212. if(!player.hasMinigameId(attacker, script_id)) {
  213. goto("wait");
  214. }
  215. attacker_name = player.getName(attacker);
  216. if(defender_uuid == attacker_uuid) {
  217. goto("wait");
  218. }
  219. if(!list.contains(player_list, attacker_uuid)) {
  220. msg.prefix(player, gamename, "§eIllegal player in game.");
  221. goto("wait");
  222. }
  223. attacker_item = living.getEquip(attacker, "hand");
  224. attacker_item_type = item.getType(attacker_item);
  225. if(attacker_item_type == "minecraft:iron_axe") {
  226. player.removeItem(attacker, attacker_item);
  227. goto("axeCore");
  228. } elseif(attacker_item_type == "minecraft:iron_sword") {
  229. map.add(messerkills, attacker_name, map.get(messerkills, attacker_name) + 1);
  230. } elseif(attacker_item_type == "minecraft:air") {
  231. goto("wait");
  232. }
  233. msg.prefix(attacker, gamename, concat("§eYou killed §8", defender_name, "."));
  234. msg.prefix(defender, gamename, concat("§8", attacker_name, " §ekilled you."));
  235. gosub("core");
  236. goto("wait");
  237. @inv_click
  238. cancel = true;
  239. if(item.getType(item) != "minecraft:air") {
  240. emeraldid = 3 + list.getSize(player_list);
  241. if(inv_slot == 0) {
  242. if(map.get(emeralds, player_name) >= 15) {
  243. entity.addEffect(player, "speed", 1200, 4);
  244. map.add(emeralds, player_name, map.get(emeralds, player_name) - 15);
  245. display.add(player, emeraldid, "Emeralds: §a", text.number(map.get(emeralds, player_name)));
  246. minigame.speakAll(gamename, concat("§8", player_name, "§e setzt Geschwindigkeit ein"));
  247. inv.close(player);
  248. }
  249. } elseif(inv_slot == 1) {
  250. if(map.get(emeralds, player_name) >= 30) {
  251. minigame.speakAll(gamename, concat("§8", player_name, "§e hat Gottes Hand verwendet"));
  252. inv.close(player);
  253. map.add(emeralds, player_name, map.get(emeralds, player_name) - 30);
  254. no_emerald = true;
  255. attacker = player;
  256. attacker_name = player_name;
  257. display.add(player, emeraldid, "Emeralds: §a", text.number(map.get(emeralds, player_name)));
  258. for(i = 0; i < list.getSize(player_list); i++) {
  259. defender = player.get(list.getIndex(player_list, i));
  260. defender_name = player.getName(defender);
  261. if(defender != attacker) {
  262. gosub("core");
  263. msg.prefix(attacker, gamename, concat("§eYou killed §8", defender_name, "."));
  264. msg.prefix(defender, gamename, concat("§8", attacker_name, " §ekilled you."));
  265. }
  266. }
  267. no_emerald = false;
  268. }
  269. }
  270. }
  271. goto("wait");
  272. @block_break
  273. cancel = true;
  274. goto("wait");
  275. @player_toss
  276. cancel = true;
  277. player.giveItem(player, item);
  278. inv.update(player);
  279. goto("wait");
  280. @setage
  281. temp = list.getIndex(agelist, 0);
  282. item.entity.setLifespan(temp, 390);
  283. list.removeIndex(agelist, 0);
  284. goto("wait");
  285. @axeCore
  286. action = "axeHit";
  287. sound.spawnForPlayer(defender, wither_sound, ambient_sound_category);
  288. msg.prefix(attacker, gamename, concat("§eYou killed §8", defender_name, " §ewith you axe."));
  289. msg.prefix(defender, gamename, concat("§8", attacker_name, " §ekilled you with his axe."));
  290. msg.prefix(defender, gamename, "Your Kills: §c-25§r%");
  291. map.add(axekills, attacker_name, map.get(axekills, attacker_name) + 1);
  292. setTheoreticKills(defender_name, math.rounddown(getTheoreticKills(defender_name) * 0.75));
  293. gosub("core");
  294. goto("wait");
  295. @core
  296. emeraldid = 3 + list.getSize(player_list);
  297. if(!no_emerald) {
  298. msg.prefix(attacker, gamename, "§e+§r1 §aEmerald");
  299. map.add(emeralds, attacker_name, map.get(emeralds, attacker_name) + 1);
  300. display.add(attacker, emeraldid, "Emeralds: §a", text.number(map.get(emeralds, attacker_name)));
  301. }
  302. if(defender_name == map.get(nemesis, attacker_name)) {
  303. msg.prefix(attacker, gamename, "§eYou killed your §cNemesis enemy.");
  304. msg.prefix(attacker, gamename, "§e+§r1 §aEmerald");
  305. map.add(emeralds, attacker_name, map.get(emeralds, attacker_name) + 1);
  306. display.add(attacker, emeraldid, "Emeralds: §a", text.number(map.get(emeralds, attacker_name)));
  307. }
  308. map.add(deaths, defender_name, map.get(deaths, defender_name) + 1);
  309. map.add(kills, attacker_name, map.get(kills, attacker_name) + 1);
  310. incTheoreticKills(attacker_name);
  311. player.clearInventory(defender);
  312. player.setSaturation(defender, 1000000);
  313. player.setSaturation(attacker, 1000000);
  314. map.add(nemesis, defender_name, attacker_name);
  315. map.add(nemesis, attacker_name, null);
  316. map.add(killstreak, defender_name, 0);
  317. map.add(killstreak, attacker_name, map.get(killstreak, attacker_name) + 1);
  318. if(map.get(killstreak, attacker_name) > map.get(maxkillstreak, attacker_name)) {
  319. map.add(maxkillstreak, attacker_name, map.get(maxkillstreak, attacker_name) + 1);
  320. }
  321. giveRmInventory(defender);
  322. sortTheoreticKills();
  323. printTheoreticKills();
  324. @newposition
  325. position = list.getIndex(spawns, math.random(0, list.getSize(spawns) - 1));
  326. if(time.getMillis() - map.get(times, position) < 5000) {
  327. goto("newposition");
  328. }
  329. if(map.get(lastposition, defender_name) == position) {
  330. goto("newposition");
  331. }
  332. map.add(lastposition, defender_name, position);
  333. entity.teleport(defender, position);
  334. if(action == "axeHit") {
  335. sound.spawnForPlayer(defender, wither_sound, ambient_sound_category);
  336. }
  337. action = null;
  338. map.add(times, position, time.getMillis());
  339. if(getTheoreticKills(attacker_name) >= 25) {
  340. winner_name = attacker_name;
  341. goto("wincore");
  342. }
  343. return;
  344. @endgame
  345. sortTheoreticKills();
  346. array = list.getIndex(theoretickills, 0);
  347. winner_name = array[0];
  348. goto("wincore");
  349. @player_logout
  350. @player_giveup
  351. removeFromTheoreticKills(player_name);
  352. script = script.getFromId(script_id);
  353. minigame.kickPlayer(script, player);
  354. player_id = player.getId(player);
  355. minigame.setPlayed(player_id, game_short, minigame.getPlayed(player_id, game_short) + 1);
  356. minigame.displayResetAll();
  357. sortTheoreticKills();
  358. printTheoreticKills();
  359. if(list.getSize(player_list) <= 1) {
  360. winner_name = player.getName(player.get(list.getIndex(player_list, 0)));
  361. goto("wincore");
  362. }
  363. goto("wait");
  364. @lastminute
  365. minigame.speakAll(gamename, "60 seconds left.");
  366. goto("wait");
  367. @wincore
  368. endtime = time.getMillis();
  369. time = math.round((endtime - starttime) / 1000);
  370. for(i = 0; i < list.getSize(player_list); i++) {
  371. puuid = list.getIndex(player_list, i);
  372. p = player.get(puuid);
  373. pname = player.getName(p);
  374. p_id = player.getId(p);
  375. last_record = ranking.getPoints(rankingtable, p_id);
  376. record = last_record + map.get(kills, pname);
  377. playedgames = minigame.getPlayed(p_id, game_short) + 1;
  378. minigame.setPlayed(p_id, game_short, playedgames);
  379. ranking.setPoints(rankingtable, p_id, record);
  380. wongames = minigame.getWon(p, "rm");
  381. if(pname == winner_name) {
  382. winningtext = "Yes";
  383. wongames++;
  384. minigame.setWon(p, "rm", wongames);
  385. money.addBoost(p, 128);
  386. } else {
  387. winningtext = "No";
  388. money.addBoost(p, 32);
  389. }
  390. msg.prefix(p, gamename, concat("§8", winner_name, " §ehas won §cRageMode."));
  391. minigame.statsHeader(p, gamename, "§e");
  392. minigame.statsLine(p, "§e", "Time", concat(text.number(math.round(time / 60)), " Minuten ", text.number(time % 60), " Sekunden"));
  393. minigame.statsLine(p, "§e", "Kills", text.number(map.get(kills, pname)));
  394. minigame.statsLine(p, "§e", "Killstreak", text.number(map.get(maxkillstreak, pname)));
  395. minigame.statsLine(p, "§e", "Sword-Kills", text.number(map.get(messerkills, pname)));
  396. minigame.statsLine(p, "§e", "Axe-Kills", text.number(map.get(axekills, pname)));
  397. minigame.statsLine(p, "§e", "Deaths", text.number(map.get(deaths, pname)));
  398. minigame.statsLine(p, "§e", "Won games", text.number(wongames));
  399. minigame.statsLine(p, "§e", "Played games", text.number(playedgames));
  400. if(playedgames != 0) {
  401. minigame.statsLine(p, "§e", "Win ratio", concat(text.number(math.roundComma((wongames / playedgames) * 100, 2)), "%"));
  402. }
  403. minigame.statsLine(p, "§e", "Won", winningtext);
  404. }
  405. entity.removeAll("net.minecraft.entity.item.ItemEntity", middleloc, radius);
  406. script = script.getFromId(script_id);
  407. minigame.kickAllPlayers(script);
  408. minigame.term(script, gamesignloc);
  409. term();
  410. function setTheoreticKills(player_name, points) {
  411. for(i = 0; i < list.getSize($theoretickills); i++) {
  412. array = list.getIndex($theoretickills, i);
  413. if(array[0] == player_name) {
  414. array[1] = points;
  415. break;
  416. }
  417. }
  418. }
  419. function getTheoreticKills(player_name) {
  420. for(i = 0; i < list.getSize($theoretickills); i++) {
  421. array = list.getIndex($theoretickills, i);
  422. if(array[0] == player_name) {
  423. points = array[1];
  424. break;
  425. }
  426. }
  427. return points;
  428. }
  429. function incTheoreticKills(player_name) {
  430. setTheoreticKills(player_name, getTheoreticKills(player_name) + 1);
  431. }
  432. function removeFromTheoreticKills(player_name) {
  433. for(i = 0; i < list.getSize($theoretickills); i++) {
  434. array = list.getIndex($theoretickills, i);
  435. if(array[0] == player_name) {
  436. list.removeIndex($theoretickills, i);
  437. break;
  438. }
  439. }
  440. }
  441. function getIndexFromPlayer(player_name) {
  442. for(i = 0; i < list.getSize($theoretickills); i++) {
  443. array = list.getIndex($theoretickills, i);
  444. if(array[0] == player_name) {
  445. return i;
  446. }
  447. }
  448. return null; //Nemesisgegner ist geleavt
  449. }
  450. function sortTheoreticKills() {
  451. size = list.getSize($theoretickills);
  452. swapped = true;
  453. while(swapped) {
  454. swapped = false;
  455. for(i = 0; i < size - 1; i++) {
  456. array = list.getIndex($theoretickills, i);
  457. array2 = list.getIndex($theoretickills, i + 1);
  458. zahl1 = array[1];
  459. zahl2 = array2[1];
  460. if(zahl1 < zahl2) {
  461. list.setIndex($theoretickills, i, array2);
  462. list.setIndex($theoretickills, i + 1, array);
  463. swapped = true;
  464. }
  465. }
  466. }
  467. }
  468. function printTheoreticKills() {
  469. id = 3;
  470. for(i = 0; i < list.getSize($theoretickills); i++) {
  471. array = list.getIndex($theoretickills, i);
  472. disp_pname = array[0];
  473. disp_p = read.player(disp_pname);
  474. points = text.number(array[1]);
  475. minigame.displayAll(id, concat(points, " §8", disp_pname));
  476. display.add(disp_p, id, concat(points, " §e", disp_pname));
  477. id++;
  478. }
  479. for(i = 0; i < list.getSize($player_list); i++) {
  480. disp_p = player.get(list.getIndex($player_list, i));
  481. disp_pname = player.getName(disp_p);
  482. nemesis_name = map.get($nemesis, disp_pname);
  483. if(nemesis_name != null) {
  484. index = getIndexFromPlayer(nemesis_name);
  485. if(index != null) {
  486. display.add(disp_p, 3 + index, concat(text.number(getTheoreticKills(nemesis_name)), " §c", nemesis_name));
  487. }
  488. }
  489. }
  490. }
  491. function giveRmInventory(player) {
  492. inv = getRmInventory(player);
  493. @tryagain
  494. counter = 0;
  495. player_inv = player.getInv(player);
  496. for(i = 0; i <= 8; i++) {
  497. item = inv.getItem(inv, i);
  498. if(item.getType(item) == "minecraft:air") {
  499. counter++;
  500. }
  501. inv.setItem(player_inv, i, item);
  502. }
  503. if(counter != 5) {
  504. inv = saveDefaultInventory(player);
  505. msg.prefix(player, $gamename, "§eUngültiges Inventar erkannt. Default-Inventar wird verwendet.");
  506. goto("tryagain");
  507. }
  508. inv.setItem(player_inv, 9, $arrow);
  509. }
  510. function showRmInventory(player) {
  511. rm_inv = getRmInventory(player);
  512. inv.open(rm_inv, player, "§8Inventar");
  513. }
  514. function getRmInventory(player) {
  515. map = getScriptVar("rmInventories");
  516. inv = map.get(map, player.getUuid(player));
  517. if(inv == null) {
  518. inv = saveDefaultInventory(player);
  519. }
  520. return inv;
  521. }
  522. function saveDefaultInventory(player) {
  523. rm_inv = inv.new("111111111");
  524. bow = bow = read.item("{id:\"minecraft:bow\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:infinity\"}],display:{Name:'{\"text\":\"§eRageBow\"}'}}}");
  525. sword = read.item("minecraft:iron_sword", 1, "§cRageKnife");
  526. axe = read.item("minecraft:iron_axe", 1, "§bCombatAxe");
  527. chest = read.item("minecraft:chest", 1, "§aShop");
  528. inv.setItem(rm_inv, 0, bow);
  529. inv.setItem(rm_inv, 1, sword);
  530. inv.setItem(rm_inv, 2, axe);
  531. inv.setItem(rm_inv, 8, chest);
  532. saveRmInventory(player, rm_inv);
  533. return rm_inv;
  534. }
  535. function saveRmInventory(player, inv) {
  536. map = getScriptVar("rmInventories");
  537. map.add(map, player.getUuid(player), inv);
  538. setScriptVar("rmInventories", map);
  539. }