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) {
99 if (!hasSpec || (!combo && !lowHp))
103 bot.schedule(4, () -> {
104 if (
bot.equipment.getWeapon().matchesId(4587)) {
105 int index =
bot.inventory.computeIndexForId(5698);
106 bot.equipment.equip(index);
109 bot.getCombatSpecial().enable(
bot);
110 bot.schedule(4, () -> {
111 if (!
bot.isSpecialActivated() &&
bot.equipment.getWeapon().matchesId(5698)) {
112 int idx =
bot.inventory.computeIndexForId(4587);
113 bot.equipment.equip(idx);
125 if (!
bot.potionDelay.elapsed(1250)) {
133 int index =
bot.inventory.computeIndexForId(3024);
142 int index =
bot.inventory.computeIndexForId(12695);
154 if (
bot.getCurrentHealth() >
bot.getMaximumHealth() * 0.45 && max <
bot.getCurrentHealth())
160 int index =
bot.inventory.computeIndexForId(391);
166 if (
bot.getCurrentHealth() >=
bot.getMaximumHealth() * 0.35)
169 index =
bot.inventory.computeIndexForId(3144);
178 if (defender.
getCombat().isAttacking() && !defender.
getCombat().isAttacking(attacker)) {
179 attacker.
getPlayer().
message(
"You cannot attack a bot while they are attacking another player.");
191 return bot.skills.getLevel(
id) < minimum;
void eat(Player target, PlayerBot bot)
void initCombat(Player target, PlayerBot bot)
void hit(Player attacker, Mob defender, Hit hit)
void handleCombat(Player target, PlayerBot bot)
boolean checkSkill(PlayerBot bot, int id, int minimum)
boolean canOtherAttack(Mob attacker, Player defender)
void block(Mob attacker, Player defender, Hit hit, CombatType combatType)
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 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.