1package com.runehive.content.bot.botclass.impl;
3import com.runehive.content.bot.PlayerBot;
4import com.runehive.content.bot.botclass.BotClass;
5import com.runehive.content.consume.FoodData;
6import com.runehive.content.consume.PotionData;
7import com.runehive.content.skill.impl.magic.spell.impl.Vengeance;
8import com.runehive.game.event.impl.ItemClickEvent;
9import com.runehive.game.world.entity.combat.CombatType;
10import com.runehive.game.world.entity.combat.attack.FightType;
11import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
12import com.runehive.game.world.entity.combat.hit.Hit;
13import com.runehive.game.world.entity.mob.Mob;
14import com.runehive.game.world.entity.mob.player.Player;
15import com.runehive.game.world.entity.mob.prayer.Prayer;
16import com.runehive.game.world.entity.skill.Skill;
17import com.runehive.game.world.items.Item;
18import com.runehive.util.RandomUtils;
19import plugin.click.item.EatFoodPlugin;
21import static com.runehive.game.world.entity.combat.attack.FormulaFactory.getModifiedMaxHit;
45 return new int[] { 75, 1, 99, 80, 99, 52, 1 };
52 bot.getCombat().addListener(
this);
61 bot.speak(
"Let's smite then...");
67 bot.speak(
"That's not fair...");
68 bot.getCombatSpecial().disable(
bot,
false);
97 bot.schedule(4, () -> {
98 if (
bot.equipment.getWeapon().matchesId(861)) {
99 int index =
bot.inventory.computeIndexForId(11802);
100 bot.equipment.equip(index);
106 bot.getCombatSpecial().enable(
bot);
108 bot.schedule(4, () -> {
109 if (!
bot.isSpecialActivated() &&
bot.equipment.getWeapon().matchesId(11802)) {
110 int idx =
bot.inventory.computeIndexForId(861);
111 bot.equipment.equip(idx);
125 if (!
bot.potionDelay.elapsed(1250)) {
133 int index =
bot.inventory.computeIndexForId(3024);
143 int index =
bot.inventory.computeIndexForId(12695);
151 int index =
bot.inventory.computeIndexForId(2444);
164 if (
bot.getCurrentHealth() >
bot.getMaximumHealth() * 0.45 && max <
bot.getCurrentHealth())
170 int index =
bot.inventory.computeIndexForId(391);
176 if (
bot.getCurrentHealth() >=
bot.getMaximumHealth() * 0.35)
179 index =
bot.inventory.computeIndexForId(3144);
188 if (defender.
getCombat().isAttacking() && !defender.
getCombat().isAttacking(attacker)) {
189 attacker.
getPlayer().
message(
"You cannot attack a bot while they are attacking another player.");
221 return bot.skills.getLevel(
id) <= minimum;
boolean checkSkill(PlayerBot bot, int id, int minimum)
void eat(Player target, PlayerBot bot)
void block(Mob attacker, Player defender, Hit hit, CombatType combatType)
boolean canOtherAttack(Mob attacker, Player defender)
void initCombat(Player target, PlayerBot bot)
void hit(Player attacker, Mob defender, Hit hit)
void handleCombat(Player target, PlayerBot bot)
void meleePrayers(PlayerBot bot)
void rangedPrayers(PlayerBot bot)
void endFight(PlayerBot bot)
void pot(Player target, PlayerBot bot)
Handles the vengeance spell.
A Hit object holds the damage amount and hitsplat data.
int getMaxHit(Mob defender, CombatType type)
Gets the max hit of a combat type.
This class represents a character controlled by a player.
CombatStrategy< Player > getStrategy()
The combat strategy of the mob.
void message(String message)
MutableNumber getSpecialPercentage()
Combat< Player > getCombat()
The combat of the mob.
final PlayerAssistant playerAssistant
boolean isActive(Prayer... prayers)
Checks if all given prayers are active.
Represents a trainable and usable skill.
static final int PRAYER
The prayer skill id.
static final int RANGED
The ranged skill id.
static final int DEFENCE
The defence skill id.
static final int ATTACK
The attack skill id.
static final int STRENGTH
The strength skill id.
The container class that represents an item that can be interacted with.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static int inclusive(int min, int max)
Returns a pseudo-random int value between inclusive min and inclusive max.
static boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...
The enumerated type managing consumable potion types.
The enumerated type whose elements represent the fighting types.