Jump to content
Sign in to follow this  
TRiLeZ

TRiBot Release 9.115_0

Recommended Posts

This release features:

  • Update to the Keyboard API
    • Ability to hold down keys.
    • Ability to press/release an array of keys by key code.
    • Improved key sending methods (old ones deprecated).
  • Update to the Keyboard Engine (see below).
  • Updated the Equipment API
    • Note: The Equipment tab must now be opened in order to get the worn equipment.
  • The Client Starter has been fixed.

 

Improved Keyboard Engine

 

Less than 24 hours ago, I noticed a flaw in the keyboard engine which made bot typing less than human-like. The problem was that:

  1. Incorrect key codes were being packed into the key events.
  2. When a human types, the JVM natively receives a raw code, a primary level unicode, a scancode, and an extended key code. These key even properties were not being sent because they were not part of the key event constructor, and there were no methods provided by the Java API to set the values of these properties.

 

When I noticed the properties specified in 2 weren't being set by the bot, I investigated how to artificially create values for these properties, and set the values using reflection.

 

I also fixed the incorrect key codes being packed into the key events.

 

After fixing those two bugs, TRiBot is now able to send key events exactly the way they are sent when a human presses those keys.

 

Along with those bug fixes, I have also improved how key holding is performed. When a key is held, an initial KEY_PRESSED event (and possibly also KEY_TYPED depending on the key character) is sent. While the key is being held, additional KEY_PRESSED/KEY_TYPED events are send until a KEY_RELEASE event is sent. The second event will be sent after a character randomized repeat delay. The following key events are sent at a character randomized repeat rate.

 

The character randomized repeat delay and character randomized repeat rate mimics the Keyboard Properties of the Windows Control Panel. Each different botter will have a unique repeat delay and rate. By doing so, we are able to make players using TRiBot stand out from each other, in turn making the players seem more human-like.

 

A Note to Scripters

 

If your scripts use custom key pressing/typing/releasing, then they may be detectable. One of the reasons why that may be is because your script doesn't send events properly. Here's how key events work:

  • KEY_PRESSED is sent. If the can not be typed (That is, when the key is pressed, a new character is written to the cursor (usually)), the keyChar is equal to KeyEvent.CHAR_UNDEFINED.
  • KEY_TYPED is sent immediately after if the can not be typed (That is, when the key is pressed, a new character is written to the cursor (usually)). The keyCode for this event should be equal to 0.
  • Time is waited while the key is pressed down.
  • KEY_RELEASED is sent signalling the release of the key. If the can not be typed (That is, when the key is pressed, a new character is written to the cursor (usually)), the keyChar is equal to KeyEvent.CHAR_UNDEFINED.

If your script sends events in a behavior different from this, then your script might be detectable.

 

You must also make sure to send additional KEY_PRESSED (and possibly also KEY_TYPED) events if your script holds down a key. The rate at which they should be sent should be constant, and not too high or low. I'd recommend to just use Keyboard.holdKey(..) to hold keys as the method takes advantage of the character randomized repeat delay and rate.

 

Scripters also need to make sure that keys aren't being held for nothing (some scripts do this). The correct key pressing manner as listed above should be used.

 

Some Keyboard API has also been deprecated. Included is:

  • Keyboard.pressKey(..)
  • Keyboard.releaseKey(..)
  • Keyboard.typeKey(..)

The reason being is that when using those methods, incorrect key codes are constructed. Instead, use:

  • Keyboard.sendPress(..)
  • Keyboard.sendType(..)
  • Keyboard.sendRelease(..)

Read the java docs to learn what to specify as the parameters.

 

I'd recommend avoiding the use of the above methods unless you are certain you know how to properly send press/type/release keys (and when to). If you really want to know, create a java application, implement a key listener, and debug all of the key events when you press individual keys.

  • Like 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Our picks

    • This update will:

      Allow for clicking through the chat box when possible (Thanks @Todd)


      Fix Combat#selectIndex (Thanks @Encoded)


      Ensure worlds stay sorted and added a check to avoid misclicks in the in-game world hopper (Thanks @erickho123)


      Fix out-dated Options API interface indices (Thanks @Todd)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      Much more



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

      Fix login bot after today's game update (Thanks @JoeDezzy1)


      Fix latest in-game world hopping issues (Thanks @erickho123)


      Compact Settings UI and set location relative to TRiBot (Thanks @JoeDezzy1)


      Fix an older implementation of GrandExchange#getWindowState (Thanks @JoeDezzy1)


      Improve the preformance of NPCChat by only searching in certain interface parents (Thanks @JoeDezzy1)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      LG support for RuneLite


      Much more



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

      Fix bytecode manipulation in order to prevent the modification of parameters within the Filter and Condition classes themselves (thanks @wastedbro)


      Fix NPE caused by non-null value in GE API (thanks @erickho123)


      Add and fix equals methods for api2007.types (thanks @JoeDezzy1)


      Modify Mouse#leaveGame to make the mouse leave the game from top, left, right, or bottom (thanks @erickho123)


      Add Entrana area to Ships API (thanks @erickho123)


      Fix raid prayers index/settings in Prayer API (thanks @erickho123)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Like
      • 29 replies
    • This update will:

      Implement better canvas locking/synchronization mechanism


      Fix small Login API bug


      Remove the requirement for xbooting Java classes


      Use ExecutorService to perform canvas work in parallel


      Add "Account Management" game tab to GameTab API (thanks @Encoded)


      Fix NPCChat#getMessage (thanks @Encoded )


      Fix NPCChat#selectOption (thanks @Encoded )


      Fix Banking API after today's update (thanks @Encoded )


      Fix in-game world hopper after today's update (thanks @Encoded )



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      Much more



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

      Fix updater bug which was causing a bunch of issues


      TRiBot will no longer require manual hook fixes every time the RS client updates - the updater has been fully patched for objects


      Hooked login fields


      Improved the login bot


      Ability to recognize the banned/locked messages again


      Ability to read the current input for username and password fields


      If the username or password is already entered correctly, it won't be erased


      If only part of the username or password is already entered correctly, it won't be erased. The login bot will fill in what's missing.


      If there are a few invalid characters after a valid substring of your username/password, only (approximately) those invalid characters will be erased. The login bot will then proceed to fill in the missing characters.





      Coming soon:

      Skull icon fix


      Improve screen rate and responsiveness of the RS client (both regular client and LG)


      Much more
        • Thanks
        • Like
      • 33 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×