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[] { 60, 1, 99, 99, 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);
94 if (!hasSpec || !hasRoom || (!combo && !lowHp))
98 bot.schedule(4, () -> {
99 if (
bot.equipment.getWeapon().matchesId(4587)) {
100 int index =
bot.inventory.computeIndexForId(13652);
101 bot.equipment.equip(index);
105 bot.getCombatSpecial().enable(
bot);
106 bot.schedule(4, () -> {
107 if (!
bot.isSpecialActivated() &&
bot.equipment.getWeapon().matchesId(13652)) {
108 int idx =
bot.inventory.computeIndexForId(4587);
109 bot.equipment.equip(idx);
110 idx =
bot.inventory.computeIndexForId(3842);
111 bot.equipment.equip(idx);
124 if (!
bot.potionDelay.elapsed(1250)) {
132 int index =
bot.inventory.computeIndexForId(3024);
141 int index =
bot.inventory.computeIndexForId(12695);
153 if (
bot.getCurrentHealth() >
bot.getMaximumHealth() * 0.45 && max <
bot.getCurrentHealth())
159 int index =
bot.inventory.computeIndexForId(391);
165 if (
bot.getCurrentHealth() >=
bot.getMaximumHealth() * 0.35)
168 index =
bot.inventory.computeIndexForId(3144);
177 if (defender.
getCombat().isAttacking() && !defender.
getCombat().isAttacking(attacker)) {
178 attacker.
getPlayer().
message(
"You cannot attack a bot while they are attacking another player.");
190 return bot.skills.getLevel(
id) < minimum;
void pot(Player target, PlayerBot bot)
void block(Mob attacker, Player defender, Hit hit, CombatType combatType)
void endFight(PlayerBot bot)
void handleCombat(Player target, PlayerBot bot)
boolean checkSkill(PlayerBot bot, int id, int minimum)
void initCombat(Player target, PlayerBot bot)
void eat(Player target, PlayerBot bot)
void hit(Player attacker, Mob defender, Hit hit)
boolean canOtherAttack(Mob attacker, Player defender)
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.
final Inventory inventory
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 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.
The enumerated type managing consumable potion types.
The enumerated type whose elements represent the fighting types.