shoppingchaos.txt 36 KB

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