Jump to content

Omicron

Members
  • Posts

    35
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Omicron

  1. The OP has been updated with the latest download link! Proggies are appreciated Updates: *The currently executing task is now shown *Updated some things with threading in the script
  2. File -> Project Structure -> Artifacts -> Little green plus -> JAR -> Empty Jar -> Give it a name, add your compile out put path, then add the required compiled outputs. Afterwards to build it Build -> Artifacts, pick the jar you just made
  3. Set it for you module, also you want to export as a jar to keep stuff clean in scripts folder :P
  4. Perhaps it's an issue with the new version of the client then as I haven't tried this with the newest version
  5. I personally don't, as the steps he mentioned seem to work fine for me (although I don't use eclipse), it's something I recommended he try
  6. Everything seems to be in order, try closing out of OSBot, deleting the script in the scripts folder and THEN making the jar, see if that makes a difference
  7. Be sure to delete the old jar and then replace it with the new one, make sure to save changes before you compile into jar and also refresh the list (which you are doing).
  8. It doesn't take that long to export, just have the export path set up so it exports to the scripts folder. You can't run your script in your IDE, OSBot looks for local scripts in the specified directory so either way you're going to have to export your jar.
  9. I didn't know that actually, thanks for the info! (I haven't run into this problem in my cooking script, although that's probably cause I test multiple conditions, I'll look into this more) @OP Use normal sleep as mentioned above or properly implement conditional sleep
  10. This is something I made while toying around learning more about the API, it works perfectly and so far I've encountered no issues! To use it simply drag and drop the Jar in your scripts folder, it should load up fine. Ensure you are in a bank and have plenty of Jugs of water and grapes. Once you run out of supplies the script will log you out on it's own. Any feedback and progress pictures are appreciated! DOWNLOAD: http://upx.nz/sGlIwg NOTE: *While I have used the script to train cooking I have not tested it thoroughly as my laptop began to have issues, so there may still be bugs present which I am not aware of, please report if you find any! (At the moment I'm having some difficulties with my laptop so I may not be able to put out a patch right away, however I will as soon as possible)
  11. Added XP per hour, also added some fail-safes, download link is updated in OP
  12. I'll add that tomorrow when I get the chance
  13. Instructions: 1.) Start Script in Al-Kharid bank, enter the raw food id of the food you're wanting to cook, have a decent supply of it in bank. (To get the id of the raw food click inventory debug in settings and hover over the raw food in inventory) 2.) When there is 1 or no more uncooked items in your bank, the script will stop itself Download link: http://www.filedropper.com/omialkharidcook_2 NOTE: -The script is in beta, you may still encounter bugs, feel free to post below and I will take care of them. -I successfully cooked 1,000 shrimps with this, I didn't push on much further as everything seemed to be in order.
  14. Make sure you have it on low CPU usage and have client rendering off
  15. The range guild bot is someone else's work you've decomplied and uploaded to Github?
  16. I'm still a bit confused sorry, if you mean that it picks a random distance between which two tiles to record it seems a bit redundant as I see no point in that (Unless you want to save memory or something)
  17. I just tried it out it seems very nifty! "my recording checks the distance between current pos and last pos set. It will use a random distance every time", is this not done by the walkPath method already? I assume it is since it automatically tries to get you back on path if it can't find the next tile
  18. Hey everyone, I began scripting about a day back and I quickly realized it was a hassle to map each individual tile for your path, so I quickly wrote up a class which can be added to any script or be made into a script of it's on in order to map the tiles walked upon. package main; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.script.Script; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; /** * @author Omicron */ public class PathMapper { private Script script; private BufferedWriter writer; private ArrayList<Position> positions = new ArrayList<>(); /** * @param script - Script instance which will be used * @param path - Path to where you want the tile dump to be generated */ public PathMapper(Script script, String path) { this.script = script; try { writer = new BufferedWriter(new FileWriter(path, true)); } catch (IOException e) { e.printStackTrace(); } } public void execute() { Position position = script.myPlayer().getPosition(); positions.add(position); } /** * Writes all information to the file given by the path */ public void dump() { try { writer.newLine(); writer.write("ArrayList<Position> path = new ArrayList<Position>();"); writePositions(); writer.close(); } catch (IOException e) { e.printStackTrace(); } } /** * Writes each individual position to the file */ private void writePositions() { positions.forEach(position -> { int x = position.getX(); int y = position.getY(); int z = position.getZ(); try { writer.newLine(); writer.write("path.add(new Position(" + x + "," + y + "," + z + "));"); } catch (IOException e) { e.printStackTrace(); } }); } } An example of how the class be used is below : package main; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; /** * @author Omicron */ @ScriptManifest(author = "Omicron", info = "Test", name = "Path mapper", version = .1, logo = "") public class Test extends Script { PathMapper mapper = new PathMapper(this, "C:\\Users\\Omicron\\Desktop\\tiledump.txt"); @Override public int onLoop() throws InterruptedException { mapper.execute(); return 5000; } @Override public void onExit() throws InterruptedException { mapper.dump(); } } I walked from Varrock west bank to the East bank with the script running to show you an example of what a tile dump would look like: ArrayList<Position> path = new ArrayList<Position>(); path.add(new Position(3253,3420,0)); path.add(new Position(3253,3426,0)); path.add(new Position(3246,3429,0)); path.add(new Position(3240,3429,0)); path.add(new Position(3234,3430,0)); path.add(new Position(3227,3429,0)); path.add(new Position(3222,3429,0)); path.add(new Position(3215,3429,0)); path.add(new Position(3208,3429,0)); path.add(new Position(3201,3428,0)); path.add(new Position(3194,3429,0)); path.add(new Position(3186,3429,0)); path.add(new Position(3182,3434,0)); NOTES: *It should be noted with this running you could walk around normally and it would still mapthe path (you don't need to click on individual tiles) *If enough people want me to I might build upon this to make path loading automated as well, such as (mapper.loadPath()), you wouldn't need to hard code the Positions at all, it'd automatically load from a generated file
  19. That sounds neat! Can we expect the docs for local usage anytime soon ?
×
×
  • Create New...