1package com.runehive.content.skill;
3import com.runehive.Config;
4import com.runehive.content.skill.impl.agility.Agility;
5import com.runehive.content.skill.impl.crafting.impl.Gem;
6import com.runehive.content.skill.impl.crafting.impl.Hide;
7import com.runehive.content.skill.impl.fishing.Fishable;
8import com.runehive.content.skill.impl.fishing.FishingSpot;
9import com.runehive.content.skill.impl.fishing.FishingTool;
10import com.runehive.content.skill.impl.fletching.impl.*;
11import com.runehive.content.skill.impl.herblore.GrimyHerb;
12import com.runehive.content.skill.impl.hunter.net.impl.Butterfly;
13import com.runehive.content.skill.impl.hunter.net.impl.Impling;
14import com.runehive.content.skill.impl.mining.OreData;
15import com.runehive.content.skill.impl.prayer.BoneData;
16import com.runehive.content.skill.impl.woodcutting.TreeData;
17import com.runehive.game.world.entity.mob.Direction;
18import com.runehive.game.world.entity.mob.Mob;
19import com.runehive.game.world.entity.mob.npc.Npc;
20import com.runehive.game.world.entity.mob.player.Player;
21import com.runehive.game.world.position.Position;
22import com.runehive.util.RandomUtils;
23import com.runehive.util.Utility;
25import java.util.ArrayList;
32 private static final List<Integer>
BONE_ITEMS =
new ArrayList<>();
70 public static void load() {
134 double successChance = Math.ceil(((
double)
skill * 50.0D - (
double) levelRequired * 15.0D) / (
double) levelRequired / 3.0D * 4.0D);
136 return successChance >= roll;
139 public static boolean isSuccess(
Player p,
int skillId,
int levelRequired,
boolean usingDragonHarpoon) {
141 double successChance = Math.ceil((((level * 50.0D) - ((
double) levelRequired * 15.0D)) / (
double) levelRequired / 3.0D) * 4.0D);
143 return successChance >= roll;
148 double successChance = Math.ceil((((level * 50.0D) - ((
double) levelRequired * 15.0D)) / (
double) levelRequired / 3.0D) * 4.0D);
150 return successChance >= roll;
The class that contains setting-related constants for the server.
static final int NPC_WALKING_RADIUS
The walking radius for Npc.
static boolean isSuccess(int skill, int levelRequired)
static final Position[] HUNTER_SPAWN_POSITION
Holds all the impling onSpawn locations.
static boolean isSkillingItem(int item)
static void declareItems()
static final List< Integer > HERBLORE_ITEMS
static final List< Integer > ESSENCE_ITEMS
static final int[][] IMPLINGS
static boolean isBones(int item)
static boolean isHerbloreItem(int item)
static boolean isSuccess(Player p, int skill, int levelRequired, int toolLevelRequired)
static final List< Integer > SKILLING_ITEMS
static final List< Integer > BONE_ITEMS
static void spawn()
Spawns all the skilling npcs.
static void load()
Loads all the skilling data.
static boolean isSuccess(Player p, int skillId, int levelRequired, boolean usingDragonHarpoon)
Created by Daniel on 2017-11-02.
static final int DEFAULT_INSTANCE
final SkillManager skills
Represents a non-player character in the in-game world.
void register()
Registers an entity to the World.
This class represents a character controlled by a player.
int getMaxLevel(int id)
Gets the highest possible level of a skill.
Represents a single tile on the game world.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...
Handles miscellaneous methods.
static int random(int bound)
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
Holds all the grimy herb data.
Holds all the impling data.
Holds all the data for trees.
Represents the enumerated directions an entity can walk or face.