mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 21:40:27 -07:00
Revert "Bunch of changes"
This commit is contained in:
parent
4c780b09ad
commit
bea505f34a
75 changed files with 746 additions and 2446 deletions
|
|
@ -1,44 +0,0 @@
|
||||||
package org.runite;
|
|
||||||
|
|
||||||
import org.runite.jagex.GameShell;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the launching of our Game Client.
|
|
||||||
* @author Keldagrim Development Team
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class GameLaunch {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The game settings.
|
|
||||||
*/
|
|
||||||
public static GameSetting SETTINGS = new GameSetting("RuneScape", Configurations.LOCAL_SERVER ? "127.0.0.1" : "localhost", 1, "live", false, false);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main method.
|
|
||||||
* @param args the arguments casted on runtime.
|
|
||||||
*/
|
|
||||||
public static void main(String[]args) {
|
|
||||||
for (int i = 0; i < args.length; i++) {
|
|
||||||
String[] cmd = args[i].split("=");
|
|
||||||
switch (cmd[0]) {
|
|
||||||
case "ip":
|
|
||||||
SETTINGS.setIp(cmd[1]);
|
|
||||||
break;
|
|
||||||
case "world":
|
|
||||||
SETTINGS.setWorld(Integer.parseInt(cmd[1]));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
launch(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Launches the client in a determined mode.
|
|
||||||
* @param swiftkit If we're launching swift kit.
|
|
||||||
*/
|
|
||||||
public static void launch(boolean swiftkit) {
|
|
||||||
GameShell.launchDesktop();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,167 +0,0 @@
|
||||||
package org.keldagrim;
|
|
||||||
|
|
||||||
import org.keldagrim.classloader.ClassLoadServer;
|
|
||||||
import org.keldagrim.net.NioReactor;
|
|
||||||
import org.keldagrim.net.packet.WorldPacketRepository;
|
|
||||||
import org.keldagrim.system.ShutdownSequence;
|
|
||||||
import org.keldagrim.system.mysql.SQLManager;
|
|
||||||
import org.keldagrim.system.util.Command;
|
|
||||||
import org.keldagrim.world.GameServer;
|
|
||||||
import org.keldagrim.world.PlayerSession;
|
|
||||||
import org.keldagrim.world.WorldDatabase;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.NetworkInterface;
|
|
||||||
import java.util.Scanner;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main class.
|
|
||||||
* @author Emperor
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public final class Main {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The commands.
|
|
||||||
*/
|
|
||||||
private static final Command[] COMMANDS = {
|
|
||||||
new Command("-commands", "Print a list of all commands.") {
|
|
||||||
@Override
|
|
||||||
public void run(String...args) {
|
|
||||||
for (Command c : COMMANDS) {
|
|
||||||
System.out.println("Command " + c.getName() + ": " + c.getInfo());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Command("-s", "Safely shuts down the server.") {
|
|
||||||
@Override
|
|
||||||
public void run(String...args) {
|
|
||||||
System.out.println("Shutting down Management server...");
|
|
||||||
ShutdownSequence.shutdown();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Command("-debug", "Debug world info.") {
|
|
||||||
@Override
|
|
||||||
public void run(String...args) {
|
|
||||||
System.out.println("---------------------------------------------");
|
|
||||||
for (GameServer server : WorldDatabase.getWorlds()) {
|
|
||||||
if (server != null) {
|
|
||||||
System.out.println("World [id=" + server.getInfo().getWorldId() + ", IP=" + server.getInfo().getAddress() + ", country=" + server.getInfo().getCountry() + ", members=" + server.getInfo().isMembers() + ", players=" + server.getPlayers().size() + ", active=" + server.isActive() + "].");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Command("-pinfo", "Debugs player information (usage: -pinfo emperor).") {
|
|
||||||
@Override
|
|
||||||
public void run(String...args) {
|
|
||||||
String name = args[1];
|
|
||||||
PlayerSession player = WorldDatabase.getPlayer(name);
|
|
||||||
if (player == null) {
|
|
||||||
System.out.println("Player " + name + " was not registered!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
System.out.println("Player [name=" + name + ", world=" + player.getWorldId() + ", active=" + player.isActive() + "].");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Command("-update", "[ticks]? Calls an update on all the game servers (-update -1 to cancel).") {
|
|
||||||
@Override
|
|
||||||
public void run(String...args) {
|
|
||||||
int ticks = args.length > 1 ? Integer.parseInt(args[1]) : 500;
|
|
||||||
for (GameServer server : WorldDatabase.getWorlds()) {
|
|
||||||
if (server != null && server.isActive()) {
|
|
||||||
WorldPacketRepository.sendUpdate(server, ticks);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Command("-reloadconfig", "Reloads the configurations of all worlds.") {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run(String... args) {
|
|
||||||
for (GameServer server : WorldDatabase.getWorlds()) {
|
|
||||||
if(server == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
WorldPacketRepository.sendConfigReload(server);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
new Command("-rlcache", "Reloads launcher/client resource cache") {
|
|
||||||
@Override
|
|
||||||
public void run(String... args) {
|
|
||||||
ClassLoadServer.resetResourceCache();
|
|
||||||
System.out.println("Reloaded resource cache!");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
new Command("-kick", "Kicks a player from the MS (not ingame).") {
|
|
||||||
@Override
|
|
||||||
public void run(String... args) {
|
|
||||||
String name = args[1];
|
|
||||||
PlayerSession player = WorldDatabase.getPlayer(name);
|
|
||||||
if (player == null) {
|
|
||||||
System.out.println("Player " + name + " was not registered!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
player.getWorld().getPlayers().remove(name);
|
|
||||||
player.setWorldId(0);
|
|
||||||
System.out.println("Kicked player " + name + "!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main method.
|
|
||||||
* @param args The arguments cast on runtime.
|
|
||||||
* @throws Throwable When an exception occurs.
|
|
||||||
*/
|
|
||||||
public static void main(String...args) throws Throwable {
|
|
||||||
if (!isLocallyHosted(ServerConstants.HOST_ADDRESS)) {
|
|
||||||
System.err.println("WARNING: Configure host address in server constants!");
|
|
||||||
}
|
|
||||||
System.out.println("-------- 530 Management server --------");
|
|
||||||
System.out.println("Starting up...");
|
|
||||||
SQLManager.init();
|
|
||||||
//NioReactor.configure(ServerConstants.PORT).start();
|
|
||||||
NioReactor.configure(5555).start();
|
|
||||||
new ClassLoadServer().start();
|
|
||||||
Runtime.getRuntime().addShutdownHook(new ShutdownSequence());
|
|
||||||
System.out.println("Status: ready.");
|
|
||||||
System.out.println("Use -commands for a list of commands!");
|
|
||||||
Scanner s = new Scanner(System.in);
|
|
||||||
while (s.hasNext()) {
|
|
||||||
try {
|
|
||||||
String command = s.nextLine();
|
|
||||||
if (!command.startsWith("-")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String[] arguments = command.split(" ");
|
|
||||||
command = arguments[0];
|
|
||||||
for (Command c : COMMANDS) {
|
|
||||||
if (c.getName().equals(command)) {
|
|
||||||
System.out.println("Handling command \"" + command + "\"!");
|
|
||||||
c.run(arguments);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Throwable t) {
|
|
||||||
t.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if the Management server is locally hosted.
|
|
||||||
* @return {@code True} if so.
|
|
||||||
* @throws IOException When an I/O exception occurs.
|
|
||||||
*/
|
|
||||||
private static boolean isLocallyHosted(String ip) throws IOException {
|
|
||||||
InetAddress address = InetAddress.getByName(ip);
|
|
||||||
if (address.isAnyLocalAddress() || address.isLoopbackAddress()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return NetworkInterface.getByInetAddress(address) != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
@echo off
|
|
||||||
@title World 1
|
|
||||||
java -server -Xms512m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Main server1.properties
|
|
||||||
pause
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
@echo off
|
|
||||||
@title World 2
|
|
||||||
java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Main server2.properties
|
|
||||||
pause
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
@echo off
|
|
||||||
@title World 3
|
|
||||||
java -server -Xms1024m -Xmx1536m -XX:NewSize=32m -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+AggressiveOpts -cp bin;data/libs/*;data/libs/slf4j/*; org.crandor.Main server3.properties
|
|
||||||
pause
|
|
||||||
|
|
@ -1,180 +0,0 @@
|
||||||
package org.crandor;
|
|
||||||
|
|
||||||
import org.crandor.game.system.mysql.SQLManager;
|
|
||||||
import org.crandor.game.world.map.Location;
|
|
||||||
import org.crandor.tools.mysql.Database;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A class holding constants of the server.
|
|
||||||
* @author Emperor
|
|
||||||
* @author Vexia
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public final class ServerConstants {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The administrators.
|
|
||||||
*/
|
|
||||||
public static final String[] ADMINISTRATORS = {
|
|
||||||
"RedSparr0w",
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The cache path.
|
|
||||||
*/
|
|
||||||
public static final String CACHE_PATH = "data/cache/";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The store path.
|
|
||||||
*/
|
|
||||||
public static final String STORE_PATH = "data/store/";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The player account path.
|
|
||||||
*/
|
|
||||||
public static final String PLAYER_SAVE_PATH = "data/players/";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The maximum amount of players.
|
|
||||||
*/
|
|
||||||
public static final int MAX_PLAYERS = (1 << 11) - 1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The maximum amount of NPCs.
|
|
||||||
*/
|
|
||||||
public static final int MAX_NPCS = (1 << 15) - 1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The start location for a fresh account.
|
|
||||||
*/
|
|
||||||
public static final Location START_LOCATION = Location.create(3094, 3107, 0);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main home teleport location.
|
|
||||||
*/
|
|
||||||
public static final Location HOME_LOCATION = Location.create(3222, 3218, 0);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The teleport destinations.
|
|
||||||
*/
|
|
||||||
public static final Object[][] TELEPORT_DESTINATIONS = {
|
|
||||||
{ Location.create(2974, 4383, 2), "corp", "corporal", "corporeal" },
|
|
||||||
{ Location.create(2659, 2649, 0), "pc", "pest control", "pest" },
|
|
||||||
{ Location.create(3293, 3184, 0), "al kharid", "alkharid", "kharid" },
|
|
||||||
{ Location.create(3222, 3217, 0), "lumbridge", "lumby" },
|
|
||||||
{ Location.create(3110, 3168, 0), "wizard tower", "wizards tower", "tower", "wizards" },
|
|
||||||
{ Location.create(3083, 3249, 0), "draynor", "draynor village" },
|
|
||||||
{ Location.create(3019, 3244, 0), "port sarim", "sarim" },
|
|
||||||
{ Location.create(2956, 3209, 0), "rimmington" },
|
|
||||||
{ Location.create(2965, 3380, 0), "fally", "falador" },
|
|
||||||
{ Location.create(2895, 3436, 0), "taverly" },
|
|
||||||
{ Location.create(3080, 3423, 0), "barbarian village", "barb" },
|
|
||||||
{ Location.create(3213, 3428, 0), "varrock" },
|
|
||||||
{ Location.create(3164, 3485, 0), "grand exchange", "ge" },
|
|
||||||
{ Location.create(2917, 3175, 0), "karamja" },
|
|
||||||
{ Location.create(2450, 5165, 0), "tzhaar" },
|
|
||||||
{ Location.create(2795, 3177, 0), "brimhaven" },
|
|
||||||
{ Location.create(2849, 2961, 0), "shilo village", "shilo" },
|
|
||||||
{ Location.create(2605, 3093, 0), "yanille" },
|
|
||||||
{ Location.create(2663, 3305, 0), "ardougne", "ardy" },
|
|
||||||
{ Location.create(2450, 3422, 0), "gnome stronghold", "gnome" },
|
|
||||||
{ Location.create(2730, 3485, 0), "camelot", "cammy", "seers" },
|
|
||||||
{ Location.create(2805, 3435, 0), "catherby" },
|
|
||||||
{ Location.create(2659, 3657, 0), "rellekka" },
|
|
||||||
{ Location.create(2890, 3676, 0), "trollheim" },
|
|
||||||
{ Location.create(2914, 3746, 0), "godwars", "gwd", "god wars" },
|
|
||||||
{ Location.create(3180, 3684, 0), "bounty hunter", "bh" },
|
|
||||||
{ Location.create(3272, 3687, 0), "clan wars", "clw" },
|
|
||||||
{ Location.create(3090, 3957, 0), "mage arena", "mage", "magearena", "arena" },
|
|
||||||
{ Location.create(3069, 10257, 0), "king black dragon", "kbd" },
|
|
||||||
{ Location.create(3359, 3416, 0), "digsite" },
|
|
||||||
{ Location.create(3488, 3489, 0), "canifis" },
|
|
||||||
{ Location.create(3428, 3526, 0), "slayer tower", "slayer" },
|
|
||||||
{ Location.create(3502, 9483, 2), "kalphite queen", "kq", "kalphite hive", "kalphite" },
|
|
||||||
{ Location.create(3233, 2913, 0), "pyramid" },
|
|
||||||
{ Location.create(3419, 2917, 0), "nardah" },
|
|
||||||
{ Location.create(3482, 3090, 0), "uzer" },
|
|
||||||
{ Location.create(3358, 2970, 0), "pollnivneach", "poln" },
|
|
||||||
{ Location.create(3305, 2788, 0), "sophanem" },
|
|
||||||
{ Location.create(2898, 3544, 0), "burthorpe", "burthorp" },
|
|
||||||
{ Location.create(3088, 3491, 0), "edge", "edgeville" },
|
|
||||||
{ Location.create(3169, 3034, 0), "bedabin" },
|
|
||||||
{ Location.create(3565, 3289, 0), "barrows" },
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The teleport destinations, intended for Grandpa Jack.
|
|
||||||
*/
|
|
||||||
public static final Object[][] TELEPORT_DESTINATIONS_DONATOR = {
|
|
||||||
{ Location.create(2914, 3746, 0), "godwars", "gwd", "god wars" },
|
|
||||||
{ Location.create(2659, 2649, 0), "pc", "pest control", "pest" },
|
|
||||||
{ Location.create(3293, 3184, 0), "al kharid", "alkharid", "kharid" },
|
|
||||||
{ Location.create(3222, 3217, 0), "lumbridge", "lumby" },
|
|
||||||
{ Location.create(3110, 3168, 0), "wizard tower", "wizards tower", "tower", "wizards" },
|
|
||||||
{ Location.create(3083, 3249, 0), "draynor", "draynor village" },
|
|
||||||
{ Location.create(3019, 3244, 0), "port sarim", "sarim" },
|
|
||||||
{ Location.create(2956, 3209, 0), "rimmington" },
|
|
||||||
{ Location.create(2965, 3380, 0), "fally", "falador" },
|
|
||||||
{ Location.create(2895, 3436, 0), "taverly" },
|
|
||||||
{ Location.create(3080, 3423, 0), "barbarian village", "barb" },
|
|
||||||
{ Location.create(3213, 3428, 0), "varrock" },
|
|
||||||
{ Location.create(3164, 3485, 0), "grand exchange", "ge" },
|
|
||||||
{ Location.create(2917, 3175, 0), "karamja" },
|
|
||||||
{ Location.create(2450, 5165, 0), "tzhaar" },
|
|
||||||
{ Location.create(2795, 3177, 0), "brimhaven" },
|
|
||||||
{ Location.create(2849, 2961, 0), "shilo village", "shilo" },
|
|
||||||
{ Location.create(2605, 3093, 0), "yanille" },
|
|
||||||
{ Location.create(2663, 3305, 0), "ardougne", "ardy" },
|
|
||||||
{ Location.create(2450, 3422, 0), "gnome stronghold", "gnome" },
|
|
||||||
{ Location.create(2730, 3485, 0), "camelot", "cammy", "seers" },
|
|
||||||
{ Location.create(2805, 3435, 0), "catherby" },
|
|
||||||
{ Location.create(2659, 3657, 0), "rellekka" },
|
|
||||||
{ Location.create(2890, 3676, 0), "trollheim" },
|
|
||||||
{ Location.create(3180, 3684, 0), "bounty hunter", "bh" },
|
|
||||||
{ Location.create(3272, 3687, 0), "clan wars", "clw" },
|
|
||||||
{ Location.create(3090, 3957, 0), "mage arena", "mage", "magearena", "arena" },
|
|
||||||
{ Location.create(3359, 3416, 0), "digsite" },
|
|
||||||
{ Location.create(3488, 3489, 0), "canifis" },
|
|
||||||
{ Location.create(3428, 3526, 0), "slayer tower", "slayer" },
|
|
||||||
{ Location.create(3233, 2913, 0), "pyramid" },
|
|
||||||
{ Location.create(3419, 2917, 0), "nardah" },
|
|
||||||
{ Location.create(3482, 3090, 0), "uzer" },
|
|
||||||
{ Location.create(3358, 2970, 0), "pollnivneach", "poln" },
|
|
||||||
{ Location.create(3305, 2788, 0), "sophanem" },
|
|
||||||
{ Location.create(2898, 3544, 0), "burthorpe", "burthorp" },
|
|
||||||
{ Location.create(3088, 3491, 0), "edge", "edgeville" },
|
|
||||||
{ Location.create(3169, 3034, 0), "bedabin" },
|
|
||||||
{ Location.create(3565, 3311, 0), "barrows" },
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The string of donation messages displayed on an interface.
|
|
||||||
*/
|
|
||||||
public static final String[] MESSAGES = new String[] {"Welcome!" };
|
|
||||||
|
|
||||||
public static final String[] DATABASE_NAMES = {
|
|
||||||
"server", "global"
|
|
||||||
};
|
|
||||||
|
|
||||||
public static final Database[] DATABASES = {
|
|
||||||
new Database((SQLManager.LOCAL ? "localhost" : "redsparr0w.com"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "username"), (SQLManager.LOCAL ? "" : "password")),
|
|
||||||
new Database((SQLManager.LOCAL ? "localhost" : "redsparr0w.com"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "username"), (SQLManager.LOCAL ? "" : "password"))
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If MySQL is enabled.
|
|
||||||
*/
|
|
||||||
public static boolean MYSQL = true;
|
|
||||||
|
|
||||||
public static boolean VALIDATED = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@Code ServerConstants} {@Code Object}
|
|
||||||
*/
|
|
||||||
private ServerConstants() {
|
|
||||||
/*
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,667 +0,0 @@
|
||||||
package org.crandor.gui.tab;
|
|
||||||
|
|
||||||
|
|
||||||
import org.crandor.Main;
|
|
||||||
import org.crandor.game.node.item.GroundItemManager;
|
|
||||||
import org.crandor.game.system.SystemManager;
|
|
||||||
import org.crandor.game.system.SystemState;
|
|
||||||
import org.crandor.game.world.GameWorld;
|
|
||||||
import org.crandor.game.world.map.RegionManager;
|
|
||||||
import org.crandor.game.world.repository.Repository;
|
|
||||||
import org.crandor.gui.ConsoleTab;
|
|
||||||
import org.crandor.plugin.PluginManager;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import javax.swing.border.TitledBorder;
|
|
||||||
import java.awt.*;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.awt.event.MouseEvent;
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.net.URL;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles server info tab.
|
|
||||||
*
|
|
||||||
* @author Emperor
|
|
||||||
*/
|
|
||||||
public class StatisticsTab extends ConsoleTab {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The serial UID.
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 6164020580271944550L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The queue size.
|
|
||||||
*/
|
|
||||||
public static final int QUEUE_SIZE = 1 << 16;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The performance data queue.
|
|
||||||
*/
|
|
||||||
private static short[] performanceQueue = new short[QUEUE_SIZE];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The memory data queue.
|
|
||||||
*/
|
|
||||||
private static short[] memoryQueue = new short[QUEUE_SIZE];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The current index of the performance queue.
|
|
||||||
*/
|
|
||||||
private static int queueIndex = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The current statistics zoom.
|
|
||||||
*/
|
|
||||||
private static int statisticsZoom = 5;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The singleton.
|
|
||||||
*/
|
|
||||||
public static final StatisticsTab INSTANCE = new StatisticsTab();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The statistics mouse coordinates.
|
|
||||||
*/
|
|
||||||
private Point statisticMousePoint = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The zoom in button.
|
|
||||||
*/
|
|
||||||
private JButton zoomIn;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The zoom out button.
|
|
||||||
*/
|
|
||||||
private JButton zoomOut;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The reset button.
|
|
||||||
*/
|
|
||||||
private JButton resetButton;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The save log button.
|
|
||||||
*/
|
|
||||||
private JButton saveLogButton;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The shutdown button.
|
|
||||||
*/
|
|
||||||
private JButton shutdown;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The file chooser instance.
|
|
||||||
*/
|
|
||||||
private JFileChooser fileChooser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If the tool tip is currently opened.
|
|
||||||
*/
|
|
||||||
private boolean toolTipOpened;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The world statistics text pane.
|
|
||||||
*/
|
|
||||||
private StatsTextPane worldStatistics;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The thread statistics text pane.
|
|
||||||
*/
|
|
||||||
private StatsTextPane threadStatistics;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The working time of the main thread.
|
|
||||||
*/
|
|
||||||
private static long workingTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The maximum amount of players being active at the same time.
|
|
||||||
*/
|
|
||||||
private static int maximumPlayers;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The text area.
|
|
||||||
*/
|
|
||||||
private final JTextArea console = new JTextArea();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@Code StatisticsTab} {@Code Object}
|
|
||||||
*/
|
|
||||||
public StatisticsTab() {
|
|
||||||
super("Statistics");
|
|
||||||
setLayout(null);
|
|
||||||
|
|
||||||
JScrollPane scrollPane = new JScrollPane();
|
|
||||||
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
|
||||||
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
|
|
||||||
scrollPane.setBackground(UIManager.getColor("Button.background"));
|
|
||||||
scrollPane.setBounds(6, 403, 1042, 189);
|
|
||||||
scrollPane.setBorder(new TitledBorder(null, "Console", TitledBorder.LEADING, TitledBorder.TOP, null, null));
|
|
||||||
add(scrollPane);
|
|
||||||
|
|
||||||
console.setLineWrap(true);
|
|
||||||
console.setBackground(UIManager.getColor("CheckBox.background"));
|
|
||||||
console.setEditable(false);
|
|
||||||
scrollPane.setViewportView(console);
|
|
||||||
|
|
||||||
JLabel label = new JLabel();
|
|
||||||
label.setBounds(450, 345, 163, 16);
|
|
||||||
add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getToolTipText(MouseEvent e) {
|
|
||||||
if (e.getX() > getWidth() / 2 && e.getX() < getWidth()
|
|
||||||
&& e.getY() > 2 && e.getY() < getHeight() / 2) {
|
|
||||||
int max = (getWidth() / 2) / statisticsZoom;
|
|
||||||
int index = queueIndex - (max - (e.getX() - (getWidth() / 2)) / statisticsZoom);
|
|
||||||
toolTipOpened = true;
|
|
||||||
if (index < 0) {
|
|
||||||
return "Tick: null, time: null.";
|
|
||||||
}
|
|
||||||
return new StringBuilder("Tick: ").append(index).append(", time: ").append(performanceQueue[index] + 600).append(".").toString();
|
|
||||||
}
|
|
||||||
toolTipOpened = false;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Point getToolTipLocation(MouseEvent e) {
|
|
||||||
if (e.getX() > getWidth() / 2 && e.getX() < getWidth()
|
|
||||||
&& e.getY() > 2 && e.getY() < getHeight() / 2) {
|
|
||||||
return new Point(e.getX() + 15, e.getY() + 10);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void paint(Graphics g) {
|
|
||||||
super.paint(g);
|
|
||||||
drawPerformanceStatistics(this, g);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Positions the components.
|
|
||||||
*/
|
|
||||||
public void positionComponents() {
|
|
||||||
int init = 90;
|
|
||||||
int diff = 5;
|
|
||||||
zoomIn.setLocation(getWidth() / 2 - (zoomIn.getWidth() / 2) - diff, 5 + init);
|
|
||||||
zoomOut.setLocation(getWidth() / 2 - (zoomOut.getWidth() / 2) - diff, 30 + init);
|
|
||||||
resetButton.setLocation(getWidth() / 2 - (resetButton.getWidth() / 2) - diff, 55 + init);
|
|
||||||
saveLogButton.setLocation(getWidth() / 2 - (saveLogButton.getWidth() / 2) - diff, 80 + init);
|
|
||||||
shutdown.setLocation(getWidth() / 2 - (shutdown.getWidth() / 2), 310);
|
|
||||||
worldStatistics.setLocation(55, 310);
|
|
||||||
threadStatistics.setLocation(shutdown.getX() + shutdown.getWidth() + 35, 310);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the server info tab.
|
|
||||||
*
|
|
||||||
* @return This instance.
|
|
||||||
*/
|
|
||||||
public StatisticsTab init() {
|
|
||||||
initMaximumPlayers();
|
|
||||||
fileChooser = new JFileChooser("./");
|
|
||||||
zoomIn = new JButton("+");
|
|
||||||
zoomIn.setLayout(null);
|
|
||||||
zoomIn.setVisible(true);
|
|
||||||
zoomIn.setSize(50, 20);
|
|
||||||
zoomIn.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
zoomOut.setEnabled(true);
|
|
||||||
if (++statisticsZoom > 20) {
|
|
||||||
statisticsZoom = 20;
|
|
||||||
zoomIn.setEnabled(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drawPerformanceStatistics(StatisticsTab.this, getGraphics());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
zoomOut = new JButton("-");
|
|
||||||
zoomOut.setLayout(null);
|
|
||||||
zoomOut.setVisible(true);
|
|
||||||
zoomOut.setSize(50, 20);
|
|
||||||
zoomOut.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
zoomIn.setEnabled(true);
|
|
||||||
if (--statisticsZoom < 2) {
|
|
||||||
statisticsZoom = 2;
|
|
||||||
zoomOut.setEnabled(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drawPerformanceStatistics(StatisticsTab.this, getGraphics());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resetButton = new JButton("x");
|
|
||||||
resetButton.setLayout(null);
|
|
||||||
resetButton.setVisible(true);
|
|
||||||
resetButton.setSize(50, 20);
|
|
||||||
resetButton.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
queueIndex = 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
saveLogButton = new JButton("", createImageIcon("Save16.gif"));
|
|
||||||
saveLogButton.setLayout(null);
|
|
||||||
saveLogButton.setVisible(true);
|
|
||||||
saveLogButton.setSize(50, 20);
|
|
||||||
saveLogButton.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
int returnVal = fileChooser.showSaveDialog(StatisticsTab.this);
|
|
||||||
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
|
||||||
File file = fileChooser.getSelectedFile();
|
|
||||||
if (!file.getName().contains(".")) {
|
|
||||||
file = new File(file.getPath() + ".txt");
|
|
||||||
}
|
|
||||||
logQueues(file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
add(resetButton);
|
|
||||||
add(zoomIn);
|
|
||||||
add(zoomOut);
|
|
||||||
add(saveLogButton);
|
|
||||||
shutdown = new JButton("Shutdown");
|
|
||||||
shutdown.setLayout(null);
|
|
||||||
shutdown.setVisible(true);
|
|
||||||
shutdown.setSize(100, 20);
|
|
||||||
shutdown.addActionListener(e -> SystemManager.flag(SystemState.TERMINATED));
|
|
||||||
add(shutdown);
|
|
||||||
worldStatistics = new StatsTextPane().init();
|
|
||||||
worldStatistics.setSize(390, 90);
|
|
||||||
add(worldStatistics);
|
|
||||||
updateWorldText();
|
|
||||||
threadStatistics = new StatsTextPane().init();
|
|
||||||
threadStatistics.setSize(390, 90);
|
|
||||||
add(threadStatistics);
|
|
||||||
updateThreadText();
|
|
||||||
setLayout(null);
|
|
||||||
setVisible(true);
|
|
||||||
ToolTipManager.sharedInstance().setInitialDelay(0);
|
|
||||||
positionComponents();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the maximum players count.
|
|
||||||
*/
|
|
||||||
private static void initMaximumPlayers() {
|
|
||||||
setMaximumPlayers(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the maximum amount of players.
|
|
||||||
*
|
|
||||||
* @param maximum The maximum.
|
|
||||||
*/
|
|
||||||
private static void setMaximumPlayers(int maximum) {
|
|
||||||
maximumPlayers = maximum;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logs the queues.
|
|
||||||
*
|
|
||||||
* @param file The file to log to.
|
|
||||||
*/
|
|
||||||
protected static void logQueues(File file) {
|
|
||||||
try (BufferedWriter bw = new BufferedWriter(new FileWriter(file, true))) {
|
|
||||||
bw.append("/////////////////////////////////////////////////////////////////////////");
|
|
||||||
bw.newLine();
|
|
||||||
bw.append("/////////////////////////////////////////////////////////////////////////");
|
|
||||||
bw.newLine();
|
|
||||||
// bw.append("// " + CalenderDate.getFormattedDate() + " performance log results:");
|
|
||||||
bw.newLine();
|
|
||||||
bw.append("/////////////////////////////////////////////////////////////////////////");
|
|
||||||
bw.newLine();
|
|
||||||
for (int i = 0; i < queueIndex; i++) {
|
|
||||||
bw.append(new StringBuilder("performance_report:memory_usage-[tick=").append(i).append(", mem=").append(memoryQueue[i]).append("mb]."));
|
|
||||||
bw.newLine();
|
|
||||||
}
|
|
||||||
for (int i = 0; i < queueIndex; i++) {
|
|
||||||
int value = 600 + performanceQueue[i];
|
|
||||||
bw.append(new StringBuilder("performance_report:clock_speed-[tick=").append(i).append(", time=").append(value).append(", status=").append(value < 601 ? "NORMAL]." : "DELAYED]."));
|
|
||||||
bw.newLine();
|
|
||||||
}
|
|
||||||
bw.append("/////////////////////////////////////////////////////////////////////////");
|
|
||||||
bw.newLine();
|
|
||||||
bw.flush();
|
|
||||||
bw.close();
|
|
||||||
} catch (Throwable t) {
|
|
||||||
t.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an image icon.
|
|
||||||
*
|
|
||||||
* @param path The path of the image file.
|
|
||||||
* @return The image icon.
|
|
||||||
*/
|
|
||||||
private static ImageIcon createImageIcon(String path) {
|
|
||||||
URL imgURL = StatisticsTab.class.getResource(path);
|
|
||||||
if (imgURL != null) {
|
|
||||||
return new ImageIcon(imgURL);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reports the performance value.
|
|
||||||
*
|
|
||||||
* @param value The value.
|
|
||||||
*/
|
|
||||||
public static void reportPerformance(int value) {
|
|
||||||
if (value >= Short.MAX_VALUE) {
|
|
||||||
value = Short.MAX_VALUE - 1;
|
|
||||||
}
|
|
||||||
secureQueues();
|
|
||||||
performanceQueue[queueIndex] = (short) value;
|
|
||||||
memoryQueue[queueIndex++] = (short) ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1_000_000);
|
|
||||||
INSTANCE.repaint();
|
|
||||||
workingTime += (600 + value);
|
|
||||||
if (INSTANCE.threadStatistics != null) {
|
|
||||||
INSTANCE.updateThreadText();
|
|
||||||
if ((GameWorld.getTicks() % 10) == 0) {
|
|
||||||
INSTANCE.updateWorldText();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the thread statistics text.
|
|
||||||
*/
|
|
||||||
public void updateThreadText() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
long runtime = System.currentTimeMillis() - Main.startTime;
|
|
||||||
double percentage = workingTime / (runtime * 0.01);
|
|
||||||
long hours = runtime / 3600000;
|
|
||||||
runtime -= hours * 3600000;
|
|
||||||
long minutes = runtime / 60000;
|
|
||||||
runtime -= minutes * 60000;
|
|
||||||
long seconds = runtime / 1000;
|
|
||||||
sb.append("Runtime: ").append(hours).append("h ").append(minutes).append("m ").append(seconds).append("s").append(" - ").append(GameWorld.getTicks()).append(" ticks").append("\n");
|
|
||||||
sb.append("Working time: ").append(workingTime).append("ms").append(" - ").append(String.format("%.2f", percentage)).append("%").append("\n");
|
|
||||||
sb.append("Average cycle: ").append(String.format("%.1f", (double) workingTime / GameWorld.getTicks())).append("ms").append("\n");
|
|
||||||
threadStatistics.setText(sb.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the world statistics text.
|
|
||||||
*/
|
|
||||||
public void updateWorldText() {
|
|
||||||
int players = Repository.getPlayers().size();
|
|
||||||
if (players > getMaximumPlayers()) {
|
|
||||||
setMaximumPlayers(players);
|
|
||||||
}
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("Players: ").append(players).append(", max: ").append(getMaximumPlayers()).append("\n");
|
|
||||||
sb.append("NPCs: ").append(Repository.getNpcs().size()).append("\n");
|
|
||||||
sb.append("Regions: ").append(RegionManager.getRegionCache().size()).append("\n");
|
|
||||||
sb.append("Ground items: ").append(GroundItemManager.getItems().size()).append("\n");
|
|
||||||
sb.append("Plugins: ").append(PluginManager.getAmountLoaded()).append("\n");
|
|
||||||
worldStatistics.setText(sb.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the performance statistics.
|
|
||||||
*
|
|
||||||
* @param c The component.
|
|
||||||
* @param g The graphics.
|
|
||||||
*/
|
|
||||||
private static void drawPerformanceStatistics(Component c, Graphics g) {
|
|
||||||
int x = c.getWidth() / 2 + 48;
|
|
||||||
int y = c.getHeight() / 2;
|
|
||||||
|
|
||||||
Point zero = new Point(x, y / 2);
|
|
||||||
g.setColor(Color.LIGHT_GRAY);
|
|
||||||
|
|
||||||
//Fill the background rectangle.
|
|
||||||
g.fillRect(x, 5, c.getWidth() - 4 - x, y - 5);
|
|
||||||
g.setColor(Color.GRAY);
|
|
||||||
|
|
||||||
int count = 0;
|
|
||||||
for (int i = 0; i < c.getWidth() - 4 - x; i += statisticsZoom) {
|
|
||||||
g.drawLine((int) (zero.getX() + i), 5,
|
|
||||||
(int) (zero.getX() + i), y - 1);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
int space = (y / 2 - 10) / 4;
|
|
||||||
g.setFont(new Font(null, Font.PLAIN, 9));
|
|
||||||
for (int i = 0; i < 5; i++) {
|
|
||||||
g.setColor(i == 0 ? Color.BLACK : Color.GRAY);
|
|
||||||
g.drawLine(x, (int) zero.getY() - (space * i), c.getWidth() - 5, (int) zero.getY() - (space * i));
|
|
||||||
g.drawLine(x, (int) zero.getY() + (space * i), c.getWidth() - 5, (int) zero.getY() + (space * i));
|
|
||||||
g.setColor(Color.BLACK);
|
|
||||||
g.drawString("" + (i * 150), x - 18, (int) zero.getY() - (space * i) + 2);
|
|
||||||
if (i != 0) {
|
|
||||||
g.drawString("-" + (i * 150), x - 20, (int) zero.getY() + (space * i) + 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
g.setColor(Color.GREEN);
|
|
||||||
for (int i = 1; i < count; i++) {
|
|
||||||
int index = queueIndex - i;
|
|
||||||
if (index < 1) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
int fromPoint = performanceQueue[index];
|
|
||||||
int fromX = (count - i) * statisticsZoom;
|
|
||||||
int fromY = (int) (-fromPoint / (600D / (space * 4)));
|
|
||||||
int toPoint = index == 0 ? 0 : performanceQueue[index - 1];
|
|
||||||
int toX = (count - i - 1) * statisticsZoom;
|
|
||||||
int toY = (int) (-toPoint / (600D / (space * 4)));
|
|
||||||
if (fromY < 0) {
|
|
||||||
g.setColor(Color.RED);
|
|
||||||
}
|
|
||||||
g.drawLine((int) (zero.getX() + fromX), (int) (zero.getY() + fromY),
|
|
||||||
(int) (zero.getX() + toX), (int) (zero.getY() + toY));
|
|
||||||
if (fromY >= 0) {
|
|
||||||
g.setColor(Color.GREEN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
g.setColor(Color.BLACK);
|
|
||||||
//Draw vertical line.
|
|
||||||
g.drawLine(x, y + 4, x, 1);
|
|
||||||
Point p = ((StatisticsTab) c).statisticMousePoint;
|
|
||||||
if (p != null) {
|
|
||||||
g.setColor(new Color(251, 230, 130));
|
|
||||||
g.fillRoundRect((int) (p.getX() + 10), (int) (p.getY() - 10), 100, 50, 10, 10);
|
|
||||||
}
|
|
||||||
if (((StatisticsTab) c).toolTipOpened) {
|
|
||||||
((StatisticsTab) c).setToolTipText("test");
|
|
||||||
}
|
|
||||||
drawMemoryStatistics(c, g);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws the performance statistics.
|
|
||||||
*
|
|
||||||
* @param c The component.
|
|
||||||
* @param g The graphics.
|
|
||||||
*/
|
|
||||||
private static void drawMemoryStatistics(Component c, Graphics g) {
|
|
||||||
int x = 5;
|
|
||||||
int y = c.getHeight() / 2;
|
|
||||||
int endX = (c.getWidth() / 2) - 48;
|
|
||||||
|
|
||||||
Point zero = new Point(x + 18, y);
|
|
||||||
g.setColor(Color.LIGHT_GRAY);
|
|
||||||
|
|
||||||
//Fill the background rectangle.
|
|
||||||
g.fillRect((int) zero.getX(), 5, endX - x, y - 5);
|
|
||||||
g.setColor(Color.GRAY);
|
|
||||||
|
|
||||||
int count = 0;
|
|
||||||
for (int i = 0; i < endX - x; i += statisticsZoom) {
|
|
||||||
g.drawLine((int) (zero.getX() + i), 5,
|
|
||||||
(int) (zero.getX() + i), y - 1);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
int space = (y) / 10;
|
|
||||||
g.setFont(new Font(null, Font.PLAIN, 9));
|
|
||||||
for (int i = 0; i < 10; i++) {
|
|
||||||
g.setColor(Color.GRAY);
|
|
||||||
g.drawLine((int) zero.getX() - 2, (int) zero.getY() - (space * i), endX + 17, (int) zero.getY() - (space * i));
|
|
||||||
g.setColor(Color.BLACK);
|
|
||||||
g.drawString("" + (i * 100), 2, (int) zero.getY() - (space * i) + 2);
|
|
||||||
}
|
|
||||||
g.setColor(Color.BLUE);
|
|
||||||
for (int i = 1; i < count; i++) {
|
|
||||||
int index = queueIndex - i;
|
|
||||||
if (index < 1) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
int fromPoint = memoryQueue[index];
|
|
||||||
int fromX = (count - i) * statisticsZoom;
|
|
||||||
int fromY = (int) (fromPoint / (900D / (space * 10)));
|
|
||||||
int toPoint = index == 0 ? 0 : memoryQueue[index - 1];
|
|
||||||
int toX = (count - i - 1) * statisticsZoom;
|
|
||||||
int toY = (int) (toPoint / (900D / (space * 10)));
|
|
||||||
if (fromY < 0) {
|
|
||||||
g.setColor(Color.RED);
|
|
||||||
}
|
|
||||||
g.drawLine((int) (zero.getX() + fromX), (int) (zero.getY() - fromY),
|
|
||||||
(int) (zero.getX() + toX), (int) (zero.getY() - toY));
|
|
||||||
if (fromY < 0) {
|
|
||||||
g.setColor(Color.GREEN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
g.setColor(Color.BLACK);
|
|
||||||
//Draw horizontal line.
|
|
||||||
g.drawLine((int) (zero.getX() - 4), (int) zero.getY(), endX + 21, (int) zero.getY());
|
|
||||||
//Draw vertical line.
|
|
||||||
g.drawLine((int) zero.getX(), (int) zero.getY() + 4, (int) zero.getX(), 1);
|
|
||||||
Point p = ((StatisticsTab) c).statisticMousePoint;
|
|
||||||
if (p != null) {
|
|
||||||
g.setColor(new Color(251, 230, 130));
|
|
||||||
g.fillRoundRect((int) (p.getX() + 10), (int) (p.getY() - 10), 100, 50, 10, 10);
|
|
||||||
}
|
|
||||||
if (((StatisticsTab) c).toolTipOpened) {
|
|
||||||
((StatisticsTab) c).setToolTipText("test");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Secures the queues.
|
|
||||||
*/
|
|
||||||
private static void secureQueues() {
|
|
||||||
if (queueIndex >= QUEUE_SIZE) {
|
|
||||||
int lagSpikes = 0;
|
|
||||||
int memoryUsageSpikes = 0;
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
int totalMemory = 0;
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
int totalCycleTime = 0;
|
|
||||||
//Start at tick 500, the JVM has to "warm up" first.
|
|
||||||
for (int i = 500; i < QUEUE_SIZE; i++) {
|
|
||||||
if (performanceQueue[i] > 0) { //Anything above 0 (-600 + 600) = lag
|
|
||||||
lagSpikes++;
|
|
||||||
}
|
|
||||||
if (memoryQueue[i] > 700) { //Over 700Mb
|
|
||||||
memoryUsageSpikes++;
|
|
||||||
}
|
|
||||||
totalMemory += memoryQueue[i];
|
|
||||||
totalCycleTime += performanceQueue[i];
|
|
||||||
}
|
|
||||||
if (lagSpikes > 350 || memoryUsageSpikes > 350) {
|
|
||||||
logQueues(new File("./data/logs/system/Performance-log.txt"));
|
|
||||||
}
|
|
||||||
//System.out.println("Average cycle time: " + (600 + (totalCycleTime / (QUEUE_SIZE - 500))) + "ms.");
|
|
||||||
//System.out.println("Average memory usage: " + (totalMemory / (QUEUE_SIZE - 500)) + "Mb.");
|
|
||||||
queueIndex = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logs a message to the console.
|
|
||||||
*
|
|
||||||
* @param message the message.
|
|
||||||
*/
|
|
||||||
public void log(String message) {
|
|
||||||
console.append(message + "\n");
|
|
||||||
console.setCaretPosition(console.getDocument().getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the statistics zoom.
|
|
||||||
*
|
|
||||||
* @param pixels The amount of pixels.
|
|
||||||
*/
|
|
||||||
public static void setStatisticsZoom(int pixels) {
|
|
||||||
statisticsZoom = pixels;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the workingTime.
|
|
||||||
*
|
|
||||||
* @return The workingTime.
|
|
||||||
*/
|
|
||||||
public static long getWorkingTime() {
|
|
||||||
return workingTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the workingTime.
|
|
||||||
*
|
|
||||||
* @param workingTime The workingTime to set.
|
|
||||||
*/
|
|
||||||
public static void setWorkingTime(long workingTime) {
|
|
||||||
StatisticsTab.workingTime = workingTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the maximumPlayers.
|
|
||||||
*
|
|
||||||
* @return The maximumPlayers.
|
|
||||||
*/
|
|
||||||
public static int getMaximumPlayers() {
|
|
||||||
return maximumPlayers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the statistics tab text pane.
|
|
||||||
*
|
|
||||||
* @author Emperor
|
|
||||||
*/
|
|
||||||
public final class StatsTextPane extends JTextPane {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The serial UID.
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 664276151176087663L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code StatsTextPane} {@code Object}.
|
|
||||||
*/
|
|
||||||
public StatsTextPane() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the stats text pane.
|
|
||||||
*
|
|
||||||
* @return The stats text pane.
|
|
||||||
*/
|
|
||||||
public StatsTextPane init() {
|
|
||||||
setEditable(false);
|
|
||||||
setLayout(null);
|
|
||||||
Font font = new Font("Monospaced", Font.PLAIN, 12);
|
|
||||||
setFont(font);
|
|
||||||
super.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
|
|
||||||
super.setVisible(true);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,7 +12,7 @@ public final class Configurations {
|
||||||
/**
|
/**
|
||||||
* The website.
|
* The website.
|
||||||
*/
|
*/
|
||||||
public static final String WEBSITE = "http://localhost";
|
public static final String WEBSITE = "http://www.os.frostblades.org";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The client build.
|
* The client build.
|
||||||
|
|
@ -63,7 +63,7 @@ public final class Configurations {
|
||||||
/**
|
/**
|
||||||
* The MS IP.
|
* The MS IP.
|
||||||
*/
|
*/
|
||||||
public static final String MS_IP = (Configurations.LOCAL_MS ? "127.0.0.1" : "localhost");
|
public static final String MS_IP = (Configurations.LOCAL_MS ? "127.0.0.1" : "frostblades.org");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The operation system name.
|
* The operation system name.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
||||||
/**
|
/**
|
||||||
* The game settings.
|
* The game settings.
|
||||||
*/
|
*/
|
||||||
public static GameSetting SETTINGS = new GameSetting(GameLaunch.SETTINGS.getName(), Configurations.MS_IP, 1, "live", false, false);
|
public static GameSetting SETTINGS = new GameSetting(GameLaunch.SETTINGS.getName(), Configurations.LOCAL_MS ? "127.0.0.1" : "frostblades.org", 1, "live", false, false);
|
||||||
|
|
||||||
|
|
||||||
private boolean aBoolean1 = false;
|
private boolean aBoolean1 = false;
|
||||||
|
|
@ -560,6 +560,10 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
||||||
|
|
||||||
final void launch(Frame frame) {
|
final void launch(Frame frame) {
|
||||||
try {
|
try {
|
||||||
|
if(-8057 != -8057) {
|
||||||
|
this.method38(12);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Class140_Sub7.anInt2934 = 768;
|
Class140_Sub7.anInt2934 = 768;
|
||||||
Class70.anInt1047 = 768;
|
Class70.anInt1047 = 768;
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
package org.crandor;
|
|
||||||
|
|
||||||
public class Util {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Capitalize the first letter of the string
|
|
||||||
* @return Capitalized string
|
|
||||||
*/
|
|
||||||
public static String capitalize(String name) {
|
|
||||||
if (name != null && name.length() != 0) {
|
|
||||||
char[] chars = name.toCharArray();
|
|
||||||
chars[0] = Character.toUpperCase(chars[0]);
|
|
||||||
return new String(chars);
|
|
||||||
} else {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String strToEnum(String name) {
|
|
||||||
name = name.toUpperCase();
|
|
||||||
return name.replaceAll(" ", "_");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String enumToString(String name) {
|
|
||||||
name = name.toLowerCase();
|
|
||||||
name = name.replaceAll("_", " ");
|
|
||||||
return capitalize(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
name=Sparr0w
|
name=Crandor
|
||||||
beta=false
|
beta=false
|
||||||
sql=true
|
sql=true
|
||||||
devMode=false
|
devMode=true
|
||||||
gui=true
|
gui=true
|
||||||
gameType=economy
|
gameType=economy
|
||||||
worldId=1
|
worldId=1
|
||||||
country=6
|
country=0
|
||||||
activity=Default gameplay
|
activity=Default gameplay
|
||||||
members=true
|
members=true
|
||||||
pvp=false
|
pvp=false
|
||||||
quickChat=true
|
quickChat=true
|
||||||
lootshare=true
|
lootshare=true
|
||||||
msip=127.0.0.1
|
msip=127.0.0.1
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
name=Sparr0w
|
name=Crandor
|
||||||
beta=true
|
beta=true
|
||||||
sql=true
|
sql=true
|
||||||
devMode=false
|
devMode=false
|
||||||
gui=true
|
gui=true
|
||||||
gameType=economy
|
gameType=economy
|
||||||
worldId=1
|
worldId=1
|
||||||
country=6
|
country=0
|
||||||
activity=Default gameplay
|
activity=Default gameplay
|
||||||
members=true
|
members=true
|
||||||
pvp=false
|
pvp=false
|
||||||
quickChat=true
|
quickChat=true
|
||||||
lootshare=true
|
lootshare=true
|
||||||
msip=127.0.0.1
|
msip=127.0.0.1
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
name=Sparr0w
|
name=Crandor
|
||||||
beta=false
|
beta=false
|
||||||
sql=true
|
sql=true
|
||||||
devMode=true
|
devMode=true
|
||||||
gui=false
|
gui=false
|
||||||
gameType=economy
|
gameType=economy
|
||||||
worldId=2
|
worldId=2
|
||||||
country=6
|
country=0
|
||||||
activity=Default gameplay
|
activity=Default gameplay
|
||||||
members=true
|
members=true
|
||||||
pvp=false
|
pvp=false
|
||||||
quickChat=true
|
quickChat=true
|
||||||
lootshare=true
|
lootshare=true
|
||||||
msip=127.0.0.1
|
msip=127.0.0.1
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
name=Sparr0w
|
name=Crandor
|
||||||
beta=false
|
beta=false
|
||||||
sql=true
|
sql=true
|
||||||
devMode=false
|
devMode=true
|
||||||
gui=false
|
gui=false
|
||||||
gameType=economy
|
gameType=economy
|
||||||
worldId=3
|
worldId=3
|
||||||
country=6
|
country=0
|
||||||
activity=Default gameplay
|
activity=Default gameplay
|
||||||
members=true
|
members=true
|
||||||
pvp=true
|
pvp=false
|
||||||
quickChat=true
|
quickChat=true
|
||||||
lootshare=true
|
lootshare=true
|
||||||
msip=127.0.0.1
|
msip=127.0.0.1
|
||||||
|
|
@ -49,11 +49,12 @@ public final class ServerConstants {
|
||||||
* The administrators.
|
* The administrators.
|
||||||
*/
|
*/
|
||||||
public static final String[] ADMINISTRATORS = {
|
public static final String[] ADMINISTRATORS = {
|
||||||
"redsparr0w",
|
"ethan",
|
||||||
|
"austin",
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final String[] DATABASE_NAMES = {
|
public static final String[] DATABASE_NAMES = {
|
||||||
"server", "global"
|
"keldagr1_server", "keldagr1_global"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -305,8 +305,8 @@ public final class WorldPacketRepository {
|
||||||
String macAddress = buffer.getString();
|
String macAddress = buffer.getString();
|
||||||
String compName = buffer.getString();
|
String compName = buffer.getString();
|
||||||
String serial = buffer.getString();
|
String serial = buffer.getString();
|
||||||
int rights = buffer.getInt();
|
int rights = server.getInfo().getRevision() == 498 ? 0 : buffer.getInt();
|
||||||
int chatIcon = buffer.get();
|
int chatIcon = server.getInfo().getRevision() == 498 ? 0 : buffer.get();
|
||||||
UIDInfo uid = new UIDInfo(ipAddress, compName, macAddress, serial);
|
UIDInfo uid = new UIDInfo(ipAddress, compName, macAddress, serial);
|
||||||
PlayerSession player = new PlayerSession(username, password, new UIDInfo(ipAddress, compName, macAddress, serial));
|
PlayerSession player = new PlayerSession(username, password, new UIDInfo(ipAddress, compName, macAddress, serial));
|
||||||
if (WorldDatabase.isActivePlayer(username)) {
|
if (WorldDatabase.isActivePlayer(username)) {
|
||||||
|
|
@ -430,7 +430,7 @@ public final class WorldPacketRepository {
|
||||||
}
|
}
|
||||||
ClanRepository clan = ClanRepository.get(server, clanName);
|
ClanRepository clan = ClanRepository.get(server, clanName);
|
||||||
if (clan == null) {
|
if (clan == null) {
|
||||||
sendPlayerMessage(player, "The channel you tried to join does not exist (" + clanName + ").<br/>Try joining the main clan named 'Sparr0w'.:clan:");
|
sendPlayerMessage(player, "The channel you tried to join does not exist. Try joining the main clan named 'Keldagrim'.:clan:");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
clan.enter(player);
|
clan.enter(player);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public final class BankContainer extends Container {
|
||||||
/**
|
/**
|
||||||
* The bank container size.
|
* The bank container size.
|
||||||
*/
|
*/
|
||||||
public static final int SIZE = 800;
|
public static final int SIZE = 496;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum amount of bank tabs
|
* The maximum amount of bank tabs
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ public final class DialogueInterpreter {
|
||||||
player.getPacketDispatch().sendString(messages[i], 372, i + 1);
|
player.getPacketDispatch().sendString(messages[i], 372, i + 1);
|
||||||
}
|
}
|
||||||
player.getInterfaceManager().openChatbox(372);
|
player.getInterfaceManager().openChatbox(372);
|
||||||
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE) {
|
||||||
}
|
}
|
||||||
return player.getInterfaceManager().getChatbox();
|
return player.getInterfaceManager().getChatbox();
|
||||||
}
|
}
|
||||||
|
|
@ -497,7 +497,7 @@ public final class DialogueInterpreter {
|
||||||
player.getPacketDispatch().sendString(messages[i].toString().replace("@name", player.getUsername()), interfaceId, (i + 4));
|
player.getPacketDispatch().sendString(messages[i].toString().replace("@name", player.getUsername()), interfaceId, (i + 4));
|
||||||
}
|
}
|
||||||
player.getInterfaceManager().openChatbox(interfaceId);
|
player.getInterfaceManager().openChatbox(interfaceId);
|
||||||
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE) {
|
||||||
}
|
}
|
||||||
player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 3, false);
|
player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 3, false);
|
||||||
return player.getInterfaceManager().getChatbox();
|
return player.getInterfaceManager().getChatbox();
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,10 @@ public final class DropItemHandler {
|
||||||
if (player.getInventory().replace(null, item.getSlot()) == item) {
|
if (player.getInventory().replace(null, item.getSlot()) == item) {
|
||||||
item = item.getDropItem();
|
item = item.getDropItem();
|
||||||
player.getAudioManager().send(new Audio(item.getId() == 995 ? 10 : 2739, 1, 0));
|
player.getAudioManager().send(new Audio(item.getId() == 995 ? 10 : 2739, 1, 0));
|
||||||
GroundItemManager.create(item, player.getLocation(), player);
|
if (!player.getDetails().getRights().equals(Rights.ADMINISTRATOR) || !player.getAttribute("tut-island", false)) {
|
||||||
PlayerParser.dump(player);
|
GroundItemManager.create(item, player.getLocation(), player);
|
||||||
|
PlayerParser.dump(player);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
GroundItemManager.create(item, player.getLocation(), player).setDecayTime(99);
|
GroundItemManager.create(item, player.getLocation(), player).setDecayTime(99);
|
||||||
PlayerParser.dump(player);
|
PlayerParser.dump(player);
|
||||||
|
|
|
||||||
|
|
@ -173,9 +173,7 @@ public class CookingProperties {
|
||||||
public boolean cook(final Food food, final Player player, final GameObject object, final boolean burned) {
|
public boolean cook(final Food food, final Player player, final GameObject object, final boolean burned) {
|
||||||
if (player.getInventory().remove(food.getRaw())) {
|
if (player.getInventory().remove(food.getRaw())) {
|
||||||
if (!burned) {
|
if (!burned) {
|
||||||
Item item = food.getItem();
|
Perks.addDouble(player, food.getItem());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
} else {
|
} else {
|
||||||
player.getInventory().add(food.getBurnt());
|
player.getInventory().add(food.getBurnt());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package org.crandor.game.content.skill;
|
||||||
import org.crandor.game.content.global.SkillcapePerks;
|
import org.crandor.game.content.global.SkillcapePerks;
|
||||||
import org.crandor.game.content.global.tutorial.TutorialSession;
|
import org.crandor.game.content.global.tutorial.TutorialSession;
|
||||||
import org.crandor.game.content.holiday.HolidayEvent;
|
import org.crandor.game.content.holiday.HolidayEvent;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.Entity;
|
import org.crandor.game.node.entity.Entity;
|
||||||
import org.crandor.game.node.entity.combat.ImpactHandler;
|
import org.crandor.game.node.entity.combat.ImpactHandler;
|
||||||
import org.crandor.game.node.entity.npc.NPC;
|
import org.crandor.game.node.entity.npc.NPC;
|
||||||
|
|
@ -28,7 +28,7 @@ public final class Skills {
|
||||||
/**
|
/**
|
||||||
* Represents the constant modifier of experience.
|
* Represents the constant modifier of experience.
|
||||||
*/
|
*/
|
||||||
public static final double EXPERIENCE_MULTIPLIER = 20;
|
public static final double EXPERIENCE_MULTIPLIER = 35.3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum experience multiplier.
|
* The maximum experience multiplier.
|
||||||
|
|
@ -258,7 +258,7 @@ public final class Skills {
|
||||||
if (!(entity instanceof Player)) {
|
if (!(entity instanceof Player)) {
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
double mod = multiplyer ? (GlobalEvent.XP_FEVER.isActive() ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1;
|
double mod = multiplyer ? (GlobalEventManager.get().isActive("XPFever") ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1;
|
||||||
Player p = (Player) entity;
|
Player p = (Player) entity;
|
||||||
if (p.getIronmanManager().getMode() == IronmanMode.ULTIMATE) {
|
if (p.getIronmanManager().getMode() == IronmanMode.ULTIMATE) {
|
||||||
mod /= 4;
|
mod /= 4;
|
||||||
|
|
@ -267,13 +267,12 @@ public final class Skills {
|
||||||
}
|
}
|
||||||
//A boost for combat skills that are under level 65.
|
//A boost for combat skills that are under level 65.
|
||||||
if(entity instanceof Player && !this.hasLevel(slot, 65) && isCombat(slot)){
|
if(entity instanceof Player && !this.hasLevel(slot, 65) && isCombat(slot)){
|
||||||
mod *= 1.5;
|
mod *= 2.0;
|
||||||
}
|
}
|
||||||
//Grand Exchange region XP boost.
|
//Grand Exchange region XP boost.
|
||||||
if(entity.getViewport().getRegion().getRegionId() == 12598){
|
if(entity.getViewport().getRegion().getRegionId() == 12598){
|
||||||
mod += 1.5;
|
mod += 1.5;
|
||||||
}
|
}
|
||||||
// Pest control, XP halved during the game
|
|
||||||
if (entity.getViewport().getRegion().getRegionId() == 10536) {
|
if (entity.getViewport().getRegion().getRegionId() == 10536) {
|
||||||
mod *= .5;
|
mod *= .5;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,9 +100,7 @@ public final class DragonCraftPulse extends SkillPulse<Item> {
|
||||||
} else {
|
} else {
|
||||||
player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(ItemDefinition.forId(hide.getProduct()).getName().toLowerCase()) ? "an" : "a") + " " + ItemDefinition.forId(hide.getProduct()).getName().toLowerCase() + ".");
|
player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(ItemDefinition.forId(hide.getProduct()).getName().toLowerCase()) ? "an" : "a") + " " + ItemDefinition.forId(hide.getProduct()).getName().toLowerCase() + ".");
|
||||||
}
|
}
|
||||||
Item item = new Item(hide.getProduct());
|
Perks.addDouble(player, new Item(hide.getProduct()));
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
|
|
||||||
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, (hide.getExperience() * 0.35), true);
|
player.getSkills().addExperience(Skills.CRAFTING, (hide.getExperience() * 0.35), true);
|
||||||
|
|
|
||||||
|
|
@ -80,9 +80,7 @@ public final class HardCraftPulse extends SkillPulse<Item> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(new Item(LeatherCrafting.HARD_LEATHER))) {
|
if (player.getInventory().remove(new Item(LeatherCrafting.HARD_LEATHER))) {
|
||||||
Item item = new Item(1131);
|
Perks.addDouble(player, new Item(1131));
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, (35 * 0.35), true);
|
player.getSkills().addExperience(Skills.CRAFTING, (35 * 0.35), true);
|
||||||
player.sendMessage("Your golden needle rewards you with some extra XP!");
|
player.sendMessage("Your golden needle rewards you with some extra XP!");
|
||||||
|
|
|
||||||
|
|
@ -87,9 +87,7 @@ public final class SnakeSkinPulse extends SkillPulse<Item> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(new Item(6289, skin.getRequiredAmount()))) {
|
if (player.getInventory().remove(new Item(6289, skin.getRequiredAmount()))) {
|
||||||
Item item = skin.getProduct();
|
Perks.addDouble(player, skin.getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, (skin.getExperience() * 0.35), true);
|
player.getSkills().addExperience(Skills.CRAFTING, (skin.getExperience() * 0.35), true);
|
||||||
player.sendMessage("Your golden needle rewards you with some extra XP!");
|
player.sendMessage("Your golden needle rewards you with some extra XP!");
|
||||||
|
|
|
||||||
|
|
@ -98,9 +98,7 @@ public final class SoftCraftPulse extends SkillPulse<Item> {
|
||||||
} else {
|
} else {
|
||||||
player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(soft.getProduct().getName()) ? "an" : "a") + " " + soft.getProduct().getName().toLowerCase() + ".");
|
player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(soft.getProduct().getName()) ? "an" : "a") + " " + soft.getProduct().getName().toLowerCase() + ".");
|
||||||
}
|
}
|
||||||
Item item = soft.getProduct();
|
Perks.addDouble(player, soft.getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, (soft.getExperience() * 0.35), true);
|
player.getSkills().addExperience(Skills.CRAFTING, (soft.getExperience() * 0.35), true);
|
||||||
player.sendMessage("Your golden needle rewards you with some extra XP!");
|
player.sendMessage("Your golden needle rewards you with some extra XP!");
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,7 @@ public final class GemCutPulse extends SkillPulse<Item> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(gem.getUncut())) {
|
if (player.getInventory().remove(gem.getUncut())) {
|
||||||
final Item item = gem.getGem();
|
Perks.addDouble(player, gem.getGem());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, gem.getExp(), true);
|
player.getSkills().addExperience(Skills.CRAFTING, gem.getExp(), true);
|
||||||
}
|
}
|
||||||
amount--;
|
amount--;
|
||||||
|
|
|
||||||
|
|
@ -66,9 +66,7 @@ public final class JewelleryPulse extends SkillPulse<Item> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(getItems())) {
|
if (player.getInventory().remove(getItems())) {
|
||||||
final Item item = new Item(type.getSendItem());
|
Perks.addDouble(player, new Item(type.getSendItem()));
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, type.getExperience(), true);
|
player.getSkills().addExperience(Skills.CRAFTING, type.getExperience(), true);
|
||||||
}
|
}
|
||||||
amount--;
|
amount--;
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,7 @@ public final class FirePotteryPulse extends SkillPulse<Item> {
|
||||||
if (player.getLocation().getY() == 3408 && player.getAttribute("spun-bowl", false) && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 9)) {
|
if (player.getLocation().getY() == 3408 && player.getAttribute("spun-bowl", false) && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 9)) {
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 9, true);
|
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 9, true);
|
||||||
}
|
}
|
||||||
final Item item = pottery.getProduct();
|
Perks.addDouble(player, pottery.getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, pottery.getFireExp(), true);
|
player.getSkills().addExperience(Skills.CRAFTING, pottery.getFireExp(), true);
|
||||||
player.getPacketDispatch().sendMessage("You put the " + pottery.getUnfinished().getName().toLowerCase() + " in the oven.");
|
player.getPacketDispatch().sendMessage("You put the " + pottery.getUnfinished().getName().toLowerCase() + " in the oven.");
|
||||||
player.getPacketDispatch().sendMessage("You remove a " + pottery.getProduct().getName().toLowerCase() + " from the oven.");
|
player.getPacketDispatch().sendMessage("You remove a " + pottery.getProduct().getName().toLowerCase() + " from the oven.");
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,7 @@ public final class PotteryPulse extends SkillPulse<Item> {
|
||||||
if (pottery == PotteryItem.BOWL && player.getLocation().getX() == 3086) {
|
if (pottery == PotteryItem.BOWL && player.getLocation().getX() == 3086) {
|
||||||
player.setAttribute("spun-bowl", true);
|
player.setAttribute("spun-bowl", true);
|
||||||
}
|
}
|
||||||
final Item item = pottery.getUnfinished();
|
Perks.addDouble(player, pottery.getUnfinished());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, pottery.getExp(), true);
|
player.getSkills().addExperience(Skills.CRAFTING, pottery.getExp(), true);
|
||||||
player.getPacketDispatch().sendMessage("You make the soft clay into " + (StringUtils.isPlusN(pottery.getUnfinished().getName()) ? "an" : "a") + " " + pottery.getUnfinished().getName().toLowerCase() + ".");
|
player.getPacketDispatch().sendMessage("You make the soft clay into " + (StringUtils.isPlusN(pottery.getUnfinished().getName()) ? "an" : "a") + " " + pottery.getUnfinished().getName().toLowerCase() + ".");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,7 @@ public final class SpinningPulse extends SkillPulse<Item> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(new Item(type.getNeed(), 1))) {
|
if (player.getInventory().remove(new Item(type.getNeed(), 1))) {
|
||||||
final Item item = new Item(type.getProduct(), 1);
|
Perks.addDouble(player, new Item(type.getProduct(), 1));
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, type.getExp(), true);
|
player.getSkills().addExperience(Skills.CRAFTING, type.getExp(), true);
|
||||||
}
|
}
|
||||||
ammount--;
|
ammount--;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import org.crandor.game.content.global.tutorial.TutorialStage;
|
||||||
import org.crandor.game.content.skill.SkillPulse;
|
import org.crandor.game.content.skill.SkillPulse;
|
||||||
import org.crandor.game.content.skill.Skills;
|
import org.crandor.game.content.skill.Skills;
|
||||||
import org.crandor.game.content.skill.member.summoning.familiar.Forager;
|
import org.crandor.game.content.skill.member.summoning.familiar.Forager;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.npc.NPC;
|
import org.crandor.game.node.entity.npc.NPC;
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
import org.crandor.game.node.entity.player.info.portal.Perks;
|
import org.crandor.game.node.entity.player.info.portal.Perks;
|
||||||
|
|
@ -181,12 +181,10 @@ public final class FishingPulse extends SkillPulse<NPC> {
|
||||||
player.getSkillTasks().decreaseTask(player, SkillTasks.FTUNA2);
|
player.getSkillTasks().decreaseTask(player, SkillTasks.FTUNA2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GlobalEvent.PLENTY_OF_FISH.isActive())
|
if (GlobalEventManager.get().isActive("Plenty of fish"))
|
||||||
player.getInventory().add(fish.getItem());
|
player.getInventory().add(fish.getItem());
|
||||||
SkillingPets.checkPetDrop(player, SkillingPets.HERON);
|
SkillingPets.checkPetDrop(player, SkillingPets.HERON);
|
||||||
final Item item = fish.getItem();
|
Perks.addDouble(player, fish.getItem());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.FISHING, fish.getExperience(), true);
|
player.getSkills().addExperience(Skills.FISHING, fish.getExperience(), true);
|
||||||
message(2);
|
message(2);
|
||||||
if (TutorialSession.getExtension(player).getStage() == 13) {
|
if (TutorialSession.getExtension(player).getStage() == 13) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import org.crandor.game.content.global.tutorial.TutorialStage;
|
||||||
import org.crandor.game.content.skill.SkillPulse;
|
import org.crandor.game.content.skill.SkillPulse;
|
||||||
import org.crandor.game.content.skill.Skills;
|
import org.crandor.game.content.skill.Skills;
|
||||||
import org.crandor.game.content.skill.member.farming.wrapper.PatchWrapper;
|
import org.crandor.game.content.skill.member.farming.wrapper.PatchWrapper;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.impl.Projectile;
|
import org.crandor.game.node.entity.impl.Projectile;
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
import org.crandor.game.node.entity.player.info.portal.Perks;
|
import org.crandor.game.node.entity.player.info.portal.Perks;
|
||||||
|
|
@ -39,24 +39,9 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
|
||||||
private static final Item[] GEM_REWARDS = { new Item(1623), new Item(1621), new Item(1619), new Item(1617) };
|
private static final Item[] GEM_REWARDS = { new Item(1623), new Item(1621), new Item(1619), new Item(1617) };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the player is mining.
|
* If the player is mining.
|
||||||
*/
|
*/
|
||||||
private boolean isMining;
|
private boolean mining;
|
||||||
|
|
||||||
/**
|
|
||||||
* Is the player is mining essence.
|
|
||||||
*/
|
|
||||||
private boolean isMiningEssence;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Is the player is mining gems.
|
|
||||||
*/
|
|
||||||
private boolean isMiningGems;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Is the player is woodcutting.
|
|
||||||
*/
|
|
||||||
private boolean isWoodcutting;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The amount of ticks it takes to get a log.
|
* The amount of ticks it takes to get a log.
|
||||||
|
|
@ -86,21 +71,18 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
|
||||||
if (TutorialSession.getExtension(player).getStage() == 35) {
|
if (TutorialSession.getExtension(player).getStage() == 35) {
|
||||||
TutorialStage.load(player, 36, false);
|
TutorialStage.load(player, 36, false);
|
||||||
}
|
}
|
||||||
isMining = resource.getSkillId() == Skills.MINING;
|
mining = resource.getSkillId() == Skills.MINING;
|
||||||
isMiningEssence = resource == SkillingResource.RUNE_ESSENCE;
|
|
||||||
isMiningGems = resource.getReward() == SkillingResource.GEM_ROCK_0.getReward();
|
|
||||||
isWoodcutting = resource.getSkillId() == Skills.WOODCUTTING;
|
|
||||||
super.start();
|
super.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkRequirements() {
|
public boolean checkRequirements() {
|
||||||
if (player.getSkills().getLevel(resource.getSkillId()) < resource.getLevel()) {
|
if (player.getSkills().getLevel(resource.getSkillId()) < resource.getLevel()) {
|
||||||
player.getPacketDispatch().sendMessage("You need a " + Skills.SKILL_NAME[resource.getSkillId()] + " level of " + resource.getLevel() + " to " + (isMining ? "mine this rock." : "cut this tree."));
|
player.getPacketDispatch().sendMessage("You need a " + Skills.SKILL_NAME[resource.getSkillId()] + " level of " + resource.getLevel() + " to " + (mining ? "mine this rock." : "cut this tree."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (setTool() == null) {
|
if (setTool() == null) {
|
||||||
player.getPacketDispatch().sendMessage("You do not have a" + (isMining ? " pickaxe" : "n axe") + " to use.");
|
player.getPacketDispatch().sendMessage("You do not have a" + (mining ? " pickaxe" : "n axe") + " to use.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (player.getInventory().freeSlots() < 1) {
|
if (player.getInventory().freeSlots() < 1) {
|
||||||
|
|
@ -121,7 +103,7 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean reward() {
|
public boolean reward() {
|
||||||
if (++ticks % (isMiningEssence ? 3 : 4) != 0) {
|
if (++ticks % (resource == SkillingResource.RUNE_ESSENCE ? 3 : 4) != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (node.getId() == 10041) {
|
if (node.getId() == 10041) {
|
||||||
|
|
@ -142,42 +124,112 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
|
||||||
} else if (tutorialStage == 37 && node.getId() == 3042) {
|
} else if (tutorialStage == 37 && node.getId() == 3042) {
|
||||||
TutorialStage.load(player, 39, false);
|
TutorialStage.load(player, 39, false);
|
||||||
}
|
}
|
||||||
// If player is in donator zone
|
if (resource.getSkillId() == Skills.WOODCUTTING && player.getLocation().getRegionId() == 12102) {
|
||||||
if (isWoodcutting && player.getLocation().getRegionId() == 12102) {
|
|
||||||
player.getAntiMacroHandler().fireEvent("tree spirit");
|
player.getAntiMacroHandler().fireEvent("tree spirit");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// 20% chance to auto burn logs when using "inferno adze" item
|
if (resource.getSkillId() == Skills.WOODCUTTING && tool.getId() == 13661 && RandomFunction.random(100) < 30){
|
||||||
if (isWoodcutting && tool.getId() == 13661 && RandomFunction.random(100) < 20){
|
|
||||||
player.sendMessage("Your chop some logs. The heat of the inferno adze incinerates them.");
|
player.sendMessage("Your chop some logs. The heat of the inferno adze incinerates them.");
|
||||||
Projectile.create(player, null, 1776, 35, 30, 20, 25).transform(player, new Location(player.getLocation().getX() + 2, player.getLocation().getY()), true, 25, 25).send();
|
Projectile.create(player, null, 1776, 35, 30, 20, 25).transform(player, new Location(player.getLocation().getX() + 2, player.getLocation().getY()), true, 25, 25).send();
|
||||||
player.getSkills().addExperience(Skills.WOODCUTTING, resource.getExperience());
|
player.getSkills().addExperience(Skills.WOODCUTTING, resource.getExperience());
|
||||||
player.getSkills().addExperience(Skills.FIREMAKING, resource.getExperience());
|
player.getSkills().addExperience(Skills.FIREMAKING, resource.getExperience());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int reward = resource.getReward();
|
if (resource.getReward() > 0) {
|
||||||
if (reward > 0) {
|
int reward = resource.getReward();
|
||||||
reward = calculateReward(reward);
|
if (reward == 6333 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 4)) {
|
||||||
applyAchievementTask(reward);
|
player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 4, true);
|
||||||
// Give the player the items
|
} else if (reward == 6332 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 5)) {
|
||||||
int rewardAmount = calculateRewardAmount(reward);
|
player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 5, true);
|
||||||
Item item = new Item(reward, rewardAmount);
|
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
// Apply the experience points
|
|
||||||
double experience = calculateExperience(reward, rewardAmount);
|
|
||||||
player.getSkills().addExperience(resource.getSkillId(), experience, true);
|
|
||||||
// Send a message to the player
|
|
||||||
if (isMiningGems) {
|
|
||||||
String gemName = ItemDefinition.forId(reward).getName().toLowerCase();
|
|
||||||
player.sendMessage("You get " + (StringUtils.isPlusN(gemName) ? "an" : "a") + " " + gemName + ".");
|
|
||||||
} else if (resource == SkillingResource.DRAMEN_TREE) {
|
|
||||||
player.getPacketDispatch().sendMessage("You cut a branch from the Dramen tree.");
|
|
||||||
} else {
|
|
||||||
player.getPacketDispatch().sendMessage("You get some " + ItemDefinition.forId(reward).getName().toLowerCase() + ".");
|
|
||||||
}
|
}
|
||||||
// Calculate if the player should receive a bonus gem
|
if (reward == 440 && player.getLocation().withinDistance(new Location(3285, 3363, 0)) && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 2)) {
|
||||||
if (!isMiningEssence && isMining) {
|
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 2, true);
|
||||||
|
}
|
||||||
|
if (resource == SkillingResource.RUNE_ESSENCE && player.getSkills().getLevel(Skills.MINING) > 29) {
|
||||||
|
reward = 7936;
|
||||||
|
}
|
||||||
|
if (node.getId() == 24168 && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 6)) {
|
||||||
|
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 6, true);
|
||||||
|
}
|
||||||
|
if (reward == 440 && player.getViewport().getRegion().getId() == 13107 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(0, 8)) {
|
||||||
|
player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 0, 8, true);
|
||||||
|
}
|
||||||
|
if (reward == 1519 && player.getViewport().getRegion().getId() == 12338 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(1, 5)) {
|
||||||
|
player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 5, true);
|
||||||
|
}
|
||||||
|
if (reward != 3239 || RandomFunction.random(100) < 10) { // Hollow
|
||||||
|
// tree
|
||||||
|
// (bark)
|
||||||
|
if (resource == SkillingResource.SANDSTONE || resource == SkillingResource.GRANITE) {
|
||||||
|
int value = RandomFunction.randomize(resource == SkillingResource.GRANITE ? 3 : 4);
|
||||||
|
reward += value << 1;
|
||||||
|
player.getSkills().addExperience(resource.getSkillId(), value * 10, true);
|
||||||
|
}
|
||||||
|
player.getInventory().add(new Item(reward, (GlobalEventManager.get().isActive("Lumberjack") && ItemDefinition.forId(reward).getName().toLowerCase().contains("logs") ? 2 : 1)));
|
||||||
|
if (reward == SkillingResource.CLAY_0.getReward()) {
|
||||||
|
if (player.getEquipment().contains(11074, 1)) {
|
||||||
|
player.getSavedData().getGlobalData().incrementBraceletOfClay();
|
||||||
|
if (player.getSavedData().getGlobalData().getBraceletClayUses() >= 28) {
|
||||||
|
player.getSavedData().getGlobalData().setBraceletClayUses(0);
|
||||||
|
player.getEquipment().remove(new Item(11074));
|
||||||
|
player.sendMessage("Your bracelet of clay has disinegrated.");
|
||||||
|
}
|
||||||
|
reward = 1761;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean gem = false;
|
||||||
|
if (reward == SkillingResource.GEM_ROCK_0.getReward()) {
|
||||||
|
gem = true;
|
||||||
|
int random = RandomFunction.random(100);
|
||||||
|
List<Integer> gems = new ArrayList<>();
|
||||||
|
if (random < 2) {
|
||||||
|
gems.add(1617);
|
||||||
|
} else if (random < 25) {
|
||||||
|
gems.add(1619);
|
||||||
|
gems.add(1623);
|
||||||
|
gems.add(1621);
|
||||||
|
} else if (random < 40) {
|
||||||
|
gems.add(1629);
|
||||||
|
} else {
|
||||||
|
gems.add(1627);
|
||||||
|
gems.add(1625);
|
||||||
|
}
|
||||||
|
reward = gems.get(RandomFunction.random(gems.size()));
|
||||||
|
if (reward == 1629) {
|
||||||
|
if (!player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 11)) {
|
||||||
|
player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 11, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mining && player.getSavedData().getGlobalData().getStarSpriteDelay() > System.currentTimeMillis() && TimeUnit.MILLISECONDS.toMinutes(player.getSavedData().getGlobalData().getStarSpriteDelay() - System.currentTimeMillis()) >= 1425) {
|
||||||
|
player.getInventory().add(new Item(reward, 2));
|
||||||
|
} else if (mining && player.getInventory().freeSlots() != 0 && player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).getLevel() != -1 && player.getAchievementDiaryManager().checkMiningReward(reward) && RandomFunction.random(100) <= 10) {
|
||||||
|
player.getInventory().add(new Item(reward, 2));
|
||||||
|
player.sendMessage("Through the power of the varrock armour you receive double the reward.");
|
||||||
|
} else {
|
||||||
|
if (SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.MINING) && mining) {
|
||||||
|
if (RandomFunction.getRandom(100) <= 10) {
|
||||||
|
player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true);
|
||||||
|
player.getInventory().add(new Item(reward, 1), player);
|
||||||
|
player.sendNotificationMessage("Your " + player.getEquipment().get(EquipmentContainer.SLOT_CAPE).getName() + " allows you to obtain two ores from this rock!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SkillingPets.checkPetDrop(player, mining ? SkillingPets.GOLEM : SkillingPets.BEAVER);
|
||||||
|
Perks.addDouble(player, new Item(reward, 1));
|
||||||
|
}
|
||||||
|
if (gem) {
|
||||||
|
String gemName = ItemDefinition.forId(reward).getName().toLowerCase();
|
||||||
|
player.sendMessage("You get " + (StringUtils.isPlusN(gemName) ? "an" : "a") + " " + gemName + ".");
|
||||||
|
} else if (resource == SkillingResource.DRAMEN_TREE) {
|
||||||
|
player.getPacketDispatch().sendMessage("You cut a branch from the Dramen tree.");
|
||||||
|
} else {
|
||||||
|
player.getPacketDispatch().sendMessage("You get some " + ItemDefinition.forId(reward).getName().toLowerCase() + ".");
|
||||||
|
}
|
||||||
|
if (reward == 3239) {
|
||||||
|
player.getSkills().addExperience(resource.getSkillId(), 275.2, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (resource != SkillingResource.RUNE_ESSENCE && mining) {
|
||||||
int chance = 282;
|
int chance = 282;
|
||||||
boolean altered = false;
|
boolean altered = false;
|
||||||
if (player.getEquipment().getNew(EquipmentContainer.SLOT_RING).getId() == 2572) {
|
if (player.getEquipment().getNew(EquipmentContainer.SLOT_RING).getId() == 2572) {
|
||||||
|
|
@ -200,25 +252,28 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Calculate if the player should receive a bonus birds nest
|
if (mining && resource.getReward() == 444 && !player.getAchievementDiaryManager().hasCompletedTask(DiaryType.KARAMJA, 0, 2)) {
|
||||||
if (isWoodcutting) {
|
if (player.getLocation().getRegionId() == 10801 || player.getLocation().getRegionId() == 10802) {
|
||||||
int chance = 282;
|
player.getAchievementDiaryManager().updateTask(player, DiaryType.KARAMJA, 0, 2, true);
|
||||||
if (player.getDetails().getShop().hasPerk(Perks.BIRD_MAN)) {
|
|
||||||
chance /= 1.5;
|
|
||||||
}
|
|
||||||
if (SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.WOODCUTTING)) {
|
|
||||||
chance /= 1.88;
|
|
||||||
}
|
|
||||||
if (RandomFunction.random(chance) == 0) {
|
|
||||||
BirdNest.drop(player);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Tutorial stuff, maybe?
|
|
||||||
if (tutorialStage == 7) {
|
if (tutorialStage == 7) {
|
||||||
TutorialStage.load(player, 8, false);
|
TutorialStage.load(player, 8, false);
|
||||||
}
|
}
|
||||||
// not sure what this is exactly
|
if (!mining) {
|
||||||
|
int chance = 282;
|
||||||
|
if (player.getDetails().getShop().hasPerk(Perks.BIRD_MAN)) {
|
||||||
|
chance /= 1.5;
|
||||||
|
}
|
||||||
|
if (SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.WOODCUTTING)) {
|
||||||
|
chance /= 1.88;
|
||||||
|
}
|
||||||
|
if (RandomFunction.random(chance) == 0) {
|
||||||
|
BirdNest.drop(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true);
|
||||||
if (resource.getRespawnRate() != 0) {
|
if (resource.getRespawnRate() != 0) {
|
||||||
int charge = 1000 / resource.getRewardAmount();
|
int charge = 1000 / resource.getRewardAmount();
|
||||||
node.setCharge(node.getCharge() - RandomFunction.random(charge, charge << 2));
|
node.setCharge(node.getCharge() - RandomFunction.random(charge, charge << 2));
|
||||||
|
|
@ -242,165 +297,23 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if the has completed any achievements from their diary
|
|
||||||
*/
|
|
||||||
private void applyAchievementTask(int reward) {
|
|
||||||
if (reward == 6333 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 4)) {
|
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 4, true);
|
|
||||||
} else if (reward == 6332 && !player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 5)) {
|
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 5, true);
|
|
||||||
}
|
|
||||||
if (reward == 440 && player.getLocation().withinDistance(new Location(3285, 3363, 0)) && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 2)) {
|
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 2, true);
|
|
||||||
}
|
|
||||||
if (node.getId() == 24168 && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0, 6)) {
|
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 6, true);
|
|
||||||
}
|
|
||||||
if (reward == 440 && player.getViewport().getRegion().getId() == 13107 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(0, 8)) {
|
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 0, 8, true);
|
|
||||||
}
|
|
||||||
if (reward == 1519 && player.getViewport().getRegion().getId() == 12338 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(1, 5)) {
|
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 5, true);
|
|
||||||
}
|
|
||||||
if (reward == 444 && !player.getAchievementDiaryManager().hasCompletedTask(DiaryType.KARAMJA, 0, 2)) {
|
|
||||||
if (player.getLocation().getRegionId() == 10801 || player.getLocation().getRegionId() == 10802) {
|
|
||||||
player.getAchievementDiaryManager().updateTask(player, DiaryType.KARAMJA, 0, 2, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (reward == 1629) {
|
|
||||||
if (!player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).isComplete(1, 11)) {
|
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.KARAMJA).updateTask(player, 1, 11, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the player gets rewarded.
|
* Checks if the player gets rewarded.
|
||||||
* @return {@code True} if so.
|
* @return {@code True} if so.
|
||||||
*/
|
*/
|
||||||
private boolean checkReward() {
|
private boolean checkReward() {
|
||||||
int skill = isMining ? Skills.MINING : Skills.WOODCUTTING;
|
int skill = mining ? Skills.MINING : Skills.WOODCUTTING;
|
||||||
int level = 1 + player.getSkills().getLevel(skill) + player.getFamiliarManager().getBoost(skill);
|
int level = 1 + player.getSkills().getLevel(skill) + player.getFamiliarManager().getBoost(skill);
|
||||||
double hostRatio = Math.random() * (100.0 * resource.getRate());
|
double hostRatio = Math.random() * (100.0 * resource.getRate());
|
||||||
double clientRatio = Math.random() * ((level - resource.getLevel()) * (1.0 + tool.getRatio()));
|
double clientRatio = Math.random() * ((level - resource.getLevel()) * (1.0 + tool.getRatio()));
|
||||||
return hostRatio < clientRatio;
|
return hostRatio < clientRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int calculateReward(int reward) {
|
|
||||||
// If the player is mining sandstone or granite, then i'm not sure what this does?
|
|
||||||
if (resource == SkillingResource.SANDSTONE || resource == SkillingResource.GRANITE) {
|
|
||||||
int value = RandomFunction.randomize(resource == SkillingResource.GRANITE ? 3 : 4);
|
|
||||||
reward += value << 1;
|
|
||||||
player.getSkills().addExperience(resource.getSkillId(), value * 10, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the player is mining clay
|
|
||||||
else if (reward == SkillingResource.CLAY_0.getReward()) {
|
|
||||||
// Check if they have a bracelet of clay equiped
|
|
||||||
if (player.getEquipment().contains(11074, 1)) {
|
|
||||||
player.getSavedData().getGlobalData().incrementBraceletOfClay();
|
|
||||||
if (player.getSavedData().getGlobalData().getBraceletClayUses() >= 28) {
|
|
||||||
player.getSavedData().getGlobalData().setBraceletClayUses(0);
|
|
||||||
player.getEquipment().remove(new Item(11074));
|
|
||||||
player.sendMessage("Your bracelet of clay has disinegrated.");
|
|
||||||
}
|
|
||||||
// Give soft clay
|
|
||||||
reward = 1761;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert rune essence to pure essence if the player is above level 30 mining
|
|
||||||
else if (isMiningEssence && player.getSkills().getLevel(Skills.MINING) >= 30) {
|
|
||||||
reward = 7936;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate a random gem for the player
|
|
||||||
else if (isMiningGems) {
|
|
||||||
int random = RandomFunction.random(100);
|
|
||||||
List<Integer> gems = new ArrayList<>();
|
|
||||||
if (random < 2) {
|
|
||||||
gems.add(1617);
|
|
||||||
} else if (random < 25) {
|
|
||||||
gems.add(1619);
|
|
||||||
gems.add(1623);
|
|
||||||
gems.add(1621);
|
|
||||||
} else if (random < 40) {
|
|
||||||
gems.add(1629);
|
|
||||||
} else {
|
|
||||||
gems.add(1627);
|
|
||||||
gems.add(1625);
|
|
||||||
}
|
|
||||||
reward = gems.get(RandomFunction.random(gems.size()));
|
|
||||||
}
|
|
||||||
|
|
||||||
return reward;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculate the total amount of items the player should receive
|
|
||||||
* @return amount of items
|
|
||||||
*/
|
|
||||||
private int calculateRewardAmount(int reward) {
|
|
||||||
int amount = 1;
|
|
||||||
// Event doubles resources
|
|
||||||
if (GlobalEvent.HARVESTING_DOUBLES.isActive()) {
|
|
||||||
amount *= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isMining && !isMiningEssence) {
|
|
||||||
// Not sure what this bonus is for
|
|
||||||
if (isMining && player.getSavedData().getGlobalData().getStarSpriteDelay() > System.currentTimeMillis() && TimeUnit.MILLISECONDS.toMinutes(player.getSavedData().getGlobalData().getStarSpriteDelay() - System.currentTimeMillis()) >= 1425) {
|
|
||||||
amount += 1;
|
|
||||||
}
|
|
||||||
// Not sure what this bonus is for
|
|
||||||
else if (isMining && !isMiningEssence && player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).getLevel() != -1 && player.getAchievementDiaryManager().checkMiningReward(reward) && RandomFunction.random(100) <= 10) {
|
|
||||||
amount += 1;
|
|
||||||
player.sendMessage("Through the power of the varrock armour you receive an extra ore.");
|
|
||||||
}
|
|
||||||
// If the player has a skill cape, 10% chance of finding an extra item
|
|
||||||
else if (isMining && !isMiningEssence && SkillcapePerks.hasSkillcapePerk(player, SkillcapePerks.MINING) && RandomFunction.getRandom(100) <= 10) {
|
|
||||||
amount += 1;
|
|
||||||
player.sendNotificationMessage("Your " + player.getEquipment().get(EquipmentContainer.SLOT_CAPE).getName() + " allows you to obtain two ores from this rock!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3239: Hollow tree (bark) 10% chance of obtaining
|
|
||||||
if (reward == 3239 && RandomFunction.random(100) >= 10) {
|
|
||||||
amount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
SkillingPets.checkPetDrop(player, isMining ? SkillingPets.GOLEM : SkillingPets.BEAVER);
|
|
||||||
|
|
||||||
return amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculate the total experience the player should receive
|
|
||||||
* @return amount of experience
|
|
||||||
*/
|
|
||||||
private double calculateExperience(int reward, int amount) {
|
|
||||||
double experience = resource.getExperience();
|
|
||||||
|
|
||||||
// Bark
|
|
||||||
if (reward == 3239) {
|
|
||||||
// If we receive the item, give the full experience points otherwise give the base amount
|
|
||||||
if (amount >= 1) {
|
|
||||||
experience = 275.2;
|
|
||||||
} else {
|
|
||||||
amount = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return experience * amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void message(int type) {
|
public void message(int type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
player.getPacketDispatch().sendMessage("You swing your " + (isMining ? "pickaxe at the rock..." : "axe at the tree..."));
|
player.getPacketDispatch().sendMessage("You swing your " + (mining ? "pickaxe at the rock..." : "axe at the tree..."));
|
||||||
if (TutorialSession.getExtension(player).getStage() == 6) {
|
if (TutorialSession.getExtension(player).getStage() == 6) {
|
||||||
player.lock(7);
|
player.lock(7);
|
||||||
TutorialStage.load(player, 7, false);
|
TutorialStage.load(player, 7, false);
|
||||||
|
|
@ -413,7 +326,7 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
|
||||||
* Sets the tool used.
|
* Sets the tool used.
|
||||||
*/
|
*/
|
||||||
private SkillingTool setTool() {
|
private SkillingTool setTool() {
|
||||||
if (!isMining) {
|
if (!mining) {
|
||||||
tool = SkillingTool.getHatchet(player);
|
tool = SkillingTool.getHatchet(player);
|
||||||
} else {
|
} else {
|
||||||
tool = SkillingTool.getPickaxe(player);
|
tool = SkillingTool.getPickaxe(player);
|
||||||
|
|
|
||||||
|
|
@ -17,67 +17,17 @@ public enum SkillingResource {
|
||||||
/**
|
/**
|
||||||
* Standard tree (Woodcutting).
|
* Standard tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
STANDARD_TREE_1(1276, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
STANDARD_TREE_1(1276, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_2(1277, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING), STANDARD_TREE_3(1278, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_4(1279, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), STANDARD_TREE_5(1280, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING), STANDARD_TREE_6(1330, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), STANDARD_TREE_7(1331, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), STANDARD_TREE_8(1332, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING), STANDARD_TREE_9(2409, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_10(3033, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), STANDARD_TREE_11(3034, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING), STANDARD_TREE_12(3035, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1347, Skills.WOODCUTTING), STANDARD_TREE_13(3036, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1351, Skills.WOODCUTTING), STANDARD_TREE_14(3879, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), STANDARD_TREE_15(3881, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), STANDARD_TREE_16(3882, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING), STANDARD_TREE_17(3883, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3884, Skills.WOODCUTTING), STANDARD_TREE_18(10041, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_19(14308, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_20(14309, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_21(16264, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_22(16265, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_23(30132, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_24(30133, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_25(37477, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING), STANDARD_TREE_26(37478, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING), STANDARD_TREE_27(37652, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING),
|
||||||
STANDARD_TREE_2(1277, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_3(1278, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_4(1279, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_5(1280, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1343, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_6(1330, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_7(1331, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_8(1332, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1341, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_9(2409, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_10(3033, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_11(3034, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1345, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_12(3035, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1347, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_13(3036, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1351, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_14(3879, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_15(3881, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_16(3882, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3880, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_17(3883, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 3884, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_18(10041, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_19(14308, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_20(14309, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_21(16264, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_22(16265, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_23(30132, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_24(30133, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_25(37477, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 1342, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_26(37478, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING),
|
|
||||||
STANDARD_TREE_27(37652, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "tree", null, 37653, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fruit trees.
|
* Fruit trees.
|
||||||
*/
|
*/
|
||||||
APPLE_TREE(7941, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
APPLE_TREE(7941, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), BANANA_TREE(8000, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), ORANGE_TREE(8057, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), CURRY_TREE(8026, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), PINEAPPLE_TREE(7972, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), PAPAYA_TREE(8111, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true), PALM_TREE(8084, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
||||||
BANANA_TREE(8000, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
|
||||||
ORANGE_TREE(8057, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
|
||||||
CURRY_TREE(8026, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
|
||||||
PINEAPPLE_TREE(7972, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
|
||||||
PAPAYA_TREE(8111, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
|
||||||
PALM_TREE(8084, 1, 0.05, 50 | 100 << 16, 25.0, -1, 1, "tree", null, 37653, Skills.WOODCUTTING, true),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dead tree (Woodcutting).
|
* Dead tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
DEAD_TREE_1(1282, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING),
|
DEAD_TREE_1(1282, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_2(1283, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_3(1284, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1348, Skills.WOODCUTTING), DEAD_TREE_4(1285, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1349, Skills.WOODCUTTING), DEAD_TREE_5(1286, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING), DEAD_TREE_6(1289, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_7(1290, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1354, Skills.WOODCUTTING), DEAD_TREE_8(1291, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 23054, Skills.WOODCUTTING), DEAD_TREE_9(1365, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1352, Skills.WOODCUTTING), DEAD_TREE_10(1383, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING), DEAD_TREE_11(1384, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1359, Skills.WOODCUTTING), DEAD_TREE_12(5902, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_13(5903, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_14(5904, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_15(32294, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING), DEAD_TREE_16(37481, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING), DEAD_TREE_17(37482, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING), DEAD_TREE_18(37483, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING), DEAD_TREE_19(24168, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dying tree", null, 24169, Skills.WOODCUTTING),
|
||||||
DEAD_TREE_2(1283, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_3(1284, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1348, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_4(1285, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1349, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_5(1286, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_6(1289, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_7(1290, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1354, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_8(1291, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 23054, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_9(1365, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1352, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_10(1383, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_11(1384, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1359, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_12(5902, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_13(5903, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_14(5904, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_15(32294, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1353, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_16(37481, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1347, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_17(37482, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1351, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_18(37483, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dead tree", null, 1358, Skills.WOODCUTTING),
|
|
||||||
DEAD_TREE_19(24168, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "dying tree", null, 24169, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dramen tree (Woodcutting/Lost city quest).
|
* Dramen tree (Woodcutting/Lost city quest).
|
||||||
|
|
@ -87,22 +37,14 @@ public enum SkillingResource {
|
||||||
/**
|
/**
|
||||||
* Evergreen (Woodcutting).
|
* Evergreen (Woodcutting).
|
||||||
*/
|
*/
|
||||||
EVERGREEN_1(1315, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1342, Skills.WOODCUTTING),
|
EVERGREEN_1(1315, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1342, Skills.WOODCUTTING), EVERGREEN_2(1316, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), EVERGREEN_3(1318, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING), EVERGREEN_4(1319, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING),
|
||||||
EVERGREEN_2(1316, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING),
|
|
||||||
EVERGREEN_3(1318, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING),
|
|
||||||
EVERGREEN_4(1319, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 1, "evergreen", null, 1355, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Jungle tree (Woodcutting).
|
* Jungle tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
JUNGLE_TREE_1(2887, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING),
|
JUNGLE_TREE_1(2887, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_2(2889, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_3(2890, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_4(4818, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING), JUNGLE_TREE_5(4820, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING),
|
||||||
JUNGLE_TREE_2(2889, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING),
|
|
||||||
JUNGLE_TREE_3(2890, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING),
|
|
||||||
JUNGLE_TREE_4(4818, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING),
|
|
||||||
JUNGLE_TREE_5(4820, 1, 0.05, 50 | 100 << 16, 25.0, 1511, 2, "jungle tree", null, 0, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
JUNGLE_BUSH_1(2892, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2894, Skills.WOODCUTTING),
|
JUNGLE_BUSH_1(2892, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2894, Skills.WOODCUTTING), JUNGLE_BUSH_2(2893, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2895, Skills.WOODCUTTING),
|
||||||
JUNGLE_BUSH_2(2893, 1, 0.15, 50 | 100 << 16, 100.0, 1511, 1, "jungle bush", null, 2895, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Achey tree (Woodcutting).
|
* Achey tree (Woodcutting).
|
||||||
|
|
@ -112,39 +54,27 @@ public enum SkillingResource {
|
||||||
/**
|
/**
|
||||||
* Oak tree (Woodcutting).
|
* Oak tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
OAK_TREE_1(1281, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING),
|
OAK_TREE_1(1281, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING), OAK_TREE_2(3037, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1357, Skills.WOODCUTTING), OAK_TREE_3(37479, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING), OAK_TREE_4(8467, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING, true),
|
||||||
OAK_TREE_2(3037, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1357, Skills.WOODCUTTING),
|
|
||||||
OAK_TREE_3(37479, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING),
|
|
||||||
OAK_TREE_4(8467, 15, 0.15, 14 | 22 << 16, 37.5, 1521, 10, "oak tree", null, 1356, Skills.WOODCUTTING, true),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Willow tree (Woodcutting).
|
* Willow tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
WILLOW_TREE_1(1308, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING),
|
WILLOW_TREE_1(1308, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING), WILLOW_TREE_2(5551, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), WILLOW_TREE_3(5552, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), WILLOW_TREE_4(5553, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING), WILLOW_TREE_5(37480, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING), WILLOW_TREE_6(8488, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING, true),
|
||||||
WILLOW_TREE_2(5551, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING),
|
|
||||||
WILLOW_TREE_3(5552, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING),
|
|
||||||
WILLOW_TREE_4(5553, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 5554, Skills.WOODCUTTING),
|
|
||||||
WILLOW_TREE_5(37480, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING),
|
|
||||||
WILLOW_TREE_6(8488, 30, 0.3, 14 | 22 << 16, 67.8, 1519, 20, "willow tree", null, 7399, Skills.WOODCUTTING, true),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Teak (Woodcutting).
|
* Teak (Woodcutting).
|
||||||
*/
|
*/
|
||||||
TEAK_1(9036, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING),
|
TEAK_1(9036, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING), TEAK_2(15062, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING),
|
||||||
TEAK_2(15062, 35, 0.7, 35 | 60 << 16, 85.0, 6333, 25, "teak", null, 9037, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maple tree (Woodcutting).
|
* Maple tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
MAPLE_TREE_1(1307, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING),
|
MAPLE_TREE_1(1307, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING), MAPLE_TREE_2(4674, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING), MAPLE_TREE_3(8444, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING, true),
|
||||||
MAPLE_TREE_2(4674, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING),
|
|
||||||
MAPLE_TREE_3(8444, 45, 0.65, 58 | 100 << 16, 100.0, 1517, 30, "maple tree", null, 7400, Skills.WOODCUTTING, true),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hollow tree (Woodcutting).
|
* Hollow tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
HOLLOW_TREE_1(2289, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 2310, Skills.WOODCUTTING),
|
HOLLOW_TREE_1(2289, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 2310, Skills.WOODCUTTING), HOLLOW_TREE_2(4060, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 4061, Skills.WOODCUTTING),
|
||||||
HOLLOW_TREE_2(4060, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 4061, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mahogany (Woodcutting).
|
* Mahogany (Woodcutting).
|
||||||
|
|
@ -159,111 +89,29 @@ public enum SkillingResource {
|
||||||
/**
|
/**
|
||||||
* Eucalyptus tree (Woodcutting).
|
* Eucalyptus tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
EUCALYPTUS_1(28951, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28954, Skills.WOODCUTTING),
|
EUCALYPTUS_1(28951, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28954, Skills.WOODCUTTING), EUCALYPTUS_2(28952, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28955, Skills.WOODCUTTING), EUCALYPTUS_3(28953, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28956, Skills.WOODCUTTING),
|
||||||
EUCALYPTUS_2(28952, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28955, Skills.WOODCUTTING),
|
|
||||||
EUCALYPTUS_3(28953, 58, 0.77, 80 | 140 << 16, 165.0, 12581, 35, "eucalyptus tree", null, 28956, Skills.WOODCUTTING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Yew tree (Woodcutting).
|
* Yew tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
YEW(1309, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING),
|
YEW(1309, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING), YEW_1(8513, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING, true),
|
||||||
YEW_1(8513, 60, 0.8, 100 | 162 << 16, 175.0, 1515, 40, "yew", null, 7402, Skills.WOODCUTTING, true),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Magic tree (Woodcutting).
|
* Magic tree (Woodcutting).
|
||||||
*/
|
*/
|
||||||
MAGIC_TREE_1(1306, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 7401, Skills.WOODCUTTING),
|
MAGIC_TREE_1(1306, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 7401, Skills.WOODCUTTING), MAGIC_TREE_2(37823, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING), MAGIC_TREE_3(8409, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING, true),
|
||||||
MAGIC_TREE_2(37823, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING),
|
|
||||||
MAGIC_TREE_3(8409, 75, 0.9, 200 | 317 << 16, 250.0, 1513, 50, "magic tree", null, 37824, Skills.WOODCUTTING, true),
|
|
||||||
|
|
||||||
CURSED_MAGIC_TREE(37821, 82, 0.95, 200 | 317 << 16, 275.0, 1513, 50, "magic tree", null, 37822, Skills.WOODCUTTING),
|
CURSED_MAGIC_TREE(37821, 82, 0.95, 200 | 317 << 16, 275.0, 1513, 50, "magic tree", null, 37822, Skills.WOODCUTTING),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copper ore (Mining).
|
* Copper ore (Mining).
|
||||||
*/
|
*/
|
||||||
COPPER_ORE_0(2090, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING),
|
COPPER_ORE_0(2090, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), COPPER_ORE_1(2091, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 452, Skills.MINING), COPPER_ORE_2(4976, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4994, Skills.MINING), COPPER_ORE_3(4977, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4995, Skills.MINING), COPPER_ORE_4(4978, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4996, Skills.MINING), COPPER_ORE_5(9710, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 18954, Skills.MINING), COPPER_ORE_6(9709, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32448, Skills.MINING), COPPER_ORE_7(9708, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32447, Skills.MINING), COPPER_ORE_8(11960, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11555, Skills.MINING), COPPER_ORE_9(11961, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11556, Skills.MINING), COPPER_ORE_10(11962, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11557, Skills.MINING), COPPER_ORE_11(11937, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11553, Skills.MINING), COPPER_ORE_12(11936, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11552, Skills.MINING), COPPER_ORE_13(11938, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11554, Skills.MINING), COPPER_ORE_14(12746, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING), COPPER_ORE_15(14906, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14894, Skills.MINING), COPPER_ORE_16(14907, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14895, Skills.MINING), COPPER_ORE_17(20448, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING), COPPER_ORE_18(20451, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING), COPPER_ORE_19(20446, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20443, Skills.MINING), COPPER_ORE_20(20447, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20444, Skills.MINING), COPPER_ORE_21(20408, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20407, Skills.MINING), COPPER_ORE_22(18993, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19005, Skills.MINING), COPPER_ORE_23(18992, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19004, Skills.MINING), COPPER_ORE_24(19007, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19016, Skills.MINING), COPPER_ORE_25(19006, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19021, Skills.MINING), COPPER_ORE_26(18991, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19003, Skills.MINING), COPPER_ORE_27(19008, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19017, Skills.MINING), COPPER_ORE_28(21285, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING), COPPER_ORE_29(21284, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING), COPPER_ORE_30(21286, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING), COPPER_ORE_31(29231, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29219, Skills.MINING), COPPER_ORE_32(29230, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29218, Skills.MINING), COPPER_ORE_33(29232, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29220, Skills.MINING), COPPER_ORE_34(31082, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING), COPPER_ORE_35(31081, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING), COPPER_ORE_36(31080, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), COPPER_ORE_37(37647, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING), COPPER_ORE_38(37646, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING), COPPER_ORE_39(37645, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), COPPER_ORE_40(37637, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING), COPPER_ORE_41(37688, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING), COPPER_ORE_42(37686, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING), COPPER_ORE_43(37687, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING), COPPER_ORE_44(3042, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING),
|
||||||
COPPER_ORE_1(2091, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 452, Skills.MINING),
|
|
||||||
COPPER_ORE_2(4976, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4994, Skills.MINING),
|
|
||||||
COPPER_ORE_3(4977, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4995, Skills.MINING),
|
|
||||||
COPPER_ORE_4(4978, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 4996, Skills.MINING),
|
|
||||||
COPPER_ORE_5(9710, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 18954, Skills.MINING),
|
|
||||||
COPPER_ORE_6(9709, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32448, Skills.MINING),
|
|
||||||
COPPER_ORE_7(9708, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 32447, Skills.MINING),
|
|
||||||
COPPER_ORE_8(11960, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11555, Skills.MINING),
|
|
||||||
COPPER_ORE_9(11961, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11556, Skills.MINING),
|
|
||||||
COPPER_ORE_10(11962, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11557, Skills.MINING),
|
|
||||||
COPPER_ORE_11(11937, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11553, Skills.MINING),
|
|
||||||
COPPER_ORE_12(11936, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11552, Skills.MINING),
|
|
||||||
COPPER_ORE_13(11938, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 11554, Skills.MINING),
|
|
||||||
COPPER_ORE_14(12746, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING),
|
|
||||||
COPPER_ORE_15(14906, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14894, Skills.MINING),
|
|
||||||
COPPER_ORE_16(14907, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 14895, Skills.MINING),
|
|
||||||
COPPER_ORE_17(20448, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING),
|
|
||||||
COPPER_ORE_18(20451, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20445, Skills.MINING),
|
|
||||||
COPPER_ORE_19(20446, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20443, Skills.MINING),
|
|
||||||
COPPER_ORE_20(20447, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20444, Skills.MINING),
|
|
||||||
COPPER_ORE_21(20408, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 20407, Skills.MINING),
|
|
||||||
COPPER_ORE_22(18993, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19005, Skills.MINING),
|
|
||||||
COPPER_ORE_23(18992, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19004, Skills.MINING),
|
|
||||||
COPPER_ORE_24(19007, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19016, Skills.MINING),
|
|
||||||
COPPER_ORE_25(19006, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19021, Skills.MINING),
|
|
||||||
COPPER_ORE_26(18991, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19003, Skills.MINING),
|
|
||||||
COPPER_ORE_27(19008, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 19017, Skills.MINING),
|
|
||||||
COPPER_ORE_28(21285, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING),
|
|
||||||
COPPER_ORE_29(21284, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING),
|
|
||||||
COPPER_ORE_30(21286, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING),
|
|
||||||
COPPER_ORE_31(29231, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29219, Skills.MINING),
|
|
||||||
COPPER_ORE_32(29230, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29218, Skills.MINING),
|
|
||||||
COPPER_ORE_33(29232, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 29220, Skills.MINING),
|
|
||||||
COPPER_ORE_34(31082, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING),
|
|
||||||
COPPER_ORE_35(31081, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING),
|
|
||||||
COPPER_ORE_36(31080, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING),
|
|
||||||
COPPER_ORE_37(37647, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37650, Skills.MINING),
|
|
||||||
COPPER_ORE_38(37646, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37649, Skills.MINING),
|
|
||||||
COPPER_ORE_39(37645, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING),
|
|
||||||
COPPER_ORE_40(37637, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 37639, Skills.MINING),
|
|
||||||
COPPER_ORE_41(37688, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21298, Skills.MINING),
|
|
||||||
COPPER_ORE_42(37686, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21296, Skills.MINING),
|
|
||||||
COPPER_ORE_43(37687, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 21297, Skills.MINING),
|
|
||||||
COPPER_ORE_44(3042, 1, 0.05, 4 | 8 << 16, 17.5, 436, 1, "copper rocks", null, 450, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tin ore (Mining).
|
* Tin ore (Mining).
|
||||||
*/
|
*/
|
||||||
TIN_ORE_0(2094, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING),
|
TIN_ORE_0(2094, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING), TIN_ORE_1(2095, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 452, Skills.MINING), TIN_ORE_2(3043, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING), TIN_ORE_3(4979, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4994, Skills.MINING), TIN_ORE_4(4980, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4995, Skills.MINING), TIN_ORE_5(4981, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4996, Skills.MINING), TIN_ORE_6(11957, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11555, Skills.MINING), TIN_ORE_7(11958, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11556, Skills.MINING), TIN_ORE_8(11959, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11557, Skills.MINING), TIN_ORE_9(11934, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11553, Skills.MINING), TIN_ORE_10(11935, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11554, Skills.MINING), TIN_ORE_11(11933, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11552, Skills.MINING), TIN_ORE_12(14902, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14894, Skills.MINING), TIN_ORE_13(14903, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14895, Skills.MINING), TIN_ORE_14(18995, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19004, Skills.MINING), TIN_ORE_15(18994, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19003, Skills.MINING), TIN_ORE_16(18996, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19005, Skills.MINING), TIN_ORE_17(19025, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19016, Skills.MINING), TIN_ORE_18(19024, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19021, Skills.MINING), TIN_ORE_19(19026, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19017, Skills.MINING), TIN_ORE_20(21293, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21296, Skills.MINING), TIN_ORE_21(21295, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING), TIN_ORE_22(21294, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21297, Skills.MINING), TIN_ORE_23(29227, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29218, Skills.MINING), TIN_ORE_24(29229, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29220, Skills.MINING), TIN_ORE_25(29228, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29219, Skills.MINING), TIN_ORE_26(31079, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING), TIN_ORE_27(31078, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING), TIN_ORE_28(31077, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), TIN_ORE_29(37644, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING), TIN_ORE_30(37643, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING), TIN_ORE_31(37642, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), TIN_ORE_32(37638, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING), TIN_ORE_33(37685, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING),
|
||||||
TIN_ORE_1(2095, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 452, Skills.MINING),
|
|
||||||
TIN_ORE_2(3043, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 450, Skills.MINING),
|
|
||||||
TIN_ORE_3(4979, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4994, Skills.MINING),
|
|
||||||
TIN_ORE_4(4980, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4995, Skills.MINING),
|
|
||||||
TIN_ORE_5(4981, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 4996, Skills.MINING),
|
|
||||||
TIN_ORE_6(11957, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11555, Skills.MINING),
|
|
||||||
TIN_ORE_7(11958, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11556, Skills.MINING),
|
|
||||||
TIN_ORE_8(11959, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11557, Skills.MINING),
|
|
||||||
TIN_ORE_9(11934, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11553, Skills.MINING),
|
|
||||||
TIN_ORE_10(11935, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11554, Skills.MINING),
|
|
||||||
TIN_ORE_11(11933, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 11552, Skills.MINING),
|
|
||||||
TIN_ORE_12(14902, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14894, Skills.MINING),
|
|
||||||
TIN_ORE_13(14903, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 14895, Skills.MINING),
|
|
||||||
TIN_ORE_14(18995, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19004, Skills.MINING),
|
|
||||||
TIN_ORE_15(18994, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19003, Skills.MINING),
|
|
||||||
TIN_ORE_16(18996, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19005, Skills.MINING),
|
|
||||||
TIN_ORE_17(19025, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19016, Skills.MINING),
|
|
||||||
TIN_ORE_18(19024, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19021, Skills.MINING),
|
|
||||||
TIN_ORE_19(19026, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 19017, Skills.MINING),
|
|
||||||
TIN_ORE_20(21293, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21296, Skills.MINING),
|
|
||||||
TIN_ORE_21(21295, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING),
|
|
||||||
TIN_ORE_22(21294, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21297, Skills.MINING),
|
|
||||||
TIN_ORE_23(29227, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29218, Skills.MINING),
|
|
||||||
TIN_ORE_24(29229, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29220, Skills.MINING),
|
|
||||||
TIN_ORE_25(29228, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 29219, Skills.MINING),
|
|
||||||
TIN_ORE_26(31079, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING),
|
|
||||||
TIN_ORE_27(31078, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING),
|
|
||||||
TIN_ORE_28(31077, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING),
|
|
||||||
TIN_ORE_29(37644, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37650, Skills.MINING),
|
|
||||||
TIN_ORE_30(37643, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37649, Skills.MINING),
|
|
||||||
TIN_ORE_31(37642, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING),
|
|
||||||
TIN_ORE_32(37638, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 37639, Skills.MINING),
|
|
||||||
TIN_ORE_33(37685, 1, 0.05, 4 | 8 << 16, 17.5, 438, 1, "tin rocks", null, 21298, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rune/Pure essence (Mining).
|
* Rune/Pure essence (Mining).
|
||||||
|
|
@ -273,192 +121,33 @@ public enum SkillingResource {
|
||||||
/**
|
/**
|
||||||
* Clay (Mining).
|
* Clay (Mining).
|
||||||
*/
|
*/
|
||||||
CLAY_0(2109, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 452, Skills.MINING),
|
CLAY_0(2109, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 452, Skills.MINING), CLAY_1(2108, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 450, Skills.MINING), CLAY_2(9712, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32448, Skills.MINING), CLAY_3(9713, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 18954, Skills.MINING), CLAY_4(9711, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32447, Skills.MINING), CLAY_5(10949, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 10945, Skills.MINING), CLAY_6(11190, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21297, Skills.MINING), CLAY_7(11191, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21298, Skills.MINING), CLAY_8(11189, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21296, Skills.MINING), CLAY_9(12942, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4995, Skills.MINING), CLAY_10(12943, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4996, Skills.MINING), CLAY_11(12941, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4994, Skills.MINING), CLAY_12(14904, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14894, Skills.MINING), CLAY_13(14905, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14895, Skills.MINING), CLAY_14(15505, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11557, Skills.MINING), CLAY_15(15504, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11556, Skills.MINING), CLAY_16(15503, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11555, Skills.MINING), CLAY_17(20449, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20443, Skills.MINING), CLAY_18(20450, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20444, Skills.MINING), CLAY_19(20409, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20407, Skills.MINING), CLAY_20(32429, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33400, Skills.MINING), CLAY_21(32430, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33401, Skills.MINING), CLAY_22(32431, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33402, Skills.MINING), CLAY_23(31062, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37639, Skills.MINING), CLAY_24(31063, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37649, Skills.MINING), CLAY_25(31064, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37650, Skills.MINING),
|
||||||
CLAY_1(2108, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 450, Skills.MINING),
|
|
||||||
CLAY_2(9712, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32448, Skills.MINING),
|
|
||||||
CLAY_3(9713, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 18954, Skills.MINING),
|
|
||||||
CLAY_4(9711, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 32447, Skills.MINING),
|
|
||||||
CLAY_5(10949, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 10945, Skills.MINING),
|
|
||||||
CLAY_6(11190, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21297, Skills.MINING),
|
|
||||||
CLAY_7(11191, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21298, Skills.MINING),
|
|
||||||
CLAY_8(11189, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 21296, Skills.MINING),
|
|
||||||
CLAY_9(12942, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4995, Skills.MINING),
|
|
||||||
CLAY_10(12943, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4996, Skills.MINING),
|
|
||||||
CLAY_11(12941, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 4994, Skills.MINING),
|
|
||||||
CLAY_12(14904, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14894, Skills.MINING),
|
|
||||||
CLAY_13(14905, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 14895, Skills.MINING),
|
|
||||||
CLAY_14(15505, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11557, Skills.MINING),
|
|
||||||
CLAY_15(15504, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11556, Skills.MINING),
|
|
||||||
CLAY_16(15503, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 11555, Skills.MINING),
|
|
||||||
CLAY_17(20449, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20443, Skills.MINING),
|
|
||||||
CLAY_18(20450, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20444, Skills.MINING),
|
|
||||||
CLAY_19(20409, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 20407, Skills.MINING),
|
|
||||||
CLAY_20(32429, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33400, Skills.MINING),
|
|
||||||
CLAY_21(32430, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33401, Skills.MINING),
|
|
||||||
CLAY_22(32431, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 33402, Skills.MINING),
|
|
||||||
CLAY_23(31062, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37639, Skills.MINING),
|
|
||||||
CLAY_24(31063, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37649, Skills.MINING),
|
|
||||||
CLAY_25(31064, 1, 0.1, 1 | 1 << 16, 5.0, 434, 1, "clay", null, 37650, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limestone.
|
* Limestone.
|
||||||
*/
|
*/
|
||||||
LIMESTONE_0(4027, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12564, Skills.MINING),
|
LIMESTONE_0(4027, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12564, Skills.MINING), LIMESTONE_1(4028, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12565, Skills.MINING), LIMESTONE_2(4029, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12566, Skills.MINING), LIMESTONE_3(4030, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12567, Skills.MINING),
|
||||||
LIMESTONE_1(4028, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12565, Skills.MINING),
|
|
||||||
LIMESTONE_2(4029, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12566, Skills.MINING),
|
|
||||||
LIMESTONE_3(4030, 10, 0.2, 10 | 20 << 16, 26.5, 3211, 1, "limestone", null, 12567, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blurite ore.
|
* Blurite ore.
|
||||||
*/
|
*/
|
||||||
BLURITE_ORE_0(33220, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33222, Skills.MINING),
|
BLURITE_ORE_0(33220, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33222, Skills.MINING), BLURITE_ORE_1(33221, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33223, Skills.MINING),
|
||||||
BLURITE_ORE_1(33221, 10, 0.2, 10 | 20 << 16, 17.5, 668, 1, "blurite rocks", null, 33223, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iron ore.
|
* Iron ore.
|
||||||
*/
|
*/
|
||||||
IRON_ORE_0(2092, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING),
|
IRON_ORE_0(2092, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING), IRON_ORE_1(2093, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 452, Skills.MINING), IRON_ORE_2(4982, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4994, Skills.MINING), IRON_ORE_3(4983, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4995, Skills.MINING), IRON_ORE_4(4984, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4996, Skills.MINING), IRON_ORE_5(6943, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING), IRON_ORE_6(6944, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING), IRON_ORE_7(9718, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING), IRON_ORE_8(9719, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 18954, Skills.MINING), IRON_ORE_9(9717, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING), IRON_ORE_10(11956, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11557, Skills.MINING), IRON_ORE_11(11954, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11555, Skills.MINING), IRON_ORE_12(11955, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11556, Skills.MINING), IRON_ORE_13(14914, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING), IRON_ORE_14(14913, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING), IRON_ORE_15(14858, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25373, Skills.MINING), IRON_ORE_16(14857, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25372, Skills.MINING), IRON_ORE_17(14856, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25371, Skills.MINING), IRON_ORE_18(14900, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING), IRON_ORE_19(14901, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING), IRON_ORE_20(20423, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20444, Skills.MINING), IRON_ORE_21(20422, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20443, Skills.MINING), IRON_ORE_22(20425, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20407, Skills.MINING), IRON_ORE_23(20424, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20445, Skills.MINING), IRON_ORE_24(19002, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19005, Skills.MINING), IRON_ORE_25(19001, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19004, Skills.MINING), IRON_ORE_26(19000, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19003, Skills.MINING), IRON_ORE_27(21281, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING), IRON_ORE_28(21283, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21298, Skills.MINING), IRON_ORE_29(21282, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING), IRON_ORE_30(29221, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29218, Skills.MINING), IRON_ORE_31(29223, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29220, Skills.MINING), IRON_ORE_32(29222, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29219, Skills.MINING), IRON_ORE_33(32441, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33400, Skills.MINING), IRON_ORE_34(32443, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33402, Skills.MINING), IRON_ORE_35(32442, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33401, Skills.MINING), IRON_ORE_36(32452, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING), IRON_ORE_37(32451, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING), IRON_ORE_38(31073, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37650, Skills.MINING), IRON_ORE_39(31072, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37649, Skills.MINING), IRON_ORE_40(31071, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37639, Skills.MINING), IRON_ORE_41(37307, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11552, Skills.MINING), IRON_ORE_42(37309, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11554, Skills.MINING), IRON_ORE_43(37308, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11553, Skills.MINING),
|
||||||
IRON_ORE_1(2093, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 452, Skills.MINING),
|
|
||||||
IRON_ORE_2(4982, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4994, Skills.MINING),
|
|
||||||
IRON_ORE_3(4983, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4995, Skills.MINING),
|
|
||||||
IRON_ORE_4(4984, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 4996, Skills.MINING),
|
|
||||||
IRON_ORE_5(6943, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING),
|
|
||||||
IRON_ORE_6(6944, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING),
|
|
||||||
IRON_ORE_7(9718, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING),
|
|
||||||
IRON_ORE_8(9719, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 18954, Skills.MINING),
|
|
||||||
IRON_ORE_9(9717, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING),
|
|
||||||
IRON_ORE_10(11956, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11557, Skills.MINING),
|
|
||||||
IRON_ORE_11(11954, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11555, Skills.MINING),
|
|
||||||
IRON_ORE_12(11955, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11556, Skills.MINING),
|
|
||||||
IRON_ORE_13(14914, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING),
|
|
||||||
IRON_ORE_14(14913, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING),
|
|
||||||
IRON_ORE_15(14858, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25373, Skills.MINING),
|
|
||||||
IRON_ORE_16(14857, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25372, Skills.MINING),
|
|
||||||
IRON_ORE_17(14856, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 25371, Skills.MINING),
|
|
||||||
IRON_ORE_18(14900, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14894, Skills.MINING),
|
|
||||||
IRON_ORE_19(14901, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 14895, Skills.MINING),
|
|
||||||
IRON_ORE_20(20423, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20444, Skills.MINING),
|
|
||||||
IRON_ORE_21(20422, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20443, Skills.MINING),
|
|
||||||
IRON_ORE_22(20425, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20407, Skills.MINING),
|
|
||||||
IRON_ORE_23(20424, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 20445, Skills.MINING),
|
|
||||||
IRON_ORE_24(19002, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19005, Skills.MINING),
|
|
||||||
IRON_ORE_25(19001, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19004, Skills.MINING),
|
|
||||||
IRON_ORE_26(19000, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 19003, Skills.MINING),
|
|
||||||
IRON_ORE_27(21281, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21296, Skills.MINING),
|
|
||||||
IRON_ORE_28(21283, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21298, Skills.MINING),
|
|
||||||
IRON_ORE_29(21282, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 21297, Skills.MINING),
|
|
||||||
IRON_ORE_30(29221, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29218, Skills.MINING),
|
|
||||||
IRON_ORE_31(29223, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29220, Skills.MINING),
|
|
||||||
IRON_ORE_32(29222, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 29219, Skills.MINING),
|
|
||||||
IRON_ORE_33(32441, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33400, Skills.MINING),
|
|
||||||
IRON_ORE_34(32443, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33402, Skills.MINING),
|
|
||||||
IRON_ORE_35(32442, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 33401, Skills.MINING),
|
|
||||||
IRON_ORE_36(32452, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32448, Skills.MINING),
|
|
||||||
IRON_ORE_37(32451, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 32447, Skills.MINING),
|
|
||||||
IRON_ORE_38(31073, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37650, Skills.MINING),
|
|
||||||
IRON_ORE_39(31072, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37649, Skills.MINING),
|
|
||||||
IRON_ORE_40(31071, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 37639, Skills.MINING),
|
|
||||||
IRON_ORE_41(37307, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11552, Skills.MINING),
|
|
||||||
IRON_ORE_42(37309, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11554, Skills.MINING),
|
|
||||||
IRON_ORE_43(37308, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 11553, Skills.MINING),
|
|
||||||
IRON_ORE_49(42034, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING),
|
IRON_ORE_49(42034, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Silver ore.
|
* Silver ore.
|
||||||
*/
|
*/
|
||||||
SILVER_ORE_0(2101, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 452, Skills.MINING),
|
SILVER_ORE_0(2101, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 452, Skills.MINING), SILVER_ORE_1(2100, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 450, Skills.MINING), SILVER_ORE_2(6945, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING), SILVER_ORE_3(6946, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING), SILVER_ORE_4(9716, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING), SILVER_ORE_5(9714, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING), SILVER_ORE_6(9715, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING), SILVER_ORE_7(11188, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21298, Skills.MINING), SILVER_ORE_8(11186, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING), SILVER_ORE_9(11187, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING), SILVER_ORE_10(15581, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14834, Skills.MINING), SILVER_ORE_11(15580, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14833, Skills.MINING), SILVER_ORE_12(15579, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14832, Skills.MINING), SILVER_ORE_13(16998, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING), SILVER_ORE_14(16999, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING), SILVER_ORE_15(17007, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING), SILVER_ORE_16(17000, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING), SILVER_ORE_17(17009, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING), SILVER_ORE_18(17008, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING), SILVER_ORE_19(17385, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING), SILVER_ORE_20(17387, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING), SILVER_ORE_21(17386, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING), SILVER_ORE_22(29225, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29219, Skills.MINING), SILVER_ORE_23(29224, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29218, Skills.MINING), SILVER_ORE_24(29226, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29220, Skills.MINING), SILVER_ORE_25(32445, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33401, Skills.MINING), SILVER_ORE_26(32444, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33400, Skills.MINING), SILVER_ORE_27(32446, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33402, Skills.MINING), SILVER_ORE_28(31075, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37649, Skills.MINING), SILVER_ORE_29(31074, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37639, Skills.MINING), SILVER_ORE_30(31076, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37650, Skills.MINING), SILVER_ORE_31(37305, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11553, Skills.MINING), SILVER_ORE_32(37304, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING), SILVER_ORE_33(37306, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11554, Skills.MINING), SILVER_ORE_34(37670, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING), SILVER_ORE_35(11948, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11555, Skills.MINING), SILVER_ORE_36(11949, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11556, Skills.MINING), SILVER_ORE_37(11950, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11557, Skills.MINING),
|
||||||
SILVER_ORE_1(2100, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 450, Skills.MINING),
|
|
||||||
SILVER_ORE_2(6945, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING),
|
|
||||||
SILVER_ORE_3(6946, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING),
|
|
||||||
SILVER_ORE_4(9716, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING),
|
|
||||||
SILVER_ORE_5(9714, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING),
|
|
||||||
SILVER_ORE_6(9715, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING),
|
|
||||||
SILVER_ORE_7(11188, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21298, Skills.MINING),
|
|
||||||
SILVER_ORE_8(11186, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21296, Skills.MINING),
|
|
||||||
SILVER_ORE_9(11187, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 21297, Skills.MINING),
|
|
||||||
SILVER_ORE_10(15581, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14834, Skills.MINING),
|
|
||||||
SILVER_ORE_11(15580, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14833, Skills.MINING),
|
|
||||||
SILVER_ORE_12(15579, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14832, Skills.MINING),
|
|
||||||
SILVER_ORE_13(16998, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING),
|
|
||||||
SILVER_ORE_14(16999, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING),
|
|
||||||
SILVER_ORE_15(17007, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14915, Skills.MINING),
|
|
||||||
SILVER_ORE_16(17000, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING),
|
|
||||||
SILVER_ORE_17(17009, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 31061, Skills.MINING),
|
|
||||||
SILVER_ORE_18(17008, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 14916, Skills.MINING),
|
|
||||||
SILVER_ORE_19(17385, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32447, Skills.MINING),
|
|
||||||
SILVER_ORE_20(17387, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 18954, Skills.MINING),
|
|
||||||
SILVER_ORE_21(17386, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 32448, Skills.MINING),
|
|
||||||
SILVER_ORE_22(29225, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29219, Skills.MINING),
|
|
||||||
SILVER_ORE_23(29224, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29218, Skills.MINING),
|
|
||||||
SILVER_ORE_24(29226, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 29220, Skills.MINING),
|
|
||||||
SILVER_ORE_25(32445, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33401, Skills.MINING),
|
|
||||||
SILVER_ORE_26(32444, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33400, Skills.MINING),
|
|
||||||
SILVER_ORE_27(32446, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 33402, Skills.MINING),
|
|
||||||
SILVER_ORE_28(31075, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37649, Skills.MINING),
|
|
||||||
SILVER_ORE_29(31074, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37639, Skills.MINING),
|
|
||||||
SILVER_ORE_30(31076, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 37650, Skills.MINING),
|
|
||||||
SILVER_ORE_31(37305, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11553, Skills.MINING),
|
|
||||||
SILVER_ORE_32(37304, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING),
|
|
||||||
SILVER_ORE_33(37306, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11554, Skills.MINING),
|
|
||||||
SILVER_ORE_34(37670, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11552, Skills.MINING),
|
|
||||||
SILVER_ORE_35(11948, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11555, Skills.MINING),
|
|
||||||
SILVER_ORE_36(11949, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11556, Skills.MINING),
|
|
||||||
SILVER_ORE_37(11950, 20, 0.3, 100 | 200 << 16, 40.0, 442, 1, "silver rocks", null, 11557, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Coal.
|
* Coal.
|
||||||
*/
|
*/
|
||||||
COAL_0(2097, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING),
|
COAL_0(2097, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING), COAL_1(2096, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING), COAL_2(4985, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4994, Skills.MINING), COAL_3(4986, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4995, Skills.MINING), COAL_4(4987, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4996, Skills.MINING), COAL_5(4676, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING), COAL_6(10948, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 10944, Skills.MINING), COAL_7(11964, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11556, Skills.MINING), COAL_8(11965, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11557, Skills.MINING), COAL_9(11963, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11555, Skills.MINING), COAL_10(11932, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11554, Skills.MINING), COAL_11(11930, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11552, Skills.MINING), COAL_12(11931, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11553, Skills.MINING), COAL_13(15246, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15249, Skills.MINING), COAL_14(15247, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15250, Skills.MINING), COAL_15(15248, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15251, Skills.MINING), COAL_16(14852, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25373, Skills.MINING), COAL_17(14851, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25372, Skills.MINING), COAL_18(14850, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25371, Skills.MINING), COAL_19(20410, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20443, Skills.MINING), COAL_20(20411, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20444, Skills.MINING), COAL_21(20412, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20445, Skills.MINING), COAL_22(20413, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20407, Skills.MINING), COAL_23(18999, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19005, Skills.MINING), COAL_24(18998, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19004, Skills.MINING), COAL_25(18997, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19003, Skills.MINING), COAL_26(21287, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), COAL_27(21289, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), COAL_28(21288, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), COAL_29(23565, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), COAL_30(23564, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), COAL_31(23563, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING), COAL_32(29215, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29218, Skills.MINING), COAL_33(29217, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29220, Skills.MINING), COAL_34(29216, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29219, Skills.MINING), COAL_35(32426, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33400, Skills.MINING), COAL_36(32427, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33401, Skills.MINING), COAL_37(32428, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33402, Skills.MINING), COAL_38(32450, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32448, Skills.MINING), COAL_39(32449, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32447, Skills.MINING), COAL_40(31068, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37639, Skills.MINING), COAL_41(31069, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37649, Skills.MINING), COAL_42(31070, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37650, Skills.MINING), COAL_43(31168, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14833, Skills.MINING), COAL_44(31169, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14834, Skills.MINING), COAL_45(31167, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14832, Skills.MINING), COAL_46(37699, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING), COAL_47(37698, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING), COAL_48(37697, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING),
|
||||||
COAL_1(2096, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING),
|
|
||||||
COAL_2(4985, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4994, Skills.MINING),
|
|
||||||
COAL_3(4986, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4995, Skills.MINING),
|
|
||||||
COAL_4(4987, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 4996, Skills.MINING),
|
|
||||||
COAL_5(4676, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 450, Skills.MINING),
|
|
||||||
COAL_6(10948, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 10944, Skills.MINING),
|
|
||||||
COAL_7(11964, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11556, Skills.MINING),
|
|
||||||
COAL_8(11965, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11557, Skills.MINING),
|
|
||||||
COAL_9(11963, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11555, Skills.MINING),
|
|
||||||
COAL_10(11932, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11554, Skills.MINING),
|
|
||||||
COAL_11(11930, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11552, Skills.MINING),
|
|
||||||
COAL_12(11931, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 11553, Skills.MINING),
|
|
||||||
COAL_13(15246, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15249, Skills.MINING),
|
|
||||||
COAL_14(15247, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15250, Skills.MINING),
|
|
||||||
COAL_15(15248, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 15251, Skills.MINING),
|
|
||||||
COAL_16(14852, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25373, Skills.MINING),
|
|
||||||
COAL_17(14851, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25372, Skills.MINING),
|
|
||||||
COAL_18(14850, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 25371, Skills.MINING),
|
|
||||||
COAL_19(20410, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20443, Skills.MINING),
|
|
||||||
COAL_20(20411, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20444, Skills.MINING),
|
|
||||||
COAL_21(20412, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20445, Skills.MINING),
|
|
||||||
COAL_22(20413, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 20407, Skills.MINING),
|
|
||||||
COAL_23(18999, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19005, Skills.MINING),
|
|
||||||
COAL_24(18998, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19004, Skills.MINING),
|
|
||||||
COAL_25(18997, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 19003, Skills.MINING),
|
|
||||||
COAL_26(21287, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING),
|
|
||||||
COAL_27(21289, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING),
|
|
||||||
COAL_28(21288, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING),
|
|
||||||
COAL_29(23565, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING),
|
|
||||||
COAL_30(23564, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING),
|
|
||||||
COAL_31(23563, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING),
|
|
||||||
COAL_32(29215, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29218, Skills.MINING),
|
|
||||||
COAL_33(29217, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29220, Skills.MINING),
|
|
||||||
COAL_34(29216, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 29219, Skills.MINING),
|
|
||||||
COAL_35(32426, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33400, Skills.MINING),
|
|
||||||
COAL_36(32427, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33401, Skills.MINING),
|
|
||||||
COAL_37(32428, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 33402, Skills.MINING),
|
|
||||||
COAL_38(32450, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32448, Skills.MINING),
|
|
||||||
COAL_39(32449, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 32447, Skills.MINING),
|
|
||||||
COAL_40(31068, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37639, Skills.MINING),
|
|
||||||
COAL_41(31069, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37649, Skills.MINING),
|
|
||||||
COAL_42(31070, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 37650, Skills.MINING),
|
|
||||||
COAL_43(31168, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14833, Skills.MINING),
|
|
||||||
COAL_44(31169, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14834, Skills.MINING),
|
|
||||||
COAL_45(31167, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 14832, Skills.MINING),
|
|
||||||
COAL_46(37699, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21298, Skills.MINING),
|
|
||||||
COAL_47(37698, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21297, Skills.MINING),
|
|
||||||
COAL_48(37697, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 21296, Skills.MINING),
|
|
||||||
COAL_49(42035, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING),
|
COAL_49(42035, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sandstone.
|
* Sandstone.
|
||||||
*/
|
*/
|
||||||
|
|
@ -467,43 +156,8 @@ public enum SkillingResource {
|
||||||
/**
|
/**
|
||||||
* Gold ore.
|
* Gold ore.
|
||||||
*/
|
*/
|
||||||
GOLD_ORE_0(2099, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING),
|
GOLD_ORE_0(2099, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING), GOLD_ORE_1(2098, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 450, Skills.MINING), GOLD_ORE_2(2611, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), GOLD_ORE_3(2610, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), GOLD_ORE_4(2609, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), GOLD_ORE_5(9722, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 18954, Skills.MINING), GOLD_ORE_6(9720, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32447, Skills.MINING), GOLD_ORE_7(9721, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32448, Skills.MINING), GOLD_ORE_8(11183, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), GOLD_ORE_9(11184, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), GOLD_ORE_10(11185, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), GOLD_ORE_11(11952, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11556, Skills.MINING), GOLD_ORE_12(11953, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11557, Skills.MINING), GOLD_ORE_13(11951, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11555, Skills.MINING), GOLD_ORE_14(15578, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14834, Skills.MINING), GOLD_ORE_15(15577, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14833, Skills.MINING), GOLD_ORE_16(15576, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14832, Skills.MINING), GOLD_ORE_17(17002, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14916, Skills.MINING), GOLD_ORE_18(17003, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 31061, Skills.MINING), GOLD_ORE_19(17001, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14915, Skills.MINING), GOLD_ORE_20(21291, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING), GOLD_ORE_21(21290, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING), GOLD_ORE_22(21292, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING), GOLD_ORE_23(32433, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33401, Skills.MINING), GOLD_ORE_24(32432, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33400, Skills.MINING), GOLD_ORE_25(32434, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33402, Skills.MINING), GOLD_ORE_26(31065, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37639, Skills.MINING), GOLD_ORE_27(31066, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37649, Skills.MINING), GOLD_ORE_28(31067, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37650, Skills.MINING), GOLD_ORE_29(37311, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11553, Skills.MINING), GOLD_ORE_30(37310, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11552, Skills.MINING), GOLD_ORE_31(37312, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11554, Skills.MINING), GOLD_ORE_32(37471, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15249, Skills.MINING), GOLD_ORE_33(37473, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15251, Skills.MINING), GOLD_ORE_34(37472, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15250, Skills.MINING),
|
||||||
GOLD_ORE_1(2098, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 450, Skills.MINING),
|
GOLD_ORE_49(42033, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING),
|
||||||
GOLD_ORE_2(2611, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING),
|
|
||||||
GOLD_ORE_3(2610, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING),
|
|
||||||
GOLD_ORE_4(2609, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING),
|
|
||||||
GOLD_ORE_5(9722, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 18954, Skills.MINING),
|
|
||||||
GOLD_ORE_6(9720, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32447, Skills.MINING),
|
|
||||||
GOLD_ORE_7(9721, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 32448, Skills.MINING),
|
|
||||||
GOLD_ORE_8(11183, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING),
|
|
||||||
GOLD_ORE_9(11184, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING),
|
|
||||||
GOLD_ORE_10(11185, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING),
|
|
||||||
GOLD_ORE_11(11952, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11556, Skills.MINING),
|
|
||||||
GOLD_ORE_12(11953, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11557, Skills.MINING),
|
|
||||||
GOLD_ORE_13(11951, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11555, Skills.MINING),
|
|
||||||
GOLD_ORE_14(15578, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14834, Skills.MINING),
|
|
||||||
GOLD_ORE_15(15577, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14833, Skills.MINING),
|
|
||||||
GOLD_ORE_16(15576, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14832, Skills.MINING),
|
|
||||||
GOLD_ORE_17(17002, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14916, Skills.MINING),
|
|
||||||
GOLD_ORE_18(17003, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 31061, Skills.MINING),
|
|
||||||
GOLD_ORE_19(17001, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 14915, Skills.MINING),
|
|
||||||
GOLD_ORE_20(21291, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21297, Skills.MINING),
|
|
||||||
GOLD_ORE_21(21290, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21296, Skills.MINING),
|
|
||||||
GOLD_ORE_22(21292, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 21298, Skills.MINING),
|
|
||||||
GOLD_ORE_23(32433, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33401, Skills.MINING),
|
|
||||||
GOLD_ORE_24(32432, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33400, Skills.MINING),
|
|
||||||
GOLD_ORE_25(32434, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 33402, Skills.MINING),
|
|
||||||
GOLD_ORE_26(31065, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37639, Skills.MINING),
|
|
||||||
GOLD_ORE_27(31066, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37649, Skills.MINING),
|
|
||||||
GOLD_ORE_28(31067, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 37650, Skills.MINING),
|
|
||||||
GOLD_ORE_29(37311, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11553, Skills.MINING),
|
|
||||||
GOLD_ORE_30(37310, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11552, Skills.MINING),
|
|
||||||
GOLD_ORE_31(37312, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 11554, Skills.MINING),
|
|
||||||
GOLD_ORE_32(37471, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15249, Skills.MINING),
|
|
||||||
GOLD_ORE_33(37473, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15251, Skills.MINING),
|
|
||||||
GOLD_ORE_34(37472, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 15250, Skills.MINING),
|
|
||||||
GOLD_ORE_49(42033, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Granite.
|
* Granite.
|
||||||
*/
|
*/
|
||||||
|
|
@ -517,51 +171,8 @@ public enum SkillingResource {
|
||||||
/**
|
/**
|
||||||
* Mithril ore.
|
* Mithril ore.
|
||||||
*/
|
*/
|
||||||
MITHRIL_ORE_0(2103, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING),
|
MITHRIL_ORE_0(2103, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING), MITHRIL_ORE_1(2102, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING), MITHRIL_ORE_2(4988, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4994, Skills.MINING), MITHRIL_ORE_3(4989, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4995, Skills.MINING), MITHRIL_ORE_4(4990, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4996, Skills.MINING), MITHRIL_ORE_5(11943, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11553, Skills.MINING), MITHRIL_ORE_6(11942, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11552, Skills.MINING), MITHRIL_ORE_7(11945, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11555, Skills.MINING), MITHRIL_ORE_8(11944, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11554, Skills.MINING), MITHRIL_ORE_9(11947, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11557, Skills.MINING), MITHRIL_ORE_10(11946, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11556, Skills.MINING), MITHRIL_ORE_11(14855, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25373, Skills.MINING), MITHRIL_ORE_12(14854, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25372, Skills.MINING), MITHRIL_ORE_13(14853, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25371, Skills.MINING), MITHRIL_ORE_14(16687, 50, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING), MITHRIL_ORE_15(20421, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20407, Skills.MINING), MITHRIL_ORE_16(20420, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20445, Skills.MINING), MITHRIL_ORE_17(20419, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20444, Skills.MINING), MITHRIL_ORE_18(20418, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20443, Skills.MINING), MITHRIL_ORE_19(19012, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19021, Skills.MINING), MITHRIL_ORE_20(19013, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19016, Skills.MINING), MITHRIL_ORE_21(19014, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19017, Skills.MINING), MITHRIL_ORE_22(21278, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING), MITHRIL_ORE_23(21279, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING), MITHRIL_ORE_24(21280, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING), MITHRIL_ORE_25(25369, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10586, Skills.MINING), MITHRIL_ORE_26(25368, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10585, Skills.MINING), MITHRIL_ORE_27(25370, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10587, Skills.MINING), MITHRIL_ORE_28(29236, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29218, Skills.MINING), MITHRIL_ORE_29(29237, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29219, Skills.MINING), MITHRIL_ORE_30(29238, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29220, Skills.MINING), MITHRIL_ORE_31(32439, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33401, Skills.MINING), MITHRIL_ORE_32(32438, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33400, Skills.MINING), MITHRIL_ORE_33(32440, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33402, Skills.MINING), MITHRIL_ORE_34(31087, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37649, Skills.MINING), MITHRIL_ORE_35(31086, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37639, Skills.MINING), MITHRIL_ORE_36(31088, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37650, Skills.MINING), MITHRIL_ORE_37(31170, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14832, Skills.MINING), MITHRIL_ORE_38(31171, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14833, Skills.MINING), MITHRIL_ORE_39(31172, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14834, Skills.MINING), MITHRIL_ORE_40(37692, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING), MITHRIL_ORE_41(37693, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING), MITHRIL_ORE_42(37694, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING),
|
||||||
MITHRIL_ORE_1(2102, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING),
|
|
||||||
MITHRIL_ORE_2(4988, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4994, Skills.MINING),
|
|
||||||
MITHRIL_ORE_3(4989, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4995, Skills.MINING),
|
|
||||||
MITHRIL_ORE_4(4990, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 4996, Skills.MINING),
|
|
||||||
MITHRIL_ORE_5(11943, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11553, Skills.MINING),
|
|
||||||
MITHRIL_ORE_6(11942, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11552, Skills.MINING),
|
|
||||||
MITHRIL_ORE_7(11945, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11555, Skills.MINING),
|
|
||||||
MITHRIL_ORE_8(11944, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11554, Skills.MINING),
|
|
||||||
MITHRIL_ORE_9(11947, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11557, Skills.MINING),
|
|
||||||
MITHRIL_ORE_10(11946, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 11556, Skills.MINING),
|
|
||||||
MITHRIL_ORE_11(14855, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25373, Skills.MINING),
|
|
||||||
MITHRIL_ORE_12(14854, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25372, Skills.MINING),
|
|
||||||
MITHRIL_ORE_13(14853, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 25371, Skills.MINING),
|
|
||||||
MITHRIL_ORE_14(16687, 50, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 450, Skills.MINING),
|
|
||||||
MITHRIL_ORE_15(20421, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20407, Skills.MINING),
|
|
||||||
MITHRIL_ORE_16(20420, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20445, Skills.MINING),
|
|
||||||
MITHRIL_ORE_17(20419, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20444, Skills.MINING),
|
|
||||||
MITHRIL_ORE_18(20418, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 20443, Skills.MINING),
|
|
||||||
MITHRIL_ORE_19(19012, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19021, Skills.MINING),
|
|
||||||
MITHRIL_ORE_20(19013, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19016, Skills.MINING),
|
|
||||||
MITHRIL_ORE_21(19014, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 19017, Skills.MINING),
|
|
||||||
MITHRIL_ORE_22(21278, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING),
|
|
||||||
MITHRIL_ORE_23(21279, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING),
|
|
||||||
MITHRIL_ORE_24(21280, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING),
|
|
||||||
MITHRIL_ORE_25(25369, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10586, Skills.MINING),
|
|
||||||
MITHRIL_ORE_26(25368, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10585, Skills.MINING),
|
|
||||||
MITHRIL_ORE_27(25370, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 10587, Skills.MINING),
|
|
||||||
MITHRIL_ORE_28(29236, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29218, Skills.MINING),
|
|
||||||
MITHRIL_ORE_29(29237, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29219, Skills.MINING),
|
|
||||||
MITHRIL_ORE_30(29238, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 29220, Skills.MINING),
|
|
||||||
MITHRIL_ORE_31(32439, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33401, Skills.MINING),
|
|
||||||
MITHRIL_ORE_32(32438, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33400, Skills.MINING),
|
|
||||||
MITHRIL_ORE_33(32440, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 33402, Skills.MINING),
|
|
||||||
MITHRIL_ORE_34(31087, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37649, Skills.MINING),
|
|
||||||
MITHRIL_ORE_35(31086, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37639, Skills.MINING),
|
|
||||||
MITHRIL_ORE_36(31088, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 37650, Skills.MINING),
|
|
||||||
MITHRIL_ORE_37(31170, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14832, Skills.MINING),
|
|
||||||
MITHRIL_ORE_38(31171, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14833, Skills.MINING),
|
|
||||||
MITHRIL_ORE_39(31172, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 14834, Skills.MINING),
|
|
||||||
MITHRIL_ORE_40(37692, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21296, Skills.MINING),
|
|
||||||
MITHRIL_ORE_41(37693, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21297, Skills.MINING),
|
|
||||||
MITHRIL_ORE_42(37694, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 21298, Skills.MINING),
|
|
||||||
MITHRIL_ORE_49(42036, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING),
|
MITHRIL_ORE_49(42036, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adamantite ore.
|
* Adamantite ore.
|
||||||
*/
|
*/
|
||||||
|
|
@ -570,8 +181,8 @@ public enum SkillingResource {
|
||||||
ADAMANTITE_ORE_2(4991, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4994, Skills.MINING),
|
ADAMANTITE_ORE_2(4991, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4994, Skills.MINING),
|
||||||
ADAMANTITE_ORE_3(4992, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4995, Skills.MINING),
|
ADAMANTITE_ORE_3(4992, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4995, Skills.MINING),
|
||||||
ADAMANTITE_ORE_4(4993, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4996, Skills.MINING),
|
ADAMANTITE_ORE_4(4993, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 4996, Skills.MINING),
|
||||||
ADAMANTITE_ORE_5(11941, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11554, Skills.MINING),
|
ADAMANTITE_ORE_5(11941, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11554, Skills.MINING)
|
||||||
ADAMANTITE_ORE_6(11940, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11553, Skills.MINING),
|
, ADAMANTITE_ORE_6(11940, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11553, Skills.MINING),
|
||||||
ADAMANTITE_ORE_7(11939, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11552, Skills.MINING),
|
ADAMANTITE_ORE_7(11939, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 11552, Skills.MINING),
|
||||||
ADAMANTITE_ORE_8(14864, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 25373, Skills.MINING),
|
ADAMANTITE_ORE_8(14864, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 25373, Skills.MINING),
|
||||||
ADAMANTITE_ORE_9(14863, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 25372, Skills.MINING),
|
ADAMANTITE_ORE_9(14863, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 25372, Skills.MINING),
|
||||||
|
|
@ -606,32 +217,16 @@ public enum SkillingResource {
|
||||||
ADAMANTITE_ORE_38(37691, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 21298, Skills.MINING),
|
ADAMANTITE_ORE_38(37691, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 21298, Skills.MINING),
|
||||||
ADAMANTITE_ORE_39(42037, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 452, Skills.MINING),
|
ADAMANTITE_ORE_39(42037, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 452, Skills.MINING),
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runite ore.
|
* Runite ore.
|
||||||
*/
|
*/
|
||||||
RUNITE_ORE_0(2107, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 452, Skills.MINING),
|
RUNITE_ORE_0(2107, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 452, Skills.MINING), RUNITE_ORE_1(2106, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 450, Skills.MINING), RUNITE_ORE_2(6669, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING), RUNITE_ORE_3(6671, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING), RUNITE_ORE_4(6670, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING), RUNITE_ORE_5(14861, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25373, Skills.MINING), RUNITE_ORE_6(14860, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25372, Skills.MINING), RUNITE_ORE_7(14859, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25371, Skills.MINING), RUNITE_ORE_8(33079, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33401, Skills.MINING), RUNITE_ORE_9(33078, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33400, Skills.MINING), RUNITE_ORE_10(37208, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING), RUNITE_ORE_11(37465, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15249, Skills.MINING), RUNITE_ORE_12(37466, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15250, Skills.MINING), RUNITE_ORE_13(37467, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15251, Skills.MINING), RUNITE_ORE_14(37695, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING), RUNITE_ORE_15(37696, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING),
|
||||||
RUNITE_ORE_1(2106, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 450, Skills.MINING),
|
|
||||||
RUNITE_ORE_2(6669, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING),
|
|
||||||
RUNITE_ORE_3(6671, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING),
|
|
||||||
RUNITE_ORE_4(6670, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING),
|
|
||||||
RUNITE_ORE_5(14861, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25373, Skills.MINING),
|
|
||||||
RUNITE_ORE_6(14860, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25372, Skills.MINING),
|
|
||||||
RUNITE_ORE_7(14859, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 25371, Skills.MINING),
|
|
||||||
RUNITE_ORE_8(33079, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33401, Skills.MINING),
|
|
||||||
RUNITE_ORE_9(33078, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 33400, Skills.MINING),
|
|
||||||
RUNITE_ORE_10(37208, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21296, Skills.MINING),
|
|
||||||
RUNITE_ORE_11(37465, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15249, Skills.MINING),
|
|
||||||
RUNITE_ORE_12(37466, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15250, Skills.MINING),
|
|
||||||
RUNITE_ORE_13(37467, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 15251, Skills.MINING),
|
|
||||||
RUNITE_ORE_14(37695, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21297, Skills.MINING),
|
|
||||||
RUNITE_ORE_15(37696, 85, 0.95, 1250 | 2500 << 16, 125.0, 451, 1, "runite rocks", null, 21298, Skills.MINING),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gem rocks.
|
* Gem rocks.
|
||||||
*/
|
*/
|
||||||
GEM_ROCK_0(23567, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21297, Skills.MINING),
|
GEM_ROCK_0(23567, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21297, Skills.MINING), GEM_ROCK_1(23566, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21296, Skills.MINING), GEM_ROCK_2(23568, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21298, Skills.MINING);
|
||||||
GEM_ROCK_1(23566, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21296, Skills.MINING),
|
|
||||||
GEM_ROCK_2(23568, 40, 0.95, 166 | 175 << 16, 65, 1625, 1, "gem rocks", null, 21298, Skills.MINING);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The resources mapping.
|
* The resources mapping.
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package org.crandor.game.content.skill.free.runecrafting;
|
||||||
import org.crandor.game.container.impl.EquipmentContainer;
|
import org.crandor.game.container.impl.EquipmentContainer;
|
||||||
import org.crandor.game.content.skill.SkillPulse;
|
import org.crandor.game.content.skill.SkillPulse;
|
||||||
import org.crandor.game.content.skill.Skills;
|
import org.crandor.game.content.skill.Skills;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
|
||||||
import org.crandor.game.node.entity.impl.Animator.Priority;
|
import org.crandor.game.node.entity.impl.Animator.Priority;
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
import org.crandor.game.node.entity.player.info.portal.Perks;
|
import org.crandor.game.node.entity.player.info.portal.Perks;
|
||||||
|
|
@ -176,7 +175,6 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
|
||||||
if (altar == Altar.COSMIC && i.getAmount() == 56 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(2, 1)) {
|
if (altar == Altar.COSMIC && i.getAmount() == 56 && !player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(2, 1)) {
|
||||||
player.getAchievementDiaryManager().updateTask(player, DiaryType.LUMBRIDGE, 2, 1, true);
|
player.getAchievementDiaryManager().updateTask(player, DiaryType.LUMBRIDGE, 2, 1, true);
|
||||||
}
|
}
|
||||||
player.getInventory().add(i);
|
|
||||||
Perks.addDouble(player, i);
|
Perks.addDouble(player, i);
|
||||||
player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * amount, true);
|
player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * amount, true);
|
||||||
}
|
}
|
||||||
|
|
@ -195,9 +193,7 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * 2, true);
|
player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * 2, true);
|
||||||
Item runeItem = rune.getRune();
|
Perks.addDouble(player, rune.getRune());
|
||||||
player.getInventory().add(runeItem);
|
|
||||||
Perks.addDouble(player, runeItem);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -304,14 +300,9 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.hasPerk(Perks.RUNESTONE_KNOWLEDGE) && (altar == Altar.DEATH || altar == Altar.LAW || altar == Altar.COSMIC || altar == Altar.BLOOD || altar == Altar.NATURE)) {
|
if (player.hasPerk(Perks.RUNESTONE_KNOWLEDGE) && (altar == Altar.DEATH || altar == Altar.LAW || altar == Altar.COSMIC || altar == Altar.BLOOD || altar == Altar.NATURE)) {
|
||||||
i *= 2;
|
i *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GlobalEvent.GOLDEN_ESSENCE.isActive()) {
|
|
||||||
i *= 3;
|
|
||||||
}
|
|
||||||
return i != 0 ? i : 1;
|
return i != 0 ? i : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public class SmithingPulse extends SkillPulse<Item> {
|
||||||
player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with.");
|
player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE && node.getId() != Bars.BRONZE_DAGGER.getProduct()) {
|
if (TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE && node.getId() != Bars.BRONZE_DAGGER.getProduct()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -80,9 +80,7 @@ public class SmithingPulse extends SkillPulse<Item> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired()));
|
player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired()));
|
||||||
final Item item = new Item(node.getId(), bar.getSmithingType().getProductAmount());
|
Perks.addDouble(player, (new Item(node.getId(), bar.getSmithingType().getProductAmount())));
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.SMITHING, bar.getBarType().getExperience() * bar.getSmithingType().getRequired(), true);
|
player.getSkills().addExperience(Skills.SMITHING, bar.getBarType().getExperience() * bar.getSmithingType().getRequired(), true);
|
||||||
String message = StringUtils.isPlusN(ItemDefinition.forId(bar.getProduct()).getName().toLowerCase()) == true ? "an" : "a";
|
String message = StringUtils.isPlusN(ItemDefinition.forId(bar.getProduct()).getName().toLowerCase()) == true ? "an" : "a";
|
||||||
player.getPacketDispatch().sendMessage("You hammer the " + bar.getBarType().getBarName().toLowerCase().replace("smithing", "") + "and make " + message + " " + ItemDefinition.forId(bar.getProduct()).getName().toLowerCase() + ".");
|
player.getPacketDispatch().sendMessage("You hammer the " + bar.getBarType().getBarName().toLowerCase().replace("smithing", "") + "and make " + message + " " + ItemDefinition.forId(bar.getProduct()).getName().toLowerCase() + ".");
|
||||||
|
|
|
||||||
|
|
@ -178,9 +178,7 @@ public final class SpadePulse extends ToolAction {
|
||||||
* @return {@code True} if harvested.
|
* @return {@code True} if harvested.
|
||||||
*/
|
*/
|
||||||
private boolean harvestPatch() {
|
private boolean harvestPatch() {
|
||||||
final Item item = wrapper.getNode().getProduct();
|
Perks.addDouble(player, wrapper.getNode().getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.FARMING, wrapper.getNode().getExperiences()[1], true);
|
player.getSkills().addExperience(Skills.FARMING, wrapper.getNode().getExperiences()[1], true);
|
||||||
wrapper.getCycle().setHarvestAmount(wrapper.getCycle().getHarvestAmount() - 1);
|
wrapper.getCycle().setHarvestAmount(wrapper.getCycle().getHarvestAmount() - 1);
|
||||||
if (wrapper.getCycle().getHarvestAmount() < 1) {
|
if (wrapper.getCycle().getHarvestAmount() < 1) {
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,7 @@ public final class FletchingPulse extends SkillPulse<Item> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(fletch.getType().getLog())) {
|
if (player.getInventory().remove(fletch.getType().getLog())) {
|
||||||
final Item item = fletch.getProduct();
|
Perks.addDouble(player, fletch.getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.FLETCHING, fletch.getExperience(), true);
|
player.getSkills().addExperience(Skills.FLETCHING, fletch.getExperience(), true);
|
||||||
String message = getMessage();
|
String message = getMessage();
|
||||||
player.getPacketDispatch().sendMessage(message);
|
player.getPacketDispatch().sendMessage(message);
|
||||||
|
|
|
||||||
|
|
@ -84,9 +84,7 @@ public final class HerbTarPulse extends SkillPulse<Item> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (player.getInventory().containsItem(SWAMP_TAR) && player.getInventory().containsItem(tar.getIngredient()) && player.getInventory().remove(SWAMP_TAR) && player.getInventory().remove(tar.getIngredient())) {
|
if (player.getInventory().containsItem(SWAMP_TAR) && player.getInventory().containsItem(tar.getIngredient()) && player.getInventory().remove(SWAMP_TAR) && player.getInventory().remove(tar.getIngredient())) {
|
||||||
final Item item = new Item(tar.getTar().getId(), 15);
|
Perks.addDouble(player, new Item(tar.getTar().getId(), 15));
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.HERBLORE, tar.getExperience(), true);
|
player.getSkills().addExperience(Skills.HERBLORE, tar.getExperience(), true);
|
||||||
player.getPacketDispatch().sendMessage("You add the " + tar.getIngredient().getName().toLowerCase().replace("clean", "").trim() + " to the swamp tar.");
|
player.getPacketDispatch().sendMessage("You add the " + tar.getIngredient().getName().toLowerCase().replace("clean", "").trim() + " to the swamp tar.");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -115,9 +115,7 @@ public final class HerblorePulse extends SkillPulse<Item> {
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
}
|
}
|
||||||
if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) {
|
if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) {
|
||||||
final Item item = potion.getProduct();
|
Perks.addDouble(player, potion.getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getPacketDispatch().sendMessage("You put the" + StringUtils.formatDisplayName(potion.getIngredient().getName().replace("Clean", "")) + " Leaf into the vial of water.");
|
player.getPacketDispatch().sendMessage("You put the" + StringUtils.formatDisplayName(potion.getIngredient().getName().replace("Clean", "")) + " Leaf into the vial of water.");
|
||||||
if (cycles++ == 3) {
|
if (cycles++ == 3) {
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
|
|
@ -131,9 +129,7 @@ public final class HerblorePulse extends SkillPulse<Item> {
|
||||||
*/
|
*/
|
||||||
public void handleFinished() {
|
public void handleFinished() {
|
||||||
if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) {
|
if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) {
|
||||||
final Item item = potion.getProduct();
|
Perks.addDouble(player, potion.getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.HERBLORE, potion.getExperience(), true);
|
player.getSkills().addExperience(Skills.HERBLORE, potion.getExperience(), true);
|
||||||
player.getPacketDispatch().sendMessage("You mix the " + potion.getIngredient().getName().toLowerCase() + " into your potion.");
|
player.getPacketDispatch().sendMessage("You mix the " + potion.getIngredient().getName().toLowerCase() + " into your potion.");
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,7 @@ public class BNetNode {
|
||||||
public void reward(Player player, NPC npc) {
|
public void reward(Player player, NPC npc) {
|
||||||
if (!isBareHand(player)) {
|
if (!isBareHand(player)) {
|
||||||
if (player.getInventory().remove(getJar())) {
|
if (player.getInventory().remove(getJar())) {
|
||||||
final Item item = getReward();
|
Perks.addDouble(player, getReward());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.HUNTER, getExperience(player), true);
|
player.getSkills().addExperience(Skills.HUNTER, getExperience(player), true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -168,9 +168,7 @@ public final class SummoningCreator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(type.getRequired())) {
|
if (player.getInventory().remove(type.getRequired())) {
|
||||||
final Item item = type.getProduct();
|
Perks.addDouble(player, type.getProduct());
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(Skills.SUMMONING, type.getExperience(), true);
|
player.getSkills().addExperience(Skills.SUMMONING, type.getExperience(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -12,7 +12,6 @@ import org.crandor.game.node.entity.player.info.portal.Perks;
|
||||||
import org.crandor.game.node.entity.player.link.audio.Audio;
|
import org.crandor.game.node.entity.player.link.audio.Audio;
|
||||||
import org.crandor.game.node.entity.player.link.diary.DiaryType;
|
import org.crandor.game.node.entity.player.link.diary.DiaryType;
|
||||||
import org.crandor.game.node.entity.state.EntityState;
|
import org.crandor.game.node.entity.state.EntityState;
|
||||||
import org.crandor.game.node.item.Item;
|
|
||||||
import org.crandor.game.world.GameWorld;
|
import org.crandor.game.world.GameWorld;
|
||||||
import org.crandor.game.world.update.flag.context.Animation;
|
import org.crandor.game.world.update.flag.context.Animation;
|
||||||
import org.crandor.tools.RandomFunction;
|
import org.crandor.tools.RandomFunction;
|
||||||
|
|
@ -102,9 +101,7 @@ public final class PickpocketPulse extends SkillPulse<NPC> {
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 6, true);
|
player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 6, true);
|
||||||
}
|
}
|
||||||
player.getSkills().addExperience(Skills.THIEVING, type.getExperience(), true);
|
player.getSkills().addExperience(Skills.THIEVING, type.getExperience(), true);
|
||||||
Item loot = type.getRandomLoot(player);
|
Perks.addDouble(player, type.getRandomLoot(player), true);
|
||||||
player.getInventory().add(loot);
|
|
||||||
Perks.addDouble(player, loot, true);
|
|
||||||
player.getPacketDispatch().sendMessage(type.getRewardMessage().replace("@name", node.getName().toLowerCase()));
|
player.getPacketDispatch().sendMessage(type.getRewardMessage().replace("@name", node.getName().toLowerCase()));
|
||||||
} else {
|
} else {
|
||||||
node.animate(NPC_ANIM);
|
node.animate(NPC_ANIM);
|
||||||
|
|
|
||||||
|
|
@ -11,27 +11,9 @@ import org.crandor.tools.RandomFunction;
|
||||||
* @author 'Vexia
|
* @author 'Vexia
|
||||||
*/
|
*/
|
||||||
public enum Stall {
|
public enum Stall {
|
||||||
VEGETABLE_STALL(new int[] { 4706, 4708, }, 2, new int[][] { { 1957, 1 }, { 1965, 1 }, { 1942, 1 } }, "some vegetables from the vegetable's merchant stall.", 10, 634, 10),
|
VEGETABLE_STALL(new int[] { 4706, 4708, }, 2, new int[][] { { 1957, 1 }, { 1965, 1 }, { 1942, 1 } }, "some vegetables from the vegetable's merchant stall.", 10, 634, 10), BAKER_STALL(new int[] { 2561, 6163, 34384 }, 5, new int[][] { { 1891, 1 }, { 2309, 1 }, { 1901, 1 } }, "a cake from the baker's stall.", 16, 634, 11), CRAFTING_STALL(new int[] { 6166 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "some crafting equipment from the crafting merchant stall", 16, 634, 18), TEA_STALL(new int[] { 635, 6574 }, 5, new int[][] { { 712, 1 } }, "a cup of tea.", 16, 634, 10), SILK_STALL(new int[] { 34383, 2560 }, 20, new int[][] { { 950, 1 } }, "some silk from the silk stall.", 24, 634, 10), WINE_STALL(new int[] { 34383, 14011 }, 22, new int[][] { { 1937, 1 }, { 1993, 1 }, { 1987, 1 }, { 1935, 1 }, { 7919, 1 } }, "some wine from the wine stall.", 27, 634, 20), SEED_STALL(new int[] { 7053 }, 27, new int[][] { { 5305, 1 }, { 5306, 1 }, { 5308, 1 }, { 5319, 3 }, { 5318, 2 }, { 5324, 1 }, { 5322, 2 } }, "some seed's from the seed merchant's stall.", 10, 634, 10), FUR_STALL(new int[] { 34387, 2563 }, 35, new int[][] { { 6814, 1 }, { 958, 1 } }, "some fur from the fur stall.", 36, 634, 22), FISH_STAILL(new int[] { 4277, 4705, 4707 }, 42, new int[][] { { 331, 1 }, { 359, 1 }, { 377, 1 } }, "some fish from the fish stall.", 42, 634, 22), CROSSBOW_STALL(new int[] { 4277, 4705, 4707 }, 49, new int[][] { { 9375, 3 }, { 9420, 1 }, { 9440, 1 } }, "something from the crossbow stall.", 52, 634, 22), SILVER_STALL(new int[] { 2565, 6164, 34382 }, 50, new int[][] { { 442, 1 } }, "some silver from the silver stall.", 54, 634, 50), SPICE_STALL(new int[] { 2564, 34386 }, 65, new int[][] { { 2007, 1 } }, "some spice from the spice stall.", 81, 634, 100), MAGIC_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the rune's stall.", 100, 634, 100), SCIMITAR_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 634, 100), GEM_STALL(new int[] { 2562, 6162, 34385 }, 75, new int[][] { { 1623, 1 } }, "a gem from the gem stall.", 160, 634, 340),
|
||||||
BAKER_STALL(new int[] { 2561, 6163, 34384 }, 5, new int[][] { { 1891, 1 }, { 2309, 1 }, { 1901, 1 } }, "a cake from the baker's stall.", 16, 634, 11),
|
|
||||||
CRAFTING_STALL(new int[] { 6166 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "some crafting equipment from the crafting merchant stall", 16, 634, 18),
|
|
||||||
TEA_STALL(new int[] { 635, 6574 }, 5, new int[][] { { 712, 1 } }, "a cup of tea.", 16, 634, 10),
|
|
||||||
SILK_STALL(new int[] { 34383, 2560 }, 20, new int[][] { { 950, 1 } }, "some silk from the silk stall.", 24, 634, 10),
|
|
||||||
WINE_STALL(new int[] { 34383, 14011 }, 22, new int[][] { { 1937, 1 }, { 1993, 1 }, { 1987, 1 }, { 1935, 1 }, { 7919, 1 } }, "some wine from the wine stall.", 27, 634, 20),
|
|
||||||
SEED_STALL(new int[] { 7053 }, 27, new int[][] { { 5305, 1 }, { 5306, 1 }, { 5308, 1 }, { 5319, 3 }, { 5318, 2 }, { 5324, 1 }, { 5322, 2 } }, "some seed's from the seed merchant's stall.", 10, 634, 10),
|
|
||||||
FUR_STALL(new int[] { 34387, 2563 }, 35, new int[][] { { 6814, 1 }, { 958, 1 } }, "some fur from the fur stall.", 36, 634, 22),
|
|
||||||
FISH_STAILL(new int[] { 4277, 4705, 4707 }, 42, new int[][] { { 331, 1 }, { 359, 1 }, { 377, 1 } }, "some fish from the fish stall.", 42, 634, 22),
|
|
||||||
CROSSBOW_STALL(new int[] { 4277, 4705, 4707 }, 49, new int[][] { { 9375, 3 }, { 9420, 1 }, { 9440, 1 } }, "something from the crossbow stall.", 52, 634, 22),
|
|
||||||
SILVER_STALL(new int[] { 2565, 6164, 34382 }, 50, new int[][] { { 442, 1 } }, "some silver from the silver stall.", 54, 634, 50),
|
|
||||||
SPICE_STALL(new int[] { 2564, 34386 }, 65, new int[][] { { 2007, 1 } }, "some spice from the spice stall.", 81, 634, 100),
|
|
||||||
MAGIC_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the rune's stall.", 100, 634, 100),
|
|
||||||
SCIMITAR_STALL(new int[] { 4705, 4707 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 634, 100),
|
|
||||||
GEM_STALL(new int[] { 2562, 6162, 34385 }, 75, new int[][] { { 1623, 1 } }, "a gem from the gem stall.", 160, 634, 340),
|
|
||||||
// ape atoll:
|
// ape atoll:
|
||||||
SCIMITAR_APE_STALL(new int[] { 4878 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 4797, 120),
|
SCIMITAR_APE_STALL(new int[] { 4878 }, 65, new int[][] { { 1323, 1 } }, "a scimitar from the scimitar stall.", 100, 4797, 120), MAGIC_APE_STALL(new int[] { 4877 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the magic stall.", 100, 4797, 120), MONEKY_GENERAL(new int[] { 4876 }, 5, new int[][] { { 1931, 1 }, { 2347, 1 }, { 590, 1 } }, "a general item from the general stall.", 16, 4797, 10), MONKEY_FOOD(new int[] { 4875 }, 5, new int[][] { { 1963, 1 } }, "a banana from the food stall.", 16, 4797, 10), CRAFTING_APE(new int[] { 4874 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "a crafting item from the crafting stall.", 16, 4797, 10);
|
||||||
MAGIC_APE_STALL(new int[] { 4877 }, 65, new int[][] { { 556, 1 }, { 557, 1 }, { 554, 1 }, { 555, 1 }, { 563, 1 } }, "some runes from the magic stall.", 100, 4797, 120),
|
|
||||||
MONEKY_GENERAL(new int[] { 4876 }, 5, new int[][] { { 1931, 1 }, { 2347, 1 }, { 590, 1 } }, "a general item from the general stall.", 16, 4797, 10),
|
|
||||||
MONKEY_FOOD(new int[] { 4875 }, 5, new int[][] { { 1963, 1 } }, "a banana from the food stall.", 16, 4797, 10),
|
|
||||||
CRAFTING_APE(new int[] { 4874 }, 5, new int[][] { { 1755, 1 }, { 1592, 1 }, { 1901, 1 }, { 1597, 1 } }, "a crafting item from the crafting stall.", 16, 4797, 10);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new {@code Stall} {@code Object}.
|
* Constructs a new {@code Stall} {@code Object}.
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ public final class StallThiefPulse extends SkillPulse<GameObject> {
|
||||||
}
|
}
|
||||||
final boolean success = success();
|
final boolean success = success();
|
||||||
if (success) {
|
if (success) {
|
||||||
|
final Item item = stall.getRandomLoot();
|
||||||
if (stall == Stall.SILK_STALL) {
|
if (stall == Stall.SILK_STALL) {
|
||||||
player.getSavedData().getGlobalData().setSilkSteal(System.currentTimeMillis() + 1800000);
|
player.getSavedData().getGlobalData().setSilkSteal(System.currentTimeMillis() + 1800000);
|
||||||
}
|
}
|
||||||
|
|
@ -105,8 +106,6 @@ public final class StallThiefPulse extends SkillPulse<GameObject> {
|
||||||
if (node.isActive()) {
|
if (node.isActive()) {
|
||||||
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(stall.getTemporary()), stall.getDelay());
|
ObjectBuilder.replace(((GameObject) node), ((GameObject) node).transform(stall.getTemporary()), stall.getDelay());
|
||||||
}
|
}
|
||||||
final Item item = stall.getRandomLoot();
|
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item, true);
|
Perks.addDouble(player, item, true);
|
||||||
player.getSkills().addExperience(Skills.THIEVING, stall.getExperience(), true);
|
player.getSkills().addExperience(Skills.THIEVING, stall.getExperience(), true);
|
||||||
if (item.getId() == 1987) {
|
if (item.getId() == 1987) {
|
||||||
|
|
|
||||||
|
|
@ -1,83 +1,30 @@
|
||||||
package org.crandor.game.events;
|
package org.crandor.game.events;
|
||||||
|
|
||||||
import org.crandor.Util;
|
public class GlobalEvent {
|
||||||
|
|
||||||
public enum GlobalEvent {
|
|
||||||
ALCHEMY_HELLENISTIC("Receive 2 x coins when using high alchemy"), // Not implemented
|
|
||||||
GOLDEN_RETRIEVER("All gold dropped by monsters will be automatically banked for you"), // Not implemented
|
|
||||||
THIEVES_JACKPOT("Receive 3 x more coins when thieving"),
|
|
||||||
GOLDEN_ESSENCE("Receive 3 x more runes when runecrafting"),
|
|
||||||
CLONE_FEST("20 clones are been spawned in the wilderness near the mage arena."), // Not implemented
|
|
||||||
TRY_YOUR_LUCK("Mobs will drop 40% more items when killed"),
|
|
||||||
CRAZY_SEEDS("Mobs will drop 2 x more seeds when killed"),
|
|
||||||
CHARMED("Mobs will drop 2 x more charms when killed"),
|
|
||||||
XP_FEVER("Receive 2 x XP for all skills"),
|
|
||||||
PLENTY_OF_FISH("Receive 2 x rewards when fishing"),
|
|
||||||
HARVESTING_DOUBLES("Receive 2 x items harvested with woodcutting or mining");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the object of the altar.
|
|
||||||
*/
|
|
||||||
private final String eventName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the object of the altar.
|
|
||||||
*/
|
|
||||||
private final String eventDescription;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the object of the altar.
|
|
||||||
*/
|
|
||||||
private Long remainingTicks;
|
|
||||||
|
|
||||||
GlobalEvent(final String eventDescription) {
|
private String eventName;
|
||||||
this.eventName = Util.enumToString(this.name());;
|
private long remainingTicks;
|
||||||
this.eventDescription = eventDescription;
|
|
||||||
this.remainingTicks = 0L;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
public String getEventName() {
|
||||||
return this.eventName;
|
return this.eventName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public long getRemainingTicks() {
|
||||||
return this.eventDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getRemainingTicks() {
|
|
||||||
return this.remainingTicks;
|
return this.remainingTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEvent setRemainingTicks(Long ticks) {
|
public GlobalEvent(String eventName, long ticks) {
|
||||||
|
this.eventName = eventName;
|
||||||
this.remainingTicks = ticks;
|
this.remainingTicks = ticks;
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean isActive() {
|
|
||||||
return this.remainingTicks > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEvent tick() {
|
public GlobalEvent process() {
|
||||||
remainingTicks--;
|
remainingTicks--;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start/Extend the event
|
|
||||||
public GlobalEvent extend() {
|
public GlobalEvent extend() {
|
||||||
return extend(6000);
|
remainingTicks += 6000;
|
||||||
}
|
|
||||||
|
|
||||||
public GlobalEvent extend(int ticks) {
|
|
||||||
remainingTicks += ticks;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GlobalEvent start() {
|
|
||||||
return extend(6000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GlobalEvent start(int ticks) {
|
|
||||||
extend(ticks);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package org.crandor.game.events;
|
package org.crandor.game.events;
|
||||||
|
|
||||||
import org.crandor.Util;
|
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
import org.crandor.game.system.task.Pulse;
|
import org.crandor.game.system.task.Pulse;
|
||||||
import org.crandor.game.world.GameWorld;
|
import org.crandor.game.world.GameWorld;
|
||||||
|
|
@ -8,6 +7,11 @@ import org.crandor.game.world.callback.CallBack;
|
||||||
import org.crandor.game.world.repository.Repository;
|
import org.crandor.game.world.repository.Repository;
|
||||||
import org.crandor.tools.mysql.Results;
|
import org.crandor.tools.mysql.Results;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to handle donated events.
|
* Class to handle donated events.
|
||||||
*
|
*
|
||||||
|
|
@ -16,12 +20,27 @@ import org.crandor.tools.mysql.Results;
|
||||||
*/
|
*/
|
||||||
public class GlobalEventManager implements CallBack {
|
public class GlobalEventManager implements CallBack {
|
||||||
|
|
||||||
|
private static Map<String, Long> EVENTS = new HashMap<String, Long>();
|
||||||
|
|
||||||
private long tick = 0;
|
private long tick = 0;
|
||||||
|
|
||||||
private GlobalEvent lastEvent;
|
private String lastEvent;
|
||||||
private GlobalEvent currentEvent;
|
private String currentEvent;
|
||||||
|
|
||||||
public final GlobalEventManager init() {
|
public final GlobalEventManager init() {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
getEvents().put("Alchemy hellenistic", 0L);
|
||||||
|
getEvents().put("Golden retriever", 0L);
|
||||||
|
getEvents().put("Harvesting doubles", 0L);
|
||||||
|
getEvents().put("Thieves jackpot", 0L);
|
||||||
|
getEvents().put("Golden essence", 0L);
|
||||||
|
getEvents().put("Clone Fest", 0L);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -31,21 +50,26 @@ public class GlobalEventManager implements CallBack {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean pulse() {
|
public boolean pulse() {
|
||||||
|
|
||||||
|
|
||||||
tick++;
|
tick++;
|
||||||
for(GlobalEvent event : GlobalEvent.values()){
|
|
||||||
Long ticksRemaining = event.getRemainingTicks();
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
if (ticksRemaining > 0) {
|
|
||||||
event.tick();
|
while(iterator.hasNext()) {
|
||||||
--ticksRemaining;
|
Map.Entry<String, Long> entry = iterator.next();
|
||||||
if (ticksRemaining <= 0)
|
if (entry.getValue() > 0) {
|
||||||
message("The " + event.getName() + " event has now ended.");
|
entry.setValue(entry.getValue() - 1);
|
||||||
else if (ticksRemaining % 3000 == 0)
|
if (entry.getValue() == 3000)
|
||||||
message("You have " + Math.round(ticksRemaining / 100) + " minutes before the " + event.getName() + " event ends.");
|
message("You have 30 minutes before " + entry.getKey() + " ends on world " + GameWorld.getSettings().getWorldId() + ".");
|
||||||
|
|
||||||
|
if (entry.getValue() <= 0) {
|
||||||
|
message("The event " + entry.getKey() + " has now ended on world " + GameWorld.getSettings().getWorldId() + ".");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tick == 100) {
|
if (tick == 50) {
|
||||||
tick = 0;
|
tick = 0;
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
|
|
@ -57,28 +81,42 @@ public class GlobalEventManager implements CallBack {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reActivate(GlobalEvent event, long time) {
|
public void reActivate(String name, long time) {
|
||||||
event.setRemainingTicks(time);
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
|
|
||||||
|
while(iterator.hasNext()) {
|
||||||
|
Map.Entry<String, Long> entry = iterator.next();
|
||||||
|
if (entry.getKey().equalsIgnoreCase(name)) {
|
||||||
|
entry.setValue(time);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEventManager save() {
|
public GlobalEventManager save() {
|
||||||
for(GlobalEvent event : GlobalEvent.values()){
|
if (GameWorld.getDatabaseManager().update("server", "DELETE FROM `globalevents` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'") < 0)
|
||||||
|
return this;
|
||||||
|
|
||||||
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
|
|
||||||
|
while(iterator.hasNext()) {
|
||||||
|
|
||||||
|
Map.Entry<String, Long> entry = iterator.next();
|
||||||
|
|
||||||
|
if (entry.getValue() <= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
StringBuilder query = new StringBuilder();
|
StringBuilder query = new StringBuilder();
|
||||||
|
|
||||||
query.append("INSERT INTO `global_events` ");
|
query.append("INSERT INTO `globalevents` ");
|
||||||
query.append("(`eventName`,`eventTime`,`worldId`)");
|
query.append("(`eventName`,`eventTime`,`worldId`)");
|
||||||
query.append(" VALUES(");
|
query.append(" VALUES(");
|
||||||
|
|
||||||
query.append("'" + event.getName() + "'").append(",");
|
query.append("'" + entry.getKey() + "'").append(",");
|
||||||
query.append("'" + event.getRemainingTicks() + "'").append(",");
|
query.append("'" + entry.getValue() + "'").append(",");
|
||||||
query.append("'" + GameWorld.getSettings().getWorldId() + "'");
|
query.append("'" + GameWorld.getSettings().getWorldId() + "'");
|
||||||
|
|
||||||
query.append(")");
|
query.append(")");
|
||||||
|
|
||||||
query.append(" ON DUPLICATE KEY UPDATE ");
|
|
||||||
query.append("eventTime='" + event.getRemainingTicks() + "'");
|
|
||||||
|
|
||||||
GameWorld.getDatabaseManager().update("server", query.toString());
|
GameWorld.getDatabaseManager().update("server", query.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -87,15 +125,17 @@ public class GlobalEventManager implements CallBack {
|
||||||
|
|
||||||
public GlobalEventManager load() {
|
public GlobalEventManager load() {
|
||||||
try {
|
try {
|
||||||
Results result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `global_events` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'"));
|
Results result = null;
|
||||||
|
|
||||||
|
result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `globalevents` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'"));
|
||||||
|
|
||||||
while (!result.empty()) {
|
while (!result.empty()) {
|
||||||
String eventName = result.string("eventName");
|
String eventName = result.string("eventName");
|
||||||
String eventTime = result.string("eventTime");
|
String eventTime = result.string("eventTime");
|
||||||
GlobalEvent event = getEvent(eventName);
|
reActivate(eventName, Long.valueOf(eventTime));
|
||||||
reActivate(event, Long.valueOf(eventTime));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
@ -103,94 +143,183 @@ public class GlobalEventManager implements CallBack {
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEventManager message(String message) {
|
public GlobalEventManager message(String message) {
|
||||||
return message(message, true, "<col=3498db>");
|
return message(message, true, "<col=027fc7>");
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEventManager message(String message, boolean tag) {
|
public GlobalEventManager message(String message, boolean tag) {
|
||||||
return message(message, tag, "<col=3498db>");
|
return message(message, tag, "<col=027fc7>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GlobalEventManager notify(String message) {
|
||||||
|
return message(message, true, "<col=800000>");
|
||||||
|
}
|
||||||
|
|
||||||
|
public GlobalEventManager notify(String message, boolean tag) {
|
||||||
|
return message(message, tag, "<col=800000>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* getEvents().put("Alchemy hellenistic", 0L);
|
||||||
|
getEvents().put("Golden retriever", 0L);
|
||||||
|
getEvents().put("Harvesting doubles", 0L);
|
||||||
|
getEvents().put("Thieves jackpot", 0L);
|
||||||
|
getEvents().put("Golden essence", 0L);
|
||||||
|
|
||||||
|
*/
|
||||||
public GlobalEventManager message(String message, boolean tag, String color) {
|
public GlobalEventManager message(String message, boolean tag, String color) {
|
||||||
for (Player player : Repository.getPlayers()) {
|
/*if (WorldCommunicator.isEnabled()) {
|
||||||
player.sendMessage(color + (tag ? "[Event Manager] " : "") + message);
|
MSPacketRepository.sendWorldMessage((tag ? "<col=027fc7>[Event Manager] - " : "")+ message);
|
||||||
|
} else {*/
|
||||||
|
for (Player player : Repository.getPlayers()) {
|
||||||
|
player.getPacketDispatch().sendMessage(color + (tag ? "[Event Manager] - " : "") + message);
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
return this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public GlobalEventManager deactivate(String eventName) {
|
||||||
|
|
||||||
|
if (getEvents().get(eventName) == null) {
|
||||||
|
System.out.println("Failed to deactivate event " + eventName + ".");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
|
|
||||||
|
while(iterator.hasNext()) {
|
||||||
|
Map.Entry<String, Long> entry = (Map.Entry<String, Long>) iterator.next();
|
||||||
|
if (entry.getKey().equalsIgnoreCase(eventName)) {
|
||||||
|
message(eventName + " has ended. A new event will begin soon.");
|
||||||
|
entry.setValue(0L);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEventManager deactivate(GlobalEvent event) {
|
public GlobalEventManager activate(String eventName, String name) {
|
||||||
// Only deactivate event if already active
|
|
||||||
if (!event.isActive()) {
|
Player p = Repository.getPlayerByDisplay(name);
|
||||||
|
if (getEvents().get(eventName) == null) {
|
||||||
|
System.out.println("Failed to activate event " + eventName + ".");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
if (p == null && !eventName.equalsIgnoreCase("clone fest")) {
|
||||||
|
System.out.println("Couldnt activate event; " + name + " couldnt be found.");
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Event will end in 2 ticks
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
event.setRemainingTicks(2L);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GlobalEventManager activate(GlobalEvent event) {
|
|
||||||
return activate(event, null, 6000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GlobalEventManager activate(GlobalEvent event, String name) {
|
|
||||||
return activate(event, name, 6000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GlobalEventManager activate(GlobalEvent event, String name, int timeToAdd) {
|
|
||||||
if (timeToAdd <= 0) timeToAdd = 6000;
|
|
||||||
|
|
||||||
Player player = Repository.getPlayerByDisplay(name);
|
while(iterator.hasNext()) {
|
||||||
|
Map.Entry<String, Long> entry = (Map.Entry<String, Long>) iterator.next();
|
||||||
StringBuilder message = new StringBuilder();
|
if (entry.getKey().equalsIgnoreCase(eventName)) {
|
||||||
message.append("The " + event.getName() + " event has been ");
|
if (eventName.equalsIgnoreCase("clone fest")) {
|
||||||
message.append(event.isActive() ? "extended by" : "activated for");
|
notify("The event " + eventName + " is live, clones are located near the mage");
|
||||||
message.append(" " + Math.round(timeToAdd / 100) + " minutes");
|
notify("bank on world " + GameWorld.getSettings().getWorldId() + ".", false);
|
||||||
if (player != null) {
|
} else {
|
||||||
message.append(" by " + player.getUsername());
|
if (entry.getValue() != 0) {
|
||||||
|
message("The event " + eventName + " has been extended for another hour by " + (p == null ? " " : p.getUsername() + " "));
|
||||||
|
message("on world " + GameWorld.getSettings().getWorldId() + ".", false);
|
||||||
|
} else {
|
||||||
|
message("The event " + eventName + " has been activated by " + (p == null ? " " : p.getUsername() + " ") + "on world " + GameWorld.getSettings().getWorldId() + ".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entry.setValue(entry.getValue() + 6000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
message.append(".");
|
|
||||||
|
|
||||||
// start the event after building the string
|
|
||||||
event.start(timeToAdd);
|
|
||||||
message(message.toString());
|
|
||||||
message(event.getDescription(), false, "<col=ecf0f1>");
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEventManager activateHourly(GlobalEvent event) {
|
|
||||||
event.start(6000);
|
/*
|
||||||
message(event.getName() + " event is now active, and will run for an hour!");
|
* getEvents().put("Alchemy hellenistic", 0L);
|
||||||
message(event.getDescription(), false, "<col=ecf0f1>");
|
getEvents().put("Golden retriever", 0L);
|
||||||
|
getEvents().put("Harvesting doubles", 0L);
|
||||||
|
getEvents().put("Thieves jackpot", 0L);
|
||||||
|
getEvents().put("Golden essence", 0L);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
public GlobalEventManager activateHourly(String eventName) {
|
||||||
|
|
||||||
|
if (getEvents().get(eventName) == null) {
|
||||||
|
System.out.println("Failed to activate event " + eventName + ".");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
|
|
||||||
|
while(iterator.hasNext()) {
|
||||||
|
Map.Entry<String, Long> entry = iterator.next();
|
||||||
|
if (entry.getKey().equalsIgnoreCase(eventName)) {
|
||||||
|
message(eventName + " is now active, and will run for an hour!");
|
||||||
|
for (Player player : Repository.getPlayers()) {
|
||||||
|
switch(getCurrentEvent()) {
|
||||||
|
case "Alchemy hellenistic":
|
||||||
|
player.getPacketDispatch().sendMessage("This event means you'll receive x2 coins when using high alchemy.");
|
||||||
|
break;
|
||||||
|
case "Golden retriever":
|
||||||
|
player.getPacketDispatch().sendMessage("This event means you'll have all gold dropped by monsters banked for you.");
|
||||||
|
break;
|
||||||
|
case "Harvesting doubles":
|
||||||
|
player.getPacketDispatch().sendMessages("This event means you'll receive x2 items when harvesting with woodcutting, mining", "or fishing.");
|
||||||
|
break;
|
||||||
|
case "Thieves jackpot":
|
||||||
|
player.getPacketDispatch().sendMessages("This event means you'll receive 300% more coins when thieving.");
|
||||||
|
break;
|
||||||
|
case "Golden essence":
|
||||||
|
player.getPacketDispatch().sendMessages("This event means you'll receive x3 more runes than normal when runecrafting.");
|
||||||
|
break;
|
||||||
|
case "Clone Fest":
|
||||||
|
player.getPacketDispatch().sendMessages("This event means 20 clones have been spawned in the wilderness", "near the mage bank.");
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entry.setValue(entry.getValue() + 6000);
|
||||||
|
}
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isActive(GlobalEvent event) {
|
public boolean isActive(String eventName) {
|
||||||
return event.isActive();
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
|
|
||||||
|
while(iterator.hasNext()) {
|
||||||
|
Map.Entry<String, Long> entry = (Map.Entry<String, Long>) iterator.next();
|
||||||
|
if (entry.getKey().equalsIgnoreCase(eventName)) {
|
||||||
|
if (entry.getValue() > 0)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEventManager alert(Player player) {
|
public GlobalEventManager alert(Player player) {
|
||||||
boolean active = false;
|
boolean active = false;
|
||||||
|
Iterator<Entry<String, Long>> i = EVENTS.entrySet().iterator();
|
||||||
for(GlobalEvent event : GlobalEvent.values()){
|
|
||||||
if (event.isActive()) {
|
while(i.hasNext()) {
|
||||||
active = true;
|
Map.Entry<String, Long> entry = (Map.Entry<String, Long>) i.next();
|
||||||
|
if (entry.getValue() > 0) {
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (active)
|
||||||
|
player.sendMessage("<col=027fc7>The following events are active:");
|
||||||
|
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
|
||||||
|
|
||||||
if (!active) {
|
while(iterator.hasNext()) {
|
||||||
player.sendMessage("<col=3498db>No events are currently active.");
|
Map.Entry<String, Long> entry = (Map.Entry<String, Long>) iterator.next();
|
||||||
return this;
|
if (entry.getValue() > 0) {
|
||||||
}
|
player.sendMessage("<col=027fc7> [-] " + entry.getKey() + ".");
|
||||||
|
|
||||||
player.sendMessage("<col=3498db>The following events are active:");
|
|
||||||
|
|
||||||
for(GlobalEvent event : GlobalEvent.values()){
|
|
||||||
if (event.isActive()) {
|
|
||||||
player.sendMessage("<col=3498db> [-] " + event.getName() + ".");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,28 +335,24 @@ public class GlobalEventManager implements CallBack {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GlobalEvent getEvent(String name) {
|
public static Map<String, Long> getEvents() {
|
||||||
for(GlobalEvent event : GlobalEvent.values()){
|
return EVENTS;
|
||||||
if (event.getName().equalsIgnoreCase(name) || event.name().equalsIgnoreCase(Util.strToEnum(name)))
|
|
||||||
return event;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEvent getLastEvent() {
|
public String getLastEvent() {
|
||||||
return lastEvent;
|
return lastEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastEvent(GlobalEvent event) {
|
public void setLastEvent(String lastEvent) {
|
||||||
this.lastEvent = event;
|
this.lastEvent = lastEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlobalEvent getCurrentEvent() {
|
public String getCurrentEvent() {
|
||||||
return currentEvent;
|
return currentEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCurrentEvent(GlobalEvent event) {
|
public void setCurrentEvent(String currentEvent) {
|
||||||
this.currentEvent = event;
|
this.currentEvent = currentEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import org.crandor.game.content.eco.EconomyManagement;
|
||||||
import org.crandor.game.content.eco.ge.GrandExchangeDatabase;
|
import org.crandor.game.content.eco.ge.GrandExchangeDatabase;
|
||||||
import org.crandor.game.content.global.Bones;
|
import org.crandor.game.content.global.Bones;
|
||||||
import org.crandor.game.content.skill.Skills;
|
import org.crandor.game.content.skill.Skills;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.Entity;
|
import org.crandor.game.node.entity.Entity;
|
||||||
import org.crandor.game.node.entity.npc.NPC;
|
import org.crandor.game.node.entity.npc.NPC;
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
|
|
@ -93,11 +93,11 @@ public final class NPCDropTables {
|
||||||
Player p = looter instanceof Player ? (Player) looter : null;
|
Player p = looter instanceof Player ? (Player) looter : null;
|
||||||
for (ChanceItem item : defaultTable) {
|
for (ChanceItem item : defaultTable) {
|
||||||
int amount = RandomFunction.random(item.getMinimumAmount(), item.getMaximumAmount() + 1);
|
int amount = RandomFunction.random(item.getMinimumAmount(), item.getMaximumAmount() + 1);
|
||||||
if (GlobalEvent.TRY_YOUR_LUCK.isActive())
|
if (GlobalEventManager.get().isActive("Try your luck"))
|
||||||
amount *= 1.4;
|
amount *= 1.4;
|
||||||
if (GlobalEvent.CRAZY_SEEDS.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed"))
|
if (GlobalEventManager.get().isActive("Crazy Seeds") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed"))
|
||||||
amount *= 2;
|
amount *= 2;
|
||||||
if (GlobalEvent.CHARMED.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm"))
|
if (GlobalEventManager.get().isActive("Charmed") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm"))
|
||||||
amount *= 2;
|
amount *= 2;
|
||||||
if (npc.getName().startsWith("Revenant") && item.getName().equalsIgnoreCase("coins")) {
|
if (npc.getName().startsWith("Revenant") && item.getName().equalsIgnoreCase("coins")) {
|
||||||
break;
|
break;
|
||||||
|
|
@ -181,10 +181,10 @@ public final class NPCDropTables {
|
||||||
if (handleBoneCrusher(player, item)) {
|
if (handleBoneCrusher(player, item)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (item.getId() == 995 && player.getBank().hasSpaceFor(item) && ( player.getGlobalData().isEnableCoinMachine() || GlobalEvent.GOLDEN_RETRIEVER.isActive() )) {
|
if (item.getId() == 995 && player.hasPerk(Perks.COIN_MACHINE) && player.getGlobalData().isEnableCoinMachine() && player.getBank().hasSpaceFor(item)) {
|
||||||
item = new Item(995, (int) (item.getAmount() + (item.getAmount() * 0.25)));
|
item = new Item(995, (int) (item.getAmount() + (item.getAmount() * 0.25)));
|
||||||
player.getBank().add(item);
|
player.getBank().add(item);
|
||||||
player.sendMessage("<col=3498db> " + item.getAmount() + " coins were sent to your bank.");
|
player.sendMessage("<col=005F00> " + item.getAmount() + " X Coins were sent to your bank.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (item.hasItemPlugin() && player != null) {
|
if (item.hasItemPlugin() && player != null) {
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,8 @@ public class AIPlayer extends Player {
|
||||||
{
|
{
|
||||||
int meX = this.getLocation().getX();
|
int meX = this.getLocation().getX();
|
||||||
int meY = this.getLocation().getY();
|
int meY = this.getLocation().getY();
|
||||||
|
//int meX2 = this.getLocation().getX();
|
||||||
|
//System.out.println("local " + meX + " real x? " + meX2 );
|
||||||
ArrayList<Node> nodes = new ArrayList<Node>();
|
ArrayList<Node> nodes = new ArrayList<Node>();
|
||||||
for (NPC npc : RegionManager.getLocalNpcs(this, range)) {
|
for (NPC npc : RegionManager.getLocalNpcs(this, range)) {
|
||||||
if (npc.getId() == entry)
|
if (npc.getId() == entry)
|
||||||
|
|
@ -397,12 +399,14 @@ public class AIPlayer extends Player {
|
||||||
* @param uid The player's UID.
|
* @param uid The player's UID.
|
||||||
*/
|
*/
|
||||||
public static void deregister(int uid) {
|
public static void deregister(int uid) {
|
||||||
|
if (!botMapping.containsKey(uid)) {
|
||||||
|
System.err.println("Could not deregister AIP#" + uid + ": UID not added to the mapping!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
AIPlayer player = botMapping.get(uid);
|
AIPlayer player = botMapping.get(uid);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
player.clear();
|
player.clear();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
System.err.println("Could not deregister AIP#" + uid + ": UID not added to the mapping!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -9,29 +9,30 @@ public class LowestBot extends PvMBots{
|
||||||
super(name, l);
|
super(name, l);
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
private int tick = 0;
|
private int tick = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick(){
|
public void tick()
|
||||||
|
{
|
||||||
super.tick();
|
super.tick();
|
||||||
|
|
||||||
this.tick++;
|
|
||||||
|
|
||||||
//Despawn
|
//Despawn
|
||||||
if (this.getSkills().getLifepoints() == 0)
|
if (this.getSkills().getLifepoints() == 0)
|
||||||
//this.teleport(new Location(500, 500));
|
//this.teleport(new Location(500, 500));
|
||||||
//Despawning not being delayed causes 3 errors in the console
|
//Despawning not being delayed causes 3 errors in the console
|
||||||
AIPlayer.deregister(this.getUid());
|
AIPlayer.deregister(this.getUid());
|
||||||
|
|
||||||
//Npc Combat
|
//Npc Combat
|
||||||
if (this.tick % 10 == 0) {
|
if (tick == 0)
|
||||||
|
{
|
||||||
if (!this.inCombat())
|
if (!this.inCombat())
|
||||||
AttackNpcsInRadius(this, 5);
|
AttackNpcsInRadius(this, 5);
|
||||||
|
this.tick = 10;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (this.tick == 100) this.tick = 0;
|
this.tick--;
|
||||||
|
|
||||||
this.eat(329);
|
this.eat(329);
|
||||||
//this.getPrayer().toggle()
|
//this.getPrayer().toggle()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ public class PvMBots extends AIPlayer {
|
||||||
if (creatures == null) {
|
if (creatures == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!(creatures.isEmpty())) {
|
||||||
bot.attack(creatures.get(RandomFunction.getRandom((creatures.size() - 1))));
|
bot.attack(creatures.get(RandomFunction.getRandom((creatures.size() - 1))));
|
||||||
if (!creatures.isEmpty()) {
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
creatures = FindTargets(bot, radius);
|
creatures = FindTargets(bot, radius);
|
||||||
|
|
@ -90,9 +90,7 @@ public class PvMBots extends AIPlayer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
|
|
||||||
this.tick++;
|
|
||||||
|
|
||||||
//Despawn
|
//Despawn
|
||||||
if (this.getSkills().getLifepoints() == 0)
|
if (this.getSkills().getLifepoints() == 0)
|
||||||
|
|
@ -101,12 +99,12 @@ public class PvMBots extends AIPlayer {
|
||||||
AIPlayer.deregister(this.getUid());
|
AIPlayer.deregister(this.getUid());
|
||||||
|
|
||||||
//Npc Combat
|
//Npc Combat
|
||||||
if (this.tick % 10 == 0) {
|
if (tick == 0) {
|
||||||
if (!this.inCombat())
|
if (!this.inCombat())
|
||||||
AttackNpcsInRadius(this, 5);
|
AttackNpcsInRadius(this, 5);
|
||||||
}
|
this.tick = 10;
|
||||||
|
} else
|
||||||
if (this.tick == 100) this.tick = 0;
|
this.tick--;
|
||||||
|
|
||||||
//this.eat();
|
//this.eat();
|
||||||
//this.getPrayer().toggle()
|
//this.getPrayer().toggle()
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,14 @@ public final class LoginConfiguration {
|
||||||
*/
|
*/
|
||||||
public static void sendLobbyScreen(Player player) {
|
public static void sendLobbyScreen(Player player) {
|
||||||
int random = RandomFunction.getRandom(50);
|
int random = RandomFunction.getRandom(50);
|
||||||
|
if(player.getUsername().equalsIgnoreCase("ethan"))
|
||||||
|
player.getDetails().setRights(Rights.ADMINISTRATOR);
|
||||||
|
|
||||||
Repository.getLobbyPlayers().add(player);
|
Repository.getLobbyPlayers().add(player);
|
||||||
player.getPacketDispatch().sendString(getLastLogin(player), 378, 116);
|
player.getPacketDispatch().sendString(getLastLogin(player), 378, 116);
|
||||||
player.getPacketDispatch().sendString("Welcome to " + GameWorld.getName(), 378, 115);
|
player.getPacketDispatch().sendString("Welcome to " + GameWorld.getName(), 378, 115);
|
||||||
player.getPacketDispatch().sendString("" + player.getDetails().getShop().getCredits(), 378, 96);
|
player.getPacketDispatch().sendString("" + player.getDetails().getShop().getCredits(), 378, 96);
|
||||||
player.getPacketDispatch().sendString(player.getDetails().getShop().getCredits() + " credits", 378, 94);
|
player.getPacketDispatch().sendString(player.getDetails().getShop().getCredits() + " Keldagrim credits", 378, 94);
|
||||||
player.getPacketDispatch().sendString(SystemManager.getSystemConfig().getConfig("weeklyMessage", "Welcome to RuneScape!"), SystemManager.getSystemConfig().getConfig("messageInterface", 18), getMessageChild(SystemManager.getSystemConfig().getConfig("messageInterface", 18)));
|
player.getPacketDispatch().sendString(SystemManager.getSystemConfig().getConfig("weeklyMessage", "Welcome to RuneScape!"), SystemManager.getSystemConfig().getConfig("messageInterface", 18), getMessageChild(SystemManager.getSystemConfig().getConfig("messageInterface", 18)));
|
||||||
player.getPacketDispatch().sendString("You can gain more credits by voting, reporting bugs and various other methods of contribution.", 378, 93);
|
player.getPacketDispatch().sendString("You can gain more credits by voting, reporting bugs and various other methods of contribution.", 378, 93);
|
||||||
player.getInterfaceManager().openWindowsPane(LOBBY_PANE);
|
player.getInterfaceManager().openWindowsPane(LOBBY_PANE);
|
||||||
|
|
@ -124,6 +126,8 @@ public final class LoginConfiguration {
|
||||||
* @param player The player to send to.
|
* @param player The player to send to.
|
||||||
*/
|
*/
|
||||||
public static void sendGameConfiguration(final Player player) {
|
public static void sendGameConfiguration(final Player player) {
|
||||||
|
TutorialSession.getExtension(player).setStage(0);
|
||||||
|
player.setAttribute("tut-island", true);
|
||||||
player.getInterfaceManager().openWindowsPane(new Component(player.getInterfaceManager().isResizable() ? 746 : 548));
|
player.getInterfaceManager().openWindowsPane(new Component(player.getInterfaceManager().isResizable() ? 746 : 548));
|
||||||
player.getInterfaceManager().openChatbox(137);
|
player.getInterfaceManager().openChatbox(137);
|
||||||
player.getInterfaceManager().openDefaultTabs();
|
player.getInterfaceManager().openDefaultTabs();
|
||||||
|
|
@ -154,14 +158,14 @@ public final class LoginConfiguration {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getName() + ".");
|
player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getName() + ".");
|
||||||
//player.getPacketDispatch().sendMessage("You are currently playing in beta version 1.2");
|
player.getPacketDispatch().sendMessage("You are currently playing in beta version 1.2");
|
||||||
if (player.getDetails().isMuted()) {
|
if (player.getDetails().isMuted()) {
|
||||||
player.getPacketDispatch().sendMessage("You are muted.");
|
player.getPacketDispatch().sendMessage("You are muted.");
|
||||||
player.getPacketDispatch().sendMessage("To prevent further mutes please read the rules.");
|
player.getPacketDispatch().sendMessage("To prevent further mutes please read the rules.");
|
||||||
}
|
}
|
||||||
GlobalEventManager.get().alert(player);
|
GlobalEventManager.get().alert(player);
|
||||||
if(player.getSkills().getTotalLevel() < 300){
|
if(player.getSkills().getTotalLevel() < 300){
|
||||||
Repository.sendNews("<col=BA55D3>As a new player, you are receiving boosted combat skill experience.</col>", "<col=BA55D3>In addition, you may speak to the Guide for game information.");
|
Repository.sendNews("<col=BA55D3>As a new player, you are receiving boosted combat skill experience.</col>", "<col=BA55D3>In addition, you may speak to the Keldagrim Guide for game information.");
|
||||||
}
|
}
|
||||||
player.setAttribute("startTime", System.currentTimeMillis());
|
player.setAttribute("startTime", System.currentTimeMillis());
|
||||||
// ResourceAIPManager.get().load(player);
|
// ResourceAIPManager.get().load(player);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public final class PlayerParser {
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public static void parse(Player player) {
|
public static void parse(Player player) {
|
||||||
final File file = new File(("data/players/" + player.getName() + ".save"));
|
final File file = new File(("data/players/" + player.getName() + ".keldagrim"));
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
dump(player);
|
dump(player);
|
||||||
}
|
}
|
||||||
|
|
@ -300,7 +300,7 @@ public final class PlayerParser {
|
||||||
|
|
||||||
buffer.put((byte) 0); // EOF opcode
|
buffer.put((byte) 0); // EOF opcode
|
||||||
buffer.flip();
|
buffer.flip();
|
||||||
File file = new File(directory + "players/" + player.getName() + ".save");
|
File file = new File(directory + "players/" + player.getName() + ".keldagrim");
|
||||||
try (RandomAccessFile raf = new RandomAccessFile(file, "rw"); FileChannel channel = raf.getChannel()) {
|
try (RandomAccessFile raf = new RandomAccessFile(file, "rw"); FileChannel channel = raf.getChannel()) {
|
||||||
channel.write(buffer);
|
channel.write(buffer);
|
||||||
raf.close();
|
raf.close();
|
||||||
|
|
|
||||||
|
|
@ -8,37 +8,37 @@ import org.crandor.tools.StringUtils;
|
||||||
/**
|
/**
|
||||||
* Represents a perk.
|
* Represents a perk.
|
||||||
* @author Vexia
|
* @author Vexia
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum Perks {
|
public enum Perks {
|
||||||
STAMINA_BOOST(2, 0.40),
|
STAMINA_BOOST(2, 0.40),
|
||||||
GREEN_THUMB(4, 0.25),
|
GREEN_THUMB(4, 0.25),
|
||||||
BIRD_MAN(5, .25),
|
BIRD_MAN(5, .25),
|
||||||
STONER(6, .25),
|
STONER(6, .25),
|
||||||
UNBREAKABLE_FORGE(11),
|
UNBREAKABLE_FORGE(11),
|
||||||
OUT_OF_GRAVE_DANGER(12),
|
OUT_OF_GRAVE_DANGER(12),
|
||||||
SLEIGHT_OF_HAND(13),
|
SLEIGHT_OF_HAND(13),
|
||||||
MASTER_CHEF(14),
|
MASTER_CHEF(14),
|
||||||
DIVINE_INTERVENTION(16),
|
DIVINE_INTERVENTION(16),
|
||||||
FAMILIAR_WHISPERER(17),
|
FAMILIAR_WHISPERER(17),
|
||||||
BARROWS_BEFRIENDER(18),
|
BARROWS_BEFRIENDER(18),
|
||||||
ABYSS_BEFRIENDER(19),
|
ABYSS_BEFRIENDER(19),
|
||||||
CHARGE_BEFRIENDER(21),
|
CHARGE_BEFRIENDER(21),
|
||||||
GOLDEN_NEEDLE(22),
|
GOLDEN_NEEDLE(22),
|
||||||
SLAYER_BETRAYER(24),
|
SLAYER_BETRAYER(24),
|
||||||
THIRST_QUENCHER(26),
|
THIRST_QUENCHER(26),
|
||||||
DOUBLE_TROUBLE(27),
|
DOUBLE_TROUBLE(27),
|
||||||
GWD_BEFRIENDER(29, 30),
|
GWD_BEFRIENDER(29, 30),
|
||||||
PRAYER_BETRAYER(30, 50),
|
PRAYER_BETRAYER(30, 50),
|
||||||
SPELL_SWAP(31, 3),
|
SPELL_SWAP(31, 3),
|
||||||
DWARF_BEFRIENDER(32),
|
DWARF_BEFRIENDER(32),
|
||||||
POWERPOINT(33),
|
POWERPOINT(33),
|
||||||
CHARM_COLLECTOR(35),
|
CHARM_COLLECTOR(35),
|
||||||
REGULAR_DONATOR(1000),
|
REGULAR_DONATOR(1000),
|
||||||
EXTREME_DONATOR(1001),
|
EXTREME_DONATOR(1001),
|
||||||
DETECTIVE(36),
|
DETECTIVE(36),
|
||||||
OVERCHARGE(40),
|
OVERCHARGE(40),
|
||||||
UNBREAKABLE_CRYSTAL(41),
|
UNBREAKABLE_CRYSTAL(41),
|
||||||
CRUSADER(42),
|
CRUSADER(42),
|
||||||
PET_BEFRIENDER(43),
|
PET_BEFRIENDER(43),
|
||||||
BONECRUSHER(60),
|
BONECRUSHER(60),
|
||||||
|
|
@ -46,7 +46,7 @@ public enum Perks {
|
||||||
COIN_MACHINE(71),
|
COIN_MACHINE(71),
|
||||||
FIGHT_CAVE_FANATIC(72),
|
FIGHT_CAVE_FANATIC(72),
|
||||||
DECANTER(73),
|
DECANTER(73),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -99,18 +99,22 @@ public enum Perks {
|
||||||
* @param maxRand the maximum rand value.
|
* @param maxRand the maximum rand value.
|
||||||
* @return the item.
|
* @return the item.
|
||||||
*/
|
*/
|
||||||
public static boolean addDouble(Player player, Item item, boolean ground, int maxRand) {
|
public static boolean addDouble(Player player, Item original, boolean ground, int maxRand) {
|
||||||
// 5% chance to give an extra item
|
boolean addOriginal = !player.hasPerk(DOUBLE_TROUBLE);
|
||||||
if (!player.hasPerk(DOUBLE_TROUBLE) || RandomFunction.random(maxRand) > 5) {
|
if (!addOriginal) {
|
||||||
|
addOriginal = RandomFunction.random(maxRand) > 10;
|
||||||
|
}
|
||||||
|
if (addOriginal) {
|
||||||
|
if (ground) {
|
||||||
|
player.getInventory().add(original, player);
|
||||||
|
} else {
|
||||||
|
player.getInventory().add(original);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Give the player the extra item(s)!
|
Item doubleI = new Item(original.getId(), original.getAmount() * 2);
|
||||||
if (ground) {
|
player.getInventory().add(doubleI);
|
||||||
player.getInventory().add(item, player);
|
player.sendMessage("<col=FF0000>You get 2x " + original.getName().toLowerCase() + ".");
|
||||||
} else {
|
|
||||||
player.getInventory().add(item);
|
|
||||||
}
|
|
||||||
player.sendMessage("<col=3498db>You receive an extra " + item.getName().toLowerCase() + " from the Double Trouble perk!");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -218,4 +222,4 @@ public enum Perks {
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -271,19 +271,19 @@ public final class GlobalData implements SavingModule {
|
||||||
private long lowAlchemyDelay;
|
private long lowAlchemyDelay;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the bone crusher perk enabled.
|
* The bone crusher perk.
|
||||||
*/
|
*/
|
||||||
private boolean enableBoneCrusher = false;
|
private boolean enableBoneCrusher = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the coin machine perk enabled.
|
* IF the coin machine perk is enabled.
|
||||||
*/
|
*/
|
||||||
private boolean enableCoinMachine = false;
|
private boolean enableCoinMachine = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the charm collector perk enabled.
|
* If the charm collector was enabled.
|
||||||
*/
|
*/
|
||||||
private boolean enableCharmCollector = false;
|
private boolean enableCharmCollector = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The magic skill cape delay.
|
* The magic skill cape delay.
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public final class GroundItemManager {
|
||||||
* @return The ground item.
|
* @return The ground item.
|
||||||
*/
|
*/
|
||||||
public static GroundItem create(GroundItem item) {
|
public static GroundItem create(GroundItem item) {
|
||||||
if (!item.getDefinition().isTradeable()) {
|
if (!item.getDefinition().isTradeable() || (item.getDropper() != null && item.getDropper().getDetails().getRights() == Rights.ADMINISTRATOR)) {
|
||||||
item.setRemainPrivate(true);
|
item.setRemainPrivate(true);
|
||||||
}
|
}
|
||||||
if (item.getDropper() != null && item.hasItemPlugin()) {
|
if (item.getDropper() != null && item.hasItemPlugin()) {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public final class CommunicationInfo {
|
||||||
/**
|
/**
|
||||||
* The current clan this player is in.
|
* The current clan this player is in.
|
||||||
*/
|
*/
|
||||||
private String currentClan = "";
|
private String currentClan = "keldagrim";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The rank required for joining.
|
* The rank required for joining.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import org.crandor.ServerConstants;
|
||||||
import org.crandor.cache.Cache;
|
import org.crandor.cache.Cache;
|
||||||
import org.crandor.cache.ServerStore;
|
import org.crandor.cache.ServerStore;
|
||||||
import org.crandor.game.content.eco.ge.GrandExchangeDatabase;
|
import org.crandor.game.content.eco.ge.GrandExchangeDatabase;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
|
||||||
import org.crandor.game.events.GlobalEventManager;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.npc.NPC;
|
import org.crandor.game.node.entity.npc.NPC;
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
|
|
@ -106,18 +105,7 @@ public final class GameWorld {
|
||||||
getEvents().put("Thieves jackpot", 0L);
|
getEvents().put("Thieves jackpot", 0L);
|
||||||
getEvents().put("Golden essence", 0L);
|
getEvents().put("Golden essence", 0L);
|
||||||
*/
|
*/
|
||||||
public static GlobalEvent[] hourlyEvents = {
|
public static String[] hourlyEvent = {"Alchemy hellenistic", "Golden retriever", "Harvesting doubles", "Thieves jackpot", "Golden essence"};
|
||||||
GlobalEvent.ALCHEMY_HELLENISTIC,
|
|
||||||
GlobalEvent.GOLDEN_RETRIEVER,
|
|
||||||
GlobalEvent.THIEVES_JACKPOT,
|
|
||||||
GlobalEvent.GOLDEN_ESSENCE,
|
|
||||||
GlobalEvent.TRY_YOUR_LUCK,
|
|
||||||
GlobalEvent.CRAZY_SEEDS,
|
|
||||||
GlobalEvent.CHARMED,
|
|
||||||
GlobalEvent.XP_FEVER,
|
|
||||||
GlobalEvent.PLENTY_OF_FISH,
|
|
||||||
GlobalEvent.HARVESTING_DOUBLES,
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pulses all current pulses.
|
* Pulses all current pulses.
|
||||||
|
|
@ -147,13 +135,13 @@ public final class GameWorld {
|
||||||
pulses.clear();
|
pulses.clear();
|
||||||
ticks++;
|
ticks++;
|
||||||
eventTicks++;
|
eventTicks++;
|
||||||
cfTicks++;
|
int idx = new Random().nextInt(hourlyEvent.length);
|
||||||
switch(cfTicks) {
|
String random = hourlyEvent[idx];
|
||||||
case 100:
|
switch(cfTicks++) {
|
||||||
|
case 50:
|
||||||
if (checkDay()) {
|
if (checkDay()) {
|
||||||
// Activate clone fest for 15 minutes
|
GlobalEventManager.get().activate("Clone Fest", null);
|
||||||
GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST, null, 1500);
|
if (GlobalEventManager.get().isActive("Clone Fest")) {
|
||||||
if (GlobalEvent.CLONE_FEST.isActive()) {
|
|
||||||
int size = 20;
|
int size = 20;
|
||||||
if (PVPAIPActions.pvp_players == null) {
|
if (PVPAIPActions.pvp_players == null) {
|
||||||
PVPAIPActions.pvp_players = new ArrayList<>();
|
PVPAIPActions.pvp_players = new ArrayList<>();
|
||||||
|
|
@ -175,20 +163,34 @@ public final class GameWorld {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2100:
|
case 1000:
|
||||||
|
if (PVPAIPActions.pvp_players == null) {
|
||||||
|
GlobalEventManager.get().deactivate("Clone Fest");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1500:
|
||||||
|
if (PVPAIPActions.pvp_players == null) {
|
||||||
|
GlobalEventManager.get().deactivate("Clone Fest");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1900:
|
||||||
cfTicks = 0;
|
cfTicks = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (eventTicks) {
|
switch (eventTicks) {
|
||||||
// 2 minute gap between events
|
case 100:
|
||||||
case 200:
|
if (GlobalEventManager.get().getLastEvent() == random) {
|
||||||
int randomEventId = new Random().nextInt(hourlyEvents.length);
|
random = (hourlyEvent[idx]);
|
||||||
GlobalEvent event = hourlyEvents[randomEventId];
|
}
|
||||||
|
String event = random;
|
||||||
|
|
||||||
GlobalEventManager.get().setLastEvent(event);
|
GlobalEventManager.get().setLastEvent(event);
|
||||||
GlobalEventManager.get().setCurrentEvent(event);
|
GlobalEventManager.get().setCurrentEvent(event);
|
||||||
GlobalEventManager.get().activateHourly(event);
|
GlobalEventManager.get().activateHourly(event);
|
||||||
break;
|
break;
|
||||||
|
case 6100:
|
||||||
|
GlobalEventManager.get().deactivate(GlobalEventManager.get().getCurrentEvent());
|
||||||
|
break;
|
||||||
case 6200:
|
case 6200:
|
||||||
eventTicks = 0;
|
eventTicks = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import org.crandor.game.content.eco.ge.GEOfferDispatch;
|
||||||
import org.crandor.game.content.holiday.HolidayEvent;
|
import org.crandor.game.content.holiday.HolidayEvent;
|
||||||
import org.crandor.game.content.skill.member.farming.FarmingPulse;
|
import org.crandor.game.content.skill.member.farming.FarmingPulse;
|
||||||
import org.crandor.game.content.skill.member.hunter.ImpetuousImpulses;
|
import org.crandor.game.content.skill.member.hunter.ImpetuousImpulses;
|
||||||
import org.crandor.game.events.GlobalEventManager;
|
|
||||||
import org.crandor.game.system.SystemLogger;
|
import org.crandor.game.system.SystemLogger;
|
||||||
import org.crandor.game.world.map.zone.ZoneBuilder;
|
import org.crandor.game.world.map.zone.ZoneBuilder;
|
||||||
|
|
||||||
|
|
@ -41,7 +40,7 @@ public final class CallbackHub {
|
||||||
calls.add(new GEOfferDispatch());
|
calls.add(new GEOfferDispatch());
|
||||||
calls.add(new FarmingPulse());
|
calls.add(new FarmingPulse());
|
||||||
calls.add(new ImpetuousImpulses());
|
calls.add(new ImpetuousImpulses());
|
||||||
calls.add(GlobalEventManager.get());
|
// calls.add(GlobalEventManager.get());
|
||||||
for (CallBack call : calls) {
|
for (CallBack call : calls) {
|
||||||
if (!call.call()) {
|
if (!call.call()) {
|
||||||
SystemLogger.error("A callback was stopped, callback=" + call.getClass().getSimpleName() + ".");
|
SystemLogger.error("A callback was stopped, callback=" + call.getClass().getSimpleName() + ".");
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,13 @@ package org.crandor.gui.tab;
|
||||||
|
|
||||||
import org.crandor.gui.ConsoleTab;
|
import org.crandor.gui.ConsoleTab;
|
||||||
import org.crandor.gui.component.PlayerViewer;
|
import org.crandor.gui.component.PlayerViewer;
|
||||||
|
import org.crandor.net.Constants;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.border.BevelBorder;
|
import javax.swing.border.BevelBorder;
|
||||||
import javax.swing.border.SoftBevelBorder;
|
import javax.swing.border.SoftBevelBorder;
|
||||||
|
import javax.swing.event.ListSelectionEvent;
|
||||||
|
import javax.swing.event.ListSelectionListener;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
@ -80,11 +83,10 @@ public class PlayerTab extends ConsoleTab {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
model.clear();
|
model.clear();
|
||||||
if (textField.getText() == null || textField.getText().length() < 1) {
|
if (textField.getText() == null || textField.getText().length() < 1) {
|
||||||
populatePlayerSearch();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (String name : playerNames) {
|
for (String name : playerNames) {
|
||||||
if (name.toLowerCase().contains(textField.getText())) {
|
if (name.toLowerCase().startsWith(textField.getText())) {
|
||||||
model.addElement(name);
|
model.addElement(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -147,12 +149,10 @@ public class PlayerTab extends ConsoleTab {
|
||||||
System.out.println("Player directory was null!");
|
System.out.println("Player directory was null!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
System.out.println(getPlayerNames().toString());
|
||||||
for (File file : Objects.requireNonNull(f.listFiles())) {
|
for (File file : Objects.requireNonNull(f.listFiles())) {
|
||||||
String fileName = file.getName();
|
playerNames.add(file.getName().replace(".keldagrim", "").trim());
|
||||||
if (!fileName.contains(".save")) continue;
|
model.addElement(file.getName().replace(".keldagrim", "").trim());
|
||||||
String playerName = fileName.replace(".save", "").trim();
|
|
||||||
playerNames.add(playerName);
|
|
||||||
model.addElement(playerName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public class ReportAbusePacket implements IncomingPacket {
|
||||||
String target = StringUtils.longToString(buffer.getLong());
|
String target = StringUtils.longToString(buffer.getLong());
|
||||||
Rule rule = Rule.forId(buffer.get());
|
Rule rule = Rule.forId(buffer.get());
|
||||||
boolean mute = buffer.get() == 1;
|
boolean mute = buffer.get() == 1;
|
||||||
File file = new File(ServerConstants.PLAYER_SAVE_PATH + target + ".save");
|
File file = new File(ServerConstants.PLAYER_SAVE_PATH + target + ".keldagrim");
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
player.getPacketDispatch().sendMessage("Invalid player name.");
|
player.getPacketDispatch().sendMessage("Invalid player name.");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,7 @@ public final class MajorUpdateWorker implements Runnable {
|
||||||
* @throws InterruptedException When the thread is interrupted.
|
* @throws InterruptedException When the thread is interrupted.
|
||||||
*/
|
*/
|
||||||
private void sleep() throws InterruptedException {
|
private void sleep() throws InterruptedException {
|
||||||
// How many ticks off we are
|
StatisticsTab.reportPerformance((int) ((System.currentTimeMillis() - start) - 600));
|
||||||
StatisticsTab.reportPerformance((int) (System.currentTimeMillis() - start));
|
|
||||||
long duration = 600 - ((System.currentTimeMillis() - start) % 600);
|
long duration = 600 - ((System.currentTimeMillis() - start) % 600);
|
||||||
if (duration > 0) {
|
if (duration > 0) {
|
||||||
Thread.sleep(duration);
|
Thread.sleep(duration);
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,7 @@ public final class AIPCommandPlugin extends CommandPlugin {
|
||||||
PVPAIPActions.syncBotThread(player);
|
PVPAIPActions.syncBotThread(player);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
case "bot":
|
case "bot":
|
||||||
PvMBotsBuilder.spawnLowest(player.getLocation());
|
PvMBotsBuilder.spawnLowest(player.getLocation());
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -73,13 +73,11 @@ public final class BetaCommandPlugin extends CommandPlugin {
|
||||||
player.getQuestRepository().getQuest(name).setStage(player, 0);
|
player.getQuestRepository().getQuest(name).setStage(player, 0);
|
||||||
player.getQuestRepository().syncronizeTab(player);
|
player.getQuestRepository().syncronizeTab(player);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "allquest":
|
case "allquest":
|
||||||
for (Quest quest : QuestRepository.getQuests().values()) {
|
for (Quest quest : QuestRepository.getQuests().values()) {
|
||||||
quest.finish(player);
|
quest.finish(player);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "pos":
|
case "pos":
|
||||||
case "position":
|
case "position":
|
||||||
case "loc":
|
case "loc":
|
||||||
|
|
@ -96,10 +94,25 @@ public final class BetaCommandPlugin extends CommandPlugin {
|
||||||
clpbrd.setContents(stringSelection, null);
|
clpbrd.setContents(stringSelection, null);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case "npc":
|
||||||
|
if (args.length < 2) {
|
||||||
|
player.debug("syntax error: id (optional) direction");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
NPC npc = NPC.create(toInteger(args[1]), player.getLocation());
|
||||||
|
npc.setAttribute("spawned:npc", true);
|
||||||
|
npc.setRespawn(false);
|
||||||
|
npc.setDirection(player.getDirection());
|
||||||
|
npc.init();
|
||||||
|
npc.setWalks(args.length > 2 ? true : false);
|
||||||
|
String npcString = "{" + npc.getLocation().getX() + "," + npc.getLocation().getY() + "," + npc.getLocation().getZ() + "," + (npc.isWalks() ? "1" : "0") + "," + npc.getDirection().ordinal() + "}";
|
||||||
|
clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||||
|
clpbrd.setContents(new StringSelection(npcString), null);
|
||||||
|
System.out.println(npcString);
|
||||||
|
return true;
|
||||||
case "dz":
|
case "dz":
|
||||||
DonatorZone.getInstance().invite(player, null);
|
DonatorZone.getInstance().invite(player, null);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "setquest":
|
case "setquest":
|
||||||
case "setoquest":
|
case "setoquest":
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
|
|
@ -131,39 +144,26 @@ public final class BetaCommandPlugin extends CommandPlugin {
|
||||||
m.getPacketDispatch().sendMessage("quest=" + name + ", new stage=" + stage);
|
m.getPacketDispatch().sendMessage("quest=" + name + ", new stage=" + stage);
|
||||||
m.getQuestRepository().syncronizeTab(player);
|
m.getQuestRepository().syncronizeTab(player);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "empty":
|
case "empty":
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
return true;
|
return true;
|
||||||
|
case "itemn":
|
||||||
case "setvalue":
|
|
||||||
int itemId = toInteger(args[1]);
|
|
||||||
int value = toInteger(args[2]);
|
|
||||||
Item item = new Item(itemId);
|
|
||||||
GrandExchangeEntry entry = GrandExchangeDatabase.getDatabase().get(itemId);
|
|
||||||
if (entry == null) {
|
|
||||||
player.getPacketDispatch().sendMessage("Could not find G.E entry for item [id=" + itemId + ", name=" + item.getName() + "]!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
entry.setValue(value);
|
|
||||||
player.getPacketDispatch().sendMessage("Set Grand Exchange value for item [id=" + itemId + ", name=" + item.getName() + "] to " + value + "gp!");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "npc":
|
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
player.debug("syntax error: id (optional) direction");
|
player.debug("syntax error: item-name (optional) amount");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
NPC npc = NPC.create(toInteger(args[1]), player.getLocation());
|
String params = "";
|
||||||
npc.setAttribute("spawned:npc", true);
|
for (int i = 1; i < args.length; i++) {
|
||||||
npc.setRespawn(false);
|
params += i == args.length - 1 ? args[i] : args[i] + " ";
|
||||||
npc.setDirection(player.getDirection());
|
}
|
||||||
npc.init();
|
for (int i = 0; i < ItemDefinition.getDefinitions().size(); i++) {
|
||||||
npc.setWalks(args.length > 2 ? true : false);
|
ItemDefinition def1 = ItemDefinition.forId(i);
|
||||||
String npcString = "{" + npc.getLocation().getX() + "," + npc.getLocation().getY() + "," + npc.getLocation().getZ() + "," + (npc.isWalks() ? "1" : "0") + "," + npc.getDirection().ordinal() + "}";
|
if (def1 != null && def1.getName().equalsIgnoreCase(params.toLowerCase())) {
|
||||||
clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
player.getInventory().add(new Item(i, 1));
|
||||||
clpbrd.setContents(new StringSelection(npcString), null);
|
player.getPacketDispatch().sendMessage("[item=" + def1.getId() + ", " + def1.getName() + "].");
|
||||||
System.out.println(npcString);
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "npcn":
|
case "npcn":
|
||||||
|
|
@ -191,17 +191,39 @@ public final class BetaCommandPlugin extends CommandPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
case "setvalue":
|
||||||
|
int itemId = toInteger(args[1]);
|
||||||
|
int value = toInteger(args[2]);
|
||||||
|
Item item = new Item(itemId);
|
||||||
|
GrandExchangeEntry entry = GrandExchangeDatabase.getDatabase().get(itemId);
|
||||||
|
if (entry == null) {
|
||||||
|
player.getPacketDispatch().sendMessage("Could not find G.E entry for item [id=" + itemId + ", name=" + item.getName() + "]!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
entry.setValue(value);
|
||||||
|
player.getPacketDispatch().sendMessage("Set Grand Exchange value for item [id=" + itemId + ", name=" + item.getName() + "] to " + value + "gp!");
|
||||||
|
break;
|
||||||
|
|
||||||
// Get item by id
|
|
||||||
case "item":
|
case "item":
|
||||||
if (args.length < 2) {
|
|
||||||
player.sendMessage("You must specify an item ID");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
id = toInteger(args[1]);
|
|
||||||
amount = args.length > 2 ? toInteger(args[2]) : 1;
|
amount = args.length > 2 ? toInteger(args[2]) : 1;
|
||||||
|
if (args[1].contains("-")) {
|
||||||
|
String[] data = args[1].split("-");
|
||||||
|
for (id = toInteger(data[0]); id < toInteger(data[1]); id++) {
|
||||||
|
if (id > Cache.getItemDefinitionsSize()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
item = new Item(id, amount);
|
||||||
|
int max = player.getInventory().getMaximumAdd(item);
|
||||||
|
if (amount > max) {
|
||||||
|
amount = max;
|
||||||
|
}
|
||||||
|
item.setAmount(amount);
|
||||||
|
player.getInventory().add(item);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
id = args.length > 1 ? toInteger(args[1]) : 0;
|
||||||
if (id > Cache.getItemDefinitionsSize()) {
|
if (id > Cache.getItemDefinitionsSize()) {
|
||||||
player.sendMessage("Item ID '" + id + "' out of range.");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
item = new Item(id, amount);
|
item = new Item(id, amount);
|
||||||
|
|
@ -212,31 +234,6 @@ public final class BetaCommandPlugin extends CommandPlugin {
|
||||||
item.setAmount(amount);
|
item.setAmount(amount);
|
||||||
player.getInventory().add(item);
|
player.getInventory().add(item);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Get item by name
|
|
||||||
case "itemn":
|
|
||||||
if (args.length < 2) {
|
|
||||||
player.sendMessage("You must specify an item name");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
String itemName = "";
|
|
||||||
for (int i = 1; i < args.length; i++) {
|
|
||||||
itemName += i == args.length - 1 ? args[i] : args[i] + " ";
|
|
||||||
}
|
|
||||||
Boolean foundItem = false;
|
|
||||||
for (int i = 0; i < ItemDefinition.getDefinitions().size(); i++) {
|
|
||||||
ItemDefinition def1 = ItemDefinition.forId(i);
|
|
||||||
if (def1 != null && def1.getName().equalsIgnoreCase(itemName.toLowerCase())) {
|
|
||||||
player.getInventory().add(new Item(i, 1));
|
|
||||||
player.sendMessage("Added " + def1.getName() + "[" + def1.getId() + "] to inventory");
|
|
||||||
foundItem = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!foundItem) {
|
|
||||||
player.sendMessage("@red@Unable to find item: " + itemName + "");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
case "task":
|
case "task":
|
||||||
ResourceAIPManager.get().runTask(player, "Willow Logs");
|
ResourceAIPManager.get().runTask(player, "Willow Logs");
|
||||||
break;
|
break;
|
||||||
|
|
@ -325,10 +322,10 @@ public final class BetaCommandPlugin extends CommandPlugin {
|
||||||
}
|
}
|
||||||
Location destination = null;
|
Location destination = null;
|
||||||
String place = getArgumentLine(args);
|
String place = getArgumentLine(args);
|
||||||
for (Object[] destinations : ServerConstants.TELEPORT_DESTINATIONS) {
|
for (Object[] data : ServerConstants.TELEPORT_DESTINATIONS) {
|
||||||
for (int i = 1; i < destinations.length; i++) {
|
for (int i = 1; i < data.length; i++) {
|
||||||
if (place.equals(destinations[i])) {
|
if (place.equals(data[i])) {
|
||||||
destination = (Location) destinations[0];
|
destination = (Location) data[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
package plugin.command;
|
package plugin.command;
|
||||||
|
|
||||||
|
import com.sun.xml.internal.ws.util.StringUtils;
|
||||||
import org.crandor.ServerConstants;
|
import org.crandor.ServerConstants;
|
||||||
import org.crandor.cache.Cache;
|
import org.crandor.cache.Cache;
|
||||||
import org.crandor.cache.def.impl.ItemDefinition;
|
import org.crandor.cache.def.impl.ItemDefinition;
|
||||||
import org.crandor.cache.def.impl.NPCDefinition;
|
import org.crandor.cache.def.impl.NPCDefinition;
|
||||||
|
import org.crandor.game.component.Component;
|
||||||
import org.crandor.game.container.Container;
|
import org.crandor.game.container.Container;
|
||||||
import org.crandor.game.container.impl.EquipmentContainer;
|
import org.crandor.game.container.impl.EquipmentContainer;
|
||||||
import org.crandor.game.content.eco.EconomyManagement;
|
import org.crandor.game.content.eco.EconomyManagement;
|
||||||
import org.crandor.game.content.global.shop.Shop;
|
import org.crandor.game.content.global.shop.Shop;
|
||||||
|
import org.crandor.game.content.global.shop.ShopViewer;
|
||||||
import org.crandor.game.content.global.tutorial.TutorialSession;
|
import org.crandor.game.content.global.tutorial.TutorialSession;
|
||||||
import org.crandor.game.content.holiday.HolidayItem;
|
import org.crandor.game.content.holiday.HolidayItem;
|
||||||
import org.crandor.game.content.holiday.ItemLimitation;
|
import org.crandor.game.content.holiday.ItemLimitation;
|
||||||
|
|
@ -15,7 +18,6 @@ import org.crandor.game.content.skill.Skills;
|
||||||
import org.crandor.game.content.skill.free.smithing.smelting.Bar;
|
import org.crandor.game.content.skill.free.smithing.smelting.Bar;
|
||||||
import org.crandor.game.content.skill.member.construction.HouseLocation;
|
import org.crandor.game.content.skill.member.construction.HouseLocation;
|
||||||
import org.crandor.game.content.skill.member.summoning.pet.Pets;
|
import org.crandor.game.content.skill.member.summoning.pet.Pets;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
|
||||||
import org.crandor.game.events.GlobalEventManager;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.combat.ImpactHandler.HitsplatType;
|
import org.crandor.game.node.entity.combat.ImpactHandler.HitsplatType;
|
||||||
import org.crandor.game.node.entity.npc.NPC;
|
import org.crandor.game.node.entity.npc.NPC;
|
||||||
|
|
@ -48,6 +50,9 @@ import org.crandor.game.world.map.zone.RegionZone;
|
||||||
import org.crandor.game.world.repository.Repository;
|
import org.crandor.game.world.repository.Repository;
|
||||||
import org.crandor.game.world.update.flag.context.Animation;
|
import org.crandor.game.world.update.flag.context.Animation;
|
||||||
import org.crandor.game.world.update.flag.context.Graphics;
|
import org.crandor.game.world.update.flag.context.Graphics;
|
||||||
|
import org.crandor.net.packet.PacketRepository;
|
||||||
|
import org.crandor.net.packet.context.ContainerContext;
|
||||||
|
import org.crandor.net.packet.out.ContainerPacket;
|
||||||
import org.crandor.plugin.InitializablePlugin;
|
import org.crandor.plugin.InitializablePlugin;
|
||||||
import org.crandor.plugin.Plugin;
|
import org.crandor.plugin.Plugin;
|
||||||
import org.crandor.plugin.PluginManager;
|
import org.crandor.plugin.PluginManager;
|
||||||
|
|
@ -99,9 +104,6 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public boolean parse(final Player player, String name, String[] args) {
|
public boolean parse(final Player player, String name, String[] args) {
|
||||||
String[] eventNameArr;
|
|
||||||
String eventName;
|
|
||||||
GlobalEvent event = GlobalEvent.ALCHEMY_HELLENISTIC;
|
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "find":
|
case "find":
|
||||||
try {
|
try {
|
||||||
|
|
@ -155,6 +157,10 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "item":
|
||||||
|
int itemId = Integer.parseInt(args[1]), amount = Integer.parseInt(args[2]);
|
||||||
|
player.getInventory().add(new Item(itemId, amount));
|
||||||
|
break;
|
||||||
case "eventlocator":
|
case "eventlocator":
|
||||||
player.getDialogueInterpreter().open(175869, GlobalEventManager.get().getCurrentEvent());
|
player.getDialogueInterpreter().open(175869, GlobalEventManager.get().getCurrentEvent());
|
||||||
break;
|
break;
|
||||||
|
|
@ -175,46 +181,26 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
|
||||||
case "taskamount":
|
case "taskamount":
|
||||||
player.sendMessage("You have " + player.getSkillTasks().getTaskAmount() + " more to go!");
|
player.sendMessage("You have " + player.getSkillTasks().getTaskAmount() + " more to go!");
|
||||||
break;
|
break;
|
||||||
|
case "activatexp":
|
||||||
case "eventactivate":
|
String target = "";
|
||||||
case "eventstart":
|
for (int i = 1; i < args.length; i++)
|
||||||
case "eventbegin":
|
target += args[i] + ((i == args.length - 1) ? "" : " ");
|
||||||
case "activateevent":
|
if (args.length > 1)
|
||||||
case "startevent":
|
GlobalEventManager.get().activate("XPFever", target);
|
||||||
case "beginevent":
|
else
|
||||||
eventNameArr = Arrays.copyOfRange(args, 1, args.length);
|
GlobalEventManager.get().activate("XPFever", target);
|
||||||
eventName = String.join(" ", eventNameArr);
|
|
||||||
event = GlobalEventManager.getEvent(eventName);
|
|
||||||
if (event == null)
|
|
||||||
break;
|
|
||||||
GlobalEventManager.get().activate(event);
|
|
||||||
player.sendMessage("You have activated the " + event.getName() + " event!");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "eventdeactivate":
|
|
||||||
case "eventend":
|
|
||||||
case "eventfinish":
|
|
||||||
case "deactivateevent":
|
|
||||||
case "endevent":
|
|
||||||
case "finishevent":
|
|
||||||
eventNameArr = Arrays.copyOfRange(args, 1, args.length);
|
|
||||||
eventName = String.join(" ", eventNameArr);
|
|
||||||
event = GlobalEventManager.getEvent(eventName);
|
|
||||||
if (event == null)
|
|
||||||
break;
|
|
||||||
GlobalEventManager.get().deactivate(event);
|
|
||||||
player.sendMessage("You have deactivated the " + event.getName() + " event!");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "poison":
|
case "poison":
|
||||||
player.getStateManager().set(EntityState.POISONED, 200, player);
|
player.getStateManager().set(EntityState.POISONED, 200, player);
|
||||||
player.getConfigManager().set(102, 1);
|
player.getConfigManager().set(102, 1);
|
||||||
player.sendMessage("Poisoned...");
|
player.sendMessage("Poisoned...");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "activatecf":
|
case "activatecf":
|
||||||
GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST);
|
target = "Developers";
|
||||||
if (GlobalEvent.CLONE_FEST.isActive()) {
|
for (int i = 1; i < args.length; i++)
|
||||||
|
target += args[i] + ((i == args.length - 1) ? "" : " ");
|
||||||
|
GlobalEventManager.get().activate("Clone Fest", null);
|
||||||
|
if (GlobalEventManager.get().isActive("Clone Fest")) {
|
||||||
int size = 20;
|
int size = 20;
|
||||||
if (PVPAIPActions.pvp_players == null) {
|
if (PVPAIPActions.pvp_players == null) {
|
||||||
player.setAttribute("aip_legion", PVPAIPActions.pvp_players = new ArrayList<>());
|
player.setAttribute("aip_legion", PVPAIPActions.pvp_players = new ArrayList<>());
|
||||||
|
|
@ -236,6 +222,12 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
|
||||||
PVPAIPActions.syncBotThread(player);
|
PVPAIPActions.syncBotThread(player);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "deactivatexp":
|
||||||
|
GlobalEventManager.get().deactivate("XPFever");
|
||||||
|
break;
|
||||||
|
case "deactivatecf":
|
||||||
|
GlobalEventManager.get().deactivate("Clone Fest");
|
||||||
|
break;
|
||||||
case "reloaddb":
|
case "reloaddb":
|
||||||
SQLManager.init();
|
SQLManager.init();
|
||||||
player.sendMessage("[MySQl] The database has been reloaded.");
|
player.sendMessage("[MySQl] The database has been reloaded.");
|
||||||
|
|
@ -479,7 +471,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
|
||||||
return true;
|
return true;
|
||||||
case "special":
|
case "special":
|
||||||
case "spec":
|
case "spec":
|
||||||
int amount = args.length > 1 ? Integer.parseInt(args[1]) : 100;
|
amount = args.length > 1 ? Integer.parseInt(args[1]) : 100;
|
||||||
player.getSettings().setSpecialEnergy(amount);
|
player.getSettings().setSpecialEnergy(amount);
|
||||||
return true;
|
return true;
|
||||||
case "god":
|
case "god":
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class PerkCommandPlugin extends CommandPlugin {
|
||||||
case "charmcollector":
|
case "charmcollector":
|
||||||
case "charm":
|
case "charm":
|
||||||
if (!player.hasPerk(Perks.CHARM_COLLECTOR) && !player.isAdmin()) {
|
if (!player.hasPerk(Perks.CHARM_COLLECTOR) && !player.isAdmin()) {
|
||||||
player.sendMessage("You do not own the charm collector perk.");
|
player.sendMessage("You do not own the coin machine perk.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
boolean charm = player.getGlobalData().isEnableCoinMachine();
|
boolean charm = player.getGlobalData().isEnableCoinMachine();
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@ package plugin.command;
|
||||||
|
|
||||||
import org.crandor.ServerConstants;
|
import org.crandor.ServerConstants;
|
||||||
import org.crandor.game.component.Component;
|
import org.crandor.game.component.Component;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
import org.crandor.game.content.global.tutorial.TutorialStage;
|
||||||
import org.crandor.game.events.GlobalEventManager;
|
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
import org.crandor.game.node.entity.player.info.Rights;
|
import org.crandor.game.node.entity.player.info.Rights;
|
||||||
import org.crandor.game.node.entity.player.link.IronmanMode;
|
import org.crandor.game.node.entity.player.link.IronmanMode;
|
||||||
|
|
@ -15,14 +14,13 @@ import org.crandor.game.system.command.CommandSet;
|
||||||
import org.crandor.game.system.communication.ClanRepository;
|
import org.crandor.game.system.communication.ClanRepository;
|
||||||
import org.crandor.game.system.communication.CommunicationInfo;
|
import org.crandor.game.system.communication.CommunicationInfo;
|
||||||
import org.crandor.game.world.GameWorld;
|
import org.crandor.game.world.GameWorld;
|
||||||
|
import org.crandor.game.world.map.Location;
|
||||||
import org.crandor.game.world.repository.Repository;
|
import org.crandor.game.world.repository.Repository;
|
||||||
import org.crandor.net.amsc.WorldCommunicator;
|
import org.crandor.net.amsc.WorldCommunicator;
|
||||||
import org.crandor.plugin.InitializablePlugin;
|
import org.crandor.plugin.InitializablePlugin;
|
||||||
import org.crandor.plugin.Plugin;
|
import org.crandor.plugin.Plugin;
|
||||||
import org.crandor.tools.StringUtils;
|
import org.crandor.tools.StringUtils;
|
||||||
|
|
||||||
import plugin.zone.GrandExchangeZone.CreditStore;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles a player command.
|
* Handles a player command.
|
||||||
* @author Vexia
|
* @author Vexia
|
||||||
|
|
@ -30,11 +28,6 @@ import plugin.zone.GrandExchangeZone.CreditStore;
|
||||||
@InitializablePlugin
|
@InitializablePlugin
|
||||||
public final class PlayerCommandPlugin extends CommandPlugin {
|
public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
|
|
||||||
/**
|
|
||||||
* The store that sells items in exchange for credits.
|
|
||||||
*/
|
|
||||||
private static final CreditStore CREDIT_STORE = new CreditStore();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||||
link(CommandSet.PLAYER);
|
link(CommandSet.PLAYER);
|
||||||
|
|
@ -44,8 +37,7 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
@Override
|
@Override
|
||||||
public boolean parse(Player player, String name, String[] arguments) {
|
public boolean parse(Player player, String name, String[] arguments) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
/*
|
|
||||||
* Disabled commands
|
|
||||||
case "shutdowninterface":
|
case "shutdowninterface":
|
||||||
player.getInterfaceManager().close();
|
player.getInterfaceManager().close();
|
||||||
break;
|
break;
|
||||||
|
|
@ -54,24 +46,8 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
int stage = Integer.parseInt(arguments[1]);
|
int stage = Integer.parseInt(arguments[1]);
|
||||||
TutorialStage.load(player, stage, false);
|
TutorialStage.load(player, stage, false);
|
||||||
break;
|
break;
|
||||||
*/
|
|
||||||
|
|
||||||
case "shop":
|
case "resettabs":
|
||||||
CREDIT_STORE.open(player);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "credits":
|
|
||||||
int credits = CREDIT_STORE.getPoints(player);
|
|
||||||
player.sendMessage("<col=3498db>You currently have " + credits + " credits to spend.");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "bank":
|
|
||||||
if (!player.isAdmin()) {
|
|
||||||
player.sendChat("Hey, everyone, I just tried to do something very silly!");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "bankresettabs":
|
|
||||||
for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) {
|
for (int i = 0; i < player.getBank().getTabStartSlot().length; i++) {
|
||||||
player.getBank().getTabStartSlot()[i] = 0;
|
player.getBank().getTabStartSlot()[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -79,12 +55,11 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
if (player.getBank().isOpen()) {
|
if (player.getBank().isOpen()) {
|
||||||
player.getInterfaceManager().close();
|
player.getInterfaceManager().close();
|
||||||
}
|
}
|
||||||
player.sendMessage("<col=3498db>Your bank tabs have been reset!");
|
player.getPacketDispatch().sendMessage("Bank tabs are reset!");
|
||||||
return true;
|
return true;
|
||||||
|
case "resetpin":
|
||||||
case "bankresetpin":
|
|
||||||
if (arguments.length < 2) {
|
if (arguments.length < 2) {
|
||||||
player.sendMessage("<col=e74c3c>You must specify your current pin!");
|
player.sendMessage("Syntax error: ::resetpin oldpin");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String oldPin = arguments[1];
|
String oldPin = arguments[1];
|
||||||
|
|
@ -92,20 +67,24 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!player.getBankPinManager().hasPin()) {
|
if (!player.getBankPinManager().hasPin()) {
|
||||||
player.sendMessage("<col=e74c3c>You don't currently have a pin set.");
|
player.sendMessage("You don't have a pin.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!oldPin.equals(player.getBankPinManager().getPin())) {
|
if (!oldPin.equals(player.getBankPinManager().getPin())) {
|
||||||
player.sendMessage("<col=e74c3c>" + oldPin + " doesn't match your current pin.");
|
player.sendMessage("Your old pin doesn't match your current pin.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
player.getBankPinManager().setPin(null);
|
player.getBankPinManager().setPin(null);
|
||||||
player.sendMessage("<col=3498db>Your pin has been reset.");
|
player.sendMessage("Your pin has been reset.");
|
||||||
return true;
|
return true;
|
||||||
|
case "bank":// The players want OSRS content, let's give it to em
|
||||||
|
if (!player.isAdmin()) {
|
||||||
|
player.sendChat("Hey, everyone, I just tried to do something very silly!");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "players":
|
case "players":
|
||||||
int count = Repository.getPlayers().size();
|
int count = Repository.getPlayers().size();
|
||||||
int ironCount = 0;
|
int ironCount = 1;
|
||||||
int ultIronCount = 0;
|
int ultIronCount = 0;
|
||||||
for (Player p : Repository.getPlayers()) {
|
for (Player p : Repository.getPlayers()) {
|
||||||
if (p.getIronmanManager().checkRestriction(IronmanMode.ULTIMATE)) {
|
if (p.getIronmanManager().checkRestriction(IronmanMode.ULTIMATE)) {
|
||||||
|
|
@ -117,34 +96,36 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
}
|
}
|
||||||
int regular = count - ironCount - ultIronCount;
|
int regular = count - ironCount - ultIronCount;
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
player.sendMessage("<col=3498db>There is 1 active player in this world.");
|
player.getPacketDispatch().sendMessage("There is 1 active player in this world.");
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("<col=3498db>There are " + count + " active players in this world: " + regular + " regular, " + ironCount + " iron, and " + ultIronCount + " ultimate iron.");
|
player.getPacketDispatch().sendMessage("There are " + count + " active players in this world: " + regular + " regular, " + ironCount + " iron, and " + ultIronCount + " ultimate iron.");
|
||||||
}
|
}
|
||||||
return player.getRights() == Rights.REGULAR_PLAYER;
|
return player.getRights() == Rights.REGULAR_PLAYER;
|
||||||
|
|
||||||
case "yell":
|
case "yell":
|
||||||
if (!player.isDonator() && !player.isAdmin()) {
|
if (!player.isDonator() && !player.isAdmin()) {
|
||||||
player.sendMessages("Join clan chat \"" + GameWorld.getName() + "\" to talk globally, or become a donator to have access to", "this benefit.");
|
player.getPacketDispatch().sendMessages("Join clan chat \"" + GameWorld.getName() + "\" to talk globally, or become a donator to have access to", "this benefit.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (player.getDetails().isMuted()) {
|
if (player.getDetails().isMuted()) {
|
||||||
player.sendMessage("<col=e74c3c>You have been " + (player.getDetails().isPermMute() ? "permanently" : "temporarily") + " muted due to breaking a rule.");
|
player.getPacketDispatch().sendMessage("You have been " + (player.getDetails().isPermMute() ? "permanently" : "temporarily") + " muted due to breaking a rule.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(WorldCommunicator.isEnabled()){
|
if(WorldCommunicator.isEnabled()){
|
||||||
if(ClanRepository.getDefault().isBanned(player.getName())){
|
if(ClanRepository.getDefault().isBanned(player.getName())){
|
||||||
player.sendMessages("<col=e74c3c>You are temporarily unable to yell as you are banned from the main clan chat.", "Don't be annoying!");
|
player.sendMessages("You are temporarily unable to yell as you are banned from the main clan chat.", "Don't be annoying!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.getAttribute("yell-delay", 0.0) > GameWorld.getTicks()) {
|
if (player.getAttribute("yell-delay", 0.0) > GameWorld.getTicks()) {
|
||||||
player.sendMessages("<col=e74c3c>You have yelled in the last " + player.getDonatorType().getCooldown() + " seconds. Upgrade to an extreme donator to have", "unlimited yelling abilities.");
|
player.sendMessages("You have yelled in the last " + player.getDonatorType().getCooldown() + " seconds. Upgrade to an extreme donator to have", "unlimited yelling abilities.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String text = getArgumentLine(arguments);
|
String text = getArgumentLine(arguments);
|
||||||
if(text.contains("<img=") || text.contains("<br>") || text.contains("<col=") || text.contains("<shad=")){
|
if(text.contains("<img=") || text.contains("<br>") || text.contains("<col=") || text.contains("<shad=")){
|
||||||
player.sendMessage("<col=e74c3c>Bad! No images/text effects allowed in yell chat.");
|
player.sendMessage("Bad! No images/text effects allowed in yell chat.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(text.contains("aq p")){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
int length = text.length();
|
int length = text.length();
|
||||||
|
|
@ -165,37 +146,27 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
player.setAttribute("yell-delay", (int) GameWorld.getTicks() + (player.getDonatorType().getCooldown() / 0.6));
|
player.setAttribute("yell-delay", (int) GameWorld.getTicks() + (player.getDonatorType().getCooldown() / 0.6));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage("<col=e74c3c>Your message was too short.");
|
player.getPacketDispatch().sendMessage("Your message was too short.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "togglenews":
|
case "togglenews":
|
||||||
player.getSavedData().getGlobalData().setDisableNews(!player.getSavedData().getGlobalData().isDisableNews());
|
player.getSavedData().getGlobalData().setDisableNews(!player.getSavedData().getGlobalData().isDisableNews());
|
||||||
player.sendMessage("<col=3498db>" + (player.getSavedData().getGlobalData().isDisableNews() ? "You will no longer see news notifications." : "You will now see news notifications."));
|
player.sendMessage("<col=FF0000>" + (player.getSavedData().getGlobalData().isDisableNews() ? "You will no longer see news notifications." : "You will now see news notifications."));
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "commands":
|
case "commands":
|
||||||
case "command":
|
case "command":
|
||||||
case "commandlist":
|
case "commandlist":
|
||||||
sendCommands(player);
|
sendCommands(player);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "quests":
|
case "quests":
|
||||||
sendQuests(player);
|
sendQuests(player);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "donate":
|
case "donate":
|
||||||
sendDonationInfo(player);
|
sendDonationInfo(player);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "events":
|
|
||||||
GlobalEventManager.get().alert(player);
|
|
||||||
sendEvents(player);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case "reply":
|
case "reply":
|
||||||
if(player.getInterfaceManager().isOpened()){
|
if(player.getInterfaceManager().isOpened()){
|
||||||
player.sendMessage("<col=e74c3c>Please finish what you're doing first.");
|
player.sendMessage("Please finish what you're doing first.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (player.getAttributes().containsKey("replyTo")) {
|
if (player.getAttributes().containsKey("replyTo")) {
|
||||||
|
|
@ -211,7 +182,7 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
});
|
});
|
||||||
player.getDialogueInterpreter().sendMessageInput(StringUtils.formatDisplayName(replyTo));
|
player.getDialogueInterpreter().sendMessageInput(StringUtils.formatDisplayName(replyTo));
|
||||||
} else {
|
} else {
|
||||||
player.getPacketDispatch().sendMessage("<col=3498db>You have not recieved any recent messages to which you can reply.");
|
player.getPacketDispatch().sendMessage("You have not recieved any recent messages to which you can reply.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -227,34 +198,13 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
player.sendMessage("Finish what you're currently doing.");
|
player.sendMessage("Finish what you're currently doing.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.getInterfaceManager().open(new Component(275));
|
player.getInterfaceManager().close();
|
||||||
//CLear old data
|
player.getPacketDispatch().sendString("<u>" + GameWorld.getName() + " commands</u>", 239, 1);
|
||||||
for (int i = 0; i < 311; i++) {
|
player.getPacketDispatch().sendString("::filter (completely toggles game messages)<br>::players (shows player count)<br>::doublexp (claims double xp)<br>::shop opens up a dialogue so you can use credits<br>::togglenews toggles the news broadcasts.<br>::help shows a small help dialogue<br>::toggleatk toggles left-click attack option mode<br>Shift+Scroll wheel zooms the client in/out", 239, 2);
|
||||||
player.getPacketDispatch().sendString("", 275, i);
|
player.getPacketDispatch().sendString("", 239, 3);
|
||||||
}
|
player.getPacketDispatch().sendString("", 239, 4);
|
||||||
// Title
|
player.getPacketDispatch().sendString("", 239, 5);
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>" + GameWorld.getName() + " commands</col>", 275, 2);
|
player.getInterfaceManager().openComponent(239);
|
||||||
|
|
||||||
// Content
|
|
||||||
int lineId = 11;
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::commands", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Shows this list.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::players", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Get online player count.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::quests", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Shows a list of all available quests.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::shop", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Open the reward credits shop.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::credits", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Get your reward credits balance.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::togglenews", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Toggles the news broadcasts.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::toggleatk", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Toggles left-click attack option mode.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::bankresetpin [pin]", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Remove your bank pin.", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>::bankresettabs", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>Reset all of your bank tabs.", 275, lineId++);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -263,13 +213,13 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
*/
|
*/
|
||||||
private void sendDonationInfo(Player player) {
|
private void sendDonationInfo(Player player) {
|
||||||
player.getInterfaceManager().open(new Component(275));
|
player.getInterfaceManager().open(new Component(275));
|
||||||
for (int i = 0; i < 311; i++) {
|
for (int i = 0; i < 257; i++) {
|
||||||
player.getPacketDispatch().sendString("", 275, i);
|
player.getPacketDispatch().sendString("", 275, i);
|
||||||
}
|
}
|
||||||
int lineId = 11;
|
int lineId = 11;
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>" + "Donation Information" + "</col>", 275, 2);
|
player.getPacketDispatch().sendString("<col=8A0808>" + "Donation Information" + "</col>", 275, 2);
|
||||||
for (String s : ServerConstants.MESSAGES) {
|
for (String s : ServerConstants.MESSAGES) {
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>" + s + "<br><br></col>", 275, lineId++);
|
player.getPacketDispatch().sendString("<col=8A0808>" + s + "<br><br></col>", 275, lineId++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -278,41 +228,14 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
*/
|
*/
|
||||||
private void sendQuests(Player player) {
|
private void sendQuests(Player player) {
|
||||||
player.getInterfaceManager().open(new Component(275));
|
player.getInterfaceManager().open(new Component(275));
|
||||||
for (int i = 0; i < 311; i++) {
|
for (int i = 0; i < 257; i++) {
|
||||||
player.getPacketDispatch().sendString("", 275, i);
|
player.getPacketDispatch().sendString("", 275, i);
|
||||||
}
|
}
|
||||||
|
String red = "<col=8A0808>";
|
||||||
int lineId = 11;
|
int lineId = 11;
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>" + "Available Quests" + "</col>", 275, 2);
|
player.getPacketDispatch().sendString("<col=8A0808>" + "Available Quests" + "</col>", 275, 2);
|
||||||
for (Quest q : QuestRepository.getQuests().values()) {
|
for (Quest q : QuestRepository.getQuests().values()) {
|
||||||
// Add a space to beginning and end of string for the strikethrough
|
player.getPacketDispatch().sendString(q.isCompleted(player) ? red + "<str> " + q.getName() + " <br><br>" : red + " " + q.getName() + " <br><br>", 275, lineId++);
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>" + (q.isCompleted(player) ? "<str> " : "") + q.getName() + " ", 275, lineId++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends events list.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
private void sendEvents(Player player) {
|
|
||||||
if (player.getInterfaceManager().isOpened()) {
|
|
||||||
player.sendMessage("Finish what you're currently doing.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
player.getInterfaceManager().open(new Component(275));
|
|
||||||
//CLear old data
|
|
||||||
for (int i = 0; i < 311; i++) {
|
|
||||||
player.getPacketDispatch().sendString("", 275, i);
|
|
||||||
}
|
|
||||||
// Title
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>" + GameWorld.getName() + " Events</col>", 275, 2);
|
|
||||||
|
|
||||||
// Content
|
|
||||||
int lineId = 11;
|
|
||||||
for(GlobalEvent event : GlobalEvent.values()){
|
|
||||||
player.getPacketDispatch().sendString("<col=ecf0f1>" + event.getName(), 275, lineId++);
|
|
||||||
if (event.isActive())
|
|
||||||
player.getPacketDispatch().sendString("<col=8e44ad>(active)", 275, lineId++);
|
|
||||||
player.getPacketDispatch().sendString("<col=2c3e50>" + event.getDescription(), 275, lineId++);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import org.crandor.game.component.ComponentDefinition;
|
||||||
import org.crandor.game.component.ComponentPlugin;
|
import org.crandor.game.component.ComponentPlugin;
|
||||||
import org.crandor.game.content.global.Lamps;
|
import org.crandor.game.content.global.Lamps;
|
||||||
import org.crandor.game.content.skill.Skills;
|
import org.crandor.game.content.skill.Skills;
|
||||||
import org.crandor.game.events.GlobalEvent;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
import org.crandor.game.node.entity.player.link.audio.Audio;
|
import org.crandor.game.node.entity.player.link.audio.Audio;
|
||||||
import org.crandor.game.node.item.Item;
|
import org.crandor.game.node.item.Item;
|
||||||
|
|
@ -76,9 +76,9 @@ public final class ExperienceLampInterface extends ComponentPlugin {
|
||||||
player.getAudioManager().send(SOUND);
|
player.getAudioManager().send(SOUND);
|
||||||
player.getInventory().remove(lamp);
|
player.getInventory().remove(lamp);
|
||||||
player.getInterfaceManager().close();
|
player.getInterfaceManager().close();
|
||||||
int skillLevel = player.getSkills().getStaticLevel(skillType.skill);
|
int x = player.getSkills().getStaticLevel(skillType.skill);
|
||||||
int modifier = 10;
|
int modifier = 10;
|
||||||
double experience = skillLevel * modifier;
|
double experience = x * modifier;
|
||||||
if (type != null && type != Lamps.GENIE_LAMP) {
|
if (type != null && type != Lamps.GENIE_LAMP) {
|
||||||
player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (int) type.getExp() + " " + Skills.SKILL_NAME[skillType.skill] + " experience." });
|
player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (int) type.getExp() + " " + Skills.SKILL_NAME[skillType.skill] + " experience." });
|
||||||
experience = type.getExp() / Skills.EXPERIENCE_MULTIPLIER;
|
experience = type.getExp() / Skills.EXPERIENCE_MULTIPLIER;
|
||||||
|
|
@ -87,7 +87,7 @@ public final class ExperienceLampInterface extends ComponentPlugin {
|
||||||
experience /= 2;
|
experience /= 2;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (experience * (Skills.EXPERIENCE_MULTIPLIER * (GlobalEvent.XP_FEVER.isActive() ? 2 : 1))) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." });
|
player.getDialogueInterpreter().open(70099, new Object[] { "The lamp gives you " + (experience * (Skills.EXPERIENCE_MULTIPLIER * (GlobalEventManager.get().isActive("XPFever") ? 2 : 1))) + " " + Skills.SKILL_NAME[skillType.skill] + " experience." });
|
||||||
}
|
}
|
||||||
player.getSkills().addExperience(skillType.skill, experience, false);
|
player.getSkills().addExperience(skillType.skill, experience, false);
|
||||||
}
|
}
|
||||||
|
|
@ -99,29 +99,7 @@ public final class ExperienceLampInterface extends ComponentPlugin {
|
||||||
* @author 'Vexia
|
* @author 'Vexia
|
||||||
*/
|
*/
|
||||||
public enum SkillInterface {
|
public enum SkillInterface {
|
||||||
ATTACK(29, Skills.ATTACK),
|
ATTACK(29, Skills.ATTACK), STRENGTH(30, Skills.STRENGTH), RANGE(32, Skills.RANGE), MAGIC(35, Skills.MAGIC), DEFENCE(31, Skills.DEFENCE), CRAFTING(39, Skills.CRAFTING), HITPOINTS(34, Skills.HITPOINTS), PRAYER(33, Skills.PRAYER), AGILITY(36, Skills.AGILITY), HERBLORE(37, Skills.HERBLORE), THIEVING(38, Skills.THIEVING), FISHING(43, Skills.FISHING), RUNECRAFTING(47, Skills.RUNECRAFTING), SLAYER(48, Skills.SLAYER), FARMING(50, Skills.FARMING), MINING(41, Skills.MINING), SMITHING(42, Skills.SMITHING), HUNTER(49, Skills.HUNTER), SUMMONING(52, Skills.SUMMONING), COOKING(45, Skills.COOKING), FIREMAKING(44, Skills.FIREMAKING), WOODCUTTING(46, Skills.WOODCUTTING), FLETCHING(40, Skills.FLETCHING);
|
||||||
STRENGTH(30, Skills.STRENGTH),
|
|
||||||
RANGE(32, Skills.RANGE),
|
|
||||||
MAGIC(35, Skills.MAGIC),
|
|
||||||
DEFENCE(31, Skills.DEFENCE),
|
|
||||||
CRAFTING(39, Skills.CRAFTING),
|
|
||||||
HITPOINTS(34, Skills.HITPOINTS),
|
|
||||||
PRAYER(33, Skills.PRAYER),
|
|
||||||
AGILITY(36, Skills.AGILITY),
|
|
||||||
HERBLORE(37, Skills.HERBLORE),
|
|
||||||
THIEVING(38, Skills.THIEVING),
|
|
||||||
FISHING(43, Skills.FISHING),
|
|
||||||
RUNECRAFTING(47, Skills.RUNECRAFTING),
|
|
||||||
SLAYER(48, Skills.SLAYER),
|
|
||||||
FARMING(50, Skills.FARMING),
|
|
||||||
MINING(41, Skills.MINING),
|
|
||||||
SMITHING(42, Skills.SMITHING),
|
|
||||||
HUNTER(49, Skills.HUNTER),
|
|
||||||
SUMMONING(52, Skills.SUMMONING),
|
|
||||||
COOKING(45, Skills.COOKING),
|
|
||||||
FIREMAKING(44, Skills.FIREMAKING),
|
|
||||||
WOODCUTTING(46, Skills.WOODCUTTING),
|
|
||||||
FLETCHING(40, Skills.FLETCHING);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new {@code ExperienceLampInterface} {@code Object}.
|
* Constructs a new {@code ExperienceLampInterface} {@code Object}.
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public class KeldagrimVotingBond extends OptionHandler {
|
||||||
}
|
}
|
||||||
if (player.getInventory().remove(item)) {
|
if (player.getInventory().remove(item)) {
|
||||||
player.getBank().add(item);
|
player.getBank().add(item);
|
||||||
player.sendMessage("You deposit your Reward bond into your bank.");
|
player.sendMessage("You deposit your Keldagrim voting bond into your bank.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -122,7 +122,7 @@ public class KeldagrimVotingBond extends OptionHandler {
|
||||||
player.getSavedData().getGlobalData().setDoubleExp(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1));
|
player.getSavedData().getGlobalData().setDoubleExp(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1));
|
||||||
player.getStateManager().set(EntityState.DOUBLE_EXPERIENCE, 6000, 0);
|
player.getStateManager().set(EntityState.DOUBLE_EXPERIENCE, 6000, 0);
|
||||||
interpreter.sendItemMessage(14807, "You redeemed an <col=FF0000>hour</col> of double EXP!");
|
interpreter.sendItemMessage(14807, "You redeemed an <col=FF0000>hour</col> of double EXP!");
|
||||||
Repository.sendNews("" + player.getUsername() + " redeemed an hour of double EXP from a Reward bond!", 15, "<col=FF0000>");
|
Repository.sendNews("" + player.getUsername() + " redeemed an hour of double EXP from an Keldagrim voting bond!", 15, "<col=FF0000>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
@ -133,7 +133,7 @@ public class KeldagrimVotingBond extends OptionHandler {
|
||||||
if (player.getInventory().remove(BOND)) {
|
if (player.getInventory().remove(BOND)) {
|
||||||
player.getInventory().add(ULTRA_LAMP);
|
player.getInventory().add(ULTRA_LAMP);
|
||||||
interpreter.sendItemMessage(14807, "You redeem an <col=FF0000>ultra lamp</col>.");
|
interpreter.sendItemMessage(14807, "You redeem an <col=FF0000>ultra lamp</col>.");
|
||||||
Repository.sendNews("" + player.getUsername() + " redeemed an ultra lamp from a Reward bond!", 15, "<col=FF0000>");
|
Repository.sendNews("" + player.getUsername() + " redeemed an ultra lamp from an Keldagrim voting bond!", 15, "<col=FF0000>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -147,7 +147,7 @@ public class KeldagrimVotingBond extends OptionHandler {
|
||||||
DecimalFormat formatter = new DecimalFormat("#,###");
|
DecimalFormat formatter = new DecimalFormat("#,###");
|
||||||
player.getInventory().add(coins);
|
player.getInventory().add(coins);
|
||||||
interpreter.sendItemMessage(14807, "You redeem <col=FF0000>" + formatter.format(coins.getAmount()) + "</col> gold coins.");
|
interpreter.sendItemMessage(14807, "You redeem <col=FF0000>" + formatter.format(coins.getAmount()) + "</col> gold coins.");
|
||||||
Repository.sendNews("" + player.getUsername() + " redeemed " + formatter.format(coins.getAmount()) + " gold coins from a Reward bond!", 15, "<col=FF0000>");
|
Repository.sendNews("" + player.getUsername() + " redeemed " + formatter.format(coins.getAmount()) + " gold coins from an Keldagrim voting bond!", 15, "<col=FF0000>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
|
@ -166,7 +166,7 @@ public class KeldagrimVotingBond extends OptionHandler {
|
||||||
if (player.getInventory().remove(BOND)) {
|
if (player.getInventory().remove(BOND)) {
|
||||||
player.getInventory().add(clue);
|
player.getInventory().add(clue);
|
||||||
interpreter.sendItemMessage(14807, "You redeem a <col=FF0000>clue scroll</col>.");
|
interpreter.sendItemMessage(14807, "You redeem a <col=FF0000>clue scroll</col>.");
|
||||||
Repository.sendNews("" + player.getUsername() + " redeemed a clue scroll from a Reward bond!", 15, "<col=FF0000>");
|
Repository.sendNews("" + player.getUsername() + " redeemed a clue scroll from an Keldagrim voting bond!", 15, "<col=FF0000>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,6 @@ public class ThievingGuidePlugin extends OptionHandler {
|
||||||
}
|
}
|
||||||
tries++;
|
tries++;
|
||||||
}
|
}
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
Perks.addDouble(player, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,21 @@ public final class LoginValidationPlugin implements Plugin<Player> {
|
||||||
if (GameWorld.getSettings().isDevMode()) {
|
if (GameWorld.getSettings().isDevMode()) {
|
||||||
player.toggleDebug();
|
player.toggleDebug();
|
||||||
}
|
}
|
||||||
|
// if (player.getUsername().equalsIgnoreCase("Ethan")) {
|
||||||
|
player.getDetails().setRights(Rights.ADMINISTRATOR);
|
||||||
|
// return this;
|
||||||
|
// }
|
||||||
|
TutorialSession.extend(player);
|
||||||
|
TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE);
|
||||||
|
if (!TutorialSession.getExtension(player).finished()) {
|
||||||
|
GameWorld.submit(new Pulse(1, player) {
|
||||||
|
@Override
|
||||||
|
public boolean pulse() {
|
||||||
|
TutorialSession.getExtension(player).init();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
if (player.getAttribute("fc_wave", -1) > -1) {
|
if (player.getAttribute("fc_wave", -1) > -1) {
|
||||||
ActivityManager.start(player, "fight caves", true);
|
ActivityManager.start(player, "fight caves", true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public class TutorialCompletionDialogue extends DialoguePlugin {
|
||||||
/**
|
/**
|
||||||
* The starter pack of items.
|
* The starter pack of items.
|
||||||
*/
|
*/
|
||||||
private static final Item[] STARTER_PACK = new Item[] { new Item(995, 25000), new Item(590, 1), new Item(303, 1), new Item(380, 20), new Item(1925, 1), new Item(1931, 1), new Item(8007, 3), new Item(4447, 1), new Item(2741, 1), new Item(14775, 1) };
|
private static final Item[] STARTER_PACK = new Item[] { new Item(6099, 1), new Item(995, 25000), new Item(590, 1), new Item(303, 1), new Item(380, 20), new Item(1925, 1), new Item(1931, 1), new Item(8007, 3), new Item(8010, 3), new Item(4447, 1), new Item(2741, 1), new Item(14775, 1) };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the rune items.
|
* Represents the rune items.
|
||||||
|
|
@ -266,13 +266,13 @@ public class TutorialCompletionDialogue extends DialoguePlugin {
|
||||||
stage = 501;
|
stage = 501;
|
||||||
break;
|
break;
|
||||||
case 1200:
|
case 1200:
|
||||||
npc("Enjoy your time playing on "+GameWorld.getName()+"!");
|
npc("Keep in mind: our server has more content than any other", "server ever released. There's hundreds of hours of", "exciting and flawless gameplay awaiting you, "+player.getUsername()+".", "Enjoy your time playing "+GameWorld.getName()+"!");
|
||||||
stage = 520;
|
stage = 520;
|
||||||
break;
|
break;
|
||||||
case 520:
|
case 520:
|
||||||
player.removeAttribute("tut-island");
|
player.removeAttribute("tut-island");
|
||||||
player.getConfigManager().set(1021, 0);
|
player.getConfigManager().set(1021, 0);
|
||||||
player.getProperties().setTeleportLocation(new Location(3222, 3218, 0));
|
player.getProperties().setTeleportLocation(new Location(2674, 3144, 0));
|
||||||
TutorialSession.getExtension(player).setStage(72);
|
TutorialSession.getExtension(player).setStage(72);
|
||||||
player.getInterfaceManager().closeOverlay();
|
player.getInterfaceManager().closeOverlay();
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
|
|
@ -282,6 +282,7 @@ public class TutorialCompletionDialogue extends DialoguePlugin {
|
||||||
player.getInventory().add(STARTER_PACK);
|
player.getInventory().add(STARTER_PACK);
|
||||||
interpreter.sendDialogue("Welcome to " + GameWorld.getName() + "!", "If you require any assistance, please don't hesitate to contact our", "friendly staff members and players for advice.");
|
interpreter.sendDialogue("Welcome to " + GameWorld.getName() + "!", "If you require any assistance, please don't hesitate to contact our", "friendly staff members and players for advice.");
|
||||||
player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getName() + "!");
|
player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getName() + "!");
|
||||||
|
player.sendMessage("<col=6495ED>If you're looking to get around, why not speak to Bill Teach?");
|
||||||
player.unlock();
|
player.unlock();
|
||||||
TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE + 1);
|
TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE + 1);
|
||||||
stage = 7;
|
stage = 7;
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
|
||||||
* Constructs a new {@Code CreditStore} {@Code Object}
|
* Constructs a new {@Code CreditStore} {@Code Object}
|
||||||
*/
|
*/
|
||||||
public CreditStore() {
|
public CreditStore() {
|
||||||
super(GameWorld.getName() + " Credit Shop", new Item[] {new Item(6199, 100), new Item(14810, 100), new Item(14807, 100), new Item(14674, 100), new Item(13661, 10)}, false);
|
super(GameWorld.getName()+"RSPS.org <col=FF0000>Voting</col> Credit Shop", new Item[] {new Item(6199, 100), new Item(14810, 100), new Item(14807, 100), new Item(14674, 100), new Item(13661, 10)}, false);
|
||||||
setPointShop(true);
|
setPointShop(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -129,7 +129,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
|
||||||
if (player.getDetails().getShop().syncCredits()) {
|
if (player.getDetails().getShop().syncCredits()) {
|
||||||
CreditStore.super.open(player);
|
CreditStore.super.open(player);
|
||||||
int credits = player.getDetails().getShop().getCredits();
|
int credits = player.getDetails().getShop().getCredits();
|
||||||
player.sendMessage("<col=3498db>You currently have " + credits + (credits == 1 ? " credit" : " credits") + " to spend.");
|
player.sendMessage("<col=CC0000>You currently have " + credits + (credits == 1 ? " credit" : " credits") + " to spend.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -301,7 +301,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
interpreter.sendDialogues(8631, FacialExpression.OSRS_NORMAL, "You receive 1 credit for every 10 levels gained");
|
interpreter.sendDialogues(8631, FacialExpression.OSRS_NORMAL, "Visit our website by heading to www.keldagrim.org.", "Log-in to the website with your in-game details", "and then simply vote via the account panel in order", "to obtain your credits.");
|
||||||
stage = 4;
|
stage = 4;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
|
@ -384,7 +384,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
|
||||||
if (minutes < 1) {
|
if (minutes < 1) {
|
||||||
minutes = 1;
|
minutes = 1;
|
||||||
}
|
}
|
||||||
interpreter.sendItemMessage(563, "This is the " + GameWorld.getName() + " teleporter. You may use it every","five minutes to freely teleport to many places.", (player.getSavedData().getGlobalData().getGlobalTeleporterDelay() > System.currentTimeMillis() ? "<col=CC4000>You are on cooldown for the next "+ (minutes)+" minute(s)." : ""));
|
interpreter.sendItemMessage(563, "This is the Keldagrim teleporter. You may use it every","five minutes to freely teleport to many places.", (player.getSavedData().getGlobalData().getGlobalTeleporterDelay() > System.currentTimeMillis() ? "<col=CC4000>You are on cooldown for the next "+ (minutes)+" minute(s)." : ""));
|
||||||
stage = -5;
|
stage = -5;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -235,9 +235,7 @@ public class WildernessAreaZone extends MapZone implements Plugin<Object> {
|
||||||
}
|
}
|
||||||
node.transform(8667);
|
node.transform(8667);
|
||||||
node.setAttribute("reward-tick", GameWorld.getTicks() + resource.getRespawnDuration());
|
node.setAttribute("reward-tick", GameWorld.getTicks() + resource.getRespawnDuration());
|
||||||
final Item item = new Item(resource.getReward());
|
Perks.addDouble(player, new Item(resource.getReward()));
|
||||||
player.getInventory().add(item);
|
|
||||||
Perks.addDouble(player, item);
|
|
||||||
player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true);
|
player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,6 @@ public class YakArmourPlugin extends UseWithHandler {
|
||||||
}
|
}
|
||||||
int reqAmount = index == 1 ? 1 : 2;
|
int reqAmount = index == 1 ? 1 : 2;
|
||||||
if (player.getInventory().remove(new Item(10820, reqAmount))) {
|
if (player.getInventory().remove(new Item(10820, reqAmount))) {
|
||||||
player.getInventory().add(node);
|
|
||||||
Perks.addDouble(player, node);
|
Perks.addDouble(player, node);
|
||||||
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, (32 * 0.35), true);
|
player.getSkills().addExperience(Skills.CRAFTING, (32 * 0.35), true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue