Jump to content

Spork

Members
  • Posts

    26
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

1202 profile views

Spork's Achievements

Bronze Poster

Bronze Poster (2/10)

21

Reputation

  1. Open log and see if it throws an error of some kind, post contents Whew lad, good first script but a couple things: You don't need to define the bank areas, and it seems you already are familiar with the Banks class, so yanno, get rid of that redundant stuff... Also what the heck is going on with private void Woodcut()? It looks like you went to make it a constructor but decided to make it a void that webwalks you lol... I'm not sure what your goal there was. Otherwise, keep it up! You'll get more comfortable with all of it soon
  2. I lose $11 make $12 but pay $3 in taxes what you think
  3. 4 accounts at 2 weeks through their first bond rn, 800+ total, buys from shops and uses GE, ~30m earned, doesn't use any custom mouse settings or injection mode, 0 bans except for the first iteration that broke and killed themselves over and over. It all depends on what you're doing and what level of genuine interaction you maintain with the accounts.
  4. Hey OSBot community, I've been active in the early 2010s in the RuneScape cheating scene but haven't been since round 2017, and I wanted to make a simple easy dollar so I'm back. I was hoping to start a meta thread as to what could be expected by new or returning bot users who only have experience from the gold days, so these are my questions: What's botting like for you these days? Is it still lucrative to single account bot a main? Do you write your own scripts or buy scripts? How successful have you been? Reply to this thread with answers to the prior questions and I'd appreciate it greatly. Thank you guys for providing a mildly toxic development community surrounded by the extreme grimecore hustle experience that is OSRS cheating
  5. Hey dude, nice script! But you know, you can also add another bank function to acquire the stuff that's needed, right? Like something like this: private void equipBank() throws InterruptedException { Bank bank = getBank(); if (bank != null && bank.open()) { bank.depositAll(); if (!getInventory().contains("Sandworms") && getInventory().contains("Fishing rod")) { if (bank.contains("Sandworms") && bank.contains("Fishing rod")) { if (!inventory.contains("Fishing rod")) { bank.withdraw("Fishing rod", 1); } if (!inventory.contains("Sandworms")) { bank.withdrawAll("Sandworms"); } } } else { //EXIT SCRIPT OR ADD GE FUNCTIONALITY } } bank.close(); } That would give you a better function to resolve in your else, but I'd recommend throwing it into its own else if at the second from the top after your location resolve, and then adding another else to log("Weird event?"} or something and stop() if there's some sort of out of scope event Also, private boolean inventoryFull() { return getInventory().getEmptySlots() == 0; } is redundant as you can always use getInventory().isFull() as part of the Inventory class. And as for #4, I agree with @Gunmanand also use that task framework in all of my scripts Keep it up though, this is a pretty robust first script, and I can't wait to see what you write when you're more comfortable with the platform
  6. Hey, I've fingered through the docs and I don't really grasp the concept of the Filter class, but I'm trying to achieve a goal Essentially GroundItem item = groundItems.closest(new AreaFilter<GroundItem>(getArea()) && !closestGroundItem.getName().contains("meat")) is what I'm trying to accomplish, but I don't know how I would define the closestGroundItem before construction. I don't want my player stuck in a conditional statement that just leaves it hung because the closest item is meat, I want it to skip to the next closest item. How would I do this? Edit: I've solved it myself, sorry. Solution: List<GroundItem> t = getGroundItems().getAll().stream().filter((n) -> !n.getName().contains("meat")).collect(Collectors.toList()); for(GroundItem item : t) { doStuff(); }
  7. A buddy of mine requested this over Skype, and as I already had it written as a CLI app, I just converted it to work with OSBot. I guess it's nice for the GUI but not very resource friendly haha. The script iterates through IDs on the GE, checking if it's valid or nah, and then simply log()'s them. Pls write your own logger if you actually want to make use of it lmao. EDIT/WARN: Due to osrs website, this code currently does not work. Will have to change useragent later on and probably use Apache's web lib in further edits. Pls donot use dis for anything other than an example. Jar: http://www.filedropper.com/osgedump Code: package main; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.util.regex.Matcher; import java.util.regex.Pattern; @ScriptManifest(name = "Simple GE Dumper", author = "Spork", version = 13.37, info = "Creates prices.txt...", logo = "") public class Main extends Script { /* * Simple GE Dumper * Should start running at item 0, which is invalid anyway... * Good luck! */ String BASE_URL = "http://services.runescape.com/m=itemdb_oldschool/lookup/viewitem?obj="; int itemId; State state; public enum State { STARTUP, VALID, INVALID, ERROR } @[member='Override'] public void onStart() { state = State.STARTUP; itemId = 0; } @[member='Override'] public void onExit() { //Maybe gonna put logging here. } @[member='Override'] public int onLoop() { try (final BufferedReader reader = new BufferedReader(//Creates BufferedReader new InputStreamReader(new URL(new StringBuffer(BASE_URL).append(itemId).toString()).openStream()))) { //Creates InputStream for the URL to GE appending itemId onto it if (reader.toString().contains("Sorry, there was a problem with your request.")) { state = State.INVALID; //The item is unavailable or not a tradable item } else { state = State.VALID; //WOO String name = getBetween(reader.toString(), "<title>", " - "); //Most useful function: getBetween() String price = getBetween(reader.toString(), "Current Guide Price <span title='", "'"); log(name + " " + price); //TODO: Logging to file } } catch (MalformedURLException e) { state = State.ERROR; } catch (IOException e) { state = State.ERROR; } if (state == State.ERROR) { try { sleep(5000); //Sleep for a while so you can look at it and be like ?? y } catch (InterruptedException e) { e.printStackTrace(); } } itemId++;//Next iteration return 100; } @[member='Override'] public void onPaint(Graphics2D g) { // This is where you will put your code for paint(s) g.drawString("Status: " + state, 30, 300); g.drawString("Checking Item: " + itemId, 30, 280); } public static String getBetween(String haystack, String pre, String post) { Pattern pattern = Pattern.compile(Pattern.quote(pre) + "(.+?)" + Pattern.quote(post)); Matcher matcher = pattern.matcher(haystack); if (matcher.find()) { return haystack.substring(matcher.start(1), matcher.end(1)); } return "No match could be found."; } }
  8. Eclipse throws an error when I don't cast ArrayList<String> for some reason. I think I'll clean and rebuild my project and see if that resolves. Edit: Clean > Rebuild resolved the issue.
  9. Noooo! My first ban ;-; Damn, my first ban! I figured it would come soon since I was running like 6 hours at a time just picking up cowhides lol. It happened when my account hit 24hrs playtime
  10. Edit: messages = (ArrayList<String>) getChatbox().getMessages(MessageType.PLAYER); String message; if(messages.size() > 0) { message = messages.get(messages.size() - 1); } else { message = ""; } This code works when the bot loads, but after the chatbox updates with a new public message it crashes with an indexOutOfBounds exception: -1 @line 45 After researching this it seems others have this issue and it might have been a game update that broke this function?
  11. Shit lol I keep asking dumb questions Sorry, and thanks.
  12. I can't figure out how to send a message ingame, I can figure out how to send key events to the bot but I don't think splitting strings to char arrays and for looping through them to send messages is very efficient lol. Is there a better way? I can't find one in the API and have thoroughly googled.
  13. Yo guys, I solved it. Thank you all, sorry I posted in the wrong section by the way, I misunderstood the description of this board. :P Finished my script finally!
×
×
  • Create New...