a bunch of changes

This commit is contained in:
RedSparr0w 2019-11-03 11:28:49 +13:00
parent fb0967416a
commit d6482df67f
67 changed files with 1544 additions and 745 deletions

View file

@ -1,4 +1,4 @@
@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.keldagrim.Management server1.properties
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

View file

@ -1,4 +1,4 @@
@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.keldagrim.Management server2.properties
pause
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

View file

@ -1,4 +1,4 @@
@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.keldagrim.Management server3.properties
pause
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

View file

@ -0,0 +1,87 @@
package org.crandor;
import org.crandor.game.system.SystemLogger;
import org.crandor.game.system.SystemShutdownHook;
import org.crandor.game.system.mysql.SQLManager;
import org.crandor.game.world.GameSettings;
import org.crandor.game.world.GameWorld;
import org.crandor.gui.ConsoleFrame;
import org.crandor.net.NioReactor;
import org.crandor.net.amsc.WorldCommunicator;
import org.crandor.tools.TimeStamp;
import org.crandor.tools.backup.AutoBackup;
import java.net.BindException;
/**
* The main class, for those that are unable to read the class' name.
* @author Emperor
* @author Vexia
*
*/
public final class Main{
/**
* The time stamp of when the server started running.
*/
public static long startTime;
/**
* The NIO reactor.
*/
public static NioReactor reactor;
private static AutoBackup backup;
/**
* The main method, in this method we load background utilities such as
* cache and our world, then end with starting networking.
* @param args The arguments cast on runtime.
* @throws Throwable When an exception occurs.
*/
public static void main(String... args) throws Throwable {
if (args.length > 0) {
GameWorld.setSettings(GameSettings.parse(args));
}
if (GameWorld.getSettings().isGui()) {
ConsoleFrame.getInstance().init();
}
startTime = System.currentTimeMillis();
final TimeStamp t = new TimeStamp();
// backup = new AutoBackup();
GameWorld.prompt(true);
SQLManager.init();
Runtime.getRuntime().addShutdownHook(new Thread(new SystemShutdownHook()));
SystemLogger.log("Starting NIO reactor...");
try {
reactor = NioReactor.configure(43594 + GameWorld.getSettings().getWorldId());
} catch (BindException e) {
System.out.println("Port " + 43594 + GameWorld.getSettings().getWorldId() + " is already in use!");
throw e;
}
WorldCommunicator.connect();
reactor.start();
SystemLogger.log(GameWorld.getName() + " flags " + GameWorld.getSettings().toString());
SystemLogger.log(GameWorld.getName() + " started in " + t.duration(false, "") + " milliseconds.");
}
/**
* Gets the startTime.
* @return the startTime
*/
public static long getStartTime() {
return startTime;
}
/**
* Sets the bastartTime.
* @param startTime the startTime to set.
*/
public static void setStartTime(long startTime) {
Main.startTime = startTime;
}
}

View file

@ -16,8 +16,7 @@ public final class ServerConstants {
* The administrators.
*/
public static final String[] ADMINISTRATORS = {
"ethan",
"austin",
"RedSparr0w",
};
/**
@ -48,41 +47,120 @@ public final class ServerConstants {
/**
* The start location for a fresh account.
*/
public static final Location START_LOCATION = Location.create(3232, 3231, 0);
public static final Location START_LOCATION = Location.create(3094, 3107, 0);
/**
* The main home teleport location.
*/
public static final Location HOME_LOCATION = Location.create(3221, 3218, 0);
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" } };
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" } };
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[] {"Donations on Keldagrim are different than those elsewhere.", "Here we use a perk system.", "There are many different type of perks that can be bought to", "speed up efficiency, but nothing game breaking. By doing this", "we provide players with ways to support Keldagrim, in a manner" , "that doesn't ruin the economy or provide substantial advantages.", "If you would like to check out our perks please visit", "keldagrim.com/donate/." };
public static final String[] MESSAGES = new String[] {"Welcome!" };
public static final String[] DATABASE_NAMES = {
"keldagr1_server", "keldagr1_global"
"server", "global"
};
public static final Database[] DATABASES = {
new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? getDatabasePassword() : "2jf4wkz$")),
new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? getDatabasePassword() : "2jf4wkz$"))
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"))
};
private static String getDatabasePassword() {
return "";
}
/**
* If MySQL is enabled.
*/

View file

@ -0,0 +1,29 @@
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);
}
}

View file

@ -24,7 +24,7 @@ public final class BankContainer extends Container {
/**
* The bank container size.
*/
public static final int SIZE = 496;
public static final int SIZE = 800;
/**
* The maximum amount of bank tabs

View file

@ -304,7 +304,7 @@ public final class DialogueInterpreter {
player.getPacketDispatch().sendString(messages[i], 372, i + 1);
}
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();
}
@ -497,7 +497,7 @@ public final class DialogueInterpreter {
player.getPacketDispatch().sendString(messages[i].toString().replace("@name", player.getUsername()), interfaceId, (i + 4));
}
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);
return player.getInterfaceManager().getChatbox();

View file

@ -50,10 +50,8 @@ public final class DropItemHandler {
if (player.getInventory().replace(null, item.getSlot()) == item) {
item = item.getDropItem();
player.getAudioManager().send(new Audio(item.getId() == 995 ? 10 : 2739, 1, 0));
if (!player.getDetails().getRights().equals(Rights.ADMINISTRATOR) || !player.getAttribute("tut-island", false)) {
GroundItemManager.create(item, player.getLocation(), player);
PlayerParser.dump(player);
}
GroundItemManager.create(item, player.getLocation(), player);
PlayerParser.dump(player);
} else {
GroundItemManager.create(item, player.getLocation(), player).setDecayTime(99);
PlayerParser.dump(player);

View file

@ -173,7 +173,9 @@ public class CookingProperties {
public boolean cook(final Food food, final Player player, final GameObject object, final boolean burned) {
if (player.getInventory().remove(food.getRaw())) {
if (!burned) {
Perks.addDouble(player, food.getItem());
Item item = food.getItem();
player.getInventory().add(item);
Perks.addDouble(player, item);
} else {
player.getInventory().add(food.getBurnt());
}

View file

@ -3,7 +3,7 @@ package org.crandor.game.content.skill;
import org.crandor.game.content.global.SkillcapePerks;
import org.crandor.game.content.global.tutorial.TutorialSession;
import org.crandor.game.content.holiday.HolidayEvent;
import org.crandor.game.events.GlobalEventManager;
import org.crandor.game.events.GlobalEvent;
import org.crandor.game.node.entity.Entity;
import org.crandor.game.node.entity.combat.ImpactHandler;
import org.crandor.game.node.entity.npc.NPC;
@ -28,7 +28,7 @@ public final class Skills {
/**
* Represents the constant modifier of experience.
*/
public static final double EXPERIENCE_MULTIPLIER = 35.3;
public static final double EXPERIENCE_MULTIPLIER = 20;
/**
* The maximum experience multiplier.
@ -258,7 +258,7 @@ public final class Skills {
if (!(entity instanceof Player)) {
return 1.0;
}
double mod = multiplyer ? (GlobalEventManager.get().isActive("XPFever") ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1;
double mod = multiplyer ? (GlobalEvent.XP_FEVER.isActive() ? EXPERIENCE_MULTIPLIER * 2 : EXPERIENCE_MULTIPLIER) : 1;
Player p = (Player) entity;
if (p.getIronmanManager().getMode() == IronmanMode.ULTIMATE) {
mod /= 4;
@ -267,12 +267,13 @@ public final class Skills {
}
//A boost for combat skills that are under level 65.
if(entity instanceof Player && !this.hasLevel(slot, 65) && isCombat(slot)){
mod *= 2.0;
mod *= 1.5;
}
//Grand Exchange region XP boost.
if(entity.getViewport().getRegion().getRegionId() == 12598){
mod += 1.5;
}
// Pest control, XP halved during the game
if (entity.getViewport().getRegion().getRegionId() == 10536) {
mod *= .5;
}

View file

@ -100,7 +100,9 @@ public final class DragonCraftPulse extends SkillPulse<Item> {
} else {
player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(ItemDefinition.forId(hide.getProduct()).getName().toLowerCase()) ? "an" : "a") + " " + ItemDefinition.forId(hide.getProduct()).getName().toLowerCase() + ".");
}
Perks.addDouble(player, new Item(hide.getProduct()));
Item item = new Item(hide.getProduct());
player.getInventory().add(item);
Perks.addDouble(player, item);
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
player.getSkills().addExperience(Skills.CRAFTING, (hide.getExperience() * 0.35), true);

View file

@ -80,7 +80,9 @@ public final class HardCraftPulse extends SkillPulse<Item> {
}
}
if (player.getInventory().remove(new Item(LeatherCrafting.HARD_LEATHER))) {
Perks.addDouble(player, new Item(1131));
Item item = new Item(1131);
player.getInventory().add(item);
Perks.addDouble(player, item);
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
player.getSkills().addExperience(Skills.CRAFTING, (35 * 0.35), true);
player.sendMessage("Your golden needle rewards you with some extra XP!");

View file

@ -87,7 +87,9 @@ public final class SnakeSkinPulse extends SkillPulse<Item> {
}
}
if (player.getInventory().remove(new Item(6289, skin.getRequiredAmount()))) {
Perks.addDouble(player, skin.getProduct());
Item item = skin.getProduct();
player.getInventory().add(item);
Perks.addDouble(player, item);
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
player.getSkills().addExperience(Skills.CRAFTING, (skin.getExperience() * 0.35), true);
player.sendMessage("Your golden needle rewards you with some extra XP!");

View file

@ -98,7 +98,9 @@ public final class SoftCraftPulse extends SkillPulse<Item> {
} else {
player.getPacketDispatch().sendMessage("You make " + (StringUtils.isPlusN(soft.getProduct().getName()) ? "an" : "a") + " " + soft.getProduct().getName().toLowerCase() + ".");
}
Perks.addDouble(player, soft.getProduct());
Item item = soft.getProduct();
player.getInventory().add(item);
Perks.addDouble(player, item);
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
player.getSkills().addExperience(Skills.CRAFTING, (soft.getExperience() * 0.35), true);
player.sendMessage("Your golden needle rewards you with some extra XP!");

View file

@ -73,7 +73,9 @@ public final class GemCutPulse extends SkillPulse<Item> {
return false;
}
if (player.getInventory().remove(gem.getUncut())) {
Perks.addDouble(player, gem.getGem());
final Item item = gem.getGem();
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.CRAFTING, gem.getExp(), true);
}
amount--;

View file

@ -66,7 +66,9 @@ public final class JewelleryPulse extends SkillPulse<Item> {
return false;
}
if (player.getInventory().remove(getItems())) {
Perks.addDouble(player, new Item(type.getSendItem()));
final Item item = new Item(type.getSendItem());
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.CRAFTING, type.getExperience(), true);
}
amount--;

View file

@ -75,7 +75,9 @@ 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)) {
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 0, 9, true);
}
Perks.addDouble(player, pottery.getProduct());
final Item item = pottery.getProduct();
player.getInventory().add(item);
Perks.addDouble(player, item);
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 remove a " + pottery.getProduct().getName().toLowerCase() + " from the oven.");

View file

@ -81,7 +81,9 @@ public final class PotteryPulse extends SkillPulse<Item> {
if (pottery == PotteryItem.BOWL && player.getLocation().getX() == 3086) {
player.setAttribute("spun-bowl", true);
}
Perks.addDouble(player, pottery.getUnfinished());
final Item item = pottery.getUnfinished();
player.getInventory().add(item);
Perks.addDouble(player, item);
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() + ".");
}

View file

@ -72,7 +72,9 @@ public final class SpinningPulse extends SkillPulse<Item> {
return false;
}
if (player.getInventory().remove(new Item(type.getNeed(), 1))) {
Perks.addDouble(player, new Item(type.getProduct(), 1));
final Item item = new Item(type.getProduct(), 1);
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.CRAFTING, type.getExp(), true);
}
ammount--;

View file

@ -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.Skills;
import org.crandor.game.content.skill.member.summoning.familiar.Forager;
import org.crandor.game.events.GlobalEventManager;
import org.crandor.game.events.GlobalEvent;
import org.crandor.game.node.entity.npc.NPC;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.node.entity.player.info.portal.Perks;
@ -181,10 +181,12 @@ public final class FishingPulse extends SkillPulse<NPC> {
player.getSkillTasks().decreaseTask(player, SkillTasks.FTUNA2);
}
if (GlobalEventManager.get().isActive("Plenty of fish"))
if (GlobalEvent.PLENTY_OF_FISH.isActive())
player.getInventory().add(fish.getItem());
SkillingPets.checkPetDrop(player, SkillingPets.HERON);
Perks.addDouble(player, fish.getItem());
final Item item = fish.getItem();
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.FISHING, fish.getExperience(), true);
message(2);
if (TutorialSession.getExtension(player).getStage() == 13) {

View file

@ -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.Skills;
import org.crandor.game.content.skill.member.farming.wrapper.PatchWrapper;
import org.crandor.game.events.GlobalEventManager;
import org.crandor.game.events.GlobalEvent;
import org.crandor.game.node.entity.impl.Projectile;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.node.entity.player.info.portal.Perks;
@ -39,9 +39,24 @@ 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) };
/**
* If the player is mining.
* Is the player is mining.
*/
private boolean mining;
private boolean isMining;
/**
* 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.
@ -71,18 +86,21 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
if (TutorialSession.getExtension(player).getStage() == 35) {
TutorialStage.load(player, 36, false);
}
mining = resource.getSkillId() == Skills.MINING;
isMining = resource.getSkillId() == Skills.MINING;
isMiningEssence = resource == SkillingResource.RUNE_ESSENCE;
isMiningGems = resource.getReward() == SkillingResource.GEM_ROCK_0.getReward();
isWoodcutting = resource.getSkillId() == Skills.WOODCUTTING;
super.start();
}
@Override
public boolean checkRequirements() {
if (player.getSkills().getLevel(resource.getSkillId()) < resource.getLevel()) {
player.getPacketDispatch().sendMessage("You need a " + Skills.SKILL_NAME[resource.getSkillId()] + " level of " + resource.getLevel() + " to " + (mining ? "mine this rock." : "cut this tree."));
player.getPacketDispatch().sendMessage("You need a " + Skills.SKILL_NAME[resource.getSkillId()] + " level of " + resource.getLevel() + " to " + (isMining ? "mine this rock." : "cut this tree."));
return false;
}
if (setTool() == null) {
player.getPacketDispatch().sendMessage("You do not have a" + (mining ? " pickaxe" : "n axe") + " to use.");
player.getPacketDispatch().sendMessage("You do not have a" + (isMining ? " pickaxe" : "n axe") + " to use.");
return false;
}
if (player.getInventory().freeSlots() < 1) {
@ -103,7 +121,7 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
@Override
public boolean reward() {
if (++ticks % (resource == SkillingResource.RUNE_ESSENCE ? 3 : 4) != 0) {
if (++ticks % (isMiningEssence ? 3 : 4) != 0) {
return false;
}
if (node.getId() == 10041) {
@ -124,112 +142,42 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
} else if (tutorialStage == 37 && node.getId() == 3042) {
TutorialStage.load(player, 39, false);
}
if (resource.getSkillId() == Skills.WOODCUTTING && player.getLocation().getRegionId() == 12102) {
// If player is in donator zone
if (isWoodcutting && player.getLocation().getRegionId() == 12102) {
player.getAntiMacroHandler().fireEvent("tree spirit");
return true;
}
if (resource.getSkillId() == Skills.WOODCUTTING && tool.getId() == 13661 && RandomFunction.random(100) < 30){
// 20% chance to auto burn logs when using "inferno adze" item
if (isWoodcutting && tool.getId() == 13661 && RandomFunction.random(100) < 20){
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();
player.getSkills().addExperience(Skills.WOODCUTTING, resource.getExperience());
player.getSkills().addExperience(Skills.FIREMAKING, resource.getExperience());
return false;
}
if (resource.getReward() > 0) {
int reward = resource.getReward();
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);
int reward = resource.getReward();
if (reward > 0) {
reward = calculateReward(reward);
applyAchievementTask(reward);
// Give the player the items
int rewardAmount = calculateRewardAmount(reward);
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() + ".");
}
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 (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) {
// Calculate if the player should receive a bonus gem
if (!isMiningEssence && isMining) {
int chance = 282;
boolean altered = false;
if (player.getEquipment().getNew(EquipmentContainer.SLOT_RING).getId() == 2572) {
@ -252,28 +200,25 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
}
}
}
if (mining && resource.getReward() == 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);
// Calculate if the player should receive a bonus birds nest
if (isWoodcutting) {
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);
}
}
}
// Tutorial stuff, maybe?
if (tutorialStage == 7) {
TutorialStage.load(player, 8, false);
}
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);
// not sure what this is exactly
if (resource.getRespawnRate() != 0) {
int charge = 1000 / resource.getRewardAmount();
node.setCharge(node.getCharge() - RandomFunction.random(charge, charge << 2));
@ -297,23 +242,165 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
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.
* @return {@code True} if so.
*/
private boolean checkReward() {
int skill = mining ? Skills.MINING : Skills.WOODCUTTING;
int skill = isMining ? Skills.MINING : Skills.WOODCUTTING;
int level = 1 + player.getSkills().getLevel(skill) + player.getFamiliarManager().getBoost(skill);
double hostRatio = Math.random() * (100.0 * resource.getRate());
double clientRatio = Math.random() * ((level - resource.getLevel()) * (1.0 + tool.getRatio()));
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
public void message(int type) {
switch (type) {
case 0:
player.getPacketDispatch().sendMessage("You swing your " + (mining ? "pickaxe at the rock..." : "axe at the tree..."));
player.getPacketDispatch().sendMessage("You swing your " + (isMining ? "pickaxe at the rock..." : "axe at the tree..."));
if (TutorialSession.getExtension(player).getStage() == 6) {
player.lock(7);
TutorialStage.load(player, 7, false);
@ -326,7 +413,7 @@ public final class GatheringSkillPulse extends SkillPulse<GameObject> {
* Sets the tool used.
*/
private SkillingTool setTool() {
if (!mining) {
if (!isMining) {
tool = SkillingTool.getHatchet(player);
} else {
tool = SkillingTool.getPickaxe(player);

View file

@ -17,17 +17,67 @@ public enum SkillingResource {
/**
* Standard tree (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_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),
/**
* Fruit trees.
*/
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),
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),
/**
* 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_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_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),
/**
* Dramen tree (Woodcutting/Lost city quest).
@ -37,14 +87,22 @@ public enum SkillingResource {
/**
* Evergreen (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_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),
/**
* 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_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_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_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_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),
/**
* Achey tree (Woodcutting).
@ -54,27 +112,39 @@ public enum SkillingResource {
/**
* 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_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_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),
/**
* 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_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_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),
/**
* Teak (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_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),
/**
* 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_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_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),
/**
* 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_2(4060, 45, 0.6, 58 | 100 << 16, 82.5, 3239, 30, "hollow tree", null, 4061, 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),
/**
* Mahogany (Woodcutting).
@ -89,29 +159,111 @@ public enum SkillingResource {
/**
* Eucalyptus tree (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_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),
/**
* Yew tree (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(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),
/**
* 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_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_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),
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_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_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),
/**
* 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_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_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),
/**
* Rune/Pure essence (Mining).
@ -121,33 +273,192 @@ public enum SkillingResource {
/**
* Clay (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_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),
/**
* Limestone.
*/
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_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),
/**
* Blurite ore.
*/
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_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),
/**
* Iron ore.
*/
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_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_49(42034, 15, 0.2, 15 | 25 << 16, 35.0, 440, 1, "iron rocks", null, 450, Skills.MINING),
/**
* Silver ore.
*/
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_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),
/**
* Coal.
*/
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_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_49(42035, 30, 0.4, 50 | 100 << 16, 50.0, 453, 1, "coal", null, 452, Skills.MINING),
/**
* Sandstone.
*/
@ -156,8 +467,43 @@ public enum SkillingResource {
/**
* Gold ore.
*/
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_49(42033, 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_49(42033, 40, 0.6, 100 | 200 << 16, 65.0, 444, 1, "gold rocks", null, 452, Skills.MINING),
/**
* Granite.
*/
@ -171,8 +517,51 @@ public enum SkillingResource {
/**
* Mithril ore.
*/
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_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_49(42036, 55, 0.70, 200 | 400 << 16, 80.0, 447, 1, "mithril rocks", null, 452, Skills.MINING),
/**
* Adamantite ore.
*/
@ -181,8 +570,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_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_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_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_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_9(14863, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 25372, Skills.MINING),
@ -217,16 +606,32 @@ 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_39(42037, 70, 0.85, 400 | 800 << 16, 95.0, 449, 1, "adamant rocks", null, 452, Skills.MINING),
/**
* Runite ore.
*/
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_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),
/**
* Gem rocks.
*/
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_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);
/**
* The resources mapping.

View file

@ -3,6 +3,7 @@ package org.crandor.game.content.skill.free.runecrafting;
import org.crandor.game.container.impl.EquipmentContainer;
import org.crandor.game.content.skill.SkillPulse;
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.player.Player;
import org.crandor.game.node.entity.player.info.portal.Perks;
@ -175,6 +176,7 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
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.getInventory().add(i);
Perks.addDouble(player, i);
player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * amount, true);
}
@ -193,7 +195,9 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
}
}
player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * 2, true);
Perks.addDouble(player, rune.getRune());
Item runeItem = rune.getRune();
player.getInventory().add(runeItem);
Perks.addDouble(player, runeItem);
}
}
}
@ -300,9 +304,14 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
i++;
}
}
if (player.hasPerk(Perks.RUNESTONE_KNOWLEDGE) && (altar == Altar.DEATH || altar == Altar.LAW || altar == Altar.COSMIC || altar == Altar.BLOOD || altar == Altar.NATURE)) {
i *= 2;
}
if(GlobalEvent.GOLDEN_ESSENCE.isActive()) {
i *= 3;
}
return i != 0 ? i : 1;
}

View file

@ -62,7 +62,7 @@ public class SmithingPulse extends SkillPulse<Item> {
player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with.");
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 true;
@ -80,7 +80,9 @@ public class SmithingPulse extends SkillPulse<Item> {
return false;
}
player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired()));
Perks.addDouble(player, (new Item(node.getId(), bar.getSmithingType().getProductAmount())));
final Item item = 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);
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() + ".");

View file

@ -178,7 +178,9 @@ public final class SpadePulse extends ToolAction {
* @return {@code True} if harvested.
*/
private boolean harvestPatch() {
Perks.addDouble(player, wrapper.getNode().getProduct());
final Item item = wrapper.getNode().getProduct();
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.FARMING, wrapper.getNode().getExperiences()[1], true);
wrapper.getCycle().setHarvestAmount(wrapper.getCycle().getHarvestAmount() - 1);
if (wrapper.getCycle().getHarvestAmount() < 1) {

View file

@ -64,7 +64,9 @@ public final class FletchingPulse extends SkillPulse<Item> {
return false;
}
if (player.getInventory().remove(fletch.getType().getLog())) {
Perks.addDouble(player, fletch.getProduct());
final Item item = fletch.getProduct();
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.FLETCHING, fletch.getExperience(), true);
String message = getMessage();
player.getPacketDispatch().sendMessage(message);

View file

@ -84,7 +84,9 @@ public final class HerbTarPulse extends SkillPulse<Item> {
return false;
}
if (player.getInventory().containsItem(SWAMP_TAR) && player.getInventory().containsItem(tar.getIngredient()) && player.getInventory().remove(SWAMP_TAR) && player.getInventory().remove(tar.getIngredient())) {
Perks.addDouble(player, new Item(tar.getTar().getId(), 15));
final Item item = new Item(tar.getTar().getId(), 15);
player.getInventory().add(item);
Perks.addDouble(player, item);
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.");
} else {

View file

@ -115,7 +115,9 @@ public final class HerblorePulse extends SkillPulse<Item> {
player.animate(ANIMATION);
}
if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) {
Perks.addDouble(player, potion.getProduct());
final Item item = 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.");
if (cycles++ == 3) {
player.animate(ANIMATION);
@ -129,7 +131,9 @@ public final class HerblorePulse extends SkillPulse<Item> {
*/
public void handleFinished() {
if ((player.getInventory().containsItem(potion.getBase()) && player.getInventory().containsItem(potion.getIngredient())) && player.getInventory().remove(potion.getBase(), potion.getIngredient())) {
Perks.addDouble(player, potion.getProduct());
final Item item = potion.getProduct();
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.HERBLORE, potion.getExperience(), true);
player.getPacketDispatch().sendMessage("You mix the " + potion.getIngredient().getName().toLowerCase() + " into your potion.");
player.animate(ANIMATION);

View file

@ -74,7 +74,9 @@ public class BNetNode {
public void reward(Player player, NPC npc) {
if (!isBareHand(player)) {
if (player.getInventory().remove(getJar())) {
Perks.addDouble(player, getReward());
final Item item = getReward();
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.HUNTER, getExperience(player), true);
}
} else {

View file

@ -168,7 +168,9 @@ public final class SummoningCreator {
}
}
if (player.getInventory().remove(type.getRequired())) {
Perks.addDouble(player, type.getProduct());
final Item item = type.getProduct();
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(Skills.SUMMONING, type.getExperience(), true);
}
}

File diff suppressed because one or more lines are too long

View file

@ -12,6 +12,7 @@ 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.diary.DiaryType;
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.update.flag.context.Animation;
import org.crandor.tools.RandomFunction;
@ -101,7 +102,9 @@ public final class PickpocketPulse extends SkillPulse<NPC> {
player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).updateTask(player, 1, 6, true);
}
player.getSkills().addExperience(Skills.THIEVING, type.getExperience(), true);
Perks.addDouble(player, type.getRandomLoot(player), true);
Item loot = type.getRandomLoot(player);
player.getInventory().add(loot);
Perks.addDouble(player, loot, true);
player.getPacketDispatch().sendMessage(type.getRewardMessage().replace("@name", node.getName().toLowerCase()));
} else {
node.animate(NPC_ANIM);

View file

@ -11,9 +11,27 @@ import org.crandor.tools.RandomFunction;
* @author 'Vexia
*/
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), 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),
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),
// ape atoll:
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);
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);
/**
* Constructs a new {@code Stall} {@code Object}.

View file

@ -96,7 +96,6 @@ public final class StallThiefPulse extends SkillPulse<GameObject> {
}
final boolean success = success();
if (success) {
final Item item = stall.getRandomLoot();
if (stall == Stall.SILK_STALL) {
player.getSavedData().getGlobalData().setSilkSteal(System.currentTimeMillis() + 1800000);
}
@ -106,6 +105,8 @@ public final class StallThiefPulse extends SkillPulse<GameObject> {
if (node.isActive()) {
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);
player.getSkills().addExperience(Skills.THIEVING, stall.getExperience(), true);
if (item.getId() == 1987) {

View file

@ -1,30 +1,83 @@
package org.crandor.game.events;
public class GlobalEvent {
import org.crandor.Util;
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;
private String eventName;
private long remainingTicks;
GlobalEvent(final String eventDescription) {
this.eventName = Util.enumToString(this.name());;
this.eventDescription = eventDescription;
this.remainingTicks = 0L;
}
public String getEventName() {
public String getName() {
return this.eventName;
}
public long getRemainingTicks() {
public String getDescription() {
return this.eventDescription;
}
public Long getRemainingTicks() {
return this.remainingTicks;
}
public GlobalEvent(String eventName, long ticks) {
this.eventName = eventName;
public GlobalEvent setRemainingTicks(Long ticks) {
this.remainingTicks = ticks;
}
public GlobalEvent process() {
remainingTicks--;
return this;
}
public Boolean isActive() {
return this.remainingTicks > 0;
}
public GlobalEvent tick() {
remainingTicks--;
return this;
}
// Start/Extend the event
public GlobalEvent extend() {
remainingTicks += 6000;
return extend(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;
}

View file

@ -1,5 +1,6 @@
package org.crandor.game.events;
import org.crandor.Util;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.system.task.Pulse;
import org.crandor.game.world.GameWorld;
@ -7,11 +8,6 @@ import org.crandor.game.world.callback.CallBack;
import org.crandor.game.world.repository.Repository;
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.
*
@ -20,27 +16,12 @@ import java.util.Map.Entry;
*/
public class GlobalEventManager implements CallBack {
private static Map<String, Long> EVENTS = new HashMap<String, Long>();
private long tick = 0;
private String lastEvent;
private String currentEvent;
private GlobalEvent lastEvent;
private GlobalEvent currentEvent;
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;
}
@ -50,26 +31,21 @@ public class GlobalEventManager implements CallBack {
@Override
public boolean pulse() {
tick++;
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
while(iterator.hasNext()) {
Map.Entry<String, Long> entry = iterator.next();
if (entry.getValue() > 0) {
entry.setValue(entry.getValue() - 1);
if (entry.getValue() == 3000)
message("You have 30 minutes before " + entry.getKey() + " ends on world " + GameWorld.getSettings().getWorldId() + ".");
for(GlobalEvent event : GlobalEvent.values()){
Long ticksRemaining = event.getRemainingTicks();
if (ticksRemaining > 0) {
event.tick();
--ticksRemaining;
if (ticksRemaining <= 0)
message("The " + event.getName() + " event has now ended.");
else if (ticksRemaining % 3000 == 0)
message("You have " + Math.round(ticksRemaining / 100) + " minutes before the " + event.getName() + " event ends.");
if (entry.getValue() <= 0) {
message("The event " + entry.getKey() + " has now ended on world " + GameWorld.getSettings().getWorldId() + ".");
}
}
}
if (tick == 50) {
if (tick == 100) {
tick = 0;
save();
}
@ -81,42 +57,28 @@ public class GlobalEventManager implements CallBack {
}
public void reActivate(String name, long 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 void reActivate(GlobalEvent event, long time) {
event.setRemainingTicks(time);
}
public GlobalEventManager save() {
if (GameWorld.getDatabaseManager().update("server", "DELETE FROM `globalevents` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'") < 0)
return this;
for(GlobalEvent event : GlobalEvent.values()){
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();
query.append("INSERT INTO `globalevents` ");
query.append("INSERT INTO `global_events` ");
query.append("(`eventName`,`eventTime`,`worldId`)");
query.append(" VALUES(");
query.append("'" + entry.getKey() + "'").append(",");
query.append("'" + entry.getValue() + "'").append(",");
query.append("'" + event.getName() + "'").append(",");
query.append("'" + event.getRemainingTicks() + "'").append(",");
query.append("'" + GameWorld.getSettings().getWorldId() + "'");
query.append(")");
query.append(" ON DUPLICATE KEY UPDATE ");
query.append("eventTime='" + event.getRemainingTicks() + "'");
GameWorld.getDatabaseManager().update("server", query.toString());
}
@ -125,17 +87,15 @@ public class GlobalEventManager implements CallBack {
public GlobalEventManager load() {
try {
Results result = null;
result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `globalevents` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'"));
Results result = new Results(GameWorld.getDatabaseManager().query("server", "SELECT * FROM `global_events` WHERE worldid='" + GameWorld.getSettings().getWorldId() + "'"));
while (!result.empty()) {
String eventName = result.string("eventName");
String eventTime = result.string("eventTime");
reActivate(eventName, Long.valueOf(eventTime));
GlobalEvent event = getEvent(eventName);
reActivate(event, Long.valueOf(eventTime));
}
} catch(Exception e) {
e.printStackTrace();
}
@ -143,183 +103,94 @@ public class GlobalEventManager implements CallBack {
}
public GlobalEventManager message(String message) {
return message(message, true, "<col=027fc7>");
return message(message, true, "<col=3498db>");
}
public GlobalEventManager message(String message, boolean tag) {
return message(message, tag, "<col=027fc7>");
return message(message, tag, "<col=3498db>");
}
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) {
/*if (WorldCommunicator.isEnabled()) {
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);
}
for (Player player : Repository.getPlayers()) {
player.sendMessage(color + (tag ? "[Event Manager] " : "") + message);
}
return this;
}
public GlobalEventManager activate(String eventName, String name) {
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.");
public GlobalEventManager deactivate(GlobalEvent event) {
// Only deactivate event if already active
if (!event.isActive()) {
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)) {
if (eventName.equalsIgnoreCase("clone fest")) {
notify("The event " + eventName + " is live, clones are located near the mage");
notify("bank on world " + GameWorld.getSettings().getWorldId() + ".", false);
} else {
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);
}
}
// Event will end in 2 ticks
event.setRemainingTicks(2L);
return this;
}
public GlobalEventManager activate(GlobalEvent event) {
return activate(event, null, 6000);
}
/*
* 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 activate(GlobalEvent event, String name) {
return activate(event, name, 6000);
}
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;
public GlobalEventManager activate(GlobalEvent event, String name, int timeToAdd) {
if (timeToAdd <= 0) timeToAdd = 6000;
}
}
entry.setValue(entry.getValue() + 6000);
}
Player player = Repository.getPlayerByDisplay(name);
StringBuilder message = new StringBuilder();
message.append("The " + event.getName() + " event has been ");
message.append(event.isActive() ? "extended by" : "activated for");
message.append(" " + Math.round(timeToAdd / 100) + " minutes");
if (player != null) {
message.append(" by " + player.getUsername());
}
message.append(".");
// start the event after building the string
event.start(timeToAdd);
message(message.toString());
message(event.getDescription(), false, "<col=ecf0f1>");
return this;
}
public boolean isActive(String eventName) {
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 activateHourly(GlobalEvent event) {
event.start(6000);
message(event.getName() + " event is now active, and will run for an hour!");
message(event.getDescription(), false, "<col=ecf0f1>");
return this;
}
public boolean isActive(GlobalEvent event) {
return event.isActive();
}
public GlobalEventManager alert(Player player) {
boolean active = false;
Iterator<Entry<String, Long>> i = EVENTS.entrySet().iterator();
while(i.hasNext()) {
Map.Entry<String, Long> entry = (Map.Entry<String, Long>) i.next();
if (entry.getValue() > 0) {
active = true;
for(GlobalEvent event : GlobalEvent.values()){
if (event.isActive()) {
active = true;
}
}
if (active)
player.sendMessage("<col=027fc7>The following events are active:");
Iterator<Entry<String, Long>> iterator = EVENTS.entrySet().iterator();
while(iterator.hasNext()) {
Map.Entry<String, Long> entry = (Map.Entry<String, Long>) iterator.next();
if (entry.getValue() > 0) {
player.sendMessage("<col=027fc7> [-] " + entry.getKey() + ".");
if (!active) {
player.sendMessage("<col=3498db>No events are currently active.");
return this;
}
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;
}
@ -335,24 +206,28 @@ public class GlobalEventManager implements CallBack {
return true;
}
public static Map<String, Long> getEvents() {
return EVENTS;
public static GlobalEvent getEvent(String name) {
for(GlobalEvent event : GlobalEvent.values()){
if (event.getName().equalsIgnoreCase(name) || event.name().equalsIgnoreCase(Util.strToEnum(name)))
return event;
}
return null;
}
public String getLastEvent() {
public GlobalEvent getLastEvent() {
return lastEvent;
}
public void setLastEvent(String lastEvent) {
this.lastEvent = lastEvent;
public void setLastEvent(GlobalEvent event) {
this.lastEvent = event;
}
public String getCurrentEvent() {
public GlobalEvent getCurrentEvent() {
return currentEvent;
}
public void setCurrentEvent(String currentEvent) {
this.currentEvent = currentEvent;
public void setCurrentEvent(GlobalEvent event) {
this.currentEvent = event;
}

View file

@ -8,7 +8,7 @@ import org.crandor.game.content.eco.EconomyManagement;
import org.crandor.game.content.eco.ge.GrandExchangeDatabase;
import org.crandor.game.content.global.Bones;
import org.crandor.game.content.skill.Skills;
import org.crandor.game.events.GlobalEventManager;
import org.crandor.game.events.GlobalEvent;
import org.crandor.game.node.entity.Entity;
import org.crandor.game.node.entity.npc.NPC;
import org.crandor.game.node.entity.player.Player;
@ -93,11 +93,11 @@ public final class NPCDropTables {
Player p = looter instanceof Player ? (Player) looter : null;
for (ChanceItem item : defaultTable) {
int amount = RandomFunction.random(item.getMinimumAmount(), item.getMaximumAmount() + 1);
if (GlobalEventManager.get().isActive("Try your luck"))
if (GlobalEvent.TRY_YOUR_LUCK.isActive())
amount *= 1.4;
if (GlobalEventManager.get().isActive("Crazy Seeds") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed"))
if (GlobalEvent.CRAZY_SEEDS.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("seed"))
amount *= 2;
if (GlobalEventManager.get().isActive("Charmed") && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm"))
if (GlobalEvent.CHARMED.isActive() && ItemDefinition.forId(item.getId()).getName().toLowerCase().contains("charm"))
amount *= 2;
if (npc.getName().startsWith("Revenant") && item.getName().equalsIgnoreCase("coins")) {
break;
@ -181,10 +181,10 @@ public final class NPCDropTables {
if (handleBoneCrusher(player, item)) {
return;
}
if (item.getId() == 995 && player.hasPerk(Perks.COIN_MACHINE) && player.getGlobalData().isEnableCoinMachine() && player.getBank().hasSpaceFor(item)) {
if (item.getId() == 995 && player.getBank().hasSpaceFor(item) && ( player.getGlobalData().isEnableCoinMachine() || GlobalEvent.GOLDEN_RETRIEVER.isActive() )) {
item = new Item(995, (int) (item.getAmount() + (item.getAmount() * 0.25)));
player.getBank().add(item);
player.sendMessage("<col=005F00> " + item.getAmount() + " X Coins were sent to your bank.");
player.sendMessage("<col=3498db> " + item.getAmount() + " coins were sent to your bank.");
return;
}
if (item.hasItemPlugin() && player != null) {

View file

@ -181,8 +181,6 @@ public class AIPlayer extends Player {
{
int meX = this.getLocation().getX();
int meY = this.getLocation().getY();
//int meX2 = this.getLocation().getX();
//System.out.println("local " + meX + " real x? " + meX2 );
ArrayList<Node> nodes = new ArrayList<Node>();
for (NPC npc : RegionManager.getLocalNpcs(this, range)) {
if (npc.getId() == entry)
@ -399,14 +397,12 @@ public class AIPlayer extends Player {
* @param uid The player's 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);
if (player != null) {
player.clear();
return;
}
System.err.println("Could not deregister AIP#" + uid + ": UID not added to the mapping!");
}
@Override

View file

@ -9,30 +9,29 @@ public class LowestBot extends PvMBots{
super(name, l);
// TODO Auto-generated constructor stub
}
private int tick = 0;
@Override
public void tick()
{
public void tick(){
super.tick();
this.tick++;
//Despawn
if (this.getSkills().getLifepoints() == 0)
//this.teleport(new Location(500, 500));
//Despawning not being delayed causes 3 errors in the console
AIPlayer.deregister(this.getUid());
//Npc Combat
if (tick == 0)
{
if (this.tick % 10 == 0) {
if (!this.inCombat())
AttackNpcsInRadius(this, 5);
this.tick = 10;
}
else
this.tick--;
if (this.tick == 100) this.tick = 0;
this.eat(329);
//this.getPrayer().toggle()
}

View file

@ -74,8 +74,8 @@ public class PvMBots extends AIPlayer {
if (creatures == null) {
return false;
}
if (!(creatures.isEmpty())) {
bot.attack(creatures.get(RandomFunction.getRandom((creatures.size() - 1))));
if (!creatures.isEmpty()) {
return true;
} else {
creatures = FindTargets(bot, radius);
@ -90,7 +90,9 @@ public class PvMBots extends AIPlayer {
@Override
public void tick() {
super.tick();
super.tick();
this.tick++;
//Despawn
if (this.getSkills().getLifepoints() == 0)
@ -99,12 +101,12 @@ public class PvMBots extends AIPlayer {
AIPlayer.deregister(this.getUid());
//Npc Combat
if (tick == 0) {
if (!this.inCombat())
AttackNpcsInRadius(this, 5);
this.tick = 10;
} else
this.tick--;
if (this.tick % 10 == 0) {
if (!this.inCombat())
AttackNpcsInRadius(this, 5);
}
if (this.tick == 100) this.tick = 0;
//this.eat();
//this.getPrayer().toggle()

View file

@ -84,14 +84,12 @@ public final class LoginConfiguration {
*/
public static void sendLobbyScreen(Player player) {
int random = RandomFunction.getRandom(50);
if(player.getUsername().equalsIgnoreCase("ethan"))
player.getDetails().setRights(Rights.ADMINISTRATOR);
Repository.getLobbyPlayers().add(player);
player.getPacketDispatch().sendString(getLastLogin(player), 378, 116);
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() + " Keldagrim credits", 378, 94);
player.getPacketDispatch().sendString(player.getDetails().getShop().getCredits() + " 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("You can gain more credits by voting, reporting bugs and various other methods of contribution.", 378, 93);
player.getInterfaceManager().openWindowsPane(LOBBY_PANE);
@ -126,8 +124,6 @@ public final class LoginConfiguration {
* @param player The player to send to.
*/
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().openChatbox(137);
player.getInterfaceManager().openDefaultTabs();
@ -158,14 +154,14 @@ public final class LoginConfiguration {
return;
}
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()) {
player.getPacketDispatch().sendMessage("You are muted.");
player.getPacketDispatch().sendMessage("To prevent further mutes please read the rules.");
}
GlobalEventManager.get().alert(player);
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 Keldagrim 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 Guide for game information.");
}
player.setAttribute("startTime", System.currentTimeMillis());
// ResourceAIPManager.get().load(player);

View file

@ -26,7 +26,7 @@ public final class PlayerParser {
*/
@SuppressWarnings("deprecation")
public static void parse(Player player) {
final File file = new File(("data/players/" + player.getName() + ".keldagrim"));
final File file = new File(("data/players/" + player.getName() + ".save"));
if (!file.exists()) {
dump(player);
}
@ -300,7 +300,7 @@ public final class PlayerParser {
buffer.put((byte) 0); // EOF opcode
buffer.flip();
File file = new File(directory + "players/" + player.getName() + ".keldagrim");
File file = new File(directory + "players/" + player.getName() + ".save");
try (RandomAccessFile raf = new RandomAccessFile(file, "rw"); FileChannel channel = raf.getChannel()) {
channel.write(buffer);
raf.close();

View file

@ -8,37 +8,37 @@ import org.crandor.tools.StringUtils;
/**
* Represents a perk.
* @author Vexia
*
*
*/
public enum Perks {
STAMINA_BOOST(2, 0.40),
GREEN_THUMB(4, 0.25),
BIRD_MAN(5, .25),
STONER(6, .25),
UNBREAKABLE_FORGE(11),
OUT_OF_GRAVE_DANGER(12),
SLEIGHT_OF_HAND(13),
MASTER_CHEF(14),
GREEN_THUMB(4, 0.25),
BIRD_MAN(5, .25),
STONER(6, .25),
UNBREAKABLE_FORGE(11),
OUT_OF_GRAVE_DANGER(12),
SLEIGHT_OF_HAND(13),
MASTER_CHEF(14),
DIVINE_INTERVENTION(16),
FAMILIAR_WHISPERER(17),
BARROWS_BEFRIENDER(18),
ABYSS_BEFRIENDER(19),
CHARGE_BEFRIENDER(21),
GOLDEN_NEEDLE(22),
FAMILIAR_WHISPERER(17),
BARROWS_BEFRIENDER(18),
ABYSS_BEFRIENDER(19),
CHARGE_BEFRIENDER(21),
GOLDEN_NEEDLE(22),
SLAYER_BETRAYER(24),
THIRST_QUENCHER(26),
DOUBLE_TROUBLE(27),
GWD_BEFRIENDER(29, 30),
PRAYER_BETRAYER(30, 50),
THIRST_QUENCHER(26),
DOUBLE_TROUBLE(27),
GWD_BEFRIENDER(29, 30),
PRAYER_BETRAYER(30, 50),
SPELL_SWAP(31, 3),
DWARF_BEFRIENDER(32),
POWERPOINT(33),
DWARF_BEFRIENDER(32),
POWERPOINT(33),
CHARM_COLLECTOR(35),
REGULAR_DONATOR(1000),
EXTREME_DONATOR(1001),
DETECTIVE(36),
EXTREME_DONATOR(1001),
DETECTIVE(36),
OVERCHARGE(40),
UNBREAKABLE_CRYSTAL(41),
UNBREAKABLE_CRYSTAL(41),
CRUSADER(42),
PET_BEFRIENDER(43),
BONECRUSHER(60),
@ -46,7 +46,7 @@ public enum Perks {
COIN_MACHINE(71),
FIGHT_CAVE_FANATIC(72),
DECANTER(73),
;
/**
@ -99,22 +99,18 @@ public enum Perks {
* @param maxRand the maximum rand value.
* @return the item.
*/
public static boolean addDouble(Player player, Item original, boolean ground, int maxRand) {
boolean addOriginal = !player.hasPerk(DOUBLE_TROUBLE);
if (!addOriginal) {
addOriginal = RandomFunction.random(maxRand) > 10;
}
if (addOriginal) {
if (ground) {
player.getInventory().add(original, player);
} else {
player.getInventory().add(original);
}
public static boolean addDouble(Player player, Item item, boolean ground, int maxRand) {
// 5% chance to give an extra item
if (!player.hasPerk(DOUBLE_TROUBLE) || RandomFunction.random(maxRand) > 5) {
return false;
}
Item doubleI = new Item(original.getId(), original.getAmount() * 2);
player.getInventory().add(doubleI);
player.sendMessage("<col=FF0000>You get 2x " + original.getName().toLowerCase() + ".");
// Give the player the extra item(s)!
if (ground) {
player.getInventory().add(item, player);
} else {
player.getInventory().add(item);
}
player.sendMessage("<col=3498db>You receive an extra " + item.getName().toLowerCase() + " from the Double Trouble perk!");
return true;
}
@ -222,4 +218,4 @@ public enum Perks {
return info;
}
}
}

View file

@ -271,19 +271,19 @@ public final class GlobalData implements SavingModule {
private long lowAlchemyDelay;
/**
* The bone crusher perk.
* Is the bone crusher perk enabled.
*/
private boolean enableBoneCrusher = true;
private boolean enableBoneCrusher = false;
/**
* IF the coin machine perk is enabled.
* Is the coin machine perk enabled.
*/
private boolean enableCoinMachine = true;
private boolean enableCoinMachine = false;
/**
* If the charm collector was enabled.
* Is the charm collector perk enabled.
*/
private boolean enableCharmCollector = true;
private boolean enableCharmCollector = false;
/**
* The magic skill cape delay.

View file

@ -71,7 +71,7 @@ public final class GroundItemManager {
* @return The ground item.
*/
public static GroundItem create(GroundItem item) {
if (!item.getDefinition().isTradeable() || (item.getDropper() != null && item.getDropper().getDetails().getRights() == Rights.ADMINISTRATOR)) {
if (!item.getDefinition().isTradeable()) {
item.setRemainPrivate(true);
}
if (item.getDropper() != null && item.hasItemPlugin()) {

View file

@ -52,7 +52,7 @@ public final class CommunicationInfo {
/**
* The current clan this player is in.
*/
private String currentClan = "keldagrim";
private String currentClan = "";
/**
* The rank required for joining.

View file

@ -4,6 +4,7 @@ import org.crandor.ServerConstants;
import org.crandor.cache.Cache;
import org.crandor.cache.ServerStore;
import org.crandor.game.content.eco.ge.GrandExchangeDatabase;
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.player.Player;
@ -105,7 +106,18 @@ public final class GameWorld {
getEvents().put("Thieves jackpot", 0L);
getEvents().put("Golden essence", 0L);
*/
public static String[] hourlyEvent = {"Alchemy hellenistic", "Golden retriever", "Harvesting doubles", "Thieves jackpot", "Golden essence"};
public static GlobalEvent[] hourlyEvents = {
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.
@ -135,13 +147,13 @@ public final class GameWorld {
pulses.clear();
ticks++;
eventTicks++;
int idx = new Random().nextInt(hourlyEvent.length);
String random = hourlyEvent[idx];
switch(cfTicks++) {
case 50:
cfTicks++;
switch(cfTicks) {
case 100:
if (checkDay()) {
GlobalEventManager.get().activate("Clone Fest", null);
if (GlobalEventManager.get().isActive("Clone Fest")) {
// Activate clone fest for 15 minutes
GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST, null, 1500);
if (GlobalEvent.CLONE_FEST.isActive()) {
int size = 20;
if (PVPAIPActions.pvp_players == null) {
PVPAIPActions.pvp_players = new ArrayList<>();
@ -163,34 +175,20 @@ public final class GameWorld {
}
}
break;
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:
case 2100:
cfTicks = 0;
break;
}
switch (eventTicks) {
case 100:
if (GlobalEventManager.get().getLastEvent() == random) {
random = (hourlyEvent[idx]);
}
String event = random;
// 2 minute gap between events
case 200:
int randomEventId = new Random().nextInt(hourlyEvents.length);
GlobalEvent event = hourlyEvents[randomEventId];
GlobalEventManager.get().setLastEvent(event);
GlobalEventManager.get().setCurrentEvent(event);
GlobalEventManager.get().activateHourly(event);
break;
case 6100:
GlobalEventManager.get().deactivate(GlobalEventManager.get().getCurrentEvent());
break;
case 6200:
eventTicks = 0;
break;

View file

@ -4,6 +4,7 @@ import org.crandor.game.content.eco.ge.GEOfferDispatch;
import org.crandor.game.content.holiday.HolidayEvent;
import org.crandor.game.content.skill.member.farming.FarmingPulse;
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.world.map.zone.ZoneBuilder;
@ -40,7 +41,7 @@ public final class CallbackHub {
calls.add(new GEOfferDispatch());
calls.add(new FarmingPulse());
calls.add(new ImpetuousImpulses());
// calls.add(GlobalEventManager.get());
calls.add(GlobalEventManager.get());
for (CallBack call : calls) {
if (!call.call()) {
SystemLogger.error("A callback was stopped, callback=" + call.getClass().getSimpleName() + ".");

View file

@ -3,13 +3,10 @@ package org.crandor.gui.tab;
import org.crandor.gui.ConsoleTab;
import org.crandor.gui.component.PlayerViewer;
import org.crandor.net.Constants;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.border.SoftBevelBorder;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
@ -83,10 +80,11 @@ public class PlayerTab extends ConsoleTab {
public void actionPerformed(ActionEvent e) {
model.clear();
if (textField.getText() == null || textField.getText().length() < 1) {
populatePlayerSearch();
return;
}
for (String name : playerNames) {
if (name.toLowerCase().startsWith(textField.getText())) {
if (name.toLowerCase().contains(textField.getText())) {
model.addElement(name);
}
}
@ -149,10 +147,12 @@ public class PlayerTab extends ConsoleTab {
System.out.println("Player directory was null!");
return;
}
System.out.println(getPlayerNames().toString());
for (File file : Objects.requireNonNull(f.listFiles())) {
playerNames.add(file.getName().replace(".keldagrim", "").trim());
model.addElement(file.getName().replace(".keldagrim", "").trim());
String fileName = file.getName();
if (!fileName.contains(".save")) continue;
String playerName = fileName.replace(".save", "").trim();
playerNames.add(playerName);
model.addElement(playerName);
}
}

View file

@ -1,7 +1,7 @@
package org.crandor.gui.tab;
import org.crandor.Server;
import org.crandor.Main;
import org.crandor.game.node.item.GroundItemManager;
import org.crandor.game.system.SystemManager;
import org.crandor.game.system.SystemState;
@ -382,7 +382,7 @@ public class StatisticsTab extends ConsoleTab {
*/
public void updateThreadText() {
StringBuilder sb = new StringBuilder();
long runtime = System.currentTimeMillis() - Server.startTime;
long runtime = System.currentTimeMillis() - Main.startTime;
double percentage = workingTime / (runtime * 0.01);
long hours = runtime / 3600000;
runtime -= hours * 3600000;
@ -439,7 +439,7 @@ public class StatisticsTab extends ConsoleTab {
int space = (y / 2 - 10) / 4;
g.setFont(new Font(null, Font.PLAIN, 9));
for (int i = 0; i < 5; i++) {
g.setColor(Color.GRAY);
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);
@ -465,13 +465,11 @@ public class StatisticsTab extends ConsoleTab {
}
g.drawLine((int) (zero.getX() + fromX), (int) (zero.getY() + fromY),
(int) (zero.getX() + toX), (int) (zero.getY() + toY));
if (fromY < 0) {
if (fromY >= 0) {
g.setColor(Color.GREEN);
}
}
g.setColor(Color.BLACK);
//Draw horizontal line.
g.drawLine(x - 4, (int) zero.getY(), c.getWidth() - 2, (int) zero.getY());
//Draw vertical line.
g.drawLine(x, y + 4, x, 1);
Point p = ((StatisticsTab) c).statisticMousePoint;

View file

@ -127,7 +127,8 @@ public final class LoginReadEvent extends IoReadEvent {
/**
* Handles the login procedure after we check an acc is registered & certified.
* @param details the player details.
* @param username the username.
* @param password the password.
* @param session the session.
* @param buffer the byte buffer.
* @param opcode the opcode.

View file

@ -21,7 +21,7 @@ public class ReportAbusePacket implements IncomingPacket {
String target = StringUtils.longToString(buffer.getLong());
Rule rule = Rule.forId(buffer.get());
boolean mute = buffer.get() == 1;
File file = new File(ServerConstants.PLAYER_SAVE_PATH + target + ".keldagrim");
File file = new File(ServerConstants.PLAYER_SAVE_PATH + target + ".save");
if (!file.exists()) {
player.getPacketDispatch().sendMessage("Invalid player name.");
return;

View file

@ -78,7 +78,8 @@ public final class MajorUpdateWorker implements Runnable {
* @throws InterruptedException When the thread is interrupted.
*/
private void sleep() throws InterruptedException {
StatisticsTab.reportPerformance((int) ((System.currentTimeMillis() - start) - 600));
// How many ticks off we are
StatisticsTab.reportPerformance((int) (System.currentTimeMillis() - start));
long duration = 600 - ((System.currentTimeMillis() - start) % 600);
if (duration > 0) {
Thread.sleep(duration);

View file

@ -189,7 +189,6 @@ public final class AIPCommandPlugin extends CommandPlugin {
PVPAIPActions.syncBotThread(player);
return true;
case "bot":
PvMBotsBuilder.spawnLowest(player.getLocation());
return true;

View file

@ -73,11 +73,13 @@ public final class BetaCommandPlugin extends CommandPlugin {
player.getQuestRepository().getQuest(name).setStage(player, 0);
player.getQuestRepository().syncronizeTab(player);
return true;
case "allquest":
for (Quest quest : QuestRepository.getQuests().values()) {
quest.finish(player);
}
return true;
case "pos":
case "position":
case "loc":
@ -94,25 +96,10 @@ public final class BetaCommandPlugin extends CommandPlugin {
clpbrd.setContents(stringSelection, null);
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":
DonatorZone.getInstance().invite(player, null);
return true;
case "setquest":
case "setoquest":
if (args.length < 2) {
@ -144,26 +131,39 @@ public final class BetaCommandPlugin extends CommandPlugin {
m.getPacketDispatch().sendMessage("quest=" + name + ", new stage=" + stage);
m.getQuestRepository().syncronizeTab(player);
break;
case "empty":
player.getInventory().clear();
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) {
player.debug("syntax error: item-name (optional) amount");
player.debug("syntax error: id (optional) direction");
return true;
}
String params = "";
for (int i = 1; i < args.length; i++) {
params += i == args.length - 1 ? args[i] : args[i] + " ";
}
for (int i = 0; i < ItemDefinition.getDefinitions().size(); i++) {
ItemDefinition def1 = ItemDefinition.forId(i);
if (def1 != null && def1.getName().equalsIgnoreCase(params.toLowerCase())) {
player.getInventory().add(new Item(i, 1));
player.getPacketDispatch().sendMessage("[item=" + def1.getId() + ", " + def1.getName() + "].");
break;
}
}
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 "npcn":
@ -191,39 +191,17 @@ public final class BetaCommandPlugin extends CommandPlugin {
}
}
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":
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;
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()) {
player.sendMessage("Item ID '" + id + "' out of range.");
return true;
}
item = new Item(id, amount);
@ -234,6 +212,31 @@ public final class BetaCommandPlugin extends CommandPlugin {
item.setAmount(amount);
player.getInventory().add(item);
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":
ResourceAIPManager.get().runTask(player, "Willow Logs");
break;
@ -322,10 +325,10 @@ public final class BetaCommandPlugin extends CommandPlugin {
}
Location destination = null;
String place = getArgumentLine(args);
for (Object[] data : ServerConstants.TELEPORT_DESTINATIONS) {
for (int i = 1; i < data.length; i++) {
if (place.equals(data[i])) {
destination = (Location) data[0];
for (Object[] destinations : ServerConstants.TELEPORT_DESTINATIONS) {
for (int i = 1; i < destinations.length; i++) {
if (place.equals(destinations[i])) {
destination = (Location) destinations[0];
break;
}
}

View file

@ -1,16 +1,13 @@
package plugin.command;
import com.sun.xml.internal.ws.util.StringUtils;
import org.crandor.ServerConstants;
import org.crandor.cache.Cache;
import org.crandor.cache.def.impl.ItemDefinition;
import org.crandor.cache.def.impl.NPCDefinition;
import org.crandor.game.component.Component;
import org.crandor.game.container.Container;
import org.crandor.game.container.impl.EquipmentContainer;
import org.crandor.game.content.eco.EconomyManagement;
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.holiday.HolidayItem;
import org.crandor.game.content.holiday.ItemLimitation;
@ -18,6 +15,7 @@ import org.crandor.game.content.skill.Skills;
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.summoning.pet.Pets;
import org.crandor.game.events.GlobalEvent;
import org.crandor.game.events.GlobalEventManager;
import org.crandor.game.node.entity.combat.ImpactHandler.HitsplatType;
import org.crandor.game.node.entity.npc.NPC;
@ -50,9 +48,6 @@ import org.crandor.game.world.map.zone.RegionZone;
import org.crandor.game.world.repository.Repository;
import org.crandor.game.world.update.flag.context.Animation;
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.Plugin;
import org.crandor.plugin.PluginManager;
@ -104,6 +99,9 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
@SuppressWarnings("deprecation")
@Override
public boolean parse(final Player player, String name, String[] args) {
String[] eventNameArr;
String eventName;
GlobalEvent event = GlobalEvent.ALCHEMY_HELLENISTIC;
switch (name) {
case "find":
try {
@ -157,10 +155,6 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
}
});
break;
case "item":
int itemId = Integer.parseInt(args[1]), amount = Integer.parseInt(args[2]);
player.getInventory().add(new Item(itemId, amount));
break;
case "eventlocator":
player.getDialogueInterpreter().open(175869, GlobalEventManager.get().getCurrentEvent());
break;
@ -181,26 +175,46 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
case "taskamount":
player.sendMessage("You have " + player.getSkillTasks().getTaskAmount() + " more to go!");
break;
case "activatexp":
String target = "";
for (int i = 1; i < args.length; i++)
target += args[i] + ((i == args.length - 1) ? "" : " ");
if (args.length > 1)
GlobalEventManager.get().activate("XPFever", target);
else
GlobalEventManager.get().activate("XPFever", target);
case "eventactivate":
case "eventstart":
case "eventbegin":
case "activateevent":
case "startevent":
case "beginevent":
eventNameArr = Arrays.copyOfRange(args, 1, args.length);
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;
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":
player.getStateManager().set(EntityState.POISONED, 200, player);
player.getConfigManager().set(102, 1);
player.sendMessage("Poisoned...");
break;
case "activatecf":
target = "Developers";
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")) {
GlobalEventManager.get().activate(GlobalEvent.CLONE_FEST);
if (GlobalEvent.CLONE_FEST.isActive()) {
int size = 20;
if (PVPAIPActions.pvp_players == null) {
player.setAttribute("aip_legion", PVPAIPActions.pvp_players = new ArrayList<>());
@ -222,12 +236,6 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
PVPAIPActions.syncBotThread(player);
}
break;
case "deactivatexp":
GlobalEventManager.get().deactivate("XPFever");
break;
case "deactivatecf":
GlobalEventManager.get().deactivate("Clone Fest");
break;
case "reloaddb":
SQLManager.init();
player.sendMessage("[MySQl] The database has been reloaded.");
@ -471,7 +479,7 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
return true;
case "special":
case "spec":
amount = args.length > 1 ? Integer.parseInt(args[1]) : 100;
int amount = args.length > 1 ? Integer.parseInt(args[1]) : 100;
player.getSettings().setSpecialEnergy(amount);
return true;
case "god":

View file

@ -53,7 +53,7 @@ public class PerkCommandPlugin extends CommandPlugin {
case "charmcollector":
case "charm":
if (!player.hasPerk(Perks.CHARM_COLLECTOR) && !player.isAdmin()) {
player.sendMessage("You do not own the coin machine perk.");
player.sendMessage("You do not own the charm collector perk.");
return false;
}
boolean charm = player.getGlobalData().isEnableCoinMachine();

View file

@ -2,7 +2,8 @@ package plugin.command;
import org.crandor.ServerConstants;
import org.crandor.game.component.Component;
import org.crandor.game.content.global.tutorial.TutorialStage;
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.info.Rights;
import org.crandor.game.node.entity.player.link.IronmanMode;
@ -14,13 +15,14 @@ import org.crandor.game.system.command.CommandSet;
import org.crandor.game.system.communication.ClanRepository;
import org.crandor.game.system.communication.CommunicationInfo;
import org.crandor.game.world.GameWorld;
import org.crandor.game.world.map.Location;
import org.crandor.game.world.repository.Repository;
import org.crandor.net.amsc.WorldCommunicator;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin;
import org.crandor.tools.StringUtils;
import plugin.zone.GrandExchangeZone.CreditStore;
/**
* Handles a player command.
* @author Vexia
@ -28,6 +30,11 @@ import org.crandor.tools.StringUtils;
@InitializablePlugin
public final class PlayerCommandPlugin extends CommandPlugin {
/**
* The store that sells items in exchange for credits.
*/
private static final CreditStore CREDIT_STORE = new CreditStore();
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
link(CommandSet.PLAYER);
@ -37,7 +44,8 @@ public final class PlayerCommandPlugin extends CommandPlugin {
@Override
public boolean parse(Player player, String name, String[] arguments) {
switch (name) {
/*
* Disabled commands
case "shutdowninterface":
player.getInterfaceManager().close();
break;
@ -46,8 +54,24 @@ public final class PlayerCommandPlugin extends CommandPlugin {
int stage = Integer.parseInt(arguments[1]);
TutorialStage.load(player, stage, false);
break;
*/
case "resettabs":
case "shop":
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++) {
player.getBank().getTabStartSlot()[i] = 0;
}
@ -55,11 +79,12 @@ public final class PlayerCommandPlugin extends CommandPlugin {
if (player.getBank().isOpen()) {
player.getInterfaceManager().close();
}
player.getPacketDispatch().sendMessage("Bank tabs are reset!");
player.sendMessage("<col=3498db>Your bank tabs have been reset!");
return true;
case "resetpin":
case "bankresetpin":
if (arguments.length < 2) {
player.sendMessage("Syntax error: ::resetpin oldpin");
player.sendMessage("<col=e74c3c>You must specify your current pin!");
return true;
}
String oldPin = arguments[1];
@ -67,24 +92,20 @@ public final class PlayerCommandPlugin extends CommandPlugin {
return true;
}
if (!player.getBankPinManager().hasPin()) {
player.sendMessage("You don't have a pin.");
player.sendMessage("<col=e74c3c>You don't currently have a pin set.");
return true;
}
if (!oldPin.equals(player.getBankPinManager().getPin())) {
player.sendMessage("Your old pin doesn't match your current pin.");
player.sendMessage("<col=e74c3c>" + oldPin + " doesn't match your current pin.");
return true;
}
player.getBankPinManager().setPin(null);
player.sendMessage("Your pin has been reset.");
player.sendMessage("<col=3498db>Your pin has been reset.");
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":
int count = Repository.getPlayers().size();
int ironCount = 1;
int ironCount = 0;
int ultIronCount = 0;
for (Player p : Repository.getPlayers()) {
if (p.getIronmanManager().checkRestriction(IronmanMode.ULTIMATE)) {
@ -96,36 +117,34 @@ public final class PlayerCommandPlugin extends CommandPlugin {
}
int regular = count - ironCount - ultIronCount;
if (count == 1) {
player.getPacketDispatch().sendMessage("There is 1 active player in this world.");
player.sendMessage("<col=3498db>There is 1 active player in this world.");
} else {
player.getPacketDispatch().sendMessage("There are " + count + " active players in this world: " + regular + " regular, " + ironCount + " iron, and " + ultIronCount + " ultimate iron.");
player.sendMessage("<col=3498db>There are " + count + " active players in this world: " + regular + " regular, " + ironCount + " iron, and " + ultIronCount + " ultimate iron.");
}
return player.getRights() == Rights.REGULAR_PLAYER;
case "yell":
if (!player.isDonator() && !player.isAdmin()) {
player.getPacketDispatch().sendMessages("Join clan chat \"" + GameWorld.getName() + "\" to talk globally, or become a donator to have access to", "this benefit.");
player.sendMessages("Join clan chat \"" + GameWorld.getName() + "\" to talk globally, or become a donator to have access to", "this benefit.");
return true;
}
if (player.getDetails().isMuted()) {
player.getPacketDispatch().sendMessage("You have been " + (player.getDetails().isPermMute() ? "permanently" : "temporarily") + " muted due to breaking a rule.");
player.sendMessage("<col=e74c3c>You have been " + (player.getDetails().isPermMute() ? "permanently" : "temporarily") + " muted due to breaking a rule.");
return true;
}
if(WorldCommunicator.isEnabled()){
if(ClanRepository.getDefault().isBanned(player.getName())){
player.sendMessages("You are temporarily unable to yell as you are banned from the main clan chat.", "Don't be annoying!");
player.sendMessages("<col=e74c3c>You are temporarily unable to yell as you are banned from the main clan chat.", "Don't be annoying!");
return true;
}
}
if (player.getAttribute("yell-delay", 0.0) > GameWorld.getTicks()) {
player.sendMessages("You have yelled in the last " + player.getDonatorType().getCooldown() + " seconds. Upgrade to an extreme donator to have", "unlimited yelling abilities.");
player.sendMessages("<col=e74c3c>You have yelled in the last " + player.getDonatorType().getCooldown() + " seconds. Upgrade to an extreme donator to have", "unlimited yelling abilities.");
return true;
}
String text = getArgumentLine(arguments);
if(text.contains("<img=") || text.contains("<br>") || text.contains("<col=") || text.contains("<shad=")){
player.sendMessage("Bad! No images/text effects allowed in yell chat.");
return true;
}
if(text.contains("aq p")){
player.sendMessage("<col=e74c3c>Bad! No images/text effects allowed in yell chat.");
return true;
}
int length = text.length();
@ -146,27 +165,37 @@ public final class PlayerCommandPlugin extends CommandPlugin {
player.setAttribute("yell-delay", (int) GameWorld.getTicks() + (player.getDonatorType().getCooldown() / 0.6));
}
} else {
player.getPacketDispatch().sendMessage("Your message was too short.");
player.sendMessage("<col=e74c3c>Your message was too short.");
}
return true;
case "togglenews":
player.getSavedData().getGlobalData().setDisableNews(!player.getSavedData().getGlobalData().isDisableNews());
player.sendMessage("<col=FF0000>" + (player.getSavedData().getGlobalData().isDisableNews() ? "You will no longer see news notifications." : "You will now see news notifications."));
player.sendMessage("<col=3498db>" + (player.getSavedData().getGlobalData().isDisableNews() ? "You will no longer see news notifications." : "You will now see news notifications."));
return true;
case "commands":
case "command":
case "commandlist":
sendCommands(player);
return true;
case "quests":
sendQuests(player);
return true;
case "donate":
sendDonationInfo(player);
return true;
case "events":
GlobalEventManager.get().alert(player);
sendEvents(player);
return true;
case "reply":
if(player.getInterfaceManager().isOpened()){
player.sendMessage("Please finish what you're doing first.");
player.sendMessage("<col=e74c3c>Please finish what you're doing first.");
return true;
}
if (player.getAttributes().containsKey("replyTo")) {
@ -182,7 +211,7 @@ public final class PlayerCommandPlugin extends CommandPlugin {
});
player.getDialogueInterpreter().sendMessageInput(StringUtils.formatDisplayName(replyTo));
} else {
player.getPacketDispatch().sendMessage("You have not recieved any recent messages to which you can reply.");
player.getPacketDispatch().sendMessage("<col=3498db>You have not recieved any recent messages to which you can reply.");
}
return true;
}
@ -198,13 +227,34 @@ public final class PlayerCommandPlugin extends CommandPlugin {
player.sendMessage("Finish what you're currently doing.");
return;
}
player.getInterfaceManager().close();
player.getPacketDispatch().sendString("<u>" + GameWorld.getName() + " commands</u>", 239, 1);
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("", 239, 3);
player.getPacketDispatch().sendString("", 239, 4);
player.getPacketDispatch().sendString("", 239, 5);
player.getInterfaceManager().openComponent(239);
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() + " commands</col>", 275, 2);
// 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++);
}
/**
@ -213,13 +263,13 @@ public final class PlayerCommandPlugin extends CommandPlugin {
*/
private void sendDonationInfo(Player player) {
player.getInterfaceManager().open(new Component(275));
for (int i = 0; i < 257; i++) {
for (int i = 0; i < 311; i++) {
player.getPacketDispatch().sendString("", 275, i);
}
int lineId = 11;
player.getPacketDispatch().sendString("<col=8A0808>" + "Donation Information" + "</col>", 275, 2);
player.getPacketDispatch().sendString("<col=ecf0f1>" + "Donation Information" + "</col>", 275, 2);
for (String s : ServerConstants.MESSAGES) {
player.getPacketDispatch().sendString("<col=8A0808>" + s + "<br><br></col>", 275, lineId++);
player.getPacketDispatch().sendString("<col=2c3e50>" + s + "<br><br></col>", 275, lineId++);
}
}
/**
@ -228,14 +278,41 @@ public final class PlayerCommandPlugin extends CommandPlugin {
*/
private void sendQuests(Player player) {
player.getInterfaceManager().open(new Component(275));
for (int i = 0; i < 257; i++) {
for (int i = 0; i < 311; i++) {
player.getPacketDispatch().sendString("", 275, i);
}
String red = "<col=8A0808>";
int lineId = 11;
player.getPacketDispatch().sendString("<col=8A0808>" + "Available Quests" + "</col>", 275, 2);
player.getPacketDispatch().sendString("<col=ecf0f1>" + "Available Quests" + "</col>", 275, 2);
for (Quest q : QuestRepository.getQuests().values()) {
player.getPacketDispatch().sendString(q.isCompleted(player) ? red + "<str> " + q.getName() + " <br><br>" : red + " " + q.getName() + " <br><br>", 275, lineId++);
// Add a space to beginning and end of string for the strikethrough
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++);
}
}

View file

@ -5,7 +5,7 @@ import org.crandor.game.component.ComponentDefinition;
import org.crandor.game.component.ComponentPlugin;
import org.crandor.game.content.global.Lamps;
import org.crandor.game.content.skill.Skills;
import org.crandor.game.events.GlobalEventManager;
import org.crandor.game.events.GlobalEvent;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.node.entity.player.link.audio.Audio;
import org.crandor.game.node.item.Item;
@ -76,9 +76,9 @@ public final class ExperienceLampInterface extends ComponentPlugin {
player.getAudioManager().send(SOUND);
player.getInventory().remove(lamp);
player.getInterfaceManager().close();
int x = player.getSkills().getStaticLevel(skillType.skill);
int skillLevel = player.getSkills().getStaticLevel(skillType.skill);
int modifier = 10;
double experience = x * modifier;
double experience = skillLevel * modifier;
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." });
experience = type.getExp() / Skills.EXPERIENCE_MULTIPLIER;
@ -87,7 +87,7 @@ public final class ExperienceLampInterface extends ComponentPlugin {
experience /= 2;
}
} else {
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.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.getSkills().addExperience(skillType.skill, experience, false);
}
@ -99,7 +99,29 @@ public final class ExperienceLampInterface extends ComponentPlugin {
* @author 'Vexia
*/
public enum SkillInterface {
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);
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);
/**
* Constructs a new {@code ExperienceLampInterface} {@code Object}.

View file

@ -59,7 +59,7 @@ public class KeldagrimVotingBond extends OptionHandler {
}
if (player.getInventory().remove(item)) {
player.getBank().add(item);
player.sendMessage("You deposit your Keldagrim voting bond into your bank.");
player.sendMessage("You deposit your Reward bond into your bank.");
}
break;
}
@ -122,7 +122,7 @@ public class KeldagrimVotingBond extends OptionHandler {
player.getSavedData().getGlobalData().setDoubleExp(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1));
player.getStateManager().set(EntityState.DOUBLE_EXPERIENCE, 6000, 0);
interpreter.sendItemMessage(14807, "You redeemed an <col=FF0000>hour</col> of double EXP!");
Repository.sendNews("" + player.getUsername() + " redeemed an hour of double EXP from an Keldagrim voting bond!", 15, "<col=FF0000>");
Repository.sendNews("" + player.getUsername() + " redeemed an hour of double EXP from a Reward bond!", 15, "<col=FF0000>");
}
break;
case 2:
@ -133,7 +133,7 @@ public class KeldagrimVotingBond extends OptionHandler {
if (player.getInventory().remove(BOND)) {
player.getInventory().add(ULTRA_LAMP);
interpreter.sendItemMessage(14807, "You redeem an <col=FF0000>ultra lamp</col>.");
Repository.sendNews("" + player.getUsername() + " redeemed an ultra lamp from an Keldagrim voting bond!", 15, "<col=FF0000>");
Repository.sendNews("" + player.getUsername() + " redeemed an ultra lamp from a Reward bond!", 15, "<col=FF0000>");
return true;
}
break;
@ -147,7 +147,7 @@ public class KeldagrimVotingBond extends OptionHandler {
DecimalFormat formatter = new DecimalFormat("#,###");
player.getInventory().add(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 an Keldagrim voting bond!", 15, "<col=FF0000>");
Repository.sendNews("" + player.getUsername() + " redeemed " + formatter.format(coins.getAmount()) + " gold coins from a Reward bond!", 15, "<col=FF0000>");
}
break;
case 4:
@ -166,7 +166,7 @@ public class KeldagrimVotingBond extends OptionHandler {
if (player.getInventory().remove(BOND)) {
player.getInventory().add(clue);
interpreter.sendItemMessage(14807, "You redeem a <col=FF0000>clue scroll</col>.");
Repository.sendNews("" + player.getUsername() + " redeemed a clue scroll from an Keldagrim voting bond!", 15, "<col=FF0000>");
Repository.sendNews("" + player.getUsername() + " redeemed a clue scroll from a Reward bond!", 15, "<col=FF0000>");
}
break;
}

View file

@ -168,6 +168,7 @@ public class ThievingGuidePlugin extends OptionHandler {
}
tries++;
}
player.getInventory().add(item);
Perks.addDouble(player, item);
}

View file

@ -56,21 +56,6 @@ public final class LoginValidationPlugin implements Plugin<Player> {
if (GameWorld.getSettings().isDevMode()) {
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) {
ActivityManager.start(player, "fight caves", true);
}

View file

@ -27,7 +27,7 @@ public class TutorialCompletionDialogue extends DialoguePlugin {
/**
* The starter pack of items.
*/
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) };
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) };
/**
* Represents the rune items.
@ -266,13 +266,13 @@ public class TutorialCompletionDialogue extends DialoguePlugin {
stage = 501;
break;
case 1200:
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()+"!");
npc("Enjoy your time playing on "+GameWorld.getName()+"!");
stage = 520;
break;
case 520:
player.removeAttribute("tut-island");
player.getConfigManager().set(1021, 0);
player.getProperties().setTeleportLocation(new Location(2674, 3144, 0));
player.getProperties().setTeleportLocation(new Location(3222, 3218, 0));
TutorialSession.getExtension(player).setStage(72);
player.getInterfaceManager().closeOverlay();
player.getInventory().clear();
@ -282,7 +282,6 @@ public class TutorialCompletionDialogue extends DialoguePlugin {
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.");
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();
TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE + 1);
stage = 7;

View file

@ -117,7 +117,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
* Constructs a new {@Code CreditStore} {@Code Object}
*/
public CreditStore() {
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);
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);
setPointShop(true);
}
@ -129,7 +129,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
if (player.getDetails().getShop().syncCredits()) {
CreditStore.super.open(player);
int credits = player.getDetails().getShop().getCredits();
player.sendMessage("<col=CC0000>You currently have " + credits + (credits == 1 ? " credit" : " credits") + " to spend.");
player.sendMessage("<col=3498db>You currently have " + credits + (credits == 1 ? " credit" : " credits") + " to spend.");
}
}
@ -301,7 +301,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
}
break;
case 3:
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.");
interpreter.sendDialogues(8631, FacialExpression.OSRS_NORMAL, "You receive 1 credit for every 10 levels gained");
stage = 4;
break;
case 4:
@ -384,7 +384,7 @@ public final class GrandExchangeZone extends MapZone implements Plugin<Object> {
if (minutes < 1) {
minutes = 1;
}
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)." : ""));
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)." : ""));
stage = -5;
return true;
}

View file

@ -235,7 +235,9 @@ public class WildernessAreaZone extends MapZone implements Plugin<Object> {
}
node.transform(8667);
node.setAttribute("reward-tick", GameWorld.getTicks() + resource.getRespawnDuration());
Perks.addDouble(player, new Item(resource.getReward()));
final Item item = new Item(resource.getReward());
player.getInventory().add(item);
Perks.addDouble(player, item);
player.getSkills().addExperience(resource.getSkillId(), resource.getExperience(), true);
return true;
}

View file

@ -139,6 +139,7 @@ public class YakArmourPlugin extends UseWithHandler {
}
int reqAmount = index == 1 ? 1 : 2;
if (player.getInventory().remove(new Item(10820, reqAmount))) {
player.getInventory().add(node);
Perks.addDouble(player, node);
if (player.getDetails().getShop().hasPerk(Perks.GOLDEN_NEEDLE) && RandomFunction.random(100) <= 10) {
player.getSkills().addExperience(Skills.CRAFTING, (32 * 0.35), true);