Jump to content

Theorems

Lifetime Sponsor
  • Posts

    193
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by Theorems

  1. I actually made a gf bot once, it sat in the ge "advertising" then when it got a hit it followed them begging for money and using cry emote It got banned after like 1.5 hours though, rip. I was using a shit proxy to be fair.
  2. I completely re-wrote it except for the onMessage() -- no tinfoiling this time!
  3. The thing I know that might break after 2 weeks is the widget ID which will probably change when rs updates. Anything else you see which could break easily so I know for the next script I make?
  4. I was trying to bot some diamond bolt tips because I saw they have a nice profit margin but osfletcher doesn't seem to have that, and acerds fletcher seemed to be broken when I used it for that purpose. Change the RAW_MATERIAL variable to a different type of gem to cut that instead, but note that it is case sensitive: package boltTips; import org.osbot.rs07.api.ui.Message; import org.osbot.rs07.api.ui.Message.MessageType; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "theorems", info = "t", logo = "", name = "bolt tips", version = 0.1) public class Main extends Script { private String RAW_MATERIAL = "Diamond"; private int KEYCODE_SPACE = 32; private String FINISHED_MATERIAL = RAW_MATERIAL + " bolt tips"; private String[] boltTip = { "Chisel", FINISHED_MATERIAL }; private String[] unfBoltTip = { "Chisel", RAW_MATERIAL }; private String[] makingBolt = { "Chisel", RAW_MATERIAL, FINISHED_MATERIAL }; private String lastMsg = ""; @Override public int onLoop() throws InterruptedException { if (getDialogues().isPendingContinuation()) { // when level up getKeyboard().pressKey(KEYCODE_SPACE); } else { if (getWidgets().isVisible(270, 14, 38)) { getKeyboard().pressKey(KEYCODE_SPACE); // this returns void sleep(random(500, 1000)); getMouse().moveOutsideScreen(); new ConditionalSleep(100000, 5000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains(RAW_MATERIAL) && !myPlayer().isAnimating(); } }.sleep(); } else if (getInventory().contains("Chisel") && getInventory().contains(RAW_MATERIAL)) { if (getBank().isOpen()) { getBank().close(); } else { if (getInventory().isItemSelected()) { if (getInventory().getSelectedItemName().equals("Chisel")) { if (getInventory().interact("Use", RAW_MATERIAL)) { sleep(500); } } else { getInventory().deselectItem(); } } else { getInventory().interact("Use", "Chisel"); } } } else if (getInventory().contains("Chisel") && getInventory().contains(FINISHED_MATERIAL) && !getInventory().contains(RAW_MATERIAL)) { bank(); if (!getInventory().onlyContains(makingBolt)) { getBank().depositAllExcept(makingBolt); } else { getBank().depositAll(FINISHED_MATERIAL); } } else if (getInventory().contains("Chisel")) { log("only chisel"); bank(); getBank().withdrawAll(RAW_MATERIAL); } else { setup(); } } return 500; } public void setup() { if (!getBank().isOpen()) { bank(); } else { if (getInventory().isEmpty()) { getBank().withdraw("Chisel", 1); } else { getBank().depositAll(); } } } public void bank() { if (getInventory().isItemSelected()) { getInventory().deselectItem(); } if (!getBank().isOpen()) { try { if (getBank().open()) { new ConditionalSleep(2500) { @Override public boolean condition() throws InterruptedException { return getBank().isOpen(); } }.sleep(); } } catch (InterruptedException e) { log("Error banking: " + e.getMessage()); e.printStackTrace(); } } } @Override public void onMessage(Message message) throws java.lang.InterruptedException { if (message.getType() == MessageType.GAME) { String msg = message.getMessage().toLowerCase(); String er = "you don't have enough inventory space."; if (msg.equals(er) && lastMsg.equals(er)) { log("Shutting down for safety"); stop(); } lastMsg = msg; } } } EDIT: completely rewrote the script except for the msg failsafe. It is now quite robust, I tried to break it in every way I could think of and was unable to do so.
  5. wait so new wilderness scripts are allowed? or is this an older script..forums says it was posted tuesday
  6. That's funny considering there are already multiple wildy scripts on the Sdn. It seems kinda like a thing where you are allowed to do it if you have favour with the admins/devs
  7. yeah got me there I have been botting longer on other sites though
  8. "Joined: December 26, 2017" Just wait, and don't get overconfident.
  9. ok not sure from your response but this is happening even with the 8 lobsters in my inventory.
  10. Trying to run with 8 lobsters and no potions (it doesn't seem to like using no food). It walks to the crab spot then goes to the bank area then back to crab spot in a loop. Not sure if the new osbot update is causing this or what.
  11. Oh hey I've been looking for an ammonite crab script, don't have time to make my own. Could I please have a trial?
  12. Never knew that, my bad lol.
  13. Hey apa, what about when making potions that require the bot to withdraw 14 of each ingredient make the bot use inventory slot 13 on 14 instead of using the default interaction which makes the bot go out of its way to click slot 1 (which makes it look bot-like imo). Idk I could just be tinfoil hatting but I'm gonna make that modification for my copy (ty for open source). edit: also if you were going to add any other features to this amazing free script, a nice one would be using the npc in the grand exchange to 'decant' your 3-dose potions either after each inventory or as a separate task. Probably not worth your while as it's a free script, but just thought I'd post in case you were looking for suggestions.
  14. That's a bad idea, why not just do 6 hours a day and not get banned instead
  15. If you connect to any server over the internet, they can see your ip
  16. Those are good reasons to stop playing, but why stop botting? It's not like that should take more than a few minutes to set up per day unless your goldfarming.
  17. They gave granite Warhammer the same attack speed as a scimitar, making it BIS for 50 attack pures. All other warhammers have a lower attack speed and yes, granite longsword is inferior for training.
  18. That is strange, it just says "return type for the method is missing" when I go to use it in any class other than my Main.java But I see it there in the api so I must just be doing something wrong...anyway I got it working now by moving some functionality to my main class and my updating variables to a class which doesn't have anything to do with method provider.
  19. Yes you know what I mean, I should have done a better job explaining . So how would I then create that instance of 'B' in 'C' because unless I'm doing something wrong .exchangeContext() is only available if you are extending script. Edit: nvm I think I see what you mean, ty for explaining.
  20. It compiles fine, it's a runtime nullPointer error that only happens when I call a method in a class extending method provider from a class extending method provider.
  21. In main method (works): VariableActions varAction = new VariableActions(); //declared at top of class varAction.exchangeContext(getBot()); //called in onStart() varAction.AFK(); // called where I want to use it In other method that also extends methodContext (nullpointer): VariableActions varAction = new VariableActions(); varAction.AFK();
  22. i know that . I am doing that in my main class and it works there, but if I try to do it in a different class which also extends methodProvider it gives a nullPointerException
  23. I have just spent hours trying to figure out why I cannot call methods defined in one class which extends method provider in another class that extends method provider. Is that just something which cannot be done? I can use my methods from my classes which extend method provider in my main class because there I can use .exchangeContext(getBot()); but that only seems to exist for Script. If I call a method from a class extending method provider in another class extending method provider it gives me a nullpointer error (even if it is just a setter or getter)... I could just work around this in my program design but if there is a way to call methods across classes extending method provider I would much rather do that for the sake of having a structured program.
×
×
  • Create New...