Jump to content

heervangrijsburg

Members
  • Posts

    19
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by heervangrijsburg

  1. hello and i wish you the best of luck.
  2. Every time i start a script in the cmd and use the parameter nointerface or low resource mode osbot stops after 1 - 2 minutes. Someone who knows why and how i can solve this problem. Thanks in advance. what have I tested so far : Run the script without the parameter nointerface or low resource mode -> works fine. Run a different script in cmd with the parameter nointerface or low resource mode -> osbot stops. Run the script in cmd with the parameter nointerface or low resource mode on a different pc -> osbot stops. Run the script in cmd with the parameter nointerface or low resource mode on ubunto -> osbot stops. Some information I'm running java 1.8.0_181. The cmd code that i use : cd C:\Program Files\Java\jre1.8.0_181\bin java -jar C:\Users\Desktop\OSBot2.5.51.jar -login osbotname:osbotpassword -bot runescapeaccount:runescapepassword:1234 -debug 12740 -allow nointerface -world 379 -script \"JugFillerHeervangrijsburg\":none The error that i'm getting in cmd :
  3. Thank you very much for the tips. I will have a bit of work to understand everything and be able to write it all myself, but with this I can work further. Thanks again.
  4. As the title says, I try to learn how to work with the GE. What I'm trying to do with this bot is that it gets coins and logs from the bank sells the logs at the GE (currently the logs can be sold at 1 gp later I will try to get the right prices from osbuddy). then the bot would have to buy a steel axe at the GE (currently all coins in the inventory can be used for this later I will also try to get the right prices from osbuddy). Unfortunately, the bot clicks randomly succeeds to get the coins and logs from the bank than he opens the GE to start clicking all over the place. Would anyone be able to look at my code and maybe give me a quick tutorial on how to work with the GE (preferably with a few examples) thank you in advance heervangrijsburg
  5. Thanks for all the help and support my script is finally working now XD.
  6. Hello everyone, I'm working on a script and I have to go from place A to B because the 2 places are not far from each other and therefore I want to use "walkingEvents". There is a gate between those two places. My script goes to the place in front of the gate, but I can not get him to open the gate. Could someone look at my code and tell me what I'm doing wrong? Still learning the basics so it can be a stupid mistake Thanks in advance.
  7. Thanks it worked I´m getting an other error now but I haven´t had time to look into it myself if I can't figure it out I will let you know. Thanks for the help so far.
  8. hello, thanks @Steel Poster but I now use "grandExchange.buyItem". Now I´m getting this error and i don´t know how to fix it : this is the part of the code I think the problem is in but like I said I don´t know how to fig it Main class GoGetAxe class : Axe class
  9. I watched it, but I wanted to learn how to work with widgets. It would be possible with widgets if I am not mistaken. but I will look again to your link and try it out and if it is possible could you still tell me what was wrong with my code for the future.
  10. Axe was in the bank and i had already added the if statement to look if the axe was in the bank but thanks anyway Now I´m trying to create the script that if the axe isn´t in the bank he will sell the logs you harvested and buy the axe but I can't figure out how to open the offer slot in the ge (note i'm already in the ge ). RS2Widget Openbuymenu = getWidgets().get(465, 7, 26); if(Openbuymenu != null) { Openbuymenu.interact("Buy"); new ConditionalSleep(5000) { public boolean condition() throws InterruptedException { return grandExchange.isOfferScreenOpen(); } }.sleep(); } keyboard.typeString(AxeToUse()); int Offerprice = grandExchange.getOfferPrice(); grandExchange.setOfferPrice( 2 * Offerprice );
  11. Thanks man and i´am still learning but my script is currently broken and i don´t know what i´m doing wrong
  12. Hi so i used ´else if´ statements but now my bot is not able to withdraw anything from the bank could someone take a look at my code ? thanks by the way for all the support. import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import task.Woodcutting; @ScriptManifest(author = "Heervangrijsburg", logo = "", info ="Will cut trees" , version = 1.2 , name = "WC tree") public class Main extends Script { private Area Bank = new Area(3180, 3446, 3183, 3435); private String Axetouse = ""; @Override public void onStart() { } public void onExit() { } public int onLoop() throws InterruptedException { int Woodcuttinglevel = skills.getDynamic(Skill.WOODCUTTING); if (Woodcuttinglevel <= 5){ Axetouse = "Bronze axe"; sleep(200); } else if (Woodcuttinglevel <= 10){ Axetouse = "Steel axe"; sleep(200); } else if (Woodcuttinglevel <= 20){ Axetouse = "Black axe"; sleep(200); } else if (Woodcuttinglevel <= 30){ Axetouse = "Mithril axe"; sleep(200); } else if (Woodcuttinglevel <= 40){ Axetouse = "Adamant axe"; sleep(200); } else if (Woodcuttinglevel <= 99){ Axetouse = "Rune axe"; sleep(200); } if (inventory.contains(Axetouse)){ new Woodcutting(this); } else { if (Bank.contains(myPlayer())) { if (bank.isOpen()) { bank.withdraw(Axetouse, 1); bank.close(); sleep(200); } else { bank.open(); sleep(200); } } else { getWalking().webWalk(Bank); new ConditionalSleep(5000) { public boolean condition() throws InterruptedException { return Bank.contains(myPlayer()); } }.sleep(); } } return 1000; } }
  13. Hi, I'm trying to make the script that it changes from axe´s when he gets to a certain level. For this I use the switch statement, but in any case i get the error message "Constant expression required". can someone pls tell me what I´m doing wrong? int Woodcuttinglevel = skills.getDynamic(Skill.WOODCUTTING); switch (true) { case (Woodcuttinglevel >= 5): break; case (Woodcuttinglevel >= 10): break; case (Woodcuttinglevel >= 20): break; case (Woodcuttinglevel >= 30): break; case (Woodcuttinglevel >= 40): break; default: break;
  14. Hi guys, I think I did almost everything you guys suggested. the script does not get stuck anymore and I can start the script with a complete inventory. However, I have not made any methods yet, but maybe someone already wants to take a look at the script and tell me what I can improve on it. Special thx to @JioMy for his detailed report on everthing I could improve on every line. import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "Heervangrijsburg", logo = "", info ="Will cut trees" , version = 1.2 , name = "WC tree") public class Main extends Script { private Area Woodcutting = new Area(3088, 3262, 3070, 3273); private Area Bank = new Area(3092, 3241, 3093, 3242); @Override public void onStart() { } public void onExit() { } public int onLoop() throws InterruptedException{ if (!getInventory().isFull()){ if (Woodcutting.contains(myPlayer())){ Entity Tree = objects.closest("tree"); if (Tree != null && Woodcutting.contains(Tree)){ Tree.interact("Chop Down"); new ConditionalSleep(5000){ public boolean condition() throws InterruptedException{ return !myPlayer().isAnimating() && !myPlayer().isMoving(); } }.sleep(); }else{ sleep(200); } }else{ getWalking().webWalk(Woodcutting); new ConditionalSleep(5000){ public boolean condition() throws InterruptedException{ return Woodcutting.contains(myPlayer()); } }.sleep(); } }else{ if (Bank.contains(myPlayer())){ if (bank.isOpen()){ bank.depositAll("Logs"); bank.close(); sleep(200); } else { bank.open(); sleep(200); } } else { getWalking().webWalk(Bank); new ConditionalSleep(5000){ public boolean condition() throws InterruptedException{ return Bank.contains(myPlayer()); } }.sleep(); } }return 0; } }
  15. thank you guys for the quick response I will look at it immediately
  16. Hey guys, I'm trying to learn how to make scripts. The first script that I'm trying to make is a woodcutting script and this is what I have so far : import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Heervangrijsburg", logo = "", info ="Will cut trees" , version = 1.0 , name = "WC tree") public class Main extends Script { @Override public void onStart(){ } public void onExit(){ } public int onLoop() throws InterruptedException { if(!getInventory().isFull()){ Area woodcutting = new Area(3086, 3263, 3074, 3272); Entity tree = objects.closest("tree"); if(!woodcutting.contains(myPlayer())){ getWalking().walk(woodcutting); }else{ if(tree != null) { if(!myPlayer().isAnimating()) { if(!myPlayer().isMoving()) { tree.interact("Chop Down"); } } } } }else{ Area Bank = new Area(3092, 3241, 3093, 3242); if(!Bank.contains(myPlayer())){ getWalking().walk(Bank); }else if(!bank.isOpen()){ bank.open(); }else{ bank.depositAll("Logs"); bank.close(); } }return 1000; } } But sometimes it seems to get stuck and when I start the script when the inventory is full the script doesn't work at all. So my questiopn is whether someone who has more experience with this could take a look at it and give me some tips?
×
×
  • Create New...