Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

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
This topic is now closed to further replies.
Sign in to follow this  

  • Our picks

    • 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.
      • 19 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
      • 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)




      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
      • 68 replies
    • This release will:

      Add support for using custom F key bindings to switch between game tabs (Thanks @erickho123)

      Fix tab opening for "Skills" and "Kourend Tasks" (Thanks @erickho123)

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

      Fix an issue where breaks would stop firing

      Fix Combat#getWildernessLevel, use dynamic search for text and cache ID for later calls

      Fix an NPE in the Combat API

      Fix Mouse#leaveGame bug where the mouse wouldn't actually leave the game screen
      • 21 replies
  • Recently Browsing   0 members

    No registered users viewing this page.