|
@@ -26,6 +26,7 @@ command.add("infopoint11");
|
|
//Vanilla überschreiben
|
|
//Vanilla überschreiben
|
|
command.add("help");
|
|
command.add("help");
|
|
command.add("butcher");
|
|
command.add("butcher");
|
|
|
|
+command.add("yeet");
|
|
|
|
|
|
alias_map = map.new();
|
|
alias_map = map.new();
|
|
command_list = list.new();
|
|
command_list = list.new();
|
|
@@ -63,6 +64,7 @@ command.register("head", "Gives you a player's head");
|
|
command.register("heal", "Heals, fills hunger bar and remove effects");
|
|
command.register("heal", "Heals, fills hunger bar and remove effects");
|
|
command.register("home", "Manage your homes");
|
|
command.register("home", "Manage your homes");
|
|
command.register("live", "Toggles Live-Mode");
|
|
command.register("live", "Toggles Live-Mode");
|
|
|
|
+command.register("lag", "Executes a lag test");
|
|
command.register("leave", "Leave a minigame");
|
|
command.register("leave", "Leave a minigame");
|
|
command.register("human", "Human-Commands");
|
|
command.register("human", "Human-Commands");
|
|
command.register("inv", "Inv-Commands");
|
|
command.register("inv", "Inv-Commands");
|
|
@@ -86,6 +88,7 @@ command.register("playtime", "Shows your playtime");
|
|
command.register("plot", "Plot-Commands");
|
|
command.register("plot", "Plot-Commands");
|
|
command.register("plough", "Plough dirt around you");
|
|
command.register("plough", "Plough dirt around you");
|
|
command.register("pvp", "Toggles pvp");
|
|
command.register("pvp", "Toggles pvp");
|
|
|
|
+command.register("quest", "Quest-Commands");
|
|
command.register("rank", "Shows your available ranks");
|
|
command.register("rank", "Shows your available ranks");
|
|
command.register("repair", "Repairs your item in mainhand");
|
|
command.register("repair", "Repairs your item in mainhand");
|
|
command.register("report", "Report whatever you want");
|
|
command.register("report", "Report whatever you want");
|
|
@@ -136,6 +139,7 @@ command.register("warn", "Warns a player");
|
|
command.register("warp", "Warp-Commands");
|
|
command.register("warp", "Warp-Commands");
|
|
command.register("weather", "Weather-Commands");
|
|
command.register("weather", "Weather-Commands");
|
|
command.register("world", "World-Commands");
|
|
command.register("world", "World-Commands");
|
|
|
|
+command.register("yeet", "Throws the Player");
|
|
|
|
|
|
command.registerAlias("afklo", "afk");
|
|
command.registerAlias("afklo", "afk");
|
|
command.registerAlias("itemdb", "iteminfo");
|
|
command.registerAlias("itemdb", "iteminfo");
|
|
@@ -248,7 +252,6 @@ if(afk_map == null) {
|
|
if(player != null) {
|
|
if(player != null) {
|
|
player.setAfk(player, true);
|
|
player.setAfk(player, true);
|
|
afk_loop_active = true;
|
|
afk_loop_active = true;
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -263,6 +266,7 @@ money.setBoostFactor(1);
|
|
sgoto(10, "coordsloop");
|
|
sgoto(10, "coordsloop");
|
|
sgoto(1200, "afk_checker_loop");
|
|
sgoto(1200, "afk_checker_loop");
|
|
|
|
|
|
|
|
+lag_list = list.new();
|
|
clan_invitations = list.new();
|
|
clan_invitations = list.new();
|
|
friend_requests = map.new();
|
|
friend_requests = map.new();
|
|
lock_chests = map.new();
|
|
lock_chests = map.new();
|
|
@@ -350,74 +354,19 @@ rank_array[24, 0] = "rank.user";
|
|
rank_array[24, 1] = "3User";
|
|
rank_array[24, 1] = "3User";
|
|
setScriptVar("ranks", rank_array);
|
|
setScriptVar("ranks", rank_array);
|
|
|
|
|
|
-permgroupToRank = map.new();
|
|
|
|
-map.add(permgroupToRank, "admin", "cAdmin");
|
|
|
|
-map.add(permgroupToRank, "builder", "5Builder");
|
|
|
|
-map.add(permgroupToRank, "vip", "dVIP");
|
|
|
|
-map.add(permgroupToRank, "dev", "5Developer");
|
|
|
|
-map.add(permgroupToRank, "supporter", "bSupporter");
|
|
|
|
-map.add(permgroupToRank, "mod", "9Moderator");
|
|
|
|
-map.add(permgroupToRank, "yt", "dInfluencer");
|
|
|
|
-map.add(permgroupToRank, "streamer", "dInfluencer");
|
|
|
|
-map.add(permgroupToRank, "sponsor", "dSponsor");
|
|
|
|
-
|
|
|
|
-permgroupsmap = map.new();
|
|
|
|
-map.add(permgroupsmap, "worldedit", 1);
|
|
|
|
-map.add(permgroupsmap, "admin", 2);
|
|
|
|
-map.add(permgroupsmap, "builder", 3);
|
|
|
|
-map.add(permgroupsmap, "vip", 4);
|
|
|
|
-map.add(permgroupsmap, "dev", 5);
|
|
|
|
-map.add(permgroupsmap, "teleport", 6);
|
|
|
|
-map.add(permgroupsmap, "supporter", 9);
|
|
|
|
-map.add(permgroupsmap, "streamer", 11);
|
|
|
|
-map.add(permgroupsmap, "mod", 12);
|
|
|
|
-map.add(permgroupsmap, "yt", 13);
|
|
|
|
-map.add(permgroupsmap, "sponsor", 14);
|
|
|
|
-map.add(permgroupsmap, "bypass", 15);
|
|
|
|
-map.add(permgroupsmap, "creative", 17);
|
|
|
|
-
|
|
|
|
-permgroupsmap2 = map.new();
|
|
|
|
-map.add(permgroupsmap2, 1, "worldedit");
|
|
|
|
-map.add(permgroupsmap2, 2, "admin");
|
|
|
|
-map.add(permgroupsmap2, 3, "builder");
|
|
|
|
-map.add(permgroupsmap2, 4, "vip");
|
|
|
|
-map.add(permgroupsmap2, 5, "dev");
|
|
|
|
-map.add(permgroupsmap2, 6, "teleport");
|
|
|
|
-map.add(permgroupsmap2, 9, "supporter");
|
|
|
|
-map.add(permgroupsmap2, 11, "streamer");
|
|
|
|
-map.add(permgroupsmap2, 12, "mod");
|
|
|
|
-map.add(permgroupsmap2, 13, "yt");
|
|
|
|
-map.add(permgroupsmap2, 14, "sponsor");
|
|
|
|
-map.add(permgroupsmap2, 15, "bypass");
|
|
|
|
-map.add(permgroupsmap2, 17, "creative");
|
|
|
|
-
|
|
|
|
-monthlist = map.new();
|
|
|
|
-map.add(monthlist, 1, "Jan");
|
|
|
|
-map.add(monthlist, 2, "Feb");
|
|
|
|
-map.add(monthlist, 3, "Mar");
|
|
|
|
-map.add(monthlist, 4, "Apr");
|
|
|
|
-map.add(monthlist, 5, "May");
|
|
|
|
-map.add(monthlist, 6, "Jun");
|
|
|
|
-map.add(monthlist, 7, "Jul");
|
|
|
|
-map.add(monthlist, 8, "Aug");
|
|
|
|
-map.add(monthlist, 9, "Sep");
|
|
|
|
-map.add(monthlist, 10, "Oct");
|
|
|
|
-map.add(monthlist, 11, "Nov");
|
|
|
|
-map.add(monthlist, 12, "Dec");
|
|
|
|
-
|
|
|
|
-monthdays = map.new();
|
|
|
|
-map.add(monthdays, 1, 31);
|
|
|
|
-map.add(monthdays, 2, 28);
|
|
|
|
-map.add(monthdays, 3, 31);
|
|
|
|
-map.add(monthdays, 4, 30);
|
|
|
|
-map.add(monthdays, 5, 31);
|
|
|
|
-map.add(monthdays, 6, 30);
|
|
|
|
-map.add(monthdays, 7, 31);
|
|
|
|
-map.add(monthdays, 8, 31);
|
|
|
|
-map.add(monthdays, 9, 30);
|
|
|
|
-map.add(monthdays, 10, 31);
|
|
|
|
-map.add(monthdays, 11, 30);
|
|
|
|
-map.add(monthdays, 12, 31);
|
|
|
|
|
|
+month_array = array.new(12, 2);
|
|
|
|
+month.add(0, "Jan", 31);
|
|
|
|
+month.add(1, "Feb", 28);
|
|
|
|
+month.add(2, "Mar", 31);
|
|
|
|
+month.add(3, "Apr", 30);
|
|
|
|
+month.add(4, "May", 31);
|
|
|
|
+month.add(5, "Jun", 30);
|
|
|
|
+month.add(6, "Jul", 31);
|
|
|
|
+month.add(7, "Aug", 31);
|
|
|
|
+month.add(8, "Sep", 30);
|
|
|
|
+month.add(9, "Oct", 31);
|
|
|
|
+month.add(10, "Nov", 30);
|
|
|
|
+month.add(11, "Dec", 31);
|
|
|
|
|
|
jailed_list = list.new();
|
|
jailed_list = list.new();
|
|
ironbars = read.item("minecraft:iron_bars", 1, "§r");
|
|
ironbars = read.item("minecraft:iron_bars", 1, "§r");
|
|
@@ -475,7 +424,7 @@ check_for_plot_list = list.new();
|
|
plot.registerMoveEvents(world.get("overworld"));
|
|
plot.registerMoveEvents(world.get("overworld"));
|
|
plot.registerMoveEvents(world.get("the_nether"));
|
|
plot.registerMoveEvents(world.get("the_nether"));
|
|
plot.registerMoveEvents(world.get("the_end"));
|
|
plot.registerMoveEvents(world.get("the_end"));
|
|
-plot.registerMoveEvents(world.get("games"));
|
|
|
|
|
|
+plot.registerMoveEvents(world.get("creative"));
|
|
|
|
|
|
event.load("entity_click");
|
|
event.load("entity_click");
|
|
event.load("player_move");
|
|
event.load("player_move");
|
|
@@ -661,6 +610,8 @@ if(event == "player_logout") {
|
|
script_id = quest.getFromPlayer(player);
|
|
script_id = quest.getFromPlayer(player);
|
|
script = script.getFromId(script_id);
|
|
script = script.getFromId(script_id);
|
|
if(script == null) {
|
|
if(script == null) {
|
|
|
|
+ snuvi.debug("Player logged out with corrupt quest");
|
|
|
|
+ quest.removePlayer(player); //in case of corrupt quest
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
setScriptVar("player", player);
|
|
setScriptVar("player", player);
|
|
@@ -1450,6 +1401,29 @@ if(arg0 == "delete") {
|
|
}
|
|
}
|
|
goto("wait");
|
|
goto("wait");
|
|
|
|
|
|
|
|
+@lag
|
|
|
|
+msg.prefix(player, prefix_commands, "Lag test is performed. Please wait...");
|
|
|
|
+a = array.new(2);
|
|
|
|
+a[0] = player.getUuid(player);
|
|
|
|
+a[1] = time.getMillis();
|
|
|
|
+list.add(lag_list, a);
|
|
|
|
+sgoto(100, "do_lag_test");
|
|
|
|
+goto("wait");
|
|
|
|
+
|
|
|
|
+@do_lag_test
|
|
|
|
+t = time.getMillis();
|
|
|
|
+a = list.getIndex(lag_list, 0);
|
|
|
|
+list.removeIndex(lag_list, 0);
|
|
|
|
+p_uuid = a[0];
|
|
|
|
+t_old = a[1];
|
|
|
|
+t = math.roundComma((t - t_old) / 5000 * 20, 2); //Umwandlung 5000ms -> 1s -> 20ticks
|
|
|
|
+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"));
|
|
|
|
+}
|
|
|
|
+goto("wait");
|
|
|
|
+
|
|
@live
|
|
@live
|
|
boolean = !player.isLive(player);
|
|
boolean = !player.isLive(player);
|
|
player.setLive(player, boolean);
|
|
player.setLive(player, boolean);
|
|
@@ -1468,6 +1442,17 @@ entity.spawn("minecraft:lightning_bolt", location);
|
|
goto("wait");
|
|
goto("wait");
|
|
|
|
|
|
@ride
|
|
@ride
|
|
|
|
+world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
|
|
+ if(player.hasMinigame(affectedplayer) || (perm.has(affectedplayer, "ride") && !perm.has(affectedplayer, "isTeam"))) {
|
|
|
|
+ if(size == 2) {
|
|
|
|
+ msg.prefix(player, prefix_commands, "This player can't use this now.");
|
|
|
|
+ } else {
|
|
|
|
+ msg.prefix(player, prefix_commands, "You can't use this now.");
|
|
|
|
+ }
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+}
|
|
player_uuid = player.getUuid(player);
|
|
player_uuid = player.getUuid(player);
|
|
if(set.contains(ride_set, player_uuid)) {
|
|
if(set.contains(ride_set, player_uuid)) {
|
|
msg.prefix(player, prefix_commands, "Entity-Ride-Click removed.");
|
|
msg.prefix(player, prefix_commands, "Entity-Ride-Click removed.");
|
|
@@ -1563,6 +1548,48 @@ msg(player, table.get(table, "Money", text.number(getMoney(p_or_id))));
|
|
msg(player, table.getEnd(table));
|
|
msg(player, table.getEnd(table));
|
|
goto("wait");
|
|
goto("wait");
|
|
|
|
|
|
|
|
+@quest
|
|
|
|
+if(size == 0) {
|
|
|
|
+ @quest_syntax
|
|
|
|
+ msg.prefix(player, prefix_quest, "§r/quest ...");
|
|
|
|
+ msg(player, "§5 - term <player> §rTerminates a player's quest");
|
|
|
|
+ goto("wait");
|
|
|
|
+}
|
|
|
|
+arg0 = text.toLowerCase(list.getIndex(args, 0));
|
|
|
|
+if(arg0 == "term") {
|
|
|
|
+ if(size != 2) {
|
|
|
|
+ msg.prefix(player, prefix_quest, "§r/quest term <player>");
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+ p_name = list.getIndex(args, 1);
|
|
|
|
+ if(!checkIfEverOnline(p_name)) {
|
|
|
|
+ msg.prefix(player, prefix_quest, "This player has never been online.");
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+ p = read.player(p_name);
|
|
|
|
+ if(p == null) {
|
|
|
|
+ msg.prefix(player, prefix_quest, "This player is not online.");
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+ script_id = quest.getFromPlayer(p);
|
|
|
|
+ if(script_id == null) {
|
|
|
|
+ msg.prefix(player, prefix_quest, "This player has no quest.");
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+ script = script.getFromId(script_id);
|
|
|
|
+ if(script == null) {
|
|
|
|
+ quest.removePlayer(p);
|
|
|
|
+ msg.prefix(player, prefix_quest, "Corrupt quest terminated.");
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+ setScriptVar("player", p);
|
|
|
|
+ script.callEvent("quest_term", script);
|
|
|
|
+ quest.term(script, player);
|
|
|
|
+ msg.prefix(player, prefix_quest, "Player's quest terminated.");
|
|
|
|
+ goto("wait");
|
|
|
|
+}
|
|
|
|
+goto("quest_syntax");
|
|
|
|
+
|
|
@friend
|
|
@friend
|
|
if(size == 0) {
|
|
if(size == 0) {
|
|
@friend_syntax
|
|
@friend_syntax
|
|
@@ -2027,11 +2054,12 @@ if(player.isAfk(player)) {
|
|
} else {
|
|
} else {
|
|
msg.prefix("online", prefix_commands, concat(nickname, "§7 is now afk."));
|
|
msg.prefix("online", prefix_commands, concat(nickname, "§7 is now afk."));
|
|
player.setAfk(player, true);
|
|
player.setAfk(player, true);
|
|
|
|
+ if(!afk_loop_active) {
|
|
|
|
+ afk_loop_active = true;
|
|
|
|
+ sgoto(30, "afk_loop");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
player.setTabName(player);
|
|
player.setTabName(player);
|
|
-if(!afk_loop_active) {
|
|
|
|
- sgoto(30, "afk_loop");
|
|
|
|
-}
|
|
|
|
goto("wait");
|
|
goto("wait");
|
|
|
|
|
|
@silentjoin
|
|
@silentjoin
|
|
@@ -2073,6 +2101,9 @@ sgoto(10, "coordsloop");
|
|
goto("wait");
|
|
goto("wait");
|
|
|
|
|
|
@afk_loop
|
|
@afk_loop
|
|
|
|
+if(!afk_loop_active) {
|
|
|
|
+ goto("wait");
|
|
|
|
+}
|
|
afk_map = getScriptVar("afk_map");
|
|
afk_map = getScriptVar("afk_map");
|
|
iter = map.iterator(afk_map);
|
|
iter = map.iterator(afk_map);
|
|
while(hasNext(iter)) {
|
|
while(hasNext(iter)) {
|
|
@@ -2132,6 +2163,7 @@ while(hasNext(iter)) {
|
|
player.setAfk(p, true);
|
|
player.setAfk(p, true);
|
|
player.setTabName(p);
|
|
player.setTabName(p);
|
|
if(!afk_loop_active) {
|
|
if(!afk_loop_active) {
|
|
|
|
+ afk_loop_active = true;
|
|
sgoto(30, "afk_loop");
|
|
sgoto(30, "afk_loop");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2285,21 +2317,27 @@ if(arg0 == "give") {
|
|
msg.prefix(player, prefix_perms, "This player has never been online.");
|
|
msg.prefix(player, prefix_perms, "This player has never been online.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
- if(!isAPermGroup(perm)) {
|
|
|
|
- msg.prefix(player, prefix_perms, "This is no permission group.");
|
|
|
|
|
|
+ if(!perm.isGroupName(perm)) {
|
|
|
|
+ msg.prefix(player, prefix_perms, "This is not a permission group.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
|
|
+ if(!perm.has(player, "isAdmin")) {
|
|
|
|
+ if(perm == "admin" || perm == "mod" || perm == "bypass") {
|
|
|
|
+ msg.prefix(player, prefix_perms, "Only admins can give this permission group.");
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
p_uuid = player.getUuid(p_name);
|
|
p_uuid = player.getUuid(p_name);
|
|
p_id = player.getId(p_uuid);
|
|
p_id = player.getId(p_uuid);
|
|
p_name = player.getName(p_uuid);
|
|
p_name = player.getName(p_uuid);
|
|
- perm_id = map.get(permgroupsmap, perm);
|
|
|
|
- if(hasPermAlready(p_id, perm_id)) {
|
|
|
|
|
|
+ perm_id = perm.getIdFromGroupname(perm);
|
|
|
|
+ if(player.hasPermGroup(p_id, perm_id)) {
|
|
msg.prefix(player, prefix_perms, "Perm already added.");
|
|
msg.prefix(player, prefix_perms, "Perm already added.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
if(isOnline(p_name)) {
|
|
if(isOnline(p_name)) {
|
|
p = read.player(p_name);
|
|
p = read.player(p_name);
|
|
- rank = map.get(permgroupToRank, perm);
|
|
|
|
|
|
+ rank = perm.getRankFromGroupname(perm);
|
|
if(rank != null) {
|
|
if(rank != null) {
|
|
offerRank(p, rank.getTechName(rank));
|
|
offerRank(p, rank.getTechName(rank));
|
|
}
|
|
}
|
|
@@ -2323,10 +2361,16 @@ if(arg0 == "remove") {
|
|
msg.prefix(player, prefix_perms, "This player has never been online.");
|
|
msg.prefix(player, prefix_perms, "This player has never been online.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
- if(!isAPermGroup(perm)) {
|
|
|
|
- msg.prefix(player, prefix_perms, "This is no permission group.");
|
|
|
|
|
|
+ if(!perm.isGroupName(perm)) {
|
|
|
|
+ msg.prefix(player, prefix_perms, "This is not a permission group.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
|
|
+ if(!perm.has(player, "isAdmin")) {
|
|
|
|
+ if(perm == "admin" || perm == "mod" || perm == "bypass") {
|
|
|
|
+ msg.prefix(player, prefix_perms, "Only admins can give this permission group.");
|
|
|
|
+ goto("wait");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
p_uuid = player.getUuid(p_name);
|
|
p_uuid = player.getUuid(p_name);
|
|
p_id = player.getId(p_uuid);
|
|
p_id = player.getId(p_uuid);
|
|
p_name = player.getName(p_uuid);
|
|
p_name = player.getName(p_uuid);
|
|
@@ -2338,8 +2382,8 @@ if(arg0 == "remove") {
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- perm_id = map.get(permgroupsmap, perm);
|
|
|
|
- if(!hasPermAlready(p_id, perm_id)) {
|
|
|
|
|
|
+ perm_id = perm.getIdFromGroupname(perm);
|
|
|
|
+ if(!player.hasPermGroup(p_id, perm_id)) {
|
|
msg.prefix(player, prefix_perms, "This player doesn't have that perm.");
|
|
msg.prefix(player, prefix_perms, "This player doesn't have that perm.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -2396,7 +2440,7 @@ if(arg0 == "list") {
|
|
} else {
|
|
} else {
|
|
msg.prefix(player, prefix_perms, p_name);
|
|
msg.prefix(player, prefix_perms, p_name);
|
|
for(i = 0; i < listsize; i++) {
|
|
for(i = 0; i < listsize; i++) {
|
|
- msg(player, " - ", map.get(permgroupsmap2, list.getIndex(permslist, i)));
|
|
|
|
|
|
+ msg(player, " - ", perm.getNameFromId(list.getIndex(permslist, i)));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3308,7 +3352,7 @@ if(size == 0) {
|
|
change = math.round(a / b * 100 - 100);
|
|
change = math.round(a / b * 100 - 100);
|
|
change = concat(color, text.number(change), " %");
|
|
change = concat(color, text.number(change), " %");
|
|
}
|
|
}
|
|
- msg(player, table.get(table, concat("§6", map.get(monthlist, i)), time_string, change));
|
|
|
|
|
|
+ msg(player, table.get(table, concat("§6", month.getShortName(i)), time_string, change));
|
|
if(i == now_month && year == now_year) {
|
|
if(i == now_month && year == now_year) {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -3356,7 +3400,7 @@ if(size == 0) {
|
|
//Tabelle erstellen
|
|
//Tabelle erstellen
|
|
table = table.new("§8", 4, 5, 5);
|
|
table = table.new("§8", 4, 5, 5);
|
|
msg(player, table.getStart(table));
|
|
msg(player, table.getStart(table));
|
|
- msg(player, table.get(table, map.get(monthlist, month), "Playtime", "Players"));
|
|
|
|
|
|
+ msg(player, table.get(table, month.getShortName(month), "Playtime", "Players"));
|
|
msg(player, table.getMiddle(table));
|
|
msg(player, table.getMiddle(table));
|
|
//Erstes Mitternacht des gewählten Monats festlegen
|
|
//Erstes Mitternacht des gewählten Monats festlegen
|
|
now_day = time.getDay(calendar);
|
|
now_day = time.getDay(calendar);
|
|
@@ -4079,7 +4123,7 @@ p = read.player(p_name);
|
|
p_name = player.getName(p);
|
|
p_name = player.getName(p);
|
|
if(p_name == "marvinius") {
|
|
if(p_name == "marvinius") {
|
|
msg(player, "§cSorry §b¯\\_(ツ)_/¯");
|
|
msg(player, "§cSorry §b¯\\_(ツ)_/¯");
|
|
- //goto("wait");
|
|
|
|
|
|
+ goto("wait");
|
|
}
|
|
}
|
|
head.add(p, 0, sender_name, 0.4, 0.05, 0.2, 0.35);
|
|
head.add(p, 0, sender_name, 0.4, 0.05, 0.2, 0.35);
|
|
title.setSub(p, "is watching you");
|
|
title.setSub(p, "is watching you");
|
|
@@ -5827,12 +5871,12 @@ if(!player.doesAcceptTpaRequests(p)) {
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -5863,12 +5907,12 @@ if(!player.doesAcceptTpaRequests(p)) {
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport to this world."));
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport to this world."));
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport from their world."));
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport from their world."));
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -5895,12 +5939,12 @@ if(p == null) {
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport to your world."));
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport to your world."));
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport from their world."));
|
|
msg.prefix(player, prefix_commands, concat("§c", p_name, "§r isn't allowed to teleport from their world."));
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -5931,12 +5975,12 @@ if(p == null) {
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(p)));
|
|
-if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -6124,12 +6168,12 @@ if(warp_loc == null) {
|
|
}
|
|
}
|
|
if(!perm.has(player, "warp.create")) {
|
|
if(!perm.has(player, "warp.create")) {
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
- if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+ if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
world_name = world.getName(loc.getWorld(warp_loc));
|
|
world_name = world.getName(loc.getWorld(warp_loc));
|
|
- if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+ if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -6343,13 +6387,16 @@ if(size >= 1) {
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-if(player.hasMinigame(affectedplayer)) {
|
|
|
|
- if(size == 2) {
|
|
|
|
- msg.prefix(player, prefix_commands, "This player can't fly now.");
|
|
|
|
- } else {
|
|
|
|
- msg.prefix(player, prefix_commands, "You can't fly now.");
|
|
|
|
|
|
+world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
|
|
+if(world.isGamesName(world_name)) {
|
|
|
|
+ if(player.hasMinigame(affectedplayer) || (perm.has(affectedplayer, "fly") && !perm.has(affectedplayer, "isTeam"))) {
|
|
|
|
+ if(size == 2) {
|
|
|
|
+ msg.prefix(player, prefix_commands, "This player can't fly now.");
|
|
|
|
+ } else {
|
|
|
|
+ msg.prefix(player, prefix_commands, "You can't fly now.");
|
|
|
|
+ }
|
|
|
|
+ goto("wait");
|
|
}
|
|
}
|
|
- goto("wait");
|
|
|
|
}
|
|
}
|
|
if(size == 2) {
|
|
if(size == 2) {
|
|
boolean = list.getIndex(args, 1);
|
|
boolean = list.getIndex(args, 1);
|
|
@@ -6461,7 +6508,7 @@ if(player.hasMinigame(player)) {
|
|
hasPerms = perm.has(player, "isTeam");
|
|
hasPerms = perm.has(player, "isTeam");
|
|
if(!hasPerms) {
|
|
if(!hasPerms) {
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
- if(isGamesWorldName(world_name) || isStoryWorldName(world_name)) {
|
|
|
|
|
|
+ if(world.isGamesName(world_name) || world.isStoryName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't use /back in this world.");
|
|
msg.prefix(player, prefix_commands, "You can't use /back in this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -6478,7 +6525,7 @@ if(world == null) {
|
|
}
|
|
}
|
|
if(!hasPerms) {
|
|
if(!hasPerms) {
|
|
world_name = world.getName(world);
|
|
world_name = world.getName(world);
|
|
- if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+ if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport to this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -7124,7 +7171,7 @@ if(arg0 == "spawn") {
|
|
}
|
|
}
|
|
if(!perm.has(player, "isTeam")) {
|
|
if(!perm.has(player, "isTeam")) {
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
world_name = world.getName(loc.getWorld(entity.getLocation(player)));
|
|
- if(isGamesWorldName(world_name)) {
|
|
|
|
|
|
+ if(world.isGamesName(world_name)) {
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
msg.prefix(player, prefix_commands, "You can't teleport in this world.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -7519,6 +7566,16 @@ if(arg0 == "diffi") {
|
|
}
|
|
}
|
|
goto("world_syntax");
|
|
goto("world_syntax");
|
|
|
|
|
|
|
|
+@yeet
|
|
|
|
+if(size == 0){
|
|
|
|
+ msg.prefix(player, prefix_commands, "/yeet <strength>");
|
|
|
|
+ goto("wait");
|
|
|
|
+}
|
|
|
|
+yeet_strength = list.getIndex(args, 0);
|
|
|
|
+yeet(player,math.abs(yeet_strength));
|
|
|
|
+msg(player, "§4YEET");
|
|
|
|
+goto("wait");
|
|
|
|
+
|
|
@giveup
|
|
@giveup
|
|
script_id = quest.getFromPlayer(player);
|
|
script_id = quest.getFromPlayer(player);
|
|
if(script_id == null) {
|
|
if(script_id == null) {
|
|
@@ -7527,6 +7584,8 @@ if(script_id == null) {
|
|
}
|
|
}
|
|
script = script.getFromId(script_id);
|
|
script = script.getFromId(script_id);
|
|
if(script == null) {
|
|
if(script == null) {
|
|
|
|
+ snuvi.debug("Player used giveup on corrupt quest");
|
|
|
|
+ quest.removePlayer(player); //in case of corrupt quest
|
|
msg.prefix(player, prefix_quest, "You have no quest.");
|
|
msg.prefix(player, prefix_quest, "You have no quest.");
|
|
goto("wait");
|
|
goto("wait");
|
|
}
|
|
}
|
|
@@ -7615,10 +7674,6 @@ if(size != 1) {
|
|
}
|
|
}
|
|
goto("wait");
|
|
goto("wait");
|
|
|
|
|
|
-//--------------------------------------------------
|
|
|
|
-//Inv-Utils
|
|
|
|
-//--------------------------------------------------
|
|
|
|
-
|
|
|
|
function inv.show(from_player, to_player) {
|
|
function inv.show(from_player, to_player) {
|
|
player_inv = player.getInv(from_player);
|
|
player_inv = player.getInv(from_player);
|
|
//inv = inv.new("333303000 333333333 333333333 333333333 000000000 333333333");
|
|
//inv = inv.new("333303000 333333333 333333333 333333333 000000000 333333333");
|
|
@@ -7897,8 +7952,10 @@ function setCommandHelps() {
|
|
commandhelp.add("top");
|
|
commandhelp.add("top");
|
|
commandhelp.add("ride");
|
|
commandhelp.add("ride");
|
|
commandhelp.add("repair");
|
|
commandhelp.add("repair");
|
|
|
|
+ commandhelp.add("lag");
|
|
commandhelp.add("live");
|
|
commandhelp.add("live");
|
|
commandhelp.add("hack");
|
|
commandhelp.add("hack");
|
|
|
|
+ commandhelp.add("vote");
|
|
|
|
|
|
commandhelp.addChildPlayer("mute");
|
|
commandhelp.addChildPlayer("mute");
|
|
commandhelp.addChildPlayer("unmute");
|
|
commandhelp.addChildPlayer("unmute");
|
|
@@ -8242,10 +8299,10 @@ function setCommandHelps() {
|
|
|
|
|
|
help = command.newHelp("perm", "perm");
|
|
help = command.newHelp("perm", "perm");
|
|
//perm give <player> <perm>
|
|
//perm give <player> <perm>
|
|
- helpArg0 = command.newHelpLiteral("give");
|
|
|
|
|
|
+ helpArg0 = command.newHelpLiteral("give", "perm.give");
|
|
helpArg1 = command.newHelpSpecial("Player", "player");
|
|
helpArg1 = command.newHelpSpecial("Player", "player");
|
|
- command.addHelpChild(helpArg1, command.newHelpLiteral("admin"));
|
|
|
|
- command.addHelpChild(helpArg1, command.newHelpLiteral("mod"));
|
|
|
|
|
|
+ command.addHelpChild(helpArg1, command.newHelpLiteral("admin", "isAdmin"));
|
|
|
|
+ command.addHelpChild(helpArg1, command.newHelpLiteral("mod", "isAdmin"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("supporter"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("supporter"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("builder"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("builder"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("worldedit"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("worldedit"));
|
|
@@ -8255,15 +8312,15 @@ function setCommandHelps() {
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("yt"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("yt"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("streamer"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("streamer"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("sponsor"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("sponsor"));
|
|
- command.addHelpChild(helpArg1, command.newHelpLiteral("bypass"));
|
|
|
|
|
|
+ command.addHelpChild(helpArg1, command.newHelpLiteral("bypass", "isAdmin"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("creative"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("creative"));
|
|
command.addHelpChild(helpArg0, helpArg1);
|
|
command.addHelpChild(helpArg0, helpArg1);
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelpChild(help, helpArg0);
|
|
//perm remove <player> <perm>
|
|
//perm remove <player> <perm>
|
|
- helpArg0 = command.newHelpLiteral("remove");
|
|
|
|
|
|
+ helpArg0 = command.newHelpLiteral("remove", "perm.remove");
|
|
helpArg1 = command.newHelpSpecial("Player", "player");
|
|
helpArg1 = command.newHelpSpecial("Player", "player");
|
|
- command.addHelpChild(helpArg1, command.newHelpLiteral("admin"));
|
|
|
|
- command.addHelpChild(helpArg1, command.newHelpLiteral("mod"));
|
|
|
|
|
|
+ command.addHelpChild(helpArg1, command.newHelpLiteral("admin", "isAdmin"));
|
|
|
|
+ command.addHelpChild(helpArg1, command.newHelpLiteral("mod", "isAdmin"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("supporter"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("supporter"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("builder"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("builder"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("worldedit"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("worldedit"));
|
|
@@ -8271,21 +8328,22 @@ function setCommandHelps() {
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("vip"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("vip"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("dev"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("dev"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("yt"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("yt"));
|
|
|
|
+ command.addHelpChild(helpArg1, command.newHelpLiteral("streamer"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("sponsor"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("sponsor"));
|
|
- command.addHelpChild(helpArg1, command.newHelpLiteral("bypass"));
|
|
|
|
|
|
+ command.addHelpChild(helpArg1, command.newHelpLiteral("bypass", "isAdmin"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("creative"));
|
|
command.addHelpChild(helpArg1, command.newHelpLiteral("creative"));
|
|
command.addHelpChild(helpArg0, helpArg1);
|
|
command.addHelpChild(helpArg0, helpArg1);
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelpChild(help, helpArg0);
|
|
//perm removeall <player>
|
|
//perm removeall <player>
|
|
- helpArg0 = command.newHelpLiteral("removeall");
|
|
|
|
|
|
+ helpArg0 = command.newHelpLiteral("removeall", "perm.removeall");
|
|
command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player"));
|
|
command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player"));
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelpChild(help, helpArg0);
|
|
//perm list <player>
|
|
//perm list <player>
|
|
- helpArg0 = command.newHelpLiteral("list");
|
|
|
|
|
|
+ helpArg0 = command.newHelpLiteral("list", "perm.list");
|
|
command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player"));
|
|
command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player"));
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelpChild(help, helpArg0);
|
|
//perm toggle
|
|
//perm toggle
|
|
- command.addHelpChild(help, command.newHelpLiteral("toggle"));
|
|
|
|
|
|
+ command.addHelpChild(help, command.newHelpLiteral("toggle", "perm.toggle"));
|
|
command.addHelp(help);
|
|
command.addHelp(help);
|
|
|
|
|
|
help = command.newHelp("script", "script");
|
|
help = command.newHelp("script", "script");
|
|
@@ -8634,6 +8692,13 @@ function setCommandHelps() {
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelp(help);
|
|
command.addHelp(help);
|
|
|
|
|
|
|
|
+ help = command.newHelp("quest", "quest");
|
|
|
|
+ //quest term <player>
|
|
|
|
+ helpArg0 = command.newHelpLiteral("term");
|
|
|
|
+ command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player"));
|
|
|
|
+ command.addHelpChild(help, helpArg0);
|
|
|
|
+ command.addHelp(help);
|
|
|
|
+
|
|
help = command.newHelp("pvp", "pvp");
|
|
help = command.newHelp("pvp", "pvp");
|
|
helpArg0 = command.newHelpLiteral("on");
|
|
helpArg0 = command.newHelpLiteral("on");
|
|
command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player", "pvp.other"));
|
|
command.addHelpChild(helpArg0, command.newHelpSpecial("Player", "player", "pvp.other"));
|
|
@@ -8860,6 +8925,10 @@ function setCommandHelps() {
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelpChild(help, helpArg0);
|
|
command.addHelp(help);
|
|
command.addHelp(help);
|
|
|
|
|
|
|
|
+ help = command.newHelp("yeet", "yeet");
|
|
|
|
+ command.addHelpChild(help, command.newHelpInt("strength", 1, 10000000000000));
|
|
|
|
+ command.addHelp(help);
|
|
|
|
+
|
|
command.sendHelp();
|
|
command.sendHelp();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -8945,6 +9014,10 @@ function command.registerAlias(alias, command) {
|
|
map.add($alias_map, alias, command);
|
|
map.add($alias_map, alias, command);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//--------------------------------------------------
|
|
|
|
+//Time-Utils
|
|
|
|
+//--------------------------------------------------
|
|
|
|
+
|
|
//Spielzeit aller Online-Spieler
|
|
//Spielzeit aller Online-Spieler
|
|
function playtime.getTotalOnlineMinutes() {
|
|
function playtime.getTotalOnlineMinutes() {
|
|
minutes = 0;
|
|
minutes = 0;
|
|
@@ -9024,7 +9097,7 @@ function time.getYearDays(year) {
|
|
}
|
|
}
|
|
|
|
|
|
function time.getMonthDays(month, year) {
|
|
function time.getMonthDays(month, year) {
|
|
- days = map.get($monthdays, month);
|
|
|
|
|
|
+ days = month.getDays(month);
|
|
//Schaltjahre
|
|
//Schaltjahre
|
|
if(month == 2 && year % 4 == 0) {
|
|
if(month == 2 && year % 4 == 0) {
|
|
days++;
|
|
days++;
|
|
@@ -9053,7 +9126,7 @@ function time.getDaysBetween(day1, month1, year1, day2, month2, year2) {
|
|
if(month1 == month2) {
|
|
if(month1 == month2) {
|
|
d_days = day2 - day1;
|
|
d_days = day2 - day1;
|
|
} else {
|
|
} else {
|
|
- d_days += map.get($monthdays, month1) - day1;
|
|
|
|
|
|
+ d_days += month.getDays(month1) - day1;
|
|
d_days += day2;
|
|
d_days += day2;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -9067,12 +9140,25 @@ function time.getDaysBetween(day1, month1, year1, day2, month2, year2) {
|
|
m++;
|
|
m++;
|
|
}
|
|
}
|
|
//Volle Tage
|
|
//Volle Tage
|
|
- d_days += map.get($monthdays, month1) - day1;
|
|
|
|
|
|
+ d_days += month.getDays(month1) - day1;
|
|
d_days += day2;
|
|
d_days += day2;
|
|
}
|
|
}
|
|
return y_days + m_days + d_days;
|
|
return y_days + m_days + d_days;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function month.add(month_index, shortname, days) {
|
|
|
|
+ $month_array[month_index, 0] = shortname;
|
|
|
|
+ $month_array[month_index, 1] = days;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function month.getShortName(month) {
|
|
|
|
+ return $month_array[month - 1, 0];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function month.getDays(month) {
|
|
|
|
+ return $month_array[month - 1, 1];
|
|
|
|
+}
|
|
|
|
+
|
|
//--------------------------------------------------
|
|
//--------------------------------------------------
|
|
//Player-Utils
|
|
//Player-Utils
|
|
//--------------------------------------------------
|
|
//--------------------------------------------------
|