Pārlūkot izejas kodu

bug fixes and features

mloeschenkohl 2 gadi atpakaļ
vecāks
revīzija
218af8d524

+ 1 - 1
docu_minecraft.php

@@ -4636,7 +4636,7 @@
         <tr>
             <td class="bold">Arguments</td>
 			 <td>
-				damage_name = inFire, lightningBolt, onFire, lava, hot_floor, inWall, cramming, drown, starve, cactus, fall, fyIntoWall, outOfWorld, generic, magic, wither, anvil, falling_block, dragon_breath, dryout, sweet_berry_bush
+				damage_name = inFire, lightningBolt, onFire, lava, hot_floor, inWall, cramming, drown, starve, cactus, fall, flyIntoWall, outOfWorld, generic, magic, wither, anvil, falling_block, dragon_breath, dryout, sweet_berry_bush
 				<br><br>
                 creative: boolean, true also deals damage in creative mode<br>
                 armor: boolean, true ignores armor<br>

+ 3 - 1
stop.txt

@@ -6,7 +6,9 @@ msg("SERVER", "§4The server will stop soon!!!");
 
 @wait
 wait();
-cancel = true;
+if(event == "player_login") {
+	ban.kick(player, "Serverneustart");
+}
 goto("wait");
 
 @announce

+ 5 - 5
story/admont/core.txt

@@ -47,22 +47,22 @@ goto(label);
 @stage1
 @stage2
 if(event == "block_drop") {
-	if(block_type == "minecraft:wheat") {
+	if(block_type == "km:rwheat") {
 		list.clear(drops);
 		list.add(drops, read.item("minecraft:wheat"));
 	}
 	goto("wait");
 }
 if(event == "block_break") {
-	if(block_type == "minecraft:wheat") {
+	if(block_type == "km:rwheat") {
 		cancel = false;
-		scheduler.setBlock(60, block_loc, "minecraft:wheat[age=7]", false);
+		scheduler.setBlock(60, block_loc, "km:rwheat[age=7]", false);
 		wheat_harvestet++;
 		if(t == wheat_needed) {
 			stage.increase(player);
 		}
 	}
-	if(block_type == "minecraft:carrots") {
+	if(block_type == "km:rcarrots") {
 		item.drop(block_loc, read.item("minecraft:carrot"));
 		cancel = true;
 		carrots_harvestet++;
@@ -103,4 +103,4 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		}
 	}
 }
-goto("wait");
+goto("wait");

+ 5 - 5
story/admont/in_eile.txt

@@ -42,16 +42,16 @@ if(event == "quest_start") {
 	goto("wait");
 }
 if(event == "block_drop") {
-	if(block_type == "minecraft:wheat") {
+	if(block_type == "km:rwheat") {
 		list.clear(drops);
 		list.add(drops, read.item("minecraft:wheat"));
 	}
 	goto("wait");
 }
 if(event == "block_break") {
-	if(block_type == "minecraft:wheat") {
+	if(block_type == "km:rwheat") {
 		cancel = false;
-		scheduler.setBlock(60, block_loc, "minecraft:wheat[age=7]", false);
+		scheduler.setBlock(60, block_loc, "km:rwheat[age=7]", false);
 	}
 }
 label = concat("stage", text.number(stage));
@@ -59,7 +59,7 @@ goto(label);
 
 @stage0
 if(event == "block_break") {
-	if(block_type == "minecraft:wheat") {
+	if(block_type == "km:rwheat") {
 		wheat_harvestet++;
 		if(wheat_harvestet == wheat_needed) {
 			stage.increase(player);
@@ -84,4 +84,4 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		}
 	}
 }
-goto("wait");
+goto("wait");

+ 4 - 4
story/admont/spezialwunsch.txt

@@ -67,7 +67,7 @@ goto("wait");
 
 @stage1
 if(event == "block_drop") {
-	if(block_type == "minecraft:wheat") {
+	if(block_type == "km:rwheat") {
 		r = math.random(0, 4);
 		list.clear(drops);
 		if(r == 0) {
@@ -83,9 +83,9 @@ if(event == "block_drop") {
 	goto("wait");
 }
 if(event == "block_break") {
-	if(block_type == "minecraft:wheat") {
+	if(block_type == "km:rwheat") {
 		cancel = false;
-		scheduler.setBlock(60, block_loc, "minecraft:wheat[age=7]", false);
+		scheduler.setBlock(60, block_loc, "km:rwheat[age=7]", false);
 	}
 }
 goto("wait");
@@ -104,4 +104,4 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		}
 	}
 }
-goto("wait");
+goto("wait");

+ 110 - 3
survival/trader.txt

@@ -1,6 +1,36 @@
 event.load("entity_click");
 
 beer = read.item("{id:\"minecraft:player_head\",Count:1b,tag:{SkullOwner:{Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDE2OGI5ODA5OGEwYzRhMjllMjA0NjcwNDYzMDkxZGI2MDcwZTc3ZDg2NzY5ZDk4NWY2YmVmNDA3NWU1In19fQ==\"}]},Id:[I;-919099029,-843296815,-1978014726,-1632767213]},display:{Name:'{\"text\":\"§FBeer\"}'}}}");
+bread = read.item("{id:\"minecraft:player_head\",Count:1b,tag:{SkullOwner:{Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjM0ODdkNDU3ZjkwNjJkNzg3YTNlNmNlMWM0NjY0YmY3NDAyZWM2N2RkMTExMjU2ZjE5YjM4Y2U0ZjY3MCJ9fX0=\"}]},Id:[I;-1486995616,574768169,-1899053858,2001973348]},display:{Name:'{\"text\":\"§FBread\"}'}}}");
+
+gem = read.item("{id:\"km:flawless_gem_stone\",Count:1b,tag:{color:16724530,display:{Name:'{\"text\":\"§fRuby\"}'}}}");
+gem2 = read.item("{id:\"km:flawless_gem_stone\",Count:1b,tag:{color:3289855,display:{Name:'{\"text\":\"§fSapphire\"}'}}}");
+gem3 = read.item("{id:\"km:flawless_gem_stone\",Count:1b,tag:{color:13664802,display:{Name:'{\"text\":\"§fAmber\"}'}}}");
+
+potion = read.item("{id:\"minecraft:splash_potion\",Count:1b,tag:{CustomPotionEffects:[{Duration:400,Id:7b,Amplifier:100b}],Potion:\"minecraft:haste\",HideFlags:32,display:{Name:'{\"text\":\"§f?\"}'}}}");
+
+haste = read.item("{id:\"minecraft:potion\",Count:1b,tag:{CustomPotionEffects:[{Duration:2400,Id:3b,Amplifier:10b}],Potion:\"minecraft:water\",HideFlags:32,display:{Name:'{\"text\":\"§f?\"}'}}}");
+
+allPotion = read.item("{id:\"minecraft:splash_potion\",Count:1b,tag:{CustomPotionEffects:[{Id:2b,Amplifier:5,Duration:4000},
+{Id:3b,Amplifier:5,Duration:4000},{Id:4b,Amplifier:5,Duration:4000},{Id:5b,Amplifier:5,Duration:4000},
+{Id:6b,Amplifier:5,Duration:4000},{Id:7b,Amplifier:5,Duration:4000},{Id:8b,Amplifier:5,Duration:4000},{Id:9b,Amplifier:5,Duration:4000},
+{Id:10b,Amplifier:5,Duration:4000},{Id:11b,Amplifier:5,Duration:4000},{Id:12b,Amplifier:5,Duration:4000},
+{Id:13b,Amplifier:5,Duration:4000},{Id:14b,Amplifier:5,Duration:4000},{Id:15b,Amplifier:5,Duration:4000},
+{Id:16b,Amplifier:5,Duration:4000},{Id:17b,Amplifier:5,Duration:4000},{Id:18b,Amplifier:5,Duration:4000},{Id:19b,Amplifier:5,Duration:4000},
+{Id:20b,Amplifier:5,Duration:4000},{Id:21b,Amplifier:5,Duration:4000},{Id:22b,Amplifier:5,Duration:4000},{Id:23b,Amplifier:5,Duration:4000},
+{Id:24b,Amplifier:5,Duration:4000},{Id:25b,Amplifier:5,Duration:4000},{Id:26b,Amplifier:5,Duration:4000},
+{Id:27b,Amplifier:5,Duration:4000},{Id:28b,Amplifier:5,Duration:4000},{Id:29b,Amplifier:5,Duration:4000},{Id:30b,Amplifier:5,Duration:4000},
+{Id:31b,Amplifier:5,Duration:4000},{Id:32b,Amplifier:5,Duration:4000}],Potion:\"minecraft:water\",HideFlags:32,display:{Name:'{\"text\":\"§f?\"}'}}}");
+
+luck = read.item("{id:\"minecraft:potion\",Count:1b,tag:{CustomPotionEffects:[{Duration:4000,Id:26b,Amplifier:10b}],CustomPotionColor:-1,HideFlags:32,display:{Name:'{\"text\":\"§f?\"}'}}}");
+
+shoes = read.item("{id:\"minecraft:leather_boots\",Count:1b,tag:{Damage:0,Unbreakable:true,AttributeModifiers:[{Amount:0.05d,Slot:\"feet\",AttributeName:\"minecraft:generic.movement_speed\",Operation:0,UUID:[I;-1627331844,-30521448,-1360471230,-1311904412],Name:\"modifier\"},{Amount:5.0d,Slot:\"feet\",AttributeName:\"minecraft:generic.armor\",Operation:0,UUID:[I;-612079395,-1084076439,-1744757549,-2121804326],Name:\"modifier\"},{Amount:5.0d,Slot:\"feet\",AttributeName:\"minecraft:generic.armor_toughness\",Operation:0,UUID:[I;-1566388608,-438480955,-1765800095,-545656105],Name:\"modifier\"},{Amount:0.5d,Slot:\"feet\",AttributeName:\"minecraft:generic.knockback_resistance\",Operation:0,UUID:[I;-1622175420,2006337245,-1584430816,-684382346],Name:\"modifier\"}],Enchantments:[{lvl:1s,id:\"minecraft:mending\"},{lvl:5s,id:\"minecraft:protection\"}],display:{color:1908001,Name:'{\"text\":\"§bKajetans Boots\"}'}}}");
+
+chest = read.item("{id:\"minecraft:leather_chestplate\",Count:1b,tag:{Damage:0,Unbreakable:true,AttributeModifiers:[{Amount:5.0d,Slot:\"chest\",AttributeName:\"minecraft:generic.attack_speed\",Operation:0,UUID:[I;1519699211,1805468698,-1388730959,-1429896422],Name:\"modifier\"},{Amount:5.0d,Slot:\"chest\",AttributeName:\"minecraft:generic.armor\",Operation:0,UUID:[I;-612079395,-1084076439,-1744757549,-2121804326],Name:\"modifier\"},{Amount:5.0d,Slot:\"chest\",AttributeName:\"minecraft:generic.armor_toughness\",Operation:0,UUID:[I;-1566388608,-438480955,-1765800095,-545656105],Name:\"modifier\"},{Amount:0.5d,Slot:\"chest\",AttributeName:\"minecraft:generic.knockback_resistance\",Operation:0,UUID:[I;-1622175420,2006337245,-1584430816,-684382346],Name:\"modifier\"}],Enchantments:[{lvl:5s,id:\"minecraft:protection\"},{lvl:1s,id:\"minecraft:mending\"}],display:{color:1908001,Name:'{\"text\":\"§bKajetans Tunic\"}'}}}");
+
+head = read.item("{id:\"minecraft:leather_helmet\",Count:1b,tag:{Damage:0,Unbreakable:true,AttributeModifiers:[{Amount:5.0d,Slot:\"head\",AttributeName:\"minecraft:generic.armor\",Operation:0,UUID:[I;-612079395,-1084076439,-1744757549,-2121804326],Name:\"modifier\"},{Amount:5.0d,Slot:\"head\",AttributeName:\"minecraft:generic.armor_toughness\",Operation:0,UUID:[I;-1566388608,-438480955,-1765800095,-545656105],Name:\"modifier\"},{Amount:0.5d,Slot:\"head\",AttributeName:\"minecraft:generic.knockback_resistance\",Operation:0,UUID:[I;-1622175420,2006337245,-1584430816,-684382346],Name:\"modifier\"}],Enchantments:[{lvl:1s,id:\"minecraft:mending\"},{lvl:5s,id:\"minecraft:protection\"}],display:{color:1908001,Name:'{\"text\":\"§bKajetans Cap\"}'}}}");
+
+pants = read.item("{id:\"minecraft:leather_leggings\",Count:1b,tag:{Damage:0,Unbreakable:true,AttributeModifiers:[{Amount:20.0d,Slot:\"legs\",AttributeName:\"minecraft:generic.max_health\",Operation:0,UUID:[I;1709570009,-771079995,-2041363815,-1876593610],Name:\"modifier\"},{Amount:5.0d,Slot:\"legs\",AttributeName:\"minecraft:generic.armor\",Operation:0,UUID:[I;-612079395,-1084076439,-1744757549,-2121804326],Name:\"modifier\"},{Amount:5.0d,Slot:\"legs\",AttributeName:\"minecraft:generic.armor_toughness\",Operation:0,UUID:[I;-1566388608,-438480955,-1765800095,-545656105],Name:\"modifier\"},{Amount:0.5d,Slot:\"legs\",AttributeName:\"minecraft:generic.knockback_resistance\",Operation:0,UUID:[I;-1622175420,2006337245,-1584430816,-684382346],Name:\"modifier\"}],Enchantments:[{lvl:1s,id:\"minecraft:mending\"},{lvl:5s,id:\"minecraft:protection\"}],display:{color:11546150,Name:'{\"text\":\"§bKajetans Pants\"}'}}}");
 
 msg("dev", "§bTrader §rloaded.");
 @wait
@@ -29,9 +59,86 @@ if(event == "entity_click") {
 		shop.open(shop, player, shop_name);
 		goto("wait");
 	}
-	if(entity_name == "Baker") {
-		//shop.open(shop_2, player, shop_name);
+	if(entity_name == "Berta") {
+		shop = shop.new();
+		buy_item = read.item("km:coin_copper", 16);
+		shop.addOffer(shop, buy_item, bread, 999);
+		shop.open(shop, player, shop_name);
+		goto("wait");
+	}
+	if(entity_name == "Hans") {
+		shop = shop.new();
+		shop.addOffer(shop, read.item("minecraft:string", 2), read.item("km:coin_copper", 3), 999);
+		shop.addOffer(shop, read.item("minecraft:rotten_flesh", 1), read.item("km:coin_copper", 1), 999);
+		shop.addOffer(shop, read.item("minecraft:bone", 2), read.item("km:coin_copper", 3), 999);
+		shop.addOffer(shop, read.item("minecraft:gunpowder", 1), read.item("km:coin_copper", 3), 999);
+		shop.addOffer(shop, read.item("minecraft:ender_pearl", 1), read.item("km:coin_copper", 8), 999);
+		shop.open(shop, player, shop_name);
+		goto("wait");
+	}
+	if(entity_name == "Frieda") {
+		shop = shop.new();
+		shop.addOffer(shop, read.item("km:coin_silver", 4), read.item("km:cherry_sapling", 1), 999);
+		shop.addOffer(shop, read.item("km:coin_silver", 2), read.item("km:apricot_sapling", 1), 999);
+		shop.addOffer(shop, read.item("km:coin_silver", 2), read.item("km:pear_sapling", 1), 999);
+		shop.addOffer(shop, read.item("km:coin_silver", 2), read.item("km:plum_sapling", 1), 999);
+		shop.open(shop, player, shop_name);
+		goto("wait");
+	}
+	if(entity_name == "Bartholomäus Tilg") {
+		shop = shop.new();
+		shop.addOffer(shop, read.item("minecraft:diamond", 2), read.item("km:coin_silver", 3), 999);
+		shop.addOffer(shop, gem3, read.item("km:coin_gold", 1), 999);
+		shop.addOffer(shop, gem2, read.item("km:coin_gold", 2), 999);
+		shop.addOffer(shop, gem, read.item("km:coin_gold", 5), 999);
+		//shop.addOffer(shop, read.item("km:coin_gold", 1), gem3, 999);
+		//shop.addOffer(shop, read.item("km:coin_gold", 2), gem2, 999);
+		//shop.addOffer(shop, read.item("km:coin_gold", 5), gem, 999);
+		shop.open(shop, player, shop_name);
+		goto("wait");
+	}
+	if(entity_name == "Alchemis Bartl") {
+		shop = shop.new();
+		shop.addOffer(shop, read.item("minecraft:glass_bottle", 3), read.item("km:coin_copper", 10), 999);
+		shop.addOffer(shop, read.item("minecraft:nether_wart", 1), read.item("km:coin_copper", 2), 999);
+		shop.addOffer(shop, read.item("minecraft:sugar", 2), read.item("km:coin_copper", 1), 999);
+		shop.addOffer(shop, read.item("minecraft:spider_eye", 1), read.item("km:coin_copper", 10), 999);
+		shop.addOffer(shop, read.item("minecraft:blaze_powder", 1), read.item("km:coin_copper", 10), 999);
+		shop.addOffer(shop, read.item("minecraft:magma_cream", 1), read.item("km:coin_copper", 30), 999);
+		shop.addOffer(shop, read.item("minecraft:redstone", 1), read.item("km:coin_copper", 1), 999);
+		shop.addOffer(shop, read.item("minecraft:glowstone_dust", 1), read.item("km:coin_copper", 5), 999);
+		shop.addOffer(shop, read.item("minecraft:phantom_membrane", 1), read.item("km:coin_copper", 40), 999);
+		shop.addOffer(shop, read.item("minecraft:ghast_tear", 1), read.item("km:coin_copper", 55), 999);
+		shop.addOffer(shop, read.item("minecraft:rabbit_foot", 1), read.item("km:coin_silver", 1), 999);
+		shop.addOffer(shop, read.item("minecraft:golden_carrot", 1), read.item("km:coin_silver", 1), 999);
+		shop.addOffer(shop, read.item("minecraft:glistering_melon_slice", 1), read.item("km:coin_silver", 1), 999);
+		shop.addOffer(shop, read.item("minecraft:turtle_helmet", 1), read.item("km:coin_silver", 5), 999);
+		shop.addOffer(shop, read.item("km:coin_copper", 3), read.item("minecraft:bone", 1), 999);
+		shop.open(shop, player, shop_name);
+		goto("wait");
+	}
+	if(entity_name == "Sven") {
+		shop = shop.new();
+		shop.addOffer(shop, read.item("km:coin_copper", 30), read.item("minecraft:experience_bottle", 1), 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 8), potion, 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 1), haste, 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 64), allPotion, 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 2), luck, 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 35), head, 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 40), chest, 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 40), pants, 999);
+		shop.addOffer(shop, read.item("km:coin_gold", 40), shoes, 999);
+		shop.open(shop, player, shop_name);
+		goto("wait");
+	}
+	if(entity_name == "Alfred Nabel") {
+		shop = shop.new();
+		shop.addOffer(shop, read.item("km:coin_copper", 6), read.item("minecraft:gunpowder", 1), 999);
+		shop.addOffer(shop, read.item("km:coin_copper", 40), read.item("minecraft:tnt", 1), 999);
+		shop.addOffer(shop, read.item("km:coin_copper", 2), read.item("minecraft:paper", 1), 999);
+		shop.addOffer(shop, read.item("km:coin_copper", 20), read.item("minecraft:fire_charge", 1), 999);
+		shop.open(shop, player, shop_name);
 		goto("wait");
 	}
 }
-goto("wait");
+goto("wait");

+ 12 - 3
system/chat.txt

@@ -40,8 +40,8 @@ list.add(drowndeaths, concat(colorcodedeath, " drowned."));
 list.add(drowndeaths, concat(colorcodedeath, " drank too much water."));
 list.add(drowndeaths, concat(colorcodedeath, " didn't grow gills fast enough."));
 list.add(drowndeaths, concat(colorcodedeath, " wanted to visit cthulhu."));
-list.add(drowndeaths, concat(colorcodedeath, " forgot he was in survival."));
-list.add(drowndeaths, concat(colorcodedeath, " believed he can fly."));
+list.add(drowndeaths, concat(colorcodedeath, " forgot they were in survival."));
+list.add(drowndeaths, concat(colorcodedeath, " believed they can fly."));
 
 falldeaths = list.new();
 list.add(falldeaths, concat(colorcodedeath, " fell victim to gravitation."));
@@ -54,6 +54,14 @@ list.add(falldeaths, concat(colorcodedeath, " forgot their RedBull."));
 firedeaths = list.new();
 list.add(firedeaths, concat(colorcodedeath, " looks hot today."));
 
+flydeaths = list.new();
+list.add(flydeaths, concat(colorcodedeath, " wanted to be a pilot."));
+list.add(flydeaths, concat(colorcodedeath, " is now a mashed potato."));
+list.add(flydeaths, concat(colorcodedeath, " returns to their nest."));
+list.add(flydeaths, concat(colorcodedeath, " made a crash landing."));
+list.add(flydeaths, concat(colorcodedeath, " needs a flight training."));
+list.add(flydeaths, concat(colorcodedeath, " was cast from heaven."));
+
 //andere damagecauses: fall, outOfWorld, arrow, drown (ertrinken), player, inWall, mob, magic, starve
 causetolist = map.new();
 map.add(causetolist, "fall", falldeaths);
@@ -61,6 +69,7 @@ map.add(causetolist, "drown", drowndeaths);
 map.add(causetolist, "inFire", firedeaths);
 map.add(causetolist, "onFire", firedeaths);
 map.add(causetolist, "lava", firedeaths);
+map.add(causetolist, "flyIntoWall", flydeaths);
 map.add(causetolist, "player", list.new());
 
 setScriptVar("rank_playtime_list", list.new());
@@ -113,7 +122,7 @@ if(!silentjoin) {
 
 player_loc = entity.getLocation(player);
 //Inventory
-inv.loadFromPlayer(player, player, loc.getWorld(player_loc));
+//inv.loadFromPlayer(player, player, loc.getWorld(player_loc));
 //Keks geben, wenn man als einziger Spieler auf den Server joint und im Survival-Mode ist und der letzte Keks seit 5 Minuten vergeben wurde
 if(players.getAmount() == 1) {
 	if(!loc.isInGamesWorld(player_loc)) {

+ 36 - 15
system/commands.txt

@@ -151,7 +151,8 @@ command.register("unmute", "Unmutes a player");
 command.register("user", "Returns infos about a user");
 command.register("vanish", "Vanishes a player");
 command.register("var", "Reads variables from a scripts");
-command.register("vote", "Show vote rewars");
+command.register("vote", "Show vote links");
+command.register("voteshop", "Show vote rewars");
 command.register("voxel", "Set radius for voxel");
 command.register("warn", "Warns a player");
 command.register("warp", "Warp-Commands");
@@ -284,7 +285,7 @@ setScriptVar("ha_data_lists", map.new());
 setScriptVar("ha_undo_lists", map.new());
 money.setBoostFactor(1);
 
-sgoto(10, "coordsloop");
+sgoto(100, "coordsloop");
 sgoto(1200, "afk_checker_loop");
 
 lag_list = list.new();
@@ -696,6 +697,7 @@ if(event == "inv_click") {
 			player.setVotePoints(player, vp - 6);
 			msg("online", "§6§k#§rMoney Booster activated!!!§6§k#");
 			money.setBoostFactor(2);
+			status.addTimed("online", 56, 12000, "Money Booster");
 			sgoto(12000, "resetMoneyBoost");
 		}
 		goto("wait");
@@ -714,7 +716,6 @@ if(event == "inv_click") {
 			msg.prefix(player, prefix_commands, "Already voted.");
 			goto("wait");
 		}
-		set.add(skip_night_set, player_uuid);
 		if(!skip_night_started) {
 			world.addTimedStatus(world, 49, 300, "Skip night?");
 			msg.survival("[§6Commands§r] Skip night? Vote within 15 seconds.");
@@ -728,16 +729,19 @@ if(event == "inv_click") {
 		if(inv_slot == 0) {
 			skip_night_yes++;
 			inv.close(player);
+			set.add(skip_night_set, player_uuid);
 			goto("wait");
 		}
 		if(inv_slot == 1) {
 			skip_night_no_care++;
 			inv.close(player);
+			set.add(skip_night_set, player_uuid);
 			goto("wait");
 		}
 		if(inv_slot == 2) {
 			skip_night_no++;
 			inv.close(player);
+			set.add(skip_night_set, player_uuid);
 			goto("wait");
 		}
 		goto("wait");
@@ -1760,6 +1764,13 @@ msg.prefix(player, "§dScript", concat(var_name, " = ", var));
 goto("wait");
 
 @vote
+link1 = "https://minecraft-server.eu/vote/index/2227F";
+link2 = "https://minecraft-server-list.com/server/478200/vote/";
+msg(player, "[", prefix_vote, "§r] ", text.link(link1, link1));
+msg(player, "[", prefix_vote, "§r] ", text.link(link2, link2));
+goto("wait");
+
+@voteshop
 inv.open(vote_inv, player, concat("Your vote points: §6", text.number(player.getVotePoints(player))));
 goto("wait");
 
@@ -3039,6 +3050,7 @@ if(size != 1) {
 	msg(sender, " - creative");
 	msg(sender, " - damage");
 	msg(sender, " - doors");
+	msg(sender, " - fixitems");
 	msg(sender, " - friends");
 	msg(sender, " - games");
 	msg(sender, " - harvest");
@@ -3106,6 +3118,13 @@ elseif(arg0 == "doors") {
 	}
 	script.startNamed("Doors", "utils/u_error", "system/doors", "utils/u_general");
 }
+elseif(arg0 == "fixitems") {
+	script = script.get("Fixitems");
+	if(script != null) {
+		script.term(script);
+	}
+	script.startNamed("Fixitems", "utils/u_error", "system/fixitems");
+}
 elseif(arg0 == "games") {
 	script = script.get("Gamecenter");
 	if(script != null) {
@@ -3999,7 +4018,7 @@ for(i = 0; i < size; i++) {
 	p = list.getIndex(list, i);
 	full_name = player.getFullName(p);
 	if(player.isAfk(p)) {
-		full_name = concat("§7§m", removeFormat(full_name));
+		full_name = concat(full_name, " §5§o[Afk]");
 	}
 	msg(sender, full_name);
 }
@@ -6478,7 +6497,7 @@ msg.prefix(p, prefix_commands, concat("You can now fly for ", text.number(sec),
 player.setFly(p, true);
 duration = sec * 20;
 data.setTimer(p, "fly", duration);
-status.addTimed(player, 53, duration, "Fly");
+status.addTimed(player, 55, duration, "Fly");
 goto("wait");
 
 @fly
@@ -6567,20 +6586,20 @@ if(size >= 4) {
 } else {
 	world = loc.getWorld(entity.getLocation(player));
 }
-if(x < -17000) {
-	x = -17000;
-} elseif(x > 17000) {
-	x = 17000;
+if(x < -32000) {
+	x = -32000;
+} elseif(x > 32000) {
+	x = 32000;
 }
 if(y < 0) {
 	y = 0;
 } elseif(y > 255) {
 	y = 255;
 }
-if(z < -17000) {
-	z = -17000;
-} elseif(z > 17000) {
-	z = 17000;
+if(z < -32000) {
+	z = -32000;
+} elseif(z > 32000) {
+	z = 32000;
 }
 location = loc.new(world, x, y, z);
 if(size == 5) {
@@ -8109,6 +8128,7 @@ function setCommandHelps() {
 	commandhelp.add("live");
 	commandhelp.add("hack");
 	commandhelp.add("vote");
+	commandhelp.add("voteshop");
 	
 	commandhelp.addChildPlayer("mute");
 	commandhelp.addChildPlayer("unmute");
@@ -8160,6 +8180,7 @@ function setCommandHelps() {
 	command.addHelpChild(help, command.newHelpLiteral("creative"));
 	command.addHelpChild(help, command.newHelpLiteral("damage"));
 	command.addHelpChild(help, command.newHelpLiteral("doors"));
+	command.addHelpChild(help, command.newHelpLiteral("fixitems"));
 	command.addHelpChild(help, command.newHelpLiteral("harvest"));
 	command.addHelpChild(help, command.newHelpLiteral("hawkeye"));
 	command.addHelpChild(help, command.newHelpLiteral("herobrine"));
@@ -8262,9 +8283,9 @@ function setCommandHelps() {
 	command.addHelp(help);
 	
 	help = command.newHelp("tppos", "tppos");
-	helpArg0 = command.newHelpInt("x", -17000, 17000);
+	helpArg0 = command.newHelpInt("x", -32000, 32000);
 	helpArg1 = command.newHelpInt("y", 0, 1000);
-	helpArg2 = command.newHelpInt("z", -17000, 17000);
+	helpArg2 = command.newHelpInt("z", -32000, 32000);
 	helpArg3 = command.newHelpString("world", false);
 	helpArg4 = command.newHelpSpecial("Player", "player");
 	command.addHelpChild(helpArg3, helpArg4);

+ 8 - 0
system/fixitems.txt

@@ -34,6 +34,14 @@ if(event == "inv_click") {
 		if(item_type == "minecraft:air") {
 			goto("wait");
 		}
+		//flawless gemstone ignorieren
+		if(item_type == "km:flawless_gem_stone") {
+			goto("wait");
+		}
+		//potion ignorieren
+		if(item_type == "minecraft:potion" || item_type == "minecraft:splash_potion" || item_type == "minecraft:lingering_potion") {
+			goto("wait");
+		}
 		//Quell-item kopieren
 		item_amount = item.getAmount(item);
 		new_item = read.item(item_type, item_amount);

+ 2 - 2
system/lectern.txt

@@ -30,7 +30,7 @@ map.add(max_ench_lvl, enchantment.get("sharpness"), 10);
 map.add(max_ench_lvl, enchantment.get("knockback"), 5);
 map.add(max_ench_lvl, enchantment.get("fire_aspect"), 2);
 map.add(max_ench_lvl, enchantment.get("looting"), 5);
-map.add(max_ench_lvl, enchantment.get("sweeping_edge"), 5);
+map.add(max_ench_lvl, enchantment.get("sweeping"), 5);
 map.add(max_ench_lvl, enchantment.get("power"), 5);
 map.add(max_ench_lvl, enchantment.get("punch"), 5);
 map.add(max_ench_lvl, enchantment.get("impaling"), 5);
@@ -187,7 +187,7 @@ if(lectern_action == 0) {
 		betrag += level * 100 + extra;
 	}
 	if(!hasEnoughMoney(player.getId(player), betrag)) {
-		msg.prefix(player, prefix_money, concat("Not enough coins in inventory. This action costs ", text.number(betrag), " snuvis."));
+		msg.prefix(player, prefix_money, concat("Not enough snuvis in inventory. This action costs ", text.number(betrag), " snuvis."));
 		goto("wait");
 	}
 	subMoney(player, betrag);

+ 1 - 0
system/perms.txt

@@ -70,6 +70,7 @@ perm.registerGroup(0, "warp");
 perm.registerGroup(0, "nextplayer");;
 perm.registerGroup(0, "user");
 perm.registerGroup(0, "vote");
+perm.registerGroup(0, "voteshop");
 perm.registerGroup(0, "startgame");
 perm.registerGroup(0, "infopoint1");
 perm.registerGroup(0, "infopoint2");

+ 1 - 1
system/scheduler.txt

@@ -75,5 +75,5 @@ while(hasNext(iter)) {
 		remove(iter);
 	}
 }
-sgoto(1, "loop");
+sgoto(2, "loop");
 wait();

+ 46 - 3
system/survival.txt

@@ -1,4 +1,5 @@
 event.load("entity_click");
+event.load("container_click");
 event.load("inv_click");
 event.load("player_pre_respawn");
 event.load("player_post_respawn");
@@ -37,6 +38,7 @@ items_list = list.new(); //Array-List: Alle Items mit Rezepten
 recipe_site_map = map.new();
 tp_list = list.new();
 tp_map = map.new();
+tp_set = set.new();
 afk_loop_map = map.new();
 death_loc_map = map.new();
 survival_respawn = set.new();
@@ -44,7 +46,20 @@ survival_respawn = set.new();
 overworld = world.getOverWorld();
 moveid_storyspawn = event.addMoveData(loc.new(overworld, 167, 70, 241), loc.new(overworld, 169, 72, 243), 5, -1);
 moveid_gamesspawn = event.addMoveData(loc.new(overworld, 219, 66, 253), loc.new(overworld, 223, 69, 258), 5, -1);
+
 move_id_afk_loop = event.addMoveData(loc.new(overworld, 208, 69, 226), loc.new(overworld, 209, 69.5, 227), 5, -1);
+move_id_afk_loop_2 = event.addMoveData(loc.new(overworld, 208, 62, 242), loc.new(overworld, 209, 62.5, 243), 5, -1);
+move_id_afk_loop_3 = event.addMoveData(loc.new(overworld, 210, 62, 242), loc.new(overworld, 211, 62.5, 243), 5, -1);
+move_id_afk_loop_4 = event.addMoveData(loc.new(overworld, 206, 62, 246), loc.new(overworld, 207, 62.5, 247), 5, -1);
+move_id_afk_loop_5 = event.addMoveData(loc.new(overworld, 212, 62, 246), loc.new(overworld, 213, 62.5, 247), 5, -1);
+
+afk_loop_ids = set.new();
+set.add(afk_loop_ids, move_id_afk_loop);
+set.add(afk_loop_ids, move_id_afk_loop_2);
+set.add(afk_loop_ids, move_id_afk_loop_3);
+set.add(afk_loop_ids, move_id_afk_loop_4);
+set.add(afk_loop_ids, move_id_afk_loop_5);
+
 config = getScriptVar("server_config");
 survival_spawn = read.location(config.getString(config, "surv_spawn", "games:0:0:0"));
 adventure_chest_loc = loc.new(overworld, 177, 74, 237);
@@ -235,7 +250,7 @@ if(event == "player_move") {
 		player.teleport(player, world.getGamesSpawn(), false);
 		goto("wait");
 	}
-	if(id == move_id_afk_loop) {
+	if(set.contains(afk_loop_ids, id)) {
 		player_uuid = player.getUuid(player);
 		now_time = time.getMillis();
 		time = map.getOrDefault(afk_loop_map, player_uuid, 0);
@@ -361,6 +376,23 @@ if(hand == "OFF_HAND") {
 }
 if(entity.getType(entity) == "human") {
 	entity_name = entity.getName(entity);
+	if(entity_name == "Administrador\n§cmarvinius") {
+		item = living.getHand(player);
+		item_name = item.getName(item);
+		if(removeFormat(item_name) == "Beer") {
+			msg.prefix(player, "§cmarvinius", "Prost!");
+		}
+		goto("wait");
+	}
+	if(entity_name == "Administrador\n§cMentorMentos") {
+		item = living.getHand(player);
+		item_name = item.getName(item);
+		if(removeFormat(item_name) == "Beer") {
+			msg.prefix(player, "§cMentorMentos", "Folg mir auf Twitch! ");
+			msg(player, text.link("Klick mich an :D","https://www.twitch.tv/Mentor_Mentos"));
+		}
+		goto("wait");
+	}
 	if(entity_name == "Info-Point") {
 		msg(player, getSpacer());
 		msg(player, text.click("§r [§cclick§r] [§eSurvival§r]", "/infopoint1"));
@@ -406,7 +438,7 @@ if(entity.getType(entity) == "human") {
 			offerRank(player, "rank.adventurer");
 		}
 		removeAdventureDisplay(player);
-		player.safeGiveItem(player, coin_silver);
+		money.addBoost(player, 8192);
 		goto("wait");
 	}
 }
@@ -418,6 +450,13 @@ if(player.isOnAdventure(player)) {
 }
 goto("wait");
 
+@container_click
+player_uuid = player.getUuid(player);
+if(set.contains(tp_set, player_uuid)) {
+	cancel = true;
+}
+goto("wait");
+
 @inv_click
 cancel = true;
 if(inv_id == bankinvid) { //Bankmenü
@@ -680,6 +719,7 @@ if(block_type == "minecraft:cobweb") {
 	cobweb_X = loc.getX(location);
 	cobweb_Y = loc.getY(location);
 	cobweb_Z = loc.getZ(location);
+	cobweb_radius = 1;
 	unbreaking_level = enchantment.getLevel(ench_unbreaking, hand_item);
 	for(a = -cobweb_radius; a < cobweb_radius + 1; a++) {
 		loc.setX(location, cobweb_X + a);
@@ -820,12 +860,14 @@ if(block_type == "minecraft:chest") {
 				tp_loc = loc.mod(tp_loc, 0, 1, 0);
 				setTpWallX(block_loc, "minecraft:lime_stained_glass");
 				sound.spawn(block_loc, piston_sound, sound_category_ambient);
+				player_uuid = player.getUuid(player);
 				array = array.new(4);
-				array[0] = player.getUuid(player);
+				array[0] = player_uuid;
 				array[1] = block_loc;
 				array[2] = tp_loc;
 				array[3] = true;
 				list.add(tp_list, array);
+				set.add(tp_set, player_uuid);
 				sgoto(30, "tp_ticker");
 			}
 			goto("wait");
@@ -1004,6 +1046,7 @@ player_uuid = array[0];
 block_loc = array[1];
 tp_loc = array[2];
 adventure = array[3];
+set.remove(tp_set, player_uuid);
 sound.spawn(block_loc, piston_sound, sound_category_ambient);
 setTpWallFull(block_loc, "minecraft:air");
 player = player.get(player_uuid);

+ 22 - 0
test2.txt

@@ -0,0 +1,22 @@
+p = read.player("kajetanjohannes");
+z = entity.spawn("spider", entity.getLocation(p));
+entity.addEffect(z, "minecraft:speed", 999999, 10);
+entity.addEffect(z, "minecraft:regeneration", 999999, 3);
+entity.addEffect(z, "minecraft:strength", 999999, 12);
+entity.addEffect(z, "minecraft:fire_resistance", 999999, 1);
+living.setMaxHealth(z, 1000);
+living.heal(z, 2000);
+
+/*sgoto(3, "wusi");
+time = time.getMillis() + 100;
+msg("dev", "start");
+while(time.getMillis() < time) {
+    msg("dev", time.getMillis(), " ", time);
+}
+msg("dev", "end");
+wait();
+term();
+
+@wusi
+msg("dev", "yes");*/
+

+ 6 - 0
utils/u_games.txt

@@ -406,6 +406,12 @@ function player.resetMinigames(player) {
 }
 
 function player.hasMinigameId(player, script_id) {
+	if(player == null) {
+		return false;
+	}
+	if(script_id == null) {
+		return false;
+	}
 	set = player.getMinigameIds(player);
 	return set.contains(set, script_id);
 }

+ 22 - 15
utils/u_general.txt

@@ -469,7 +469,7 @@ function player.changeInv(player, from_world, to_world) {
 	}
 	if(word.isSurvName(to_world_name)) {
 		if(player.hasFly(player)) {
-			scheduler.addFly(1, player, true);
+			scheduler.addFly(2, player, true);
 		}
 	}
 }
@@ -481,12 +481,16 @@ function player.changeGamemode(player, to_world_name) {
 				gm = "creative";
 			} else {
 				gm = "adventure";
-				scheduler.addFly(1, player, true);
+				scheduler.addFly(2, player, true);
 			}
 		} else {
 			gm = "survival";
 		}
 		player.setGamemode(player, gm);
+		duration = data.getTimer(player, "fly");
+		if(word.isSurvName(to_world_name) && duration > 0) {
+			scheduler.addFly(2, player, true);
+		}
 	}
 }
 function inv.saveForPlayer(sec_player, for_player_or_id, world) {
@@ -516,7 +520,7 @@ function inv.saveForPlayer(sec_player, for_player_or_id, world) {
 		item_string = text.item(inv.getItem(inv, i));
 		config.set(config, concat("slot-", i), item_string);
 	}
-	ender_inv = player.getInv(sec_player);
+	ender_inv = player.getEnderInv(sec_player);
 	for(i = 0; i < 27; i++) {
 		item_string = text.item(inv.getItem(ender_inv, i));
 		config.set(config, concat("eslot-", i), item_string);
@@ -562,11 +566,11 @@ function inv.loadFromPlayer(sec_player, from_player_or_id, world) {
 			inv.setItem(inv, i, item);
 		}
 	}
-	for(i = 0; i <= 26; i++) {
+	for(i = 0; i < 27; i++) {
 		item_string = config.getString(config, concat("eslot-", i), "minecraft:air");
 		item = read.item(item_string);
 		if(item != null) {
-			ender_inv = player.getInv(sec_player);
+			ender_inv = player.getEnderInv(sec_player);
 			inv.setItem(ender_inv, i, item);
 		}
 	}
@@ -1767,16 +1771,15 @@ function player.getFullName(player) {
 
 function player.setTabName(player) {
 	nickname = player.getNickname(player);
-	if(player.isAfk(player)) {
-		tab_name = concat("§7§m", nickname);
+	rank = getRank(player);
+	if(text.startswith(rank, "§", 0)) {
+		colorcode = text.subString(rank, 0, 2);
+		tab_name = concat(colorcode, nickname);
 	} else {
-		rank = getRank(player);
-		if(text.startswith(rank, "§", 0)) {
-			colorcode = text.subString(rank, 0, 2);
-			tab_name = concat(colorcode, nickname);
-		} else {
-			tab_name = nickname;
-		}
+		tab_name = nickname;
+	}
+	if(player.isAfk(player)) {
+		tab_name = concat(tab_name, " §5§o[Afk]");
 	}
 	if(player.isLive(player)) {
 		tab_name = concat(tab_name, " §f[§dLive§f]");
@@ -2291,7 +2294,11 @@ function block.gotWater(block, block_type, block_loc) {
 	if(block_type == "minecraft:water") {
 		return true;
 	}
-	return block.property.getValue(block_loc, block.getProperty("waterlogged"));
+	value = block.property.getValue(block_loc, block.getProperty("waterlogged"));
+	if(value == null) {
+		return false;
+	}
+	return value;
 }
 
 function block.getSecondDoor(door_loc_1) {