-
Posts
2314 -
Joined
-
Last visited
-
Days Won
6 -
Feedback
100%
Everything posted by Explv
-
To stop people from changing the mouse speed
-
If you want prices and stuff like that, I have already written a complete solution in the snippets section: https://osbot.org/forum/topic/102611-ge-data-get-price-etc-by-item-name-no-external-libraries-required/ You can modify it to suit your needs accordingly.
-
You don't need to sort the data into a more readable form. I just did that to show you what it looks like. Take a look at some JSON tutorials online, if you want to understand how to do it. JSON is very very simple. If you just want the item names, check my above post.
-
If this is a just a one off thing though, I wrote a quick python script to do it: import json item_data = {} with open('summary.json', 'r') as summary_file: item_data = json.load(summary_file) item_names = [item_data[item_id]['name'] for item_id in item_data] with open('item_names.txt', 'w') as item_names_file: for item_name in item_names: item_names_file.write(item_name + "\n") And here is the output: https://hastebin.com/dewunamare.sql
-
Firstly that file will not include all RuneScape items, only ones tradeable on the Grand Exchange. It is a JSON file, you should use a JSON library to handle the data, such as https://github.com/fangyidong/json-simple or https://github.com/google/gson Here is what the file looks like prettified: { "2": { "id": 2, "members": true, "name": "Cannonball", "sp": 5, "overall_average": 195, "sell_average": 195, "buy_average": 195 }, "6": { "id": 6, "members": true, "name": "Cannon base", "sp": 187500, "overall_average": 179789, "sell_average": 177522, "buy_average": 176043 } } To extract each item you would create a JSONObject of the whole String. Then iterate over each of it's keys, these are the item ids e.g. (2, 6). For each of those keys, get the value (this is the item's information), and then print the value of the "name" key out to a file.
-
@HeyImJamie Looks nice, good job Just FYI you should be checking if wc levels are >=, rather than >. Right now your script will keep chopping normal trees until level 16, and oaks until level 61. Also you might want to consider using an enum for storing your Tree names & areas. Something like this: enum Tree { NORMAL("Tree", 1, new Area(1, 2, 3, 4)), OAK("Oak", 15, new Area(1, 2, 3, 4)), YEW("Yew", 60, new Area(1, 2, 3, 4)); String name; int levelRequired; Area area; Tree(final String name, final int levelRequired, final Area area) { this.name = name; this.levelRequired = levelRequired; this.area = area; } } You can also avoid having lots of nested if statements, by just inverting them: if (getTreeArea().contains(myPlayer())) { if .. if .. } else { getWalking().webWalk(...); } Becomes: if (!getTreeArea().contains(myPlayer())) { getWalking().webWalk(...); } else if { ... } ...
-
@FuryShark @Fearsy @sevant @FuryShark Saving / Loading is now fixed on the SDN Note: You will need to recreate any old configs, they will not be able to be loaded.
-
Pushed a fix for this, will be available when the SDN is updated. Thanks
-
I have pushed a fix for Saving / Loading, this time it should really fix it Will update again once it is live on the SDN. Thanks
-
Mashed face on keyboard
-
Depends what you mean by state logic, these buzzwords are thrown around so much on here it's hard to tell what people mean by them. And I do think the patterns themselves suck, I won't rant about it again on this thread, but you can see what I said before here:
-
Make your class extend MethodProvider: public class Banking extends MethodProvider { // whatever } Then initialize it (once) like so (has to be done in a class that extends MethodProvider, e.g. your main Script class) Banking banking = new Banking(); banking.exchangeContext(getBot()); You will now be able to access all the API methods from inside your Banking class. "Node", "Tasks", "States" all suck Also regarding your initial post, go follow some Java tutorials, especially an OOP tutorial so you can understand why what you wrote is wrong.
-
This was the first script I created for OSBot, I have seen many people make / try to make this script, so I figured why not open source mine so that people could learn from it, or use it Source: https://github.com/Explv/Tutorial-Island Jar File: https://github.com/Explv/Tutorial-Island/releases
- 51 replies
-
- 24
-
-
-
If shift dropping is enabled in the osrs settings, the OSBot dropAll method will use shift dropping afaik.
-
That would be a bug in the web walker not my script, you should report it to the OSBot devs. Thanks
-
You can do something like this to get the Position under mouse: public final Optional<Position> getPositionUnderMouse(final Point mousePosition) { for (int x = 0; x < 104; x++) { for (int y = 0; y < 104; y++) { Position pos = new Position(getMap().getBaseX() + x, getMap().getBaseY() + y, myPosition().getZ()); if (pos.isVisible(getBot()) && pos.getPolygon(getBot()).contains(mousePosition)) { return Optional.of(pos); } } } return Optional.empty(); } Usage: Position position = getPositionUnderMouse(getMouse().getPosition()); You cant really convert a Position to a mouse point, but you can get it's on screen Polygon: Polygon polygon = position.getPolygon(getBot());
-
No bro, you just don't understand. Mobile botting is the future dude, we can have Chinese farms filled with tablets all running 4 bots each. All of the tablets can be linked together with a simple Google Glass interface, so we can have just one employee sitting there monitoring them all easily, see pic:
-
No bro, RuneScape antiban works on mouse movement, if the mouse never moves u can never get banned bro. Think about the opportunities as well, we could add Google glass support, so you can keep an eye on your bots 24/7
-
Nice GUI @Czar Only the scriptwriter can help you, post on the script thread.
-
It will be very beneficial, the more proficient you are at Java, the better your scripts are likely to be. You should spend some time learning Java first, understanding all the basic concepts, before attempting to script. Once you have the basics, check out the OSBot API, read tutorials, read snippets, read scripting help section. There are people here that will say oh I didn't bother learning Java, their scripts are probably trash, or were purely written by copy and pasting from snippets, or they just constantly spam in scripting help until someone does it for them. Don't be that guy
-
Lifetime of the script, not until OP dies... Many scripters have left in the past, and their scripts have been left unmaintained. Eventually those scripts will break, do you really think OSBot is then going to refund every purchase of that script? For very popular scripts OSBot will now try to maintain them themselves, however this is not always possible because the devs are busy. OP paid $10 and got 2 years out of a script, it's not like he got scammed.
-
@slazter if you really have to do it, then you can probably make use of the isAnimating and isMoving methods in the Character class, in combination with some kind of timer.