SRL Archive - S.M.A.R.T.

S.M.A.R.T for scar longshot...


living dead

2011-12-01 23:34:18

All right, well after years being away from the botting world, I recently jumped back in to find that scar is no longer widely used :( so I doubt there is going to be a whole lot of support for it but you never know. Anyways, I tried to use S.M.A.R.T on scar today and this is the error that I got:

Line 143: [Error] (146:69): Invalid number of parameters in script C:\Program Files (x86)\SCAR Divi 3.22\includes\SRL\SRL\Misc\SMART.SCAR

I have SRL downloaded and everything. Here is the script that comes up with the error:

{$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©);
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, v, 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 := ReadINI('SMART', ts, 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 blue text is where the error is occurring.
If there is anyone who is able to help me, I would greatly appreciate it. I know many would say that I should just learn the Simba language, I simply don't have the time while majoring in Electrical Engineering :/ so any hope will be greatly appreciated.

RISK

2011-12-01 23:36:10

There is no real noticeable difference between SCAR and Simba for the standard user. Why not just use Simba instead and try it out? Asides from a few differences in some things, you won't have any problems.

living dead

2011-12-01 23:37:47

From: RISK
There is no real noticeable difference between SCAR and Simba for the standard user. Why not just use Simba instead and try it out? Asides from a few differences in some things, you won't have any problems.


Thanks for getting back to me so quickly. I thought Simba had a completely different syntax and commands?

euphemism

2011-12-01 23:39:46

From: living dead
Thanks for getting back to me so quickly. I thought Simba had a completely different syntax and commands?


Nope, both are based on Pascal, so syntax is the same, but you will find a few function/procedures to be different. On the other hand, you'll find a lot of new functions and procedures along with an active community and development team. :)

living dead

2011-12-01 23:41:49

From: euphemism
Nope, both are based on Pascal, so syntax is the same, but you will find a few function/procedures to be different. On the other hand, you'll find a lot of new functions and procedures along with an active community and development team. :)


All right, I suppose it would be best for the future anyways as I'm sure less and less scar users will still be around. Thanks. Time to study ;)

i luffs yeww

2011-12-02 01:26:08

Also SRL won't be supporting SCAR in the near future (if it does at all atm). It's also a bit slower to use SCAR with SMART, I think.

Freddy1990

2011-12-11 16:00:12

SCAR actually has quite a lot of support and SMART works with it just fine, you should however get the latest copy at http://www.scar-divi.com/, SCAR 3.22 is very outdated.

omegaangelz

2011-12-11 16:04:28

3.22 lol extremely outdated. Yeah I agree with basically everyone else about coming to Simba, I personally used SCAR myself for years and have found I prefer the Simba client and community :) Extremely quick help on anything and everything you need