This is my actual script I wrote. (Kinda. I took most of it from other scripts, but I am only trying to learn how at this point. Not releasing anything just yet.)
program PowerChopper
{$DEFINE SMART}
{.include SRL\SRL.scar}
{.Include SRL\SRL\Misc\Debug.SCAR}
{$i SRL\SRL\Misc\Stats.simba}
Const;
BreakEvery = //How long the script will run until stopping.
BreakFor = //How long until the script starts running again.
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first character)
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Integers[1] := 4;
Integers[2] := 4;
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Function CheckAndClick(X,Y:Integer):Boolean;
Begin
MMouse(x, y, 5, 5);
{Wait(100 + Random(50));
If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
If WaitUpTextMulti(['chop','tree'], 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;
Procedure Antiban;
Begin
Case Random(350) Of
0: HoverSkill('Woodcut', False);
1: Begin PickUpMouse; SleepAndMoveMouse(5000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(1500 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;
Function ChopDown;
Var
x, y:Integer;
Begin
If FindObjCustom(x, y, ['chop', 'down', 'tree', 'yew'], [1384993, 791058, 1384222, 1713957], 30) Then
WriteLn('Look! A tree!');
end;
begin
SetupSRL;
DeclarePlayers;
//Repeat
Chopdown;
//Until (False);
end.
And this is what pops open in another tab.
{$DEFINE SRL_SMART}
{$DEFINE SMART}
{$ifdef Simba}
{.loadlib libsmart}
{$endif}
{$ifdef Simba}
function IsKeyDown(C:Byte): Boolean;
begin
Result := SmartIsKeyDown(C);
end;
{$else}
function IsKeyDown(C:Char): Boolean;
begin
Result := SmartIsKeyDown(ord(c));
end;
{$endif}
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;
{$ifdef Simba}
procedure HoldMouse(x, y: Integer; button : integer);
begin
if button = mouse_left then
SmartHoldMousePlus(x,y,1)
else if button = mouse_middle then
SmartHoldMousePlus(x,y,2)
else if button = mouse_right then
SmartHoldMousePlus(x,y,3)
else
raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMousePlus');
end;
procedure ReleaseMouse(x, y: Integer; button : integer);
begin
if button = mouse_left then
SmartReleaseMousePlus(x,y,1)
else if button = mouse_middle then
SmartReleaseMousePlus(x,y,2)
else if button = mouse_right then
SmartReleaseMousePlus(x,y,3)
else
raiseexception(ercustomerror,'Unknown mouse button in SmartReleaseMousePlus');
end;
{$else}
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;
{$endif}
procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;
procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;
procedure SmartSetTarget;
{$ifdef Simba}
begin
SetTargetArray(SmartImageArray, 765,503);
end;
{$else}
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;
{$endif}
function FindWindow(Title: String): Boolean;
begin
result:= true;
end;
procedure ActivateClient;
begin
end;
function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;
{procedure SmartSaveSettings(v: TVariantArray);
var
i: Integer;
ts: TStringArray;
begin
ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/misc/smartINI.ini'];
for i := 0 to 4 do
WriteINI('SMART', ts[i], v[i], ts[5]);
end; }
procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
var
prefix: string;
begin
{$IFDEF SIMBA}
prefix := ReadINI('World' + IntToStr(Server), 'Prefix', IncludePath + 'SRL/SRL/misc/worlds.ini');
{$ELSE}
prefix := ReadINI('World' + IntToStr(Server), 'Prefix', {$IFDEF SCAR325_UP} IncludesPath {$ELSE} AppPath + 'Includes\' {$ENDIF} + 'SRL\SRL\misc\worlds.ini');
{$ENDIF}
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup('http://'+prefix+'.runescape.com/', ',f5', 765, 503, 's');
//SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
end;
{function SmartLastSettings: TStringArray;
var
i: Integer;
ts: TStringArray;
begin
ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/Misc/smartINI.ini'];
SetLength(Result, 5);
for i := 0 to 4 do
Result[i] := ReadINI('SMART', ts[i], ts[5]);
end; }
{$ifndef Simba}
Procedure SaveScreenshot(s : string);
var
TempBMP : integer;
TempS : String;
begin;
Temps := s;
While FileExists(Temps) do
begin;
Temps := ExtractFilePath(s) + Copy(ExtractFileName(Temps),1,LastPos('.',ExtractFileName(Temps))-1) + '2' + ExtractFileExt(s);
Writeln(Temps);
end;
TempBMP := BitmapFromString(765,503,'');
Try
CopyClientToBitmap(TempBMP,0,0,765,503);
SaveBitmap(TempBMP, Temps);
Except
end;
FreeBitmap(TempBMP);
end;
{$endif}
The tab is titled "smart"