Răsfoiți Sursa

new recipes human

Marvin Löschenkohl 3 ani în urmă
părinte
comite
6891aedcc8
38 a modificat fișierele cu 352 adăugiri și 87 ștergeri
  1. 1 1
      codelines.txt
  2. 6 14
      docu_minecraft.php
  3. 2 2
      minigames/hideandseek/hideandseek.txt
  4. 1 1
      minigames/jumpnrun/jumpnrun.txt
  5. 5 4
      minigames/shoppingchaos/shoppingchaos.txt
  6. 3 1
      startscript.txt
  7. 39 0
      story/admont/core.txt
  8. 0 0
      story/floralisdorf.txt
  9. 0 0
      story/jan/bauen.txt
  10. 0 0
      story/jan/hunger.txt
  11. 0 0
      story/jan/jan.txt
  12. 0 0
      story/jan/kalt.txt
  13. 0 0
      story/schiff/region_schiff.txt
  14. 0 0
      story/schiff/schiff_10_Backe_backe_Kuchen.txt
  15. 0 0
      story/schiff/schiff_11_Vorbereitungen.txt
  16. 0 0
      story/schiff/schiff_12_Feuerteufel.txt
  17. 0 0
      story/schiff/schiff_13_Boss.txt
  18. 0 0
      story/schiff/schiff_1_Schiffbruch.txt
  19. 0 0
      story/schiff/schiff_2_Schatz_der_Santa_Maria.txt
  20. 0 0
      story/schiff/schiff_3_Nie_wieder_Hunger_leiden.txt
  21. 0 0
      story/schiff/schiff_4_Feines_Abendessen.txt
  22. 0 0
      story/schiff/schiff_5_Monster_besiegen.txt
  23. 0 0
      story/schiff/schiff_6_Baumaterial_besorgen.txt
  24. 0 0
      story/schiff/schiff_7_Toten_Ehre_erweisen.txt
  25. 0 0
      story/schiff/schiff_8_Ich_bin_durstig.txt
  26. 0 0
      story/schiff/schiff_9_Nuechtern_werden.txt
  27. 0 0
      story/schiffbruch.txt
  28. 4 5
      story/spawn/core.txt
  29. 0 0
      story/spawn/findmentos.txt
  30. 0 0
      story/spawn/stonemage.txt
  31. 0 0
      story/spawn/tutorial.txt
  32. 0 0
      story/surv_1.txt
  33. 3 0
      system/chat.txt
  34. 12 12
      system/chestshops.txt
  35. 23 14
      system/commands.txt
  36. 245 12
      system/survival.txt
  37. 0 17
      test.txt
  38. 8 4
      utils/u_general.txt

+ 1 - 1
codelines.txt

@@ -1,3 +1,4 @@
+time = time.getMillis();
 code_lines = 0;
 sumUpDirectory(file.new("scripts/Archiv"));
 msg("dev", "Im Archiv liegen ", text.number(code_lines), " Zeilen an Code.");
@@ -5,7 +6,6 @@ msg("dev", "Im Archiv liegen ", text.number(code_lines), " Zeilen an Code.");
 code_lines = 0;
 sumUpDirectory(file.new("scripts/minigames"));
 sumUpDirectory(file.new("scripts/storydorf"));
-sumUpDirectory(file.new("scripts/survival"));
 sumUpDirectory(file.new("scripts/system"));
 sumUpDirectory(file.new("scripts/utils"));
 sumUpFile(file.new("scripts/all.txt"));

+ 6 - 14
docu_minecraft.php

@@ -4310,17 +4310,7 @@
     <table>
         <tr>
             <th class="command">pet.isTamed</th>
-            <th class="desc">returns if a pet is tamed</th>
-        </tr>
-        <tr>
-            <td class="bold">Format</td>
-            <td>pet.isTamed(tamable_entity)</td>
-        </tr>
-    </table>
-    <table>
-        <tr>
-            <th class="command">pet.isTamed</th>
-            <th class="desc">returns if a pet is tamed</th>
+            <th class="desc">returns true if a pet is tamed</th>
         </tr>
         <tr>
             <td class="bold">Format</td>
@@ -4330,12 +4320,14 @@
     <table>
         <tr>
             <th class="command">pet.setTamed</th>
-            <th class="desc">returns if a pet is tamed</th>
+            <th class="desc">set tame state for a tamable entity</th>
         </tr>
         <tr>
             <td class="bold">Format</td>
-            <td>pet.setTamed(tamable_entity, true, [owner])</td>
-            <td>pet.setTamed(tamable_entity, false)</td>
+            <td>
+				pet.setTamed(tamable_entity, true, [owner])<br>
+				pet.setTamed(tamable_entity, false)
+			</td>
         </tr>
     </table>
 	<table>

+ 2 - 2
minigames/hideandseek/hideandseek.txt

@@ -281,9 +281,9 @@ for(i = 0; i < list.getSize(escaperlist); i++) {
 		}
 	}
 	map.add(times, p_uuid, seconds);
-	gosub("updatedisplay");
 }
 sgoto(20, "loop");
+gosub("updatedisplay");
 goto("checkgame");
 
 @updatedisplay
@@ -294,7 +294,7 @@ for(i = 0; i < list.getSize(seekerlist); i++) {
 	minigame.displayAll(displayindex++, player.getName(list.getIndex(seekerlist, i)));
 }
 minigame.displayAll(displayindex++, "");
-minigame.displayAll(displayindex++, concat("§6Points §r(Ziel: ", text.number(winpoints), ")"));
+minigame.displayAll(displayindex++, concat("§6Points §r(Goal: ", text.number(winpoints), ")"));
 for(i = 0; i < list.getSize(player_list); i++) {
 	p_uuid = list.getIndex(player_list, i);
 	minigame.displayAll(displayindex++, concat(text.number(map.get(points, p_uuid)), " ", player.getName(p_uuid)));

+ 1 - 1
minigames/jumpnrun/jumpnrun.txt

@@ -157,7 +157,7 @@ if(player.hasMinigameId(player, script_id)) {
 goto("wait");
 
 @newblock
-split(coords, ":", list.getIndex(blocks, math.random(0, list.getSize(blocks) - 1)));
+coords = text.split(":", list.getIndex(blocks, math.random(0, list.getSize(blocks) - 1)));
 x = list.getIndex(coords, 0);
 y = list.getIndex(coords, 1);
 z = list.getIndex(coords, 2);

+ 5 - 4
minigames/shoppingchaos/shoppingchaos.txt

@@ -496,14 +496,14 @@ if(isPlayer(entity)) {
 		}
 	}
 } else {
-	if(entity.getName(human) != "Rezepte") {
+	if(entity.getName(human) != "Recipes") {
 		speakPrefix(player, gamename, "Shop not unlocked.");
 	}
 }
 goto("checkgame");
 
 @inv_click
-if(inv_name == "Rezepte") {
+if(inv_name == "Recipes") {
 	player_uuid = player.getUuid(player);
 	team = map.get(players, player_uuid);
 	item_type = item.getType(item);
@@ -536,11 +536,11 @@ goto("checkgame");
 
 @entity_click
 if(entity.getType(entity) == "human") {
-	if(entity.getName(entity) == "Rezepte") {
+	if(entity.getName(entity) == "Recipes") {
 		player_uuid = player.getUuid(player);
 		menu = map.get(recipe_menus, player_uuid);
 		setRecipePage(player, menu, 1);
-		inv.open(menu, player, "Rezepte");
+		inv.open(menu, player, "Recipes");
 	}
 	goto("checkgame");
 }
@@ -697,6 +697,7 @@ function getIndexFromItemType(item_type) {
 			return i;
 		}
 	}
+	return null;
 }
 
 function getItem(index) {

+ 3 - 1
startscript.txt

@@ -3,6 +3,7 @@ clearscriptvars();
 setMOTD("§eNews§7: §2Clans §f& §cCities! §f- [§d1.16.4§f]\n§cMod Download §f-> §eminecraft§7.§ehammerle§7.§eme");
 
 script.start("system/tables");
+script.start("system/svars");
 script.start("system/perms", "utils/u_general");
 script.startNamed("Playerdata", "system/player_data", "utils/u_general");
 script.startNamed("Chat", "system/chat", "utils/u_general");
@@ -21,7 +22,8 @@ script.startNamed("Survival", "system/survival", "utils/u_general");
 //script.startNamed("Ai", "system/ai", "utils/u_general");
 script.startNamed("Gamecenter", "system/gamecenter", "utils/u_general", "utils/u_games");
 script.startNamed("Ranklist", "system/ranklist", "utils/u_general", "utils/u_games");
-script.startNamed("SpawnQuests", "storydorf/spawn/core", "utils/u_general");
+script.startNamed("QuestsSpawn", "story/spawn/core", "utils/u_general");
+script.startNamed("QuestsAdmont", "story/admont/core", "utils/u_general");
 script.startNamed("Gamerules", "system/gamerules");
 
 error.setConsolePrint(true);

+ 39 - 0
story/admont/core.txt

@@ -0,0 +1,39 @@
+event.load("human_hurt");
+event.load("entity_click");
+
+msg("dev", "§bQuests: §rAdmont loaded.");
+@wait
+wait();
+ignoreGoto(event);
+goto("wait");
+
+@human_hurt
+if(!isPlayer(entity)) {
+	goto("wait");
+}
+player = entity;
+entity = human;
+goto("human_core");
+
+@entity_click
+if(hand == "OFF_HAND") {
+	goto("wait");
+}
+if(entity.getType(entity) != "human") {
+	goto("wait");
+}
+goto("human_core");
+
+@human_core
+if(player.hasQuest2(player)) {
+	goto("wait");
+}
+entity_name = entity.getName(entity);
+if(entity_name == "Oma") {
+	inv = inv.new("333333333");
+	inv.setItem(inv, 0, read.item("minecraft:enchanted_book", 1, "§fQuestname", "§eQuestbeschreibung"));
+	inv.setItem(inv, 1, read.item("minecraft:enchanted_book", 1, "§fQuestname", "§eQuestbeschreibung"));
+	inv.open(inv, player, "Quests");
+	goto("wait");
+}
+goto("wait");

+ 0 - 0
storydorf/floralisdorf.txt → story/floralisdorf.txt


+ 0 - 0
storydorf/jan/bauen.txt → story/jan/bauen.txt


+ 0 - 0
storydorf/jan/hunger.txt → story/jan/hunger.txt


+ 0 - 0
storydorf/jan/jan.txt → story/jan/jan.txt


+ 0 - 0
storydorf/jan/kalt.txt → story/jan/kalt.txt


+ 0 - 0
storydorf/schiff/region_schiff.txt → story/schiff/region_schiff.txt


+ 0 - 0
storydorf/schiff/schiff_10_Backe_backe_Kuchen.txt → story/schiff/schiff_10_Backe_backe_Kuchen.txt


+ 0 - 0
storydorf/schiff/schiff_11_Vorbereitungen.txt → story/schiff/schiff_11_Vorbereitungen.txt


+ 0 - 0
storydorf/schiff/schiff_12_Feuerteufel.txt → story/schiff/schiff_12_Feuerteufel.txt


+ 0 - 0
storydorf/schiff/schiff_13_Boss.txt → story/schiff/schiff_13_Boss.txt


+ 0 - 0
storydorf/schiff/schiff_1_Schiffbruch.txt → story/schiff/schiff_1_Schiffbruch.txt


+ 0 - 0
storydorf/schiff/schiff_2_Schatz_der_Santa_Maria.txt → story/schiff/schiff_2_Schatz_der_Santa_Maria.txt


+ 0 - 0
storydorf/schiff/schiff_3_Nie_wieder_Hunger_leiden.txt → story/schiff/schiff_3_Nie_wieder_Hunger_leiden.txt


+ 0 - 0
storydorf/schiff/schiff_4_Feines_Abendessen.txt → story/schiff/schiff_4_Feines_Abendessen.txt


+ 0 - 0
storydorf/schiff/schiff_5_Monster_besiegen.txt → story/schiff/schiff_5_Monster_besiegen.txt


+ 0 - 0
storydorf/schiff/schiff_6_Baumaterial_besorgen.txt → story/schiff/schiff_6_Baumaterial_besorgen.txt


+ 0 - 0
storydorf/schiff/schiff_7_Toten_Ehre_erweisen.txt → story/schiff/schiff_7_Toten_Ehre_erweisen.txt


+ 0 - 0
storydorf/schiff/schiff_8_Ich_bin_durstig.txt → story/schiff/schiff_8_Ich_bin_durstig.txt


+ 0 - 0
storydorf/schiff/schiff_9_Nuechtern_werden.txt → story/schiff/schiff_9_Nuechtern_werden.txt


+ 0 - 0
storydorf/schiffbruch.txt → story/schiffbruch.txt


+ 4 - 5
storydorf/spawn/core.txt → story/spawn/core.txt

@@ -1,6 +1,5 @@
 event.load("human_hurt");
 event.load("entity_click");
-event.load("custom_command");
 event.load("inv_click");
 
 timestamp = map.new(); //TimeStamp for SkillShop
@@ -8,7 +7,7 @@ timestamp = map.new(); //TimeStamp for SkillShop
 msg("dev", "§bQuests: §rSpawn loaded.");
 @wait
 wait();
-iGoto(event);
+ignoreGoto(event);
 goto("wait");
 
 @human_hurt
@@ -34,7 +33,7 @@ if(player.hasQuest2(player)) {
 }
 entity_name = entity.getName(entity);
 if(entity_name == "Tutorial") {
-	/*script = script.start("storydorf/spawn/tutorial", "utils/u_quest", "utils/u_general");
+	/*script = script.start("story/spawn/tutorial", "utils/u_quest", "utils/u_general");
 	if(script == null) {
 		waitfor(1);
 		msg("dev", "quest waitfor");
@@ -48,7 +47,7 @@ if(entity_name == "Tutorial") {
 	goto("wait");
 }
 if(entity_name == "Marvin") {
-	script = script.start("storydorf/spawn/findmentos", "utils/u_quest", "utils/u_general");
+	script = script.start("story/spawn/findmentos", "utils/u_quest", "utils/u_general");
 	if(script == null) {
 		waitfor(1);
 		msg("dev", "quest waitfor");
@@ -66,7 +65,7 @@ if(entity_name == "Mentos") {
 		msg.quest(player, entity_name, 1, 1, "Another player is in my dream palace.");
 		goto("wait");
 	}
-	script = script.startNamed("Stone Mage", "storydorf/spawn/stonemage", "utils/u_quest", "utils/u_general");
+	script = script.startNamed("Stone Mage", "story/spawn/stonemage", "utils/u_quest", "utils/u_general");
 	if(script == null) {
 		waitfor(1);
 		msg("dev", "quest waitfor");

+ 0 - 0
storydorf/spawn/findmentos.txt → story/spawn/findmentos.txt


+ 0 - 0
storydorf/spawn/stonemage.txt → story/spawn/stonemage.txt


+ 0 - 0
storydorf/spawn/tutorial.txt → story/spawn/tutorial.txt


+ 0 - 0
storydorf/surv_1.txt → story/surv_1.txt


+ 3 - 0
system/chat.txt

@@ -257,6 +257,9 @@ function rank.offerTimeScheduled(player) {
 
 @offerTimeRank
 list = getScriptVar("rank_playtime_list");
+if(list.getSize(list) == 0) {
+	goto("wait");
+}
 a = list.getIndex(list, 0);
 list.removeIndex(list, 0);
 player_uuid = a[0];

+ 12 - 12
system/chestshops.txt

@@ -3,7 +3,7 @@ event.load("inv_click");
 event.load("inv_close");
 event.load("block_click");
 
-prefix_shop = "§vShop";
+prefix_shop = "§6Shop";
 wall_signs_tag = block.getTag("minecraft:wall_signs");
 invid_to_sign_loc = map.new();
 
@@ -139,19 +139,19 @@ if(command == "shop") {
 	if(size == 0) {
 		@syntax
 		msg.prefix(player, prefix_shop, "/shop ...");
-		msg(player, "§v - create §rCreates a shop");
-		msg(player, "§v - buy <amount> <price> §rSet buy settings");
-		msg(player, "§v - sell <amount> <price> §rSet sell settings");
-		msg(player, "§v - remove <buy/sell> §rRemove settings");
+		msg(player, "§6 - create §rCreates a shop");
+		msg(player, "§6 - buy <amount> <price> §rSet buy settings");
+		msg(player, "§6 - sell <amount> <price> §rSet sell settings");
+		msg(player, "§6 - remove <buy/sell> §rRemove settings");
 		if(perm.has(player, "adminshop")) {
-			msg(player, "§v - admin §rSet to adminshop");
+			msg(player, "§6 - admin §rSet to adminshop");
 		}
 		goto("wait");
 	}
 	arg0 = text.toLowerCase(list.getIndex(args, 0));
 	if(arg0 == "create") {
 		if(size != 1) {
-			msg.prefix(player, prefix_shop, "§v/shop create");
+			msg.prefix(player, prefix_shop, "§6/shop create");
 			goto("wait");
 		}
 		sign_loc = player.getTarget(player, 5, false, false);
@@ -175,11 +175,11 @@ if(command == "shop") {
 	}
 	if(arg0 == "admin") {
 		if(!perm.has(player, "adminshop")) {
-			msg.prefix(player, prefix_shop, "§vNo Permission.");
+			msg.prefix(player, prefix_shop, "§6No Permission.");
 			goto("wait");
 		}
 		if(size != 1) {
-			msg.prefix(player, prefix_shop, "§v/shop admin");
+			msg.prefix(player, prefix_shop, "§6/shop admin");
 			goto("wait");
 		}
 		sign_loc = player.getTarget(player, 5, false, false);
@@ -199,7 +199,7 @@ if(command == "shop") {
 	}
 	if(arg0 == "buy" || arg0 == "sell") {
 		if(size != 3) {
-			msg.prefix(player, prefix_shop, concat("§v/shop ", arg0, " <amount> <price>"));
+			msg.prefix(player, prefix_shop, concat("§6/shop ", arg0, " <amount> <price>"));
 			goto("wait");
 		}
 		amount = list.getIndex(args, 1);
@@ -236,7 +236,7 @@ if(command == "shop") {
 	}
 	if(arg0 == "remove") {
 		if(size != 2) {
-			msg.prefix(player, prefix_shop, concat("§v/shop remove <buy/sell>"));
+			msg.prefix(player, prefix_shop, concat("§6/shop remove <buy/sell>"));
 			goto("wait");
 		}
 		sign_loc = player.getTarget(player, 5, false, false);
@@ -259,7 +259,7 @@ if(command == "shop") {
 		} elseif(arg1 == "sell") {
 			block.setSign(sign_loc, 2, "");
 		} else {
-			msg.prefix(player, prefix_shop, concat("§v/shop remove <buy/sell>"));
+			msg.prefix(player, prefix_shop, concat("§6/shop remove <buy/sell>"));
 			goto("wait");
 		}
 		msg.prefix(player, prefix_shop, "§rPrice removed.");

+ 23 - 14
system/commands.txt

@@ -227,7 +227,7 @@ if(afk_map == null) {
 		element = next(iter);
 		player = player.get(map.getKey(element));
 		if(player != null) {
-			setAfk(player, true);
+			player.setAfk(player, true);
 		}
 	}
 }
@@ -664,7 +664,7 @@ if(event == "player_login") {
 	goto("wait");
 }
 if(event == "player_logout") {
-	setAfk(player, false);
+	player.setAfk(player, false);
 	list.remove(jailed_list, player.getUuid(player));
 	if(player.hasQuest2(player)) {
 		script_id = quest.getFromPlayer(player);
@@ -1721,8 +1721,8 @@ msg.prefix(player, prefix_commands, concat("Rank for ", p_name, " changed to [",
 goto("wait");
 
 @nowb
-if(isAfk(player)) {
-	setAfk(player, false);
+if(player.isAfk(player)) {
+	player.setAfk(player, false);
 	msg.prefix(player, prefix_commands, "marvinius whispers to you: Welcome back ;-)");
 	player.setTabName(player);
 } else {
@@ -1732,12 +1732,12 @@ goto("wait");
 
 @afk
 nickname = player.getNickname(player);
-if(isAfk(player)) {
+if(player.isAfk(player)) {
 	msg.prefix("online", prefix_commands, concat(nickname, "§7 is back."));
-	setAfk(player, false);
+	player.setAfk(player, false);
 } else {
 	msg.prefix("online", prefix_commands, concat(nickname, "§7 is now afk."));
-	setAfk(player, true);
+	player.setAfk(player, true);
 }
 player.setTabName(player);
 if(!afk_loop_active) {
@@ -1800,7 +1800,7 @@ while(hasNext(iter)) {
 			nickname = player.getNickname(player);
 			msg.prefix("online", prefix_commands, concat(nickname, "§7 is back."));
 			remove(iter);
-			setAfk(player, false);
+			player.setAfk(player, false);
 			player.setTabName(player);
 		}
 	}
@@ -2676,11 +2676,16 @@ elseif(arg0 == "ticket") {
 	script.startNamed("Ticket", "system/ticketsystem", "utils/u_general");
 }
 elseif(arg0 == "quests") {
-	script = script.get("SpawnQuests");
+	script = script.get("QuestsSpawn");
 	if(script != null) {
 		script.term(script);
 	}
-	script.startNamed("SpawnQuests", "storydorf/spawn/core", "utils/u_general");
+	script.startNamed("QuestsSpawn", "story/spawn/core", "utils/u_general");
+	script = script.get("QuestsAdmont");
+	if(script != null) {
+		script.term(script);
+	}
+	script.startNamed("QuestsAdmont", "story/admont/core", "utils/u_general");
 }
 elseif(arg0 == "sitting") {
 	script = script.get("Sitting");
@@ -3399,7 +3404,7 @@ if(size == 1) {
 for(i = 0; i < size; i++) {
 	p = list.getIndex(list, i);
 	full_name = player.getFullName(p);
-	if(isAfk(p)) {
+	if(player.isAfk(p)) {
 		full_name = concat("§7§m", removeFormat(full_name));
 	}
 	msg(sender, full_name);
@@ -5287,7 +5292,7 @@ if(arg0 == "list") {
 			perm.no(player, "home.other");
 			goto("wait");
 		}
-		affectedname = list.getIndex(args, 1);
+		affectedname = text.toLowerCase(list.getIndex(args, 1));
 		affecteduuid = player.getUuid(affectedname);
 		if(affecteduuid == null) {
 			msg.prefix(player, prefix_commands, "This player has never been online.");
@@ -5333,7 +5338,7 @@ if(arg0 == "set") {
 		msg.prefix(player, prefix_commands, concat("You can only set ", text.number(max_homes), " homes."));
 		goto("wait");
 	}
-	name = list.getIndex(args, 1);
+	name = text.toLowerCase(list.getIndex(args, 1));
 	if(name == "set" || name == "del" || name == "delete" || name == "list") {
 		msg.prefix(player, prefix_commands, "This name ist not allowed.");
 		goto("wait");
@@ -5356,7 +5361,7 @@ if(arg0 == "set") {
 }
 //Teleportation
 if(size == 2) {
-	affectedname = list.getIndex(args, 1);
+	affectedname = text.toLowerCase(list.getIndex(args, 1));
 }
 affecteduuid = player.getUuid(affectedname);
 if(affecteduuid == null) {
@@ -8864,6 +8869,10 @@ function plot.getMoveIdFromPlotId(plot_id) {
 player_uuid = list.getIndex(check_for_plot_list, 0);
 list.removeIndex(check_for_plot_list, 0);
 player = player.get(player_uuid);
+if(player == null) {
+	map.remove(actual_move_id, player_uuid);
+	goto("wait");
+}
 player_loc = entity.getLocation(player);
 plot_list = plot.get(player_loc);
 if(list.getSize(plot_list) == 0) {

+ 245 - 12
system/survival.txt

@@ -32,6 +32,8 @@ skill.add("Head Hunter", "skill.head_human", "minecraft:player_head", "Drops a p
 
 clan.loadData();
 
+items_list = list.new(); //Array-List: Alle Items mit Rezepten
+recipe_site_map = map.new();
 doors = list.new();
 tp_list = list.new();
 tp_map = map.new();
@@ -61,6 +63,125 @@ 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);
 
+air = "minecraft:air";
+air_item = read.item(air);
+leather = "minecraft:leather";
+string = "minecraft:string";
+iron_ingot = "minecraft:iron_ingot";
+bronze_ingot = "km:bronze_ingot";
+copper_ingot = "km:copper_ingot";
+tin_ingot = "km:tin_ingot";
+silver_ingot = "km:silver_ingot";
+stick = "minecraft:stick";
+planks = "minecraft:oak_planks";
+cobblestone = "minecraft:cobblestone";
+iron_ingot = "minecraft:iron_ingot";
+gold_ingot = "minecraft:gold_ingot";
+diamond = "minecraft:diamond";
+book = "minecraft:book";
+birch_planks = "minecraft:birch_planks";
+dark_oak_planks = "minecraft:dark_oak_planks";
+jungle_planks = "minecraft:jungle_planks";
+spruce_planks = "minecraft:spruce_planks";
+acacia_planks = "minecraft:acacia_planks";
+coarse_dirt = "minecraft:coarse_dirt";
+gravel = "minecraft:gravel";
+wheat = "minecraft:wheat";
+grass = "minecraft:grass";
+iron_nugget = "minecraft:iron_nugget";
+hay_bundle = "km:hay_bundle";
+real_hay_block = "km:real_hay_block";
+
+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);
+recipe.add(1, "km:bronze_chestplate", bronze_ingot, air, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot);
+recipe.add(1, "km:bronze_leggings", bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, air, bronze_ingot, bronze_ingot, air, bronze_ingot);
+recipe.add(1, "km:bronze_boots", bronze_ingot, air, bronze_ingot, bronze_ingot, air, bronze_ingot, air, air, air);
+recipe.add(1, "km:copper_helmet", copper_ingot, copper_ingot, copper_ingot, copper_ingot, air, copper_ingot, air, air, air);
+recipe.add(1, "km:copper_chestplate", copper_ingot, air, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot);
+recipe.add(1, "km:copper_leggings", copper_ingot, copper_ingot, copper_ingot, copper_ingot, air, copper_ingot, copper_ingot, air, copper_ingot);
+recipe.add(1, "km:copper_boots", copper_ingot, air, copper_ingot, copper_ingot, air, copper_ingot, air, air, air);
+recipe.add(1, "km:bookshelf_acacia", acacia_planks, acacia_planks, acacia_planks, book, book, book, acacia_planks, acacia_planks, acacia_planks);
+recipe.add(1, "km:bookshelf_birch", birch_planks, birch_planks, birch_planks, book, book, book, birch_planks, birch_planks, birch_planks);
+recipe.add(1, "km:bookshelf_dark_oak", dark_oak_planks, dark_oak_planks, dark_oak_planks, book, book, book, dark_oak_planks, dark_oak_planks, dark_oak_planks);
+recipe.add(1, "km:bookshelf_jungle", jungle_planks, jungle_planks, jungle_planks, book, book, book, jungle_planks, jungle_planks, jungle_planks);
+recipe.add(1, "km:bookshelf_spruce", spruce_planks, spruce_planks, spruce_planks, book, book, book, spruce_planks, spruce_planks, spruce_planks);
+recipe.add(1, "km:copper_block", copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot);
+recipe.add(1, "km:bronze_block", bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot);
+recipe.add(1, "km:tin_block", tin_ingot, tin_ingot, tin_ingot, tin_ingot, tin_ingot, tin_ingot, tin_ingot, tin_ingot, tin_ingot);
+recipe.add(1, "km:silver_block", silver_ingot, silver_ingot, silver_ingot, silver_ingot, silver_ingot, silver_ingot, silver_ingot, silver_ingot, silver_ingot);
+recipe.add(1, "km:mushroom_stick_raw", air, "minecraft:brown_mushroom", "minecraft:brown_mushroom", air, stick, "minecraft:red_mushroom", air, air, air);
+recipe.add(1, bronze_ingot, tin_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot, copper_ingot);
+recipe.add(1, copper_ingot, air, air, air, air, "km:copper_ore", air, air, air, air);
+recipe.add(1, tin_ingot, air, air, air, air, "km:tin_ore", air, air, air, air);
+recipe.add(1, silver_ingot, air, air, air, air, "km:silver_ore", air, air, air, air);
+recipe.add(1, "km:spikes_bronze", air, bronze_ingot, air, bronze_ingot, bronze_ingot, bronze_ingot, air, air, air);
+recipe.add(1, "km:spikes_copper", air, copper_ingot, air, copper_ingot, copper_ingot, copper_ingot, air, air, air);
+recipe.add(1, "km:spikes_gold", air, gold_ingot, air, gold_ingot, gold_ingot, gold_ingot, air, air, air);
+recipe.add(1, "km:spikes_iron", air, iron_ingot, air, iron_ingot, iron_ingot, iron_ingot, air, air, air);
+recipe.add(1, "km:wooden_battleaxe", air, planks, planks, air, stick, planks, stick, air, air);
+recipe.add(1, "km:stone_battleaxe", air, cobblestone, cobblestone, air, stick, cobblestone, stick, air, air);
+recipe.add(1, "km:iron_battleaxe", air, iron_ingot, iron_ingot, air, stick, iron_ingot, stick, air, air);
+recipe.add(1, "km:golden_battleaxe", air, gold_ingot, gold_ingot, air, stick, gold_ingot, stick, air, air);
+recipe.add(1, "km:diamond_battleaxe", air, diamond, diamond, air, stick, diamond, stick, air, air);
+recipe.add(1, "km:copper_battleaxe", air, copper_ingot, copper_ingot, air, stick, copper_ingot, stick, air, air);
+recipe.add(1, "km:bronze_battleaxe", air, bronze_ingot, bronze_ingot, air, stick, bronze_ingot, stick, air, air);
+recipe.add(1, "km:copper_axe", air, copper_ingot, copper_ingot, air, copper_ingot, stick, air, stick, air);
+recipe.add(1, "km:bronze_axe", air, bronze_ingot, bronze_ingot, air, bronze_ingot, stick, air, stick, air);
+recipe.add(1, "km:wooden_dagger", air, air, planks, air, stick, air, air, air, air);
+recipe.add(1, "km:stone_dagger", air, air, cobblestone, air, stick, air, air, air, air);
+recipe.add(1, "km:iron_dagger", air, air, iron_ingot, air, stick, air, air, air, air);
+recipe.add(1, "km:golden_dagger", air, air, gold_ingot, air, stick, air, air, air, air);
+recipe.add(1, "km:diamond_dagger", air, air, diamond, air, stick, air, air, air, air);
+recipe.add(1, "km:copper_dagger", air, air, copper_ingot, air, stick, air, air, air, air);
+recipe.add(1, "km:bronze_dagger", air, air, bronze_ingot, air, stick, air, air, air, air);
+recipe.add(1, "km:copper_hoe", air, copper_ingot, copper_ingot, air, air, stick, air, air, stick);
+recipe.add(1, "km:bronze_hoe", air, bronze_ingot, bronze_ingot, air, air, stick, air, air, stick);
+recipe.add(1, "km:wooden_hammer", planks, planks, planks, planks, stick, planks, air, stick, air);
+recipe.add(1, "km:stone_hammer", cobblestone, cobblestone, cobblestone, cobblestone, stick, cobblestone, air, stick, air);
+recipe.add(1, "km:iron_hammer", iron_ingot, iron_ingot, iron_ingot, iron_ingot, stick, iron_ingot, air, stick, air);
+recipe.add(1, "km:golden_hammer", gold_ingot, gold_ingot, gold_ingot, gold_ingot, stick, gold_ingot, air, stick, air);
+recipe.add(1, "km:diamond_hammer", diamond, diamond, diamond, diamond, stick, diamond, air, stick, air);
+recipe.add(1, "km:copper_hammer", copper_ingot, copper_ingot, copper_ingot, copper_ingot, stick, copper_ingot, air, stick, air);
+recipe.add(1, "km:bronze_hammer", bronze_ingot, bronze_ingot, bronze_ingot, bronze_ingot, stick, bronze_ingot, air, stick, air);
+recipe.add(1, "km:copper_shovel", air, copper_ingot, air, air, stick, air, air, stick, air);
+recipe.add(1, "km:bronze_shovel", air, bronze_ingot, air, air, stick, air, air, stick, air);
+recipe.add(1, "km:wooden_scepter", air, stick, planks, air, stick, stick, stick, air, air);
+recipe.add(1, "km:stone_scepter", air, stick, cobblestone, air, stick, stick, stick, air, air);
+recipe.add(1, "km:iron_scepter", air, stick, iron_ingot, air, stick, stick, stick, air, air);
+recipe.add(1, "km:golden_scepter", air, stick, gold_ingot, air, stick, stick, stick, air, air);
+recipe.add(1, "km:diamond_scepter", air, stick, diamond, air, stick, stick, stick, air, air);
+recipe.add(1, "km:copper_scepter", air, stick, copper_ingot, air, stick, stick, stick, air, air);
+recipe.add(1, "km:bronze_scepter", air, stick, bronze_ingot, air, stick, stick, stick, air, air);
+recipe.add(1, "km:copper_pickaxe", copper_ingot, copper_ingot, copper_ingot, air, stick, air, air, stick, air);
+recipe.add(1, "km:bronze_pickaxe", bronze_ingot, bronze_ingot, bronze_ingot, air, stick, air, air, stick, air);
+recipe.add(1, "km:wooden_stick", air, air, planks, air, stick, air, planks, air, air);
+recipe.add(1, "km:stone_stick", air, air, cobblestone, air, stick, air, cobblestone, air, air);
+recipe.add(1, "km:iron_stick", air, air, iron_ingot, air, stick, air, iron_ingot, air, air);
+recipe.add(1, "km:golden_stick", air, air, gold_ingot, air, stick, air, gold_ingot, air, air);
+recipe.add(1, "km:diamond_stick", air, air, diamond, air, stick, air, diamond, air, air);
+recipe.add(1, "km:copper_stick", air, air, copper_ingot, air, stick, air, copper_ingot, air, air);
+recipe.add(1, "km:bronze_stick", air, air, bronze_ingot, air, stick, air, bronze_ingot, air, air);
+recipe.add(1, "km:copper_sword", air, copper_ingot, air, air, copper_ingot, air, air, stick, air);
+recipe.add(1, "km:bronze_sword", air, bronze_ingot, air, air, bronze_ingot, air, air, stick, air);
+recipe.add(1, "km:mushroom_stick_cooked", air, air, air, air, "km:mushroom_stick_raw", air, air, air, air);
+recipe.add(1, "km:fried_egg", air, air, air, air, "minecraft:egg", air, air, air, air);
+recipe.add(1, "km:straw_hat", air, wheat, air, wheat, wheat, wheat, air, air, air);
+recipe.add(1, "km:crate_acacia", acacia_planks, acacia_planks, acacia_planks, acacia_planks, acacia_planks, acacia_planks, acacia_planks, acacia_planks, acacia_planks);
+recipe.add(1, "km:crate_birch", birch_planks, birch_planks, birch_planks, birch_planks, birch_planks, birch_planks, birch_planks, birch_planks, birch_planks);
+recipe.add(1, "km:crate_big_oak", dark_oak_planks, dark_oak_planks, dark_oak_planks, dark_oak_planks, dark_oak_planks, dark_oak_planks, dark_oak_planks, dark_oak_planks, dark_oak_planks);
+recipe.add(1, "km:crate_oak", planks, planks, planks, planks, planks, planks, planks, planks, planks);
+recipe.add(1, "km:crate_jungle", jungle_planks, jungle_planks, jungle_planks, jungle_planks, jungle_planks, jungle_planks, jungle_planks, jungle_planks, jungle_planks);
+recipe.add(1, "km:crate_spruce", spruce_planks, spruce_planks, spruce_planks, spruce_planks, spruce_planks, spruce_planks, spruce_planks, spruce_planks, spruce_planks);
+recipe.add(1, "km:coarse_dirt_slab", air, air, air, coarse_dirt, coarse_dirt, coarse_dirt, air, air, air);
+recipe.add(1, "km:gravel_slab", air, air, air, gravel, gravel, gravel, air, air, air);
+recipe.add(1, "km:cooking_pot_copper", copper_ingot, air, copper_ingot, copper_ingot, air, copper_ingot, copper_ingot, copper_ingot, copper_ingot);
+recipe.add(1, hay_bundle, grass, grass, grass, grass, grass, grass, grass, grass, grass);
+recipe.add(1, real_hay_block, hay_bundle, hay_bundle, hay_bundle, hay_bundle, hay_bundle, hay_bundle, hay_bundle, hay_bundle, hay_bundle);
+recipe.add(1, "km:real_hay_bed", air, air, air, real_hay_block, real_hay_block, real_hay_block, air, air, air);
+recipe.add(1, "km:lantern", iron_nugget, iron_nugget, iron_nugget, "minecraft:glass_pane", "minecraft:torch", "minecraft:glass_pane", iron_nugget, iron_nugget, iron_nugget);
+recipe.add(1, "km:sling", string, stick, string, string, air, string, air, string, air);
+recipe.add(4, "minecraft:string", air, air, air, air, "minecraft:white_wool", air, air, air, air);
 
 
 par = particle.get("minecraft:witch");
@@ -80,8 +201,6 @@ set.add(auto_farm_set2, "minecraft:carrots");
 set.add(auto_farm_set2, "minecraft:potatoes");
 set.add(auto_farm_set2, "minecraft:beetroots");
 
-bank_human_name = "Banker";
-adv_human_name = "Adventure";
 bankmenu = inv.new("233302332233302332");
 bankinvid = inv.getID(bankmenu);
 coin_gold = read.item("km:coin_gold", 1, "§f4096 snuvis");
@@ -183,7 +302,7 @@ if(!isPlayer(living_entity)) {
 		goto("wait");
 	}
 	pet_type = entity.getType(living_entity);
-	if(pet_type == "wolf" || pet_type == "cat" || pet_type == "horse") {
+	if(pet_type == "wolf" || pet_type == "cat") {
 		if(pet.isTamed(living_entity)) {
 			owner = pet.getOwner(living_entity);
 			if(owner == damager) {
@@ -223,11 +342,17 @@ if(hand == "OFF_HAND") {
 }
 if(entity.getType(entity) == "human") {
 	entity_name = entity.getName(entity);
-	if(entity_name == bank_human_name) {
+	if(entity_name == "Recipes") {
+		recipe_menu = inv.new("333333333333333333333333333333333333333333333200000022");
+		recipe.setPage(player, recipe_menu, 1);
+		inv.open(recipe_menu, player, "Recipes");
+		goto("wait");
+	}
+	if(entity_name == "Banker") {
 		inv.open(bankmenu, player, "Banker");
 		goto("wait");
 	}
-	if(entity_name == adv_human_name) {
+	if(entity_name == "Adventure") {
 		if(!player.isOnAdventure(player)) {
 			msg.prefix(player, "§5Adventure", "§rYou aren't on an adventure. Click the chest in the teleporter for an adventure.");
 			goto("wait");
@@ -254,7 +379,7 @@ if(entity.getType(entity) == "human") {
 goto("wait");
 
 @player_logout
-setAfk(player, false);
+player.setAfk(player, false);
 goto("wait");
 
 @player_login
@@ -368,6 +493,38 @@ if(inv_id == bankinvid) { //Bankmenü
 	}
 	goto("wait");
 }
+if(inv_name == "Recipes") {
+	item_type = item.getType(item);
+	if(item_type == "minecraft:air") {
+		goto("wait");
+	}
+	if(item_type == "km:return_red") {
+		page = map.getOrDefault($recipe_site_map, player.getUuid(player), 1);
+		recipe.setPage(player, inv, page);
+		goto("wait");
+	}
+	if(item_type == "minecraft:paper") {
+		name = item.getName(item);
+		if(text.contains(name, "<<") || text.contains(name, ">>")) {
+			page = removeFormat(name);
+			page = text.replace(page, "<<", "");
+			page = text.replace(page, ">>", "");
+			page = read.number(page);
+			if(inv_slot == 46) {
+				recipe.setPage(player, inv, page);
+			}
+			if(inv_slot == 47) {
+				recipe.setPage(player, inv, page);
+			}
+			goto("wait");
+		}
+	}
+	index = recipe.getIndexFromItemType(item_type);
+	if(index == null) {
+		goto("wait");
+	}
+	recipe.showRecipe(player, inv, index);
+}
 goto("wait");
 
 @block_break
@@ -527,7 +684,7 @@ if(block_type == "minecraft:lectern") {
 				betrag += level * 20 + extra;
 			}
 			if(!hasEnoughMoney(player.getId(player), betrag)) {
-				msg.prefix(player, prefix_money, concat("§rNot enough coin in inventory. This action costs ", text.number(betrag), " Gold."));
+				msg.prefix(player, prefix_money, concat("§rNot enough coins in inventory. This action costs ", text.number(betrag), " snuvis."));
 				goto("wait");
 			}
 			subMoney(player, betrag);
@@ -553,7 +710,7 @@ if(block_type == "minecraft:lectern") {
 			map_size = map.getSize(map2);
 			betrag = 20 * map_size;
 			if(!hasEnoughMoney(player.getId(player), betrag)) {
-				msg.prefix(player, prefix_money, concat("§rNot enough money in account. This action costs ", text.number(betrag), " Gold."));
+				msg.prefix(player, prefix_money, concat("§rNot enough money in account. This action costs ", text.number(betrag), " snuvis."));
 				goto("wait");
 			}
 			subMoney(player, betrag);
@@ -586,7 +743,7 @@ if(block_type == "minecraft:lectern") {
 			
 			betrag = 20 * value;
 			if(!hasEnoughMoney(player.getId(player), betrag)) {
-				msg.prefix(player, prefix_money, concat("§rNot enough money in account. This action costs ", text.number(betrag), " Gold."));
+				msg.prefix(player, prefix_money, concat("§rNot enough money in account. This action costs ", text.number(betrag), " snuvis."));
 				goto("wait");
 			}
 			subMoney(player, betrag);
@@ -638,7 +795,7 @@ if(block_type == "minecraft:lectern") {
 				betrag += level * 20;
 			}
 			if(!hasEnoughMoney(player.getId(player), betrag)) {
-				msg.prefix(player, prefix_money, concat("§rNot enough money in account. This action costs ", text.number(betrag), " Gold."));
+				msg.prefix(player, prefix_money, concat("§rNot enough money in account. This action costs ", text.number(betrag), " snuvis."));
 				goto("wait");
 			}
 			subMoney(player, betrag);
@@ -651,7 +808,7 @@ if(block_type == "minecraft:lectern") {
 		entity.throw(item_entity1, 0, 0.3, 0);
 		entity.throw(item_entity2, 0, 0.3, 0);
 		particle.spawn(loc.mod(block_loc, 0.5, 1.4, 0.5), par, 20, 0, 0.25, 0.25, 0.25);
-		msg.prefix(player, prefix_money, concat("This cost " , text.number(betrag), " Gold."));
+		msg.prefix(player, prefix_money, concat("This cost " , text.number(betrag), " snuvis."));
 	}
 	goto("wait");
 }
@@ -859,4 +1016,80 @@ if(bool) {
 	title.send(player, "§cAdventure");
 	msg.prefix(player, "§5Adventure", "§rTo complete your adventure, walk to the survival spawn. You cannot teleport. If you die, you start again!");
 }
-goto("wait");
+goto("wait");
+
+function recipe.add(result_amount, result_item, item1, item2, item3, item4, item5, item6, item7, item8, item9) {
+	array = array.new(11);
+	array[0] = result_amount;
+	array[1] = result_item;
+	array[2] = item1;
+	array[3] = item2;
+	array[4] = item3;
+	array[5] = item4;
+	array[6] = item5;
+	array[7] = item6;
+	array[8] = item7;
+	array[9] = item8;
+	array[10] = item9;
+	list.add($items_list, array);
+}
+
+function recipe.getIndexFromItemType(item_type) {
+	for(i = 0; i < list.getSize($items_list); i++) {
+		array = list.getIndex($items_list, i);
+		if(array[1] == item_type) {
+			return i;
+		}
+	}
+	return null;
+}
+
+function recipe.showRecipe(player, menu, index) {
+	for(i = 0; i < 48; i++) {
+		inv.setItem(menu, i, $air_item);
+	}
+	array = list.getIndex($items_list, index);
+	inv.setItem(menu, 23, read.item("km:arrow_right"));
+	inv.setItem(menu, 45, read.item("km:return_red", 1, "§fReturn to overview"));
+	inv.setItem(menu, 10, read.item(array[2]));
+	inv.setItem(menu, 11, read.item(array[3]));
+	inv.setItem(menu, 12, read.item(array[4]));
+	inv.setItem(menu, 19, read.item(array[5]));
+	inv.setItem(menu, 20, read.item(array[6]));
+	inv.setItem(menu, 21, read.item(array[7]));
+	inv.setItem(menu, 28, read.item(array[8]));
+	inv.setItem(menu, 29, read.item(array[9]));
+	inv.setItem(menu, 30, read.item(array[10]));
+	inv.setItem(menu, 25, read.item(array[1], array[0]));
+	inv.update(player);
+}
+
+function recipe.setPage(player, menu, page) {
+	map.add($recipe_site_map, player.getUuid(player), page);
+	size = list.getSize($items_list);
+	max_page = math.roundUp(size / 45);
+	if(page > max_page) {
+		return;
+	}
+	if(page > 1) {
+		inv.setItem(menu, 46, read.item("minecraft:paper", 1, concat("§e", text.number(page - 1), " <<")));
+	} else {
+		inv.setItem(menu, 46, $air_item);
+	}
+	if(page < max_page) {
+		inv.setItem(menu, 47, read.item("minecraft:paper", 1, concat("§e>> ", text.number(page + 1))));
+	} else {
+		inv.setItem(menu, 47, $air_item);
+	}
+	max_index = size - 1;
+	for(i = 0; i < 45; i++) {
+		list_index = i + 45 * (page - 1);
+		if(list_index > max_index) {
+			inv.setItem(menu, i, $air_item);
+		} else {
+			array = list.getIndex($items_list, list_index);
+			inv.setItem(menu, i, read.item(array[1]));
+		}
+	}
+	inv.update(player);
+}

+ 0 - 17
test.txt

@@ -1,17 +0,0 @@
-table.setsize("f", 5);
-table.setsize("k", 5);
-table.setsize("I", 4);
-table.setsize("t", 4);
-table.setsize(" ", 4);
-table.setsize("[", 4);
-table.setsize("]", 4);
-table.setsize("{", 4);
-table.setsize("}", 4);
-table.setsize("(", 4);
-table.setsize(")", 4);
-table.setsize("l", 3);
-table.setsize(";", 2);
-table.setsize(",", 2);
-table.setsize(".", 2);
-table.setsize("i", 2);
-table.setsize(":", 2);

+ 8 - 4
utils/u_general.txt

@@ -1142,7 +1142,7 @@ function player.teleport(player, location, backPos) {
 				}
 				p_name = player.getName(p);
 				if(!loc.isSameWorld(player_loc, entity.getLocation(p))) {
-					msg.prefix(player, "§5Party", concat(p_name, "§c is another world."));
+					msg.prefix(player, "§5Party", concat(p_name, "§c is in another world."));
 					continue;
 				}
 				if(player.hasMinigame(p)) {
@@ -1157,6 +1157,10 @@ function player.teleport(player, location, backPos) {
 					msg.prefix(player, "§5Party", concat(p_name, "§c is on an adventure."));
 					continue;
 				}
+				if(player.isAfk(p)) {
+					msg.prefix(player, "§5Party", concat(p_name, "§c is on an adventure."));
+					continue;
+				}
 				player.teleport(p, location, backPos);
 			}
 		}
@@ -1418,7 +1422,7 @@ function player.getFullName(player) {
 
 function player.setTabName(player) {
 	nickname = player.getNickname(player);
-	if(isAfk(player)) {
+	if(player.isAfk(player)) {
 		tab_name = concat("§7§m", nickname);
 	} else {
 		rank = getRank(player);
@@ -2552,13 +2556,13 @@ function minigame.addElo(player_or_id, elo) {
 //Afk-Utils
 //--------------------------------------------------
 
-function isAfk(player) {
+function player.isAfk(player) {
 	player_uuid = player.getUuid(player);
 	afk_map = getScriptVar("afk_map");
 	return map.contains(afk_map, player_uuid);
 }
 
-function setAfk(player, boolean) {
+function player.setAfk(player, boolean) {
 	player_uuid = player.getUuid(player);
 	afk_map = getScriptVar("afk_map");
 	if(boolean) {