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 java.util.concurrent.TimeUnit;
23import static com.runehive.game.world.entity.combat.attack.FormulaFactory.getModifiedMaxHit;
47 return new int[] { 99, 99, 99, 99, 99, 99, 99 };
54 bot.getCombat().addListener(
this);
63 bot.speak(
"Let's smite then...");
69 bot.speak(
"That's not fair...");
70 bot.getCombatSpecial().disable(
bot,
false);
80 if (
bot.spellCasting.vengeanceDelay.elapsedTime(TimeUnit.SECONDS) >= 30) {
100 if (!hasRoom || (!combo && !lowHp))
104 bot.schedule(4, () -> {
105 if (
bot.equipment.getWeapon().matchesId(4587)) {
106 int index =
bot.inventory.computeIndexForId(11802);
107 bot.equipment.equip(index);
112 bot.getCombatSpecial().enable(
bot);
114 bot.schedule(4, () -> {
115 if (!
bot.isSpecialActivated() &&
bot.equipment.getWeapon().matchesId(11802)) {
116 int idx =
bot.inventory.computeIndexForId(4587);
117 bot.equipment.equip(idx);
118 idx =
bot.inventory.computeIndexForId(12954);
119 bot.equipment.equip(idx);
131 if (!
bot.potionDelay.elapsed(1250)) {
139 int index =
bot.inventory.computeIndexForId(3024);
148 int index =
bot.inventory.computeIndexForId(12695);
160 if (
bot.getCurrentHealth() >
bot.getMaximumHealth() * 0.45 && max <
bot.getCurrentHealth())
166 int index =
bot.inventory.computeIndexForId(391);
172 if (
bot.getCurrentHealth() >=
bot.getMaximumHealth() * 0.35)
175 index =
bot.inventory.computeIndexForId(3144);
184 if (defender.
getCombat().isAttacking() && !defender.
getCombat().isAttacking(attacker)) {
185 attacker.
getPlayer().
message(
"You cannot attack a bot while they are attacking another player.");
197 return bot.skills.getLevel(
id) < minimum;
void pot(Player target, PlayerBot bot)
boolean checkSkill(PlayerBot bot, int id, int minimum)
void initCombat(Player target, PlayerBot bot)
void hit(Player attacker, Mob defender, Hit hit)
boolean canOtherAttack(Mob attacker, Player defender)
void endFight(PlayerBot bot)
void block(Mob attacker, Player defender, Hit hit, CombatType combatType)
void handleCombat(Player target, PlayerBot bot)
void eat(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.
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.
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.