Everything posted by Lemons
-
Get and save sprite snippet
Should have all the items, though this is from an older revision (forget which, I got the dump from rune-server) so newer items might be missing.
-
Get and save sprite snippet
If you'd like to simplify this, I host the item images in 32x32 pngs. http://basketti.club/441.png above url is for noted iron ore: otherwise great solution
-
Position returning 0 when parsing value
I assume its because you are calling miningPos1 = new Position() before the parsing is done to set the values, so the values would be "0" (the default for ints). Set the miningPos1 after parsing the variables, I assume in the constructor.
-
Losing my drive
Do something different. Sounds like you aren't doing a lot of things for fun, just money/school/because you have to. Go out and have some fun, a little R&R never hurts.
-
Basic Paint problem
A simpler msToString method (takes seconds tho, so need to do ms/1000 first): /** * Formats seconds into a H:MM:SS timestamp * @param seconds * @return */ public static String formatTime(long seconds) { if (seconds <= 0) return "00:00:00"; return String.format("%d:%02d:%02d", seconds / 3600, (seconds % 3600) / 60, (seconds % 60)); }
-
list of items not working
Because Inventory.contains only checks if it contains any of the given items, not all of the given items. You could try: Arrays.stream(axes).allMatch(i -> getInventory().contains(i)) This would make sure it contains all the items in your inventory, instead of just 1.
-
Macro Cooker - Intelligent Areas
Yeah I kinda just wrapped them all, I been removing the ones that are obviously useless slowly. I'll probably remove this class as well. I haven't released it yet for a reason hehe.
-
Macro Cooker - Intelligent Areas
Yes, its an attempt to make up for the atrocity the other one was lol.
-
Macro Cooker - Intelligent Areas
https://github.com/Lem0ns/QuantumAPI/blob/master/src/rip/quantum/api/QuantumMap.java#L249-L299 Finds suitable ends for entities based on map data. Might be of use for this as well.
-
questions
Premium scripts (such as Perfect scripts) are purchased separately. VIP gives you unlimited bot tabs/clients, mirror mode, and access to VIP scripts. Full feature list as of this post: Unlimited bots Mirror Mode unlocked No advertisements on the website and bot client Access to free VIP+ only scripts 10% discount on all premium script purchases Unique purple username to get recognized Changeable user title A special private forum Maximum of 3 images in your signature instead of 1 Signature space of 800x600 instead of 500x300 Ability to change the title of your own threads 3 free display name change per month
-
Using Multiple Classes
the simplest way to do this is to extend MethodProvider: class MyScriptStep extends MethodProvider { public void run() { getObjects().getAll()...; // Use OSBot API as you would in main script class } } Then in your script you would do class MyScript extends Script { // Define the MyScriptStep object private MyScriptStep scriptStep = new MyScriptStep(); // ... @Override public void onStart() { scriptStep.exchangeContext(getBot()); // Configure the MethodProvider to use this bot } // ... public int onLoop() { if (someCondition) { scriptStep.run(); // Run the step } } }
-
Interacting with entities
class MyMiner extends Script { Position rockLocation = new Position(1, 2, 0); // ... public int onLoop() { // ... case MINE: // This is incorrect, this will simply return the closest rock regardless of position. Define a position ahead of time, else explain what your end goal is. //RS2Object rocks = getObjects().closest("Rocks"); // This is the correct way to filter by location with Lambdas, not the null check is note needed (@Team Cape) // Also note I changed the variable to "o", as it is not a rock but an RS2Object RS2Object rock = getObjects().closest(o -> o.getName().equals("Rocks") && o.getPosition().equals(rockLocation)); // If you'd like to use OSBots Filter's you can also do: (commented to avoid errors) //RS2Object rock = getObjects().closest(new NameFilter<RS2Object>("Rocks"), new PositionFilter<RS2Object>(rockLocation)); // Really, this should be moved to another state assuming you're using a state model. Your loading null rocks for no reason. if(!MINING_AREA.contains(myPlayer()) && !inventory.isFull()) { getWalking().walk(mining_spot); } // This if could simply be an else of the previous if statement if(MINING_AREA.contains(myPlayer())) { // Switched everything from "rocks" to "rock" if (rock != null && rock.exists() && !myPlayer().isAnimating()) { rock.interact("Mine"); } } It would really help if you would explain the end goal. Do you really just want to mine one rock at a specific location? This still doesn't check if the rock contains ore. If you'd like to mine certain rocks like Copper/Tin or Iron.
-
Crafting interface cant figure out...
craft.interact(widget.getTooltip()); Make sure the widget you are using has the correct tooltip you want, use the Widget Debugger to determine if it does. There will be like 4 widgets stacked on each other, you have 154, 127 so it could be that, 154, 126; 154, 125; or 154, 123. Here is an example for Smithing interface:
- Wyvernz?
-
OSBot doesn't start on Linux
Try this: sudo apt-get install libfontconfig1 libxrender1
-
hover specific tile
almost new Position(2618, 3444, 0).hover(getBot())
-
@Token our glorious Script Officer
He is the chosen one, he is our god. @Token Edit: RIP @Tom
- hi
-
Question For The Ladies
@Alek is the best, ty for everything
-
Do I need VIP to test my own scripts?
You can run scripts on OSBot without VIP, just put the compiled jar or class files in the OSBot/Scripts folder in your Home/User directory (will be made on first run of bot).
-
How to fix Java memory leak in client or script?
- How to fix Java memory leak in client or script?
Try turning off sounds on the client, this is a known problem with VPS's without a sound server. You can also install a null sound server, but its easier just to mute the sounds ingame.- WARNING! TO ALL about PROXYFISH!
lol like proxyfish's didn't lock :p- CPU reducing
Mostly this is up to scripts, if the scripter didn't properly optimize the script it'll use a lot of CPU. Usually this come from the paints in my experience. OSBot does include a method to turn on "Low CPU", which limits the FPS of the client. Do this via Settings > Options > Debug tab > Check the box left of "Enable Low CPU". Be warned, this can and probably will affect the scripts performance, so its best to watch the script perform in low CPU mode to ensure it won't result in problems. Besides this, try different scripts that might be optimized better.- Draw the bounding box of an area
- How to fix Java memory leak in client or script?