shoppingchaos.txt 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  1. rankingtable = "shoppingranks";
  2. game_short = "sc";
  3. game_tab = "§eSC";
  4. minigame.setSpecificLobbyHandling(true);
  5. minigame.setPlayerResetInCore(false);
  6. air = "minecraft:air";
  7. air_item = item.getAir();
  8. air_mat = material.getAir();
  9. paper_mat = material.get("PAPER");
  10. emerald = item.create("minecraft:emerald", 1, null, null);
  11. emerald10 = item.create("minecraft:emerald", 10, null, null);
  12. gamename = "§eShoppingChaos";
  13. start_sound = sound.get("minecraft:block.note_block.harp");
  14. wall_signs_tag = block.getTag("minecraft:wall_signs");
  15. black_glass_pane = item.create("BLACK_STAINED_GLASS_PANE", 1, "", null);
  16. black_glass_pane_mat = material.get("BLACK_STAINED_GLASS_PANE");
  17. item_frame_class = "org.bukkit.entity.ItemFrame";
  18. armor_stand_class = "org.bukkit.entity.ArmorStand";
  19. players = map.new(); //Alle player_uuids mit Verweis auf die Team-Nr
  20. playersinteam = map.new(); //Anzahl der Spieler im Team
  21. teamidtolist = map.new(); //Team-Nr mit Verweis auf die Spielerlisten
  22. allteams = list.new(); //Alle Teams, die noch im Spiel sind
  23. items_list = list.new(); //Array-List: Alle Items mit Rezepten
  24. points = map.new(); //Punktestand der Teams
  25. sales_map = map.new(); //Key Entity. Value Item
  26. recipe_menus = map.new(); //Rezept-Menüs für jeden Spieler
  27. removed_perms = list.new(); //Spieler-Uuids, denen Bypass-Perms entfernt wurden
  28. waiters = list.new(); //Spieler in der Lobby ohne Teamzugehörigkeit
  29. colorcodes = map.new();
  30. map.add(colorcodes, 0, "§9");
  31. map.add(colorcodes, 1, "§c");
  32. map.add(colorcodes, 2, "§e");
  33. map.add(colorcodes, 3, "§2");
  34. teamcolortext = map.new();
  35. map.add(teamcolortext, 0, "§9blue");
  36. map.add(teamcolortext, 1, "§cred");
  37. map.add(teamcolortext, 2, "§eyellow");
  38. map.add(teamcolortext, 3, "§2green");
  39. iron_block = "minecraft:iron_block";
  40. iron_ingot = "minecraft:iron_ingot";
  41. gold_ingot = "minecraft:gold_ingot";
  42. diamond = "minecraft:diamond";
  43. ink_sac = "minecraft:ink_sac";
  44. book = "minecraft:book";
  45. stick = "minecraft:stick";
  46. oak_planks = "minecraft:oak_planks";
  47. quartz_block = "minecraft:quartz_block";
  48. glass = "minecraft:glass";
  49. apple = "minecraft:apple";
  50. cobble = "minecraft:cobblestone";
  51. redstone = "minecraft:redstone";
  52. glowstone = "minecraft:glowstone";
  53. gold_nugget = "minecraft:gold_nugget";
  54. obsidian = "minecraft:obsidian";
  55. ender_eye = "minecraft:ender_eye";
  56. melon_slice = "minecraft:melon_slice";
  57. carrot = "minecraft:carrot";
  58. chest = "minecraft:chest";
  59. coal = "minecraft:coal";
  60. string = "minecraft:string";
  61. furnace = "minecraft:furnace";
  62. compass = "minecraft:compass";
  63. blaze_powder = "minecraft:blaze_powder";
  64. slime_ball = "minecraft:slime_ball";
  65. blaze_rod = "minecraft:blaze_rod";
  66. sugar_cane = "minecraft:sugar_cane";
  67. sugar = "minecraft:sugar";
  68. milk = "minecraft:milk_bucket";
  69. egg = "minecraft:egg";
  70. white_wool= "minecraft:white_wool";
  71. wheat = "minecraft:wheat";
  72. gunpowder = "minecraft:gunpowder";
  73. sand = "minecraft:sand";
  74. ender_pearl = "minecraft:ender_pearl";
  75. leather = "minecraft:leather";
  76. stone = "minecraft:stone";
  77. smooth_stone = "minecraft:smooth_stone";
  78. bow = "minecraft:bow";
  79. flint = "minecraft:flint";
  80. feather = "minecraft:feather";
  81. pumpkin = "minecraft:pumpkin";
  82. sugar = "minecraft:sugar";
  83. egg = "minecraft:egg";
  84. beef = "minecraft:beef";
  85. porkchop = "minecraft:porkchop";
  86. paper = "minecraft:paper";
  87. brown_mushroom = "minecraft:brown_mushroom";
  88. red_mushroom = "minecraft:red_mushroom";
  89. bowl = "minecraft:bowl";
  90. redstone_torch = "minecraft:redstone_torch";
  91. quartz = "minecraft:quartz";
  92. oak_slab = "minecraft:oak_slab";
  93. cod = "minecraft:cod";
  94. piston = "minecraft:piston";
  95. tnt = "minecraft:tnt";
  96. minecart = "minecraft:minecart";
  97. stone_bricks = "minecraft:stone_bricks";
  98. stone_pressure_plate = "minecraft:stone_pressure_plate";
  99. addItem("minecraft:rail", iron_ingot, air, iron_ingot, iron_ingot, stick, iron_ingot, iron_ingot, air, iron_ingot);
  100. addItem("minecraft:oak_fence", air, air, air, oak_planks, stick, oak_planks, oak_planks, stick, oak_planks);
  101. addItem("minecraft:glass_bottle", glass, air, glass, air, glass, air, air, air, air);
  102. addItem("minecraft:dropper", cobble, cobble, cobble, cobble, air, cobble, cobble, redstone, cobble);
  103. addItem("minecraft:iron_sword", air, iron_ingot, air, air, iron_ingot, air, air, stick, air);
  104. addItem("minecraft:ladder", stick, air, stick, stick, stick, stick, stick, air, stick);
  105. addItem("minecraft:minecart", air, air, air, iron_ingot, air, iron_ingot, iron_ingot, iron_ingot, iron_ingot);
  106. addItem("minecraft:hopper", iron_ingot, air, iron_ingot, iron_ingot, chest, iron_ingot, air, iron_ingot, air);
  107. addItem("minecraft:redstone_torch", air, air, air, air, redstone, air, air, stick, air);
  108. addItem("minecraft:torch", air, air, air, air, coal, air, air, stick, air);
  109. addItem("minecraft:bow", air, stick, string, stick, air, string, air, stick, string);
  110. addItem("minecraft:cobblestone_wall", air, air, air, cobble, cobble, cobble, cobble, cobble, cobble);
  111. addItem("minecraft:stone", air, air, air, furnace, cobble, air, air, air, air);
  112. addItem("minecraft:oak_door", oak_planks, oak_planks, air, oak_planks, oak_planks, air, oak_planks, oak_planks, air);
  113. addItem("minecraft:oak_fence_gate", air, air, air, stick, oak_planks, stick, stick, oak_planks, stick);
  114. addItem("minecraft:stone_pressure_plate", air, air, air, stone, stone, air, air, air, air);
  115. addItem("minecraft:oak_pressure_plate", air, air, air, oak_planks, oak_planks, air, air, air, air);
  116. addItem("minecraft:oak_trapdoor", air, air, air, oak_planks, oak_planks, oak_planks, oak_planks, oak_planks, oak_planks);
  117. addItem("minecraft:bucket", iron_ingot, air, iron_ingot, air, iron_ingot, air, air, air, air);
  118. addItem("minecraft:iron_bars", iron_ingot, iron_ingot, iron_ingot, iron_ingot, iron_ingot, iron_ingot, air, air, air);
  119. addItem("minecraft:oak_sign", oak_planks, oak_planks, oak_planks, oak_planks, oak_planks, oak_planks, air, stick, air);
  120. addItem("minecraft:shears", air, iron_ingot, air, iron_ingot, air, air, air, air, air);
  121. addItem("minecraft:fishing_rod", air, air, stick, air, stick, string, stick, air, string);
  122. addItem("minecraft:compass", air, iron_ingot, air, iron_ingot, redstone, iron_ingot, air, iron_ingot, air);
  123. addItem("minecraft:oak_boat", oak_planks, air, oak_planks, oak_planks, oak_planks, oak_planks, air, air, air);
  124. addItem("minecraft:bowl", oak_planks, air, oak_planks, air, oak_planks, air, air, air, air);
  125. addItem("minecraft:white_wool", string, string, air, string, string, air, air, air, air);
  126. addItem("minecraft:wooden_sword", air, oak_planks, air, air, oak_planks, air, air, stick, air);
  127. addItem("minecraft:tripwire_hook", air, iron_ingot, air, air, stick, air, air, oak_planks, air);
  128. addItem("minecraft:chest_minecart", air, chest, air, air, minecart, air, air, air, air);
  129. addItem("minecraft:iron_door", iron_ingot, iron_ingot, air, iron_ingot, iron_ingot, air, iron_ingot, iron_ingot, air);
  130. addItem("minecraft:smooth_stone_slab", smooth_stone, smooth_stone, smooth_stone, air, air, air, air, air, air);
  131. addItem("minecraft:activator_rail", iron_ingot, stick, iron_ingot, iron_ingot, redstone_torch, iron_ingot, iron_ingot, stick, iron_ingot);
  132. addItem("minecraft:detector_rail", iron_ingot, air, iron_ingot, iron_ingot, stone_pressure_plate, iron_ingot, iron_ingot, redstone, iron_ingot);
  133. addItem("minecraft:dispenser", cobble, cobble, cobble, cobble, bow, cobble, cobble, redstone, cobble);
  134. addItem("minecraft:piston", oak_planks, oak_planks, oak_planks, cobble, iron_ingot, cobble, cobble, redstone, cobble);
  135. addItem("minecraft:repeater", redstone_torch, redstone, redstone_torch, stone, stone, stone, air, air, air);
  136. addItem("minecraft:comparator", air, redstone_torch, air, redstone_torch, quartz, redstone_torch, stone, stone, stone);
  137. addItem("minecraft:heavy_weighted_pressure_plate", air, air, air, iron_ingot, iron_ingot, air, air, air, air);
  138. addItem("minecraft:arrow", air, flint, air, air, stick, air, air, feather, air);
  139. addItem("minecraft:bookshelf", oak_planks, oak_planks, oak_planks, paper, paper, paper, oak_planks, oak_planks, oak_planks);
  140. addItem("minecraft:mushroom_stew", brown_mushroom, red_mushroom, bowl, air, air, air, air, air, air);
  141. addItem("minecraft:pumpkin_pie", pumpkin, sugar, egg, air, air, air, air, air, air);
  142. addItem("minecraft:cooked_beef", air, air, air, furnace, beef, air, air, air, air);
  143. addItem("minecraft:cooked_porkchop", air, air, air, furnace, porkchop, air, air, air, air);
  144. //Page2
  145. addItem("minecraft:book", paper, paper, paper, leather, air, air, air, air, air);
  146. addItem("minecraft:map", paper, paper, paper, paper, compass, paper, paper, paper, paper);
  147. addItem("minecraft:ender_eye", ender_pearl, blaze_powder, air, air, air, air, air, air, air);
  148. addItem("minecraft:lead", air, string, string, air, slime_ball, string, string, air, air);
  149. addItem("minecraft:stone_brick_slab", stone_bricks, stone_bricks, stone_bricks, air, air, air, air, air, air);
  150. addItem("minecraft:brewing_stand", air, air, air, air, blaze_rod, air, cobble, cobble, cobble);
  151. addItem("minecraft:leather_helmet", leather, leather, leather, leather, air, leather, air, air, air);
  152. addItem("minecraft:leather_chestplate", leather, air, leather, leather, leather, leather, leather, leather, leather);
  153. addItem("minecraft:leather_leggings", leather, leather, leather, leather, air, leather, leather, air, leather);
  154. addItem("minecraft:leather_boots", air, air, air, leather, air, leather, leather, air, leather);
  155. addItem("minecraft:cauldron", iron_ingot, air, iron_ingot, iron_ingot, air, iron_ingot, iron_ingot, iron_ingot, iron_ingot);
  156. addItem("minecraft:clock", air, gold_ingot, air, gold_ingot, redstone, gold_ingot, air, gold_ingot, air);
  157. addItem("minecraft:paper", sugar_cane, sugar_cane, sugar_cane, air, air, air, air, air, air);
  158. addItem("minecraft:tnt", gunpowder, sand, gunpowder, sand, gunpowder, sand, gunpowder, sand, gunpowder);
  159. addItem("minecraft:magma_cream", air, air, air, slime_ball, blaze_powder, air, air, air, air);
  160. addItem("minecraft:bread", air, air, air, wheat, wheat, wheat, air, air, air);
  161. addItem("minecraft:white_bed", air, air, air, white_wool, white_wool, white_wool, oak_planks, oak_planks, oak_planks);
  162. addItem("minecraft:cake", milk, milk, milk, sugar, egg, sugar, wheat, wheat, wheat);
  163. addItem("minecraft:cooked_cod", air, air, air, furnace, cod, air, air, air, air);
  164. addItem("minecraft:tnt_minecart", air, air, air, air, tnt, air, air, minecart, air);
  165. addItem("minecraft:melon", melon_slice, melon_slice, melon_slice, melon_slice, melon_slice, melon_slice, melon_slice, melon_slice, melon_slice);
  166. addItem("minecraft:hay_block", wheat, wheat, wheat, wheat, wheat, wheat, wheat, wheat, wheat);
  167. addItem("minecraft:ender_chest", obsidian, obsidian, obsidian, obsidian, ender_eye, obsidian, obsidian, obsidian, obsidian);
  168. addItem("minecraft:sticky_piston", air, air, air, air, slime_ball, air, air, piston, air);
  169. addItem("minecraft:daylight_detector", glass, glass, glass, quartz, quartz, quartz, oak_slab, oak_slab, oak_slab);
  170. addItem("minecraft:golden_apple", gold_ingot, gold_ingot, gold_ingot, gold_ingot, apple, gold_ingot, gold_ingot, gold_ingot, gold_ingot);
  171. addItem("minecraft:jukebox", oak_planks, oak_planks, oak_planks, oak_planks, diamond, oak_planks, oak_planks, oak_planks, oak_planks);
  172. addItem("minecraft:anvil", iron_block, iron_block, iron_block, air, iron_ingot, air, iron_ingot, iron_ingot, iron_ingot);
  173. addItem("minecraft:quartz_stairs", quartz_block, air, air, quartz_block, quartz_block, air, quartz_block, quartz_block, quartz_block);
  174. addItem("minecraft:enchanting_table", air, book, air, diamond, obsidian, diamond, obsidian, obsidian, obsidian);
  175. addItem("minecraft:golden_carrot", gold_nugget, gold_nugget, gold_nugget, gold_nugget, carrot, gold_nugget, gold_nugget, gold_nugget, gold_nugget);
  176. addItem("minecraft:glistering_melon_slice", gold_nugget, gold_nugget, gold_nugget, gold_nugget, melon_slice, gold_nugget, gold_nugget, gold_nugget, gold_nugget);
  177. addItem("minecraft:redstone_lamp", air, redstone, air, redstone, glowstone, redstone, air, redstone, air);
  178. addItem("minecraft:writable_book", book, feather, ink_sac, air, air, air, air, air, air);
  179. addItem("minecraft:powered_rail", gold_ingot, air, gold_ingot, gold_ingot, stick, gold_ingot, gold_ingot, redstone, gold_ingot);
  180. addItem("minecraft:stick", air, iron_ingot, air, air, iron_ingot, air, air, air, air);
  181. addItem("minecraft:wooden_pickaxe", oak_planks, oak_planks, oak_planks, air, stick, air, air, stick, air);
  182. addItem("minecraft:iron_pickaxe", iron_ingot, iron_ingot, iron_ingot, air, stick, air, air, stick, air);
  183. addItem("minecraft:golden_pickaxe", gold_ingot, gold_ingot, gold_ingot, air, stick, air, air, stick, air);
  184. addItem("minecraft:wooden_hoe", oak_planks, oak_planks, air, air, stick, air, air, stick, air);
  185. addItem("minecraft:diamond_hoe", diamond, diamond, air, air, stick, air, air, stick, air);
  186. addItem("minecraft:golden_hoe", gold_ingot, gold_ingot, air, air, stick, air, air, stick, air);
  187. addItem("minecraft:diamond_chestplate", diamond, air, diamond, diamond, diamond, diamond, diamond, diamond, diamond);
  188. addItem("minecraft:iron_chestplate", iron_ingot, air, iron_ingot, iron_ingot, iron_ingot, iron_ingot, iron_ingot, iron_ingot, iron_ingot);
  189. addItem("minecraft:golden_boots", air, air, air, gold_ingot, air, gold_ingot, gold_ingot, air, gold_ingot);
  190. //Page3
  191. addItem("minecraft:diamond_boots", air, air, air, diamond, air, diamond, diamond, air, diamond);
  192. addItem("minecraft:iron_helmet", iron_ingot, iron_ingot, iron_ingot, iron_ingot, air, iron_ingot, air, air, air);
  193. addItem("minecraft:iron_leggings", iron_ingot, iron_ingot, iron_ingot, iron_ingot, air, iron_ingot, iron_ingot, air, iron_ingot);
  194. addItem("minecraft:iron_boots", air, air, air, iron_ingot, air, iron_ingot, iron_ingot, air, iron_ingot);
  195. addItem("minecraft:golden_leggings", gold_ingot, gold_ingot, gold_ingot, gold_ingot, air, gold_ingot, gold_ingot, air, gold_ingot);
  196. addItem("minecraft:golden_helmet", gold_ingot, air, gold_ingot, gold_ingot, gold_ingot, gold_ingot, air, air, air);
  197. addItem("minecraft:golden_chestplate", gold_ingot, air, gold_ingot, gold_ingot, gold_ingot, gold_ingot, gold_ingot, gold_ingot, gold_ingot);
  198. minigame.initStart();
  199. for(team = 0; team < numberofteams; team++) {
  200. map.add(playersinteam, team, 0);
  201. map.add(teamidtolist, team, list.new());
  202. }
  203. goto("simplelobby");
  204. @specificLobbyHandling
  205. if(event == "minigame_join") {
  206. list.add(waiters, player.getUuid(player));
  207. living.cleareffects(player);
  208. living.setHealth(player, 20);
  209. player.setHunger(player, 20);
  210. player.setSaturation(player, 5);
  211. player.clearInventory(player);
  212. sb.add(player, 99, gamename);
  213. sb.add(player, 98, string.concat("§7Map: §3", mapname));
  214. sb.add(player, 97, sb.getSpacer());
  215. return;
  216. }
  217. if(event == "player_giveup" || event == "player_quit") {
  218. list.remove(waiters, player.getUuid(player));
  219. return;
  220. }
  221. if(event == "block_click") {
  222. if(block == null) {
  223. return;
  224. }
  225. if(slot.isOffHand(hand)) {
  226. return;
  227. }
  228. player_uuid = player.getUuid(player);
  229. block_loc = block.getLocation(block);
  230. if(map.contains(join_blocks, block_loc)) {
  231. newteam = map.get(join_blocks, block_loc);
  232. newteamlist = map.get(teamidtolist, newteam);
  233. if(list.contains(newteamlist, player_uuid)) {
  234. msg.prefix(player, gamename, "You already choosed a team.");
  235. return;
  236. }
  237. if(list.getSize(newteamlist) >= teamsize) {
  238. msg.prefix(player, gamename, "Not enough space in this team.");
  239. return;
  240. }
  241. list.remove(waiters, player_uuid);
  242. yetteam = map.get(players, player_uuid);
  243. if(yetteam != null) {
  244. yetteamlist = map.get(teamidtolist, yetteam);
  245. list.remove(yetteamlist, player_uuid);
  246. map.add(playersinteam, yetteam, map.get(playersinteam, yetteam) - 1);
  247. }
  248. map.add(playersinteam, newteam, map.get(playersinteam, newteam) + 1);
  249. list.add(newteamlist, player_uuid);
  250. map.add(players, player_uuid, newteam);
  251. msg.prefix(player, gamename, string.concat("You joined the ", map.get(teamcolortext, newteam), " §rteam."));
  252. //entity.setName(player, string.concat(map.get(colorcodes, newteam), player.getName(player)));
  253. }
  254. }
  255. return;
  256. @finalstart
  257. player_list = minigame.getPlayers(script_id);
  258. minigame.clearItems(middleloc, radius);
  259. while(list.getSize(waiters) != 0) {
  260. team = getTeamWithLowestPeople(teamidtolist, numberofteams);
  261. teamlist = map.get(teamidtolist, team);
  262. p_uuid = list.getIndex(waiters, 0);
  263. map.add(playersinteam, team, map.get(playersinteam, team) + 1);
  264. list.add(teamlist, p_uuid);
  265. list.remove(waiters, p_uuid);
  266. map.add(players, p_uuid, team);
  267. color = map.get(colorcodes, team);
  268. p = player.get(p_uuid);
  269. //entity.setName(p, string.concat(color, player.getName(p_uuid)));
  270. minigame.setTabName(p, game_tab, color);
  271. }
  272. event.load("player_post_respawn");
  273. event.load("entity_click");
  274. event.load("snuvi_click");
  275. event.load("player_teleport");
  276. for(i = 0; i < list.getSize(player_list); i++) {
  277. p_uuid = list.getIndex(player_list, i);
  278. team = map.get(players, p_uuid);
  279. p = player.get(p_uuid);
  280. msg.prefix(p, gamename, "The game has started.");
  281. entity.teleport(p, map.get(spawn_locs, team));
  282. //Recipe-Menus für jeden Spieler erstellen
  283. menu = inv.new("222222222222222222222222222222222222222222222000000022", text.new("Recipes"));
  284. map.add(recipe_menus, p_uuid, menu);
  285. //Gamemode und Fly deaktivieren
  286. player.setGamemode(p, "SURVIVAL");
  287. player.setFly(p, false);
  288. player.clearInventory(p);
  289. //Bypass-Perms entfernen
  290. if(perm.has("plot.bypass", p)) {
  291. perm.remove("plot.bypass", p);
  292. list.add(removed_perms, p_uuid);
  293. }
  294. }
  295. humans_list = getAllEntites();
  296. resetSigns();
  297. resetFrames();
  298. resetContainers();
  299. for(team = 0; team < numberofteams; team++) {
  300. teamsize = map.get(playersinteam, team);
  301. if(teamsize != 0) {
  302. list.add(allteams, team);
  303. map.add(points, team, 0);
  304. }
  305. }
  306. //Sales erstellen
  307. for(i = 0; i < list.getSize(allteams); i++) {
  308. team = list.getIndex(allteams, i);
  309. step = list.getSize(sell_frame_locs) / numberofteams;
  310. index = team * step;
  311. direction = map.get(sell_frame_directions, team);
  312. frame_loc = list.getIndex(sell_frame_locs, index);
  313. entity = list.getIndex(humans_list, index);
  314. entity.removeAll(item_frame_class, frame_loc, 1);
  315. item = getItem(getRandomIndex());
  316. entity.frame.spawn(frame_loc, direction, item);
  317. map.add(sales_map, entity, item);
  318. time = math.random(30, 60);
  319. as = map.get(as_map, entity);
  320. entity.setName(as, text.new(string.number(time)), true);
  321. }
  322. updateDisplay();
  323. singleteam = false;
  324. if(list.getSize(allteams) == 1) {
  325. singleteam = true;
  326. }
  327. @loop
  328. if(--seconds < 0) {
  329. minutes--;
  330. seconds = 59;
  331. }
  332. if(seconds < 10) {
  333. minigame.displayAll(98, string.concat("§aTime left: §r", string.number(minutes), ":0", string.number(seconds)));
  334. } else {
  335. minigame.displayAll(98, string.concat("§aTime left: §r", string.number(minutes), ":", string.number(seconds)));
  336. }
  337. if(minutes == 0 && seconds == 30) {
  338. minigame.speakAll(gamename, "The shops are closing in 30 seconds.");
  339. for(i = 0; i < list.getSize(player_list); i++) {
  340. p = player.get(list.getIndex(player_list, i));
  341. sound.spawnForPlayer(p, join_sound, sound_category_ambient);
  342. }
  343. } elseif(minutes == 0 && seconds == 10) {
  344. minigame.speakAll(gamename, "The shops are closing in 10 seconds.");
  345. for(i = 0; i < list.getSize(player_list); i++) {
  346. p = player.get(list.getIndex(player_list, i));
  347. sound.spawnForPlayer(p, join_sound, sound_category_ambient);
  348. }
  349. } elseif(minutes == 0 && seconds <= 3) {
  350. for(i = 0; i < list.getSize(player_list); i++) {
  351. p = player.get(list.getIndex(player_list, i));
  352. sound.spawnForPlayer(p, join_sound, sound_category_ambient);
  353. }
  354. }
  355. if(minutes == 0 && seconds == 0) {
  356. max = -1;
  357. minigame.msgAll(string.getSpacer());
  358. for(i = 0; i < list.getSize(allteams); i++) {
  359. team = list.getIndex(allteams, i);
  360. teampoints = map.get(points, team);
  361. if(teampoints > max) {
  362. max = teampoints;
  363. winning_team = team;
  364. winner_list = map.get(teamidtolist, winning_team);
  365. }
  366. teamlist = map.get(teamidtolist, team);
  367. team_string = "";
  368. for(h = 0; h < list.getSize(teamlist); h++) {
  369. p_uuid = list.getIndex(teamlist, h);
  370. if(team_string == "") {
  371. team_string = player.getName(p_uuid);
  372. } else {
  373. team_string = string.concat(team_string, " ", player.getName(p_uuid));
  374. }
  375. money.addBoost(player.getId(p_uuid), math.round(teampoints) * 2);
  376. }
  377. minigame.speakAll(gamename, string.concat(string.number(teampoints), map.get(colorcodes, team), " (", team_string, ")"));
  378. }
  379. goto("win");
  380. }
  381. iter = map.iterator(sales_map);
  382. while(hasNext(iter)) {
  383. iter_element = next(iter);
  384. key = map.getKey(iter_element);
  385. as = map.get(as_map, key);
  386. time = read.number(string.text(entity.getName(as))) - 1;
  387. if(time > 0) {
  388. entity.setName(as, text.new(string.number(time)), true);
  389. } else {
  390. index = list.getIndexOf(humans_list, key);
  391. location = list.getIndex(sell_frame_locs, index);
  392. entity.removeAll(item_frame_class, location, 1);
  393. step = list.getSize(sell_frame_locs) / numberofteams;
  394. team = math.roundDown(index / step);
  395. direction = map.get(sell_frame_directions, team);
  396. item = getItem(getRandomIndex());
  397. entity.frame.spawn(location, direction, item);
  398. map.add(sales_map, key, item);
  399. time = math.random(30, 60);
  400. entity.setName(as, text.new(string.number(time)), true);
  401. }
  402. }
  403. sgoto(20, "loop");
  404. @checkgame
  405. wait();
  406. if(event == "entity_damage") {
  407. //TODO: entity, damager_entity
  408. if(!isPlayer(entity)) {
  409. goto("checkgame");
  410. }
  411. player = entity;
  412. }
  413. if(player.hasMinigameId(player, script_id)) {
  414. ignoreGoto(event);
  415. }
  416. goto("checkgame");
  417. @block_click
  418. if(slot.isOffHand(hand)) {
  419. goto("checkgame");
  420. }
  421. if(action != "RIGHT_CLICK_BLOCK") {
  422. goto("checkgame");
  423. }
  424. if(block.hasTag(block, wall_signs_tag)) {
  425. if(sign.getString(block, "FRONT", 0) == "Click here") {
  426. if(player.getItemAmount(player, emerald) >= 10) {
  427. direction = block.getDirectionalFace(block);
  428. block.setMaterial(block, air_mat);
  429. item = getItem(getRandomIndex());
  430. block_loc = block.getLocation(block);
  431. entity.frame.spawn(block_loc, direction, item);
  432. entity = list.getIndex(humans_list, list.getIndexOf(sell_frame_locs, block_loc));
  433. map.add(sales_map, entity, item);
  434. time = math.random(30, 60);
  435. as = map.get(as_map, entity);
  436. entity.setName(as, text.new(string.number(time)), true);
  437. player.removeItem(player, emerald10);
  438. } else {
  439. msg.prefix(player, gamename, "You need 10 emeralds.");
  440. }
  441. }
  442. }
  443. goto("checkgame");
  444. @entity_damage
  445. if(isPlayer(entity)) {
  446. cancel = true;
  447. }
  448. goto("checkgame");
  449. @block_break
  450. @block_place
  451. cancel = true;
  452. goto("checkgame");
  453. @shopitem
  454. if(map.contains(sales_map, human)) {
  455. hand_item = living.getHand(player);
  456. aim_item = map.get(sales_map, human);
  457. if(item.getType(hand_item) == item.getType(aim_item)) {
  458. player_uuid = player.getUuid(player);
  459. team = map.get(players, player_uuid);
  460. direction = map.get(sell_frame_directions, team);
  461. item = getItem(getRandomIndex());
  462. location = list.getIndex(sell_frame_locs, list.getIndexOf(humans_list, human));
  463. entity.removeAll(item_frame_class, location, 1);
  464. entity.frame.spawn(location, direction, item);
  465. map.add(sales_map, human, item);
  466. time = math.random(30, 60);
  467. as = map.get(as_map, human);
  468. entity.setName(as, text.new(string.number(time)), true);
  469. player.giveItem(player, emerald);
  470. player.removeItem(player, aim_item);
  471. map.add(points, team, map.get(points, team) + 1);
  472. updateDisplay();
  473. msg.prefix(player, gamename, "Thank you §e+§r1 §aSmaragd");
  474. } else {
  475. msg.prefix(player, gamename, "Wrong item in your mainhand.");
  476. }
  477. } else {
  478. if(string_name != "Recipes") {
  479. msg.prefix(player, gamename, "Shop locked.");
  480. }
  481. }
  482. goto("checkgame");
  483. @snuvi_click
  484. title_string = string.text(inv_title);
  485. if(title_string == "Recipes") {
  486. player_uuid = player.getUuid(player);
  487. team = map.get(players, player_uuid);
  488. item = inv.getItem(inv, inv_slot);
  489. item.removeFlag(item, "HIDE_DESTROYS");
  490. item_type = item.getType(item);
  491. if(item_type == black_glass_pane_mat) {
  492. goto("checkgame");
  493. }
  494. if(inv_slot == 52 || inv_slot == 53) {
  495. if(item_type == paper_mat) {
  496. name = string.text(item.getName(item));
  497. if(string.contains(name, "<<") || string.contains(name, ">>")) {
  498. page = string.removeFormat(name);
  499. page = string.replace(page, "<<", "");
  500. page = string.replace(page, ">>", "");
  501. page = read.number(page);
  502. if(inv_slot == 52) {
  503. setRecipePage(player, inv, page);
  504. }
  505. if(inv_slot == 53) {
  506. setRecipePage(player, inv, page);
  507. }
  508. goto("checkgame");
  509. }
  510. }
  511. }
  512. index = getIndexFromItemType(item_type);
  513. if(index == null) {
  514. goto("checkgame");
  515. }
  516. setItemFrames(team, index);
  517. }
  518. goto("checkgame");
  519. @entity_click
  520. if(slot.isOffHand(hand)) {
  521. goto("checkgame");
  522. }
  523. if(isCitizen(entity)) {
  524. entity_name = entity.getName(entity);
  525. string_name = string.text(entity_name);
  526. if(string_name == "Recipes") {
  527. player_uuid = player.getUuid(player);
  528. menu = map.get(recipe_menus, player_uuid);
  529. setRecipePage(player, menu, 1);
  530. inv.open(menu, player);
  531. }
  532. human = entity;
  533. goto("shopitem");
  534. }
  535. goto("checkgame");
  536. @player_post_respawn
  537. player_uuid = player.getUuid(player);
  538. team = map.get(players, player_uuid);
  539. location = map.get(spawn_locs, team);
  540. entity.teleport(player, location);
  541. goto("checkgame");
  542. @player_teleport
  543. if(cause == "ENDER_PEARL") {
  544. cancel = true;
  545. }
  546. goto("checkgame");
  547. @player_quit
  548. @player_giveup
  549. minigame.speakAll(gamename, string.concat("§8", player.getName(player), " §rhas left the game."));
  550. showstats(player, false);
  551. player_uuid = player.getUuid(player);
  552. //Bypass-Perms wieder geben
  553. if(list.contains(removed_perms, player_uuid)) {
  554. list.remove(removed_perms, player_uuid);
  555. perm.loadGroupToPlayer(16, player);
  556. perm.update(player);
  557. msg.dev(perm.has("plot.bypass", player));
  558. }
  559. if(singleteam) {
  560. script = script.getFromId(script_id);
  561. minigame.kickPlayer(script, player);
  562. minigame.term(script, gamesignloc);
  563. term();
  564. }
  565. team = map.get(players, player_uuid);
  566. map.remove(players, player_uuid);
  567. script = script.getFromId(script_id);
  568. minigame.kickPlayer(script, player);
  569. amount = map.get(playersinteam, team) - 1;
  570. map.add(playersinteam, team, amount);
  571. if(amount <= 0) {
  572. list.remove(allteams, team);
  573. if(list.getSize(allteams) == 1) {
  574. winning_team = list.getIndex(allteams, 0);
  575. winner_list = map.get(teamidtolist, winning_team);
  576. goto("win");
  577. }
  578. }
  579. minigame.displayRemoveAll(97 - team);
  580. goto("checkgame");
  581. @win
  582. team_string = "";
  583. for(h = 0; h < list.getSize(winner_list); h++) {
  584. if(team_string == "") {
  585. team_string = player.getName(list.getIndex(winner_list, h));
  586. } else {
  587. team_string = string.concat(team_string, " ", player.getName(list.getIndex(winner_list, h)));
  588. }
  589. }
  590. if(!singleteam) {
  591. minigame.speakAll( gamename, string.concat("Team ", map.get(colorcodes, winning_team), "(", team_string, ") §rhas won."));
  592. }
  593. for(i = 0; i < list.getSize(player_list); i++) {
  594. player_uuid = list.getIndex(player_list, i);
  595. p = player.get(player_uuid);
  596. team = map.get(players, player_uuid);
  597. if(team == winning_team) {
  598. showstats(p, true);
  599. } else {
  600. showstats(p, false);
  601. }
  602. }
  603. //Bypass-Perms wieder geben
  604. for(i = 0; i < list.getSize(removed_perms); i++) {
  605. player_uuid = list.getIndex(removed_perms, i);
  606. p = player.get(player_uuid);
  607. perm.loadGroupToPlayer(16, p);
  608. perm.update(p);
  609. }
  610. script = script.getFromId(script_id);
  611. minigame.kickAllPlayers(script);
  612. minigame.term(script, gamesignloc);
  613. term();
  614. function showstats(player, won) { //Player player, Boolean won
  615. player_id = player.getId(player);
  616. last_record = ranking.getPoints($rankingtable, player_id);
  617. playedgames = minigame.getPlayed(player_id, $game_short) + 1;
  618. minigame.setPlayed(player_id, $game_short, playedgames);
  619. player_uuid = player.getUuid(player);
  620. team = map.get($players, player_uuid);
  621. record = map.get($points, team);
  622. if(record < last_record) {
  623. record = last_record;
  624. }
  625. ranking.setPoints($rankingtable, player_id, record);
  626. wongames = minigame.getWon(player, "sc");
  627. if(!$singleteam) {
  628. if(won) {
  629. wongames++;
  630. minigame.setWon(player, "sc", wongames);
  631. }
  632. }
  633. minigame.statsHeader(player, $gamename, "§e");
  634. minigame.statsLine(player, "§e", "Max Items", string.number(record));
  635. minigame.statsLine(player, "§e", "Played games", string.number(playedgames));
  636. minigame.statsLine(player, "§e", "Won games", string.number(wongames));
  637. if(playedgames != 0) {
  638. minigame.statsLine(player, "§e", "Win ratio", string.concat(string.number(math.roundComma((wongames / playedgames) * 100, 2)), "%"));
  639. }
  640. }
  641. function updateDisplay() {
  642. minigame.displayAll(99, $gamename);
  643. for(i = 0; i < list.getSize($allteams); i++) {
  644. team = list.getIndex($allteams, i);
  645. teamlist = map.get($teamidtolist, team);
  646. team_string = "";
  647. for(h = 0; h < list.getSize(teamlist); h++) {
  648. if(team_string == "") {
  649. team_string = player.getName(list.getIndex(teamlist, h));
  650. } else {
  651. team_string = string.concat(team_string, " ", player.getName(list.getIndex(teamlist, h)));
  652. }
  653. }
  654. minigame.displayAll(97 - team, string.concat("§r", string.number(map.get($points, team)), " ", map.get($colorcodes, team), team_string));
  655. }
  656. minigame.displayAll(97 - team - 1, sb.getSpacer());
  657. }
  658. function addItem(item, item1, item2, item3, item4, item5, item6, item7, item8, item9) {
  659. array = array.new(10);
  660. array[0] = item.new(material.get(item));
  661. array[1] = item.new(material.get(item1));
  662. array[2] = item.new(material.get(item2));
  663. array[3] = item.new(material.get(item3));
  664. array[4] = item.new(material.get(item4));
  665. array[5] = item.new(material.get(item5));
  666. array[6] = item.new(material.get(item6));
  667. array[7] = item.new(material.get(item7));
  668. array[8] = item.new(material.get(item8));
  669. array[9] = item.new(material.get(item9));
  670. list.add($items_list, array);
  671. }
  672. function getRandomIndex() {
  673. return math.random(0, list.getSize($items_list) - 1);
  674. }
  675. function getIndexFromItemType(item_type) {
  676. for(i = 0; i < list.getSize($items_list); i++) {
  677. array = list.getIndex($items_list, i);
  678. if(item.getType(array[0]) == item_type) {
  679. return i;
  680. }
  681. }
  682. return null;
  683. }
  684. function getItem(index) {
  685. array = list.getIndex($items_list, index);
  686. return array[0];
  687. }
  688. function setItemFrames(team, index) {
  689. loc = list.getIndex($frame_locs, team);
  690. entity.removeAll($item_frame_class, loc, 3.5);
  691. direction = map.get($frame_directions, team);
  692. array = list.getIndex($items_list, index);
  693. entity.frame.spawn(loc, direction, array[0]);
  694. if(direction == "NORTH") {
  695. entity.frame.spawn(loc.mod(loc, 1, -1, 0), direction, array[1]);
  696. entity.frame.spawn(loc.mod(loc, 0, -1, 0), direction, array[2]);
  697. entity.frame.spawn(loc.mod(loc, -1, -1, 0), direction, array[3]);
  698. entity.frame.spawn(loc.mod(loc, 1, -2, 0), direction, array[4]);
  699. entity.frame.spawn(loc.mod(loc, 0, -2, 0), direction, array[5]);
  700. entity.frame.spawn(loc.mod(loc, -1, -2, 0), direction, array[6]);
  701. entity.frame.spawn(loc.mod(loc, 1, -3, 0), direction, array[7]);
  702. entity.frame.spawn(loc.mod(loc, 0, -3, 0), direction, array[8]);
  703. entity.frame.spawn(loc.mod(loc, -1, -3, 0), direction, array[9]);
  704. } elseif(direction == "EAST") {
  705. entity.frame.spawn(loc.mod(loc, 0, -1, -1), direction, array[1]);
  706. entity.frame.spawn(loc.mod(loc, 0, -1, 0), direction, array[2]);
  707. entity.frame.spawn(loc.mod(loc, 0, -1, 1), direction, array[3]);
  708. entity.frame.spawn(loc.mod(loc, 0, -2, -1), direction, array[4]);
  709. entity.frame.spawn(loc.mod(loc, 0, -2, 0), direction, array[5]);
  710. entity.frame.spawn(loc.mod(loc, 0, -2, 1), direction, array[6]);
  711. entity.frame.spawn(loc.mod(loc, 0, -3, -1), direction, array[7]);
  712. entity.frame.spawn(loc.mod(loc, 0, -3, 0), direction, array[8]);
  713. entity.frame.spawn(loc.mod(loc, 0, -3, 1), direction, array[9]);
  714. } elseif(direction == "SOUTH") {
  715. entity.frame.spawn(loc.mod(loc, -1, -1, 0), direction, array[1]);
  716. entity.frame.spawn(loc.mod(loc, 0, -1, 0), direction, array[2]);
  717. entity.frame.spawn(loc.mod(loc, 1, -1, 0), direction, array[3]);
  718. entity.frame.spawn(loc.mod(loc, -1, -2, 0), direction, array[4]);
  719. entity.frame.spawn(loc.mod(loc, 0, -2, 0), direction, array[5]);
  720. entity.frame.spawn(loc.mod(loc, 1, -2, 0), direction, array[6]);
  721. entity.frame.spawn(loc.mod(loc, -1, -3, 0), direction, array[7]);
  722. entity.frame.spawn(loc.mod(loc, 0, -3, 0), direction, array[8]);
  723. entity.frame.spawn(loc.mod(loc, 1, -3, 0), direction, array[9]);
  724. } elseif(direction == "WEST") {
  725. entity.frame.spawn(loc.mod(loc, 0, -1, 1), direction, array[1]);
  726. entity.frame.spawn(loc.mod(loc, 0, -1, 0), direction, array[2]);
  727. entity.frame.spawn(loc.mod(loc, 0, -1, -1), direction, array[3]);
  728. entity.frame.spawn(loc.mod(loc, 0, -2, 1), direction, array[4]);
  729. entity.frame.spawn(loc.mod(loc, 0, -2, 0), direction, array[5]);
  730. entity.frame.spawn(loc.mod(loc, 0, -2, -1), direction, array[6]);
  731. entity.frame.spawn(loc.mod(loc, 0, -3, 1), direction, array[7]);
  732. entity.frame.spawn(loc.mod(loc, 0, -3, 0), direction, array[8]);
  733. entity.frame.spawn(loc.mod(loc, 0, -3, -1), direction, array[9]);
  734. }
  735. }
  736. function resetSigns() {
  737. step = list.getSize($sell_frame_locs) / $numberofteams;
  738. team = 0;
  739. counter = 0;
  740. oak_wall_sign = material.get("oak_wall_sign");
  741. for(i = 0; i < list.getSize($sell_frame_locs); i++) {
  742. if(counter != 0) { //Erste Locs werden übersprungen. Kein Schild platzieren = Freigeschalteter Shop
  743. loc = list.getIndex($sell_frame_locs, i);
  744. entity.removeAll($item_frame_class, loc, 1);
  745. direction = map.get($sell_frame_directions, team);
  746. block = block.get(loc);
  747. block.setMaterial(block, oak_wall_sign);
  748. block.setDirectionalFace(block, direction);
  749. sign.setString(block, "FRONT", 0, "Click here");
  750. sign.setString(block, "FRONT", 1, "to unlock for");
  751. sign.setString(block, "FRONT", 2, "§a10 §rEmerald");
  752. sign.setString(block, "FRONT", 3, ">> >> >>");
  753. }
  754. if(++counter == step) {
  755. counter = 0;
  756. team++;
  757. }
  758. }
  759. }
  760. function resetFrames() {
  761. for(i = 0; i < list.getSize($frame_locs); i++) {
  762. loc = list.getIndex($frame_locs, i);
  763. entity.removeAll($item_frame_class, loc, 3.5);
  764. direction = map.get($frame_directions, i);
  765. entity.frame.spawn(loc, direction, $air_item);
  766. entity.frame.spawn(loc.mod(loc, 0, -1, 0), direction, $air_item);
  767. entity.frame.spawn(loc.mod(loc, 0, -2, 0), direction, $air_item);
  768. entity.frame.spawn(loc.mod(loc, 0, -3, 0), direction, $air_item);
  769. if(direction == "NORTH" || direction == "SOUTH") {
  770. entity.frame.spawn(loc.mod(loc, 1, -1, 0), direction, $air_item);
  771. entity.frame.spawn(loc.mod(loc, -1, -1, 0), direction, $air_item);
  772. entity.frame.spawn(loc.mod(loc, 1, -2, 0), direction, $air_item);
  773. entity.frame.spawn(loc.mod(loc, -1, -2, 0), direction, $air_item);
  774. entity.frame.spawn(loc.mod(loc, 1, -3, 0), direction, $air_item);
  775. entity.frame.spawn(loc.mod(loc, -1, -3, 0), direction, $air_item);
  776. }
  777. if(direction == "EAST" || direction == "WEST") {
  778. entity.frame.spawn(loc.mod(loc, 0, -1, 1), direction, $air_item);
  779. entity.frame.spawn(loc.mod(loc, 0, -1, -1), direction, $air_item);
  780. entity.frame.spawn(loc.mod(loc, 0, -2, 1), direction, $air_item);
  781. entity.frame.spawn(loc.mod(loc, 0, -2, -1), direction, $air_item);
  782. entity.frame.spawn(loc.mod(loc, 0, -3, 1), direction, $air_item);
  783. entity.frame.spawn(loc.mod(loc, 0, -3, -1), direction, $air_item);
  784. }
  785. }
  786. }
  787. function resetContainers() {
  788. //1.Kiste
  789. for(i = 0; i < list.getSize($chest_locs1); i++) {
  790. loc = list.getIndex($chest_locs1, i);
  791. block.clone(block.get(loc.mod(loc, 0, -3, 0)), loc);
  792. }
  793. //2.Kiste
  794. for(i = 0; i < list.getSize($chest_locs2); i++) {
  795. loc = list.getIndex($chest_locs2, i);
  796. block.clone(block.get(loc.mod(loc, 0, -3, 0)), loc);
  797. }
  798. //Ofen
  799. for(i = 0; i < list.getSize($furnace_locs); i++) {
  800. loc = list.getIndex($furnace_locs, i);
  801. block.clone(block.get(loc.mod(loc, 0, -3, 0)), loc);
  802. }
  803. }
  804. function setRecipePage(player, menu, page) {
  805. size = list.getSize($items_list);
  806. max_page = math.roundUp(size / 45);
  807. if(page > max_page) {
  808. return;
  809. }
  810. if(page > 1) {
  811. inv.setItem(menu, 52, item.create("PAPER", 1, string.concat("§e", string.number(page - 1), " <<"), null));
  812. } else {
  813. inv.setItem(menu, 52, $black_glass_pane);
  814. }
  815. if(page < max_page) {
  816. inv.setItem(menu, 53, item.create("PAPER", 1, string.concat("§e>> ", string.number(page + 1)), null));
  817. } else {
  818. inv.setItem(menu, 53, $black_glass_pane);
  819. }
  820. max_index = size - 1;
  821. for(i = 0; i < 45; i++) {
  822. list_index = i + 45 * (page - 1);
  823. if(list_index > max_index) {
  824. inv.setItem(menu, i, $black_glass_pane);
  825. } else {
  826. array = list.getIndex($items_list, list_index);
  827. inv.setItem(menu, i, array[0]);
  828. }
  829. }
  830. }
  831. function getAllEntites() {
  832. humans_list = list.new();
  833. $as_map = map.new();
  834. for(i = 0; i < list.getSize($humans_locs); i++) {
  835. //human
  836. location = list.getIndex($humans_locs, i);
  837. list = entity.near(location, 0.7);
  838. human = list.getIndex(list, 0);
  839. list.add(humans_list, human);
  840. //as
  841. location = loc.mod(location, 0, 2.05, 0);
  842. as = entity.get(location, 1, $armor_stand_class);
  843. map.add($as_map, human, as);
  844. }
  845. return humans_list;
  846. }