Jump to content

Merccy

Members
  • Posts

    164
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Merccy

  1. See my post, already working on it.
  2. To answer OPs question, it isn't that hard. I am working on it, I'll release it for free (hopefully on the SDN) as my first script in 2 years lol. Currently I am still implementing the action system and making sure it gets saved properly etc... When that is working it won't be hard to actually execute those actions. Actions I want to implement: Walking (done) Loops, do this 10 times, infinitely, maybe more stuff if it is needed (I am probably overthinking this) Buying from NPC named X with option X and amount X Banking
  3. I saw you use object.closest but I think the correct way is to do getObjects().closest. You can also use the Objects object to find the rocks in an area with this. getObjects().closest(new Area(x1, y1, x2, y2), ids); You could also just use .closest like you already do and check if the distance is more than the maximum that you want. Edit: Same for inventory, use getInventory(). I would also recommend to always use brackets with your if statements. private State getState() { Entity rock = objects.closest(targetRock); // Dropping state if (!myPlayer().isAnimating() && !inventory.isEmptyExcept(1269)) { return State.DROP; } // Check if mining already if (myPlayer().isAnimating()) { return State.SLEEP; } // Mining State if (rock != null && !myPlayer().isAnimating()) { return State.MINE; } return State.SLEEP; }
  4. I've changed it to a generic class you can easily use for any form + controller.
  5. You could also return State.DROP when there aren't any rocks available.
  6. Setting up a JavaFX form + controller is a fucking pain in the ass. Why can it be a pain in the ass? If you use the regular application.launch the standard classloader is not working. If you call Application.launch a second time (even though you've exited the Platform) it will throw an exception and not work. If you do not use setImplicitExit(false) it will exit the platform when you close the stage I have written a class that should be able to be used by any form and controller without modification. How to use: JFXForm<MyController> form = new JFXForm<>("FormTitle", getClass().getClassLoader("package/Form.fxml")); form.launchForm((ex) -> { if (ex == null) { form.openForm(); } }); You can use form.getController(); to get the controller associated with the form. Use Platform.runLater(() -> {}); when you interact with the controller as it will make sure the code will run in the same thread. Class:
  7. Merccy

    source codes?

    It is so much easier to learn the API by looking at the source of working scripts, I do not intend to steal them tho. The only downside is that you will also learn bad practices but that is probably the downside of every learning method.
  8. What the fuck do you use that card for and pls use like big rolling papers xD.
  9. This deserves to be used more . Ty mixu.
  10. if(i.contains("Rune arrow")){ int amount = i.getItemForName("Rune arrow").getAmount(); totalgold += 200 * amount; }
  11. No it is not, your code will give you the amount of slots that is filled with Dragon bolts (e). My code will get that item and tell you how many of them are in that stack.
  12. It probably returns the amount of inventory slots with that item. You could do something like this (not tested): this.client.getInventory().getItemForName("Rune arrow").getAmount();
  13. I would like to apply for DJ. Today was my first day in the room but I will become very active. I am online like every afternoon/evening (GMT +2) and just the whole day in the weekend so I think I will spend enough time in the room.
  14. Creating my own setXY with the help of Swizzbeat & friends. http://pastebin.com/wn2573CL
  15. Thats a nice phisher you have there...
  16. Didn't expect to find this in the snippets section but well done. I will just try to collect as many nodes as possible and see if it can walk me from lumbridge to varrock and back. I'm wondering what the speed would be if you add like a few thousands nodes. Pandemic you should create a thread/site where developers can submit their nodes (for instance the one from lumbridge to varrock), another script developer can then just add the nodes he want to implement.
  17. Someone (forgot his name) posted a Trade Interface, pretty sure you can use that to get the item ids.
  18. Hello, I'm trying to implement the mouse movement of another bot that is known for its human-like movement (overshooting the target in some occasions, moving in a curve etc...) but for that to work it would be ideal if I could set the XY of the mouse pointer directly instead of using the moveMouseTo() function with a high speed. Is there anyway that I can use something like this.setMouse(x, y); without "travel time" of the mouse? I tried decompiling OSBot to see what this.client.moveMouseTo does but it just points to this.bot.moveMouseTo and I can't trace that any further. The finished product will be released as a script that every developer can use for free.
  19. Merccy

    Scotty sigs

    Scotty could you make a signature for me with your interpretation of a Bot and my name.
  20. What I would do is when you start mining the vein then save the height of that vein model in a variable (and the vein aswell). If you store those things you can check if the height got bigger. if (currentVein.getModel().getHeight() > normalHeight) { // Smoking rock }
  21. http://osbot.org/forum/topic/5038-osbot-programming-tutorials-series/
  22. Ive got blops 2 :P
  23. Thanks QBot it still uses rectangles but with some maths it will automatically make them according to the slotID.
×
×
  • Create New...