The script are all in the Script Folder. All Files inside of it will be interpreted, doesn't matters what ending it has.
I just used .pas for Notepad++ Syntax for Pascal, because the Script Engine uses Pascal Script.
I added 3 Functions with ussualy Syntax:
Code:
function GetTickCount: cardinal; // Wrapper to GetTickCount64
procedure ShowMessage(msg: string); // <- this STOPS the Thread, use it only for Debugging.
procedure sleep(ms: integer); // <- it let the Memory Monitor Thread sleep, take care with this
Code:
function GameDistance(x1, y1, z1, x2, y2, z2: single): single;
And some Functions for wrapping the API Calls
All functions return false if parameter Id not exists
Code:
function ReadPropertyFloat(pId: string; out pFloat: single): boolean;
function WritePropertyFloat(pId: string; pFloat: single): boolean;
Code:
function ReadPropertyByte(pId: string; out pInt: byte): boolean;
function WritePropertyByte(pId: string; pInt: byte): boolean;
Code:
function ReadPropertyInt(pId: string; out pInt: integer): boolean;
function WritePropertyInt(pId: string; pInt: integer): boolean;
Code:
function ReadPropertyStr(pId: string; out pStr: string): boolean;
Code:
function call(pFunctionName, pArgument: string): boolean;
All Pascal Script Scripts must have:
So lets give me some Script Examples:
Lets troll some:
Code:
var
PlayerName: string;
Health, MaxHealth, Armor, MaxArmor, FastRun, FastSwim: single;
WantedLevel, GodMode: byte;
begin
ReadPropertyStr('Player.Name', PlayerName);
ReadPropertyFloat('Player.MaxHealth', MaxHealth);
ReadPropertyFloat('Player.Health', Health);
ReadPropertyFloat('Player.Armor', Armor);
if MaxHealth > Health then
WritePropertyFloat('Player.Health', MaxHealth); // Bullet Proof
if PlayerName <> '' then
MaxArmor := 50
else
MaxArmor := 100;
if MaxArmor > Armor then
WritePropertyFloat('Player.Armor', MaxArmor); // Bullet Proof
ReadPropertyByte('Player.WantedLevel', WantedLevel);
if WantedLevel > 0 then
WritePropertyByte('Player.WantedLevel', 0); // Never Wanted
ReadPropertyFloat('Player.SprintSpeed', FastRun);
if FastRun <> 2 then
WritePropertyFloat('Player.SprintSpeed', 2); // Fast Run
ReadPropertyFloat('Player.SwimSpeed', FastSwim);
if FastSwim <> 2 then
WritePropertyFloat('Player.SwimSpeed', 2); // Fast Swim
ReadPropertyByte('Player.GodMode', GodMode);
if GodMode <> 9 then
WritePropertyFloat('Player.GodMode', 9); // Godmode
end.
Lets do some more useful, like a RP Script:
Code:
var
WantedLevel: byte;
begin
ReadPropertyByte('Player.WantedLevel', WantedLevel);
if WantedLevel >= 5 then
WritePropertyByte('Player.WantedLevel', 0)
else
WritePropertyByte('Player.WantedLevel', 5);
end.
Lets do some more complex Stuff, Anti AFK Script:
Code:
var
state: byte;
LastTicks: cardinal;
procedure Initalize;
begin
LastTicks := GetTickCount;
state := 1;
end;
procedure AFKCheck;
var
Ticks: cardinal;
begin
Ticks := GetTickCount;
if Ticks - LastTicks > 780000 then
begin
if state = 1 then
call('ForeGround','')
else if state = 10 then
begin
call('SendKey', 'S');
LastTicks := Ticks;
state := 0;
end;
state := state + 1;
end;
end;
begin
case state of
0: Initalize;
else AFKCheck;
end;
end.
Ok, let's try some Bot Behaviour, Time Trial Bot:
Code:
var
state: byte;
SiriusCoordsStart: string;
SiriusCoordsEnd: string;
procedure Initalize;
begin
SiriusCoordsStart := '-1504.522217;1482.826050;116.529312';
SiriusCoordsEnd := '-631.880737;-372.079926;34.320568';
state := 1;
end;
procedure StartTimeTrial(const CoordStr: string);
begin
call('Teleport', CoordStr);
sleep(10);
call('SendKey', 'E');
state := 2;
end;
procedure EndTimeTrial(const CoordStr: string);
begin
call('Teleport', CoordStr);
sleep(10);
state := 1;
end;