|
@@ -421,6 +421,7 @@ skip_night_inv_id = inv.getId(skip_night_inv);
|
|
|
|
|
|
vote_inv = inv.new("222222222");
|
|
|
inv.setItem(vote_inv, 0, read.item("km:coin_gold", 1, "§fMoney Booster", "Doubles incoming money for 10 minutes.", "Cost: 6 VP"));
|
|
|
+inv.setItem(vote_inv, 1, read.item("minecraft:jukebox", 1, "§fRick is in the house", "Rickroles every player on the server.", "Cost: 2 VP"));
|
|
|
vote_inv_id = inv.getId(vote_inv);
|
|
|
|
|
|
ha_tool = read.item("km:guild_block", 1, "§cHawkeye Tool", "Hawkeye Tool");
|
|
@@ -458,6 +459,80 @@ plot.registerMoveEvents(world.get("the_nether"));
|
|
|
plot.registerMoveEvents(world.get("the_end"));
|
|
|
plot.registerMoveEvents(world.get("creative"));
|
|
|
|
|
|
+RickRollSounds = list.new();
|
|
|
+list.add(RickRollSounds, math.pow(2, -6 / 12));//6
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, -1 / 12));//11
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, 3 / 12));//15
|
|
|
+list.add(RickRollSounds, math.pow(2, 3 / 12));//15
|
|
|
+list.add(RickRollSounds, math.pow(2, 1 / 12));//13
|
|
|
+list.add(RickRollSounds, math.pow(2, -6 / 12));//6
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, -1 / 12));//11
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, 1 / 12));//13
|
|
|
+list.add(RickRollSounds, math.pow(2, 1 / 12));//13
|
|
|
+list.add(RickRollSounds, math.pow(2, -1 / 12));//11
|
|
|
+list.add(RickRollSounds, math.pow(2, -2 / 12));//10
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, -6 / 12));//6
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, -1 / 12));//11
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, -1 / 12));//11
|
|
|
+list.add(RickRollSounds, math.pow(2, 1 / 12));//13
|
|
|
+list.add(RickRollSounds, math.pow(2, -2 / 12));//10
|
|
|
+list.add(RickRollSounds, math.pow(2, -4 / 12));//8
|
|
|
+list.add(RickRollSounds, math.pow(2, -6 / 12));//6
|
|
|
+list.add(RickRollSounds, math.pow(2, -6 / 12));//6
|
|
|
+list.add(RickRollSounds, math.pow(2, -6 / 12));//6
|
|
|
+list.add(RickRollSounds, math.pow(2, 1 / 12));//13
|
|
|
+list.add(RickRollSounds, math.pow(2, -1 / 12));//11
|
|
|
+//6,8,11,8,15,15,13,6,8,11,8,13,13,11,10,8,6,8,11,8,11,13,10,8,6,6,6,13,11
|
|
|
+
|
|
|
+RickRollSoundDists = list.new();
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 12);//6
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 8);//4
|
|
|
+list.add(RickRollSoundDists, 4);//2
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+list.add(RickRollSoundDists, 4);//2
|
|
|
+list.add(RickRollSoundDists, 4);//2
|
|
|
+list.add(RickRollSoundDists, 6);//3
|
|
|
+list.add(RickRollSoundDists, 8);//4
|
|
|
+list.add(RickRollSoundDists, 2);//1
|
|
|
+//2,2,2,2,2,6,6,12,2,2,2,2,6,6,6,2,6,2,2,2,2,8,4,6,2,4,4,6,8
|
|
|
+rick_sounds_amount = list.getSize(RickRollSoundDists);
|
|
|
+
|
|
|
+sound_category_master = sound.getCategory("master");
|
|
|
+sound_flute = sound.get("block.note_block.flute");
|
|
|
+sound_harp = sound.get("block.note_block.harp");
|
|
|
+sound_pling = sound.get("block.note_block.pling");
|
|
|
+
|
|
|
+event_map = map.new(); //für hawkeye
|
|
|
+map.add(event_map, 1, "block_break");
|
|
|
+map.add(event_map, 2, "block_place");
|
|
|
+
|
|
|
event.load("entity_click");
|
|
|
event.load("player_move");
|
|
|
event.load("inv_click");
|
|
@@ -739,6 +814,17 @@ if(event == "inv_click") {
|
|
|
money.setBoostFactor(2);
|
|
|
status.addTimed("online", 56, 12000, "Money Booster");
|
|
|
sgoto(12000, "resetMoneyBoost");
|
|
|
+ goto("wait");
|
|
|
+ }
|
|
|
+ if(inv_slot == 1) {
|
|
|
+ vp = player.getVotePoints(player);
|
|
|
+ if(vp < 2) {
|
|
|
+ msg.prefix(player, prefix_commands, "Not enough vote points.");
|
|
|
+ goto("wait");
|
|
|
+ }
|
|
|
+ player.setVotePoints(player, vp - 2);
|
|
|
+ rickIndex = 0;
|
|
|
+ goto("RickRole_play");
|
|
|
}
|
|
|
goto("wait");
|
|
|
}
|
|
@@ -1054,6 +1140,29 @@ if(event == "player_data_tick") {
|
|
|
}
|
|
|
goto("wait");
|
|
|
|
|
|
+@RickRole_play
|
|
|
+if(rickIndex < rick_sounds_amount) {
|
|
|
+ pitch = list.getIndex(RickRollSounds, rickIndex);
|
|
|
+ RickSound(pitch);
|
|
|
+ ticks = 2 + list.getIndex(RickRollSoundDists, rickIndex);
|
|
|
+ sgoto(ticks, "RickRole_play");
|
|
|
+}
|
|
|
+rickIndex++;
|
|
|
+goto("wait");
|
|
|
+
|
|
|
+function RickSound(pitch) {
|
|
|
+ iter = list.iterator(players.toList());
|
|
|
+ while(hasNext(iter)) {
|
|
|
+ online_player = next(iter);
|
|
|
+ if(online_player == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ sound.spawnForPlayer(online_player, $sound_flute, $sound_category_master, 1, pitch);
|
|
|
+ sound.spawnForPlayer(online_player, $sound_harp, $sound_category_master, 1, pitch);
|
|
|
+ sound.spawnForPlayer(online_player, $sound_pling, $sound_category_master, 1, pitch);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
@hack
|
|
|
msg.prefix(player, prefix_commands, "Your pc got hacked now.");
|
|
|
goto("wait");
|
|
@@ -3134,7 +3243,6 @@ if(size != 1) {
|
|
|
@starthelp
|
|
|
msg.prefix(sender, prefix_commands, "/start ...");
|
|
|
msg(sender, " - ai");
|
|
|
- msg(sender, " - amber");
|
|
|
msg(sender, " - chat");
|
|
|
msg(sender, " - commands");
|
|
|
msg(sender, " - creative");
|
|
@@ -3143,6 +3251,7 @@ if(size != 1) {
|
|
|
msg(sender, " - fixitems");
|
|
|
msg(sender, " - friends");
|
|
|
msg(sender, " - games");
|
|
|
+ msg(sender, " - gemstones");
|
|
|
msg(sender, " - harvest");
|
|
|
msg(sender, " - hawkeye");
|
|
|
msg(sender, " - herobrine");
|
|
@@ -3174,13 +3283,6 @@ if(arg0 == "ai") {
|
|
|
}
|
|
|
script.startNamed("Ai", "system/ai", "utils/u_general");
|
|
|
}
|
|
|
-elseif(arg0 == "amber") {
|
|
|
- script = script.get("Amber");
|
|
|
- if(script != null) {
|
|
|
- script.term(script);
|
|
|
- }
|
|
|
- script.startNamed("Amber", "utils/u_error", "survival/amber", "utils/u_general");
|
|
|
-}
|
|
|
elseif(arg0 == "commands") {
|
|
|
script = script.startNamed("Commands", "system/commands", "utils/u_general", "utils/u_games");
|
|
|
if(script == null) {
|
|
@@ -3231,6 +3333,13 @@ elseif(arg0 == "games") {
|
|
|
}
|
|
|
script.startNamed("Gamecenter", "utils/u_error", "system/gamecenter", "utils/u_general", "utils/u_games");
|
|
|
}
|
|
|
+elseif(arg0 == "gemstones") {
|
|
|
+ script = script.get("Gemstones");
|
|
|
+ if(script != null) {
|
|
|
+ script.term(script);
|
|
|
+ }
|
|
|
+ script.startNamed("Gemstones", "utils/u_error", "survival/gemstones", "utils/u_general");
|
|
|
+}
|
|
|
elseif(arg0 == "harvest") {
|
|
|
script = script.get("Harvest");
|
|
|
if(script != null) {
|
|
@@ -4120,7 +4229,7 @@ if(p_uuid == null) {
|
|
|
msg.prefix(sender, prefix_commands, "There is no one you could answer.");
|
|
|
goto("wait");
|
|
|
}
|
|
|
-message = text.replace(text.concatList(args, " ", 0, size - 1), "&", "§");
|
|
|
+message = text.replace(text.concatList(text_args, " ", 0, size - 1), "&", "§");
|
|
|
if(text.startsWith(message, "https://", 0)) {
|
|
|
message = text.link(message, message);
|
|
|
}
|
|
@@ -4155,7 +4264,7 @@ if(p_uuid == null) {
|
|
|
msg.prefix(sender, prefix_commands, "Unknown player.");
|
|
|
goto("wait");
|
|
|
}
|
|
|
-message = text.replace(text.concatList(args, " ", 1, size - 1), "&", "§");
|
|
|
+message = text.replace(text.concatList(text_args, " ", 1, size - 1), "&", "§");
|
|
|
if(text.startsWith(message, "https://", 0)) {
|
|
|
message = text.link(message, message);
|
|
|
}
|
|
@@ -4289,11 +4398,7 @@ if(!(line == 1 || line == 2 || line == 3 || line == 4)) {
|
|
|
string = "";
|
|
|
if(size > 1) {
|
|
|
for(i = 1; i < size; i++) {
|
|
|
- arg = list.getIndex(args, i);
|
|
|
- if(isDouble(arg)) {
|
|
|
- arg = text.number(arg);
|
|
|
-
|
|
|
- }
|
|
|
+ arg = list.getIndex(text_args, i);
|
|
|
if(i == 1) {
|
|
|
string = arg;
|
|
|
} else {
|
|
@@ -7777,8 +7882,6 @@ if(size == 0) {
|
|
|
msg(player, "§b - info <world> §rShows info about a world");
|
|
|
msg(player, "§b - tp <world> [player] §rTeleports a player to a world");
|
|
|
msg(player, "§b - list §rShows all loaded worlds");
|
|
|
- msg(player, "§b - load <world> §rLoads a world");
|
|
|
- msg(player, "§b - unload <world> §rUnloads a world (removes it from memory)");
|
|
|
msg(player, "§b - setspawn §rSets the world's spawn");
|
|
|
msg(player, "§b - diffi <world> <diffi> §rSets the world's difficulty");
|
|
|
goto("wait");
|
|
@@ -7850,42 +7953,6 @@ if(arg0 == "list") {
|
|
|
msg(player, getSpacer());
|
|
|
goto("wait");
|
|
|
}
|
|
|
-if(arg0 == "load") {
|
|
|
- if(size != 2) {
|
|
|
- msg.prefix(player, prefix_world, "/world load <world>");
|
|
|
- goto("wait");
|
|
|
- }
|
|
|
- worldname = list.getIndex(args, 1);
|
|
|
- world = world.get(worldname);
|
|
|
- if(world != null) {
|
|
|
- msg.prefix(player, prefix_world, "This world is already loaded.");
|
|
|
- goto("wait");
|
|
|
- }
|
|
|
- if(!world.register(worldname)) {
|
|
|
- msg.prefix(player, prefix_world, concat("The world ", worldname, " can't be found."));
|
|
|
- goto("wait");
|
|
|
- }
|
|
|
- msg.prefix(player, prefix_world, "The world was loaded.");
|
|
|
- goto("wait");
|
|
|
-}
|
|
|
-if(arg0 == "unload") {
|
|
|
- if(size != 2) {
|
|
|
- msg.prefix(player, prefix_world, "/world unload <world>");
|
|
|
- goto("wait");
|
|
|
- }
|
|
|
- worldname = list.getIndex(args, 1);
|
|
|
- world = world.get(worldname);
|
|
|
- if(world == null) {
|
|
|
- msg.prefix(player, prefix_world, "This world is not loaded.");
|
|
|
- goto("wait");
|
|
|
- }
|
|
|
- if(!world.unregister(worldname)) {
|
|
|
- msg.prefix(player, prefix_world, "This world can't be unlaoded.");
|
|
|
- goto("wait");
|
|
|
- }
|
|
|
- msg.prefix(player, prefix_world, "You unlaoded this world.");
|
|
|
- goto("wait");
|
|
|
-}
|
|
|
if(arg0 == "setspawn") {
|
|
|
location = entity.getLocation(player);
|
|
|
world.setSpawn(location, 0);
|
|
@@ -8397,13 +8464,13 @@ function setCommandHelps() {
|
|
|
|
|
|
help = command.newHelp("start", "start");
|
|
|
command.addHelpChild(help, command.newHelpLiteral("ai"));
|
|
|
- command.addHelpChild(help, command.newHelpLiteral("amber"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("chat"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("commands"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("creative"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("damage"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("doors"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("fixitems"));
|
|
|
+ command.addHelpChild(help, command.newHelpLiteral("gemstones"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("harvest"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("hawkeye"));
|
|
|
command.addHelpChild(help, command.newHelpLiteral("herobrine"));
|
|
@@ -8531,6 +8598,7 @@ function setCommandHelps() {
|
|
|
command.addHelp(help);
|
|
|
|
|
|
help = command.newHelp("stats", "stats");
|
|
|
+ addStatsGameHelp(help, "AmongUs");
|
|
|
addStatsGameHelp(help, "BedWars");
|
|
|
addStatsGameHelp(help, "RageMode");
|
|
|
addStatsGameHelp(help, "JR-Endless");
|
|
@@ -9109,14 +9177,6 @@ function setCommandHelps() {
|
|
|
command.addHelpChild(help, helpArg0);
|
|
|
//world list
|
|
|
command.addHelpChild(help, command.newHelpLiteral("list"));
|
|
|
- //world load <world>
|
|
|
- helpArg0 = command.newHelpLiteral("load");
|
|
|
- command.addHelpChild(helpArg0, command.newHelpString("world", false));
|
|
|
- command.addHelpChild(help, helpArg0);
|
|
|
- //world unload <world>
|
|
|
- helpArg0 = command.newHelpLiteral("unload");
|
|
|
- command.addHelpChild(helpArg0, command.newHelpString("world", false));
|
|
|
- command.addHelpChild(help, helpArg0);
|
|
|
//world diffi <world> <diffi>
|
|
|
helpArg0 = command.newHelpLiteral("diffi");
|
|
|
helpArg1 = command.newHelpString("world", false);
|
|
@@ -9855,6 +9915,10 @@ function tpBottom(player) {
|
|
|
entity.teleport(player, player_loc);
|
|
|
}
|
|
|
|
|
|
+//--------------------------------------------------
|
|
|
+//Hawkeye-Utils
|
|
|
+//--------------------------------------------------
|
|
|
+
|
|
|
function hawkeye.getStartIndices(string) {
|
|
|
a = array.new(5);
|
|
|
a[0] = text.indexOf(string, "e:", 0);
|
|
@@ -9997,3 +10061,7 @@ function hawkeye.getAmountOfAll() {
|
|
|
databank.close(stmt);
|
|
|
return amount;
|
|
|
}
|
|
|
+
|
|
|
+function hawkeye.getEventName(event_id) {
|
|
|
+ return map.get($event_map, event_id);
|
|
|
+}
|