Jump to content

battleguard

Members
  • Posts

    54
  • Joined

  • Last visited

  • Feedback

    100%

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

battleguard's Achievements

Iron Poster

Iron Poster (3/10)

25

Reputation

  1. Its nice to see a developer for a bot that actually takes the time to write very informative responses. I am sure you have seen these type of questions time and time again but you still tailor a unique response and dont just tell them to use the search function so kudos to you!
  2. embeded resources will not work in osbot you will have to download the images from the web or you can put them in your osbot data folder. Here is some example code of where I try to load a file from the osbot data directory and if not found I download it from the web and create the cache https://github.com/battleguard/easyalch/blob/master/src/script/services/PriceLoader.java#L100 Here someones example snippet of a file utility class
  3. https://rsbuddy.com/exchange/summary.json
  4. double profitPerHour = (long) (profit * (3600000.0 / elapsedTimeMs)); This is pretty basic logic but it works like this: Total Profit / TotalTimeElapsedInMilliseconds = Profit per Millisecond Then since you want it in hours you times it by the number of milliseconds in an hour (3600000) to now get profit per hour
  5. calling the price is as easy as using a field on the Potion class. You might want to look into using classes in a java tutorial if your still having trouble with the above code.
  6. How do I get this script to loot arrows properly when ranging. It seems to after the kill it will loot the stuff from the kill then it gets stuck in a state where it spam clicks the safe spot and spam clicks looting arrows getting it stuck in an infinite loop.
  7. Ya I forgot java allows enums to store more than just a single value im used to c# enums. Thanks I fixed above code.
  8. You need to learn to use classes for grouping items together. If you use this class throughout your script you will remove all of your redundant code where you have to check each type. (Edit as EagleScript said Enum Classes will make this way better so here is the same thing written with enums now) public enum Potion { IRIT(259, 101), TOADFLAX(2998, 3002), AVENTOE(261, 103), KWUARM(263, 105), CANDENTINE(265, 107), LANTADYME(2481, 2483); public final int HerbPrice; public final int Margin; public final int UnfinishedPrice; public final String Name; public final int HerbId; public final int UnfinishedId; private final String UnfinishedName; Potion(int herbId, int unfinishedId) { Name = name().substring(0,1).toUpperCase() + name().substring(1).toLowerCase(); UnfinishedName = Name + " potion (unf)"; HerbId = herbId; UnfinishedId = unfinishedId; // TODO: you should make your GE lookup class methods static so you dont need to instiantiate this. GrandExchange ge = new GrandExchange(); HerbPrice = Math.max(ge.getBuyingPrice(HerbId), ge.getSellingPrice(HerbId)); UnfinishedPrice = Math.min(ge.getBuyingPrice(UnfinishedId), ge.getSellingPrice(UnfinishedId)); Margin = UnfinishedPrice - HerbPrice; } } // here is how you would get the current potion you are using Potion highestMarginPotion = Arrays.stream(Potion.values()).max(Comparator.comparingInt(p -> p.Margin)).get(); Please make sure you know how to use classes though before using this code.
  9. It will also go to the command line or your IDE's output log if you start the OSBOT JAR up with a debug port.
  10. Neither of those two examples are snippets btw but an entire script. Snippets are what you see in the snippet section such as - grab ge prices - skill tracker - inventory tracker - Timers - Paint Helper - Gui Helper - Conditional Sleep Util - Number Formatters etc...
  11. Good luck i have made over 1B flipping so hit me up if you have any questions.
  12. I get that jar in memory warning also when building with intellij, but the script will still update when you hit refresh on the script selector on the next run. Check and see if the last modified date is changing on the compiled jar when you build.
  13. This is definitely not true not sure why so many people believe IP flagging is such a huge deal. I have been botting on the same IP with up to 10 bots a day and they get banned periodically but if they were IP flagging they would all be banned way quicker than they are. You would see a huge difference in ban rates from when you initially started botting till now because they would be banning way quicker just by checking your ip.
  14. This can easily be done but you have to create the webwalk event and pass it to the exector instead of calling the web walking methods inside of the walking class. Just tested this code and it will never run. If you use intellij you can look at the obbed source code of web walking event and see what goes inside to figure these things out quicker. Position alkharidBank = new Position(3269, 3167, 0); WebWalkEvent webWalkEvent = new WebWalkEvent(varrock); webWalkEvent.setEnergyThreshold(Integer.MAX_VALUE); this.execute(webWalkEvent).hasFinished(); https://osbot.org/api/org/osbot/rs07/event/WebWalkEvent.html#setEnergyThreshold-int- osbot code that handles runnng in WebWalkEvent
  15. I’ll buy a bunch of items today and see if I can get a longer progress picture. The main benefit of this script is it’s great if you want to alchemy for a profIt by just buying a bunch of armor items that have very low buy limits but will make money when alchemy.
×
×
  • Create New...