Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions docs/api/Mouse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Mouse Class Documentation

## [Back](development.md)

## Overview
The `Mouse` class defines the abstract interface for mouse interactions. It provides methods for clicking, moving, scrolling, and dragging the mouse.

## Methods

### `click`
- **Signature**: `public abstract Mouse click()`
- **Description**: Performs a left click at the current mouse position.

### `click`
- **Signature**: `public abstract Mouse click(int x, int y)`
- **Description**: Clicks at the specified X and Y coordinates.

### `click`
- **Signature**: `public abstract Mouse click(int x, int y, boolean rightClick)`
- **Description**: Clicks at the specified X and Y coordinates, optionally using a right click.

### `click`
- **Signature**: `public abstract Mouse click(Point point)`
- **Description**: Clicks at the specified `Point`.

### `click`
- **Signature**: `public abstract Mouse click(Point point, boolean rightClick)`
- **Description**: Clicks at the specified `Point`, optionally using a right click.

### `click`
- **Signature**: `public abstract Mouse click(Point point, NewMenuEntry entry)`
- **Description**: Clicks at the specified `Point` associated with a `NewMenuEntry`.

### `click`
- **Signature**: `public abstract Mouse click(Rectangle rectangle)`
- **Description**: Clicks at a random point within the specified `Rectangle`.

### `click`
- **Signature**: `public abstract Mouse click(double x, double y)`
- **Description**: Clicks at the specified double coordinates.

### `drag`
- **Signature**: `public abstract Mouse drag(Point startPoint, Point endPoint)`
- **Description**: Drags the mouse from the start point to the end point.

### `getCanvas`
- **Signature**: `public Canvas getCanvas()`
- **Description**: Retrieves the game canvas.

### `getMousePosition`
- **Signature**: `public abstract java.awt.Point getMousePosition()`
- **Description**: Gets the current position of the mouse.

### `getRainbowColor`
- **Signature**: `public Color getRainbowColor()`
- **Description**: Generates a rainbow color cycling through hues.

### `move`
- **Signature**: `public abstract Mouse move(int x, int y)`
- **Description**: Moves the mouse to the specified X and Y coordinates.

### `move`
- **Signature**: `public abstract Mouse move(Point point)`
- **Description**: Moves the mouse to the specified `Point`.

### `move`
- **Signature**: `public abstract Mouse move(Rectangle rect)`
- **Description**: Moves the mouse to a random point within the specified `Rectangle`.

### `move`
- **Signature**: `public abstract Mouse move(double x, double y)`
- **Description**: Moves the mouse to the specified double coordinates.

### `move`
- **Signature**: `public abstract Mouse move(Polygon polygon)`
- **Description**: Moves the mouse to a point within the specified `Polygon`.

### `randomizeClick`
- **Signature**: `public int randomizeClick()`
- **Description**: Generates a random offset for clicking.

### `scrollDown`
- **Signature**: `public abstract Mouse scrollDown(Point point)`
- **Description**: Scrolls down at the specified `Point`.

### `scrollUp`
- **Signature**: `public abstract Mouse scrollUp(Point point)`
- **Description**: Scrolls up at the specified `Point`.

### `setLastClick`
- **Signature**: `public abstract void setLastClick(Point point)`
- **Description**: Sets the last click position.

### `setLastMove`
- **Signature**: `public abstract void setLastMove(Point point)`
- **Description**: Sets the last move position.
145 changes: 145 additions & 0 deletions docs/api/NewMenuEntry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# NewMenuEntry Class Documentation

## [Back](development.md)

## Overview
The `NewMenuEntry` class implements the `MenuEntry` interface and serves as a builder for creating and configuring menu entries. It allows for fluent chaining of methods to set properties like option, target, identifier, type, and more.

## Constructors

### `NewMenuEntry()`
- **Description**: Creates a new, empty `NewMenuEntry`.

### `NewMenuEntry(int param0, int param1, int opcode, int identifier, int itemId, String target)`
- **Description**: Creates a new `NewMenuEntry` with specified parameters.

### `NewMenuEntry(int param0, int param1, int opcode, int identifier, int itemId, String target, int worldViewId)`
- **Description**: Creates a new `NewMenuEntry` with specified parameters including world view ID.

### `NewMenuEntry(int param0, int param1, int opcode, int identifier, int itemId, String target, Actor actor)`
- **Description**: Creates a new `NewMenuEntry` for an actor interaction with default option "Use".

### `NewMenuEntry(int param0, int param1, int opcode, int identifier, int itemId, String target, Actor actor, String option)`
- **Description**: Creates a new `NewMenuEntry` for an actor interaction with a specified option.

### `NewMenuEntry(int param0, int param1, int opcode, int identifier, int itemId, String option, String target, TileObject gameObject)`
- **Description**: Creates a new `NewMenuEntry` for a game object interaction.

### `NewMenuEntry(int param0, int param1, int opcode, int identifier, int itemId, String option, String target, TileObject gameObject, int worldViewId)`
- **Description**: Creates a new `NewMenuEntry` for a game object interaction including world view ID.

### `NewMenuEntry(String option, int param0, int param1, int opcode, int identifier, int itemId, String target)`
- **Description**: Creates a new `NewMenuEntry` with specified option and parameters.

### `NewMenuEntry(String option, String target, int identifier, MenuAction type, int param0, int param1, boolean forceLeftClick)`
- **Description**: Creates a new `NewMenuEntry` with full specification.

## Methods

### `actor`
- **Signature**: `public NewMenuEntry actor(Actor actor)`
- **Description**: Sets the actor for the menu entry.

### `findIdentifier`
- **Signature**: `public static int findIdentifier(int menuOption)`
- **Description**: Calculates the identifier for a given menu option using the default offset of +6.

### `findIdentifier`
- **Signature**: `public static int findIdentifier(int menuOption, int offset)`
- **Description**: Calculates the identifier for a given menu option using a custom offset.

### `forceLeftClick`
- **Signature**: `public NewMenuEntry forceLeftClick(boolean forceLeftClick)`
- **Description**: Sets whether the menu entry should force a left click.

### `gameObject`
- **Signature**: `public NewMenuEntry gameObject(TileObject gameObject)`
- **Description**: Sets the game object for the menu entry.

### `getActor`
- **Signature**: `public Actor getActor()`
- **Description**: Retrieves the actor associated with the menu entry.

### `getGameObject`
- **Signature**: `public TileObject getGameObject()`
- **Description**: Retrieves the game object associated with the menu entry.

### `getIdentifier`
- **Signature**: `public int getIdentifier()`
- **Description**: Gets the identifier of the menu entry.

### `getItemId`
- **Signature**: `public int getItemId()`
- **Description**: Gets the item ID associated with the menu entry.

### `getNpc`
- **Signature**: `public NPC getNpc()`
- **Description**: Retrieves the NPC if the actor is an NPC.

### `getOption`
- **Signature**: `public String getOption()`
- **Description**: Gets the option text of the menu entry.

### `getParam0`
- **Signature**: `public int getParam0()`
- **Description**: Gets the first parameter of the menu entry.

### `getParam1`
- **Signature**: `public int getParam1()`
- **Description**: Gets the second parameter of the menu entry.

### `getPlayer`
- **Signature**: `public Player getPlayer()`
- **Description**: Retrieves the Player if the actor is a Player.

### `getTarget`
- **Signature**: `public String getTarget()`
- **Description**: Gets the target text of the menu entry.

### `getType`
- **Signature**: `public MenuAction getType()`
- **Description**: Gets the menu action type.

### `getWidget`
- **Signature**: `public Widget getWidget()`
- **Description**: Retrieves the widget associated with the menu entry.

### `identifier`
- **Signature**: `public NewMenuEntry identifier(int identifier)`
- **Description**: Sets the identifier for the menu entry.

### `itemId`
- **Signature**: `public NewMenuEntry itemId(int itemId)`
- **Description**: Sets the item ID for the menu entry.

### `opcode`
- **Signature**: `public NewMenuEntry opcode(int opcode)`
- **Description**: Sets the menu action type using an opcode ID.

### `option`
- **Signature**: `public NewMenuEntry option(String option)`
- **Description**: Sets the option text for the menu entry.

### `param0`
- **Signature**: `public NewMenuEntry param0(int param0)`
- **Description**: Sets the first parameter for the menu entry.

### `param1`
- **Signature**: `public NewMenuEntry param1(int param1)`
- **Description**: Sets the second parameter for the menu entry.

### `target`
- **Signature**: `public NewMenuEntry target(String target)`
- **Description**: Sets the target text for the menu entry.

### `type`
- **Signature**: `public NewMenuEntry type(MenuAction type)`
- **Description**: Sets the menu action type.

### `widget`
- **Signature**: `public NewMenuEntry widget(Widget widget)`
- **Description**: Sets the widget for the menu entry.

### `worldViewId`
- **Signature**: `public NewMenuEntry worldViewId(int worldViewId)`
- **Description**: Sets the world view ID for the menu entry.
76 changes: 76 additions & 0 deletions docs/api/Rs2Antiban.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Rs2Antiban Class Documentation

## [Back](development.md)

## Overview
The `Rs2Antiban` class provides a comprehensive anti-ban system that simulates human-like behavior during various in-game activities. This system includes features such as mouse fatigue, random intervals, micro-breaks, action cooldowns, and contextually aware mouse movements, all aimed at reducing the risk of detection.

## Methods

### `actionCooldown`
- **Signature**: `public static void actionCooldown()`
- **Description**: Handles the execution of an action cooldown based on anti-ban behaviors. Controls the flow for activating the cooldown either with certainty or based on a chance. Includes logic to adjust behaviors such as non-linear intervals, behavioral variability, and random mouse movements.

### `activateAntiban`
- **Signature**: `public static void activateAntiban()`
- **Description**: Activates the antiban system.

### `checkForCookingEvent`
- **Signature**: `public static boolean checkForCookingEvent(ChatMessage event)`
- **Description**: Checks if a chat message corresponds to a cooking event.

### `deactivateAntiban`
- **Signature**: `public static void deactivateAntiban()`
- **Description**: Deactivates the antiban system.

### `isIdle`
- **Signature**: `public static boolean isIdle()`
- **Description**: Checks if the player is currently idle.

### `isIdleTooLong`
- **Signature**: `public static boolean isIdleTooLong(int timeoutTicks)`
- **Description**: Checks if the player has been idle for too long based on a specified timeout in ticks.

### `isMining`
- **Signature**: `public static boolean isMining()`
- **Description**: Checks if the player is currently performing a mining animation.

### `isWoodcutting`
- **Signature**: `public static boolean isWoodcutting()`
- **Description**: Checks if the player is currently performing a woodcutting animation.

### `moveMouseOffScreen`
- **Signature**: `public static void moveMouseOffScreen()`
- **Description**: Moves the mouse off the screen with a 100% chance to trigger. Used to simulate a user taking a break.

### `moveMouseOffScreen`
- **Signature**: `public static void moveMouseOffScreen(double chance)`
- **Description**: Moves the mouse off the screen based on a specified chance percentage.

### `moveMouseRandomly`
- **Signature**: `public static void moveMouseRandomly()`
- **Description**: Moves the mouse randomly based on the settings. Used to simulate natural mouse behavior.

### `renderAntibanOverlayComponents`
- **Signature**: `public static void renderAntibanOverlayComponents(PanelComponent panelComponent)`
- **Description**: Renders an overlay component that displays various anti-ban settings and information within a panel. Populates a `PanelComponent` with details regarding the current anti-ban system's state.

### `resetAntibanSettings`
- **Signature**: `public static void resetAntibanSettings()`
- **Description**: Resets all antiban settings to their default values.

### `resetAntibanSettings`
- **Signature**: `public static void resetAntibanSettings(boolean forceReset)`
- **Description**: Resets all antiban settings, optionally forcing the reset even if overwrite settings are disabled.

### `setActivity`
- **Signature**: `public static void setActivity(@NotNull Activity activity)`
- **Description**: Sets the current activity and adjusts antiban settings based on the activity type.

### `setActivityIntensity`
- **Signature**: `public static void setActivityIntensity(ActivityIntensity activityIntensity)`
- **Description**: Sets the intensity level of the current activity.

### `takeMicroBreakByChance`
- **Signature**: `public static boolean takeMicroBreakByChance()`
- **Description**: Attempts to trigger a micro-break based on a random chance, as configured in settings. Simulates human-like pauses.
19 changes: 18 additions & 1 deletion docs/api/Rs2Cannon.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Rs2Cannon Class Documentation

## [Back](development.md)

TODO
## Overview
The `Rs2Cannon` class provides utility methods for interacting with the Dwarf Multicannon, including refilling and repairing it.

## Methods

### `refill`
- **Signature**: `public static boolean refill()`
- **Description**: Refills the cannon with a random amount of cannonballs (between 10 and 15) if the current ammo count is low.

### `refill`
- **Signature**: `public static boolean refill(int cannonRefillAmount)`
- **Description**: Refills the cannon if the current ammo count is less than or equal to the specified `cannonRefillAmount`. Checks for cannonballs in inventory and interacts with the cannon.

### `repair`
- **Signature**: `public static boolean repair()`
- **Description**: Repairs a broken multicannon. Finds the broken cannon object and interacts with it using the "Repair" option.
Loading