mirror of
https://github.com/2006Scape-Scripts/ParaScript.git
synced 2026-07-02 16:49:02 +00:00
Update Eat.java
This commit is contained in:
@@ -14,7 +14,6 @@ public class Eat implements Strategy {
|
|||||||
if (Variables.running
|
if (Variables.running
|
||||||
&& hasRequiredItems()
|
&& hasRequiredItems()
|
||||||
&& currentHealth > 0
|
&& currentHealth > 0
|
||||||
&& Players.getMyPlayer().isInCombat()
|
|
||||||
&& currentHealth <= (Skill.HITPOINTS.getRealLevel() - Variables.fighting_food_heals_amount)
|
&& currentHealth <= (Skill.HITPOINTS.getRealLevel() - Variables.fighting_food_heals_amount)
|
||||||
) {
|
) {
|
||||||
Variables.setStatus("eating food");
|
Variables.setStatus("eating food");
|
||||||
@@ -28,7 +27,7 @@ public class Eat implements Strategy {
|
|||||||
public void execute() {
|
public void execute() {
|
||||||
try {
|
try {
|
||||||
Inventory.getItem(Variables.fighting_food_to_eat + 1).interact(Items.Option.CONSUME);
|
Inventory.getItem(Variables.fighting_food_to_eat + 1).interact(Items.Option.CONSUME);
|
||||||
Time.sleep(() -> Players.getMyPlayer().getHealth() != currentHealth || !Players.getMyPlayer().isInCombat(), 8000);
|
Time.sleep(() -> Players.getMyPlayer().getHealth() != currentHealth, 5000);
|
||||||
Variables.setStatus("none");
|
Variables.setStatus("none");
|
||||||
} catch (Exception ಠ_ಠ) {
|
} catch (Exception ಠ_ಠ) {
|
||||||
System.out.println("Eating error: ¯\\_(ツ)_/¯");
|
System.out.println("Eating error: ¯\\_(ツ)_/¯");
|
||||||
|
|||||||
Reference in New Issue
Block a user