소스 검색

money booster

mloeschenkohl 3 년 전
부모
커밋
10d608eeb2
47개의 변경된 파일715개의 추가작업 그리고 138개의 파일을 삭제
  1. 0 1
      MarvWusi2.txt
  2. 14 4
      docu_minecraft.php
  3. 328 0
      fraktal_maker.txt
  4. 0 0
      jantest4.txt
  5. 0 0
      jantest5.txt
  6. 14 0
      jantest6.txt
  7. 12 12
      minigames/among_us/among_us.txt
  8. 1 1
      minigames/buttons/buttons.txt
  9. 1 1
      minigames/hideandseek/hideandseek.txt
  10. 1 1
      minigames/inverting/inverting.txt
  11. 1 1
      minigames/jumpnrun/jumpnrun.txt
  12. 1 1
      minigames/leapfrog/leapfrog.txt
  13. 1 0
      minigames/letters/letters.txt
  14. 5 8
      minigames/mengerrun/mengerrun.txt
  15. 1 1
      minigames/parcour/parcour.txt
  16. 1 1
      minigames/sammelfieber/sfranked.txt
  17. 1 1
      minigames/shoppingchaos/shoppingchaos.txt
  18. 0 0
      minigames/volleyball/volleyball.txt
  19. 1 1
      story/admont/albtraum.txt
  20. 1 1
      story/admont/der_anfang.txt
  21. 1 1
      story/admont/die_uhr_tickt.txt
  22. 1 1
      story/admont/erntezeit.txt
  23. 2 2
      story/admont/erstes_date.txt
  24. 1 1
      story/admont/felsmagier.txt
  25. 1 1
      story/admont/fuer_die_wissenschaft.txt
  26. 1 1
      story/admont/gaumenschmauss.txt
  27. 1 1
      story/admont/helfende_hand.txt
  28. 2 2
      story/admont/hide_and_seek.txt
  29. 1 1
      story/admont/ich_und_mein_holz.txt
  30. 1 1
      story/admont/in_eile.txt
  31. 1 1
      story/admont/kraeutermeister.txt
  32. 1 1
      story/admont/merle_in_noeten.txt
  33. 1 1
      story/admont/mitbringsel.txt
  34. 2 2
      story/admont/reinigung.txt
  35. 1 1
      story/admont/schatz_von_admont.txt
  36. 1 1
      story/admont/spezialwunsch.txt
  37. 1 1
      story/admont/tuecher.txt
  38. 1 1
      story/admont/zauberlehrling.txt
  39. 20 0
      system/chat.txt
  40. 149 25
      system/commands.txt
  41. 2 2
      system/hawkeye.txt
  42. 1 1
      system/herobrine.txt
  43. 2 1
      system/perms.txt
  44. 15 7
      system/survival.txt
  45. 0 11
      test.txt
  46. 0 4
      test2.txt
  47. 121 31
      utils/u_general.txt

+ 0 - 1
MarvWusi2.txt

@@ -1 +0,0 @@
-msg("dev", "wusi");

+ 14 - 4
docu_minecraft.php

@@ -98,6 +98,16 @@
             <td>entity<br>*cancel</td>
         </tr>
     </table>
+    <table>
+        <tr>
+            <th class="command">entity_leave</th>
+            <th class="desc">an entity despawns</th>
+        </tr>
+        <tr>
+            <td class="bold">Variablen</td>
+            <td>entity</td>
+        </tr>
+    </table>
     <table>
         <tr>
             <th class="command">animal_tame</th>
@@ -2850,13 +2860,13 @@
         </tr>
         <tr>
             <td class="bold">Format</td>
-            <td>head.add(player, id, head_player_name, x, y, int scale|1)</td>
+            <td>head.add(receiver, id, head_player_name, x, y, width, height)</td>
         </tr>
         <tr>
             <td class="bold">Arguments</td>
             <td>
 				id: free selectable, non-global, per-player<br>
-				x/y: coordinates on the screen<br>
+				x/y/width/height: scale from 0 to 1<br>
 			</td>
         </tr>
     </table>
@@ -2867,7 +2877,7 @@
         </tr>
         <tr>
             <td class="bold">Format</td>
-            <td>head.remove(player, id)</td>
+            <td>head.remove(receiver, id)</td>
         </tr>
     </table>
     <table>
@@ -2877,7 +2887,7 @@
         </tr>
         <tr>
             <td class="bold">Format</td>
-            <td>head.reset(player)</td>
+            <td>head.reset(receiver)</td>
         </tr>
     </table>
 </section>

+ 328 - 0
fraktal_maker.txt

@@ -0,0 +1,328 @@
+msg("dev", "Fractal_Maker has started.");
+event.load("block_place"); 
+event.load("block_break"); 
+event.load("item_air_click");
+event.load("chat");
+Undo_Map = map.new();
+built = false;
+FractalHelpMap = map.new();
+fractal.help_register("§e§lFractal§6§lPlace", "to start placing the pattern");
+fractal.help_register("§e§lFractal§6§lStart", "to start generating the fractal");
+fractal.help_register("§e§lFractal§6§lBuildHere", "to place the fractal at current location");
+fractal.help_register("§e§lFractal§6§lNew", "to start again");
+fractal.help_register("§e§lFractal§6§lUndo", "to undo placing your last fractal");
+fractal.help_register("§e§lFractal§6§lRedo", "to redo placing your last fractal");
+fractal.help_register("§e§lFractal§6§lIter", "to set the amount of iterations with km:digits");
+fractal.help_register("§e§lFractal§6§lPause", "to stop fractal/fractal-pattern placement");
+fractal.help_register("§e§lFractal§6§lResume", "to unpause");
+
+@Start
+Blocks = map.new();
+Block_Coords = list.new();
+Coords_X = list.new();
+Coords_Y = list.new();
+Coords_Z = list.new();
+start = false; 
+build = false;
+set_iter = false;
+iterations = 3;
+pause = false;
+
+@wait
+wait();
+if(player.getname(player) == "SirTerence7"){
+	ignoreGoto(event);
+} 
+goto("wait");
+
+@block_place
+if(start && !pause){
+	cancel=false;
+	map.add(Blocks, block_loc, block_type);
+	list.add(Block_Coords, block_loc);
+}
+elseif(build){
+	cancel = true;
+	player_loc = block_loc;
+	goto("place_fractal");
+}
+goto("wait"); 
+
+@block_break
+if(start && !pause){
+	if(map.contains(Blocks, block_loc)){
+		cancel = false;
+		map.remove(Blocks, block_loc);
+		list.remove(Block_Coords, block_loc);
+	}else{
+		cancel = true;
+	}
+}
+elseif(start && pause){
+	if(map.contains(Blocks, block_loc)){
+		cancel = true;
+	}
+}
+goto("wait"); 
+
+@item_air_click
+if(set_iter){
+	set_iter = false;
+	Hand_Item = item.getType(entity.getEquip(player, "hand"));
+	OffHand_Item = item.getType(entity.getEquip(player, "offhand"));
+	old_iterations = iterations;
+	if(Hand_Item == "km:digit_2" || OffHand_Item == "km:digit_2"){
+		iterations = 2;
+	}elseif(Hand_Item == "km:digit_3" || OffHand_Item == "km:digit_3"){
+		iterations = 3;
+	}elseif(Hand_Item == "km:digit_4" || OffHand_Item == "km:digit_4"){
+		iterations = 4;
+	}elseif(Hand_Item == "km:digit_5" || OffHand_Item == "km:digit_5"){
+		iterations = 5;
+	}elseif(Hand_Item == "km:digit_6" || OffHand_Item == "km:digit_6"){
+		iterations = 6;
+	}elseif(Hand_Item == "km:digit_7" || OffHand_Item == "km:digit_7"){
+		iterations = 7;
+	}else{
+		goto("wait");
+	}
+	msg(player, "iterations set to: ", iterations);
+	if(old_iterations != iterations && build){
+		goto("iter_jump");
+	}
+	build = true;
+}
+goto("wait");
+
+@chat
+if(text.contains(message, "fractal")){
+	ignoreGoto(message);
+}
+goto("wait");
+
+@fractalhelp
+temp = map.iterator(FractalHelpMap);
+while(hasNext(temp)){
+	temp_key = map.getKey(next(temp));
+	temp_value = map.get(FractalHelpMap, temp_key);
+	fractal_command = text.hover(text.click(temp_key, temp_value), temp_value);
+	msg(player, fractal_command);
+}
+cancel = true;
+
+goto("wait");
+
+@fractalplace
+cancel = true;
+msg(player, "You can place the pattern now.");
+start = true;
+goto("wait");
+
+@fractalstart
+cancel = true;
+if(start && map.getSize(Blocks) > 1){
+	msg(player, "The Fractal will start generating now");
+	@iter_jump
+	loc = loc.getWorld(entity.getLocation(player));
+	Relative_Fractal = fractal.create(Block_Coords, loc, Blocks, 2, iterations+1, Block_Coords);
+	build = true;
+	start = false;
+	pause = false;
+	msg(player, "The Fractal has generated, place a block or type \"fractalbuildhere\" to place it.");
+}else{
+	msg(player, "You have not yet made a pattern.");
+}
+goto("wait");
+
+@fractalbuildhere
+cancel = true;
+if(build){
+	player_loc = entity.getLocation(player);
+	@place_fractal
+	redo_loc = player_loc;
+	msg(player, "Fractal will now generate with ", iterations, " iterations.");
+	Undo_Map = fractal.build(Relative_Fractal, player_loc, player);
+	built = true;
+}else{
+	msg(player, "You have not yet generated a fractal.");
+}
+goto("wait");
+
+@fractalnew
+cancel = true;
+msg(player, "Restarting");
+goto("Start");
+goto("wait");
+
+@fractalundo
+cancel = true;
+if(built && map.getSize(Undo_Map) > 1){
+	msg(player, "Undoing");
+	redo = true;
+	built = false;
+	fractal.undo(Undo_Map);
+}else{
+	msg(player, "Nothing to undo");
+}
+goto("wait");
+
+@fractalredo
+if(redo){
+	msg(player, "Redoing");
+	fractal.build(Relative_Fractal, redo_loc, player);
+	redo = false;
+	built = true;
+}else{
+	msg(player, "Nothing to redo");
+}
+goto("wait");
+
+@fractaliter
+if(build){
+	msg(player, "Click with a digit from 2-7 in hand.");
+	set_iter = true;
+}else{
+	msg(player, "You need to place a pattern first.");
+}
+goto("wait"); 
+
+@fractalpause
+if(pause){
+	msg(player, "You have already paused, type \"fractalresume\" to continue.");
+	goto("wait");
+}else{
+	pause = true;
+	build = false;
+	msg(player, "You have paused the fractal-placement.");
+}
+goto("wait");
+
+@fractalresume
+if(pause){
+	pause = false;
+	build = true;
+	msg(player, "You can resume placing now.");
+}else{
+	msg(player, "You have not paused.");
+}
+goto("wait");
+
+function fractal.create(Block_Coords, world, Blocks, iter, iterations, Last_Block_Coords){
+	List_Size = list.getSize(Last_Block_Coords);
+	Coords_X = list.new();
+	Coords_Y = list.new();
+	Coords_Z = list.new();
+	New_Block_Coords = list.new();
+	relative_blocks = map.new();
+	for(a = 0; a < List_Size; a++){
+		block_loc = list.getIndex(Last_Block_Coords, a);
+		list.add(Coords_X, loc.getX(block_loc));
+		list.add(Coords_Y, loc.getY(block_loc));
+		list.add(Coords_Z, loc.getZ(block_loc));
+	}
+	list.sort(Coords_X);
+	list.sort(Coords_Y);
+	list.sort(Coords_Z);
+	Min_X = list.getIndex(Coords_X, 0);
+	Min_Y = list.getIndex(Coords_Y, 0);
+	Min_Z = list.getIndex(Coords_Z, 0);
+	X_Size = math.abs(Min_X - list.getIndex(Coords_X, list.getSize(Coords_X) - 1))+1;
+	Y_Size = math.abs(Min_Y - list.getIndex(Coords_Y, list.getSize(Coords_Y) - 1))+1;
+	Z_Size = math.abs(Min_Z - list.getIndex(Coords_Z, list.getSize(Coords_Z) - 1))+1;
+	a3 = 0;
+	for(a = 0; a < math.pow(X_Size,iter); a = a + X_Size){
+		b3 = 0;
+		for(b = 0; b < math.pow(Y_Size,iter); b = b + Y_Size){
+			c3 = 0;
+			for(c = 0; c < math.pow(Z_Size,iter); c = c + Z_Size){
+				location = loc.new(world, Min_X + a3, Min_Y + b3, Min_Z + c3);
+				if(list.contains(Block_Coords, location)){
+					for(a2 = a; a2 < X_Size + a; a2++){
+						for(b2 = b; b2 < Y_Size + b; b2++){
+							for(c2 = c; c2 < Z_Size + c; c2++){
+								loc_place = loc.new(world, Min_X + a2, Min_Y + b2, Min_Z + c2);
+								rel_loc = loc.new(world, a2, b2, c2);
+								loc_set = loc.new(world, Min_X + a2 - a, Min_Y + b2 - b, Min_Z + c2 - c);
+								Block_to_set = map.getOrDefault(Blocks, loc_set, "minecraft:air");
+								rand_temp = math.random(0,100);
+								if(Block_to_set != "minecraft:air" && rand_temp > 3){
+									list.add(New_Block_Coords, loc_place);
+									map.add(relative_blocks, rel_loc, Block_to_set);
+								}
+							}
+						}
+					}
+				}
+				c3++;
+			}
+			b3++;
+		}
+		a3++;
+	}
+	iter++;
+	if(iter < iterations){
+		relative_blocks = fractal.create(New_Block_Coords, world, Blocks, iter, iterations, Last_Block_Coords);
+	}
+	return(relative_blocks);
+}
+
+function fractal.build(Fractal, Position, Player){
+	stop = false;
+	Pos_X = math.round(loc.getX(Position));
+	Pos_Y = math.round(loc.getY(Position));
+	Pos_Z = math.round(loc.getZ(Position));
+	World = loc.getWorld(Position);
+	Coords_for_Undo = map.new();
+	Coords_List = list.new();
+	iterator = map.iterator(Fractal);
+	while(hasNext(iterator)){
+		list.add(Coords_List, map.getKey(next(iterator)));
+	}
+	for(a = 0; a < list.getSize(Coords_List); a++){
+		rel_loc = list.getIndex(Coords_List, a);
+		Temp_X = Pos_X + loc.getX(rel_loc);
+		Temp_Y = Pos_Y + loc.getY(rel_loc);
+		Temp_Z = Pos_Z + loc.getZ(rel_loc);
+		abs_loc = loc.new(World, Temp_X, Temp_Y, Temp_Z);
+		if(!block.isAir(abs_loc) && abs_loc != Position){
+			msg(Player, "Block is in the Way, cannot paste Fractal here.", block.getType(abs_loc));
+			stop = true;
+			a = list.getSize(Coords_List) + 1;
+		}else{
+			stop = false;
+		}
+	}
+	if(!stop){
+		for(a = 0; a < list.getSize(Coords_List); a++){
+			rel_loc = list.getIndex(Coords_List, a);
+			Temp_X = Pos_X + loc.getX(rel_loc);
+			Temp_Y = Pos_Y + loc.getY(rel_loc);
+			Temp_Z = Pos_Z + loc.getZ(rel_loc);
+			abs_loc = loc.new(World, Temp_X, Temp_Y, Temp_Z);
+			Block_to_set = map.getOrDefault(Fractal, rel_loc, "minecraft:air");
+			if(Block_to_set != "minecraft:air"){
+				map.add(Coords_for_Undo, abs_loc, block.getType(abs_loc));
+				block.set(abs_loc, Block_to_set);
+			}
+		}
+	}
+	return(Coords_for_Undo);
+}
+
+function fractal.undo(Coords_for_Undo){
+	Coords_List = list.new();
+	iterator = map.iterator(Coords_for_Undo);
+	while(hasNext(iterator)){
+		list.add(Coords_List, map.getKey(next(iterator)));
+	}
+	for(a = 0; a < list.getSize(Coords_List); a++){
+		undo_loc = list.getIndex(Coords_List, a);
+		undo_block = map.getOrDefault(Coords_for_Undo, undo_loc, "minecraft:air");
+		if(undo_block == "minecraft:" || undo_block == ""){undo_block = "minecraft:air";}
+		block.set(undo_loc, undo_block);
+	}
+}
+
+function fractal.help_register(message, description){
+	map.add($FractalHelpMap, message, description);
+}

+ 0 - 0
JanTest4.txt → jantest4.txt


+ 0 - 0
JanTest5.txt → jantest5.txt


+ 14 - 0
jantest6.txt

@@ -0,0 +1,14 @@
+event.load("player_elytra_start");
+strength = 3;
+@wait
+wait();
+yeet(player,strength);
+
+function yeet (player, strength){
+  array = entity.getLook(player);
+  x = array[0] * strength;
+  y = math.abs(array[1]) * strength;
+  z = array[2] * strength;
+  entity.throw(player, x, y, z);
+}
+goto("wait");

+ 12 - 12
minigames/among_us/among_us.txt

@@ -412,6 +412,7 @@ boss.setPlayEndbossmusic(false);
 
 wooden_trapdoors_tag = block.getTag("minecraft:wooden_trapdoors");
 shulker_tag = block.getTag("minecraft:shulker_boxes");
+digit_tag = item.getTag("km:digit");
 
 master_sound_category = sound.getCategory("master");
 kill_sound = sound.get("entity.slime.hurt");
@@ -1583,17 +1584,17 @@ if(block_loc == fix_o2_loc_1 || block_loc == fix_o2_loc_2) {
 		//oxygen_inv = inv.new("003333322 000000000 000222000 000222000 000222000 000222000");
 		oxygen_inv = inv.new("003333322000000000000222000000222000000222000000222000");
 		inv.setItem(oxygen_inv, 6, read.item("minecraft:paper", 1, concat("§r", text.number(oxy_code))));
-		inv.setItem(oxygen_inv, 7, read.item("minecraft:stone_button", 1, "§r0"));
-		inv.setItem(oxygen_inv, 8, read.item("minecraft:stone_button", 1, "§r1"));
-		inv.setItem(oxygen_inv, 9, read.item("minecraft:stone_button", 1, "§r2"));
-		inv.setItem(oxygen_inv, 10, read.item("minecraft:stone_button", 1, "§r3"));
-		inv.setItem(oxygen_inv, 11, read.item("minecraft:stone_button", 1, "§r4"));
-		inv.setItem(oxygen_inv, 12, read.item("minecraft:stone_button", 1, "§r5"));
-		inv.setItem(oxygen_inv, 13, read.item("minecraft:stone_button", 1, "§r6"));
-		inv.setItem(oxygen_inv, 14, read.item("minecraft:stone_button", 1, "§r7"));
-		inv.setItem(oxygen_inv, 15, read.item("minecraft:stone_button", 1, "§r8"));
+		inv.setItem(oxygen_inv, 7, read.item("km:digit_0", 1, "§f0"));
+		inv.setItem(oxygen_inv, 8, read.item("km:digit_1", 1, "§f1"));
+		inv.setItem(oxygen_inv, 9, read.item("km:digit_2", 1, "§f2"));
+		inv.setItem(oxygen_inv, 10, read.item("km:digit_3", 1, "§f3"));
+		inv.setItem(oxygen_inv, 11, read.item("km:digit_4", 1, "§f4"));
+		inv.setItem(oxygen_inv, 12, read.item("km:digit_5", 1, "§f5"));
+		inv.setItem(oxygen_inv, 13, read.item("km:digit_6", 1, "§f6"));
+		inv.setItem(oxygen_inv, 14, read.item("km:digit_7", 1, "§f7"));
+		inv.setItem(oxygen_inv, 15, read.item("km:digit_8", 1, "§f8"));
 		inv.setItem(oxygen_inv, 16, read.item("km:cross_red"));
-		inv.setItem(oxygen_inv, 17, read.item("minecraft:stone_button", 1, "§r9"));
+		inv.setItem(oxygen_inv, 17, read.item("km:digit_9", 1, "§r9"));
 		inv.setItem(oxygen_inv, 18, read.item("km:check_green"));
 		inv.open(oxygen_inv, player, "§cENTER CODE");
 		sabotage.openedInv(player);
@@ -1956,8 +1957,7 @@ if(inv_name == "§cVOTE") {
 }
 if(inv_name == "§cENTER CODE") {
 	//CODE eingeben
-	item_type = item.getType(item);	
-	if(item_type == "minecraft:stone_button") {
+	if(item.hasTag(digit_tag, item)) {
 		number = item.getName(item);
 		for(i = 0; i < 5; i++) {
 			if(item.getType(inv.getItem(inv, i)) == "minecraft:air") {

+ 1 - 1
minigames/buttons/buttons.txt

@@ -106,7 +106,7 @@ if(diff != null) {
 	msg(player, " §e- §rBeat own record by §e", text.number(diff));
 }
 minigame.statsLine(player, "§e", "Played games", text.number(playedgames));
-addMoney(player, math.round(clicked / 4));
+money.addBoost(player, math.round(clicked / 4));
 
 @player_giveup
 @player_logout

+ 1 - 1
minigames/hideandseek/hideandseek.txt

@@ -442,7 +442,7 @@ for(i = 0; i < list.getSize(player_list); i++) {
 	msg.prefix(p, gamename, concat("§6", winnername, "§r has won."));
 	player.tpGamesLobby(p);
 	resetplayer(p);
-	addMoney(p, math.round(map.get(points, p_uuid) / 3));
+	money.addBoost(p, math.round(map.get(points, p_uuid) / 3));
 	
 	p_id = player.getId(p);
 	last_record = ranking.getPoints(rankingtable, p_id);

+ 1 - 1
minigames/inverting/inverting.txt

@@ -160,7 +160,7 @@ if(diff != null) {
 	diff = null;
 }
 minigame.statsLine(player, "§e", "Won games", text.number(playedgames));
-addMoney(player, money);
+money.addBoost(player, money);
 
 gosub("newfield");
 goto("wait");

+ 1 - 1
minigames/jumpnrun/jumpnrun.txt

@@ -142,7 +142,7 @@ function showStats(player, points) {
 	}
 	minigame.statsLine(player, "§e", "Your Record", text.number($player_record));
 	minigame.statsLine(player, "§e", "Server Record", text.number($server_record));
-	addMoney(player, math.round(points / 5));
+	money.addBoost(player, math.round(points / 5));
 }
 
 function resetBlocks(old_loc, new_loc) {

+ 1 - 1
minigames/leapfrog/leapfrog.txt

@@ -115,7 +115,7 @@ goto("wait");
 
 @player_giveup
 @player_logout
-addMoney(player, math.round(points / 4));
+money.addBoost(player, math.round(points / 4));
 script = script.getFromId(script_id);
 minigame.kickPlayer(script, player);
 minigame.term(script, gamesignloc);

+ 1 - 0
minigames/letters/letters.txt

@@ -193,6 +193,7 @@ if(block.hasTag(sign_tag, block.get(block_loc))) {
 				msg(player, " §e- §rBeat own record by §e", concat(text.number(diff), " s"));
 			}
 			minigame.statsLine(player, "§e", "Played games", text.number(played_games));
+			money.addBoost(player, 26);
 			goto("player_giveup");
 		}
 		nextletter = list.getIndex(letters, counter);

+ 5 - 8
minigames/mengerrun/mengerrun.txt

@@ -83,18 +83,17 @@ goto("checkgame");
 if(key > list.getSize(jan_mr_skills)) {
 	goto("checkgame");
 }
-p_f = player.getUuid(player);
+p_uuid = player.getUuid(player);
 skill = list.getIndex(jan_mr_skills, key - 1);
 skill_name = skill[0];
 strength = skill[2];
-if(map.get(jump_strength, p_f) == strength){
+if(map.get(jump_strength, p_uuid) == strength){
 	message = text.concat("Your Jump Strength is already set to ", skill_name, ".");
 }else{
-	map.add(jump_strength, p_f, strength);
+	map.add(jump_strength, p_uuid, strength);
 	message = text.concat("Your Jump Strength is now set to ", skill_name, ".");
 }
-p = player.get(p_f);
-msg.prefix(p, gamename, message);
+msg.prefix(player, gamename, message);
 goto("checkgame");
 
 @living_jump
@@ -143,12 +142,10 @@ if(!list.contains(player_list, defender_uuid)) {
 	goto("checkgame");
 }
 if(!player.hasMinigameId(attacker, script_id)) {
-	cancel = true;
 	goto("checkgame");
 }
 attacker_uuid = player.getUuid(attacker);
 if(defender_uuid == attacker_uuid) {
-	cancel = true;
 	goto("checkgame");
 }
 if(!list.contains(player_list, attacker_uuid)) {
@@ -255,7 +252,7 @@ function setStackIcons(player) {
 }
 
 function addMengerSkill(skill_name, icon, menger_strength) {
-	skill = array.new(8);
+	skill = array.new(3);
 	skill[0] = skill_name;
 	skill[1] = icon;
 	skill[2] = menger_strength;

+ 1 - 1
minigames/parcour/parcour.txt

@@ -147,7 +147,7 @@ if(index > jumpstage) {
 		}
 		minigame.statsLine(player, "§e", "Time", concat(time_string, " min"));
 		minigame.statsLine(player, "§e", "Record", concat(rec_time_string, " min"));
-		addMoney(player, math.round(-0.25 * (time_ms / 1000) + 60));
+		money.addBoost(player, math.round(-0.25 * (time_ms / 1000) + 60));
 		goto("player_logout");
 	}
 }

+ 1 - 1
minigames/sammelfieber/sfranked.txt

@@ -297,7 +297,7 @@ while(hasNext(iter)) {
 		msg(player, " §e- §rBeat own record by §e", text.number(diff));
 	}
 	minigame.statsLine(player, "§e", "Played games", text.number(playedgames));
-	addMoney(player, yetfound / 2);
+	money.addBoost(player, yetfound / 2);
 }
 @player_logout
 @player_giveup

+ 1 - 1
minigames/shoppingchaos/shoppingchaos.txt

@@ -394,7 +394,7 @@ if(minutes == 0 && seconds == 0) {
 			} else {
 				team_string = concat(team_string, " ", player.getName(p_uuid));
 			}
-			addMoney(player.getId(p_uuid), math.round(teampoints / 3));
+			money.addBoost(player.getId(p_uuid), math.round(teampoints / 3));
 		}
 		minigame.speakAll(gamename, concat(text.number(teampoints), map.get(colorcodes, team), " (", team_string, ")"));
 	}

+ 0 - 0
minigames/Volleyball/Volleyball.txt → minigames/volleyball/volleyball.txt


+ 1 - 1
story/admont/albtraum.txt

@@ -95,7 +95,7 @@ if(event == "living_death"){
 		if(zombie_count == 5) {
 			msg.prefix(player, "§dHerbert", "Du bist meine Rettung.");
 			msg(player, "§dQuest abgeschlossen. Belohnung: 6 Snuvis!");
-			addMoney(player, 6);
+			money.addBoost(player, 6);
 			quest.finish(script, player);
 		}
 	}

+ 1 - 1
story/admont/der_anfang.txt

@@ -97,7 +97,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			msg.prefix(player, "§dGastwirt", "Danke! Hier eine kleine Belohnung.");
 			player.removeItem(player, item);
 			msg(player, "§dQuest abgeschlossen. Belohnung: 10 Snuvis!");
-			addMoney(player, 10);
+			money.addBoost(player, 10);
 			quest.finish(script, player);
 		}
 	}

+ 1 - 1
story/admont/die_uhr_tickt.txt

@@ -105,7 +105,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			player.removeItem(player, read.item(item_type));
 			msg.prefix(player, "§dHerbert", "Das ging aber flott!");
 			msg(player, "§dQuest abgeschlossen. Belohnung: 6 Snuvis!");
-			addMoney(player, 6);
+			money.addBoost(player, 6);
 			quest.finish(script, player);
 		}
 	}

+ 1 - 1
story/admont/erntezeit.txt

@@ -105,7 +105,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		if(wheat_given >= wheat_needed && carrots_given >= carrots_needed) {
 			msg.prefix(player, "§dBauer", "Danke für deine Hilfe.");
 			msg(player, "§dQuest abgeschlossen. Belohnung: 7 Snuvis!");
-			addMoney(player, 7);
+			money.addBoost(player, 7);
 			quest.finish(script, player);
 		}
 	}

+ 2 - 2
story/admont/erstes_date.txt

@@ -87,7 +87,7 @@ if(option == "A") {
 				entity.setEquip(player, "hand", read.item("minecraft:air"));
 				msg.prefix(player, "§dPeter", "Vielen Dank!");
 				msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
-				addMoney(player, 8);
+				money.addBoost(player, 8);
 				quest.finish(script, player);
 			}
 		}
@@ -111,7 +111,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		player.removeItem(player, read.item("minecraft:pink_tulip", 3));
 		msg.prefix(player, "§dPeter", "Vielen Dank!");
 		msg(player, "§dQuest abgeschlossen. Belohnung: 10 Snuvis!");
-		addMoney(player, 10);
+		money.addBoost(player, 10);
 		quest.finish(script, player);
 	}
 }

+ 1 - 1
story/admont/felsmagier.txt

@@ -309,7 +309,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			map.add(map, player.getUuid(player), time.getMillis());
 			msg(player, "§dQuest abgeschlossen. Belohnung: 30 Snuvis!");
 			msg(player, text.click("§r [§cclick§r] §f[§bTeleport§f] zum Story-Spawn.", "/story"));
-			addMoney(player, 30);
+			money.addBoost(player, 30);
 			quest.finish(script, player);
 		}
 	}

+ 1 - 1
story/admont/fuer_die_wissenschaft.txt

@@ -107,7 +107,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			if(paper_given == 3) {
 				msg.prefix(player, "§dIsabell", "DANKE! Du rettest mich und die Wissenschaft!");
 				msg(player, "§dQuest abgeschlossen. Belohnung: 10 Snuvis!");
-				addMoney(player, 10);
+				money.addBoost(player, 10);
 				quest.finish(script, player);
 			}
 		}

+ 1 - 1
story/admont/gaumenschmauss.txt

@@ -138,7 +138,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		msg.prefix(player, "§dDieter", "Super! Das wird ein einzigartiger Gaumenschmaus.");
 		player.safeGiveItem(player, read.item("minecraft:cooked_beef"));
 		msg(player, "§dQuest abgeschlossen. Belohnung: 10 Snuvis!");
-		addMoney(player, 10);
+		money.addBoost(player, 10);
 		quest.finish(script, player);
 	}
 }

+ 1 - 1
story/admont/helfende_hand.txt

@@ -117,7 +117,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			msg.prefix(player, "§dGustav", "Das kann ich nicht gebrauchen.");
 		}
 		if(coal_given >= 4 && iron_given >= 3 && wool_given >= 6) {
-			addMoney(player, 8);
+			money.addBoost(player, 8);
 			msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
 			quest.finish(script, player);
 		}

+ 2 - 2
story/admont/hide_and_seek.txt

@@ -61,12 +61,12 @@ if(event == "custom_command" && command == "questanswer") {
 	option = list.getIndex(args, 0);
 	if(option == "A") {
 		msg(player, "§dQuest abgeschlossen. Belohnung: 3 Snuvis!");
-		addMoney(player, 3);
+		money.addBoost(player, 3);
 		quest.finish(script, player);
 	}
 	if(option == "B") {
 		msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
-		addMoney(player, 8);
+		money.addBoost(player, 8);
 		quest.finish(script, player);
 	}
 }

+ 1 - 1
story/admont/ich_und_mein_holz.txt

@@ -51,7 +51,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		wusi = human.giveItem("Förster", player, "minecraft:spruce_log", 32);
 		if(wusi == 0) {
 			msg.prefix(player, "§dFörster", "Danke, ich werde es zur Verarbeitung weiterreichen");
-			addMoney(player, 8);
+			money.addBoost(player, 8);
 			msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
 			quest.finish(script, player);
 		}

+ 1 - 1
story/admont/in_eile.txt

@@ -88,7 +88,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				msg.prefix(player, "§dBauer", "Du kommst gerade rechtzeitig, die Kunden sind eben eingetroffen! Hier eine Belohnung.");
 				player.giveItem(player, read.item("km:berry_work"));
 				msg(player, "§dQuest abgeschlossen. Belohnung: 5 Snuvis!");
-				addMoney(player, 5);
+				money.addBoost(player, 5);
 				quest.finish(script, player);
 			}
 		}

+ 1 - 1
story/admont/kraeutermeister.txt

@@ -298,7 +298,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		}
 		if(brown_mushroom_given >= brown_mushroom_needed && red_mushroom_given >= red_mushroom_needed && nether_wart_given >= nether_wart_needed && crimson_roots_given >= crimson_roots_needed && crimson_fungus_given >= crimson_fungus_needed && warped_roots_given >= warped_roots_needed && warped_fungus_given >= warped_fungus_needed && twisting_vines_given >= twisting_vines_needed) {
 			msg.prefix(player, "§dKunibert", "Damit kann ich einiges anstellen. Vielen Dank!");
-			addMoney(player, 12);
+			money.addBoost(player, 12);
 			msg(player, "§dQuest abgeschlossen. Belohnung: 12 Snuvis!");
 			quest.finish(script, player);
 		}

+ 1 - 1
story/admont/merle_in_noeten.txt

@@ -40,7 +40,7 @@ if(event == "living_death") {
 		mob_killed = true;
 		msg.prefix(player, "§dMerle", "Danke! Jetzt kann ich wieder beruhigt einschlafen.");
 		msg(player, "§dQuest abgeschlossen. Belohnung: 3 Snuvis!");
-		addMoney(player, 3);
+		money.addBoost(player, 3);
 		quest.finish(script, player);
 	}
 }

+ 1 - 1
story/admont/mitbringsel.txt

@@ -163,7 +163,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		elseif(item_type == "minecraft:blue_orchid") {
 			player.removeItem(player, read.item(item_type));
 			msg.prefix(player, "§dOlaf", "Wie lieb von ihm!");
-			addMoney(player, 5);
+			money.addBoost(player, 5);
 			msg(player, "§dQuest abgeschlossen. Belohnung: 5 Snuvis!");
 			quest.finish(script, player);
 		}

+ 2 - 2
story/admont/reinigung.txt

@@ -74,7 +74,7 @@ if(event == "custom_command" && command == "questanswer") {
 	if(option == "B") {
 		msg.prefix(player, "§dOlaf", "Das ist zwar schade, aber du hast sie ja auch gefunden. Viel Spaß damit.");
 		msg(player, "§dQuest abgeschlossen. Belohnung: 2 Snuvis!");
-		addMoney(player, 2);
+		money.addBoost(player, 2);
 		quest.finish(script, player);
 	}
 }
@@ -92,7 +92,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		elseif(item_type == "minecraft:nautilus_shell") {
 			player.removeItem(player, read.item(item_type));
 			msg(player, "§dQuest abgeschlossen. Belohnung: 4 Snuvis!");
-			addMoney(player, 4);
+			money.addBoost(player, 4);
 			quest.finish(script, player);
 		}
 	}

+ 1 - 1
story/admont/schatz_von_admont.txt

@@ -66,7 +66,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			scheduler.msgPrefix(30, player, "§dHerbert", "Den Diamanten behalte ich.");
 			scheduler.msgPrefix(60, player, "§dHerbert", "Die Goldbarren hast du dir verdient.");
 			player.removeItem(player, read.item("minecraft:diamond"));
-			addMoney(player, 8);
+			money.addBoost(player, 8);
 			scheduler.msg(65, player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
 			scheduler.questFinish(65, script, player);
 		} else {

+ 1 - 1
story/admont/spezialwunsch.txt

@@ -108,7 +108,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			player.removeItem(player, read.item(item_type));
 			if(hay_given == hay_needed) {
 				msg(player, "§dQuest abgeschlossen. Belohnung: 4 Snuvis!");
-				addMoney(player, 4);
+				money.addBoost(player, 4);
 				quest.finish(script, player);
 			}
 		}

+ 1 - 1
story/admont/tuecher.txt

@@ -248,7 +248,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			give_amount = item.getAmount(rest_item);
 			if(give_amount == 0) {
 				msg.prefix(player, "§dRolf", "Vielen Dank!");
-				addMoney(player, 8);
+				money.addBoost(player, 8);
 				msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
 				quest.finish(script, player);
 			}

+ 1 - 1
story/admont/zauberlehrling.txt

@@ -51,7 +51,7 @@ goto("wait");
 @stage1
 if(event == "player_move") {
 	if(id == move_id) {
-		addMoney(player, 5);
+		money.addBoost(player, 5);
 		msg(player, "§dQuest abgeschlossen. Belohnung: 5 Snuvis!");
 		quest.finish(script, player);
 	}

+ 20 - 0
system/chat.txt

@@ -24,6 +24,8 @@ list.add(nomessageworlds, world.get("games"));
 
 colorcodedeath = "§9";
 death_prefix = "§0§lx §r";
+headlist = list.new();
+headlist2 = list.new();
 
 defaultdeaths = list.new();
 list.add(defaultdeaths, concat(colorcodedeath, " bled out."));
@@ -217,10 +219,28 @@ goto("wait");
 
 function player.greet(player) {
 	player_name = player.getName(player);
+	title.reset(player);
 	title.setSub(player, concat("§cNice to see you §6", player_name));
 	title.send(player, "");
+	list.add($headlist, player);
+	sgoto(20, "showHead");
 }
 
+@showHead
+p = list.getIndex(headlist, 0);
+list.removeIndex(headlist, 0);
+p_name = player.getName(p);
+head.add(p, 0, p_name, 0.4, 0.1, 0.2, 0.35);
+list.add($headlist2, p);
+sgoto(60, "removeHead");
+goto("wait");
+
+@removeHead
+p = list.getIndex(headlist2, 0);
+list.removeIndex(headlist2, 0);
+head.remove(p, 0);
+goto("wait");
+
 function rank.removeTimeOffert(player) {
 	player_uuid = player.getUuid(player);
 	list = getScriptVar("rank_playtime_list");

+ 149 - 25
system/commands.txt

@@ -130,6 +130,7 @@ 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("voxel", "Set radius for voxel");
 command.register("warn", "Warns a player");
 command.register("warp", "Warp-Commands");
@@ -233,6 +234,7 @@ if(live_set == null) {
 	}
 }
 
+afk_loop_active = false;
 afk_map = getScriptVar("afk_map");
 if(afk_map == null) {
 	afk_map = map.new();
@@ -245,13 +247,21 @@ if(afk_map == null) {
 		player = player.get(map.getKey(element));
 		if(player != null) {
 			player.setAfk(player, true);
+			afk_loop_active = true;
+			
 		}
 	}
 }
+if(afk_loop_active) {
+	sgoto(30, "afk_loop");
+}
 
-setScriptVar("hawkeye_lists", map.new());
+setScriptVar("ha_data_lists", map.new());
+setScriptVar("ha_undo_lists", map.new());
+money.setBoostFactor(1);
 
 sgoto(10, "coordsloop");
+sgoto(1200, "afk_checker_loop");
 
 clan_invitations = list.new();
 friend_requests = map.new();
@@ -267,6 +277,7 @@ ride_set = set.new();
 fields = set.new();
 vanish_set = set.new();
 skip_night_set = set.new();
+afk_checker_map = map.new();
 
 butcher_set = set.new();
 set.add(butcher_set, "zombie");
@@ -427,6 +438,10 @@ inv.setItem(skip_night_inv, 1, read.item("km:gem_stone", 1, "§fI don't care"));
 inv.setItem(skip_night_inv, 2, read.item("km:cross_red", 1, "§fNo"));
 skip_night_inv_id = inv.getId(skip_night_inv);
 
+vote_inv = inv.new("222222222");
+inv.setItem(vote_inv, 0, read.item("km:coin_gold", 1, "§fMoneyBooster", "Doubles incoming money for 5 minutes.", "Cost: 30 VP"));
+vote_inv_id = inv.getId(vote_inv);
+
 ha_tool = read.item("km:guild_block", 1, "§cHawkeye Tool", "Hawkeye Tool");
 
 consoleCommands = set.new();
@@ -453,7 +468,6 @@ databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS homes (playe
 last_skip_night = 0;
 skip_night_started = false;
 jail_loop_active = false;
-afk_loop_active = false;
 
 actual_move_id = map.new(); //Key: player_uuid, Value: move_id. Diese Map speichert das aktuell betretene Plot eines Spielers.
 plot_move_ids_list = list.new(); //Speichert Array mit plot_id und move_id
@@ -640,6 +654,7 @@ if(event == "missing_command") {
 	goto("wait");
 }
 if(event == "player_logout") {
+	map.remove(afk_checker_map, uuid);
 	player.setAfk(player, false);
 	list.remove(jailed_list, player.getUuid(player));
 	if(player.hasQuest2(player)) {
@@ -695,6 +710,24 @@ if(event == "inv_click") {
 		inv.update(player);
 		goto("wait");
 	}
+	if(inv_id == vote_inv_id) {
+		if(inv_slot == 0) {
+			if(money.getBoostFactor() > 1) {
+				msg.prefix(player, prefix_commands, "Boost already active.");
+				goto("wait");
+			}
+			vp = player.getVotePoints(player);
+			if(vp < 30) {
+				msg.prefix(player, prefix_commands, "Not enough vote points.");
+				goto("wait");
+			}
+			player.setVotePoints(player, vp - 30);
+			msg("online", "§6§k#§rMoneyBooster activated!!!§6§k#");
+			money.setBoostFactor(2);
+			sgoto(6000, "resetMoneyBoost");
+		}
+		goto("wait");
+	}
 	if(inv_id == skip_night_inv_id) {
 		world = world.getOverWorld();
 		world_time = world.getTime(world);
@@ -987,6 +1020,10 @@ goto("wait");
 msg.prefix(player, prefix_commands, "Your pc got hacked now.");
 goto("wait");
 
+@resetMoneyBoost
+money.setBoostFactor(1);
+goto("wait");
+
 @skip_night_loop
 skip_night_counter--;
 if(skip_night_counter == 0) {
@@ -1631,6 +1668,10 @@ var = script.getVar(script, var_name);
 msg.prefix(player, "§dScript", concat(var_name, " = ", var));
 goto("wait");
 
+@vote
+inv.open(vote_inv, player, concat("Your vote points: §6", text.number(player.getVotePoints(player))));
+goto("wait");
+
 @voxel
 if(size < 1) {
 	@voxelhelp
@@ -1761,6 +1802,7 @@ if(size == 0) {
 	msg.prefix(player, prefix_party, "§r/hawkeye ...");
 	msg(player, "§5 - search <parameters> §rSearch for griefs");
 	msg(player, "§5 - rollback §rRollback last search");
+	msg(player, "§5 - undo §rUndos your last rollback");
 	msg(player, "§5 - tool §rGives you the Hawkeye Tool");
 	msg(player, "");
 	msg(player, "§5 - Parameters:");
@@ -1778,19 +1820,19 @@ if(arg0 == "tool") {
 if(arg0 == "print") {
 	side = list.getIndex(args, 1);
 	if(!isDouble(side)) {
-		msg.prefix(player, prefix_commands, "Zahl erwartet.");
+		msg.prefix(player, prefix_commands, "Number expected.");
 		goto("wait");
 	}
 	if(side < 1) {
-		msg.prefix(player, prefix_commands, "Zahl größer 0 erwartet.");
+		msg.prefix(player, prefix_commands, "Positive number expected.");
 		goto("wait");
 	}
-	list = hawkeye.getPlayerList(player);
+	list = hawkeye.getDataList(player);
 	if(list == null) {
 		goto("wait");
 	}
 	if(side > list.getSize(list)) {
-		msg.prefix(player, prefix_commands, "Ungültige Zahl.");
+		msg.prefix(player, prefix_commands, "Invalid number.");
 		goto("wait");
 	}
 	hawkeye.print(player, list, side);
@@ -1815,20 +1857,20 @@ if(arg0 == "search") {
 	l = hawkeye.getData(timeFrom, timeTo, player_loc, radius, events, players, "DESC");
 	if(text.class(l) == "String") {
 		msg.prefix(player, prefix_hawkeye, l);
-		hawkeye.setPlayerList(player, list.new());
+		hawkeye.setDataList(player, list.new());
 		goto("wait");
 	}
 	if(list.getSize(l) == 0) {
 		msg.prefix(player, prefix_hawkeye, "No results found.");
-		hawkeye.setPlayerList(player, list.new());
+		hawkeye.setDataList(player, list.new());
 		goto("wait");
 	}
-	hawkeye.setPlayerList(player, l);
+	hawkeye.setDataList(player, l);
 	hawkeye.print(player, l, 1);
 	goto("wait");
 }
 if(arg0 == "rollback") {
-	l = hawkeye.getPlayerList(player);
+	l = hawkeye.getDataList(player);
 	if(l == null) {
 		msg.prefix(player, prefix_hawkeye, "No results to rollback.");
 		goto("wait");
@@ -1842,9 +1884,25 @@ if(arg0 == "rollback") {
 		goto("wait");
 	}
 	counter = hawkeye.rollback(l);
+	hawkeye.setUndoList(player, l);
 	msg.prefix(player, prefix_hawkeye, concat(text.number(counter), " blocks rollbacked."));
 	goto("wait");
 }
+if(arg0 == "undo") {
+	l = hawkeye.getUndoList(player);
+	if(l == null) {
+		msg.prefix(player, prefix_hawkeye, "No rollback to undo.");
+		goto("wait");
+	}
+	if(list.getSize(l) == 0) {
+		msg.prefix(player, prefix_hawkeye, "No rollback to undo.");
+		goto("wait");
+	}
+	hawkeye.undo(l);
+	hawkeye.setUndoList(player, list.new());
+	msg.prefix(player, prefix_hawkeye, "Undo done.");
+	goto("wait");
+}
 goto("wait");
 
 @news
@@ -2040,6 +2098,48 @@ if(size > 0) {
 }
 goto("wait");
 
+@afk_checker_loop
+online_list = players.toList();
+iter = list.iterator(online_list);
+while(hasNext(iter)) {	
+	uuid = next(iter);
+	p = player.get(uuid);
+	yaw = loc.getYaw(entity.getLocation(p));
+	a = map.get(afk_checker_map, uuid);
+	if(a == null) {
+		a = array.new(2);
+		a[0] = yaw;
+		a[1] = 0;
+		map.add(afk_checker_map, uuid, a);
+		continue;
+	}
+	last_yaw = a[0];
+	counter = a[1];
+	if(last_yaw == yaw) {
+		counter++;
+	} else {
+		counter = 0;
+	}
+	a[0] = yaw;
+	a[1] = counter;
+	map.add(afk_checker_map, uuid, a);
+	if(counter == 3) {
+		nickname = player.getNickname(p);
+		if(player.isAfk(p)) {
+			continue;
+		}
+		msg.prefix("online", prefix_commands, concat(nickname, "§7 is now afk."));
+		player.setAfk(p, true);
+		player.setTabName(p);
+		if(!afk_loop_active) {
+			sgoto(30, "afk_loop");
+		}
+	}
+}
+sgoto(1200, "afk_checker_loop");
+goto("wait");
+
+
 @pvp
 if(size == 0) {
 	if(hasPvpOn(player)) {
@@ -2166,7 +2266,7 @@ if(size == 0) {
 		msg(player, "§6 - list <player>");
 	}
 	if(perm.has(player, "perm.toggle")) {
-		msg(player, "§6 - toggle <player>");
+		msg(player, "§6 - toggle");
 	}
 	goto("wait");
 }
@@ -2576,7 +2676,7 @@ if(arg0 == "list") {
 	databank.close(result);
 	databank.close(getTippsListStatement);
 	if(counter == 0) {
-		msg.prefix(player, prefix_tips, "§rIm Moment stehen keine Tipps zur Verfügung.");
+		msg.prefix(player, prefix_tips, "No tips available.");
 	}
 	goto("wait");
 }
@@ -2587,8 +2687,9 @@ if(arg0 == "add") {
 	}
 	tipp_key = list.getIndex(args, 1);
 	tipp_value = concatList(args, " ", 2, size - 1);
+	tipp_value = text.replace(tipp_value, "&", "§");
 	tipp.register(tipp_key, tipp_value);
-	msg.prefix(player, prefix_tips, "§rDer Tipp wurde hinzugefügt.");
+	msg.prefix(player, prefix_tips, "Tip added.");
 	goto("wait");
 }
 if(arg0 == "remove") {
@@ -2598,28 +2699,52 @@ if(arg0 == "remove") {
 	}
 	tipp_key = list.getIndex(args, 1);
 	removeTippStatement = databank.prepare("DELETE FROM tipps WHERE tipp_key = ?;");
-	databank.setInt(removeTippStatement, 1, tipp_key);
+	databank.setString(removeTippStatement, 1, tipp_key);
 	databank.workerExecute(removeTippStatement);
-	msg.prefix(player, prefix_tips, "§rDer Tipp wurde entfernt.");
+	msg.prefix(player, prefix_tips, "Tip removed.");
 	goto("wait");
 }
 tipp_key = arg0;
 tipp_value = tipp.get(tipp_key);
 if(tipp_value == null) {
-	msg.prefix(player, prefix_tips, "§rDer Tipp existiert nicht.");
+	msg.prefix(player, prefix_tips, "This tip does not exist.");
 	goto("wait");
 }
+link = false;
+if(text.contains(tipp_value, "https://")) {
+	link = true;
+	https_index = text.indexOf(tipp_value, "https://", 0);
+	space_index = text.indexOf(tipp_value, " ", https_index);
+	length = text.length(tipp_value);
+	if(https_index == 0) {
+		msg_before = "";
+	} else {
+		msg_before = text.subString(tipp_value, 0, https_index);
+	}
+	if(space_index == -1) {
+		msg_link = text.subString(tipp_value, https_index, length);
+		msg_after = "";
+	} else {
+		msg_link = text.subString(tipp_value, https_index, space_index);
+		msg_after = text.subString(tipp_value, space_index, length);
+	}
+	msg_link = text.link(msg_link, msg_link);
+}
 if(size == 1) {
-	msg.prefix("online", prefix_tips, tipp_value);
+	p = "online";
 } else {
 	p_name = list.getIndex(args, 1);
 	if(!isOnline(p_name)) {
-		msg.prefix(player, prefix_tips, "§rDieser Spieler ist nicht online");
+		msg.prefix(player, prefix_tips, "This player is not online.");
 		goto("wait");
 	}
 	p = read.player(p_name);
-	msg.prefix(p, prefix_tips, tipp_value);
-	msg.prefix(player, prefix_tips, concat("§rDer Tipp wurde §7", p_name, "§r gesendet."));
+	msg.prefix(player, prefix_tips, concat("Tip sent to §7", p_name, "§r."));
+}
+if(link) {
+	msg(p, concat("§r[", prefix_tips, "§r] "), msg_before, msg_link, msg_after);
+} else {
+	msg(p, concat("§r[", prefix_tips, "§r] ", tipp_value));
 }
 goto("wait");
 
@@ -3954,9 +4079,9 @@ p = read.player(p_name);
 p_name = player.getName(p);
 if(p_name == "marvinius") {
 	msg(player, "§cSorry §b¯\\_(ツ)_/¯");
-	goto("wait");
+	//goto("wait");
 }
-head.add(p, 0, sender_name, 160, 50, 20);
+head.add(p, 0, sender_name, 0.4, 0.05, 0.2, 0.35);
 title.setSub(p, "is watching you");
 title.send(p, concat("§c", sender_name));
 list.add(warninglist, p_name);
@@ -8020,14 +8145,13 @@ function setCommandHelps() {
 	helpArg0 = command.newHelpLiteral("search");
 	command.addHelpChild(helpArg0, command.newHelpString("name", true));
 	command.addHelpChild(help, helpArg0);
+	//hawkeye undo
+	command.addHelpChild(help, command.newHelpLiteral("undo"));
 	//hawkeye rollback
 	command.addHelpChild(help, command.newHelpLiteral("rollback"));
 	//hawkeye tool
 	command.addHelpChild(help, command.newHelpLiteral("tool"));
 	commandhelp.addAlias(help, "ha", "hawkeye");
-	
-	command.addHelpChild(help, command.newHelpInt("radius", 1, 5));
-	command.addHelpChild(help, command.newHelpLiteral("block"));
 	command.addHelp(help);
 	
 	help = command.newHelp("voxel", "voxel");

+ 2 - 2
system/hawkeye.txt

@@ -54,7 +54,7 @@ if(event == "block_place") {
 			msg.prefix(player, prefix_hawkeye, "No results found.");
 			goto("wait");
 		}
-		hawkeye.setPlayerList(player, list);
+		hawkeye.setDataList(player, list);
 		hawkeye.print(player, list, 1);
 		goto("wait");
 	}
@@ -72,7 +72,7 @@ if(event == "block_click") {
 			msg.prefix(player, prefix_hawkeye, "No results found.");
 			goto("wait");
 		}
-		hawkeye.setPlayerList(player, list);
+		hawkeye.setDataList(player, list);
 		hawkeye.print(player, list, 1);
 	}
 	goto("wait");

+ 1 - 1
system/herobrine.txt

@@ -8,7 +8,7 @@ wait();
 if(event == "human_hurt") {
 	entity_name = entity.getName(human);
 	if(list.contains(herobrines, human)) {
-		entity.damage(entity, 10, damage.get("thorns", human));
+		entity.damage(entity, 4, damage.get("thorns", human));
 	}
 	goto("wait");
 }

+ 2 - 1
system/perms.txt

@@ -85,6 +85,7 @@ perm.registerGroup(0, "stopadventure");
 perm.registerGroup(0, "warp");
 perm.registerGroup(0, "nextplayer");;
 perm.registerGroup(0, "user");
+perm.registerGroup(0, "vote");
 perm.registerGroup(0, "startgame");
 perm.registerGroup(0, "infopoint1");
 perm.registerGroup(0, "infopoint2");
@@ -412,7 +413,7 @@ perm.registerGroup(14, "setmessage");
 perm.registerGroup(14, "color");
 perm.registerGroup(14, "hat");
 
-//Block und Plot-Bypass (ausgegliedert, um beim Entfernen der Perm nicht die ganze Perm-Group entfernen zu müssen)
+//Plot-Bypass ausgegliedert, um beim Entfernen der Perm nicht die ganze Perm-Group entfernen zu müssen
 perm.registerGroup(15, "plot.bypass");
 
 //Show Debug Messages

+ 15 - 7
system/survival.txt

@@ -111,6 +111,8 @@ grass = "minecraft:grass";
 iron_nugget = "minecraft:iron_nugget";
 hay_bundle = "km:hay_bundle";
 real_hay_block = "km:real_hay_block";
+dye_tag = item.getTag("km:dye");
+sign_tag = block.getTag("minecraft:signs");
 
 recipe.add(1, "minecraft:saddle", leather, leather, leather, leather, string, leather, air, iron_ingot, air);
 recipe.add(1, "km:bronze_helmet", bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, air, bronze_ingot, air, air, air);
@@ -262,7 +264,7 @@ if(event == "player_move") {
 		time = map.getOrDefault(afk_loop_map, player_uuid, 0);
 		if(now_time - time > 9000) { //9 Sekunden
 			map.add(afk_loop_map, player_uuid, now_time);
-			addMoney(player, 1);
+			money.addBoost(player, 1);
 		}
 		goto("wait");
 	}
@@ -630,9 +632,7 @@ if(duration > 0) {
 		do = false;
 	}
 	if(do) {
-		item = block.toStack(loc);
-		item.drop(loc, item);
-		block.set(loc, "minecraft:air");
+		block.break(loc, player);
 	}
 }
 duration = data.getTimer(player, "block_up");
@@ -647,14 +647,22 @@ if(duration > 0) {
 		do = false;
 	}
 	if(do) {
-		item = block.toStack(loc);
-		item.drop(loc, item);
-		block.set(loc, "minecraft:air");
+		block.break(loc, player);
 	}
 }
 goto("wait");
 
 @block_click
+if(action == "right" && player.checkHandsForTag(player, dye_tag)) {
+	if(block.hasTag(sign_tag, block)) {
+		if(!perm.has(player, "plot.bypass")) {
+			if(!plot.check(block_loc, player, 3, true)) {
+				cancel = true;
+				goto("wait");
+			}
+		}
+	}
+}
 if(hand == "OFF_HAND") {
 	goto("wait");
 }

+ 0 - 11
test.txt

@@ -1,11 +0,0 @@
-event.load("block_place");
-
-böser_spieler_name = "marvinius";
-
-@sprungmarke
-wait();
-if(player_name == böser_spieler_name) {
-	msg(player, "Böse!");
-	cancel = true;
-}
-goto("sprungmarke");

+ 0 - 4
test2.txt

@@ -1,4 +0,0 @@
-databank.workerExecute(databank.prepare("DROP table hawkeye_data"));
-databank.workerExecute(databank.prepare("DROP table hawkeye"));
-waitfor(10);
-term();

+ 121 - 31
utils/u_general.txt

@@ -1463,6 +1463,17 @@ function player.getValidId(player_or_id) {
 	return null;
 }
 
+function player.getValid(player_or_id) {
+	if(isPlayer(player_or_id)) {
+		return player_or_id;
+	}
+	player = player.get(player.getUuidFromId(player_or_id));
+	if(player == null) {
+		return null;
+	}
+	return player;
+}
+
 //--------------------------------------------------
 //Msg-Utils
 //--------------------------------------------------
@@ -2027,6 +2038,17 @@ function player.setNoPetDamage(player_or_id, boolean) {
 	config.saveAsync(config);
 }
 
+function player.setVotePoints(player_or_id, amount) {
+	config = playerdata.getSurvival(player_or_id);
+	config.set(config, "votepoints", amount);
+	config.saveAsync(config);
+}
+
+function player.getVotePoints(player_or_id) {
+	config = playerdata.getSurvival(player_or_id);
+	return config.getDouble(config, "votepoints", 0);
+}
+
 function player.hasFirstJoin(player_or_id) {
 	config = playerdata.getSurvival(player_or_id);
 	return config.getBool(config, "firstjoin", true);
@@ -2177,17 +2199,33 @@ function setMoney(player_or_id, money) {
 	config = playerdata.getSurvival(player_or_id);
 	config.set(config, "money", money);
 	config.saveAsync(config);
-	if(isPlayer(player_or_id)) {
-		player = player_or_id;
-	} else {
-		player = player.get(player.getUuidFromId(player_or_id));
-		if(player == null) {
-			return;
-		}
+	player = player.getValid(player_or_id);
+	if(player == null) {
+		return;
 	}
 	displayMoney(player, new_money);
 }
 
+function money.getBoostFactor() {
+	return getScriptVar("money_factor");
+}
+
+function money.setBoostFactor(factor) {
+	setScriptVar("money_factor", factor);
+}
+
+function money.addBoost(player_or_id, money) {
+	money *= money.getBoostFactor();
+	player = player.getValid(player_or_id);
+	if(player == null) {
+		return;
+	}
+	if(money.getBoostFactor() > 1) {
+		money.popUp(player, money, true);
+	}
+	addMoney(player, money);
+}
+
 function addMoney(player_or_id, money) {
 	if(money == 0) {
 		return;
@@ -2196,16 +2234,12 @@ function addMoney(player_or_id, money) {
 	new_money = config.getDouble(config, "money", 0) + money;
 	config.set(config, "money", new_money);
 	config.saveAsync(config);
-	if(isPlayer(player_or_id)) {
-		player = player_or_id;
-	} else {
-		player = player.get(player.getUuidFromId(player_or_id));
-		if(player == null) {
-			return;
-		}
+	player = player.getValid(player_or_id);
+	if(player == null) {
+		return;
 	}
 	displayMoney(player, new_money);
-	player.action(player, concat("+§6", text.number(money), " §rsnuvi"));
+	money.popUp(player, money, false);
 }
 
 function subMoney(player_or_id, money) {
@@ -2216,16 +2250,38 @@ function subMoney(player_or_id, money) {
 	new_money = config.getDouble(config, "money", 0) - money;
 	config.set(config, "money", new_money);
 	config.saveAsync(config);
-	if(isPlayer(player_or_id)) {
-		player = player_or_id;
-	} else {
-		player = player.get(player.getUuidFromId(player_or_id));
-		if(player == null) {
-			return;
-		}
+	player = player.getValid(player_or_id);
+	if(player == null) {
+		return;
 	}
 	displayMoney(player, new_money);
-	player.action(player, concat("-§6", text.number(money), " §rsnuvi"));
+	money.popUp(player, money, false);
+}
+
+function money.popUp(player, money, boosted) {
+	if($boost_blocker == null) {
+		$boost_blocker = false;
+	}
+	if($boost_blocker) {
+		$boost_blocker = false;
+		return;
+	}
+	if(money == 0) {
+		return;
+	}
+	if(money > 0) {
+		pre = "+";
+	}
+	if(money < 0) {
+		pre = "-";
+	}
+	if(boosted) {
+		$boost_blocker = true;
+		post = " §6§k#§rBoosted§6§k#";
+	} else {
+		post = "";
+	}
+	player.action(player, concat(pre, "§6", text.number(money), " §rsnuvi", post));
 }
 
 function displayMoney(player, money) {
@@ -4032,22 +4088,29 @@ function hawkeye.print(player, list, side) {
 	msg(player, "§7-----------------------------");
 }
 
-function hawkeye.setPlayerList(player, list) {
-	map.add(getScriptVar("hawkeye_lists"), player.getUuid(player), list);
+function hawkeye.setDataList(player, list) {
+	map.add(getScriptVar("ha_data_lists"), player.getUuid(player), list);
 }
 
-function hawkeye.getPlayerList(player) {
-	return map.get(getScriptVar("hawkeye_lists"), player.getUuid(player));
+function hawkeye.getDataList(player) {
+	return map.get(getScriptVar("ha_data_lists"), player.getUuid(player));
 }
 
+function hawkeye.setUndoList(player, list) {
+	map.add(getScriptVar("ha_undo_lists"), player.getUuid(player), list);
+}
+
+function hawkeye.getUndoList(player) {
+	return map.get(getScriptVar("ha_undo_lists"), player.getUuid(player));
+}
+
+
 function hawkeye.rollback(list) {
 	counter = 0;
 	for(i = 0; i < list.getSize(list); i++) {
 		a = list.getIndex(list, i);
-		player_id = a[1];
 		event = a[2];
 		loc = a[3];
-		time = a[4];
 		detail_l = a[5];
 		str = "";
 		detail_iter = list.iterator(detail_l);
@@ -4062,12 +4125,39 @@ function hawkeye.rollback(list) {
 			}
 		}
 		if(event == "block_place") {
-			block.set(loc, "minecraft:air");
+			block.set(loc, "minecraft:air", true);
 			counter++;
 		} elseif(event == "block_break") {
-			block.set(loc, concat(block_type, "[", str, "]"));
+			block.set(loc, concat(block_type, "[", str, "]"), true);
 			counter++;
 		}
 	}
 	return counter;
+}
+
+
+function hawkeye.undo(list) {
+	for(i = list.getSize(list) - 1; i >= 0; i--) {
+		a = list.getIndex(list, i);
+		event = a[2];
+		loc = a[3];
+		detail_l = a[5];
+		str = "";
+		detail_iter = list.iterator(detail_l);
+		while(hasNext(detail_iter)) {
+			detail_a = next(detail_iter);
+			name = detail_a[0];
+			value = detail_a[1];
+			if(name == "block_type") {
+				block_type = value;
+			} else {
+				str = concat(str, name, "=", value,",");
+			}
+		}
+		if(event == "block_place") {
+			block.set(loc, concat(block_type, "[", str, "]"), true);
+		} elseif(event == "block_break") {
+			block.set(loc, "minecraft:air", true);
+		}
+	}
 }