Jump to content

Merccy

Members
  • Posts

    164
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

997 profile views

Merccy's Achievements

Steel Poster

Steel Poster (4/10)

38

Reputation

  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
×
×
  • Create New...