1package com.runehive.content.skill.impl.thieving;
3import com.runehive.Config;
4import com.runehive.content.activity.randomevent.RandomEventHandler;
5import com.runehive.content.clanchannel.content.ClanTaskKey;
6import com.runehive.content.dialogue.Expression;
7import com.runehive.content.event.impl.NpcInteractionEvent;
8import com.runehive.content.event.impl.ObjectInteractionEvent;
9import com.runehive.content.pet.PetData;
10import com.runehive.content.pet.Pets;
11import com.runehive.content.skillcape.SkillCape;
12import com.runehive.game.Animation;
13import com.runehive.game.world.World;
14import com.runehive.game.world.entity.combat.hit.Hit;
15import com.runehive.game.world.entity.mob.data.LockType;
16import com.runehive.game.world.entity.mob.npc.Npc;
17import com.runehive.game.world.entity.mob.player.Player;
18import com.runehive.game.world.entity.mob.player.PlayerRight;
19import com.runehive.game.world.entity.skill.Skill;
20import com.runehive.game.world.items.Item;
21import com.runehive.game.world.object.GameObject;
22import com.runehive.game.world.position.Area;
23import com.runehive.net.packet.out.SendMessage;
24import com.runehive.util.Utility;
41 double f1 = (double) pickpocket.
getLevel() / 10;
43 return (
int) Math.floor((f2 + f1) / 2);
53 if (
event.getOpcode() != 1) {
60 if (pickpocket ==
null) {
83 npc.
speak(
"What do you think you're doing?");
105 if (
event.getOpcode() == 0 &&
event.getObject().getId() == 7236) {
110 if (
event.getOpcode() != 1) {
123 player.
send(
new SendMessage(
"You need at least 1 free inventory space to do this!"));
128 player.
send(
new SendMessage(
"You need a thieving level of " + stall.
getLevel() +
" to steal from this stall."));
136 int base_chance = 50;
151 player.
speak(
"Ouch!");
152 player.
send(
new SendMessage(
"You failed to thieve from the stall and were instead inflicted pain!"));
173 int amount = 0, count = 0;
193 player.
send(
new SendMessage(
"You have no items which the merchant would like to purchase."));
The class that contains setting-related constants for the server.
static final double THIEVING_MODIFICATION
The experience modification for thieving.
static final int CURRENCY
The currency identification of the server.
static void trigger(Player player)
final DialogueFactory execute()
Retrieves the next dialogue in the chain and executes it.
final DialogueFactory sendNpcChat(int id, String... lines)
Appends an NpcDialogue to the current dialogue chain.
Handles spawning, rewarding and picking up of pets.
static void onReward(Player player, int item, int chance)
Handles calculating the chance of a player receiving a skilling pet.
boolean clickNpc(Player player, NpcInteractionEvent event)
static void exchange(Player player)
int failureRate(PickpocketData pickpocket, Player player)
The failure rate for pickpocketing.
boolean clickObject(Player player, ObjectInteractionEvent event)
Thieving(int level, double experience)
Handles the wall safe thieving.
static void thieve(Player player)
Handles thieving from the wall safe.
Class that models a single animation used by an entity.
Represents the game world.
static void schedule(Task task)
Submits a new event.
A Hit object holds the damage amount and hitsplat data.
final SkillManager skills
void speak(String forceChat)
Sets the mob's forced chat.
void animate(int animation)
Represents a non-player character in the in-game world.
String getName()
Gets the name of this entity.
void activateSkilling(int amount)
This class represents a character controlled by a player.
final Inventory inventory
void forClan(Consumer< ClanChannel > action)
String getName()
Gets the name of this entity.
DialogueFactory dialogueFactory
void send(OutgoingPacket encoder)
final PlayerAssistant playerAssistant
double experience
The current skill experience.
int getLevel()
Gets the current skill level.
int level
The current level of the skill.
static final int THIEVING
The thieving skill id.
void setDoingSkill(boolean doingSkill)
Skill(int skill, int level, double experience)
Constructs a new Skill.
void addExperience(int id, double experience)
Adds experience to a given skill.
int getLevel(int id)
Gets the level of a skill.
int getMaxLevel(int id)
Gets the highest possible level of a skill.
Skill get(int id)
Gets the skill for an id.
The container class that represents an item that can be interacted with.
boolean remove(Item item)
Attempts to withdraw item from this container.
boolean add(Item item)
Attempts to deposit item into this container.
final boolean hasCapacityFor(Item... item)
Determines if this container has the capacity for item.
final Item[] toArray()
Returns a shallow copy of the backing array.
void refresh()
Refreshes the players inventory.
void addOrDrop(List< Item > items)
Attempts to deposit an item to the players inventory, if there is no space it'll bank the item instea...
Handles checking if mobs are in a certain area.
static boolean inRegularDonatorZone(Interactable entity)
static boolean inSuperDonatorZone(Interactable entity)
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static int random(int bound)
static String formatDigits(final int amount)
Formats digits for integers.
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
Represents the expressions of entities for dialogue.
Holds all the data for pickpocketing Npcs.
int getDamage()
Gets The damage from stun.
static PickpocketData forId(int npc)
Gets the pickpocket data for npc.
int getStun()
Gets The stun timer.
int getLevel()
Gets the level required.
Item[] getLoot()
Gets the possible loot.
double getExperience()
Gets the experience rewarded.
Holds all the data for thieving stalls.
int getExperience()
Gets the experience rewarded.
static boolean isReward(Item item)
Checks if the item is a reward.
int getLevel()
Gets the level required.
static Optional< StallData > forId(int id)
Gets the stall data base off object identification.
int getValue()
Gets the reward value.
Item getItem()
Gets the item reward.
static boolean isEquipped(Player player, SkillCape cape)
Holds all the lock types.
Holds all the player right data.
static boolean isDonator(Player player)
Checks if the player has donator status.
static boolean isSuper(Player player)
Checks if the player has super donator status.
Represents a game object.