Jump to content

liverare

Scripter II
  • Posts

    1300
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Everything posted by liverare

  1. RuneScape updated. Don't worry, though! I've fixed it.
  2. I can do this as I have already developed a gambling script. I'll do this for 50m, 25m up front.
  3. No. I am restricting trials to accounts that are one-week-old and have at least 100 posts. Please ask again when you get that.
  4. Testing stuff -- busy work. Shoo.
  5. Unfortunately this is not a supported feature. I may include this in a future build as I have been interested in giving players the ability to call out commands, such as the !giveaway one which I've seen work nicely.
  6. It sucks. Absolutely shit-tier. HC2 is far better.
  7. There's a checkbox on the GUI that says "Enable custom keyboard (Recommended)" -- as shown in the main post of this thread. Select it, read the requirements displayed in a popup window, submit the changes and then meet those requirements.
  8. Do you hate us or something? Has OSBot wronged you in any way?
  9. Enable fast keyboard typing and hit submit.
  10. I think I have found the problem and should be resolved for the next build.
  11. Custom keyboard = robot types as though it were you typing. You need to have the bot running on a separate computer if you wish to have the custom keyboard enabled.
  12. liverare

    B-But!

    Sadly the project was nearly finished. There was a minor inconsistency with the herb patches and the framework only needed to be tweaked slightly to allow the variable 'special' plants. Meh. It would have been a cool project to have had released if I weren't so damn lazy.
  13. liverare

    B-But!

    No you didn't. And it's not a massive loss, or it would be worse if I haven't yet reach my goal.
  14. liverare

    B-But!

    I kinda gave up on the script after I reached my farming goal for Falador achievement diary. I should really get back to developing it once I see the extent of the damage done after the next update.
  15. There can be as many arguments as you like, however the expressions can easily become cluttered and messy, so if you've got a lot of parameters, consider boxing them inside of an new object and passing that object as a single parameter. When you have multiple arguments, you have to wrap them in brackets and give each parameter a name, e.g.; #forEach((param1, param2, param3, param4, param5, param6, param7) -> doSomething(param5)); This is why Comparator works and why I've used it as so in my earlier post. Any interface can be used just so long as that interface is a functional interface, aka. an interface that only has one method. For instance, in Lambda, you cannot use MouseListener (or the other mouse/key listener variants), because they have two or more required methods implementations. If you wanted to implement interfaces via Lambda expressions for one MouseListener function (e.g., #mouseClicked(MouseEvent)), then you could do a work around such as this: import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.List; public class MouseClicked implements MouseListener { // Create a list to store our new functional interface type (below) private final List<Listener> listenerList; public MouseClicked() { this.listenerList = new ArrayList<>(); } @Override public void mouseClicked(MouseEvent e) { // Check if list is empty if (!listenerList.isEmpty()) { // Iterate through the list and pass the MouseEvent to the functional interfaces listenerList.forEach(listener -> listener.mouseClicked(e)); } } // Delegate methods: public void addListener(Listener listener) { listenerList.add(listener); } public void removeListener(Listener listener) { listenerList.remove(listener); } // New functional interface: public static interface Listener { void mouseClicked(MouseEvent e); } /* * To hold true to the interface "contract", we will have to implement the * other methods that come packaged with MouseListener. However since we * don't need to use them/interact with them, we can leave their code bodies * empty. * * Irrelevant methods implements: */ @Override public void mousePressed(MouseEvent e) { // Ignored. } @Override public void mouseReleased(MouseEvent e) { // Ignored. } @Override public void mouseEntered(MouseEvent e) { // Ignored. } @Override public void mouseExited(MouseEvent e) { // Ignored. } } Then in your script: public void doSomething() { // Create new object, which also functions as valid MouseListener MouseClicked mc = new MouseClicked(); // Add MouseClicked listeners as Lambda expressions mc.addListener((e) -> System.out.println(e)); // Register the entire listener getBot().addMouseListener(mc); }
  16. Two minor improvements: Create a separate function to handle the logic of the filtering. It makes the Lambda expression more readable. Include comparator as a Lambda expression also. For example: /** * * @param npc * NPC object instance * @param name * Name to check against (case insensitive) * @return <tt>NPC is defined</tt> */ private boolean isDefined(NPC npc, String name) { return npc != null && npc.exists() && npc.getName().equalsIgnoreCase(name); } /** * * @param name * Name to check against (case insensitive) * @return NPC object instances */ public NPC getClosestNPC(String name) { return getNpcs().getAll().stream() .filter(npc -> isDefined(npc, name)) .min((npc1, npc2) -> Integer.compare(getMap().distance(npc1), getMap().distance(npc2))) .orElse(null); } Oh and everything after #stream(), I break-line each of the running expressions, to make them more readable also.
  17. The 'pro' mode is still under development, so only use the 'basic' mode for now. On bot account, join a CC, make sure the CC tab is open and run the script. On your host account, join the same CC and...host. When hosts need to play a game, they call out commands in the CC (e.g., !dd) to get random output from the bot. ??? Profit.
  18. Can you link me to an example of forced YouTube ads? I've browsed a few popular goyim ones and my Google Chrome Adblocker seems to be working just fine.
  19. Try again. Also, run basic mode for now until I've sorted out the pro mode. You will also need to make sure clan chat is open, so the bot can read from it. (I will automate this for the next build.)
  20. Updated - Script should run smoothly now! Feedback much appreciated!
  21. Click here to go to the SDN page to add the script. Display: Games supported and their general rules: Note: This script is a realised script request with help from a RS veteran gambler, pauliokas123, Please refresh your script list before running this script!
  22. I've updated the info for the custom method. It should work again now. Thanks for the heads up.
×
×
  • Create New...