diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 8ca2293..c831a73 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,10 @@
-
+
+
+
+
@@ -41,7 +44,7 @@
-
+
@@ -51,10 +54,8 @@
-
-
-
-
+
+
@@ -64,8 +65,10 @@
-
-
+
+
+
+
diff --git a/src/main/java/ParaScript/Main.java b/src/main/java/ParaScript/Main.java
index 0e68f06..ba0dd0a 100644
--- a/src/main/java/ParaScript/Main.java
+++ b/src/main/java/ParaScript/Main.java
@@ -55,6 +55,9 @@ public class Main extends Script implements MessageListener, Paintable {
strategies.add(new BuryBones());
strategies.add(new Fighting());
}
+ if(Variables.skill_to_train == Skill.FISHING) {
+ strategies.add(new Fish());
+ }
if(Variables.skill_to_train == null) {
strategies.add(new Bank());
strategies.add(new Walk());
@@ -101,6 +104,7 @@ public class Main extends Script implements MessageListener, Paintable {
switch (message.getType()) {
case 0:
if (message.getMessage().startsWith("You manage to ") || // woodcutting, mining
+ message.getMessage().startsWith("You catch some") || // fishing
message.getMessage().startsWith("You pick the ")) { // pickpockets
Variables.addItemGained(1);
Variables.updateExpGained();
diff --git a/src/main/java/ParaScript/data/variables/Ores.java b/src/main/java/ParaScript/data/variables/Ores.java
index 58864df..7e84b18 100644
--- a/src/main/java/ParaScript/data/variables/Ores.java
+++ b/src/main/java/ParaScript/data/variables/Ores.java
@@ -19,7 +19,7 @@ public enum Ores {
RUNE("Rune", new int[] { 14859, 14860, 2106, 2107 }, 85, 125, 20, 166, new int[] { 451 }),
GRANITE("Granite", new int[] { 10947 }, 45, 75, 10, 10, new int[] { 6979, 6981, 6983 }),
SANDSTONE("Sandstone", new int[] { 10946 }, 35, 60, 5, 5, new int[] { 6971, 6973, 6975, 6977 }),
- GEM("Gem", new int[] {2111}, 40, 65, 6, 120, new int[] {1});
+ GEM("Gem", new int[] {2111}, 40, 65, 6, 120, new int[] {});
private final String name;
private final int levelReq, mineTimer, respawnTimer, xp;
diff --git a/src/main/java/ParaScript/strategies/Fish.java b/src/main/java/ParaScript/strategies/Fish.java
new file mode 100644
index 0000000..82c1c77
--- /dev/null
+++ b/src/main/java/ParaScript/strategies/Fish.java
@@ -0,0 +1,46 @@
+package ParaScript.strategies;
+
+import ParaScript.data.Variables;
+import org.parabot.environment.api.utils.Time;
+import org.parabot.environment.scripts.framework.Strategy;
+import org.rev317.min.api.methods.*;
+import org.rev317.min.api.wrappers.Npc;
+import org.rev317.min.api.wrappers.SceneObject;
+
+public class Fish implements Strategy {
+ private Npc fishingSpot;
+
+ @Override
+ public boolean activate() {
+ fishingSpot = fishingSpot(); // set the local Variable
+ if (Variables.running
+ && fishingSpot != null
+ && (Variables.getStatus() == "none" || Variables.getStatus() == "fishing")
+ && !Players.getMyPlayer().isInCombat()
+ && Players.getMyPlayer().getAnimation() == -1) {
+ Variables.setStatus("fishing");
+ return true;
+ }
+ Variables.setStatus("none");
+ return false;
+ }
+
+ @Override
+ public void execute() {
+ try {
+ fishingSpot.interact(Npcs.Option.NET);
+ Time.sleep(1000);
+ Time.sleep(() -> Players.getMyPlayer().getAnimation() == -1, 30000);
+ } catch (Exception err){
+ System.out.println("Fishing error: ¯\\_(ツ)_/¯");
+ }
+ }
+
+ private Npc fishingSpot(){
+ for(Npc spot : Npcs.getNearest(316)){
+ if (spot != null)
+ return spot;
+ }
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/ParaScript/ui/UI.java b/src/main/java/ParaScript/ui/UI.java
index 96e2cb5..9b2dda1 100644
--- a/src/main/java/ParaScript/ui/UI.java
+++ b/src/main/java/ParaScript/ui/UI.java
@@ -126,6 +126,7 @@ public class UI extends JFrame {
Skill.MINING.getName(),
Skill.ATTACK.getName(),
Skill.THIEVING.getName(),
+ Skill.FISHING.getName(),
"Bank Runner",
}));
skillSelect.setBounds(20, 40, 150, 20);
@@ -468,7 +469,9 @@ public class UI extends JFrame {
/*
* Slave Panel
- */
+ *
+ * DISABLED FOR NOW
+
JPanel slavePanel = new JPanel();
slavePanel.setForeground(Color_WhiteSmoke);
slavePanel.setBackground(Color_WetAsphalt);
@@ -488,6 +491,7 @@ public class UI extends JFrame {
Variables.slaveMaster = slaveMaster.getText();
}
});
+ */
JButton start = new JButton("START");
start.addActionListener(new ActionListener() {