Browse Source

some snuvi changes after 1.20.4 update

Marvin Löschenkohl 1 year ago
parent
commit
c2367a6c70

+ 12 - 2
docu_minecraft.php

@@ -1218,6 +1218,16 @@
             <td>citizen.getName(citizen)</td>
         </tr>
     </table>
+	<table>
+        <tr>
+            <th class="command">citizen.lookclose</th>
+            <th class="desc">makes a citizen look at nearby players</th>
+        </tr>
+        <tr>
+            <td class="bold">Format</td>
+            <td>citizen.lookclose(citizen)</td>
+        </tr>
+    </table>
 </section>
 
 <section id="Config">
@@ -1248,7 +1258,7 @@
             <td class="bold">Arguments</td>
 			 <td>
 				damage_name:
-				inFire,	lightningBolt, onFire, lava, hotFloor, inWall, cramming, drown, starve, cactus, fall, flyIntoWall, outOfWorld, generic, magic, wither, anvil, fallingBlock, dragonBreath, dryout, sweetBerryBush, freeze, fallingStalactite, stalagmite
+				inFire,	lightningBolt, onFire, lava, hotFloor, inWall, cramming, drown, starve, cactus, fall, flyIntoWall, outOfWorld, generic, magic, wither, anvil, fallingBlock, dragonBreath, dryout, sweetBerryBush, freeze, fallingStalactite, stalagmite, outsideBorder, genericKill
             </td>
         </tr>
     </table>
@@ -3115,7 +3125,7 @@
     <table>
         <tr>
             <th class="command">command.addHelpChild</th>
-            <th class="desc">help-sub-object2 is added tp help-(sub-)object1 as a new argument</th>
+            <th class="desc">help-sub-object2 is added to help-(sub-)object1 as a new argument</th>
         </tr>
         <tr>
             <td class="bold">Format</td>

+ 2 - 2
minigames/among_us/among_us.txt

@@ -5672,7 +5672,7 @@ minigame.term(script, gamesignloc);
 term();
 
 @on_error
-snuvi.debug("Error Handler activated");
+msg.dev("Error Handler activated");
 if(progress_bar != null) {
 	boss.removeAll(progress_bar);
 }
@@ -5704,5 +5704,5 @@ if(script_id != null) {
 	}
 	minigame.kickAllPlayers(script_id);
 }
-snuvi.debug("Script terminated (Minigame).");
+msg.dev("Script terminated (Minigame).");
 term();

+ 2 - 2
minigames/gamecenter.txt

@@ -310,7 +310,7 @@ if(script_id == null) {
 		script = script.start(pfad, "utils/u_games", "utils/u_gameserror", "utils/u_general");
 	}
 	if(script == null) {
-		snuvi.debug("Minigame throws error on gamestart");
+		msg.dev("Minigame throws error on gamestart");
 		goto("wait");
 	}
 	map.add(script_ids, block_loc, script.getId(script));
@@ -345,7 +345,7 @@ minigame.singleJoin(script, player);
 goto("wait");
 
 @error_on_gamejoin
-snuvi.debug(string.concat("Started gamesign existing without game behind ", script_id, " ", block_loc));
+msg.dev(string.concat("Started gamesign existing without game behind ", script_id, " ", block_loc));
 map.remove(script_ids, block_loc);
 goto("startnewgame");
 

+ 1 - 1
minigames/jumpnrun/4d/3d_shadow/shadow_jump_core.txt

@@ -135,7 +135,7 @@ if(event == "minigame_join"){
 	}
 	Active_Blocks = place_blocks(Dimension_Blocks);
 	msg.prefix(player, $gamename, "Game has loaded.");
-	//snuvi.debug(list.getSize(Dimension_Blocks));
+	//msg.dev(list.getSize(Dimension_Blocks));
 	goto("wait");
 }
 

+ 1 - 1
minigames/jumpnrun/4d/4d_j_r_core.txt

@@ -109,7 +109,7 @@ if(event == "minigame_join"){
 	}
 	place_blocks($current_layer, Dimension_Blocks);
 	msg.prefix(player, $gamename, "Game has loaded.");
-	//snuvi.debug(list.getSize(Dimension_Blocks));
+	//msg.dev(list.getSize(Dimension_Blocks));
 	goto("wait");
 }
 if(event == "block_break"){

+ 1 - 1
minigames/jumpnrun/todesjumpnrun.txt

@@ -650,7 +650,7 @@ function tjr.setMode(player, mode) {
 		type = "Modus: §eModul";
 		clearHotbar(player_inv);
 		inv.setItem(player_inv, 0, item.custom.create("REFRESH_RED", 1, "§fReset to checkpoint", null));
-		inv.setItem(player_inv, 0, item.create("PAPER", 1, "§fChoose a modul", null));
+		inv.setItem(player_inv, 1, item.create("PAPER", 1, "§fChoose a modul", null));
 		$jumpstage = 0;
 		sb.add(player, 97, string.concat("Your record: §e", time.getClockString(tjr.getModulTime(player, $jumpstage) / 1000)));
 		tjr.setStarttime();

+ 2 - 2
minigames/ragemode/ragemode.txt

@@ -215,13 +215,13 @@ if(entity_hit != null) {
 	attacker_name = player.getName(attacker);
 	attacker_uuid = player.getUuid(attacker);
 	if(!list.contains(player_list, attacker_uuid)) {
-		snuvi.debug("Ragemode: Illegaler Spieler");
+		msg.dev("Ragemode: Illegaler Spieler");
 		goto("wait");
 	}
 	defender = entity_hit;
 	defender_uuid = player.getUuid(defender);
 	if(!list.contains(player_list, defender_uuid)) {
-		snuvi.debug("Ragemode: Kein PlayerEntity oder illegaler Spieler");
+		msg.dev("Ragemode: Kein PlayerEntity oder illegaler Spieler");
 		goto("wait");
 	}
 	defender_name = player.getName(defender);

+ 13 - 16
minigames/shoppingchaos/shoppingchaos.txt

@@ -15,6 +15,8 @@ start_sound = sound.get("BLOCK_NOTE_BLOCK_HARP");
 wall_signs_tag = block.getTag("minecraft:wall_signs");
 black_glass_pane = item.create("BLACK_STAINED_GLASS_PANE", 1, "", null);
 black_glass_pane_mat = material.get("BLACK_STAINED_GLASS_PANE");
+item_frame_class = "org.bukkit.entity.ItemFrame";
+armor_stand_class = "org.bukkit.entity.ArmorStand";
 
 players = map.new(); //Alle player_uuids mit Verweis auf die Team-Nr
 playersinteam = map.new(); //Anzahl der Spieler im Team
@@ -292,7 +294,6 @@ while(list.getSize(waiters) != 0) {
 event.load("player_post_respawn");
 event.load("entity_click");
 event.load("snuvi_click");
-event.load("human_damage");
 event.load("player_teleport");
 
 for(i = 0; i < list.getSize(player_list); i++) {
@@ -336,7 +337,7 @@ for(i = 0; i < list.getSize(allteams); i++) {
 	direction = map.get(sell_frame_directions, team);
 	frame_loc = list.getIndex(sell_frame_locs, index);
 	entity = list.getIndex(humans_list, index);
-	entity.removeAll("org.bukkit.entity.ItemFrame", frame_loc, 1);
+	entity.removeAll(item_frame_class, frame_loc, 1);
 	item = getItem(getRandomIndex());
 	entity.frame.spawn(frame_loc, direction, item);
 	map.add(sales_map, entity, item);
@@ -416,7 +417,7 @@ while(hasNext(iter)) {
 	} else {
 		index = list.getIndexOf(humans_list, key);
 		location = list.getIndex(sell_frame_locs, index);
-		entity.removeAll("org.bukkit.entity.ItemFrame", location, 1);
+		entity.removeAll(item_frame_class, location, 1);
 		step = list.getSize(sell_frame_locs) / numberofteams;
 		team = math.roundDown(index / step);
 		direction = map.get(sell_frame_directions, team);
@@ -432,15 +433,11 @@ sgoto(20, "loop");
 @checkgame
 wait();
 if(event == "entity_damage") {
+	//TODO: entity, damager_entity
 	if(!isPlayer(entity)) {
 		goto("checkgame");
 	}
 	player = entity;
-} elseif(event == "human_damage") {
-	player = player.getFromDamageSource(damage_source);
-	if(player == null) {
-		goto("checkgame");
-	}
 }
 if(player.hasMinigameId(player, script_id)) {
 	ignoreGoto(event);
@@ -486,7 +483,7 @@ goto("checkgame");
 cancel = true;
 goto("checkgame");
 
-@human_damage
+@shopitem
 if(map.contains(sales_map, human)) {
 	hand_item = living.getHand(player);
 	aim_item = map.get(sales_map, human);
@@ -496,7 +493,7 @@ if(map.contains(sales_map, human)) {
 		direction = map.get(sell_frame_directions, team);
 		item = getItem(getRandomIndex());
 		location = list.getIndex(sell_frame_locs, list.getIndexOf(humans_list, human));
-		entity.removeAll("org.bukkit.entity.ItemFrame", location, 1);
+		entity.removeAll(item_frame_class, location, 1);
 		entity.frame.spawn(location, direction, item);
 		map.add(sales_map, human, item);
 		time = math.random(30, 60);
@@ -566,7 +563,7 @@ if(entity.isHuman(entity)) {
 		inv.open(menu, player);
 	}
 	human = entity;
-	goto("human_damage");
+	goto("shopitem");
 }
 goto("checkgame");
 
@@ -593,7 +590,7 @@ if(list.contains(removed_perms, player_uuid)) {
 	list.remove(removed_perms, player_uuid);
 	perm.loadGroupToPlayer(16, player);
 	perm.update(player);
-	snuvi.debug(perm.has("plot.bypass", player));
+	msg.dev(perm.has("plot.bypass", player));
 }
 if(singleteam) {
 	script = script.getFromId(script_id);
@@ -737,7 +734,7 @@ function getItem(index) {
 
 function setItemFrames(team, index) {
 	loc = list.getIndex($frame_locs, team);
-	entity.removeAll("org.bukkit.entity.ItemFrame", loc, 3.5);
+	entity.removeAll(item_frame_class, loc, 3.5);
 	direction = map.get($frame_directions, team);
 	array = list.getIndex($items_list, index);
 	entity.frame.spawn(loc, direction, array[0]);
@@ -792,7 +789,7 @@ function resetSigns() {
 	for(i = 0; i < list.getSize($sell_frame_locs); i++) {
 		if(counter != 0) { //Erste Locs werden übersprungen. Kein Schild platzieren = Freigeschalteter Shop
 			loc = list.getIndex($sell_frame_locs, i);
-			entity.removeAll("org.bukkit.entity.ItemFrame", loc, 1);
+			entity.removeAll(item_frame_class, loc, 1);
 			direction = map.get($sell_frame_directions, team);
 			block = block.get(loc);
 			block.setMaterial(block, oak_wall_sign);
@@ -812,7 +809,7 @@ function resetSigns() {
 function resetFrames() {
 	for(i = 0; i < list.getSize($frame_locs); i++) {
 		loc = list.getIndex($frame_locs, i);
-		entity.removeAll("org.bukkit.entity.ItemFrame", loc, 3.5);
+		entity.removeAll(item_frame_class, loc, 3.5);
 		direction = map.get($frame_directions, i);
 		entity.frame.spawn(loc, direction, $air_item);
 		entity.frame.spawn(loc.mod(loc, 0, -1, 0), direction, $air_item);
@@ -894,7 +891,7 @@ function getAllEntites() {
 		list.add(humans_list, human);
 		//as
 		location = loc.mod(location, 0, 2.05, 0);
-		as = entity.get(location, 1, "org.bukkit.entity.ArmorStand");
+		as = entity.get(location, 1, armor_stand_class);
 		map.add($as_map, human, as);
 	}
 	return humans_list;

+ 7 - 6
minigames/snowfight/snowmap3.txt

@@ -1,11 +1,11 @@
-mapname = "Icy Tower";
+mapname = "Black Hole";
 numberofteams = 4;
 teamsize = 2;
 minplayers = 2;
 maxplayers = 8;
 gamesignloc = minigame.getSignLoc("snowsign3");
 gamesworld = world.getGames();
-lobbyspawnloc = loc.new(gamesworld, -1224, 43, -995, 90, 0);
+lobbyspawnloc = loc.new(gamesworld, 969.5, 83, 975.5, 90, 0);
 
 middleloc = loc.new(gamesworld, 2008, 109, 4008);
 radius = 50;
@@ -14,10 +14,11 @@ black_holes = list.new();
 white_holes = list.new();
 
 joinblocks = list.new(); //Liste der Blöcke, um einem Team zu joinen
-list.add(joinblocks, loc.new(gamesworld, -1229, 42, -992));
-list.add(joinblocks, loc.new(gamesworld, -1229, 42, -999));
-list.add(joinblocks, loc.new(gamesworld, -1229, 42, -992));
-list.add(joinblocks, loc.new(gamesworld, -1229, 42, -999));
+//blau rot gelb grün
+list.add(joinblocks, loc.new(gamesworld, 973, 83, 975));
+list.add(joinblocks, loc.new(gamesworld, 969, 83, 979));
+list.add(joinblocks, loc.new(gamesworld, 969, 83, 971));
+list.add(joinblocks, loc.new(gamesworld, 965, 83, 975));
 
 spawnlocs = map.new(); //Liste der Spawnlocs der einzelnen Teams
 map.add(spawnlocs, 0, loc.new(gamesworld, 2000, 100, 4000));

+ 2 - 0
startscript.txt

@@ -64,5 +64,7 @@ script.startNamed("Scheduler", "utils/u_error", "system/scheduler", "utils/u_gen
 //setMOTD("§d§k# §eMundus Crassus §d§k# §f-  [§d1.18.2§f]\n§cNew: §a§lCHALLENGES");
 setMOTD("§eMundus Crassus §f- [§d1.20.4§f]\n§cPrivate");
 
+command2.unregister("icanhasbukkit");
+
 error.setConsolePrint(false);
 term();

+ 1 - 1
survival/skills.txt

@@ -435,7 +435,7 @@ function better_ladder.continue_block(player, block, of_mat, xyz){
 			break;
 		}
 		elseif(mat == $water_mat){
-			snuvi.debug(block.getData(new_block));
+			msg.dev(block.getData(new_block));
 			if (string.contains(string.blockData(block.getData(new_block)), "falling=true")){
 				break;
 			}

+ 10 - 11
system/commands.txt

@@ -4,21 +4,21 @@ last_error_message = null;
 @on_error
 error_counter++;
 if(error_counter > 1) {
-	snuvi.debug("Error Handler activated");
+	msg.dev("Error Handler activated");
 	if(last_error_message == error_message) {
-		snuvi.debug("Same error again");
+		msg.dev("Same error again");
 		term();
 	}
 	last_error_message = error_message;
 	if(event == "custom_command") {
-		snuvi.debug(string.concat("Command ", command, " failed."));
+		msg.dev(string.concat("Command ", command, " failed."));
 		set.add(failed_cmds, command);
 		goto("wait");
 	}
-	snuvi.debug("Restarting script...");
+	msg.dev("Restarting script...");
 	error_counter++;
 	if(error_counter >= 5) {
-		snuvi.debug("Script terminated. Endless loop.");
+		msg.dev("Script terminated. Endless loop.");
 		term();
 	}
 }
@@ -29,7 +29,6 @@ setCommandHelps();
 command.clear();
 
 //--- Register commands not shown on /help here ---
-command.add("hack");
 //Games
 command.add("nextplayer");
 command.add("invstats");
@@ -794,7 +793,7 @@ if(event == "player_quit") {
 		script_id = quest.getFromPlayer(player);
 		script = script.getFromId(script_id);
 		if(script == null) {
-			snuvi.debug("Player logged out with corrupt quest");
+			msg.dev("Player logged out with corrupt quest");
 			quest.removePlayer(player); //in case of corrupt quest
 			goto("wait");
 		}
@@ -2854,7 +2853,7 @@ for(i = 0; i < array.getSize(a); i++) {
 	item.setAmount(item, item.getMaxAmount(item));
 	inv.setItem(inv, i, item);
 	if(i > 53) {
-		snuvi.debug("More customitems than can be shown in one inv");
+		msg.dev("More customitems than can be shown in one inv");
 		break;
 	}
 }
@@ -4082,7 +4081,7 @@ elseif(arg0 == "challenges") {
 elseif(arg0 == "commands") {
 	script = script.startNamed("Commands", "system/commands", "utils/u_general", "utils/u_commands", "utils/u_cmdhelp", "utils/u_skills");
 	if(script == null) {
-		snuvi.debug("Old commands script still active due to error in new script");
+		msg.dev("Old commands script still active due to error in new script");
 		goto("wait");
 	}
 	script.term(script.get());
@@ -8948,7 +8947,7 @@ if(script_id == null) {
 }
 script = script.getFromId(script_id);
 if(script == null) {
-	snuvi.debug("Player used giveup on corrupt quest");
+	msg.dev("Player used giveup on corrupt quest");
 	quest.removePlayer(player); //in case of corrupt quest
 	msg.prefix(player, prefix_quest, "You have no quest.");
 	goto("wait");
@@ -8966,7 +8965,7 @@ if(hasNext(iter)) {
 	script_id = next(iter);
 	script = script.getFromId(script_id);
 	if(script == null) {
-		snuvi.debug(string.concat("Player left game without existing gamescript ", set));
+		msg.dev(string.concat("Player left game without existing gamescript ", set));
 		msg.prefix(player, prefix_commands, "An error occured and some displays may not have been reset. So please panic and call for an admin! No, please don´t do that.");
 		player.resetMinigames(player);
 		entity.teleport(player, world.getGamesSpawn());

+ 74 - 0
system/humans.txt

@@ -1,4 +1,5 @@
 event.load("entity_click");
+gamesworld = world.getGames();
 
 lore_list = list.new();
 list.add(lore_list, text.new("§aLeftclick §f= §eBuy"));
@@ -24,6 +25,35 @@ nether_inv = createMainMenu("Nether Merchant", true, false, false, false);
 diver_inv = createMainMenu("Diver", true, false, false, false);
 mage_guard_inv = createMainMenu("Mage Guard", false, true, false, false);
 
+skins = map.new();
+addSkin("notch", "ewogICJ0aW1lc3RhbXAiIDogMTYyNDUyNjI0NjM2MywKICAicHJvZmlsZUlkIiA6ICIwNjlhNzlmNDQ0ZTk0NzI2YTViZWZjYTkwZTM4YWFmNSIsCiAgInByb2ZpbGVOYW1lIiA6ICJOb3RjaCIsCiAgInNpZ25hdHVyZVJlcXVpcmVkIiA6IHRydWUsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8yOTIwMDlhNDkyNWI1OGYwMmM3N2RhZGMzZWNlZjA3ZWE0Yzc0NzJmNjRlMGZkYzMyY2U1NTIyNDg5MzYyNjgwIgogICAgfQogIH0KfQ==", "K76X+5wYgbcKhUxr5ZJuF4MXquYNPM5ypUf6DdNz2k0+XaJlobLVVdETe2LotlHyj6ABoU3//8mGZnfwhdj2BiulOErpB6cQR4pMmIrW6T3TLCt4L8d9juQy7xy7Dw9sQngXWm2h3Cazm+205qa0apnvA/i+IGv+WeutP52kfGhJBAN7uBUQaut0NWBfFPL8Jo7DhwBvWf/KWVpcT9UcVQuS/dVP/VE0rrTTSf3x2/jGI0ksBEdOz5lROARCHwOA1sRDvP1nQHhZD1Uekj4Bmo6rsAjJCrzr++nK2IcaPMv1uTLv0sbsGe4JF884rqWHYzs7/Cc5lGv8FNy+QjHmTcISfjnlxwJIkI48KOmAjuaova+tU1gBHRFHqJR186Vw8gtIGHusitFr6rUuutODaHyJ1C9VnItyk5RF3eznsh+uUHSkT9NOCTAhx11UhaFjlIHgqHG3rRVmeFWyEKHE8Pk2yEAlROGPedp+oYEwMFbM97Q+og7W/RtSH+kYl9vNwpLrQEG2F0bQUtulwQrWzk8T2fKgPHncZIDS2YvQjrrHjjlG0bLbiakHGvRrMrLbrVtmQrKjOjLuc5j4M/quMoZpFz98q4uftCmNOyN9ZmoEjgFv5fOdsJDGJawSaug9VEieCWhuuPnXPx19GpT1TRzGRjDW9DqO08kNeCcRxq0=");
+addSkin("xmas_girl", "ewogICJ0aW1lc3RhbXAiIDogMTU5NjIyODQ5NDI0NiwKICAicHJvZmlsZUlkIiA6ICJhMjk1ODZmYmU1ZDk0Nzk2OWZjOGQ4ZGE0NzlhNDNlZSIsCiAgInByb2ZpbGVOYW1lIiA6ICJWaWVydGVsdG9hc3RpaWUiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWUwYjJmNzg5NDZkZThmZjg4YzFkYzI2OTkwMTgxNTEzMjE1NzQ3NDZmZjg1ZjQ1Y2U5Nzk1YzZmMjc4NDNiNyIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9", "kDLavxU1Et/E6Gak3MaUHsqrH91LcQyxNUy1hG8Vr/0CL4uqWXMYFT1SP9VDrkPbfnzpqQIDG7uTfEsIwrMS0fpsMugdEmlwXv4Omcc+4j6VYT1BNvchNrxyvc4otsY9fTjMHfyxvmTB2yjUQdlJEjHPKw17cbH2lpFgEiNi1SM+V+IVHfg/gXnEufjYaTek+3uNd6UUiukc6S6MTeGcstJ3qJh5DUk/PJKWqapgoVqBGFmFoyqPgb0Ns2LEqvKPJc+uGvB6FpUPLYkqC+8HokYnBTxAFOF0803Xh4y0E17I+GckFGJsa2EP40g0oj2aFnua+lchAU1d0B8RkN2u0yD4bqELQjjxLj26qnDvl6V3aJ00KD/BCIiaPMxfyYKI5BFceFRYU2qwNX83LorkFIzuFDhRtn1jyYn5fDGN3CtSdQ60q733N3jXA14sUntrKiIEUrwu+HN2Qo2765skEiXoBMc7blHfgh0RFt4g/S021xd1gyid7ZqftG5TXeyvGZQH3XuQcdZ6o1nB8g2mnT1w36wGaIcUdCV5VWD9YxI1zjbNKeAONpHOFmgZxgJpJGaaYqJeJe4KgtPlxM6WTQ6g6U60bG14IZ5ZRfbAggb3jOaTYAH0tIahOaKO9/2POR+hRVIQ2lpQE7iOsPWQOoBIV8fy8pQMhsvWuqKcrww=");
+
+citizens = list.new();
+//gamesspawn
+addCitizen("marvinius", loc.new(gamesworld, -409.5, 161, -59.5), null);
+addCitizen("eropster", loc.new(gamesworld, -303.5, 157, -41.5), null);
+//shoppingchaos
+addCitizen("Recipes", loc.new(gamesworld, -2.5, 101, 2984.5), "xmas_girl");
+addCitizen("Recipes", loc.new(gamesworld, 3.5, 101, 3016.5), "xmas_girl");
+addCitizen("Recipes", loc.new(gamesworld, 16.5, 101, 2997.5), "xmas_girl");
+addCitizen("Recipes", loc.new(gamesworld, -15.5, 101, 3003.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, 0.5, 101, 2993.5), "xmas_girl"); //Team 1
+addCitizen("Shop", loc.new(gamesworld, 2.5, 101, 2993.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, -1.5, 101, 2993.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, 0.5, 101, 3007.5), "xmas_girl"); //Team 2
+addCitizen("Shop", loc.new(gamesworld, -1.5, 101, 3007.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, 2.5, 101, 3007.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, 7.5, 101, 3000.5), "xmas_girl"); //Team 3
+addCitizen("Shop", loc.new(gamesworld, 7.5, 101, 3002.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, 7.5, 101, 2998.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, -6.5, 101, 3000.5), "xmas_girl"); //Team 4
+addCitizen("Shop", loc.new(gamesworld, -6.5, 101, 2998.5), "xmas_girl");
+addCitizen("Shop", loc.new(gamesworld, -6.5, 101, 3002.5), "xmas_girl");
+//bedwars
+
+initCitizens();
+
 msg.string("dev", "§bHumans §rloaded.");
 @main
 wait();
@@ -89,3 +119,47 @@ function createMainMenu(inv_name, market, quests, skills, challenges) {
 	}
 	return inv;
 }
+
+function addSkin(skin_name, texture_value, texture_signature) {
+	a = array.new(2);
+	a[0] = texture_value;
+	a[1] = texture_signature;
+	map.add($skins, skin_name, a);
+}
+
+function addCitizen(name, loc, skin_name) {
+	a = array.new(3);
+	a[0] = name;
+	a[1] = loc;
+	a[2] = skin_name;
+	list.add($citizens, a);
+}
+
+function initCitizens() {
+	iter = iterator($citizens);
+	while(hasNext(iter)) {
+		a = next(iter);
+		name = a[0];
+		loc = a[1];
+		skin_name = a[2];
+		//check if citizen is at the location
+		l = entity.near(loc, 0.7);
+		if(list.getSize(l) > 0) {
+			c = list.getIndex(l, 0);
+			if(isCitizen(c)) {
+				//at the location a citizen exists already
+				continue;
+			}
+		}
+		//spawn citizen
+		c = citizen.spawn(loc, name);
+		if(skin_name != null) {
+			msg.dev(skin_name);
+			a_skin = map.get($skins, skin_name);
+			msg.dev(c);
+			msg.dev(a_skin);
+			citizen.setSkin(c, a_skin[0], a_skin[1]);
+		}
+		citizen.lookclose(c);
+	}
+}

+ 1 - 0
system/perms.txt

@@ -32,6 +32,7 @@ perm.addGroup(19, "creativeWE", null, true);
 perm.setGroups(permgroups);
 
 perm.addToGroup(0, "isUser");
+perm.addToGroup(0, "missing.icanhasbukkit");
 perm.addToGroup(0, "afk");
 perm.addToGroup(0, "answer");
 perm.addToGroup(0, "back");

+ 39 - 0
test.txt

@@ -0,0 +1,39 @@
+p = read.player("marvinius");
+
+command2.unregister("cmdsendworkaround");
+cmd = command2.newHelp("fly", "fly");
+command2.addHelpArgument(cmd, command2.newHelpSpecial("Player", "player"));
+command2.addHelpArgument(cmd, command2.newHelpLiteral("wusi"));
+command2.registerHelp(cmd);
+
+cmd = command2.newHelp("icon", "icon");
+command2.addHelpArgument(cmd, command2.newhelpstring("gusi", false));
+command2.registerHelp(cmd);
+
+cmd = command2.newHelp("tp", "tp");
+command2.addHelpArgument(cmd, command2.newHelpLiteral("wusi"));
+command2.registerHelp(cmd);
+
+cmd = command2.newHelp("allsounds", "allsounds");
+command2.addHelpArgument(cmd, command2.newHelpInt("wusi", 0, 100));
+command2.registerHelp(cmd);
+
+cmd = command2.newHelp("abc", "abc");
+command2.addHelpArgument(cmd, command2.newHelpInt("wusi", 0, 100));
+command2.registerHelp(cmd);
+
+cmd = command2.newHelp("iteminfo", "iteminfo");
+command2.addHelpArgument(cmd, command2.newHelpSpecial("Item", "item"));
+command2.addHelpArgument(cmd, command2.newHelpSpecial("Player", "player"));
+command2.registerHelp(cmd);
+
+cmd = command2.newHelp("iteminfo", "iteminfo");
+command2.addHelpArgument(cmd, command2.newHelpLiteral("gusi"));
+command2.addHelpArgument(cmd, command2.newHelpLiteral("wusi"));
+command2.addHelpArgument(cmd, command2.newHelpLiteral("susi", "susi"));
+command2.addHelpArgument(cmd, command2.newHelpLiteral("kusi"));
+command2.registerHelp(cmd);
+
+
+msg("dev",text.new("wusi"));
+msg("SERVER",text.new("wusi"));

+ 17 - 0
utils/u_cmdhelp.txt

@@ -1,4 +1,21 @@
 function setCommandHelps() {
+	cmd = command2.newHelp("fly", "fly");
+	command2.addHelpArgument(cmd, command2.newHelpSpecial("Player", "player"));
+	command2.addHelpArgument(cmd, command2.newHelpLiteral("wusi"));
+	command2.registerHelp(cmd);
+
+	cmd = command2.newHelp("icon", "icon");
+	command2.addHelpArgument(cmd, command2.newhelpstring("gusi", false));
+	command2.registerHelp(cmd);
+
+	cmd = command2.newHelp("tp", "tp");
+	command2.addHelpArgument(cmd, command2.newHelpLiteral("wusi"));
+	command2.registerHelp(cmd);
+
+	cmd = command2.newHelp("allsounds", "allsounds");
+	command2.addHelpArgument(cmd, command2.newHelpInt("wusi", 0, 100));
+	command2.registerHelp(cmd);
+	return;
 	command.clearHelp();
 	command.clearIgnored();
 	command.clearNoPerm();

+ 4 - 4
utils/u_error.txt

@@ -3,15 +3,15 @@ last_error_message = null;
 @on_error
 error_counter++;
 if(error_counter > 1) {
-	snuvi.debug("Error Handler activated");
+	msg.dev("Error Handler activated");
 	if(last_error_message == error_message) {
-		snuvi.debug("Same error again");
+		msg.dev("Same error again");
 		term();
 	}
 	last_error_message = error_message;
-	snuvi.debug("Restarting script...");
+	msg.dev("Restarting script...");
 	if(error_counter >= 5) {
-		snuvi.debug("Script terminated. Endless loop.");
+		msg.dev("Script terminated. Endless loop.");
 		term();
 	}
 }

+ 5 - 5
utils/u_general.txt

@@ -1357,7 +1357,7 @@ function player.teleport(player, location, setBackPos) {
 function playerdata.getSurvival(player_or_id) {
 	player_id = player.getValidId(player_or_id);
 	if(player_id == null) {
-		snuvi.debug(string.concat("invalid player_id ", player_id, " on playerdata.getSurvival"));
+		msg.dev(string.concat("invalid player_id ", player_id, " on playerdata.getSurvival"));
 		return;
 	}
 	map = getScriptVar("survival_data");
@@ -1372,7 +1372,7 @@ function playerdata.getSurvival(player_or_id) {
 function playerdata.getGames(player_or_id) {
 	player_id = player.getValidId(player_or_id);
 	if(player_id == null) {
-		snuvi.debug(string.concat("invalid player_id ", player_id, " on playerdata.getGames"));
+		msg.dev(string.concat("invalid player_id ", player_id, " on playerdata.getGames"));
 		return;
 	}
 	map = getScriptVar("games_data");
@@ -1387,7 +1387,7 @@ function playerdata.getGames(player_or_id) {
 function playerdata.load(player_or_id, map, name) {
 	player_id = player.getValidId(player_or_id);
 	if(player_id == null) {
-		snuvi.debug(string.concat("invalid player_id ", player_id, " on playerdata.load"));
+		msg.dev(string.concat("invalid player_id ", player_id, " on playerdata.load"));
 		return;
 	}
 	config = map.get(map, player_id);
@@ -2716,7 +2716,7 @@ function money.split(money) {
 function money.splitCap(money) {
 	//cap liegt bei 266304 (64 gold + 64 silver + 64 bronze)
 	if(money > 266304) {
-		snuvi.debug("error on money.splitCap");
+		msg.dev("error on money.splitCap");
 		return null;
 	}
 	gold = math.roundDown(money / 4096);
@@ -3754,7 +3754,7 @@ function clan.loadData() {
 
 function clan.getData(clan_id) {
 	if(clan_id == null) {
-		snuvi.debug("script termed. clan_id was null");
+		msg.dev("script termed. clan_id was null");
 		term();
 	}
 	map = getScriptVar("clan_data");

+ 1 - 1
utils/u_quest.txt

@@ -10,7 +10,7 @@ function quest.start(player, path) {
 	modTimer(-45);
 	script = script.start(path, "utils/u_quest", "utils/u_general", "utils/u_questerror");
 	if(script == null) {
-		snuvi.debug("quest not started");
+		msg.dev("quest not started");
 		return;
 	}
 	quest.addPlayer(script, player);

+ 2 - 2
utils/u_questerror.txt

@@ -1,9 +1,9 @@
 @on_error
-snuvi.debug("Error Handler activated");
+msg.dev("Error Handler activated");
 if(player != null) {
 	msg.string(player, "§cThere was an error in the quest.");
 	quest.removePlayer(player);
 	quest.removeDisplay(player);
 }
-snuvi.debug("Script terminated (Quest).");
+msg.dev("Script terminated (Quest).");
 term();