-
Barbarian Rod Fishing
Updated to version 0.2 if anyone gets bugs or errors let me know, otherwise enjoy! Still need to add fishing bait compatibility.
-
Barbarian Rod Fishing
As this was my first script, I ripped that off of another script on pastebin. I now know how to randomize sleep time but because I've written a couple more private scripts since this. I add the rod pickup and change the sleep time when I get home. Thanks!
-
Dialogue help?
Eric had mentioned that so I changed the script to be random sleep times If I did something wrong with the new sleep times please let me know: if(judge != null) { if (!getInventory().contains("Bronze Arrow") && !getEquipment().contains("Bronze Arrow")) { if(getDialogues().isPendingContinuation()) { getDialogues().clickContinue(); sleep(MethodProvider.gRandom(400, 850)); } else if(getDialogues().inDialogue()) { getDialogues().selectOption("Sure, I'll give it a go."); sleep(MethodProvider.gRandom(400, 850)); } else { judge.interact("Talk-to"); } } } while (getInventory().contains("Bronze Arrow")) { getEquipment().equip(EquipmentSlot.ARROWS, "Bronze Arrow"); } while (getEquipment().isWearingItem(EquipmentSlot.ARROWS, "Bronze Arrow")) { Targets.interact("Fire-at"); sleep(MethodProvider.gRandom(600, 1250)); getInterfaces().closeOpenInterface(); } Still getting the interface issue, just sits there when the results of the arrow pop up. Perhaps it's not recognized as an interface? Idk
-
Dialogue help?
Like so? if (interfaces.getOpenInterface().isVisible() && interfaces.getOpenInterface() != null) interfaces.closeOpenInterface(); Tested and it returns an error I might just try the parent/child method but I'll have to look at the API because I know nothing about that lol
-
Dialogue help?
Got it I've tried it on my own, and everything runs smooth now except for the part where it has to close the new interface that opens once an arrow is fired. Here's the new code: if(judge != null) { if (!getInventory().contains("Bronze Arrow") && !getEquipment().contains("Bronze Arrow")) { if(getDialogues().isPendingContinuation()) { getDialogues().clickContinue(); sleep(MethodProvider.gRandom(400, 850)); } else if(getDialogues().inDialogue()) { getDialogues().selectOption("Sure, I'll give it a go."); sleep(MethodProvider.gRandom(400, 850)); } else { judge.interact("Talk-to"); } } } while (getInventory().contains("Bronze Arrow")) { getEquipment().equip(EquipmentSlot.ARROWS, "Bronze Arrow"); } while (getEquipment().isWearingItem(EquipmentSlot.ARROWS, "Bronze Arrow")) { Targets.interact("Fire-at"); sleep(MethodProvider.gRandom(600, 1250)); getInterfaces().closeOpenInterface(); } I tried using interfaces, Interfaces, getInterfaces().getOpenInterfaces().close() Anything I could think of. Do I have to create a static variable for the open interface, and add .close() to it or something?
-
Dialogue help?
Worked, thanks Changed to this now, hope I did the sleeping right: NPC judge = npcs.closestThatContains("Competition Judge"); if(judge != null) { if (!getInventory().contains("Bronze Arrow") && !getEquipment().contains("Bronze Arrow")) { if(getDialogues().isPendingContinuation()) { getDialogues().clickContinue(); sleep(MethodProvider.gRandom(400, 850)); } else if(getDialogues().inDialogue()) { getDialogues().selectOption("Sure, I'll give it a go."); sleep(MethodProvider.gRandom(400, 850)); } else { judge.interact("Talk-to"); } } } Might I ask why I always see if ( != null ) in scripts? What is it significant about that condition? Can't it just not be used with the same outcome?
-
Dialogue help?
Trying to make a Range Guild script, but the dialogue seems to be messing up on me. Here's what I have: NPC judge = npcs.closestThatContains("Competition Judge"); if (!getInventory().contains("Bronze Arrow") && !getEquipment().contains("Bronze Arrow")) judge.interact("Talk-to"); getDialogues().clickContinue(); sleep(1500); getDialogues().selectOption("Sure, I'll give it a go."); sleep(1500); getDialogues().clickContinue(); sleep(1000); It just loops back to "Talk-to" and clicks continue once, then restarts again and talks to the judge. A never ending cycle. I tried removing the if statement and even adding another but it didn't work. Can't test the latter part of my script because I can't even get passed the dialogue portion, lol. Help?
-
Barbarian Rod Fishing
Uploaded the jar, won't let me use attachment feature on here sadly If that ever gets around to work I'll remove the link. Enjoy!
-
Barbarian Rod Fishing
Hello, all! This is my first ever script, and I used it for 63-67 fishing. I ran out of feathers so I had to stop, but I am happy with the results I got. Features: Picks up rod if dropped by annoying random Random sleep times (better anti-ban) Start at Otto's Grotto by Barbarian Outpost MUST HAVE BARBARIAN FISHING ROD AND FEATHERS Barbarian style fishing at Otto's Grotto Use of feathers only (doesn't work with fishing bait yet) Powerfishing I just added the very minor paint, don't know if that works or not, so if anyone would like to give me some feedback/results I'd appreciate it. Things to add: Fishing bait compatibility Enjoy import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.concurrent.TimeUnit; /** * Created by ${igetbanned} on 8/30/2014. */ @ScriptManifest( author = "igetbanned", info = "Powerfishes barbarian style", name = "BarbarianFisher", version = 0.2, logo = "Cool" ) public class BarbarianFIsher extends Script { private double currentLevelXp; private int xpPerHour; private double nextLevelXp; private int currentLevel; private int beginningXp; private int currentXp; private int xpGained; private long timeRan; private long timeBegan; private double xpTillNextLevel; private long timeTNL; final int[] XP_TABLE = { 0, 0, 83, 174, 276, 388, 512, 650, 801, 969, 1154, 1358, 1584, 1833, 2107, 2411, 2746, 3115, 3523, 3973, 4470, 5018, 5624, 6291, 7028, 7842, 8740, 9730, 10824, 12031, 13363, 14833, 16456, 18247, 20224, 22406, 24815, 27473, 30408, 33648, 37224, 41171, 45529, 50339, 55649, 61512, 67983, 75127, 83014, 91721, 101333, 111945, 123660, 136594, 150872, 166636, 184040, 203254, 224466, 247886, 273742, 302288, 333804, 368599, 407015, 449428, 496254, 547953, 605032, 668051, 737627, 814445, 899257, 992895, 1096278, 1210421, 1336443, 1475581, 1629200, 1798808, 1986068, 2192818, 2421087, 2673114, 2951373, 3258594, 3597792, 3972294, 4385776, 4842295, 5346332, 5902831, 6517253, 7195629, 7944614, 8771558, 9684577, 10692629, 11805606, 13034431, 200000000 }; private static final int[] FISHING_ID = {1542}; public void onStart(){ log("Barbarian Fisher Started!"); timeTNL = 0; timeBegan = System.currentTimeMillis(); beginningXp = skills.getExperience(Skill.FISHING); } private enum State { FISHING, DROPPING } private State getState() { if (inventory.isFull()) return State.DROPPING; return State.FISHING; } public int onLoop() throws InterruptedException { switch (getState()) { case FISHING: if (!myPlayer().isAnimating()) { NPC Fishing_spot = npcs.closest(FISHING_ID); if (!inventory.isFull()){ Fishing_spot.interact("Use-rod"); } if (myPlayer().isAnimating()) { sleep(MethodProvider.gRandom(6000, 13000)); getTabs().open(Tab.SKILLS); sleep(MethodProvider.gRandom(300, 1200)); getSkills().hoverSkill(Skill.FISHING); sleep(MethodProvider.gRandom(3000, 4000)); getTabs().open(Tab.INVENTORY); sleep(MethodProvider.gRandom(7000, 12000)); getMouse().moveRandomly(); } } if (!getInventory().contains(11323)) { GroundItem loot = groundItems.closest(11323); if (!myPlayer().isAnimating()) { loot.interact("Take"); } } break; case DROPPING: inventory.dropAllExcept(11323, 314); break; } return random(100, 300); } public void onPaint(Graphics g) { timeRan = System.currentTimeMillis() - this.timeBegan; currentXp = skills.getExperience(Skill.FISHING); currentLevel = skills.getStatic(Skill.FISHING); currentLevelXp = XP_TABLE[currentLevel]; nextLevelXp = XP_TABLE[currentLevel + 1]; xpGained = currentXp - beginningXp; xpPerHour = (int)( xpGained / ((System.currentTimeMillis() - this.timeBegan) / 3600000.0D)); nextLevelXp = XP_TABLE[currentLevel + 1]; xpTillNextLevel = nextLevelXp - currentXp; if (xpGained >= 1) { timeTNL = (long) ((xpTillNextLevel / xpPerHour) * 3600000); } g.drawString(ft(timeRan), 430, 328); g.drawString("XP Gained: " + xpGained, 200, 328); g.drawString("TNL: " + ft(timeTNL), 300,300); } private String ft(long duration){ String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } //code to be executed on exit public void onExit(){ log("Script stopped!"); } } Jar download: http://s000.tinyupload.com/index.php?file_id=05237746024105469619 Virus Scan: https://www.virustotal.com/en/file/26df51432a6133b238191d0e09e21d36c54b70e84eb60c39e22bf261878387bd/analysis/1409756838/ Version 0.2 - Added random sleep times Picks up rod if dropped by random
-
Free script / snippet consulting service
Works great just gotta adjust sleep time, moves too quick. I get the Instance.method(); now, makes sense Thanks!!
-
Free script / snippet consulting service
Hello! I'm glad someone decided to make this, directed towards n00bs like me Allow me to break the ice - I want to now add anti-ban onto my script that I just finished the functionality of, a simple barb fishing powerfisher For starters I want it to open the skills tab and hover over the "Fishing" skill for a few seconds, here is what I have so far: if (myPlayer().isAnimating()) { sleep(500-6000); getTabs(); open(Tab.SKILLS); sleep(300-1200); However IntelliJ is saying it cannot resolve method "open" I then want it to hover over the "Fishing" skill, and I found after a google search this little snippet, submitted by a user who told another script writer to use the Parent and Child id's of the colors of the skills, and then hover over that. Here that is: if (client.getInterface(parentId) != null) { client.getInterface(parentId).getChild(childId).hover(); } Can't use client.getInterface() however, so now do I go about using MouseDestination? Wonderful idea of this thread by the way!
-
Bot does nothing?
Works now! Thank you both so much
-
Bot does nothing?
I finished (or so I think) the functionality part of my script, but upon running it in OSBot, the bot just stands there. I've tried everything to my level of understanding, yet nothing works. Restarting the bot/script won't fix it. Here's all the code: package org.igetbanned.barbfisher; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; /** * Created by ${igetbanned} on 8/30/2014. */ @ScriptManifest( author = "igetbanned", info = "Powerfishes barbarian style", name = "BarbarianFisher", version = 0.1, logo = "Cool" ) public class BarbarianFIsher extends Script { private static final int[] FISHING_ID = {14882}; public void onStart(){ log("Barbarian Fisher Started!"); } private enum State { FISHING, DROPPING } private State getState() { if (inventory.isFull()) return State.DROPPING; return State.FISHING; } public int onLoop() throws InterruptedException { switch (getState()) { case FISHING: if (!myPlayer().isAnimating()) { RS2Object Fishing_spot = objects.closest(FISHING_ID); if (!inventory.isFull()){ Fishing_spot.interact("Use-rod"); } } break; case DROPPING: inventory.dropAllExcept(11323, 314); break; } return random(200, 300); } public void onPaint(Graphics g) { } //code to be executed on exit public void onExit(){ log("Script stopped!"); } }
-
Help making a barb fishing script?
I'm trying to make a script that powerfishes leaping trout/salmon/sturgeon at otto's grotto. I'm new to Java, however, and there doesn't seem to be many, if any at all, tutorials for OSBot 2 scripting. Anyways, here's what I need help with: - Upon starting the script the bot just stands there (URGENT!!!) - Interacting with an Object (fishing spot) won't work for some reason - Dropping (not sure what the code is for that, but if I can find it on the API please link ) - Antiban (Mousing over skills/changing tabs) I use JDK 7 with IntelliJ IDEA I'm not asking you guys to hold my hand on making this, but I am very new to Java (and even coding), and there doesn't seem to be much help for those who are "new" to the scene. Figured this would be a fun way to learn Java and play RS tho. Thanks! What I have so far: package org.igetbanned.barbfisher; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; /** * Created by ${igetbanned} on 8/30/2014. */ @ScriptManifest( author = "igetbanned", info = "Powerfishes barbarian style", name = "BarbarianFisher", version = 0.1, logo = "Cool" ) public class BarbarianFIsher extends Script { public void onStart(){ log("Barbarian Fisher Started!"); } private enum State { FISHING, DROPPING, IDLE } private State getState() { if (inventory.isFull()) return State.DROPPING; if (inventory.isEmptyExcept("Barbarian Rod", "Feather")) return State.FISHING; return State.IDLE; } public int onLoop() throws InterruptedException { switch (getState()) { case FISHING: Entity fishingspot = objects.closest("Fishing Spot"); fishingspot.interact("Use-rod"); break; case DROPPING: inventory.drop(11328, 11330); break; case IDLE: sleep(random(500, 700)); break; } return random(200, 300); } public void onPaint(Graphics g) { } //code to be executed on exit public void onExit(){ log("Script stopped!"); } }