mloeschenkohl 2 years ago
parent
commit
64b4105336

+ 0 - 0
system/hawkeye_old.txt → Archiv/system/hawkeye_old.txt


+ 4 - 0
docu_minecraft.php

@@ -4358,6 +4358,10 @@
             <td class="bold">Format</td>
             <td>entity.hasTag(entity, tag as string)</td>
         </tr>
+        <tr>
+			<td class="bold">Info</td>
+            <td>default entity-tags: no_tick, mod_spawned</td>
+        </tr>
     </table>
     <table>
         <tr>

+ 299 - 0
jan/tictactoe.txt

@@ -0,0 +1,299 @@
+event.load("block_place");
+event.load("block_click");
+
+tic_tac_toe_blocks = list.new();
+
+games_world = world.getGames();
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 148, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 149, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 150, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 148, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 149, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 150, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 148, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 149, -49));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 150, -49));
+
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 148, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 149, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 150, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 148, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 149, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 150, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 148, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 149, -50));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 150, -50));
+
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 148, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 149, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -430, 150, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 148, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 149, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -431, 150, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 148, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 149, -51));
+list.add(tic_tac_toe_blocks, loc.new(games_world, -432, 150, -51));
+
+winning_blocks = list.new();
+playing_players = list.new();
+
+ttt_start_loc_list = list.new();
+list.add(ttt_start_loc_list, loc.new(games_world, -427, 147, -50));
+list.add(ttt_start_loc_list, loc.new(games_world, -431, 147, -54));
+list.add(ttt_start_loc_list, loc.new(games_world, -435, 147, -50));
+list.add(ttt_start_loc_list, loc.new(games_world, -435, 147, -46));
+
+@start
+for(a = 0; a < list.getSize(tic_tac_toe_blocks); a++){
+	block.set(list.getIndex(tic_tac_toe_blocks, a), "minecraft:air");
+}
+goto("wait");
+
+@wait
+wait();
+
+if(event == "block_click"){
+	if(list.contains(ttt_start_loc_list, block_loc)){
+		list.add(playing_players, player);
+	}
+}
+if(event == "block_place"){
+	if(list.contains(playing_players, player)){
+		if(is.tictactoe_placeable(block_loc)){
+			if(is.triplet(block_loc)){
+				goto("tic_tac_toe_win");
+			}		
+		}else{
+			cancel = true;
+		}
+	}
+}
+goto("wait");
+
+@tic_tac_toe_win
+msg(player, "You won.");
+for(a = 0; a < list.getSize(tic_tac_toe_blocks); a++){
+	block.set(list.getIndex(tic_tac_toe_blocks, a), "minecraft:air");
+}
+list.add(winning_blocks, block_loc);
+for(a = 0; a < list.getSize(winning_blocks); a++){
+	block.set(list.getIndex(winning_blocks, a), "minecraft:red_wool");
+}
+list.clear(winning_blocks);
+list.clear(playing_players);
+goto("wait");
+
+
+function is.tictactoe_placeable(block_loc){
+	if(!list.contains($tic_tac_toe_blocks, block_loc)){
+		return false;
+	}
+	loc.addY(block_loc, -1);
+	if(block.isAir(block_loc)){
+		loc.addY(block_loc, 1);
+		return false;
+	}else{
+		loc.addY(block_loc, 1);
+	}
+	return true;
+}
+
+function is.triplet(block_loc){
+	if(triplet.straight(block_loc)){
+		return true;
+	}
+	if(triplet.cross(block_loc)){
+		return true;
+	}
+	if(triplet.cross_cross(block_loc)){
+		return true;
+	}
+	else{
+		return false;
+	}
+}
+
+function triplet.straight(block_loc){
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	loc.addX(block_loc, -2);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addX(block_loc, 1);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addX(block_loc, 2);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addX(block_loc, 1);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addX(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	loc.addY(block_loc, -2);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addY(block_loc, 1);	
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addY(block_loc, 2);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addY(block_loc, 1);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addY(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	loc.addZ(block_loc, -2);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addZ(block_loc, 1);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addZ(block_loc, 2);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addZ(block_loc, 1);
+	temp_block_count = temp_block_count + is.blockType(block_loc);
+	loc.addZ(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	return false;
+}
+
+function triplet.cross(block_loc){
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2, 0,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 0, 1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2, 0, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 0, 1));
+	loc.addX(block_loc, -2);
+	loc.addZ(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2, 0, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 0,-1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2, 0,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 0,-1));
+	loc.addX(block_loc, -2);
+	loc.addZ(block_loc, 2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0,-2,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0, 1, 1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0, 2, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0, 1, 1));
+	loc.addY(block_loc, -2);
+	loc.addZ(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0,-2, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0, 1,-1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0, 2,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 0, 1,-1));
+	loc.addY(block_loc, -2);
+	loc.addZ(block_loc, 2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2,-2, 0));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 1, 0));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2, 2, 0));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 1, 0));
+	loc.addY(block_loc, -2);
+	loc.addX(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2,-2, 0));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-1, 1, 0));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2, 2, 0));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-1, 1, 0));
+	loc.addY(block_loc, -2);
+	loc.addX(block_loc, 2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	return false;
+}
+
+function triplet.cross_cross(block_loc){
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2,-2,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 1, 1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2, 2, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 1, 1));
+	loc.addY(block_loc, -2);
+	loc.addX(block_loc, -2);
+	loc.addZ(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2,-2,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-1, 1, 1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2, 2, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-1, 1, 1));
+	loc.addY(block_loc, -2);
+	loc.addX(block_loc, 2);
+	loc.addZ(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2, 2,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1,-1, 1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2,-2, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1,-1, 1));
+	loc.addY(block_loc, 2);
+	loc.addX(block_loc, -2);
+	loc.addZ(block_loc, -2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	temp_block_count = 1;
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc,-2,-2, 2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 1,-1));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 2, 2,-2));
+	temp_block_count = temp_block_count + is.blockType(t_loc_add(block_loc, 1, 1,-1));
+	loc.addY(block_loc, -2);
+	loc.addX(block_loc, -2);
+	loc.addZ(block_loc, 2);
+	if(temp_block_count > 2){
+		return true;
+	}
+	list.clear($winning_blocks);
+	return false;
+}
+
+function t_loc_add(block_loc, x, y, z){
+	loc.add(block_loc,x, y ,z);
+	return block_loc;
+}
+
+function is.blockType(block_loc){
+	if(block.getType(block_loc) == $block_type){
+		list.add($winning_blocks, block_loc);
+		return 1;
+	}else{
+		return 0;
+	}
+}

+ 1 - 0
startscript.txt

@@ -40,6 +40,7 @@ script.startNamed("Recipes", "survival/recipes");
 script.startNamed("Timber", "utils/u_error", "survival/timber", "utils/u_general");
 script.startNamed("Loom", "utils/u_error", "survival/loom", "utils/u_general");
 script.startNamed("Lectern", "utils/u_error", "survival/lectern", "utils/u_general");
+script.startNamed("Mobarena", "utils/u_error", "survival/mobarena", "utils/u_general");
 script.startNamed("TipLoop", "utils/u_error", "system/tiploop", "utils/u_general");
 script.startNamed("Gamerules", "system/gamerules");
 script.startNamed("Scheduler", "utils/u_error", "system/scheduler", "utils/u_general");

+ 50 - 38
survival/gemstones.txt

@@ -3,6 +3,7 @@ event.load("inv_click");
 event.load("inv_close");
 
 amber = item.getAmber();
+ruby = item.getRuby();
 air = item.getAir();
 arrow_right = read.item("km:arrow_right", 1, "§fConvert");
 prefix_commands = "§6Commands";
@@ -24,7 +25,7 @@ tag_leggings = item.getTag("km:leggings");
 tag_boots = item.getTag("km:boots");
 tag_hammer = item.getTag("km:hammer");
 
-msg("dev", "§bAmber §rloaded.");
+msg("dev", "§bGemstones §rloaded.");
 @wait
 wait();
 if(event == "entity_click") {
@@ -82,46 +83,57 @@ if(event == "inv_click") {
 			msg.prefix(player, prefix_commands, "Third slot is not a hammer.");
 			goto("wait");
 		}
+		if(item.hasTag(tag_helmet, item_0)) {
+			slot = slot_head;
+		} elseif(item.hasTag(tag_chestplate, item_0)) {
+			slot = slot_chest;
+		} elseif(item.hasTag(tag_leggings, item_0)) {
+			slot = slot_legs;
+		} elseif(item.hasTag(tag_boots, item_0)) {
+			slot = slot_feet;
+		} else {
+			msg.prefix(player, prefix_commands, "First slot is not an armor part.");
+			goto("wait");
+		}
+		if(item.getAmount(item_0) != 1) {
+			msg.prefix(player, prefix_commands, "Only one armor part allowed.");
+			goto("wait");
+		}
+		max_damage = item.getMaxDamage(item_2);
+		new_damage = item.getDamage(item_2) + 50;
+		if(new_damage > max_damage + 1) {
+			msg.prefix(player, prefix_commands, "Hammer has not enough durability.");
+			goto("wait");
+		}
 		//which gemstone
-		if(item.isAmber(item_1)) {
-			if(item.hasTag(tag_helmet, item_0)) {
-				slot = slot_head;
-			} elseif(item.hasTag(tag_chestplate, item_0)) {
-				slot = slot_chest;
-			} elseif(item.hasTag(tag_leggings, item_0)) {
-				slot = slot_legs;
-			} elseif(item.hasTag(tag_boots, item_0)) {
-				slot = slot_feet;
-			} else {
-				msg.prefix(player, prefix_commands, "First slot is not an armor part.");
-				goto("wait");
-			}
-			if(item.getAmount(item_0) != 1) {
-				msg.prefix(player, prefix_commands, "Only one armor part allowed.");
-				goto("wait");
-			}
-			max_damage = item.getMaxDamage(item_2);
-			new_damage = item.getDamage(item_2) + 50;
-			if(new_damage > max_damage + 1) {
-				msg.prefix(player, prefix_commands, "Hammer has not enough durability.");
-				goto("wait");
-			}
-			if(new_damage > max_damage) {
-				inv.setItem(inv, 2, air);
-				//playsound
-			}
-			item.setDamage(item_2, new_damage);
-			if(!item.hasAttributes(item_0)) {
-				item.addDefaultTags(item_0);
-			}
-			item.addAttribute(item_0, "generic.movement_speed", slot, 0.02, 0);
-			inv.setItem(inv, 0, air);
-			inv.setItem(inv, 1, air);
-			inv.setItem(inv, 4, item_0);
-			inv.update(player);
+		if(item.isRuby(item_1)) {
+			att_type = "generic.max_health";
+			att_amount = 2;
+		}
+		elseif(item.isSapphire(item_1)) {
+			att_type = "generic.armor";
+			att_amount = 1;
+		}
+		elseif(item.isAmber(item_1)) {
+			att_type = "generic.movement_speed";
+			att_amount =  0.02;
+		} else {
+			msg.prefix(player, prefix_commands, "Second slot needs to be one Gemstone (Amber, Ruby, ...).");
 			goto("wait");
 		}
-		msg.prefix(player, prefix_commands, "Second slot needs to be one Gemstone (like an Amber).");
+		if(new_damage > max_damage) {
+			inv.setItem(inv, 2, air);
+			//playsound
+		}
+		item.setDamage(item_2, new_damage);
+		if(!item.hasAttributes(item_0)) {
+			item.addDefaultTags(item_0);
+		}
+		item.addAttribute(item_0, att_type, slot, att_amount, 0);
+		inv.setItem(inv, 0, air);
+		inv.setItem(inv, 1, air);
+		inv.setItem(inv, 4, item_0);
+		inv.update(player);
 	}
 }
 goto("wait");

+ 229 - 0
survival/mobarena.txt

@@ -0,0 +1,229 @@
+event.load("player_move");
+event.load("living_death");
+event.load("entity_join");
+
+x1 = 1000;
+y1 = 0;
+z1 = 1000;
+x2 = 1153;
+y2 = 56;
+z2 = 1129;
+
+overworld = world.getOverworld();
+loc1 = loc.new(overworld, x1, y1, z1);
+loc2 = loc.new(overworld, x2, y2, z2);
+cooldown = 400; //3 exe per minute
+arena_id = event.addMoveData(loc1, loc2, cooldown, -1);
+
+spawns = list.new();
+list.add(spawns, loc.new(overworld, 1030, 20, 1039));
+list.add(spawns, loc.new(overworld, 1051, 28, 1083));
+list.add(spawns, loc.new(overworld, 1008, 23, 1092));
+list.add(spawns, loc.new(overworld, 1082, 25, 1118));
+list.add(spawns, loc.new(overworld, 1087, 21, 1050));
+list.add(spawns, loc.new(overworld, 1072, 23, 1021));
+list.add(spawns, loc.new(overworld, 1135, 21, 1071));
+list.add(spawns, loc.new(overworld, 1125, 21, 1088));
+
+bosses = list.new();
+list.add(bosses, "zombie");
+list.add(bosses, "spider");
+list.add(bosses, "cave_spider");
+list.add(bosses, "wither_skeleton");
+list.add(bosses, "rabbit");
+list.add(bosses, "magma_cube");
+
+entities_list = list.new();
+iron_sword = read.item("minecraft:iron_sword");
+copper_coin = read.item("km:coin_copper");
+silver_coin = read.item("km:coin_silver");
+ruby = item.getRuby();
+
+msg("dev", "§bMobarena §rloaded.");
+@main
+wait();
+if(event == "player_move") {
+	if(id == arena_id) {
+		spawnArenaMob();
+	}
+	goto("main");
+}
+if(event == "living_death") {
+	player = player.getFromDamageSource(damage_source);
+	if(player == null) {
+		goto("main");
+	}
+	ent_loc = entity.getLocation(living_entity);
+	world_name = world.getName(loc.getWorld(ent_loc));
+	if(world_name != "overworld") {
+		goto("main");
+	}
+	x = loc.getX(ent_loc);
+	z = loc.getZ(ent_loc);
+	if(x < x1 || x > x2) {
+		goto("main");
+	}
+	if(z < z1 || z > z2) {
+		goto("main");
+	}
+	r = math.random(1, 200);
+	if(r == 1) {
+		item.drop(ent_loc, ruby);
+	}
+	if(entity.hasTag(living_entity, "mod_spawned")) {
+		item.drop(ent_loc, silver_coin);
+	} else {
+		item.drop(ent_loc, copper_coin);
+	}
+	goto("main");
+}
+if(event == "entity_join") {
+	if(!isLiving(entity)) {
+		goto("main");
+	}
+	entity_type = entity.getType(entity);
+	if(entity_type != "creeper") {
+		goto("main");
+	}
+	ent_loc = entity.getLocation(entity);
+	world_name = world.getName(loc.getWorld(ent_loc));
+	if(world_name != "overworld") {
+		goto("main");
+	}
+	x = loc.getX(ent_loc);
+	y = loc.getY(ent_loc);
+	z = loc.getZ(ent_loc);
+	if(x < x1 || x > x2) {
+		goto("main");
+	}
+	if(y < y1 || y > y2) {
+		goto("main");
+	}
+	if(z < z1 || z > z2) {
+		goto("main");
+	}
+	cancel = true;
+	goto("main");
+}
+goto("main");
+
+function spawnArenaMob() {
+	loc = getRandomLoc();
+	boss = getRandomBoss();
+	if(boss == "rabbit") {
+		entity = entity.spawn(boss, loc, "{RabbitType:99}");
+	} else {
+		entity = entity.spawn(boss, loc);
+	}
+	if(boss == "zombie") {
+		living.setPersistentMaxHealth(entity, 200);
+		living.setHealth(entity, 200);
+		living.setPersistentAttackDamage(entity, 10);
+		living.setEquip(entity, "hand", $iron_sword);
+		living.setPersistentKnockbackResistance(entity, 3);
+		living.setPersistentFollowRange(entity, 50);
+		living.setPersistentAttackKnockback(entity, 10);
+	}
+	elseif(boss == "wither_skeleton") {
+		living.setPersistentMaxHealth(entity, 250);
+		living.setHealth(entity, 250);
+		living.setPersistentAttackDamage(entity, 15);
+		living.setEquip(entity, "hand", $iron_sword);
+		living.setPersistentKnockbackResistance(entity, 3);
+		living.setPersistentFollowRange(entity, 50);
+		living.setPersistentAttackKnockback(entity, 10);
+	}
+	elseif(boss == "spider") {
+		living.setPersistentMaxHealth(entity, 150);
+		living.setHealth(entity, 150);
+		living.setPersistentAttackDamage(entity, 8);
+		living.setPersistentKnockbackResistance(entity, 2);
+		living.setPersistentFollowRange(entity, 50);
+		living.setPersistentAttackKnockback(entity, 5);
+	}
+	elseif(boss == "cave_spider") {
+		living.setPersistentMaxHealth(entity, 100);
+		living.setHealth(entity, 100);
+		living.setPersistentAttackDamage(entity, 7);
+		living.setPersistentKnockbackResistance(entity, 2);
+		living.setPersistentFollowRange(entity, 50);
+		living.setPersistentAttackKnockback(entity, 5);
+	}
+	elseif(boss == "rabbit") {
+		living.setPersistentMaxHealth(entity, 50);
+		living.setHealth(entity, 50);
+		living.setPersistentAttackDamage(entity, 6);
+		living.setPersistentKnockbackResistance(entity, 2);
+		living.setPersistentFollowRange(entity, 50);
+		living.setPersistentAttackKnockback(entity, 5);
+	}
+	elseif(boss == "magma_cube") {
+		living.setPersistentMaxHealth(entity, 50);
+		living.setHealth(entity, 50);
+		living.setPersistentAttackDamage(entity, 6);
+		living.setPersistentKnockbackResistance(entity, 2);
+		living.setPersistentFollowRange(entity, 50);
+		living.setPersistentAttackKnockback(entity, 5);
+	}
+	list.add($entities_list, entity);
+	sgoto(2, "sgoto_updateEntityName");
+	//living.setEquip(entity, );
+	//living.setMaxHealth(entity, );
+	//living.setAttackKnockback(entity, );
+	//living.setAttackDamage(entity, );
+	//living.setAttackSpeed(entity, );
+	//living.setFollowRange(entity, );
+	//living.setArmor(entity, );
+	//living.setArmorThoughness(entity, );
+	//living.setMovementSpeed(entity, );
+	//living.setKnockbackResistance(entity, );
+}
+
+@sgoto_updateEntityName
+iter = list.iterator(entities_list);
+while(hasNext(iter)) {
+	updateEntityName(next(iter));
+}
+list.clear(entities_list);
+goto("main");
+
+function getRandomLoc() {
+	index = math.random(0, list.getSize($spawns) - 1);
+	return list.getIndex($spawns, index);
+}
+
+function getRandomBoss() {
+	index = math.random(0, list.getSize($bosses) - 1);
+	return list.getIndex($bosses, index);
+}
+
+function updateEntityName(living_entity) {
+	entity_name = entity.getName(living_entity);
+	max_health = living.getMaxHealth(living_entity);
+	health = text.number(math.round(living.getHealth(living_entity)));
+	max_health = text.number(math.roundComma(max_health, 1));
+	
+	heart_index = text.indexOf(entity_name, "❤", 0);
+	if(heart_index == -1) {
+		//Kein Herz gefunden
+		setEntityName(living_entity, health, max_health, entity_name);
+		return;
+	}
+		
+	next_new_line = text.indexOf(entity_name, "\n", heart_index);
+	if(next_new_line == -1) {
+		//Rechts vom Herz keine New-Line gefunden
+		setEntityName(living_entity, health, max_health, null);
+		return;
+	}
+	entity_name = text.subString(entity_name, next_new_line + 1, text.length(entity_name));
+	setEntityName(living_entity, health, max_health, entity_name);
+}
+
+function setEntityName(living_entity, health, max_health, entity_name) {
+	if(entity_name == null) {
+		entity.setName(living_entity, concat(health, "/", max_health, " §c❤"), false);
+		return;
+	}
+	entity.setName(living_entity, concat(health, "/", max_health, " §c❤\n", entity_name), false);
+}

+ 5 - 5
survival/survival.txt

@@ -20,7 +20,7 @@ skill.add("Keep Inventory", "skill.subcu_inv", "minecraft:chest", "Keeps the inv
 skill.add("Comeback", "skill.comeback", "km:skill55", "Respawn at your death location", 100, false, false, true);
 skill.add("Head Hunter", "skill.head_human", "minecraft:player_head", "Drops a player's head with a 20% chance if you kill a player (5% if a staff member is killed)", 1000, true, false, false);
 skill.add("Mobheads", "skill.head_monster", "minecraft:zombie_head", "Drops a mobs's head with a 20% chance (zombie / skeleton / creeper)", 500, true, false, false);
-skill.add("Fly 10min", "skill.fly10min", "minecraft:elytra", "You can fly for 10 minutes", 500, false, true, false);
+skill.add("Fly 10min", "skill.fly10min", "minecraft:elytra", "You can fly for 10 minutes", 4096, false, true, false);
 skill.add("Grow", "skill.grow", "minecraft:farmland", "Grow seeds in radius 5", 25, false, true, false);
 skill.add("Haste", "skill.haste", "minecraft:iron_pickaxe", "Haste for 2 minutes", 25, false, true, false);
 skill.add("Speed", "skill.speed", "minecraft:iron_boots", "Speed for 2 minutes", 25, false, true, false);
@@ -558,15 +558,15 @@ if(inv_id == bankinvid) { //Bankmenü
 				silver_amount = math.roundDown(betrag / 64);
 				copper_amount = math.roundDown(betrag % 64);
 				coin_item = read.item("km:coin_gold", gold_amount);
-				player.giveItem(player, coin_item);
+				player.safeGiveItem(player, coin_item);
 				coin_item = read.item("km:coin_silver", silver_amount);
-				player.giveItem(player, coin_item);
+				player.safeGiveItem(player, coin_item);
 				coin_item = read.item("km:coin_copper", copper_amount);
-				player.giveItem(player, coin_item);
+				player.safeGiveItem(player, coin_item);
 			} else {
 				item = inv.getItem(bankmenu, inv_slot);
 				new_item = read.item(item.getType(item), item.getAmount(item) * factor);
-				player.giveItem(player, new_item);
+				player.safeGiveItem(player, new_item);
 			}
 			inv.update(player);
 		}

+ 23 - 5
survival/trader.txt

@@ -25,13 +25,30 @@ allPotion = read.item("{id:\"minecraft:splash_potion\",Count:1b,tag:{CustomPotio
 
 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\"}'}}}");
+shoes = read.item("{id:\"minecraft:leather_boots\",Count:1b,tag:{Damage:0,Unbreakable:true,Enchantments:[{lvl:5s,id:\"minecraft:protection\"}],display:{color:1908001,Name:'{\"text\":\"§bKajetans Boots\"}'}}}");
+item.addAttribute(shoes, "generic.armor", read.slot("feet"), 5, 0);
+item.addAttribute(shoes, "generic.armor_toughness", read.slot("feet"), 5, 0);
+item.addAttribute(shoes, "generic.knockback_resistance", read.slot("feet"), 0.5, 0);
+item.addAttribute(shoes, "generic.movement_speed", read.slot("feet"), 0.05, 0);
 
-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\"}'}}}");
+chest = read.item("{id:\"minecraft:leather_chestplate\",Count:1b,tag:{Damage:0,Unbreakable:true,Enchantments:[{lvl:5s,id:\"minecraft:protection\"}],display:{color:1908001,Name:'{\"text\":\"§bKajetans Tunic\"}'}}}");
+item.addAttribute(chest, "generic.armor", read.slot("chest"), 5, 0);
+item.addAttribute(chest, "generic.armor_toughness", read.slot("chest"), 5, 0);
+item.addAttribute(chest, "generic.knockback_resistance", read.slot("chest"), 0.5, 0);
+item.addAttribute(chest, "generic.attack_speed", read.slot("chest"), 5, 0);
 
-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\"}'}}}");
+head = read.item("{id:\"minecraft:leather_helmet\",Count:1b,tag:{Damage:0,Unbreakable:true,Enchantments:[{lvl:5s,id:\"minecraft:protection\"}],display:{color:1908001,Name:'{\"text\":\"§bKajetans Cap\"}'}}}");
+item.addAttribute(head, "generic.armor", read.slot("head"), 5, 0);
+item.addAttribute(head, "generic.armor_toughness", read.slot("head"), 5, 0);
+item.addAttribute(head, "generic.knockback_resistance", read.slot("head"), 0.5, 0);
 
-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\"}'}}}");
+pants = read.item("{id:\"minecraft:leather_leggings\",Count:1b,tag:{Damage:0,Unbreakable:true,Enchantments:[{lvl:5s,id:\"minecraft:protection\"}],display:{color:11546150,Name:'{\"text\":\"§bKajetans Pants\"}'}}}");
+item.addAttribute(pants, "generic.armor", read.slot("legs"), 5, 0);
+item.addAttribute(pants, "generic.armor_toughness", read.slot("legs"), 5, 0);
+item.addAttribute(pants, "generic.knockback_resistance", read.slot("legs"), 0.5, 0);
+item.addAttribute(pants, "generic.max_health", read.slot("legs"), 20, 0);
+
+elytra = read.item("{id:\"minecraft:elytra\",Count:1b,tag:{Damage:0,Unbreakable:true}}");
 
 msg("dev", "§bTrader §rloaded.");
 @wait
@@ -156,7 +173,8 @@ if(event == "entity_click") {
 		shop.addOffer(shop, read.item("km:coin_gold", 32), read.item("minecraft:beacon", 1), 999);
 		shop.addOffer(shop, read.item("minecraft:dragon_head", 1), read.item("km:coin_gold", 20), 999);
 		shop.addOffer(shop, read.item("km:coin_silver", 20), read.item("minecraft:end_crystal", 1), 999);
-		shop.addOffer(shop, read.item("minecraft:dragon_egg", 1), read.item("km:coin_gold", 10), 999);
+		//shop.addOffer(shop, read.item("minecraft:dragon_egg", 1), read.item("km:coin_gold", 10), 999);
+		shop.addDoubleOffer(shop, read.item("km:coin_gold", 64), read.item("km:coin_gold", 64), elytra, 999);
 		shop.open(shop, player, shop_name);
 		goto("wait");
 	}

+ 2 - 0
system/chat.txt

@@ -5,6 +5,8 @@ event.load("player_login");
 event.load("player_logout");
 event.load("living_death");
 
+setMoney(42, 42);
+
 cookie_time = 0;
 cookie = read.item("minecraft:cookie");
 serverspawn = world.getServerSpawn();

+ 115 - 50
system/commands.txt

@@ -68,6 +68,7 @@ command.register("databank", "Databank-Commands");
 command.register("datatools", "Datatools-Commands");
 command.register("enchant", "Enchants an item in your hand");
 command.register("enderchest", "Shows enderchests");
+command.register("entities", "Lists all entities in a world");
 command.register("error", "Error-Logger");
 command.register("errordebug", "Debug-Logger");
 command.register("feed", "Fills hunger bar");
@@ -1119,6 +1120,7 @@ if(event == "function_key") {
 			msg.prefix(player, prefix_commands, "Only during night possible.");
 			goto("wait");
 		}
+		player_uuid = player.getUuid(player);
 		if(set.contains(skip_night_set, player_uuid)) {
 			msg.prefix(player, prefix_commands, "Already voted.");
 			goto("wait");
@@ -1140,6 +1142,52 @@ if(event == "player_data_tick") {
 }
 goto("wait");
 
+@entities
+if(size != 1) {
+	msg.prefix(player, prefix_quest, "/entities <world>");
+	goto("wait");
+}
+world_name = text.toLowerCase(list.getIndex(args, 0));
+world = world.get(world_name);
+if(world == null) {
+	msg.prefix(player, prefix_world, "This world is not loaded.");
+	goto("wait");
+}
+list = world.getEntities(world);
+size = list.getSize(list);
+map = map.new();
+living = 0;
+for(i = 0; i < size; i++) {
+	element = list.getIndex(list, i);
+	if(isLiving(element)) {
+		living++;
+		//living.removeAi(element);
+		entity_type = entity.getType(element); 
+		n = map.get(map, entity_type);
+		if(n == null) {
+			map.add(map, entity_type, 1);
+		} else {
+			map.add(map, entity_type, n + 1);
+		}
+	}
+}
+msg(player, "§0-------------------------------------------------");
+msg(player, "Living: ", living);
+iter = map.iterator(map);
+table = table.new("§b", 14, 14);
+msg(player, table.getStart(table));
+while(hasNext(iter)) {
+	element1 = next(iter);
+	if(hasNext(iter)) {
+		element2 = next(iter);
+	} else {
+		element2 = "";
+	}
+	msg(player, table.get(table, element1, element2));
+}
+msg(player, table.getEnd(table));
+goto("wait");
+
 @RickRole_play
 if(rickIndex < rick_sounds_amount) {
 	pitch = list.getIndex(RickRollSounds, rickIndex);
@@ -2663,7 +2711,7 @@ if(arg0 == "remove") {
 		player_id = player.getId(player);
 		if(player_id != 2) {
 			if(p_id == 2) {
-				msg(player, "§cSorry §b¯\\_()_/¯");
+				msg(player, "§cSorry §b¯\\_(._.)_/¯");
 				goto("wait");
 			}
 		}
@@ -2695,7 +2743,7 @@ if(arg0 == "removeall") {
 		player_id = player.getId(player);
 		if(player_id != 2) {
 			if(p_id == 2) {
-				msg(player, "§cSorry §b¯\\_()_/¯");
+				msg(player, "§cSorry §b¯\\_(._.)_/¯");
 				goto("wait");
 			}
 		}
@@ -3258,6 +3306,7 @@ if(size != 1) {
 	msg(sender, " - lectern");
 	msg(sender, " - loom");
 	msg(sender, " - mails");
+	msg(sender, " - mobarena");
 	msg(sender, " - perms");
 	msg(sender, " - playerdata");
 	msg(sender, " - pumpkin");
@@ -3427,6 +3476,13 @@ elseif(arg0 == "mails") {
 	}
 	script.startNamed("Mails", "utils/u_error", "system/mailsystem", "utils/u_general");
 }
+elseif(arg0 == "mobarena") {
+	script = script.get("Mobarena");
+	if(script != null) {
+		script.term(script);
+	}
+	script.startNamed("Mobarena", "utils/u_error", "survival/mobarena", "utils/u_general");
+}
 elseif(arg0 == "ticket") {
 	script = script.get("Ticket");
 	if(script != null) {
@@ -4437,7 +4493,7 @@ if(!isOnline(p_name)) {
 p = read.player(p_name);
 p_name = player.getName(p);
 if(p_name == "marvinius") {
-	msg(sender, "§cSorry §b¯\\_()_/¯");
+	msg(sender, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 msg("online", concat("§c", p_name, " was muted by ", sender_name, "."));
@@ -4457,7 +4513,7 @@ if(!isOnline(p_name)) {
 p = read.player(p_name);
 p_name = player.getName(p);
 if(p_name == "marvinius") {
-	msg(sender, "§cSorry §b¯\\_()_/¯");
+	msg(sender, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 msg("online", concat("§c", p_name, " was unmuted by ", sender_name, "."));
@@ -4477,7 +4533,7 @@ if(!isOnline(p_name)) {
 p = read.player(p_name);
 p_name = player.getName(p);
 if(p_name == "marvinius") {
-	msg(sender, "§cSorry §b¯\\_()_/¯");
+	msg(sender, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 if(size > 1) {
@@ -4503,7 +4559,7 @@ if(!isOnline(p_name)) {
 p = read.player(p_name);
 p_name = player.getName(p);
 if(p_name == "marvinius") {
-	msg(sender, "§cSorry §b¯\\_()_/¯");
+	msg(sender, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 if(size > 1) {
@@ -4529,7 +4585,7 @@ if(!isOnline(p_name)) {
 p = read.player(p_name);
 p_name = player.getName(p);
 if(p_name == "marvinius") {
-	msg(player, "§cSorry §b¯\\_()_/¯");
+	msg(player, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 head.add(p, 0, sender_name, 0.4, 0.05, 0.2, 0.35);
@@ -4561,7 +4617,7 @@ if(!checkIfEverOnline(p_name)) {
 }
 p_name = player.getName(player.getUuid(p_name));
 if(p_name == "marvinius") {
-	msg(sender, "§cSorry §b¯\\_()_/¯");
+	msg(sender, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 if(size > 1) {
@@ -4592,7 +4648,7 @@ if(!checkIfEverOnline(p_name)) {
 }
 p_name = player.getName(player.getUuid(p_name));
 if(p_name == "marvinius") {
-	msg(sender, "§cSorry §b¯\\_()_/¯");
+	msg(sender, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 if(size > 1) {
@@ -4636,7 +4692,7 @@ if(!checkIfEverOnline(p_name)) {
 }
 p_name = player.getName(player.getUuid(p_name));
 if(p_name == "marvinius") {
-	msg(sender, "§cSorry §b¯\\_()_/¯");
+	msg(sender, "§cSorry §b¯\\_(._.)_/¯");
 	goto("wait");
 }
 days = list.getIndex(args, 1);
@@ -4678,26 +4734,32 @@ if(size == 0) {
 	@plothelp
 	msg.prefix(player, prefix_plot, "/plot ...");
 	msg(player, "§d - info §rReturns info about current location");
+	if(!perm.has(player, "plot.moreinfo")) {
+		msg(player, "§d - list §rLists your plots");
+	}
+	msg(player, "");
 	msg(player, "§d - pos1/pos2 §rSet corner points");
 	msg(player, "§d - create §rCreates a (sub-)plot (Y: 0 - 255)");
 	msg(player, "§d - create3D §rCreates a 3D (sub-)plot");
+	msg(player, "");
 	msg(player, "§d - remove [id] §rRemoves a plot");
 	msg(player, "§d - expand <anzahl> [direction] [id] §rExpands a plot");
 	msg(player, "§d - name [id] <name> §rRenames a plot");
+	msg(player, "");
 	msg(player, "§d - share <player> [id] §rAdd a player to a plot");
 	msg(player, "§d - kick <player> [id] §rRemove a player from a plot");
 	msg(player, "§d - leader <player> [id] §rPromote to plot-leader");
 	msg(player, "§d - mod <player> [id] §rPromote to plot-mod");
 	msg(player, "§d - chest <player> [id] §rAllows a player to open chests");
-	msg(player, "§d - raise §rRaises a plot to a city");
+	msg(player, "");
+	msg(player, "§d - raise §rRaises a plot to a city. Costs §610 gold snuvis§r.");
 	msg(player, "§d - sell <price> §rSells a sub-plot");
+	msg(player, "");
 	if(perm.has(player, "plot.moreinfo")) {
 		msg(player, "§d - list [player] §rLists all plots from a player");
 		msg(player, "§d - moreinfo [id] §rReturns more detailed infos");
 		msg(player, "§d - listall §rLists all plots");
 		msg(player, "§d - flags <flags> <boolean> §rSet all flags to the boolean");
-	} else {
-		msg(player, "§d - list §rLists your plots");
 	}
 	goto("wait");
 }
@@ -4782,15 +4844,6 @@ if(arg0 == "raise") {
 		msg.prefix(player, prefix_plot, "You aren't on a plot.");
 		goto("wait");
 	}
-	if(!player.isClanLeader(player)) {
-		msg.prefix(player, prefix_plot, "Only a clan leader can do this.");
-		goto("wait");
-	}
-	clan_id = player.getClanId(player);
-	if(clan.getMembersAmount(clan_id) < 5) {
-		msg.prefix(player, prefix_plot, "Your clan needs 4 members to do this.");
-		goto("wait");
-	}
 	plot = list.getIndex(plot_list, 0);
 	if(plot.isCity(plot)) {
 		msg.prefix(player, prefix_plot, "This plot is already a city.");
@@ -4811,11 +4864,11 @@ if(arg0 == "raise") {
 	length = math.abs(x1 - x2) + 1;
 	width = math.abs(z1 - z2) + 1;
 	plot_size = length * width;
-	if(plot_size < 900) {
-		msg.prefix(player, prefix_plot, "Your plot must be over 900m2.");
+	if(plot_size < 2500) {
+		msg.prefix(player, prefix_plot, "Your plot must be over 2500m2.");
 		goto("wait");
 	}
-	snuvis = 4096;
+	snuvis = 40960;
 	if(!hasEnoughMoney(player, snuvis)) {
 		msg.prefix(player, prefix_plot, concat("You'll need §6", text.number(snuvis), "§r snuvis for this."));
 		goto("wait");
@@ -6160,14 +6213,14 @@ goto("wait");
 if(size == 0) {
 	@homesyntax
 	msg.prefix(player, prefix_commands, "/home ...");
-	msg(player, "§6 - set <home> §rSets a home");
-	msg(player, "§6 - delete <home> §rDeletes a home");
+	msg(player, "§6 - set <name> §rSets a home");
+	msg(player, "§6 - delete <name> §rDeletes a home");
 	if(perm.has(player, "home.other")) {
 		msg(player, "§6 - list [player] §rLists all homes");
-		msg(player, "§6 - <home> [player] §rTeleports to a home");
+		msg(player, "§6 - <name> [player] §rTeleports to a home");
 	} else {
 		msg(player, "§6 - list §rLists your homes");
-		msg(player, "§6 - <home> §rTeleports to your home");
+		msg(player, "§6 - <name> §rTeleports to your home");
 	}
 	goto("wait");
 }
@@ -6991,26 +7044,30 @@ goto("wait");
 if(size == 0) {
 	@clanhelp
 	msg.prefix(player, prefix_clan, "§r/clan...");
-	msg(player, "§2 - invite <name> §rInvites a player");
-	msg(player, "§2 - accept <id/name/tag> §rAccepts an invitation");
 	msg(player, "§2 - info [id/name/tag] §rReturns info about a clan");
+	msg(player, "§2 - list §rLists all clans");
+	msg(player, "");
 	msg(player, "§2 - create <name> <tag> §rCreates a clan. Costs §64096 §rsnuvis.");
+	msg(player, "§2 - invite <name> §rInvites a player");
+	msg(player, "§2 - accept <id/name/tag> §rAccepts an invitation");	
+	msg(player, "");
 	msg(player, "§2 - kick <name> §rKicks a player");
 	msg(player, "§2 - leader <name> §rPromote to clan-leader");
 	msg(player, "§2 - mod <name> §rPromote to clan-mod");
 	msg(player, "§2 - degrade <name> §rDemote a clan-mod");
 	msg(player, "§2 - leave §rLeave a clan");
-	msg(player, "§2 - disband §rDisband a clan");
-	msg(player, "§2 - rename <name> <tag> §rRenames a clan");
+	msg(player, "");
+	msg(player, "§2 - rename <name> <tag> §rRenames a clan. Costs §664 §rsnuvis.");
 	msg(player, "§2 - setspawn §rSets a clan-spawn");
 	msg(player, "§2 - spawn §rTeleports to clan-spawn");
-	msg(player, "§2 - msg <message> §rSends a clan-message");
-	msg(player, "§2 - mail <message> §rSends a clan-mail");
-	msg(player, "§2 - shout <message> §rSends a message to all online players");
+	msg(player, "§2 - disband §rDisband a clan");
+	msg(player, "");
 	msg(player, "§2 - deposit <money> §rDeposit money to the clan account");
 	msg(player, "§2 - withdraw <money> §rWithdraw money from the clan account");
+	msg(player, "§2 - msg <message> §rSends a clan-message");
+	msg(player, "§2 - mail <message> §rSends a clan-mail");
+	msg(player, "§2 - shout <message> §rSends a message to all online players. Costs §664 §rsnuvis.");
 	msg(player, "§2 - party §rInvites all online members to a party");
-	msg(player, "§2 - list §rLists all clans");
 	goto("wait");
 }
 arg0 = text.toLowerCase(list.getIndex(args, 0));
@@ -7320,11 +7377,11 @@ if(arg0 == "shout") {
 		goto("wait");
 	}
 	clan_id = player.getClanId(player);
-	if(clan.getMoney(clan_id) < 10) {
-		msg.prefix(player, prefix_clan, "Your clan needs 10 snuvis.");
+	if(clan.getMoney(clan_id) < 64) {
+		msg.prefix(player, prefix_clan, "Your clan needs 64 snuvis.");
 		goto("wait");
 	}
-	clan.subMoney(clan_id, 10);
+	clan.subMoney(clan_id, 64);
 	msg.prefix("online", prefix_clan, text.concat(clan.getTag(clan_id), ": ", text.concatList(args, " ", 1, size - 1)));
 	goto("wait");
 }
@@ -7879,7 +7936,7 @@ goto("wait");
 if(size == 0) {
 	@world_syntax
 	msg.prefix(player, prefix_world, "/world ...");
-	msg(player, "§b - info <world> §rShows info about a world");
+	msg(player, "§b - info §rShows info about a world");
 	msg(player, "§b - tp <world> [player] §rTeleports a player to a world");
 	msg(player, "§b - list §rShows all loaded worlds");
 	msg(player, "§b - setspawn §rSets the world's spawn");
@@ -8478,6 +8535,7 @@ function setCommandHelps() {
 	command.addHelpChild(help, command.newHelpLiteral("loom"));
 	command.addHelpChild(help, command.newHelpLiteral("games"));
 	command.addHelpChild(help, command.newHelpLiteral("mails"));
+	command.addHelpChild(help, command.newHelpLiteral("mobarena"));
 	command.addHelpChild(help, command.newHelpLiteral("perms"));
 	command.addHelpChild(help, command.newHelpLiteral("playerdata"));
 	command.addHelpChild(help, command.newHelpLiteral("pumpkin"));
@@ -8855,18 +8913,18 @@ function setCommandHelps() {
 	help = command.newHelp("home", "home");
 	//home set
 	helpArg0 = command.newHelpLiteral("set");
-	command.addHelpChild(helpArg0, command.newHelpString("home", false));
+	command.addHelpChild(helpArg0, command.newHelpString("name", false));
 	command.addHelpChild(help, helpArg0);
 	//home delete
 	helpArg0 = command.newHelpLiteral("delete");
-	command.addHelpChild(helpArg0, command.newHelpString("home", false));
+	command.addHelpChild(helpArg0, command.newHelpString("name", false));
 	command.addHelpChild(help, helpArg0);
 	//home list
 	helpArg0 = command.newHelpLiteral("list");
 	command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player", "home.other"));
 	command.addHelpChild(help, helpArg0);
 	//home <name>
-	helpArg0 = command.newHelpString("home", false);
+	helpArg0 = command.newHelpString("name", false);
 	command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player", "home.other"));
 	command.addHelpChild(help, helpArg0);
 	command.addHelp(help);
@@ -9045,6 +9103,10 @@ function setCommandHelps() {
 	command.addHelpChild(help, command.newHelpLiteral("reset", "mail.reset"));
 	command.addHelp(help);
 	
+	help = command.newHelp("entities", "entities");
+	command.addHelpChild(help, command.newHelpString("world", false));
+	command.addHelp(help);
+	
 	help = command.newHelp("playtime", "playtime");
 	//playtime [player]
 	command.addHelpChild(help, command.newHelpSpecial("Player", "player"));
@@ -9165,10 +9227,8 @@ function setCommandHelps() {
 	command.addHelp(help);
 	
 	help = command.newHelp("world", "world");
-	//world info <world>
-	helpArg0 = command.newHelpLiteral("info");
-	command.addHelpChild(helpArg0, command.newHelpString("world", false));
-	command.addHelpChild(help, helpArg0);
+	//world info
+	command.addHelpChild(help, command.newHelpLiteral("info"));
 	//world tp <world> [player]
 	helpArg0 = command.newHelpLiteral("tp");
 	helpArg1 = command.newHelpString("world", false);
@@ -9906,11 +9966,16 @@ goto("wait");
 
 function tpBottom(player) {
 	player_loc = entity.getLocation(player);
+	entity.teleport($p, loc.new(world.get("overworld"), 204, 69, 259));
+	waitfor(5);
 	y = loc.getY(player_loc);
-	while(block.isAir(player_loc)) {
+	while(y > 0 && block.isAir(player_loc)) {
 		loc.setY(player_loc, y);
 		y--;
-	}					
+	}
+	if(y <= 0) {
+		return;
+	}
 	loc.addY(player_loc, 1);
 	entity.teleport(player, player_loc);
 }

+ 3 - 0
system/damage.txt

@@ -75,6 +75,9 @@ list.clear(entities_list);
 goto("wait");
 
 function updateEntityName(living_entity) {
+	if(!isLiving(living_entity)) {
+		return;
+	}
 	entity_type = entity.getType(living_entity);
 	if(entity_type == "nobody" || entity_type == "armor_stand" || entity_type == "human") {
 		return;

+ 12 - 4
system/hawkeye.txt

@@ -12,9 +12,13 @@ event.load("block_place");
 event.load("block_click");
 prefix_hawkeye = "§cHawkeye";
 
-event_map = map.new();
-map.add(event_map, "block_break", 1);
-map.add(event_map, "block_place", 2);
+event_map_2 = map.new();
+map.add(event_map_2, "block_break", 1);
+map.add(event_map_2, "block_place", 2);
+
+event_map = map.new(); //für hawkeye
+map.add(event_map, 1, "block_break");
+map.add(event_map, 2, "block_place");
 
 databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS hawkeye(
 id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
@@ -101,7 +105,7 @@ function hawkeye.addEntry(event, player, location, text) {
 }
 
 function hawkeye.getEventId(event) {
-	return map.get($event_map, event);
+	return map.get($event_map_2, event);
 }
 
 function hawkeye.deleteOlderThanThreeWeeks() {
@@ -117,4 +121,8 @@ function hawkeye.isTool(item) {
 		return list.getIndex(lore, 0) == "Hawkeye Tool";
 	}
 	return false;
+}
+
+function hawkeye.getEventName(event_id) {
+	return map.get($event_map, event_id);
 }

+ 3 - 0
system/perms.txt

@@ -99,6 +99,7 @@ perm.registerGroup(2, "setrank.other");
 perm.registerGroup(2, "setservermessage");
 perm.registerGroup(2, "scoreboard");
 perm.registerGroup(2, "adminshop");
+perm.registerGroup(2, "entities");
 perm.registerGroup(2, "tag");
 perm.registerGroup(2, "team");
 perm.registerGroup(2, "suicide");
@@ -264,6 +265,7 @@ perm.registerGroup(5, "particle");
 perm.registerGroup(5, "setmessage");
 perm.registerGroup(5, "xp");
 perm.registerGroup(5, "quest");
+perm.registerGroup(5, "entities");
 perm.registerGroup(5, "var");
 perm.registerGroup(5, "tip");
 perm.registerGroup(5, "script");
@@ -441,6 +443,7 @@ function perm.addGroup(index, permgroup_id, permgroup_name, rank) {
 
 //Perms auf Spieler registrieren
 registerAllPerms();
+perm.registerPlayer("e41b5335-3c74-46e9-a6c5-dafc6334a477", 2); //marvinius
 perm.registerPlayer("e41b5335-3c74-46e9-a6c5-dafc6334a477", 7); //marvinius
 perm.registerPlayer("51e240f9-ab10-4ea6-8a5d-779319f51257", 10); //kajetan
 

+ 32 - 3
test2.txt

@@ -1,10 +1,39 @@
-z = entity.spawn("spider", entity.getLocation(p));
+p = read.player("kajetanjohannes");
+item = living.getEquip(p, "hand");
+item.clearAttributes(item);
+type = item.getType(item);
+
+if(type == "minecraft:leather_helmet") {
+    item.addAttribute(item, "generic.armor", read.slot("head"), 5, 0);
+    item.addAttribute(item, "generic.armor_toughness", read.slot("head"), 5, 0);
+    item.addAttribute(item, "generic.knockback_resistance", read.slot("head"), 0.5, 0);
+}
+if(type == "minecraft:leather_chestplate") {
+    item.addAttribute(item, "generic.armor", read.slot("chest"), 5, 0);
+    item.addAttribute(item, "generic.armor_toughness", read.slot("chest"), 5, 0);
+    item.addAttribute(item, "generic.knockback_resistance", read.slot("chest"), 0.5, 0);
+    item.addAttribute(item, "generic.attack_speed", read.slot("chest"), 5, 0);
+}
+if(type == "minecraft:leather_leggings") {
+    item.addAttribute(item, "generic.armor", read.slot("legs"), 5, 0);
+    item.addAttribute(item, "generic.armor_toughness", read.slot("legs"), 5, 0);
+    item.addAttribute(item, "generic.knockback_resistance", read.slot("legs"), 0.5, 0);
+    item.addAttribute(item, "generic.max_health", read.slot("legs"), 20, 0);
+}
+if(type == "minecraft:leather_boots") {
+    item.addAttribute(item, "generic.armor", read.slot("feet"), 5, 0);
+    item.addAttribute(item, "generic.armor_toughness", read.slot("feet"), 5, 0);
+    item.addAttribute(item, "generic.knockback_resistance", read.slot("feet"), 0.5, 0);
+    item.addAttribute(item, "generic.movement_speed", read.slot("feet"), 0.05, 0);
+}
+
+/*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);
+living.heal(z, 2000);*/
 
 /*sgoto(3, "wusi");
 time = time.getMillis() + 100;
@@ -17,4 +46,4 @@ wait();
 term();
 
 @wusi
-msg("dev", "yes");*/
+msg("dev", "yes");*/

+ 3 - 3
utils/u_general.txt

@@ -469,7 +469,7 @@ function player.changeInv(player, from_world, to_world) {
 	}
 	if(world.isSurvName(to_world_name)) {
 		if(player.hasFly(player)) {
-			scheduler.addFly(2, player, true);
+			scheduler.addFly(5, player, true);
 		}
 	}
 }
@@ -481,7 +481,7 @@ function player.changeGamemode(player, to_world_name) {
 				gm = "creative";
 			} else {
 				gm = "adventure";
-				scheduler.addFly(2, player, true);
+				scheduler.addFly(5, player, true);
 			}
 		} else {
 			gm = "survival";
@@ -489,7 +489,7 @@ function player.changeGamemode(player, to_world_name) {
 		player.setGamemode(player, gm);
 		duration = data.getTimer(player, "fly");
 		if(world.isSurvName(to_world_name) && duration > 0) {
-			scheduler.addFly(2, player, true);
+			scheduler.addFly(5, player, true);
 		}
 	}
 }