SRL Archive - Research & Development Lounge

Botting helper [plugin] moved to public


CynicRus

2013-03-24 03:12:56

Hello all. Much time ago, I wrote a plugin to facilitate the use of Simba to other games. Now I spread it for public use.

Cheers,
Cynic.

Features:
  1. Reading values from process memory
  2. Writing into process memory
  3. Game window control
  4. Send key to Window
  5. Send text to game window
  6. Send mouse click to window
Functions description:
Window control:

Function GetWindowCaptionFromPid(Pid: integer):string;
Return window title by process id.

Function GetWindowHandle(WindowTitle: string):integer;
Return window handle by window title.

function GetWndHandleByPid(pid: integer):integer;
Return window handle by process id.

procedure MinimizeWindow(wnd: integer);
Minimizes an window of his handle

procedure RestoreWindow(wnd: integer);
Restores an window of his handle

procedure MaximizeWindow(wnd: integer);
Maximizes an window of his handle

procedure MoveWindow(wnd: integer; NewPos: TPoint;var OldPos: TPoint);
Move an window by handle.
Input:
- wnd: window handle
- NewPos: new window position coords
- OldPos: save current window coords
Memory reading:
 Function ReadFromMemory (WindowName,Address,Offset : integer): integer; 
Return integer value from memory address by window handle
input:
-WindowName: window handle
-Address: memory address
-Offset: need bytes count
Function ReadFloatFromMemory (WindowName,Address,Offset : integer): single;
Return float value from memory address by window handle
input:
-WindowName: window handle
-Address: memory address
-ASize: string length in bytes
function ReadStringFromMemory(WindowName,Address,ASize:integer): string;
Return string value from memory address by window handle
input:
-WindowName: window handle
-Address: memory address
-ASize: string length in bytes


function ReadMemoryFromPID (PID,Address,Offset : integer): integer;
Return integer value from memory address by process id
input:
-PID: process id
-Address: memory address
-Offset: need bytes count
Function ReadFloatFromPid (Pid,Address,Offset : integer): single;
Return float value from memory address by process id
input:
-PID: process id
-Address: memory address
-Offset: need bytes count

Function ReadStringFromPid (Pid,Address,Offset : integer): string;
Return string value from memory address by process id
input:
-PID: process id
-Address: memory address
-Offset: string length

Writing memory:

function WriteToMemory(WindowName :integer;Address: integer;Value : Array of Byte;CountBytes: Integer) : integer;
Writing bytes to memory by window handle.
input:
WindowName: window handle
Address: memory address
Value: value as bytes array
CountBytes: needed bytes count
unction WriteMemoryToPID(PID :integer;Address: integer;Value : Array of Byte;CountBytes: Integer) : integer;
Writing bytes to memory by window handle.
input:
PID: process id
Address: memory address
Value: value as bytes array
CountBytes: needed bytes count
Keyboard and mouse:

procedure ClickToWindow(Wnd: integer;Button: byte;x,y: integer);
Click on a point in the window.
Input:
Wnd: window handle
buttons: 0- one left click; 1 - right click; 2: double left click
x,y: x,y click coord.
procedure SendKeyToWindow(Wnd: integer; Key: byte; PressTime: integer);
Sends the key to window
Input:
wnd: window handle
Key: key code
PressTime: time, while key pressed
procedure SendTextToWindow(Wnd: integer; Text: string; PressTime: integer);
Sends the key to window
Input:
wnd: window handle
Text: some text to send in to window
PressTime: time, while key pressed

Applications:
function RunClient(PathToClient:string):boolean;
Run application, result true if app started.

procedure KillClient(pid: integer);
Kill application by process id.
Exported type for SRL adaptation:

type TCustomClient = record
CMSX1,CMSY1,CMSX2,CMSY2,CMSCX1,CMSCY1: integer;
end;
Procedure GetClientInfoFromWnd(Wnd: integer;var client: TCustomClient);
Fill custom client struct by window handle.

End description.

Written in lazarus, source aviables on GIT.
https://github.com/CynicRus/BottingHelper

Currently available only for Windows, in the future may be realized version for others platform.

Itankbots

2013-03-24 03:54:35

Ohhhh Looks Awesome! Going to have to try this out :D Thanks for the release man! so many awesome things coming from you.

masterBB

2013-03-24 12:15:48

Awesome!

Sawyer

2013-03-24 12:52:40

Thanks CynicRus!

Olly

2013-03-24 20:05:08

Some helpful things there… there is one thing missing though "GetSoundLevelFromPid" :p

bgtemp

2013-08-06 17:41:21

Thanks for sharing! I can't image how much power Simba gains with this tool :)

CynicRus

2014-03-14 04:54:05

Can somebody stick this thread, please?:)

masterBB

2014-03-14 05:13:57

From: CynicRus
Can somebody stick this thread, please?:)


I usually don't do requests. But I got my first day off in weeeeeeks, so there you go.

Rhodamine19

2018-09-26 05:20:54

Looks Awesome. Thanks for the release.