Jump to content

battleguard

Members
  • Posts

    54
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by battleguard

  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.
  16. This is a basic High Level Alchemy Script that supports the following things. - Automatically setting up item in best spot - Alching Multiple items in one run - Nice GUI thats show all items in your inventory worth alching with pictures and item names - Profit per alch based off of current osbuddy price for item and nature rune - Minimalist paint - Accurate Alching times for human alching TODO: - Cleanup view code - Add back in support for low level alchemy - Add back in customizable alching times - Add in support for changing alch position randomly Link to Download Jar: https://github.com/battleguard/easyalch/releases/download/1.0/EasyAlch.jar Link to view source code: https://github.com/battleguard/easyalch Startup Gui: Runtime Paint This script was written initially by me over 6 years ago so it was interesting to rewrite and see what all has not changed since then. (Original Code from 6 years ago: https://gist.github.com/battleguard/3109764) Let me know if you have anything you want me to add and if this is something I should try and pursue to get on the SDN. Its just a simple alcher but I could not find any on the SDN that had all the features from my old script so that is why I decided to bring it back.
  17. haha your kidding I did not know that... Well that saves half the time then for getting the account ready. Does this also apply for selling items on the grand exchange because I sell items I collect before muling the money.
  18. its all on my home IP with no proxy and I use the osbuddy client when manually doing it. I really dont think using a proxy though while doing the tutorial script will fix it I think tutorial island is just super ban prone in general. I might try buying some accounts as the guy above suggested but im sure those are done through a script also so I dont think that will make much difference. Do people notice a drastic difference in bans based off which tutorial island script they use I could try buying the one on the sdn instead of using explv free one.
  19. I have a private script that I made that requires just 7QP and I am able to run them the full 14 days of membership with no bans almost always if I manually do the tutorial island and 7QP's. If I run a script though for the Tut and 7QP's they get banned in 2-5 days always. It seems crazy that I can run my private script everyday for 14 days straight and not get banned but just running 30 minutes of botting for tutorial island and 7QP's always gets them flagged and banned 2-5 days later. I also am resting these accounts for 3 days after completing the 7QP's. Does everyone just manually do the tutorial island and beginner quests for P2P farming or am I missing something because it really stinks to have to manually make 10 new accounts every 14 days and get them 7QP's. Any tips or advice would be appreciated thanks
  20. The configs do not hold the current grand exchange trade data sadly it must be in a hook that osbot has not implemented.
  21. If you want to get away from using static ids for things like getting the box widgets you should look into using bounding box sizes, x and y values for figuring out which box is what. For the buy and sell button on the box you can use Sprite ID's. That is how it is done in the OSBOT source code.
  22. the problem with the Osbot\data folder is I want to be able to bake resources into my jar so I do not have to download all the files off the web and put the cached version into the osbot\data folder. For example if I had images for my paint it would be nice to just put them in my resources folder instead of having to store them online and then download them when I want to run the script. Sure once I run it once I could cache them in the users osbot\data folder but I would rather not have to do that. Also if that is the case now that OSBOT/data is supposed to be used for now on hopefully one of the mods can remove this sticky it might save some other scripter a couple hours of headache.
  23. I have followed every step in this tutorial and have verified the resource file is in the right spot on the jar and have tried this with a non osbot jar and everything works, but I cannot get this working in OSBOT at all. My guess is there has been security permissions that have changed this this post was made. Can anyone verify this still works because I have tried everything.
  24. I really hope someone can answer my question because it looks like the jar starts up the script application org.osbot.BotApplication with the JVM argument -XX:+DisableAttachMechanism which makes it impossible to do any sort of profiling or creating heap dumps. @Alec hopefully you can clear this up. This really stinks because you can never then use these tools to diagnose memory problems in your script or look at cpu hotspots in your script etc...
  25. I am not seeing anyway to get jmap to actually dump the heap of the BotApplication is just hangs when trying to force it or if i try to do it normally it says the VM does not support the attach mechanism
×
×
  • Create New...