mirror of
https://github.com/2006Scape-Scripts/ParaScript.git
synced 2026-07-03 00:38:36 +00:00
Check player has a knife too
This commit is contained in:
@@ -18,7 +18,7 @@ public class MakeArrowShafts implements Strategy {
|
|||||||
@Override
|
@Override
|
||||||
public boolean activate() {
|
public boolean activate() {
|
||||||
if (Variables.running
|
if (Variables.running
|
||||||
&& hasLogs()
|
&& hasRequiredItems()
|
||||||
&& (Variables.getStatus() == "none" || Variables.getStatus() == "making arrow shafts")
|
&& (Variables.getStatus() == "none" || Variables.getStatus() == "making arrow shafts")
|
||||||
&& !Players.getMyPlayer().isInCombat()
|
&& !Players.getMyPlayer().isInCombat()
|
||||||
&& Players.getMyPlayer().getAnimation() == -1) {
|
&& Players.getMyPlayer().getAnimation() == -1) {
|
||||||
@@ -34,14 +34,14 @@ public class MakeArrowShafts implements Strategy {
|
|||||||
System.out.println("making arrow shafts");
|
System.out.println("making arrow shafts");
|
||||||
Inventory.getItem(947).interact(Items.Option.USE);
|
Inventory.getItem(947).interact(Items.Option.USE);
|
||||||
Inventory.getItem(1512).interact(Items.Option.USE_WITH);
|
Inventory.getItem(1512).interact(Items.Option.USE_WITH);
|
||||||
|
|
||||||
Menu.clickButton(8886);
|
Menu.clickButton(8886);
|
||||||
Time.sleep(3000);
|
Time.sleep(3000);
|
||||||
//Wait for the Player to chop the Tree
|
//Wait for the Player to chop the Tree
|
||||||
Time.sleep(() -> Players.getMyPlayer().getAnimation() == -1, 3000);
|
Time.sleep(() -> Players.getMyPlayer().getAnimation() == -1, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasLogs(){
|
private boolean hasRequiredItems(){
|
||||||
return Inventory.contains(1512);
|
// Make sure we have a knife and logs
|
||||||
|
return Inventory.contains(947, 1512);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user