Browse Source

fixes and features after release

mloeschenkohl 2 years ago
parent
commit
262cc7f320
46 changed files with 698 additions and 261 deletions
  1. 2 2
      docu_minecraft.php
  2. 12 0
      jan/luftballon.txt
  3. 1 0
      startcommands.txt
  4. 6 4
      startscript.txt
  5. 29 0
      stop.txt
  6. 2 2
      story/admont/albtraum.txt
  7. 4 0
      story/admont/core.txt
  8. 2 2
      story/admont/der_anfang.txt
  9. 3 3
      story/admont/die_uhr_tickt.txt
  10. 2 2
      story/admont/erntezeit.txt
  11. 4 4
      story/admont/erstes_date.txt
  12. 2 2
      story/admont/felsmagier.txt
  13. 2 2
      story/admont/fuer_die_wissenschaft.txt
  14. 2 2
      story/admont/gaumenschmauss.txt
  15. 2 2
      story/admont/helfende_hand.txt
  16. 4 4
      story/admont/hide_and_seek.txt
  17. 10 3
      story/admont/ich_und_mein_holz.txt
  18. 2 2
      story/admont/in_eile.txt
  19. 10 18
      story/admont/kraeutermeister.txt
  20. 2 2
      story/admont/merle_in_noeten.txt
  21. 2 2
      story/admont/mitbringsel.txt
  22. 4 4
      story/admont/neue_hose.txt
  23. 4 4
      story/admont/reinigung.txt
  24. 2 2
      story/admont/schatz_von_admont.txt
  25. 2 2
      story/admont/spezialwunsch.txt
  26. 2 2
      story/admont/tuecher.txt
  27. 2 2
      story/admont/zauberlehrling.txt
  28. 14 14
      system/chat.txt
  29. 36 6
      system/chestshops.txt
  30. 140 57
      system/commands.txt
  31. 2 1
      system/doors.txt
  32. 49 0
      system/fixitems.txt
  33. 4 2
      system/gamecenter.txt
  34. 2 0
      system/hawkeye.txt
  35. 20 0
      system/herobrine.txt
  36. 32 0
      system/mobspawning.txt
  37. 9 4
      system/perms.txt
  38. 1 1
      system/pumpkin.txt
  39. 3 1
      system/story.txt
  40. 22 19
      system/survival.txt
  41. 6 6
      system/timber.txt
  42. 60 0
      system/tiploop.txt
  43. 31 19
      test.txt
  44. 2 2
      utils/u_games.txt
  45. 143 55
      utils/u_general.txt
  46. 1 0
      utils/u_quest.txt

+ 2 - 2
docu_minecraft.php

@@ -763,7 +763,7 @@
         </tr>
         <tr>
             <td class="bold">Info</td>
-            <td>false means exact itemstack</td>
+            <td>true means exact itemstack</td>
         </tr>
     </table>
     <table>
@@ -3125,7 +3125,7 @@
 	<table>
         <tr>
             <th class="command">player.setDisplayName</th>
-            <th class="desc">set the name over players head</th>
+            <th class="desc">set the player's name in tab list</th>
         </tr>
         <tr>
             <td class="bold">Format</td>

+ 12 - 0
jan/luftballon.txt

@@ -1,11 +1,13 @@
 event.load("entity_click");
 event.load("block_click");
+event.load("entity_join");
 Fun_Block = "minecraft:red_wool";
 Wool_loc = loc.new(games, -459, 164, -65);
 tag = text.concat("{BlockState:{Name:\"", Fun_Block, "\"},Time:1,Motion:[0.0,0.5,0.0],DropItem:1,HurtEntities:0}");
 
 msg("dev", "§bLuftballon §rloaded.");
 @Luftballon_loop
+msg("dev", event);
 wait();
 if(event == "block_click" ){
 	if(inRegion(block_loc) && block_type == Fun_Block){
@@ -19,6 +21,16 @@ if(event == "entity_click"){
 	if(inRegion(entity.getLocation(entity)) && entity.getType(entity) == "falling_block"){
 		throw(player, falling_block_entity);
 	}
+	goto("Luftballon_loop");
+}
+if(event == "entity_join"){
+	e = entity.getType(entity);
+	msg("dev",e);
+	msg("dev", "ja");
+	/*if(item.entity.get(entity) == "red_wool" && inRegion(entity.getLocation(entity))){
+		cancel = true;
+		block.set(Wool_loc, "minecraft:red_wool");
+	}*/
 }
 goto("Luftballon_loop");
 

+ 1 - 0
startcommands.txt

@@ -1,2 +1,3 @@
+modTimer(-1000);
 script.startNamed("Commands", "system/commands", "utils/u_general", "utils/u_games");
 term();

+ 6 - 4
startscript.txt

@@ -1,7 +1,8 @@
-debug.setConsolePrint(false);
+modTimer(-3000);
+debug.setConsolePrint(true);
 clearscriptvars();
 
-//setMOTD("§eNews§7: §2Clans §f& §cCities! §f- [§d1.16.4§f]\n§cMod Download §f-> §eminecraft§7.§ehammerle§7.§eme");
+setMOTD("§d§k# §eMentorMentos §7- §bCommunity Server §d§k# §f-  [§d1.16.4§f]\n§cMod Download §f-> §eminecraft§7.§ehammerle§7.§eme");
 
 script.start("system/tables");
 script.start("system/svars");
@@ -19,6 +20,8 @@ script.startNamed("Herobrine", "utils/u_error", "system/herobrine", "utils/u_gen
 script.startNamed("Playtime", "system/playtime");
 script.startNamed("Pumpkin", "utils/u_error", "system/pumpkin", "utils/u_general");
 script.startNamed("Voxel", "system/voxel");
+script.startNamed("Mobspawning", "system/mobspawning");
+script.startNamed("Fixitems", "system/fixitems");
 script.startNamed("Sitting", "utils/u_error", "system/sitting", "utils/u_general");
 script.startNamed("Ticket", "utils/u_error", "system/tickets", "utils/u_general");
 script.startNamed("Mails", "utils/u_error", "system/mailsystem", "utils/u_general");
@@ -32,10 +35,9 @@ script.startNamed("QuestsSchiffbruch", "utils/u_error", "story/schiffbruch/core"
 script.startNamed("Workberries", "system/workberries");
 script.startNamed("Timber", "utils/u_error", "system/timber", "utils/u_general");
 script.startNamed("Loom", "utils/u_error", "system/loom", "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");
 
-script.startNamed("ReleaseLoop", "system/release_loop");
-
 error.setConsolePrint(false);
 term();

+ 29 - 0
stop.txt

@@ -0,0 +1,29 @@
+event.load("player_login");
+
+sgoto(500, "announce");
+msg.server("§4The server will stop soon!!!");
+
+@wait
+wait();
+cancel = true;
+goto("wait");
+
+@announce
+msg.server("§4The server will stop now!!!");
+sgoto(100, "stop");
+goto("wait");
+
+@stop
+online_list = players.toList();
+if(list.getSize(online_list) == 0) {
+	command("stop");
+	goto("wait");
+}
+p = list.getIndex(online_list, 0)
+list.removeIndex(online_list, 0);
+sgoto(20, "stop");
+goto("wait");
+
+@on_error
+msg("dev", "stop script termed");
+term();

+ 2 - 2
story/admont/albtraum.txt

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

+ 4 - 0
story/admont/core.txt

@@ -35,6 +35,10 @@ checkAdmontStable();
 if(player.hasQuest2(player)) {
 	goto("wait");
 }
+if(quest.isPlayerBlocked(player)) {
+	quest.removeCooldown(player);
+	goto("wait");
+}
 entity_name = entity.getName(entity);
 if(entity_name == "Oma") {
 	inv = inv.new("333333333");

+ 2 - 2
story/admont/der_anfang.txt

@@ -96,8 +96,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		if(text.item(item) == "{id:\"minecraft:potion\",Count:1b,tag:{Potion:\"minecraft:water\"}}") {
 			msg.prefix(player, "§dGastwirt", "Danke! Hier eine kleine Belohnung.");
 			player.removeItem(player, item);
-			msg(player, "§dQuest abgeschlossen. Belohnung: 10 Snuvis!");
-			money.addBoost(player, 10);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 22 Snuvis!");
+			money.addBoost(player, 22);
 			quest.finish(script, player);
 		}
 	}

+ 3 - 3
story/admont/die_uhr_tickt.txt

@@ -55,7 +55,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		item_type = item.getType(item);
 		rest_amount = human.giveItem(entity_name, player, "minecraft:gold_ingot", gold_ingot_needed);
 		if(rest_amount == 0) {
-			msg.prefix(player, "§dSchmied", "Perfekt, jetzt fehlt nurnoch hellblauer Farbstoff für das Detail.");
+			msg.prefix(player, "§dSchmied", "Perfekt, jetzt fehlt nur noch hellblauer Farbstoff für das Detail.");
 			scheduler.msgPrefix(30, player, "§dSchmied", "Pflücke eine blaue Orchidee und verarbeite sie zu Farbstoff.");
 			stage.increase(player);
 		} else {
@@ -102,8 +102,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		rest_amount = human.giveItem(entity_name, player, "minecraft:clock", 1);
 		if(rest_amount == 0) {
 			msg.prefix(player, "§dHerbert", "Das ging aber flott!");
-			msg(player, "§dQuest abgeschlossen. Belohnung: 6 Snuvis!");
-			money.addBoost(player, 6);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 22 Snuvis!");
+			money.addBoost(player, 22);
 			quest.finish(script, player);
 		}
 	}

+ 2 - 2
story/admont/erntezeit.txt

@@ -97,8 +97,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		}
 		if(wheat_needed == 0 && carrots_needed == 0) {
 			msg.prefix(player, "§dBauer", "Vielen Dank für deine Hilfe!");
-			msg(player, "§dQuest abgeschlossen. Belohnung: 7 Snuvis!");
-			money.addBoost(player, 7);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 18 Snuvis!");
+			money.addBoost(player, 18);
 			quest.finish(script, player);
 		}
 	}

+ 4 - 4
story/admont/erstes_date.txt

@@ -90,8 +90,8 @@ if(option == "A") {
 				block.addItem(book_chest_loc, item.clone(item));
 				living.setEquip(player, "hand", read.item("minecraft:air"));
 				msg.prefix(player, "§dPeter", "Vielen Dank!");
-				msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
-				money.addBoost(player, 8);
+				msg(player, "§dQuest abgeschlossen. Belohnung: 18 Snuvis!");
+				money.addBoost(player, 18);
 				quest.finish(script, player);
 			}
 		}
@@ -106,8 +106,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		rest_amount = human.giveItem(entity_name, player, "minecraft:pink_tulip", tulips_needed);
 		if(rest_amount == 0) {
 			msg.prefix(player, "§dPeter", "Vielen Dank!");
-			msg(player, "§dQuest abgeschlossen. Belohnung: 10 Snuvis!");
-			money.addBoost(player, 10);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 22 Snuvis!");
+			money.addBoost(player, 22);
 			quest.finish(script, player);
 		} else {
 			tulips_needed = rest_amount;

+ 2 - 2
story/admont/felsmagier.txt

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

+ 2 - 2
story/admont/fuer_die_wissenschaft.txt

@@ -96,8 +96,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		rest_amount = human.giveItem(entity_name, player, "minecraft:paper", paper_neded);
 		if(rest_amount == 0) {
 			msg.prefix(player, "§dIsabell", "DANKE! Du rettest mich und die Wissenschaft!");
-			msg(player, "§dQuest abgeschlossen. Belohnung: 10 Snuvis!");
-			money.addBoost(player, 10);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 24 Snuvis!");
+			money.addBoost(player, 24);
 			quest.finish(script, player);
 		} else {
 			paper_neded = rest_amount;

+ 2 - 2
story/admont/gaumenschmauss.txt

@@ -128,8 +128,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		if(rest_amount == 0) {
 			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!");
-			money.addBoost(player, 10);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 28 Snuvis!");
+			money.addBoost(player, 28);
 			quest.finish(script, player);
 		}
 	}

+ 2 - 2
story/admont/helfende_hand.txt

@@ -112,8 +112,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 			}
 		}
 		if(coal_needed == 0 && iron_needed == 0 && wool_needed == 0) {
-			money.addBoost(player, 8);
-			msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
+			money.addBoost(player, 20);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 20 Snuvis!");
 			quest.finish(script, player);
 		}
 	}

+ 4 - 4
story/admont/hide_and_seek.txt

@@ -60,13 +60,13 @@ if(event == "custom_command" && command == "questanswer") {
 	msg.prefix(player, "§dBernd", "Ha! Der wird sich wundern, dass ich ihn so schnell finde. Danke!");
 	option = list.getIndex(args, 0);
 	if(option == "A") {
-		msg(player, "§dQuest abgeschlossen. Belohnung: 3 Snuvis!");
-		money.addBoost(player, 3);
+		msg(player, "§dQuest abgeschlossen. Belohnung: 9 Snuvis!");
+		money.addBoost(player, 9);
 		quest.finish(script, player);
 	}
 	if(option == "B") {
-		msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
-		money.addBoost(player, 8);
+		msg(player, "§dQuest abgeschlossen. Belohnung: 18 Snuvis!");
+		money.addBoost(player, 18);
 		quest.finish(script, player);
 	}
 }

+ 10 - 3
story/admont/ich_und_mein_holz.txt

@@ -41,6 +41,13 @@ if(event == "block_break") {
 			stage.increase(player);
 		}
 	}
+	goto("wait");
+}
+if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "human") {
+	entity_name = entity.getName(entity);
+	if(entity_name == "Förster") {
+		player.giveSingleItem(player, read.item("minecraft:stone_axe"), false);
+	}
 }
 goto("wait");
 
@@ -48,11 +55,11 @@ goto("wait");
 if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "human") {
 	entity_name = entity.getName(entity);
 	if(entity_name == "Förster") {
-		rest_amount = human.giveItem("Förster", player, "minecraft:spruce_log", 1);
+		rest_amount = human.giveItem("Förster", player, "minecraft:spruce_log", spruce_log);
 		if(rest_amount == 0) {
 			msg.prefix(player, "§dFörster", "Danke, ich werde es zur Verarbeitung weiterreichen");
-			money.addBoost(player, 8);
-			msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
+			money.addBoost(player, 24);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 24 Snuvis!");
 			quest.callShowShop(player, "foerster");
 			quest.finish(script, player);
 		} else {

+ 2 - 2
story/admont/in_eile.txt

@@ -76,8 +76,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		if(rest_amount == 0) {
 			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!");
-			money.addBoost(player, 5);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 15 Snuvis!");
+			money.addBoost(player, 15);
 			quest.finish(script, player);
 		} else {
 			bread_needed = rest_amount;

+ 10 - 18
story/admont/kraeutermeister.txt

@@ -207,9 +207,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, brown_mushroom_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für die braunen Pilze.");
-				} else {
-					brown_mushroom_needed = rest_amount;
 				}
+				brown_mushroom_needed = rest_amount;
 			}
 		}
 		elseif(item_type == "minecraft:red_mushroom") {
@@ -217,9 +216,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, red_mushroom_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für die roten Pilze.");
-				} else {
-					red_mushroom_needed = rest_amount;
 				}
+				red_mushroom_needed = rest_amount;
 			}
 		}
 		elseif(item_type == "minecraft:nether_wart") {
@@ -227,9 +225,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, nether_wart_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für die Netherwarzen.");
-				} else {
-					nether_wart_needed = rest_amount;
 				}
+				nether_wart_needed = rest_amount;
 			}
 		}
 		elseif(item_type == "minecraft:crimson_roots") {
@@ -237,9 +234,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, crimson_roots_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für die Karmesinwurzeln.");
-				} else {
-					crimson_roots_needed = rest_amount;
 				}
+				crimson_roots_needed = rest_amount;
 			}
 		}
 		elseif(item_type == "minecraft:crimson_fungus") {
@@ -247,9 +243,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, crimson_fungus_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für den Karmesinpilz.");
-				} else {
-					crimson_fungus_needed = rest_amount;
 				}
+				crimson_fungus_needed = rest_amount;
 			}
 		}
 		if(item_type == "minecraft:warped_roots") {
@@ -257,9 +252,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, warped_roots_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für die Wirrwurzeln.");
-				} else {
-					warped_roots_needed = rest_amount;
 				}
+				warped_roots_needed = rest_amount;
 			}
 		}
 		elseif(item_type == "minecraft:warped_fungus") {
@@ -267,9 +261,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, warped_fungus_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für den Wirrpilz.");
-				} else {
-					warped_fungus_needed = rest_amount;
 				}
+				warped_fungus_needed = rest_amount;
 			}
 		}
 		elseif(item_type == "minecraft:twisting_vines") {
@@ -277,15 +270,14 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 				rest_amount = human.giveItem(entity_name, player, item_type, twisting_vines_needed);
 				if(rest_amount == 0) {
 					msg.prefix(player, "§dKunibert", "Danke für die Zwirbelranken.");
-				} else {
-					twisting_vines_needed = rest_amount;
 				}
+				twisting_vines_needed = rest_amount;
 			}
 		}
 		if(brown_mushroom_needed == 0 && red_mushroom_needed == 0 && nether_wart_needed == 0 && crimson_roots_needed == 0 && crimson_fungus_needed == 0 && warped_roots_needed == 0 && warped_fungus_needed == 0 && twisting_vines_needed == 0) {
 			msg.prefix(player, "§dKunibert", "Damit kann ich einiges anstellen. Vielen Dank!");
-			money.addBoost(player, 12);
-			msg(player, "§dQuest abgeschlossen. Belohnung: 12 Snuvis!");
+			money.addBoost(player, 24);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 24 Snuvis!");
 			quest.finish(script, player);
 		}
 	}

+ 2 - 2
story/admont/merle_in_noeten.txt

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

+ 2 - 2
story/admont/mitbringsel.txt

@@ -159,8 +159,8 @@ 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!");
-			money.addBoost(player, 5);
-			msg(player, "§dQuest abgeschlossen. Belohnung: 5 Snuvis!");
+			money.addBoost(player, 15);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 15 Snuvis!");
 			quest.finish(script, player);
 		}
 	}

+ 4 - 4
story/admont/neue_hose.txt

@@ -43,7 +43,7 @@ if(event == "quest_start") {
 label = concat("stage", text.number(stage));
 goto(label);
 
-//@stage0
+@stage0
 if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "human") {
 	entity_name = entity.getName(entity);
 	if(entity_name == "Rolf") {
@@ -126,7 +126,7 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 }
 goto("wait");
 
-@stage0
+@stage6
 if(event == "item_air_click") {
 	item = living.getEquip(player, "hand");
 	item_type = item.getType(item);
@@ -143,8 +143,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		if(rest_amount == 0) {
 			inv.update(player);
 			msg.prefix(player, "§dPeter", "Vielen Dank!");
-			money.addBoost(player, 12);
-			msg(player, "§dQuest abgeschlossen. Belohnung: 12 Snuvis!");
+			money.addBoost(player, 30);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 30 Snuvis!");
 			quest.finish(script, player);
 		}
 	}

+ 4 - 4
story/admont/reinigung.txt

@@ -73,8 +73,8 @@ 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!");
-		money.addBoost(player, 2);
+		msg(player, "§dQuest abgeschlossen. Belohnung: 6 Snuvis!");
+		money.addBoost(player, 6);
 		quest.finish(script, player);
 	}
 }
@@ -86,8 +86,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 	if(entity_name == "Olaf") {
 		rest_amount = human.giveItem(entity_name, player, "minecraft:nautilus_shell", 1);
 		if(rest_amount == 0) {
-			msg(player, "§dQuest abgeschlossen. Belohnung: 4 Snuvis!");
-			money.addBoost(player, 4);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 12 Snuvis!");
+			money.addBoost(player, 12);
 			quest.finish(script, player);
 		}
 	}

+ 2 - 2
story/admont/schatz_von_admont.txt

@@ -66,8 +66,8 @@ 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"));
-			money.addBoost(player, 8);
-			scheduler.msg(65, player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
+			money.addBoost(player, 24);
+			scheduler.msg(65, player, "§dQuest abgeschlossen. Belohnung: 24 Snuvis!");
 			scheduler.questFinish(65, script, player);
 		} else {
 			msg.prefix(player, "§dHerbert", "Gib mir bitte den Schatz.");

+ 2 - 2
story/admont/spezialwunsch.txt

@@ -96,8 +96,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 	if(entity_name == "Bauer") {
 		rest_amount = human.giveItem(entity_name, player, "km:hay_bundle", hay_needed);
 		if(rest_amount == 0) {
-			msg(player, "§dQuest abgeschlossen. Belohnung: 4 Snuvis!");
-			money.addBoost(player, 4);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 12 Snuvis!");
+			money.addBoost(player, 12);
 			quest.finish(script, player);
 		} else {
 			hay_needed = rest_amount;

+ 2 - 2
story/admont/tuecher.txt

@@ -111,8 +111,8 @@ if(event == "entity_click" && hand == "MAIN_HAND" && entity.getType(entity) == "
 		rest_amount = human.giveItem(entity_name, player, "km:cloth", needed_amount);
 		if(rest_amount == 0) {
 			msg.prefix(player, "§dRolf", "Vielen Dank!");
-			money.addBoost(player, 8);
-			msg(player, "§dQuest abgeschlossen. Belohnung: 8 Snuvis!");
+			money.addBoost(player, 24);
+			msg(player, "§dQuest abgeschlossen. Belohnung: 24 Snuvis!");
 			quest.finish(script, player);
 		} else {
 			needed_amount = rest_amount;

+ 2 - 2
story/admont/zauberlehrling.txt

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

+ 14 - 14
system/chat.txt

@@ -21,9 +21,6 @@ list.add(leavemeassages, concat("has left the sick world."));
 list.add(leavemeassages, concat("came, saw and won."));
 list.add(leavemeassages, concat("faded in the face of copper."));
 
-nomessageworlds = list.new();
-list.add(nomessageworlds, world.get("games"));
-
 colorcodedeath = "§9";
 death_prefix = "§0§lx §r";
 headlist = list.new();
@@ -191,12 +188,13 @@ if(perm.has(player, "color")) {
 if(text.startsWith(message, "https://", 0)) {
 	message = text.link(message, message);
 }
-sendOnlineMessage(player, message);
+msg.online(player, message);
 goto("wait");
 
 @living_death
 world = loc.getWorld(entity.getLocation(player));
-if(list.contains(nomessageworlds, world)) {
+world_name = world.getName(world);
+if(world.isCreativeName(world_name)) {
 	goto("wait");
 }
 damage_type = damage.getType(damage_source);
@@ -208,19 +206,21 @@ if(damage_type == "player") {
 	if(item.hasName(item)) {
 		message1 = concat(death_prefix, fullname, colorcodedeath, " killed by ", killer_name, " with ");
 		message2 = item.getFullText(item);
-		sendMessageToWorld2(world, message1, message2);
-		goto("wait");
+		message = text.concat2(message1, message2);
+	} else {
+		list.clear(list);
+		list.add(list, concat(death_prefix, fullname, colorcodedeath, " got their last honour from ", killer_name, "."));
+		list.add(list, concat(death_prefix, fullname, colorcodedeath, " died by ", killer_name, "'s hand."));
+		list.add(list, concat(death_prefix, fullname, colorcodedeath, " was killed by ", killer_name, "."));
+		list.add(list, concat(death_prefix, fullname, colorcodedeath, " lost a bet to ", killer_name, "."));
+		message = list.getIndex(list, math.random(0, list.getSize(list) - 1));
 	}
-	list.clear(list);
-	list.add(list, concat(death_prefix, fullname, colorcodedeath, " got their last honour from ", killer_name, "."));
-	list.add(list, concat(death_prefix, fullname, colorcodedeath, " died by ", killer_name, "'s hand."));
-	list.add(list, concat(death_prefix, fullname, colorcodedeath, " was killed by ", killer_name, "."));
-	list.add(list, concat(death_prefix, fullname, colorcodedeath, " lost a bet to ", killer_name, "."));
-	message = list.getIndex(list, math.random(0, list.getSize(list) - 1));
 } else {
 	message = concat(death_prefix, fullname, list.getIndex(list, math.random(0, list.getSize(list) - 1)));
 }
-sendMessageToWorld(world, message);
+msg.survival(message);
+msg.creative(message);
+msg.story(message);
 goto("wait");
 
 function player.greet(player) {

+ 36 - 6
system/chestshops.txt

@@ -28,9 +28,8 @@ if(!isAWallSign(sign_loc)) {
 	goto("wait");
 }
 adminshop = isAdminShop(sign_loc);
-buy_price = item.getAmount(inv.getItem(inv, 0)) + item.getAmount(inv.getItem(inv, 1)) + item.getAmount(inv.getItem(inv, 2));
-sell_price = item.getAmount(inv.getItem(inv, 7)) + item.getAmount(inv.getItem(inv, 8)) + item.getAmount(inv.getItem(inv, 9));
-itemstack = inv.getItem(inv, 4);
+buy_price = shop.getBuyPrice(inv);
+sell_price = shop.getSellPrice(inv);
 chestloc1 = loc.mod(sign_loc, 0, -1, 0);
 chestloc2 = block.getSecChest(chestloc1);
 if(!isAChest(chestloc1)) {
@@ -40,6 +39,7 @@ if(!isAChest(chestloc1)) {
 	goto("wait");
 }
 if(inv_slot == 3) { //Buy
+	itemstack = inv.getItem(inv, 4);
 	//Check players money
 	if(!hasEnoughMoney(player, buy_price)) {
 		msg.prefix(player, prefix_shop, "You do not have enough money.");
@@ -48,9 +48,9 @@ if(inv_slot == 3) { //Buy
 	if(!adminshop) {
 		itemamount2 = 0;
 		if(chestloc2 != null) {
-			itemamount2 = block.getItemAmount(chestloc2, false, itemstack);
+			itemamount2 = block.getItemAmount(chestloc2, true, itemstack);
 		}
-		itemamount1 = block.getItemAmount(chestloc1, false, itemstack);
+		itemamount1 = block.getItemAmount(chestloc1, true, itemstack);
 		if(itemamount1 + itemamount2 < item.getAmount(itemstack)) {
 			msg.prefix(player, prefix_shop, "Not enough items in chest.");
 			goto("wait");
@@ -82,6 +82,7 @@ if(inv_slot == 3) { //Buy
 	subMoney(player, buy_price);
 	inv.update(player);
 }  elseif(inv_slot == 6) { //Sell
+	itemstack = inv.getItem(inv, 5);
 	if(!adminshop) {
 		owner_player_id = text.convert(block.getSign(sign_loc, 3));
 		if(!isDouble(owner_player_id)) {
@@ -98,7 +99,7 @@ if(inv_slot == 3) { //Buy
 		}
 	}
 	//Items des Spielers checken
-	if(player.getItemAmount(player, false, itemstack) < item.getAmount(itemstack)) {
+	if(player.getItemAmount(player, true, itemstack) < item.getAmount(itemstack)) {
 		msg.prefix(player, prefix_shop, "You do not have enough items.");
 		goto("wait");
 	}
@@ -432,4 +433,33 @@ function shop.isOwner(player, sign_loc) {
 		return owner_player_id == player.getId(player);
 	}
 	return false;
+}
+
+function shop.getItemAmount(item) {
+	if(item.getType(item) == "km:coin_gold") {
+		return item.getAmount(item) * 64 * 64;
+	}
+	if(item.getType(item) == "km:coin_silver") {
+		return item.getAmount(item) * 64;
+	}
+	if(item.getType(item) == "km:coin_copper") {
+		return item.getAmount(item);
+	}
+	return 0;
+}
+
+function shop.getBuyPrice(inv) {
+	snuvis = 0;
+	snuvis += shop.getItemAmount(inv.getItem(inv, 0));
+	snuvis += shop.getItemAmount(inv.getItem(inv, 1));
+	snuvis += shop.getItemAmount(inv.getItem(inv, 2));
+	return snuvis;
+}
+
+function shop.getSellPrice(inv) {
+	snuvis = 0;
+	snuvis += shop.getItemAmount(inv.getItem(inv, 7));
+	snuvis += shop.getItemAmount(inv.getItem(inv, 8));
+	snuvis += shop.getItemAmount(inv.getItem(inv, 9));
+	return snuvis;
 }

+ 140 - 57
system/commands.txt

@@ -44,6 +44,7 @@ command.add("infopoint11");
 command.add("help");
 command.add("butcher");
 command.add("yeet");
+command.add("kill");
 
 alias_map = map.new();
 command_list = list.new();
@@ -184,6 +185,7 @@ command.registerAlias("hub", "leave");
 command.registerAlias("fuckit", "giveup");
 command.registerAlias("ram", "memory");
 command.registerAlias("thor", "lightning");
+command.registerAlias("kill", "suicide");
 
 composter_par = particle.get("composter");
 wall_signs_tag = block.getTag("minecraft:wall_signs");
@@ -383,7 +385,7 @@ 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 10 minutes.", "Cost: 6 VP"));
+inv.setItem(vote_inv, 0, read.item("km:coin_gold", 1, "§fMoney Booster", "Doubles incoming money for 10 minutes.", "Cost: 6 VP"));
 vote_inv_id = inv.getId(vote_inv);
 
 ha_tool = read.item("km:guild_block", 1, "§cHawkeye Tool", "Hawkeye Tool");
@@ -405,7 +407,7 @@ set.add(consoleCommands, "unban");
 
 databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS friends (player_id INT NOT NULL, friend_id INT NOT NULL, time BIGINT NOT NULL, PRIMARY KEY (player_id, friend_id), FOREIGN KEY (player_id) REFERENCES minecraft.players(id) ON DELETE RESTRICT);"));
 databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS logoutdata (player_id INT NOT NULL PRIMARY KEY, logouttime BIGINT, FOREIGN KEY (player_id) REFERENCES minecraft.players(id) ON DELETE RESTRICT);"));
-databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS tipps (tipp_key VARCHAR(20) PRIMARY KEY, tipp_value VARCHAR(255));"));
+databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS tipps (tipp_key VARCHAR(20) PRIMARY KEY, tipp_value VARCHAR(255), tipp_loop BOOLEAN NOT NULL DEFAULT true);"));
 databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS plotranks (plot_id INT NOT NULL, player_id INT NOT NULL, rank VARCHAR(10), PRIMARY KEY (plot_id, player_id), FOREIGN KEY (player_id) REFERENCES minecraft.players(id) ON DELETE RESTRICT);"));
 databank.workerExecute(databank.prepare("CREATE TABLE IF NOT EXISTS homes (player_id INT NOT NULL, name VARCHAR(20) NOT NULL, world_name VARCHAR(20) NOT NULL, x DOUBLE NOT NULL, y DOUBLE NOT NULL, z DOUBLE NOT NULL, yaw DOUBLE NOT NULL, pitch DOUBLE NOT NULL, PRIMARY KEY (player_id, name), FOREIGN KEY (player_id) REFERENCES minecraft.players(id) ON DELETE RESTRICT);"));
 
@@ -634,7 +636,7 @@ if(event == "player_logout") {
 			goto("wait");
 		}
 		setScriptVar("player", player);
-		script.callEvent("quest_term", script);
+		modTimer.scriptCallEvent("quest_term", script);
 		quest.term(script, player);
 	}
 	if(player.isInParty(player)) {
@@ -692,7 +694,7 @@ if(event == "inv_click") {
 				goto("wait");
 			}
 			player.setVotePoints(player, vp - 6);
-			msg("online", "§6§k#§rMoneyBooster activated!!!§6§k#");
+			msg("online", "§6§k#§rMoney Booster activated!!!§6§k#");
 			money.setBoostFactor(2);
 			sgoto(12000, "resetMoneyBoost");
 		}
@@ -714,8 +716,8 @@ if(event == "inv_click") {
 		}
 		set.add(skip_night_set, player_uuid);
 		if(!skip_night_started) {
-			world.addTimedStatus(world, 49, 600, "Skip night?");
-			sendMessageToWorld(world, "[§6Commands§r] Skip night? Vote within 15 seconds.");
+			world.addTimedStatus(world, 49, 300, "Skip night?");
+			msg.survival("[§6Commands§r] Skip night? Vote within 15 seconds.");
 			skip_night_counter = 15;
 			skip_night_yes = 0;
 			skip_night_no = 0;
@@ -934,6 +936,11 @@ if(event == "inv_click") {
 			player.setNoPetDamage(player, new_value);
 			inv.setItem(inv, inv_slot, read.item("minecraft:bone", 1, "§fNo Pet Damage", new_value));
 		}
+		elseif(inv_slot == 6) {
+			new_value = !player.getTipLoop(player);
+			player.setTipLoop(player, new_value);
+			inv.setItem(inv, inv_slot, read.item("minecraft:oak_sign", 1, "§fShow tip loop", new_value));
+		}
 		inv.update(player);
 	}
 	goto("wait");
@@ -956,6 +963,7 @@ if(event == "function_key") {
 		inv.setItem(inv, 3, read.item("minecraft:oak_stairs", 1, "§fStair-Sitting", player.hasSittingActivated(player)));
 		inv.setItem(inv, 4, read.item("minecraft:iron_sword", 1, "§fPvP", hasPvpOn(player)));
 		inv.setItem(inv, 5, read.item("minecraft:bone", 1, "§fNo Pet Damage", player.getNoPetDamage(player)));
+		inv.setItem(inv, 6, read.item("minecraft:oak_sign", 1, "§fShow tip loop", player.getTipLoop(player)));
 		inv.open(inv, player, "§8Settings");
 		goto("wait");
 	}
@@ -1013,17 +1021,18 @@ goto("wait");
 @skip_night_loop
 skip_night_counter--;
 if(skip_night_counter == 0) {
-	world = world.getOverWorld();
-	sendMessageToWorld(world, "[§6Commands§r] Skip night results:");
-	sendMessageToWorld(world, concat("§e - §rYes: §e", text.number(skip_night_yes)));
-	sendMessageToWorld(world, concat("§e - §rNo: §e", text.number(skip_night_no)));
-	sendMessageToWorld(world, concat("§e - §rI don't care: §e", text.number(skip_night_no_care)));
+	msg.survival("[§6Commands§r] Skip night results:");
+	msg.survival(concat("§e - §rYes: §e", text.number(skip_night_yes)));
+	msg.survival(concat("§e - §rNo: §e", text.number(skip_night_no)));
+	msg.survival(concat("§e - §rI don't care: §e", text.number(skip_night_no_care)));
 	if(skip_night_yes > skip_night_no) {
+		world = world.getOverWorld();
 		world.setTime(world, 0);
 	}
 	set.clear(skip_night_set);
 	last_skip_night = time.getMillis();
 	sgoto(8400, "reset_skip_night");
+	goto("wait");
 }
 sgoto(20, "skip_night_loop");
 goto("wait");
@@ -1455,7 +1464,7 @@ t = math.roundComma((t - t_old) / 5000 * 20, 2); //Umwandlung 5000ms -> 1s -> 20
 p = player.get(p_uuid);
 if(p != null) {
 	msg.prefix(p, prefix_commands, "Expected: 20 ticks/sec");
-	msg.prefix(p, prefix_commands, concat("Measured: ", t, " ticks/sec"));
+	msg.prefix(p, prefix_commands, concat("Measured: ", text.number(t), " ticks/sec"));
 }
 goto("wait");
 
@@ -1587,10 +1596,30 @@ goto("wait");
 if(size == 0) {
 	@quest_syntax
 	msg.prefix(player, prefix_quest, "/quest ...");
+	msg(player, "§5 - see §rSee all active quests");
 	msg(player, "§5 - term <player> §rTerminates a player's quest");
 	goto("wait");
 }
 arg0 = text.toLowerCase(list.getIndex(args, 0));
+if(arg0 == "see") {
+	if(size != 1) {
+		msg.prefix(player, prefix_quest, "/quest see");
+		goto("wait");
+	}
+	quest_map = quest.getIds();
+	iter = map.iterator(quest_map);
+	while(hasNext(iter)) {
+		element = next(iter);
+		key = map.getKey(element);
+		value = map.getValue(element);
+		script = script.getFromId(value);
+		if(script == null) {
+			continue;
+		}
+		msg(player, player.getName(key), " ", value);
+	}
+	goto("wait");
+}
 if(arg0 == "term") {
 	if(size != 2) {
 		msg.prefix(player, prefix_quest, "/quest term <player>");
@@ -1618,7 +1647,7 @@ if(arg0 == "term") {
 		goto("wait");
 	}
 	setScriptVar("player", p);
-	script.callEvent("quest_term", script);
+	modTimer.scriptCallEvent("quest_term", script);
 	quest.term(script, player);
 	msg.prefix(player, prefix_quest, "Player's quest terminated.");
 	goto("wait");
@@ -2200,7 +2229,7 @@ while(hasNext(iter)) {
 	a[0] = yaw;
 	a[1] = counter;
 	map.add(afk_checker_map, uuid, a);
-	if(counter == 3) {
+	if(counter == 5) {
 		nickname = player.getNickname(p);
 		if(player.isAfk(p)) {
 			continue;
@@ -2318,6 +2347,7 @@ if(nickname == "remove") {
 	msg.prefix(player, prefix_commands, concat("Your nickname was changed to ", nickname, "§r."));
 }
 player.setTabName(player);
+player.setHeadName(player);
 goto("wait");
 
 @iteminfo
@@ -2748,25 +2778,30 @@ if(size == 0) {
 	msg(player, "§e - list §rList all tips");
 	msg(player, "§e - add <tip> <text> §rAdds a tip");
 	msg(player, "§e - remove <tip> §rRemoves a tip");
+	msg(player, "§e - loop <tip> <boolean> §rTrue shows on tip loop");
 	msg(player, "§e - <tip> [player] §rSends a tip to all/a player");
 	goto("wait");
 }
 arg0 = text.toLowerCase(list.getIndex(args, 0));
 if(arg0 == "list") {
 	msg(player, "§r--==§eTipps§r==--");
-	counter = 0;
-	getTippsListStatement = databank.prepare("SELECT * FROM tipps;");
-	result = databank.execute(getTippsListStatement);
-	while(databank.next(result)) {
-		tipp_key = databank.getString(result, 1);
-		tipp_value = databank.getString(result, 2);
-		msg(player, concat("§e", tipp_key, "§r : ", tipp_value));
-		counter++;
-	}
-	databank.close(result);
-	databank.close(getTippsListStatement);
-	if(counter == 0) {
+	list = tip.getAll();
+	if(list.getSize(list) == 0) {
 		msg.prefix(player, prefix_tips, "No tips available.");
+		goto("wait");
+	}
+	iter = iterator(list);
+	while(hasNext(iter)) {
+		a = next(iter);
+		tipp_key = a[0];
+		tipp_value = a[1];
+		tipp_loop = a[2];
+		if(tipp_loop) {
+			tipp_loop = concat("§a", tipp_loop);
+		} else {
+			tipp_loop = concat("§c", tipp_loop);
+		}
+		msg(player, concat(" ", tipp_loop, " §e", tipp_key, "§r : ", tipp_value));
 	}
 	goto("wait");
 }
@@ -2782,15 +2817,37 @@ if(arg0 == "add") {
 	msg.prefix(player, prefix_tips, "Tip added.");
 	goto("wait");
 }
+if(arg0 == "loop") {
+	if(size != 3) {
+		msg.prefix(player, prefix_commands, "/tip loop <tip> <boolean>");
+		goto("wait");
+	}
+	tipp_key = list.getIndex(args, 1);
+	tipp_value = tipp.get(tipp_key);
+	if(tipp_value == null) {
+		msg.prefix(player, prefix_tips, "This tip does not exist.");
+		goto("wait");
+	}
+	boolean = list.getIndex(args, 2);
+	if(text.class(boolean) != "Boolean") {
+		msg.prefix(player, prefix_tips, "True or false expected.");
+		goto("wait");
+	}
+	if(boolean) {
+		tip.setLoop(tipp_key, boolean);
+	} else {
+		tip.setLoop(tipp_key, boolean);
+	}
+	msg.prefix(player, prefix_tips, "Tip settings changed.");
+	goto("wait");
+}
 if(arg0 == "remove") {
 	if(size != 2) {
 		msg.prefix(player, prefix_commands, "/tip remove <name>");
 		goto("wait");
 	}
 	tipp_key = list.getIndex(args, 1);
-	removeTippStatement = databank.prepare("DELETE FROM tipps WHERE tipp_key = ?;");
-	databank.setString(removeTippStatement, 1, tipp_key);
-	databank.workerExecute(removeTippStatement);
+	tip.remove(tipp_key);
 	msg.prefix(player, prefix_tips, "Tip removed.");
 	goto("wait");
 }
@@ -2800,26 +2857,6 @@ if(tipp_value == null) {
 	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) {
 	p = "online";
 } else {
@@ -2831,11 +2868,15 @@ if(size == 1) {
 	p = read.player(p_name);
 	msg.prefix(player, prefix_tips, concat("Tip sent to §7", p_name, "§r."));
 }
-if(link) {
+if(text.contains(tipp_value, "https://")) {
+	a = text.getLinkMessage(tipp_value);
+	msg_before = a[0];
+	msg_link = a[1];
+	msg_after = a[2];
 	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");
 }
+msg(p, concat("§r[", prefix_tips, "§r] ", tipp_value));
 goto("wait");
 
 @help
@@ -3019,6 +3060,7 @@ if(size != 1) {
 	goto("wait");
 }
 arg0 = text.toLowerCase(list.getIndex(args, 0));
+modTimer(-500);
 if(arg0 == "ai") {
 	script = script.get("Ai");
 	if(script != null) {
@@ -6104,8 +6146,7 @@ if(size == 0) {
 	goto("wait");
 }
 message = text.concatList(args, " ", 0, size - 1);
-msg("online", text.hover("[§cServer§r]", "The center of Wusiness"), " ", text.replace(message, "&", "§"));
-msg("SERVER", "[§cServer§r] ", text.replace(message, "&", "§"));
+msg.server(message);
 goto("wait");
 
 @warp
@@ -7644,7 +7685,7 @@ if(script == null) {
 	goto("wait");
 }
 setScriptVar("player", player);
-script.callEvent("quest_term", script);
+modTimer.scriptCallEvent("quest_term", script);
 quest.term(script, player);
 msg.prefix(player, prefix_quest, "Quest termed.");
 goto("wait");
@@ -7670,7 +7711,7 @@ goto("wait");
 
 function minigame.hub(script, player) {
 	script.setVar(script, "player", player);
-	script.callEvent("player_giveup", script);
+	modTimer.scriptCallEvent("player_giveup", script);
 }
 
 @jail
@@ -7756,6 +7797,39 @@ function rank.add(index, tech_rank, chat_rank) {
 	$rank_array[index, 1] = chat_rank;
 }
 
+//--------------------------------------------------
+//Tip-Utils
+//--------------------------------------------------
+
+function tip.setLoop(tipp_key, boolean) {
+	stmt = databank.prepare("UPDATE tipps SET tipp_loop = ? WHERE tipp_key = ?;");
+	databank.setBool(stmt, 1, boolean);
+	databank.setString(stmt, 2, tipp_key);
+	databank.workerExecute(stmt);
+}
+
+function tip.remove(tipp_key) {
+	stmt = databank.prepare("DELETE FROM tipps WHERE tipp_key = ?;");
+	databank.setString(stmt, 1, tipp_key);
+	databank.workerExecute(stmt);
+}
+
+function tip.getAll() {
+	list = list.new();
+	smt = databank.prepare("SELECT * FROM tipps;");
+	result = databank.execute(smt);
+	while(databank.next(result)) {
+		a = array.new(3);
+		a[0] = databank.getString(result, 1);
+		a[1] = databank.getString(result, 2);
+		a[2] = databank.getBool(result, 3);
+		list.add(list, a);
+	}
+	databank.close(smt);
+	databank.close(result);
+	return list;
+}
+
 //--------------------------------------------------
 //Databank-Utils
 //--------------------------------------------------
@@ -8290,6 +8364,7 @@ function setCommandHelps() {
 	help = command.newHelp("suicide", "suicide");
 	command.addHelpChild(help, command.newHelpSpecial("Player", "player", "kill.other"));
 	command.addHelp(help);
+	commandhelp.addAlias(help, "kill", "suicide");
 	
 	help = command.newHelp("tempfly", "tempfly");
 	helpArg0 = command.newHelpSpecial("Player", "player");
@@ -8759,6 +8834,8 @@ function setCommandHelps() {
 	command.addHelp(help);
 	
 	help = command.newHelp("quest", "quest");
+	//quest see
+	command.addHelpChild(help, command.newHelpLiteral("see"));
 	//quest term <player>
 	helpArg0 = command.newHelpLiteral("term");
 	command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player"));
@@ -8960,6 +9037,12 @@ function setCommandHelps() {
 	helpArg0 = command.newHelpString("tip", false);
 	command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player"));
 	command.addHelpChild(help, helpArg0);
+	//tipp loop <tip> <boolean>
+	helpArg0 = command.newHelpLiteral("loop");
+	helpArg1 = command.newHelpString("tip", false);
+	command.addHelpChild(helpArg1, command.newHelpBool("wusi"));
+	command.addHelpChild(helpArg0, helpArg1);
+	command.addHelpChild(help, helpArg0);
 	command.addHelp(help);
 	
 	help = command.newHelp("ticket", "ticket");
@@ -9615,4 +9698,4 @@ function hawkeye.getAmountOfAll() {
 	databank.close(result);
 	databank.close(stmt);
 	return amount;
-}
+}

+ 2 - 1
system/doors.txt

@@ -70,7 +70,8 @@ goto("wait");
 @closedoor
 door_loc = list.getIndex(doors, 0);
 list.removeIndex(doors, 0);
-if(block.hasTag(auto_door_tag, block.get(door_loc))) {
+block = block.get(door_loc);
+if(block.hasTag(auto_door_tag, block)) {
 	//close door
 	open_value = door.isOpen(door_loc);
 	if(block.hasTag(doors_tag, block)) {

+ 49 - 0
system/fixitems.txt

@@ -0,0 +1,49 @@
+event.load("entity_click");
+event.load("inv_click");
+
+arrow_right = read.item("km:arrow_right", 1, "§fConvert");
+air_item = read.item("minecraft:air");
+
+msg("dev", "§bFixItems §rloaded.");
+@wait
+wait();
+if(event == "entity_click") {
+	entity_type = entity.getType(entity);
+	if(entity_type != "human") {
+		goto("wait");
+	}
+	entity_name = entity.getName(entity);
+	if(entity_name != "effects and tags\nRemove item") {
+		goto("wait");
+	}
+	inv = inv.new("001020100");
+	inv.setItem(inv, 1, arrow_right);
+	inv.open(inv, player, "Remove item effects and tags");
+	goto("wait");
+}
+if(event == "inv_click") {
+	if(inv_slot == 1) {
+		//Ziel-slot muss leer sein
+		item = inv.getItem(inv, 2);
+		if(item.getType(item) != "minecraft:air") {
+			goto("wait");
+		}
+		//Quell-slot muss belegt sein
+		item = inv.getItem(inv, 0);
+		item_type = item.getType(item);
+		if(item_type == "minecraft:air") {
+			goto("wait");
+		}
+		//Quell-item kopieren
+		item_amount = item.getAmount(item);
+		new_item = read.item(item_type, item_amount);
+		if(item.isDamageable(new_item)) {
+			durability = item.getDamage(item);
+			item.setDamage(new_item, durability);
+		}
+		inv.setItem(inv, 0, air_item) ;
+		inv.setItem(inv, 2, new_item);
+		inv.update(player);
+	}
+}
+goto("wait");

+ 4 - 2
system/gamecenter.txt

@@ -109,6 +109,7 @@ minigame.addCompass(13, read.item("minecraft:redstone_torch", 1, "§fLeapfrog"),
 minigame.addCompass(14, read.item("minecraft:stick", 1, "§fKnockfight"), loc.new(gamesworld, -418.5, 156, -41.5, 0.0001, 0.0001));
 minigame.addCompass(15, read.item("minecraft:diamond_shovel", 1, "§fSpleef"), loc.new(gamesworld, -418.5, 156, -41.5, 0.0001, 25));
 
+modTimer(-500);
 iter = map.iterator(gamemappaths);
 while(hasNext(iter)) {
 	entry = next(iter);
@@ -288,6 +289,7 @@ pfad2 = map.get(gamepaths, block_loc);
 script_id = map.get(script_ids, block_loc);
 if(script_id == null) {
 	if(pfad2 != null) {
+		modTimer(-100);
 		if(pfad2 == "minigames/sammelfieber/sammelfieber" || pfad2 == "minigames/sammelfieber/sfranked") {
 			script = script.start(pfad, "minigames/sammelfieber/sammelfieberitems", pfad2, "utils/u_games", "utils/u_general");
 		} else {
@@ -421,7 +423,7 @@ function minigame.joinPlayer(script, player) {
 	stacks.setActive(player, false);
 	//Event player_join
 	script.setVar(script, "player", player);
-	script.callEvent("player_join", script);
+	modTimer.scriptCallEvent("player_join", script);
 	sign.players($block_loc, list.getSize(player_list), $maxplayers);
 }
 
@@ -460,4 +462,4 @@ function minigame.partyJoin(script, party_leader, party_list) {
 		sign.ready($block_loc);
 		minigame.joinPlayer(script, p);
 	}
-}
+}

+ 2 - 0
system/hawkeye.txt

@@ -123,6 +123,7 @@ function hawkeye.addBlockState(id, block_loc, state_name, state_prop) {
 
 function hawkeye.addBlockEvent(id, event, player, location) {
 	stmt = databank.prepare("INSERT INTO hawkeye (id, player_id, event, world, x, y, z, time) VALUES (?,?,?,?,?,?,?,?)");
+	modTimer(-5);
 	databank.setInt(stmt, 1, id);
 	databank.setInt(stmt, 2, player.getId(player));
 	databank.setString(stmt, 3, event);
@@ -136,6 +137,7 @@ function hawkeye.addBlockEvent(id, event, player, location) {
 
 function hawkeye.addBlockDetail(hawkeye_id, name, value) {
 	stmt = databank.prepare("INSERT INTO hawkeye_data (hawkeye_id, name, value) VALUES (?,?,?)");
+	modTimer(-5);
 	databank.setInt(stmt, 1, hawkeye_id);
 	databank.setString(stmt, 2, name);
 	databank.setString(stmt, 3, value);

+ 20 - 0
system/herobrine.txt

@@ -1,13 +1,33 @@
 event.load("block_break");
 event.load("human_hurt");
+event.load("entity_join");
 herobrines = list.new();
 
 msg("dev", "§bHerobrine §rloaded.");
 @wait
 wait();
+if(event == "entity_join") {
+	if(entity.getType(entity) != "human") {
+		goto("wait");
+	}
+	if(entity.getName(entity) != "Herobrine") {
+		goto("wait");
+	}
+	if(list.contains(herobrines, entity)) {
+		goto("wait");
+	}
+	entity.remove(entity);
+	goto("wait");
+}
 if(event == "human_hurt") {
 	entity_name = entity.getName(human);
 	if(list.contains(herobrines, human)) {
+		if(entity == null) {
+			goto("wait");
+		}
+		if(!isLiving(entity)) {
+			goto("wait");
+		}
 		living.damage(entity, 4, damage.get("thorns", human));
 	}
 	goto("wait");

+ 32 - 0
system/mobspawning.txt

@@ -0,0 +1,32 @@
+event.load("entity_join");
+
+x1 = 142;
+z1 = 235;
+x2 = 203;
+z2 = 294;
+
+msg("dev", "§bMobspawning §rloaded");
+@wait
+wait();
+if(!isLiving(entity)) {
+	goto("wait");
+}
+entity_type = entity.getType(entity);
+if(entity_type == "player" || entity_type == "human" || entity_type == "nobody" || entity_type == "armor_stand") {
+	goto("wait");
+}
+ent_loc = entity.getLocation(entity);
+world_name = world.getName(loc.getWorld(ent_loc));
+if(world_name != "overworld") {
+	goto("wait");
+}
+x = loc.getX(ent_loc);
+z = loc.getZ(ent_loc);
+if(x < x1 || x > x2) {
+	goto("wait");
+}
+if(z < z1 || z > z2) {
+	goto("wait");
+}
+cancel = true;
+goto("wait");

+ 9 - 4
system/perms.txt

@@ -97,7 +97,7 @@ perm.registerGroup(2, "setservermessage");
 perm.registerGroup(2, "scoreboard");
 perm.registerGroup(2, "adminshop");
 perm.registerGroup(2, "team");
-perm.registerGroup(2, "kill");
+perm.registerGroup(2, "suicide");
 perm.registerGroup(2, "advancement");
 perm.registerGroup(2, "experience");
 perm.registerGroup(2, "particle");
@@ -219,7 +219,7 @@ perm.registerGroup(3, "warp.create");
 perm.registerGroup(3, "perm");
 perm.registerGroup(3, "perm.toggle");
 perm.registerGroup(3, "tip");
-perm.registerGroup(3, "kill");
+perm.registerGroup(3, "suicide");
 perm.registerGroup(3, "setblock");
 perm.registerGroup(3, "summon");
 perm.registerGroup(3, "human");
@@ -265,7 +265,7 @@ perm.registerGroup(5, "var");
 perm.registerGroup(5, "tip");
 perm.registerGroup(5, "script");
 perm.registerGroup(5, "script.error");
-perm.registerGroup(5, "kill");
+perm.registerGroup(5, "suicide");
 perm.registerGroup(5, "iteminfo");
 perm.registerGroup(5, "databank");
 perm.registerGroup(5, "start");
@@ -297,6 +297,7 @@ perm.registerGroup(7, "mail.reset");
 perm.registerGroup(7, "datapack");
 perm.registerGroup(7, "reload");
 perm.registerGroup(7, "hawkeye.entries");
+perm.registerGroup(7, "worldborder");
 
 //Perm-Group zur User-Simulation
 perm.registerGroup(8, "pseudoPerm");
@@ -311,12 +312,16 @@ perm.registerGroup(9, "setmessage");
 perm.registerGroup(9, "warn");
 perm.registerGroup(9, "kick");
 perm.registerGroup(9, "tempban");
+perm.registerGroup(9, "allsounds");
+perm.registerGroup(9, "perm");
+perm.registerGroup(9, "perm.toggle");
 
 //Owner
 perm.registerGroup(10, "isOwner");
 perm.registerGroup(10, "isTeam");
 perm.registerGroup(10, "datapack");
 perm.registerGroup(10, "reload");
+perm.registerGroup(10, "worldborder");
 
 //Streamer
 perm.registerGroup(11, "isStreamer");
@@ -335,7 +340,7 @@ perm.registerGroup(12, "inv.see");
 perm.registerGroup(12, "inv.reload");
 perm.registerGroup(12, "feed");
 perm.registerGroup(12, "mute");
-perm.registerGroup(12, "kill");
+perm.registerGroup(12, "suicide");
 perm.registerGroup(12, "quest");
 perm.registerGroup(12, "unmute");
 perm.registerGroup(12, "heal");

+ 1 - 1
system/pumpkin.txt

@@ -4,7 +4,7 @@ event.load("block_click");
 times = map.new();
 pumpkin_wait_time = 3; //seconds
 
-pumpkin = read.item("minecraft:pumpkin_pie", 1, "PumpkinMinusOneEighthCake");
+pumpkin = read.item("minecraft:pumpkin_pie", 5, "PumpkinMinusOneEighthCake");
 lore_list = list.new();
 list.add(lore_list, "An almost whole pumpkin pie");
 list.add(lore_list, "Herobrine has already eaten a piece.");

+ 3 - 1
system/story.txt

@@ -4,6 +4,8 @@ event.load("player_move");
 event.load("player_pre_respawn");
 event.load("player_post_respawn");
 
+quest.setBlockList(list.new());
+
 story_world = world.getStory();
 move_id_to_spawn = event.addMoveData(loc.new(story_world, -1501.5, 59, -35.5), loc.new(story_world, -1499, 62.5, -33), 5, -1);
 story_respawn = set.new();
@@ -12,7 +14,7 @@ age_prop_3 = block.getProperty("age_0_3");
 bread_loc = loc.new(story_world, -1568, 67, -66);
 transit_loc = loc.new(story_world, -1522, 64, -18);
 schiff_spawn = loc.new(story_world, -1636, 63, -999, 50, 0.0001);
-bread = read.item("minecraft:bread");
+bread = read.item("minecraft:bread", 3);
 times = map.new();
 bread_wait_time = 3; //seconds
 

+ 22 - 19
system/survival.txt

@@ -28,9 +28,9 @@ skill.add("Dolphin", "skill.dolphin", "minecraft:fire_coral", "Swim like a dolph
 skill.add("Block Up", "skill.block_up", "minecraft:diamond_pickaxe", "Break a block and the block above for a minute", 25, false, true, false);
 skill.add("Block Down", "skill.block_down", "minecraft:diamond_pickaxe", "Break a block and the block below for a minute", 25, false, true, false);
 skill.add("Timber", "skill.timber", "minecraft:iron_axe", "Break whole trees with an axe for a minute", 128, false, true, false);
-skill.add("Fire Arrow", "skill.fire_arrow", "minecraft:arrow", "For a minute with an flame enchanted bow your arrows ignites hitten blocks", 50, false, true, false);
-skill.add("Better Shears", "skill.better_shears", "minecraft:shears", "Sharpness enchanted shears increases the radius for destruction of leaves", 500, true, false, true);
-skill.add("Cobweb Miner", "skill.cobweb_miner", "minecraft:cobweb", "Swords increases the radius for destruction of cobwebs", 250, true, false, true);
+skill.add("Fire Arrow", "skill.fire_arrow", "minecraft:arrow", "For a minute with an flame enchanted bow your arrows ignite hit blocks", 50, false, true, false);
+skill.add("Better Shears", "skill.better_shears", "minecraft:shears", "Sharpness enchanted shears increase the radius for destruction of leaves", 500, true, false, true);
+skill.add("Cobweb Miner", "skill.cobweb_miner", "minecraft:cobweb", "Swords increase the radius for destruction of cobwebs", 250, true, false, true);
 
 clan.loadData();
 
@@ -58,8 +58,8 @@ prefix_skill = "§2Skill";
 
 max_ench_lvl = map.new();
 map.add(max_ench_lvl, enchantment.get("efficiency"), 10);
-map.add(max_ench_lvl, enchantment.get("smite"), 7);
-map.add(max_ench_lvl, enchantment.get("bane_of_arthropods"), 7);
+map.add(max_ench_lvl, enchantment.get("smite"), 10);
+map.add(max_ench_lvl, enchantment.get("bane_of_arthropods"), 10);
 map.add(max_ench_lvl, enchantment.get("loyalty"), 5);
 map.add(max_ench_lvl, enchantment.get("piercing"), 5);
 map.add(max_ench_lvl, enchantment.get("lure"), 5);
@@ -67,25 +67,25 @@ map.add(max_ench_lvl, enchantment.get("luck_of_the_sea"), 5);
 map.add(max_ench_lvl, enchantment.get("riptide"), 5);
 map.add(max_ench_lvl, enchantment.get("unbreaking"), 5);
 map.add(max_ench_lvl, enchantment.get("quick_charge"), 5);
-map.add(max_ench_lvl, enchantment.get("protection"), 4);
-map.add(max_ench_lvl, enchantment.get("fire_protection"), 4);
-map.add(max_ench_lvl, enchantment.get("blast_protection"), 4);
-map.add(max_ench_lvl, enchantment.get("projectile_protection"), 4);
-map.add(max_ench_lvl, enchantment.get("feather_falling"), 4);
-map.add(max_ench_lvl, enchantment.get("respiration"), 3);
-map.add(max_ench_lvl, enchantment.get("thorns"), 3);
-map.add(max_ench_lvl, enchantment.get("depth_strider"), 4);
+map.add(max_ench_lvl, enchantment.get("protection"), 5);
+map.add(max_ench_lvl, enchantment.get("fire_protection"), 5);
+map.add(max_ench_lvl, enchantment.get("blast_protection"), 5);
+map.add(max_ench_lvl, enchantment.get("projectile_protection"), 5);
+map.add(max_ench_lvl, enchantment.get("feather_falling"), 5);
+map.add(max_ench_lvl, enchantment.get("respiration"), 5);
+map.add(max_ench_lvl, enchantment.get("thorns"), 5);
+map.add(max_ench_lvl, enchantment.get("depth_strider"), 5);
 map.add(max_ench_lvl, enchantment.get("frost_walker"), 2);
 map.add(max_ench_lvl, enchantment.get("soul_speed"), 3);
-map.add(max_ench_lvl, enchantment.get("sharpness"), 5);
-map.add(max_ench_lvl, enchantment.get("knockback"), 2);
+map.add(max_ench_lvl, enchantment.get("sharpness"), 10);
+map.add(max_ench_lvl, enchantment.get("knockback"), 5);
 map.add(max_ench_lvl, enchantment.get("fire_aspect"), 2);
-map.add(max_ench_lvl, enchantment.get("looting"), 3);
-map.add(max_ench_lvl, enchantment.get("sweeping_edge"), 3);
+map.add(max_ench_lvl, enchantment.get("looting"), 5);
+map.add(max_ench_lvl, enchantment.get("sweeping_edge"), 5);
 map.add(max_ench_lvl, enchantment.get("power"), 5);
-map.add(max_ench_lvl, enchantment.get("punch"), 2);
+map.add(max_ench_lvl, enchantment.get("punch"), 5);
 map.add(max_ench_lvl, enchantment.get("impaling"), 5);
-map.add(max_ench_lvl, enchantment.get("fortune"), 3);
+map.add(max_ench_lvl, enchantment.get("fortune"), 5);
 
 air = "minecraft:air";
 air_item = read.item(air);
@@ -286,6 +286,9 @@ if(event == "living_death" || event == "living_pre_hurt") {
 } elseif(event == "pre_explosion") {
 	loc = location;
 } elseif(event == "mob_griefing") {
+	if(entity == null) {
+		goto("wait");
+	}
 	loc = entity.getLocation(entity);
 } else {
 	loc = entity.getLocation(player);

+ 6 - 6
system/timber.txt

@@ -6,12 +6,12 @@ axe_tag = item.getTag("km:axe");
 
 
 horizontal_dist_map = map.new();
-map.add(horizontal_dist_map, "minecraft:oak_log", 9);
+map.add(horizontal_dist_map, "minecraft:oak_log", 8);
 map.add(horizontal_dist_map, "minecraft:spruce_log", 8);
 map.add(horizontal_dist_map, "minecraft:birch_log", 2);
-map.add(horizontal_dist_map, "minecraft:jungle_log", 12);
-map.add(horizontal_dist_map, "minecraft:acacia_log", 9);
-map.add(horizontal_dist_map, "minecraft:dark_oak_log", 6);
+map.add(horizontal_dist_map, "minecraft:jungle_log", 8);
+map.add(horizontal_dist_map, "minecraft:acacia_log", 8);
+map.add(horizontal_dist_map, "minecraft:dark_oak_log", 5);
 
 msg("dev", "§bTimber §rloaded.");
 @wait
@@ -169,13 +169,13 @@ function block.isTreePart(location) {
 	if(temp_type == $tree_type) {
 		return true;
 	}
-	if(temp_type == "minecraft:vine") {
+	/*if(temp_type == "minecraft:vine") {
 		return true;
 	}
 	state = block.property.getValue(location, $prop_persistent);
 	if(state != null && !state) {
 		return true;
-	}
+	}*/
 	set.add($tree_set, location);
 	return false;
 }

+ 60 - 0
system/tiploop.txt

@@ -0,0 +1,60 @@
+msg("dev", "§bTip-Loop §rloaded.");
+prefix_tips = "§eTips";
+index = 0;
+sgoto(100, "tip_loop");
+
+@wait
+wait();
+goto("wait");
+
+@tip_loop
+//get next tip
+list = getLoopTipps();
+size = list.getSize(list);
+if(size == 0) {
+	goto("wait");
+}
+index++;
+if(index >= size) {
+	index = 0;
+}
+a = list.getIndex(list, index);
+tipp_value = a[1];
+link = false;
+if(text.contains(tipp_value, "https://")) {
+	link = true;
+	a = text.getLinkMessage(tipp_value);
+	msg_before = a[0];
+	msg_link = a[1];
+	msg_after = a[2];
+}
+//loop online players
+online_list = players.toList();
+iter = iterator(online_list);
+while(hasNext(iter)) {
+	p = next(iter);
+	if(player.getTipLoop(p)) {
+		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));
+		}
+	}
+}
+sgoto(12000, "tip_loop");
+goto("wait");
+
+function getLoopTipps() {
+	list = list.new();
+	stmt = databank.prepare("SELECT tipp_key, tipp_value FROM tipps WHERE tipp_loop = TRUE");
+	result = databank.execute(stmt);
+	while(databank.next(result)) {
+		a = array.new(2);
+		a[0] = databank.getString(result, 1);
+		a[1] = databank.getString(result, 2);
+		list.add(list, a);
+	}
+	databank.close(result);
+	databank.close(stmt);
+	return list;
+}

+ 31 - 19
test.txt

@@ -1,19 +1,31 @@
-msg("dev", "start");
-
-function throw() {
-	 msg("wusi");
-}
-throw();
-msg("dev", "never");
-
-@on_error
-msg("dev", error_stacktrace);
-msg("dev", error_message);
-msg("dev", error_name);
-msg("dev", error_function);
-if(1 == 2) {
-    msg("dev", "if");
-} else {
-    msg("dev", "else");
-}
-msg("dev", "end");
+player = read.player("marvinius");
+human = human.spawn(entity.getLocation(player));
+for(h = 0; h < 5; h++) {
+	yawHuman(human, 0);
+	for(i = 0; i < 20; i++) {
+		waitfor(2);
+		entity.throw(human, 0, 0, 0.2);
+	}
+	yawHuman(human, -90);
+	for(i = 0; i < 20; i++) {
+		waitfor(2);
+		entity.throw(human, 0.2, 0, 0);
+	}
+	yawHuman(human, 180);
+	for(i = 0; i < 20; i++) {
+		waitfor(2);
+		entity.throw(human, 0, 0, -0.2);
+	}
+	yawHuman(human, 90);
+	for(i = 0; i < 20; i++) {
+		waitfor(2);
+		entity.throw(human, -0.2, 0, 0);
+	}
+}
+entity.remove(human);
+
+function yawHuman(human, yaw) {
+	loc = entity.getLocation(human);
+	loc.setYaw(loc, yaw);
+	entity.teleport(human, loc);
+}

+ 2 - 2
utils/u_games.txt

@@ -60,7 +60,7 @@ goto("simplelobby");
 @lobbycore
 minigame.speakAll(gamename, concat("§8", player.getNickName(player), "§r joined the game."));
 if(no_lobby_tp == null || !no_lobby_tp) {
-	entity.teleport(player, lobbyspawnloc);
+	modTimer.entityTeleport(player, lobbyspawnloc);
 }
 if(no_core_reset == null || !no_core_reset) {
 	resetplayer(player);
@@ -395,7 +395,7 @@ function minigame.addPlayed(player_or_id, game_short, amount) {
 //--------------------------------------------------
 
 function player.tpGamesLobby(player) {
-	entity.teleport(player, minigame.getLastPos(player));
+	modTimer.entityTeleport(player, minigame.getLastPos(player));
 	inv = player.getInv(player);
 	inv.setItem(inv, 0, read.item("minecraft:compass"));
 }

+ 143 - 55
utils/u_general.txt

@@ -311,6 +311,24 @@ function isAdminShop(sign_loc) {
 	return block.getSign(sign_loc, 0) == "[Admin Shop]";
 }
 
+//--------------------------------------------------
+//ModTimer-Utils
+//--------------------------------------------------
+
+function modTimer.scriptCallEvent(event, script) {
+	modTimer(-20);
+	if(script == null) {
+		script.callEvent(event);
+		return;
+	}
+	script.callEvent(event, script);
+}
+
+function modTimer.entityTeleport(entity, location) {
+	modTimer(-15);
+	entity.teleport(entity, location);
+}
+
 //--------------------------------------------------
 //World-Utils
 //--------------------------------------------------
@@ -335,6 +353,14 @@ function world.getOverWorld() {
 	return world.get("overworld");
 }
 
+function world.getTheEnd() {
+	return world.get("the_end");
+}
+
+function world.getTheNether() {
+	return world.get("the_nether");
+}
+
 function world.getGames() {
 	return world.get("games");
 }
@@ -434,7 +460,7 @@ function player.changeInv(player, from_world, to_world) {
 	//Inventory
 	inv.saveForPlayer(player, player, from_world);
 	inv.loadFromPlayer(player, player, to_world);
-	if(!perm.has(player, "isTeam")) {
+	if(perm.has(player, "isSupporter") || !perm.has(player, "isTeam")) {
 		if(!player.isSpectator(player)) {
 			if(to_world_name == "creative") {
 				if(perm.has(player, "creative")) {
@@ -570,6 +596,32 @@ function text.concatList2(list, connector, fromIndex, toIndex) {
 	return string;
 }
 
+function text.getLinkMessage(string) {
+	if(text.contains(string, "https://")) {
+		https_index = text.indexOf(string, "https://", 0);
+		space_index = text.indexOf(string, " ", https_index);
+		length = text.length(string);
+		if(https_index == 0) {
+			msg_before = "";
+		} else {
+			msg_before = text.subString(string, 0, https_index);
+		}
+		if(space_index == -1) {
+			msg_link = text.subString(string, https_index, length);
+			msg_after = "";
+		} else {
+			msg_link = text.subString(string, https_index, space_index);
+			msg_after = text.subString(string, space_index, length);
+		}
+		msg_link = text.link(msg_link, msg_link);
+		a = array.new(3);
+		a[0] = msg_before;
+		a[1] = msg_link;
+		a[2] = msg_after;
+		return a;
+	}
+}
+
 //--------------------------------------------------
 //Showcoords-Utils
 //--------------------------------------------------
@@ -597,29 +649,37 @@ function quest.removeDisplay(player) {
 	sb.remove(player, 1);
 }
 
+function quest.getIds() {
+	return getScriptVar("quest_ids");
+}
+
 function quest.addPlayer(script, player) {
-	quest_ids = getScriptVar("quest_ids");
+	quest_ids = quest.getIds();
 	map.add(quest_ids, player.getUuid(player), script.getId(script));
 }
 
 function quest.removePlayer(player) {
-	quest_ids = getScriptVar("quest_ids");
+	quest_ids = quest.getIds();
 	map.remove(quest_ids, player.getUuid(player));
 }
 
 function player.hasQuest2(player) {
-	quest_ids = getScriptVar("quest_ids");
+	quest_ids = quest.getIds();
 	return map.contains(quest_ids, player.getUuid(player));
 }
 
 function quest.getFromPlayer(player) {
-	quest_ids = getScriptVar("quest_ids");
+	quest_ids = quest.getIds();
 	return map.get(quest_ids, player.getUuid(player));
 }
 
 function player.isQuester(player, script) {
+	if(script == null) {
+		//snuvi.debug("script on player.isQuester was null");
+		return false;
+	}
 	script_id = script.getId(script);
-	quest_ids = getScriptVar("quest_ids");
+	quest_ids = quest.getIds();
 	return map.get(quest_ids, player.getUuid(player)) == script_id;
 }
 
@@ -648,11 +708,42 @@ function quest.addCounter(player, amount) {
 	}
 }
 
+function quest.getBlockList() {
+	list = getScriptVar("quest_block_list");
+	if(list == null) {
+		list = list.new();
+		quest.setBlockList(list);
+	}
+	return list;
+}
+
+function quest.setBlockList(list) {
+	setScriptVar("quest_block_list", list);
+}
+
+function quest.setCooldown(player) {
+	list = quest.getBlockList();
+	list.add(list, player.getUuid(player));
+	quest.setBlockList(list);
+}
+
+function quest.removeCooldown(player) {
+	list = quest.getBlockList();
+	list.remove(list, player.getUuid(player));
+	quest.setBlockList(list);
+}
+
+function quest.isPlayerBlocked(player) {
+	list = quest.getBlockList();
+	return list.contains(list, player.getUuid(player));
+}
+
 function quest.finish(script, player) {
 	sound = sound.get("entity.experience_orb.pickup");
 	category = sound.getCategory("master");
 	sound.spawnForPlayer(player, sound, category);
 	quest.addCounter(player, 1);
+	quest.setCooldown(player);
 	quest.term(script, player);
 }
 
@@ -1381,6 +1472,7 @@ function player.teleport(player, location, setBackPos) {
 			}
 		}
 	}
+	modTimer(-50);
 	entity.teleport(player, location);
 	player.setHeadName(player);
 	player.showDefaultStacks(player);
@@ -1486,53 +1578,7 @@ function msg.quest(player, speaker, line_now, line_max, message) {
 	msg(player, concat("[§b", text.number(line_now), "§r/§b", text.number(line_max), "§r] §a", speaker, " §r| ", concat("§e", message)));
 }
 
-function sendMessageToWorld(world, message) {
-	world_name = world.getName(world);
-	if(word.isSurvName(world_name)) {
-		worldlist = players.toWorldList(world.getOverWorld());
-		for(i = 0; i < list.getSize(worldlist); i++) {
-			msg(list.getIndex(worldlist, i), message);
-		}
-		worldlist = players.toWorldList(world.get("the_end"));
-		for(i = 0; i < list.getSize(worldlist); i++) {
-			msg(list.getIndex(worldlist, i), message);
-		}
-		worldlist = players.toWorldList(world.get("the_nether"));
-		for(i = 0; i < list.getSize(worldlist); i++) {
-			msg(list.getIndex(worldlist, i), message);
-		}
-		return;
-	}
-	worldlist = players.toWorldList(world);
-	for(i = 0; i < list.getSize(worldlist); i++) {
-		msg(list.getIndex(worldlist, i), message);
-	}
-}
-
-function sendMessageToWorld2(world, message1, message2) {
-	world_name = world.getName(world);
-	if(word.isSurvName(world_name)) {
-		worldlist = players.toWorldList(world.getOverWorld());
-		for(i = 0; i < list.getSize(worldlist); i++) {
-			msg(list.getIndex(worldlist, i), message1, message2);
-		}
-		worldlist = players.toWorldList(world.get("the_end"));
-		for(i = 0; i < list.getSize(worldlist); i++) {
-			msg(list.getIndex(worldlist, i), message1, message2);
-		}
-		worldlist = players.toWorldList(world.get("the_nether"));
-		for(i = 0; i < list.getSize(worldlist); i++) {
-			msg(list.getIndex(worldlist, i), message1, message2);
-		}
-		return;
-	}
-	worldlist = players.toWorldList(world);
-	for(i = 0; i < list.getSize(worldlist); i++) {
-		msg(list.getIndex(worldlist, i), message1, message2);
-	}
-}
-
-function sendOnlineMessage(player, message) {
+function msg.online(player, message) {
 	nickname = player.getNickName(player);
 	rank = getRank(player);
 	colorcode = text.subString(rank, 0, 2);
@@ -1580,6 +1626,37 @@ function msg.radius(prefix, message, location, radius) {
 	}
 }
 
+function msg.server(message) {
+	msg("online", text.hover("[§cServer§r]", "The center of Wusiness"), " ", text.replace(message, "&", "§"));
+	msg("SERVER", "[§cServer§r] ", text.replace(message, "&", "§"));
+}
+
+function msg.world(world, message) {
+	world_list = players.toWorldList(world);
+	iter = iterator(world_list);
+	while(hasNext(iter)) {
+		msg(next(iter), message);
+	}
+}
+
+function msg.survival(message) {
+	msg.world(world.getOverWorld(), message);
+	msg.world(world.getTheEnd(), message);
+	msg.world(world.getTheNether(), message);
+}
+
+function msg.story(message) {
+	msg.world(world.getStory(), message);
+}
+
+function msg.creative(message) {
+	msg.world(world.getCreative(), message);
+}
+
+function msg.games(message) {
+	msg.world(world.getGames(), message);
+}
+
 //--------------------------------------------------
 //Item-Utils
 //--------------------------------------------------
@@ -1990,7 +2067,7 @@ function player.isSameClan(player_or_id_1, player_or_id_2) {
 }
 
 function player.setHeadName(player) {
-	player_name = player.getName(player);
+	nickname = player.getNickname(player);
 	clan_string = "";
 	if(player.isInClan(player)) {
 		clan_id = player.getClanId(player);
@@ -2000,7 +2077,7 @@ function player.setHeadName(player) {
 	if(player.isLive(player)) {
 		live_string = "§f[§dLive§f] ";
 	}
-	entity.setName(player, text.concat(live_string, player_name, clan_string));
+	entity.setName(player, text.concat(live_string, nickname, clan_string));
 }
 
 function player.setAdventureAmounts(player_or_id, amount) {
@@ -2084,6 +2161,17 @@ function player.setNoPetDamage(player_or_id, boolean) {
 	config.saveAsync(config);
 }
 
+function player.getTipLoop(player_or_id) {
+	config = playerdata.getSurvival(player_or_id);
+	return config.getBool(config, "tip_loop", true);
+}
+
+function player.setTipLoop(player_or_id, boolean) {
+	config = playerdata.getSurvival(player_or_id);
+	config.set(config, "tip_loop", boolean);
+	config.saveAsync(config);
+}
+
 function player.setVotePoints(player_or_id, amount) {
 	config = playerdata.getSurvival(player_or_id);
 	config.set(config, "votepoints", amount);

+ 1 - 0
utils/u_quest.txt

@@ -7,6 +7,7 @@ function stage.increase(player) {
 }
 
 function quest.start(player, path) {
+	modTimer(-5);
 	script = script.start(path, "utils/u_quest", "utils/u_general");
 	if(script == null) {
 		msg("dev", "quest not started");