mirror of
https://github.com/2006Scape-Scripts/ParaScript.git
synced 2026-07-03 00:38:36 +00:00
Update fishing
This commit is contained in:
@@ -50,6 +50,10 @@ public class Main extends Script implements MessageListener, Paintable {
|
|||||||
strategies.add(new Bank());
|
strategies.add(new Bank());
|
||||||
strategies.add(new Walk());
|
strategies.add(new Walk());
|
||||||
}
|
}
|
||||||
|
if(Variables.skill_to_train == Skill.SMITHING) {
|
||||||
|
strategies.add(new Smelt());
|
||||||
|
strategies.add(new BankSmithing());
|
||||||
|
}
|
||||||
if(Variables.skill_to_train == Skill.THIEVING) {
|
if(Variables.skill_to_train == Skill.THIEVING) {
|
||||||
strategies.add(new Thieving());
|
strategies.add(new Thieving());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,6 +177,8 @@ public class Variables {
|
|||||||
return new int[]{woodcutting_tree_selected.getItemID()};
|
return new int[]{woodcutting_tree_selected.getItemID()};
|
||||||
case "Mining":
|
case "Mining":
|
||||||
return mining_rock_selected.getItemID();
|
return mining_rock_selected.getItemID();
|
||||||
|
case "Fishing":
|
||||||
|
return fishing_spot_selected.getItemIDs();
|
||||||
case "Attack":
|
case "Attack":
|
||||||
return fighting_item_ids;
|
return fighting_item_ids;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ public class Fish implements Strategy {
|
|||||||
&& fishingSpot != null
|
&& fishingSpot != null
|
||||||
&& (Variables.getStatus() == "none" || Variables.getStatus() == "fishing")
|
&& (Variables.getStatus() == "none" || Variables.getStatus() == "fishing")
|
||||||
&& !Players.getMyPlayer().isInCombat()
|
&& !Players.getMyPlayer().isInCombat()
|
||||||
&& Players.getMyPlayer().getAnimation() == -1) {
|
&& Players.getMyPlayer().getAnimation() == -1
|
||||||
|
&& !Inventory.isFull()) {
|
||||||
Variables.setStatus("fishing");
|
Variables.setStatus("fishing");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -28,11 +29,7 @@ public class Fish implements Strategy {
|
|||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
try {
|
try {
|
||||||
if (Variables.shouldDropItems()) {
|
fishingSpot.interact(Variables.fishing_spot_selected.actionType);
|
||||||
if (Inventory.getCount(441) >= 1) Inventory.getItem(441).interact(Items.Option.DROP);
|
|
||||||
}
|
|
||||||
|
|
||||||
fishingSpot.interact(Variables.fishing_type_selected);
|
|
||||||
Time.sleep(1000);
|
Time.sleep(1000);
|
||||||
|
|
||||||
// Wait for the Player to finish fishing (max 60 seconds)
|
// Wait for the Player to finish fishing (max 60 seconds)
|
||||||
@@ -44,7 +41,7 @@ public class Fish implements Strategy {
|
|||||||
|
|
||||||
private Npc fishingSpot(){
|
private Npc fishingSpot(){
|
||||||
try {
|
try {
|
||||||
for (Npc spot : Npcs.getNearest(316)) {
|
for(Npc spot : Npcs.getNearest(Variables.fishing_spot_selected.getIDs())){
|
||||||
if (spot != null)
|
if (spot != null)
|
||||||
return spot;
|
return spot;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user