123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011 |
- rankingtable = "bwranks";
- game_short = "bw";
- game_tab = "§bBW";
- specific_lobby_handling = true;
- no_core_reset = true;
- colorcodes = map.new();
- map.add(colorcodes, 0, "§9");
- map.add(colorcodes, 1, "§c");
- map.add(colorcodes, 2, "§e");
- map.add(colorcodes, 3, "§2");
- map.add(colorcodes, 4, "§6");
- map.add(colorcodes, 5, "§5");
- map.add(colorcodes, 6, "§d");
- map.add(colorcodes, 7, "§0");
- teamcolortext = map.new();
- map.add(teamcolortext, 0, "§9blue");
- map.add(teamcolortext, 1, "§cred");
- map.add(teamcolortext, 2, "§eyellow");
- map.add(teamcolortext, 3, "§2green");
- map.add(teamcolortext, 4, "§6orange");
- map.add(teamcolortext, 5, "§5magenta");
- map.add(teamcolortext, 6, "§dpink");
- map.add(teamcolortext, 7, "§0black");
- concrete_types = map.new(); //Liste der Bau-Blöcke
- map.add(concrete_types, 0, "minecraft:blue_concrete");
- map.add(concrete_types, 1, "minecraft:red_concrete");
- map.add(concrete_types, 2, "minecraft:yellow_concrete");
- map.add(concrete_types, 3, "minecraft:green_concrete");
- map.add(concrete_types, 4, "minecraft:orange_concrete");
- map.add(concrete_types, 5, "minecraft:magenta_concrete");
- map.add(concrete_types, 6, "minecraft:pink_concrete");
- map.add(concrete_types, 7, "minecraft:black_concrete");
- block_click_catcher = set.new();
- playersinteam = map.new(); //Anzahl der Spieler im Team
- teamidtolist = map.new(); //Map mit Spielerlisten für jedes Team
- placedblocks = list.new(); //Liste aller platzierten Blöcke
- allteams = list.new(); //Alle Teams, die noch im Spiel sind
- waiters = list.new(); //Spieler in der Lobby ohne Teamzugehörigkeit
- players = map.new(); //Alle Spieler (key) des Spiels und deren Teamzugehörigkeit (value)
- gamename = "§bBedWars";
- bedtruesymbol = "§2✔";
- bedfalsesymbol = "§4✘";
- air_item = read.item("minecraft:air");
- coin_copper = read.item("km:coin_copper", 1);
- coin_silver = read.item("km:coin_silver", 1);
- coin_gold = read.item("km:coin_gold", 1);
- glowstone_dust = read.item("minecraft:glowstone_dust");
- warp_powder = read.item("{id:\"minecraft:gunpowder\",Count:1b,tag:{display:{Lore:['{\"text\":\"Teleportiert dich zu deiner Base zurück\"}'],Name:'{\"text\":\"§rWarp Powder\"}'}}}");
- blaze_rod = read.item("minecraft:blaze_rod", 1, "§rRettungsplattform");
- bed_tag = block.getTag("minecraft:beds");
- bed_tag2 = item.getTag("minecraft:beds");
- for(team = 0; team < numberofteams; team++) {
- map.add(playersinteam, team, 0);
- map.add(teamidtolist, team, list.new());
- }
- gosub("setstart");
- goto("simplelobby");
- @specificLobbyHandling
- player_name = player.getName(player);
- if(event == "player_join") {
- list.add(waiters, player.getName(player));
- resetplayer(player);
- stacks.setActive(player, false);
- return;
- }
- if(event == "player_logout" || event == "player_giveup") {
- list.remove(waiters, player_name);
- if(map.get(players, player_name) != null) {
- teamlist = map.get(teamidtolist, map.get(players, player_name));
- list.remove(teamlist, player_name);
- }
- map.remove(players, player_name);
- return;
- }
- if(event == "block_click") {
- if(hand == "OFF_HAND") {
- return;
- }
- if(action == "left" && set.contains(block_click_catcher, player)) {
- set.remove(block_click_catcher, player);
- return;
- } else {
- set.add(block_click_catcher, player);
- }
- if(map.contains(join_blocks, block_loc)) {
- newteam = map.get(join_blocks, block_loc);
- newteamlist = map.get(teamidtolist, newteam);
- if(list.contains(newteamlist, player_name)) {
- msg.prefix(player, gamename, "§eYou are already in this team.");
- return;
- }
- if(list.getSize(newteamlist) >= teamsize) {
- msg.prefix(player, gamename, "§eNo space for you in this team.");
- return;
- }
- list.remove(waiters, player_name);
- yetteam = map.get(players, player_name);
- if(yetteam != null) {
- yetteamlist = map.get(teamidtolist, yetteam);
- list.remove(yetteamlist, player_name);
- }
- list.add(newteamlist, player_name);
- map.add(players, player_name, newteam);
- msg.prefix(player, gamename, concat("§eYou joined the ", map.get(teamcolortext, newteam), " §eteam."));;
- entity.setName(player, concat(map.get(colorcodes, newteam), player.getName(player)));
- }
- }
- return;
- @finalstart
- player_list = minigame.getPlayers(script_id);
- if(voidedge1 != null) {
- voidid = event.addMoveData(voidedge1, voidedge2, 3, -1);
- }
- trap_sound = sound.get("block.note_block.pling");
- newbed_sound = sound.get("block.anvil.use");
- bed_sound = sound.get("entity.wither.death");
- allkills = map.new();
- bedkills = map.new();
- deaths = map.new();
- brokenbeds = map.new();
- warpinghome_loc = map.new();
- warpinghome_tick = map.new();
- warpinghome_list = list.new();
- lastdamagers = map.new();
- bedsymbol = map.new();
- newbedused = map.new();
- teambedbroken = map.new();
- traps = map.new();
- shopmenus = map.new();
- bed_types = map.new(); //Liste der Betten
- map.add(bed_types, 0, "minecraft:blue_bed");
- map.add(bed_types, 1, "minecraft:red_bed");
- map.add(bed_types, 2, "minecraft:yellow_bed");
- map.add(bed_types, 3, "minecraft:green_bed");
- map.add(bed_types, 4, "minecraft:orange_bed");
- map.add(bed_types, 5, "minecraft:mangenta_bed");
- map.add(bed_types, 6, "minecraft:pink_bed");
- map.add(bed_types, 7, "minecraft:black_bed");
- glass_types = map.new(); //Liste für Rettungsplattformen
- map.add(glass_types, 0, "minecraft:blue_stained_glass");
- map.add(glass_types, 1, "minecraft:red_stained_glass");
- map.add(glass_types, 2, "minecraft:yellow_stained_glass");
- map.add(glass_types, 3, "minecraft:green_stained_glass");
- map.add(glass_types, 4, "minecraft:orange_stained_glass");
- map.add(glass_types, 5, "minecraft:mangenta_stained_glass");
- map.add(glass_types, 6, "minecraft:pink_stained_glass");
- map.add(glass_types, 7, "minecraft:black_stained_glass");
- clothescode = map.new(); //Liste der Datenwerte für gefärbte Kleidung
- map.add(clothescode, 0, 5592575);
- map.add(clothescode, 1, 16733525);
- map.add(clothescode, 2, 16777045);
- map.add(clothescode, 3, 5635925);
- map.add(clothescode, 4, 16755200);
- map.add(clothescode, 5, 43690);
- map.add(clothescode, 6, 5592405);
- map.add(clothescode, 7, 0);
- teamcolortext2 = map.new();
- map.add(teamcolortext2, 0, "§9Blue");
- map.add(teamcolortext2, 1, "§cRed");
- map.add(teamcolortext2, 2, "§eYellow");
- map.add(teamcolortext2, 3, "§2Green");
- map.add(teamcolortext2, 4, "§6Orange");
- map.add(teamcolortext2, 5, "§5Magenta");
- map.add(teamcolortext2, 6, "§dPink");
- map.add(teamcolortext2, 7, "§0Black");
- colornames = map.new();
- map.add(colornames, 0, "blue");
- map.add(colornames, 1, "red");
- map.add(colornames, 2, "yellow");
- map.add(colornames, 3, "green");
- map.add(colornames, 4, "orange");
- map.add(colornames, 5, "magenta");
- map.add(colornames, 6, "pink");
- map.add(colornames, 7, "black");
- while(list.getSize(waiters) != 0) {
- team = getTeamWithLowestPeople(teamidtolist, numberofteams);
- teamlist = map.get(teamidtolist, team);
- p_name = list.getIndex(waiters, 0);
- list.add(teamlist, p_name);
- list.remove(waiters, p_name);
- map.add(players, p_name, team);
- entity.setName(read.player(p_name), concat(map.get(colorcodes, team), p_name));
- }
- event.unload("block_click");
- event.load("player_post_respawn");
- event.load("living_death");
- event.load("player_pickup");
- event.load("player_toss");
- event.load("entity_click");
- event.load("inv_click");
- event.load("item_air_click");
- event.load("player_move");
- starttime = time.getMillis();
- for(i = 0; i < numberofteams; i++) {
- map.add(newbedused, i, false);
- map.add(teambedbroken, i, false);
- teamlist = map.get(teamidtolist, i);
- size = list.getSize(teamlist);
- map.add(playersinteam, i, size);
- if(size != 0) {
- list.add(allteams, i);
- map.add(bedsymbol, i, bedtruesymbol);
- for(h = 0; h < size; h++) {
- pname = list.getIndex(teamlist, h);
- p = read.player(pname);
- msg.prefix(p, gamename, "The game has started.");
- entity.teleport(p, map.get(spawn_locs, i));
- player.setGamemode(p, "survival");
- player.setFly(p, false);
- map.add(allkills, pname, 0);
- map.add(bedkills, pname, 0);
- map.add(deaths, pname, 0);
- map.add(brokenbeds, pname, 0);
- shopmenu = inv.new("333333333333333333333333333333333333");
- inv.setItem(shopmenu, 0, read.item("minecraft:nether_star", 1, "§rFavoriten"));
- inv.setItem(shopmenu, 1, read.item("minecraft:smooth_sandstone", 1, "§rBlöcke"));
- inv.setItem(shopmenu, 2, read.item("minecraft:chainmail_chestplate", 1, "§rRüstung"));
- inv.setItem(shopmenu, 3, read.item("minecraft:stone_pickaxe", 1, "§rSpitzhacken"));
- inv.setItem(shopmenu, 4, read.item("minecraft:golden_sword", 1, "§rWaffen"));
- inv.setItem(shopmenu, 5, read.item("minecraft:bow", 1, "§rBögen"));
- inv.setItem(shopmenu, 6, read.item("minecraft:apple", 1, "§rNahrung"));
- inv.setItem(shopmenu, 7, read.item("minecraft:potion", 1, "§rTränke"));
- inv.setItem(shopmenu, 8, read.item("minecraft:tnt", 1, "§rSpezial"));
- map.add(shopmenus, player.getId(p), shopmenu);
- }
- }
- setBed(i);
- }
- minigame.displayAll(0, "§bBedWars");
- gosub("setdisplay");
- drop_counter = 0;
- @item_dropper
- for(i = 0; i < list.getSize(copper_locs); i++) {
- loc = list.getIndex(copper_locs, i);
- item.drop(loc, coin_copper);
- }
- if(drop_counter == 15) {
- for(i = 0; i < list.getSize(silver_locs); i++) {
- loc = list.getIndex(silver_locs, i);
- item.drop(loc, coin_silver);
- }
- }
- if(drop_counter == 30) {
- for(i = 0; i < list.getSize(silver_locs); i++) {
- loc = list.getIndex(silver_locs, i);
- item.drop(loc, coin_silver);
- }
- for(i = 0; i < list.getSize(gold_locs); i++) {
- loc = list.getIndex(gold_locs, i);
- item.drop(loc, coin_gold);
- }
- drop_counter = 0;
- }
- minigame.displayAll(1, concat("§6Gold §r", text.number(30 - drop_counter)));
- if(drop_counter < 15) {
- iron_drop_counter = drop_counter + 15;
- } else {
- iron_drop_counter = drop_counter;
- }
- minigame.displayAll(2, concat("§7Silber §r", text.number(30 - iron_drop_counter)));
- drop_counter++;
- sgoto(20, "item_dropper");
- for(i = 0; i < list.getSize(player_list); i++) {
- p = player.get(list.getIndex(player_list, i));
- p_name = player.getName(p);
- tempteam = map.get(players, p_name);
- color = bedwars.getTeamColor(p);
- player.action(p, concat(color, "Team ", map.get(teamcolortext2, tempteam)));
- minigame.setTabName(p, game_tab, color);
- }
- @checkgame
- wait();
- if(event == "living_pre_hurt" || event == "living_death") {
- if(!isPlayer(living_entity)) {
- goto("checkgame");
- }
- player = living_entity;
- }
- if(player.hasMinigameId(player, script_id)) {
- player_name = player.getName(player);
- ignoreGoto(event);
- }
- goto("checkgame");
- @entity_click
- if(text.class(entity) == "EntityHuman") {
- shopmenu = map.get(shopmenus, player.getId(player));
- setShopmenu1(shopmenu);
- inv.open(shopmenu, player, "§8Shop");
- inv.update(player);
- }
- goto("checkgame");
- @inv_click
- item_type = item.getType(item);
- if(item_type == "minecraft:air") {
- goto("checkgame");
- }
- factor = 1;
- if(click_type == "QUICK_MOVE") {
- factor = 8;
- }
- shopmenu = map.get(shopmenus, player.getId(player));
- if(inv_slot < 9) {
- for(slot = 9; slot < 36; slot++) {
- inv.setItem(shopmenu, slot, air_item);
- }
- if(inv_slot == 0) {
- setShopmenu1(shopmenu);
- }
- if(inv_slot == 1) {
- setShopmenu2(shopmenu);
- }
- if(inv_slot == 2) {
- setShopmenu3(shopmenu);
- }
- if(inv_slot == 3) {
- setShopmenu4(shopmenu);
- }
- if(inv_slot == 4) {
- setShopmenu5(shopmenu);
- }
- if(inv_slot == 5) {
- setShopmenu6(shopmenu);
- }
- if(inv_slot == 6) {
- setShopmenu7(shopmenu);
- }
- if(inv_slot == 7) {
- setShopmenu8(shopmenu);
- }
- if(inv_slot == 8) {
- setShopmenu9(shopmenu);
- }
- inv.update(player);
- goto("checkgame");
- }
- //buyitem
- if(item_type == "km:coin_copper" || item_type == "km:coin_silver" || item_type == "km:coin_gold" || item_type == "minecraft:air") {
- goto("checkgame");
- }
- priceitem = item.clone(inv.getItem(shopmenu, inv_slot + 9));
- item.setAmount(priceitem, item.getAmount(priceitem) * factor);
- if(player.getItemAmount(player, false, priceitem) < item.getAmount(priceitem)) {
- goto("checkgame");
- }
- player.removeItemNbt(player, priceitem);
- if(item_type == "minecraft:red_bed") {
- goto("setnewbed");
- }
- if(item_type == "minecraft:leather_helmet" || item_type == "minecraft:leather_leggings" || item_type == "minecraft:leather_boots") {
- clothescolor = map.get(clothescode, map.get(players, player_name));
- item = read.item(concat("{id:\"", item_type, "\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}],display:{color:", clothescolor, "}}}"));
- } elseif(item_type == "minecraft:smooth_sandstone") {
- team = map.get(players, player_name);
- item_type = map.get(concrete_types, team);
- item_amount = item.getAmount(inv.getItem(shopmenu, inv_slot));
- item = read.item(item_type, item_amount);
- }
- if(click_type == "QUICK_MOVE") {
- item = item.clone(item);
- item.setAmount(item, item.getAmount(item) * factor);
- }
- player.safeGiveItem(player, item);
- inv.update(player);
- goto("checkgame");
- @breakbed
- if(list.contains(foot_bed_loc, block_loc)) {
- team = list.getIndexOf(foot_bed_loc, block_loc);
- bed_part = "foot";
- } elseif(list.contains(head_bed_loc, block_loc)) {
- team = list.getIndexOf(head_bed_loc, block_loc);
- bed_part = "head";
- } else {
- msg.prefix(player, gamename, "§eThis bed is not part of the game.");
- goto("checkgame");
- }
- teamlist = map.get(teamidtolist, team);
- if(list.contains(teamlist, player_name)) {
- facing = map.get(bed_facing, team);
- bed_type = map.get(bed_types, team);
- if(bed_part == "foot") {
- head_loc = list.getIndex(head_bed_loc, team);
- block.set(head_loc, "minecraft:stone");
- block.set(head_loc, concat(bed_type, "[facing= ", facing, ", part=head]"));
- block.set(block_loc, concat(bed_type, "[facing= ", facing, ", part=foot]"));
- } else {
- foot_loc = list.getIndex(foot_bed_loc, team);
- block.set(foot_loc, "minecraft:stone");
- block.set(foot_loc, concat(bed_type, "[facing= ", facing, ", part=foot]"));
- block.set(block_loc, concat(bed_type, "[facing= ", facing, ", part=head]"));
- }
- msg.prefix(player, gamename, "§eThis is your own bed.");
- goto("checkgame");
- }
- cancel = false;
- tempcolor = map.get(colornames, team);
- map.add(teambedbroken, team, true);
- map.add(bedsymbol, team, bedfalsesymbol);
- map.add(brokenbeds, player_name, map.get(brokenbeds, player_name) + 1);
- owncolor = map.get(colorcodes, map.get(players, player_name));
- minigame.speakAll(gamename, concat("§cThe ", map.get(teamcolortext, team), " §cbed has been destroyed by ", owncolor, player_name, "."));
- gosub("setdisplay");
- for(i = 0; i < list.getSize(player_list); i++) {
- p = player.get(list.getIndex(player_list, i));
- sound.spawnForPlayer(p, bed_sound, sound_category_ambient);
- }
- goto("checkgame");
- @setdisplay //Alle Teams mit Bett werden oben angezeigt, danach alle Teams ohne Bett. Ausgelöschte Teams werden gar nicht angezeigt
- bedtrue = list.new();
- bedfalse = list.new();
- index = 10;
- for(i = 0; i < list.getSize(allteams); i++) {
- tempteam2 = list.getIndex(allteams, i);
- if(!map.get(teambedbroken, tempteam2)) {
- list.add(bedtrue, tempteam2);
- } else {
- list.add(bedfalse, tempteam2);
- }
- }
- size = list.getSize(bedtrue);
- if(size != 0) {
- for(i = 0; i < size; i++) {
- tempteam2 = list.getIndex(bedtrue, i);
- minigame.displayAll(++index, concat(text.number(map.get(playersinteam, tempteam2)), " §2✔ ", map.get(teamcolortext2, tempteam2)));
- }
- }
- size = list.getSize(bedfalse);
- if(size != 0) {
- for(i = 0; i < size; i++) {
- tempteam2 = list.getIndex(bedfalse, i);
- minigame.displayAll(++index, concat(text.number(map.get(playersinteam, tempteam2)), " §4✘ ", map.get(teamcolortext2, tempteam2)));
- }
- }
- return;
- @setnewbed
- team = map.get(players, player_name);
- tempcolor = map.get(colornames, team);
- if(map.get(newbedused, team)) {
- msg.prefix(player, gamename, "§eYou can only us this once.");
- goto("checkgame");
- }
- if(!map.get(teambedbroken, team)) {
- msg.prefix(player, gamename, "§eYour bed is not destroyed yet.");
- goto("checkgame");
- }
- setBed(team);
- map.add(teambedbroken, team, false);
- map.add(bedsymbol, team, bedtruesymbol);
- map.add(newbedused, team, true);
- minigame.speakAll(gamename, concat("§eThe ", map.get(teamcolortext, team), " §ebed has been replaced."));
- gosub("setdisplay");
- for(i = 0; i < list.getSize(player_list); i++) {
- p = player.get(list.getIndex(player_list, i));
- sound.spawnForPlayer(p, newbed_sound, sound_category_ambient);
- }
- goto("checkgame");
- @player_toss
- if(item.getType(item) == "minecraft:glowstone_dust") {
- cancel = true;
- player.giveItem(player, item);
- inv.update(player);
- }
- goto("checkgame");
- @player_pickup
- if(item.hasTag(bed_tag2, item)) {
- cancel = true;
- entity.remove(entity);
- }
- goto("checkgame");
- @item_air_click
- item_type = item.getType(living.getEquip(player, "hand"));
- if(item_type == "minecraft:gunpowder") {
- if(!map.contains(warpinghome_tick, player)) {
- player_uuid = player.getUuid(player);
- player.removeItem(player, warp_powder);
- player.giveItem(player, glowstone_dust);
- map.add(warpinghome_loc, player_uuid, entity.getLocation(player));
- map.add(warpinghome_tick, player_uuid, 0);
- list.add(warpinghome_list, player_uuid);
- sgoto(20, "warp_tick");
- goto("checkgame");
- }
- }
- if(item_type == "minecraft:glowstone_dust") {
- player_uuid = player.getUuid(player);
- map.remove(warpinghome_loc, player_uuid);
- map.remove(warpinghome_tick, player_uuid);
- player.removeItem(player, glowstone_dust);
- player.giveItem(player, warp_powder);
- }
- if(item_type == "minecraft:blaze_rod") {
- player_loc = entity.getLocation(player);
- team = map.get(players, player_name);
- item_type = map.get(glass_types, team);
- temp_loc = loc.mod(player_loc, 0, -1, 0);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 1, -1, 0);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, -1, 0);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, -1, 1);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, -1, -1);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, -1, -1);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 1, -1, 1);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 1, -1, -1);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, -1, 1);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 2, -1, 0);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -2, -1, 0);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, -1, 2);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, -1, -2);
- if(setBlockIfNotAir(temp_loc, item_type)) {
- list.add(placedblocks, temp_loc);
- }
- player.removeItem(player, blaze_rod);
- }
- goto("checkgame");
- @warp_tick
- player_uuid = list.getIndex(warpinghome_list, 0);
- player = player.get(player_uuid);
- if(player == null) {
- goto("checkgame");
- }
- list.removeIndex(warpinghome_list, 0);
- player_loc = entity.getLocation(player);
- warp_loc = map.get(warpinghome_loc, player_uuid);
- if(warp_loc == null) {
- goto("checkgame");
- }
- if(loc.distance(player_loc, warp_loc) > 1) {
- map.remove(warpinghome_loc, player_uuid);
- map.remove(warpinghome_tick, player_uuid);
- player.removeItem(player, glowstone_dust);
- player.giveItem(player, warp_powder);
- goto("checkgame");
- }
- tick = map.get(warpinghome_tick, player_uuid) + 1;
- sound.spawnForPlayer(player, trap_sound, sound_category_ambient);
- if(tick == 5) {
- map.remove(warpinghome_loc, player_uuid);
- map.remove(warpinghome_tick, player_uuid);
- player.removeItem(player, glowstone_dust);
- player_name = player.getName(player);
- tempteam = map.get(players, player_name);
- location = map.get(spawn_locs, tempteam);
- entity.teleport(player, location);
- goto("checkgame");
- }
- map.add(warpinghome_tick, player_uuid, tick);
- list.add(warpinghome_list, player_uuid);
- sgoto(20, "warp_tick");
- goto("checkgame");
- @player_move
- if(id == voidid) {
- living.damage(player, 300);
- goto("checkgame");
- }
- temploc = entity.getLocation(player);
- tempx = math.roundDown(loc.getX(temploc));
- tempy = math.roundDown(loc.getY(temploc));
- tempz = math.roundDown(loc.getZ(temploc));
- temploc = loc.new(gamesworld, tempx, tempy, tempz);
- if(block.getType(temploc) != "minecraft:tripwire") { //Für den Fall, dass die Trap bereits abgebaut wurde
- map.remove(traps, id);
- event.removeMoveData(id);
- goto("checkgame");
- }
- tempteam = map.get(players, player_name);
- trapteam = map.get(traps, id);
- if(tempteam == trapteam) {
- goto("checkgame");
- }
- msg.prefix(player, gamename, "§eYou triggered in a trap!!!");
- sound.spawnForPlayer(p, trap_sound, sound_category_ambient);
- teamlist = map.get(teamidtolist, trapteam);
- for(i = 0; i < list.getSize(teamlist); i++) {
- p = read.player(list.getIndex(teamlist, i));
- sound.spawnForPlayer(p, trap_sound, sound_category_ambient);
- msg.prefix(p, gamename, "§eOne of your traps got triggered!!!");
- }
- entity.addEffect(player, "blindness", 200, 1);
- entity.addEffect(player, "slowness", 200, 4);
- map.remove(traps, id);
- block.set(temploc, "minecraft:air");
- goto("checkgame");
- @block_place
- cancel = true;
- if(block.hasTag(bed_tag, block.get(block_loc))) {
- goto("checkgame");
- } elseif(block_type == "minecraft:tripwire") {
- tempid = event.addMoveData(block_loc, loc.mod(block_loc, 1, 0.25, 1), 5, -1);
- map.add(traps, tempid, map.get(players, player_name));
- }
- if(min_build_high != null && loc.getY(block_loc) <= min_build_high) {
- goto("checkgame");
- }
- cancel = false;
- list.add(placedblocks, block_loc);
- goto("checkgame");
- @block_break
- cancel = true;
- if(block_type == "minecraft:cobweb") {
- block.set(block_loc, "minecraft:air");
- } elseif(block.hasTag(bed_tag, block.get(block_loc))) {
- goto("breakbed");
- } elseif(block_type == "minecraft:iron_block") {
- player_item_type = item.getType(living.getEquip(player, "hand"));
- if(player_item_type == "minecraft:stone_pickaxe" || player_item_type == "minecraft:iron_pickaxe") {
- cancel = false;
- }
- } elseif(block_type == "minecraft:string") {
- cancel = false;
- } elseif(list.contains(placedblocks, block_loc)) {
- cancel = false;
- }
- goto("checkgame");
- @player_post_respawn
- tempteam = map.get(players, player_name);
- entity.setName(player, concat(map.get(colorcodes, tempteam), player_name));
- if(map.get(teambedbroken, tempteam)) {
- gosub("setdisplay");
- if(!checkPlayability(tempteam)) {
- goto("colorgameover");
- }
- }
- location = map.get(spawn_locs, tempteam);
- location2 = loc.mod(location, 0, 1, 0);
- block_type = block.getType(location);
- block_type2 = block.getType(location2);
- while(!(block.isAir(location) && block.isAir(location2))) {
- loc.add(location, 0, 1, 0);
- loc.add(location2, 0, 1, 0);
- }
- entity.teleport(player, location);
- goto("checkgame");
- @player_giveup
- @player_logout
- minigame.speakAll(gamename, concat(map.get(colorcodes, map.get(players, player_name)), player_name, " §ehas left the game."));
- tempteam = map.get(players, player_name);
- teamlist = map.get(teamidtolist, tempteam);
- list.remove(teamlist, player_name);
- map.add(playersinteam, tempteam, map.get(playersinteam, tempteam) - 1);
- map.remove(players, player_name);
- script = script.getFromId(script_id);
- minigame.kickplayer(script, player);
- gosub("setdisplay");
- if(!checkPlayability(tempteam)) {
- goto("colorgameover");
- }
- goto("checkgame");
- @living_pre_hurt
- cancel = true;
- tempplayerteam = map.get(players, player_name);
- tempcolor = map.get(colorcodes, tempplayerteam);
- sec_player = player.getFromDamageSource(damage_source);
- if(sec_player != null) {
- sec_player_name = player.getName(sec_player);
- teamlist = map.get(teamidtolist, tempplayerteam);
- if(!list.contains(teamlist, sec_player_name)) {
- cancel = false;
- }
- map.add(lastdamagers, player, map.new());
- tempmap = map.get(lastdamagers, player);
- map.add(tempmap, "sec_player", sec_player);
- map.add(tempmap, "time", time.getMillis());
- } else {
- cancel = false;
- }
- goto("checkgame");
- @living_death
- map.add(deaths, player_name, map.get(deaths, player_name) + 1);
- player.clearInventory(player);
- tempmap = map.get(lastdamagers, player);
- if(tempmap != null) {
- nowtime = time.getMillis();
- hittime = map.get(tempmap, "time");
- if(nowtime - hittime < 10000) { //Wenn seit Begegnung mehr als 10 Sekunden her sind, zählt sec_player nicht mehr
- sec_player = map.get(tempmap, "sec_player");
- }
- } else {
- sec_player = player.getFromDamageSource(damage_source);
- }
- if(sec_player == null) {
- minigame.speakAll(gamename, concat(tempcolor, concat(player_name, " §edied.")));
- } else {
- sec_player_name = player.getName(sec_player);
- tempoppcolor = map.get(colorcodes, map.get(players, sec_player_name));
- minigame.speakAll(gamename, concat(tempcolor, player_name, " §ehas been killed by ", tempoppcolor, sec_player_name, "."));
- map.add(allkills, sec_player_name, map.get(allkills, sec_player_name) + 1);
- }
- if(map.get(teambedbroken, tempplayerteam)) {
- goto("nobed");
- }
- goto("checkgame");
- @nobed
- money.addBoost(player, 32);
- minigame.speakAll(gamename, concat(tempcolor, player_name, " §ewoke up from their dream."));
- showstats(player, false, false);
- script = script.getFromId(script_id);
- minigame.kickplayer(script, player);
- teamlist = map.get(teamidtolist, map.get(players, player_name));
- list.remove(teamlist, player_name);
- map.remove(players, player_name);
- map.add(playersinteam, tempplayerteam, map.get(playersinteam, tempplayerteam) - 1);
- if(sec_player != null) {
- map.add(bedkills, sec_player_name, map.get(bedkills, sec_player_name) + 1);
- }
- if(!checkPlayability(tempplayerteam)) {
- tempteam = tempplayerteam;
- goto("colorgameover");
- }
- goto("checkgame");
- function checkPlayability(tempteam) {
- if(map.get($playersinteam, tempteam) == 0) {
- return false;
- }
- return true;
- }
- @colorgameover
- tempcolortext = map.get(teamcolortext, tempteam);
- minigame.speakAll(gamename, concat("§cThe ", tempcolortext, " §cteam has been eliminated."));
- list.remove(allteams, tempteam);
- if(list.getSize(allteams) == 1) {
- goto("gameover");
- }
- goto("checkgame");
- function showstats(player, show_time, won) { //Player player, Boolean show_time, Boolean won
- player_name = player.getName(player);
- player_id = player.getId(player);
- last_record = ranking.getPoints($rankingtable, player_id);
- playedgames = minigame.getPlayed(player_id, $game_short) + 1;
- minigame.setPlayed(player_id, $game_short, playedgames);
- points = last_record + map.get($bedkills, player_name);
- ranking.setPoints($rankingtable, player_id, points);
- p_deaths = map.get($deaths, player_name);
- p_allkills = map.get($allkills, player_name);
- p_bedkills = map.get($bedkills, player_name);
- bw.setAllKills(player, bw.getAllKills(player) + p_allkills);
-
- minigame.statsHeader(player, $gamename, "§e");
- if(show_time) {
- time = ($endtime - $starttime) / 1000;
- minigame.statsLine(player, "§e", "Time", concat(text.number(math.rounddown(time / 60)), " min ", text.number(math.round(time % 60)), " s"));
- }
- minigame.statsLine(player, "§e", "All-Kills", text.number(p_allkills));
- minigame.statsLine(player, "§e", "Bed-Kills", text.number(p_bedkills));
- minigame.statsLine(player, "§e", "Deaths", text.number(p_deaths));
- if(p_deaths != 0) {
- kd = p_allkills / p_deaths;
- minigame.statsLine(player, "§e", "K/D", text.number(math.roundComma(kd, 2)));
- }
- minigame.statsLine(player, "§e", "Destroyed beds", text.number(map.get($brokenbeds, player_name)));
- minigame.statsLine(player, "§e", "Played games", text.number(playedgames));
-
- wongames = minigame.getWon(player, "bw");
- if(won) {
- wongames++;
- minigame.setWon(player, "knock", wongames);
- }
- minigame.statsLine(player, "§e", "Won games", text.number(wongames));
- if(playedgames != 0) {
- minigame.statsLine(player, "§e", "Win ratio", concat(text.number(math.roundComma((wongames / playedgames) * 100, 2)), "%"));
- }
- }
- function bw.setAllKills(player_or_id, amount) {
- config = playerdata.getGames(player_or_id);
- config.set(config, "allbwkills", amount);
- config.saveAsync(config);
- }
- function bw.getAllKills(player_or_id) {
- config = playerdata.getGames(player_or_id);
- return config.getDouble(config, "allbwkills", 0);
- }
- function setBed(team) {
- facing = map.get($bed_facing, team);
- bed_type = map.get($bed_types, team);
- block.set(list.getIndex($foot_bed_loc, team), concat(bed_type, "[facing= ", facing, ", part=foot]"));
- block.set(list.getIndex($head_bed_loc, team), concat(bed_type, "[facing= ", facing, ", part=head]"));
- }
- @gameover
- endtime = time.getMillis();
- if(list.getSize(placedblocks) != 0) {
- for(i = 0; i < list.getSize(placedblocks); i++) {
- block.set(list.getIndex(placedblocks, i), "minecraft:air");
- }
- }
- entity.removeAll("net.minecraft.entity.item.ItemEntity", middleloc, radius);
- waitfor(1);
- winningteam = map.get(teamidtolist, list.getIndex(allteams, 0));
- for(i = 0; i < list.getSize(winningteam); i++) {
- player_name = list.getIndex(winningteam, i);
- player = read.player(player_name);
- money.addBoost(player, 128);
- msg.prefix(player, gamename, "§eYou won this game!");
- showstats(player, true, true);
- script = script.getFromId(script_id);
- minigame.kickplayer(script, player);
- }
- script = script.getFromId(script_id);
- minigame.term(script, gamesignloc);
- term();
- function setShopmenu1(shopmenu) {
- inv.setItem(shopmenu, 19, read.item("{id:\"minecraft:stick\",Count:1b,tag:{HideFlags:2,Enchantments:[{lvl:1s,id:\"minecraft:knockback\"}],display:{Name:'{\"text\":\"§bKnüppel\"}'},}}"));
- inv.setItem(shopmenu, 20, read.item("{id:\"minecraft:wooden_pickaxe\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:efficiency\"},{lvl:1s,id:\"minecraft:unbreaking\"}],HideFlags:2}}"));
- inv.setItem(shopmenu, 21, read.item("minecraft:smooth_sandstone", 32));
- inv.setItem(shopmenu, 22, read.item("{id:\"minecraft:leather_helmet\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}]}}"));
- inv.setItem(shopmenu, 23, read.item("{id:\"minecraft:leather_leggings\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}]}}"));
- inv.setItem(shopmenu, 24, read.item("{id:\"minecraft:leather_boots\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}]}}"));
- inv.setItem(shopmenu, 28, read.item("km:coin_copper", 8));
- inv.setItem(shopmenu, 29, read.item("km:coin_copper", 4));
- inv.setItem(shopmenu, 30, read.item("km:coin_copper", 16));
- inv.setItem(shopmenu, 31, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 32, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 33, read.item("km:coin_copper"));
- }
- function setShopmenu2(shopmenu) {
- inv.setItem(shopmenu, 19, read.item("minecraft:smooth_sandstone", 2));
- inv.setItem(shopmenu, 20, read.item("minecraft:end_stone"));
- inv.setItem(shopmenu, 21, read.item("minecraft:iron_block"));
- inv.setItem(shopmenu, 22, read.item("minecraft:chest"));
- inv.setItem(shopmenu, 23, read.item("minecraft:glass"));
- inv.setItem(shopmenu, 28, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 29, read.item("km:coin_copper", 7));
- inv.setItem(shopmenu, 30, read.item("km:coin_silver", 3));
- inv.setItem(shopmenu, 31, read.item("km:coin_silver"));
- inv.setItem(shopmenu, 32, read.item("km:coin_copper", 4));
- }
- function setShopmenu3(shopmenu) {
- inv.setItem(shopmenu, 19, read.item("{id:\"minecraft:leather_helmet\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}]}}"));
- inv.setItem(shopmenu, 20, read.item("{id:\"minecraft:leather_leggings\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}]}}"));
- inv.setItem(shopmenu, 21, read.item("{id:\"minecraft:leather_boots\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}]}}"));
- inv.setItem(shopmenu, 22, read.item("{id:\"minecraft:chainmail_chestplate\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}],display:{Name:'{\"text\":\"§f§bKettenbrust Lvl1\"}'}}}"));
- inv.setItem(shopmenu, 23, read.item("{id:\"minecraft:chainmail_chestplate\",Count:1b,tag:{Enchantments:[{lvl:2s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}],display:{Name:'{\"text\":\"§f§bKettenbrust Lvl2\"}'}}}"));
- inv.setItem(shopmenu, 24, read.item("{id:\"minecraft:chainmail_chestplate\",Count:1b,tag:{Enchantments:[{lvl:3s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:unbreaking\"}],display:{Name:'{\"text\":\"§f§bKettenbrust Lvl3\"}'}}}"));
- inv.setItem(shopmenu, 25, read.item("minecraft:shield"));
- inv.setItem(shopmenu, 28, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 29, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 30, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 31, read.item("km:coin_silver"));
- inv.setItem(shopmenu, 32, read.item("km:coin_silver", 3));
- inv.setItem(shopmenu, 33, read.item("km:coin_silver", 7));
- inv.setItem(shopmenu, 34, read.item("km:coin_silver", 4));
- }
- function setShopmenu4(shopmenu) {
- inv.setItem(shopmenu, 21, read.item("{id:\"minecraft:wooden_pickaxe\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:efficiency\"},{lvl:1s,id:\"minecraft:unbreaking\"}],HideFlags:2}}"));
- inv.setItem(shopmenu, 22, read.item("{id:\"minecraft:stone_pickaxe\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:efficiency\"},{lvl:1s,id:\"minecraft:unbreaking\"}],HideFlags:2}}"));
- inv.setItem(shopmenu, 23, read.item("{id:\"minecraft:iron_pickaxe\",Count:1b,tag:{Enchantments:[{lvl:3s,id:\"minecraft:efficiency\"},{lvl:1s,id:\"minecraft:unbreaking\"}],HideFlags:2}}"));
- inv.setItem(shopmenu, 30, read.item("km:coin_copper", 4));
- inv.setItem(shopmenu, 31, read.item("km:coin_silver", 2));
- inv.setItem(shopmenu, 32, read.item("km:coin_gold"));
- }
- function setShopmenu5(shopmenu) {
- inv.setItem(shopmenu, 20, read.item("{id:\"minecraft:stick\",Count:1b,tag:{HideFlags:2,Enchantments:[{lvl:1s,id:\"minecraft:knockback\"}],display:{Name:'{\"text\":\"§bKnüppel\"}'},}}"));
- inv.setItem(shopmenu, 21, read.item("{id:\"minecraft:golden_sword\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:sharpness\"},{lvl:1s,id:\"minecraft:unbreaking\"}],HideFlags:2,display:{Name:'{\"text\":\"§f§bGoldschwert Lvl1\"}'}}}"));
- inv.setItem(shopmenu, 22, read.item("{id:\"minecraft:wooden_axe\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:sharpness\"},{lvl:1s,id:\"minecraft:unbreaking\"}],HideFlags:2}}"));
- inv.setItem(shopmenu, 23, read.item("{id:\"minecraft:golden_sword\",Count:1b,tag:{Enchantments:[{lvl:2s,id:\"minecraft:sharpness\"},{lvl:1s,id:\"minecraft:unbreaking\"}],HideFlags:2,display:{Name:'{\"text\":\"§f§bGoldschwert Lvl2\"}'}}}"));
- inv.setItem(shopmenu, 24, read.item("{id:\"minecraft:iron_sword\",Count:1b,tag:{Enchantments:[{lvl:2s,id:\"minecraft:sharpness\"},{lvl:1s,id:\"minecraft:unbreaking\"},{lvl:1s,id:\"minecraft:knockback\"}],HideFlags:2}}"));
- inv.setItem(shopmenu, 29, read.item("km:coin_copper", 8));
- inv.setItem(shopmenu, 30, read.item("km:coin_silver"));
- inv.setItem(shopmenu, 31, read.item("km:coin_silver", 2));
- inv.setItem(shopmenu, 32, read.item("km:coin_silver", 3));
- inv.setItem(shopmenu, 33, read.item("km:coin_gold", 5));
- }
- function setShopmenu6(shopmenu) {
- inv.setItem(shopmenu, 20, read.item("{id:\"minecraft:bow\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:infinity\"}],display:{Name:'{\"text\":\"§f§bBogen Lvl1\"}'}}}"));
- inv.setItem(shopmenu, 21, read.item("{id:\"minecraft:bow\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:infinity\"},{lvl:1s,id:\"minecraft:power\"}],display:{Name:'{\"text\":\"§f§bBogen Lvl2\"}'}}}"));
- inv.setItem(shopmenu, 22, read.item("{id:\"minecraft:bow\",Count:1b,tag:{Enchantments:[{lvl:1s,id:\"minecraft:infinity\"},{lvl:1s,id:\"minecraft:power\"},{lvl:1s,id:\"minecraft:punch\"}],display:{\"text\":\"§f§bBogen Lvl3\"}}}"));
- inv.setItem(shopmenu, 23, read.item("minecraft:arrow"));
- inv.setItem(shopmenu, 24, read.item("minecraft:spectral_arrow"));
- inv.setItem(shopmenu, 29, read.item("km:coin_gold", 3));
- inv.setItem(shopmenu, 30, read.item("km:coin_gold", 7));
- inv.setItem(shopmenu, 31, read.item("km:coin_gold", 13));
- inv.setItem(shopmenu, 32, read.item("km:coin_gold"));
- inv.setItem(shopmenu, 33, read.item("km:coin_silver", 2));
- }
- function setShopmenu7(shopmenu) {
- inv.setItem(shopmenu, 20, read.item("minecraft:apple"));
- inv.setItem(shopmenu, 21, read.item("minecraft:cooked_porkchop"));
- inv.setItem(shopmenu, 22, read.item("minecraft:cake"));
- inv.setItem(shopmenu, 23, read.item("minecraft:golden_apple"));
- inv.setItem(shopmenu, 29, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 30, read.item("km:coin_copper", 2));
- inv.setItem(shopmenu, 31, read.item("km:coin_silver"));
- inv.setItem(shopmenu, 32, read.item("km:coin_gold", 2));
- }
- function setShopmenu8(shopmenu) {
- inv.setItem(shopmenu, 19, read.item("{id:\"minecraft:potion\",Count:1b,tag:{Potion:\"minecraft:healing\"}}"));
- inv.setItem(shopmenu, 20, read.item("{id:\"minecraft:potion\",Count:1b,tag:{Potion:\"minecraft:strong_healing\"}}"));
- inv.setItem(shopmenu, 21, read.item("{id:\"minecraft:potion\",Count:1b,tag:{Potion:\"minecraft:strong_leaping\"}}"));
- inv.setItem(shopmenu, 22, read.item("{id:\"minecraft:potion\",Count:1b,tag:{Potion:\"minecraft:swiftness\"}}"));
- inv.setItem(shopmenu, 23, read.item("{id:\"minecraft:potion\",Count:1b,tag:{Potion:\"minecraft:strength\"}}"));
- inv.setItem(shopmenu, 24, read.item("{id:\"minecraft:splash_potion\",Count:1b,tag:{Potion:\"minecraft:weakness\"}}"));
- inv.setItem(shopmenu, 28, read.item("km:coin_silver", 3));
- inv.setItem(shopmenu, 29, read.item("km:coin_silver", 5));
- inv.setItem(shopmenu, 30, read.item("km:coin_silver", 7));
- inv.setItem(shopmenu, 31, read.item("km:coin_silver", 16));
- inv.setItem(shopmenu, 32, read.item("km:coin_gold", 7));
- inv.setItem(shopmenu, 33, read.item("km:coin_gold", 10));
- }
- function setShopmenu9(shopmenu) {
- inv.setItem(shopmenu, 18, read.item("minecraft:ladder"));
- inv.setItem(shopmenu, 19, read.item("minecraft:cobweb"));
- inv.setItem(shopmenu, 20, read.item("minecraft:fishing_rod"));
- inv.setItem(shopmenu, 21, read.item("minecraft:flint_and_steel"));
- inv.setItem(shopmenu, 22, read.item("minecraft:ender_pearl"));
- inv.setItem(shopmenu, 23, read.item("{id:\"minecraft:string\",Count:1b,tag:{display:{Lore:['{\"text\":\"Warnt dich vor angreifenden Gegnern\"}'],Name:'{\"text\":\"§rTrap\"}'}}}"));
- inv.setItem(shopmenu, 24, read.item("{id:\"minecraft:red_bed\",Count:1b,tag:{display:{Lore:['{\"text\":\"Setzt dein Bett einmalig neu\"}'],Name:'{\"text\":\"§rNeues Bett\"}'}}}"));
- inv.setItem(shopmenu, 25, $blaze_rod);
- inv.setItem(shopmenu, 26, $warp_powder);
-
- inv.setItem(shopmenu, 27, read.item("km:coin_copper"));
- inv.setItem(shopmenu, 28, read.item("km:coin_copper", 16));
- inv.setItem(shopmenu, 29, read.item("km:coin_silver", 6));
- inv.setItem(shopmenu, 30, read.item("km:coin_silver", 7));
- inv.setItem(shopmenu, 31, read.item("km:coin_gold", 13));
- inv.setItem(shopmenu, 32, read.item("km:coin_silver", 7));
- inv.setItem(shopmenu, 33, read.item("km:coin_gold", 40));
- inv.setItem(shopmenu, 34, read.item("km:coin_gold", 3));
- inv.setItem(shopmenu, 35, read.item("km:coin_silver", 3));
- }
- function bedwars.getTeamColor(player) {
- team = map.get($players, player.getName(player));
- color = map.get($colorcodes, team);
- return color;
- }
|