TPaxEngine = class

Class describing scripts, available by Script

Name Result Description Code Params Examples
Stop - Stop script execution
procedure Stop;
There are no arguments
if (User.Dead) then Script.Stop;  // Stop script if we dead
Pause - Pause script execution
procedure Pause;
There are no arguments
if (User.BuffTime(4876) <> 0) then Script.Pause;  // if we have debuff, then pause script
Suspend - Suspend all threads except current
procedure Suspend;
There are no arguments
if (Status <> lsOnline) then Script.Suspend; // if we dropped from game, then suspend all threads except current checking disconnect
Resume - Recovery of all threads
procedure Resume;
There are no arguments
if (Engine.GameClientReady) then Script.Resume;  // if client ready, recover all threads
  • Examples found for this method:
NewThread - Creating new thread
procedure NewThread(lpProcAddress, lpParameter: Pointer);

lpProcAddress - procedure pointer
lpParameter - parameter pointer

Script.NewThread(@my_procedure);  // Will create a new thread that will execute the procedure my_procedure
  • Examples found for this method:
Replace Boolean Restart the current script or start a new one
function Replace(const Name: string = ''): Boolean;

const Name - path to script file

if (User.Level < 10) then Script.Replace('Scripts\Exp\1-10.bin');  // if our lvl < 10, then start appropriate script
Path String Path to folder with current script
function Path: string;
There are no arguments
Print(Script.Path);  // prints path to folder of current script file
PaxFile String Path to script file
function PaxFile: string;
There are no arguments
Print(Script.PaxFile);  // prints path to current script file
MainProc - Procedure call in the main program thread
procedure MainProc(Proc: Pointer);

Proc - procedure thread pointer

StartPlugin Boolean Starting plugin
function StartPlugin(const PluginName: string; PProc: Pointer; ShowModal: Boolean): Boolean;

const PluginName - path to DLL PProc - pointer to the data exchange function between the plugin and the ShowModal script - on top of the program

Script.StartPlugin(Script.Path+'\ScriptRecorder.dll', @PluginProc, true);
OnPluginProc Integer Request for operation in plugin
function OnPluginProc(Code: Cardinal; p1: WideString): Integer;

Code - operation code p1 - passed parameter

Script.OnPlugonProc(1, User.Name);  // Send a signal to the plugin that it is necessary to perform an operation with code 1, taking into account the additional parameter in the form of the user's nickname
Status TScriptStatus Current script status (started \ paused \ stopped etc.)
function Status: TScriptStatus;
There are no arguments Examples not found
LoadScript - Loads the script on the selected account
procedure LoadScript(aBot: TObject; ScriptFile: string);

aBot - window to load the script
ScriptFile - path to script file

  • Examples found for this method:


Name Class Description
Script TPaxEngine Script control object


Name Result Description
TL2Control.GetScript Pointer на TPaxEngine Gets object pointer of another account script