Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
halli

Clickable07.click method randomness

Recommended Posts

Posted (edited)

TL;DR: How do the randomness and offset parameters in the Clickable07.click method (https://tribot.org/doc/org/tribot/api/interfaces/Clickable07.html#click-java.util.function.Predicate-java.awt.Point-java.awt.Point-) work and is it the correct method to use?

 

I'm having trouble understanding the Clickable07.click(Predicate<RSMenuNode> filter, Point randomness, Point offset) method. (https://tribot.org/doc/org/tribot/api/interfaces/Clickable07.html#click-java.util.function.Predicate-java.awt.Point-java.awt.Point-)

Specifically I don't understand the the randomness and offset parameters.

 

1. In the description for randomness it says from 0 to p.x/y - I'm guessing p is the randomness parameter, is that correct?

2. From 0 -  is it mouse position (0,0) or is it (0,0) in the possible coordinates that the mouse could click while still hitting the target?

3. What happens if the offset is higher than the max value for x or y?

4. Does the offset affect both x and y?

5. Can high randomness cause you to click a point that's outside the target you're trying to hit, or is it still bound to some min/max x and y?

6. If there is a min/max x and y value for this particular target, is there some way get those values? So that you can maybe input reasonable randomness and offset values based on them.

Parameters:
filter - The menu node accepted by this filter will be clicked.
randomness - Additional randomness (from 0 to p.x/y) to add to the point clicking. Use 'null' for no randomness.
offset - An offset to add to the point clicking. Use 'null' for no offset.

 

 

Should I be thinking about these parameters at all or is the base Clickable07.click(Predicate<RSMenuNode> filter) enough?

So far I've been using the Mouse.clickBox(Rectangle box, int button) since it's pretty straightforward how it works, is that a viable alternative?

I've seen somewhere on these forums people saying that you should always be using the Clicking class or the Clickable interface methods.

 

I know these are a lot of questions. Thank you for reading this and I appreciate any responses.

 

Edited by halli

Share this post


Link to post
Share on other sites
Just now, Red_Spark said:

Use Clicking class, it does all the randomness for you in a human like pattern

Pretty much this, Clicking#click will choose a human clicking point on the object/npc/player and use that, it does all the hard work for you behind the scenes.

  • Thanks 1

Share this post


Link to post
Share on other sites
11 hours ago, Red_Spark said:

Use Clicking class, it does all the randomness for you in a human like pattern

 

11 hours ago, Netami said:

Pretty much this, Clicking#click will choose a human clicking point on the object/npc/player and use that, it does all the hard work for you behind the scenes.

Thanks for the responses, I'll do that.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Our picks

    • This update features:

      Fixed broken hooks from today's update


      Fix wilderness level with RuneLite (Thanks @Todd)


      Add support for Kotlin .class files in scripts (Thanks @wastedbro)


      Overhaul Inventory API (Thanks @wastedbro)


      Add List support for common methods


      Change method grouping to make more sense (by functionality)


      Refactor methods to utilize Java 8 streams instead of cumbersome loops




      Recognize chatbox minimization (Thanks @JoeDezzy1)


      Fix Screen#isInViewport when NPC chat is open (Thanks @JoeDezzy1)


      Fix login bot bugs (Thanks @erickho123)


      Fix hint arrow return values (Thanks @Encoded)


      Fix depositAllExcept functionality (Thanks @wastedbro)


      Change containing box interface bound and adjust for Y values (Thanks @erickho123)
        • Like
      • 151 replies
    • This release will:

      Fix prayers and world hopper API (Thanks @JoeDezzy1 and @erickho123)


      Improve banking API (Thanks @Encoded)


      Adds methods for returning and using Java Lists, rather than arrays


      Slightly randomizes some hardcoded behaviour


      Removes sleeps from waitConditions; the efficiency saving potential is negligible in these use-cases, therefore cleaner code is preferable


      Other back-end improvements





      Note: If you are using LG, please restart both the RS client and TRiBot.
        • Sad
        • Haha
        • Thanks
        • Like
      • 90 replies
    • This release will:

      Add new internal framework for capturing exceptions


      Fix issue with not selecting the last column in world hopper (Thanks @Todd)


      Add a message about pin usage in Banking#openBank (Thanks @Todd)


      Disable the firewall by default (Thanks @Todd)


      Fix handling of the welcome screen after login (Thanks @Encoded)


      Fix wrong amount bank withdrawal (Thanks @Encoded)


      Fix Screen#isInViewport


      Fix Game#isInViewport (Thanks @Encoded)


      Call onBreakEnd for ListenerManager Breaking Listeners (Thanks @Encoded)


      Fix Prayer#getPrayerPoints NumberFormatException (Thanks @JoeDezzy1)



      Note: If you are using LG, please restart both the RS client and TRiBot.
        • Thanks
        • Like
      • 28 replies
    • This release will:

      Fix LG for both OSBuddy and RuneLite


      Fix issue where the resizable client isn't able to be made smaller (Thanks @JoeDezzy1)


      Fix detection of the logout game tab when resizable mode and side panels are enabled (Thanks @JoeDezzy1)


      Add initial support for Sentry to allow us to identify and easily debug exceptions happening with all TRiBot users


      Add methods to determine if the bank is actually loaded, and not just the overarching interface (Thanks @wastedbro)



      Upcoming updates:

      Improved CLI support


      Full Sentry support


      Much more
        • Like
      • 64 replies
    • This release will:

      Fix NPE in Camera API (Thanks @wastedbro)


      Update deposit box interface ids (Thanks @Encoded)


      Add various bank methods (Thanks @wastedbro)


      Banking#getWithdrawXQuantity


      Banking#getDefaultWithdrawQuantity


      Banking#arePlaceholdersOn




      Fix resizeable minimap bug (Thanks @wastedbro)


      Remove Java 8 requirement


      Please note: TRiBot is not yet fully compatible with Java 10+




      Fix the break handler issues by ensuring the break handler thread never gets paused


      Fix broken settings hooks



      Upcoming updates:

      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Like
      • 68 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...