SRL Archive - Instructions & Tutorials S.M.A.R.T.

S.M.A.R.T. Tutorials and Instructions


pwnaz0r

2007-10-11 02:03:59

S.M.A.R.T. Setup & Run Tutorial


Written by pwnaz0r and Dark_Sniper


Contents:
  • Introduction to S.M.A.R.T.
  • Setting up S.M.A.R.T.
  • Using S.M.A.R.T(Smart Setup in script);
  • S.M.A.R.T. Functions
  • Multiple S.M.A.R.T.'s
  • S.M.A.R.T. Bugs
  • Picture Diagram
  • FAQ



Introduction to S.M.A.R.T.


S.M.A.R.T. stands for Scar Minimizing Autoing Resource Thing. It was created by Benland100 for SCAR. It does not take control of your mouse, it uses its own mouse which appears red on the SMART screen. To open it, you simply call the function SmartSetup(WorldPrefix: string;HighDetail: boolean; Signed: boolean): boolean; as you cannot open it by yourself. To run SCAR Scripts with S.M.A.R.T., you must have the SMART client locked, where you can't click anything.




Setting up S.M.A.R.T.


Requirements:
  • You will need Java 1.6 or higher.
  • You will need SCAR.
  • You will need Winrar.
To Setup S.M.A.R.T.:
  1. Download the S.M.A.R.T. file.
  2. Extract the S.M.A.R.T file into the "Plugins" folder in SCAR. Make sure to have the plugin highlighted.
  3. [LEFT] [/LEFT]
  4. Now Download Smart.scar(it will be posted on the page where you downloaded SMART) and paste the Smart.scar to the misc folder.
  5. You are all done with installing it. Now you just need to know how to use it in SCAR. Read on to find out.



Using S.M.A.R.T(Smart Setup in script);


Before you use S.M.A.R.T. you must call the procedure
ScarScript:By Drunkenoldma [LEFT]procedure SmartSetup(server: String; hidetail, signed: Boolean); [/LEFT]

Here is a procedure SmartKidz made so you wouldn't have to find the world's prefix.
ScarScript:By Drunkenoldma [LEFT]procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean); var prefix: string; begin prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini'); if(prefix = '')then begin writeln('Invalid world number or corrupted world list. Please review your settings'); TerminateScript; end; SmartSetup(prefix, hiDetail, signed); end; [/LEFT]

I would open it up first, waiting for it to load. Use this to open it up.
note: SmartSetup (regular SmartSetup) MUST HAVE WORLD PERFIX NOT WORLD NUMBER!

ScarScript:By Drunkenoldma [LEFT]begin SmartSetup('at6', false, false); TerminateScript; end; [/LEFT]

You also have to set the DC. Use this with SCAR 3.12.

ScarScript:By Drunkenoldma [LEFT] SmartSetup('at6', false, false); while not(SmartReady) do Wait(100); SetTargetDC(SmartGetDC); [/LEFT]

Lastly, you must always include you Smart include before you include the SRL include.

do:

ScarScript:By Drunkenoldma [LEFT]{.include SRL/SRL/Misc/Smart.scar} {.include SRL/SRL.scar} [/LEFT]

not

ScarScript:By Drunkenoldma [LEFT]{.include SRL/SRL.scar} {.include SRL/SRL/Misc/Smart.scar} [/LEFT]




S.M.A.R.T. Functions


ScarScript:By Drunkenoldma [LEFT]procedure SmartWindMouse(x, y: Integer); procedure SmartDragMouse(x, y: Integer); procedure SmartClickMouse(x, y: Integer; left: Boolean); function SmartGetColor(x, y: integer): integer; function SmartFindColor(var x, y: integer; color, sx, sy, ex, ey: integer): boolean; function SmartFindColorTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean; function SmartFindColorSpiral(var x, y: integer; color, sx, sy, ex, ey: integer): boolean; function SmartFindColorSpiralTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean; function SmartFindBitmap(hdc: integer; var x, y: integer): boolean; function SmartFindBitmapIn(hdc: integer; var x, y: integer; sx, sy, ex, ey: integer): boolean; function SmartFindBitmapToleranceIn(hdc: integer; var x, y: integer; sx, sy, ex, ey, tol: integer): boolean; [/LEFT]




Multiple S.M.A.R.T.'s


To run multiple S.M.A.R.T's, you will need to copy multiple SCAR's on your hard drive. Just go to you SCAR folder and copy it. You then get a S.M.A.R.T. client opened up in the first one, downsize it, and open up the second one. Now run the first script and keep it downsized. Now run the other script and keep it downsized. This should take around 50% of your RAM, therefore giving you plenty of memory to do other stuff.




S.M.A.R.T. Bugs


First error:

Could not initialize SMART.
Error Code [16711422]

This one isn't too hard to handle.

Open Regedit.
Go to HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
Add a string in there named 'BrowserJavaVersion'.
It's value should be: '1.6.0_02'

It should now add to the list which also holds the string 'currentversion' and 'installstatus'.


Second: 'MSVCR71.dll was NOT found.'

http://www.advancedinstaller.com/for...pic.php?t=1801

Just copy'ing the file does it. (MSVCR71.dll)

From your java installdir/bin/*here*
To C:/Windows/system32/*here*

Fifth: Failed when compiling
Line 1: [Error] (16634:11): Duplicate identifier 'MOVEMOUSE' in script C:\Program Files\SCAR 3.12_3\includes\Smart.scar

You need include Smart.scar before anything else.





Picture Diagram



A. If it is blocking then you cannot click on the client. if it is not blocking you are allowed to client on the client. leave blocked while autoing.





FAQ


Q. Is S.M.A.R.T. detecable?
A. No it is not detectable.


Q. I having an error that I can't find a fix for.
A. Post it and we will take it under consideration if its a problem or not.


Q. How many S.M.A.R.T.s can I run at one time?
A. Depends on your computer … but we do not recommend over 6.


Q. I just installed SMART but it wont run. What do I do?
A. After installing SMART, you will need to restart SCAR.

Q. SMART is losing focus what do I do?
A. Make sure you have the client blocked, the latest java, the latest version of scar (at the time of this post it is Scar 3.12 c)

Wizzup?

2007-10-11 02:49:13

S.M.A.R.T bugs.

http://www.villavu.com/forum/showthread.php?t=16060

Dark_Sniper

2007-10-11 19:34:24

I made this:


- Tutorial -
S.M.A.R.T.

Table Of Contents

A. Instaling SMART.

B. Setting SMART up.

C. Autoing on SMART.

D. FAQ.

E. Other notes.




A. INSTALLING SMART.

First off you need to download everything for SMART.
Download SMART here:



After you download SMART you need to extract the plugin to your plugin folder.

You will also need Java 1.6+ in order to use SMART. Every script that wishes to use a SMART function must call SmartSetup before using any.


B. Setting up SMART.

This is what SMART setup looks like:

procedure SmartSetup(server: String; hidetail, signed: Boolean);

Note:
If you do not want to find world prefixes then use this to setup SMART:

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;



change TypeSend in Text.scar in SRL with this:


procedure TypeSend(Text: string);
var
i: Integer;
Shift: Boolean;
begin
if not FindWindowTitlePart('unescape', false) then
begin
SmartSendKeys(Text + Chr(10));
exit;
end;
for i := 1 to Length(Text) do
begin
Shift := (Text[i] = ':') or (Text[i] = '!') or (Text[i] = '+') or
(Text[i] = '?') or (Text[i] = '<') or (Text[i] = '>') or
(Text[i] = '@') or (Text[i] = '#') or (Text[i] = '$') or
(Text[i] = '&') or (Text[i] = '%') or (Text[i] = '*');
if (Shift) then
begin
KeyDown(VK_Shift);
Wait(5 + Random(20));
end;
TypeByte(GetKeyCode(Text[i]));
if (Shift) then
begin
KeyUp(VK_Shift);
Wait(5 + Random(20));
end;
Wait(50 + Random(120));
end;
Wait(200 + Random(500));
TypeByte(13);
end;


At the begining of the Main loop you must have:
SmartSetup(fill this in to your prefrence)
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);

This calls SMART to load and to become scars active autoing window.
It also waits until SMART is ready to be autoed on

You must load SMART.Scar first before SRL!

{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}

If you do not SMART will not auto properly.

C. Autoing on SMART.

Nothing new from autoing on reg client.
Except you have to declare smart.
Do as script instructions tell you to do.
You must have scar 3.06 or higher.
You can also minimize the client and still be autoing….


D. FAQ

Q. Is it detecable.
A. The only thing that would be detectable is the script… if you have a good script then no worries.

Q. Im getting errors…
A. check here : http://www.villavu.com/forum/showthread.php?t=16060

(more FAQ to come)


E. Other Notes.
Functions SMART has implemented for SMART use:


procedure SmartWindMouse(x, y: Integer);
procedure SmartDragMouse(x, y: Integer);
procedure SmartClickMouse(x, y: Integer; left: Boolean);
function SmartGetColor(x, y: integer): integer;
function SmartFindColor(var x, y: integer; color, sx, sy, ex, ey: integer): boolean;
function SmartFindColorTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean;
function SmartFindColorSpiral(var x, y: integer; color, sx, sy, ex, ey: integer): boolean;
function SmartFindColorSpiralTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean;
function SmartFindBitmap(hdc: integer; var x, y: integer): boolean;
function SmartFindBitmapIn(hdc: integer; var x, y: integer; sx, sy, ex, ey: integer): boolean;
function SmartFindBitmapToleranceIn(hdc: integer; var x, y: integer; sx, sy, ex, ey, tol: integer): boolean;

Run Multiple S.M.A.R.T.'s

Well its possible here: http://www.villavu.com/forum/showthread.php?t=18673

The Un-Named

2007-10-11 19:51:40

I noticed you both failed to check if Smart is ready before calling SetTargetDC.

while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);

Dark_Sniper

2007-10-11 20:30:11

i knew there was something that needed to go there :p updated :p

BenLand100

2007-10-12 13:46:25

I think anyone that wants to help should work together to get one REALLY good tutorial. So, do any drafting/suggestions here and tell me when you're done so that it can be the official tutorial :garfield:

pwnaz0r

2007-10-12 13:55:42

I cant say what else to put. What else is there Ben?

Dark_Sniper

2007-10-12 16:05:18

well pwnazor Ill get some screenies so you can put them in your tut :p

We will use yours and I'll just throw in the add-ons.

lemme get those screenies.


procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

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;

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;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

also tell them they need to make an include and save the above as like SMART or somthing in the includes folder and then include it at the very top of the script.

tell them to just save it into the include folder cause it is easier to just include it in a script like {.include SMART.scar}

until they include this into SRL :p

Sumilion

2007-10-12 17:17:54

What about this ? I always use Smart.scar with this :

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;

Dark_Sniper

2007-10-12 20:49:57

alright.

lol pwnazor do you want to team up and make a huge tutorial :p

EDIT:


heres something to add:




A. If it is blocking then you cannot click on the client. if it is not blocking you are allowed to client on the client. leave blocked while autoing.


B. This is the Frames Per Second(FPS) bar. you can lower it so you can run multiple S.M.A.R.T.s . DO NOT LOWER IT TO FAR! this may make it so SRL can not solve a random. I would say a good 10-15% would be good.

mastaraymond

2007-10-13 13:45:19

Every time your going to use SMART on a other script, you must call SmartSetup. For example:
I have got a loader, SmartLoader.Scar, it loads the lest popular world and a world that isn't active on any other SMARTS (ISM). Then when i run the real script, i must call SmartSetup with the current world, otherwise it won't work somehow. Thats why i edited my SetupSRL a bit, it looks like this right now:
 {$ifdef smart}
if ReadInterSCARMessage('SMART__'+ Inttostr(GetSelf.Handle)) <> '' then
begin;
SmartSetup(ReadInterSCARMessage('SMART__'+ Inttostr(GetSelf.Handle)),false,false);
SetTargetDc(SmartGetDC);
end;
Disguise('SMART_SCAR_'+ReadInterSCARMessage('SMART___'+ Inttostr(GetSelf.Handle))+' is running!');
{$endif}
SMART is defined in Smart.Scar.
Oh and for those who are intrested here is my SmartLoader:
{.include smart.scar}
var
Worlds,Temp : String;
Function FindWorlds(Members : Boolean): TIntegerArray;
var
I,j,K,T: integer;
WorldListArray : TStringArray;
WorldList : String;
begin;
WorldList := Between('d.write("</tr>");'#10'} ',#10'</script>',GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=2&order=MPWLA'));
J := pos(';', WorldList);
repeat
SetArrayLength(WorldListArray, i + 2);
WorldListArray[i] := copy(WorldList, 1, J-1);
delete(WorldList, 1, pos(WorldListArray[i], WorldList)+Length(WorldListArray[i]));
i := i + 1;
J := pos(';', WorldList);
until(J = 0)
SetLength(WorldListArray,I);
SetLength(Result,100);
For I := 0 to Length(WorldListArray) -1 do
begin;
if Not (WorldListArray[I] = '127') then
begin;
J := LastPos(',',WorldListArray[I]);
K := LastPosEx(',',WorldListArray[I],J);
if GetNumbers(Copy(WorldListArray[i],K+1,J-K-1)) <> '0' then
begin;
if members then if WorldListArray[I][Pos(',',WorldListArray[I])+1] = '1' then
begin;
Result[T] := StrToInt(Copy(WorldListArray[i],3,Pos(',',WorldListArray[I])-3));
inc(T);
end;
if not Members then if WorldListArray[I][Pos(',',WorldListArray[I])+1] = '0' then
begin;
Result[T] := StrToInt(Copy(WorldListArray[i],3,Pos(',',WorldListArray[I])-3));
inc(T);
end;
end;
end;
end;
SetLength(Result,T);
end;

procedure SmartSetupEx(Worlds : TIntegerArray; SearchLessCrowded, Member, RandomizeArray, HighDetail, Signed: boolean);
var
Prefix : string;
Used : String;
I,L, II : Integer;
Randomized : TIntegerArray;
begin
SetLength(Randomized,L);
if SearchLessCrowded then
Randomized := FindWorlds(member)
else if RandomizeArray then
begin;
L := Length(Worlds);
For I:= 0 to L - 1 do
Repeat
II := Random(L);
if Randomized[II] = 0 then
Randomized[II] := Worlds[I];
until (Randomized[II] = Worlds[I]);
end else
Randomized := Worlds;
L := Length(Randomized);
Try
Used := ReadInterSCARMessage('SMART_Worlds');
For I:= 0 to L - 1 do
begin;
if (pos('-'+inttostr(Randomized[I])+'-',Used) < 1) and not (Randomized[I] = 127) then
begin;
Prefix := ReadINI('World' + inttostr(Randomized[I]), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if Prefix = '' then begin;
Writeln('Your world number is invalid! You used number: '+inttostr(Randomized[I]));
TerminateScript;
end;
SendInterSCARMessage('SMART___'+ Inttostr(GetSelf.Handle),IntTostr(Randomized[I]));
SendInterSCARMessage('SMART__'+ Inttostr(GetSelf.Handle),Prefix);
SendInterSCARMessage('SMART_'+ Inttostr(GetSelf.Handle),inttostr(Randomized[I]));
SendInterSCARMessage('SMART_Worlds',Used+'-'+inttostr(Randomized[I])+'-');
Writeln('Loading world '+inttostr(Randomized[I])+'_ '+prefix+' _'+Used);
SmartSetup(Prefix, HighDetail, Signed);
Exit;
end;
end;
except
end;
Writeln('Error or something like that, closing!');
TerminateScript;
end;

begin

Worlds := ReadInterSCARMessage('SMART_Worlds');
Temp := '-'+ReadInterSCARMessage('SMART_'+ Inttostr(GetSelf.Handle))+'-';
if Length(Temp) > 2 then
Delete(Worlds,Pos(Temp,Worlds),Length(Temp));
SendInterSCARMessage('SMART_Worlds',Worlds);
if Readln('Erase previous worlds: '+ ReadInterSCARMessage('SMART_Worlds')) <> 'no' then
SendInterSCARMessage('SMART_Worlds','');

SmartSetupEx([], true,false,false,false, false);
// SmartSetup('ny4',false,false);
// SmartSetTarget;
SetTargetDc( SmartGetDC);
wait(5000 + random(5000));
repeat
wait(1000);
until(Smartgetcolor(231, 233)<>1118604);
//SmartClickMouse(741,480,true);
end.
I Could fix it a bit so it works good for noobs and stuff, but it works alright for me.

Also the reason why i use a different loader is because i have to do ColorPicking ;).

BenLand100

2007-10-13 21:40:46

I archived this thread and sent it, along with a copy of smart to Widget, and he managed to get SMART working without much trouble. So you're on the right track. I'd say do any combining you feel you need to do, and I'll move it to the tutorial section when I release smart. I'll probably release Smart.scar with the plugin btw, so you don't have to include it, however do post the version you're using so I can get the most up to date version you've all created, and comment into it as necessary.

Dark_Sniper

2007-10-13 22:10:58

this is what i got for the smart include so far :

{ Smart.scar
- The following code overwrites basic scar functions
- so that we can auto on smart freely
}

// Moves the mouse using Smart mouse to specified coordinates.
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

// Holds a click down at specified coordinates using smart hold mouse.
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

// Releases a click at specified coordinates using smart release mouse.
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

// Simulates releasing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyUp(key: Byte);
begin
if(key = 13)then
key := 10;
SmartReleaseKey(key);
end;

// Simulates pressing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyDown(key: Byte);
begin
if(key = 13)then
key := 10;
SmartHoldKey(key);
end;

// Sends keys to client using smart send keys.
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

// Gets Smart mouse current position on client.
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

// Gets color off Smart client at specified coordinates.
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

// Sets target to be Smart.
procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

// Returns true because client is already found.
function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

// Does nothing cause the client is always active.
procedure ActivateClient;
begin
end;

// Returns true because client is already found.
function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;


hold on im checking around for things i may have missed.




are we going to cover up who made the tutorials identity to mask who is ssrl or are we just releasing it as it is?















Tutorial edit (will continue editing until pwnazor and I agree):


S.M.A.R.T. Setup & Run Tutorial


Contents:
  • Introduction to S.M.A.R.T.
  • Setting up S.M.A.R.T.
  • Using S.M.A.R.T(Smart Setup in script);
  • S.M.A.R.T. Functions
  • Multiple S.M.A.R.T.'s
  • S.M.A.R.T. Bugs
  • Picture Diagram
  • FAQ




Introduction to S.M.A.R.T.


S.M.A.R.T. stands for Scar Minimizing Autoing Resource Thing. It was created by Benland100 for SCAR. It does not take control of your mouse, it uses its own mouse which appears red on the SMART screen. To open it, you simply call the function SmartSetup(WorldPrefix: string;HighDetail: boolean; Signed: boolean): boolean; as you cannot open it by yourself. To run SCAR Scripts with S.M.A.R.T., you must have the SMART client locked, where you can't click anything.




Setting up S.M.A.R.T.


Requirements:
  • You will need Java 1.6 or higher.
  • You will need SCAR.
  • You will need Winrar.

To Setup S.M.A.R.T.:
  1. Download the S.M.A.R.T. file.
  2. Extract the S.M.A.R.T file into the "Plugins" folder in SCAR. Make sure to have the plugin highlighted.
  3. [left] [/left]
  4. Now Download Smart.scar(it will be posted on the page where you downloaded SMART) and paste the Smart.scar to the misc folder.
  5. You are all done with installing it. Now you just need to know how to use it in SCAR. Read on to find out.



Using S.M.A.R.T(Smart Setup in script);


Before you use S.M.A.R.T. you must call the procedure

procedure SmartSetup(server: String; hidetail, signed: Boolean);

Here is a procedure SmartKidz made so you wouldn't have to find the world's prefix.

procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;

I would open it up first, waiting for it to load. Use this to open it up.
note: SmartSetup (regular SmartSetup) MUST HAVE WORLD PERFIX NOT WORLD NUMBER!


begin
SmartSetup('at6', false, false);
TerminateScript;
end;

replace the TypeSend in Text.scar with this

procedure TypeSend(Text: string);
var
i: Integer;
Shift: Boolean;
begin
if not FindWindowTitlePart('unescape', false) then
begin
SmartSendKeys(Text + Chr(10));
exit;
end;
for i := 1 to Length(Text) do
begin
Shift := (Text[i] = ':') or (Text[i] = '!') or (Text[i] = '+') or
(Text[i] = '?') or (Text[i] = '<') or (Text[i] = '>') or
(Text[i] = '@') or (Text[i] = '#') or (Text[i] = '$') or
(Text[i] = '&') or (Text[i] = '%') or (Text[i] = '*');
if (Shift) then
begin
KeyDown(VK_Shift);
Wait(5 + Random(20));
end;
TypeByte(GetKeyCode(Text[i]));
if (Shift) then
begin
KeyUp(VK_Shift);
Wait(5 + Random(20));
end;
Wait(50 + Random(120));
end;
Wait(200 + Random(500));
TypeByte(13);
end;



You also have to set the DC. Use this with SCAR 3.12.


SmartSetup('at6', false, false);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);

Lastly, you must always include you Smart include before you include the SRL include.

do:


{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}

not


{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/Smart.scar}






S.M.A.R.T. Functions



procedure SmartWindMouse(x, y: Integer);
procedure SmartDragMouse(x, y: Integer);
procedure SmartClickMouse(x, y: Integer; left: Boolean);
function SmartGetColor(x, y: integer): integer;
function SmartFindColor(var x, y: integer; color, sx, sy, ex, ey: integer): boolean;
function SmartFindColorTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean;
function SmartFindColorSpiral(var x, y: integer; color, sx, sy, ex, ey: integer): boolean;
function SmartFindColorSpiralTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean;
function SmartFindBitmap(hdc: integer; var x, y: integer): boolean;
function SmartFindBitmapIn(hdc: integer; var x, y: integer; sx, sy, ex, ey: integer): boolean;
function SmartFindBitmapToleranceIn(hdc: integer; var x, y: integer; sx, sy, ex, ey, tol: integer): boolean;





Multiple S.M.A.R.T.'s


To run multiple S.M.A.R.T's, you will need to copy multiple SCAR's on your hard drive. Just go to you SCAR folder and copy it. You then get a S.M.A.R.T. client opened up in the first one, downsize it, and open up the second one. Now run the first script and keep it downsized. Now run the other script and keep it downsized. This should take around 50% of your RAM, therefore giving you plenty of memory to do other stuff.




S.M.A.R.T. Bugs


First error:

Could not initialize SMART.
Error Code [16711422]

This one isn't too hard to handle.

Open Regedit.
Go to HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
Add a string in there named 'BrowserJavaVersion'.
It's value should be: '1.6.0_02'

It should now add to the list which also holds the string 'currentversion' and 'installstatus'.


Second: 'MSVCR71.dll was NOT found.'

http://www.advancedinstaller.com/for...pic.php?t=1801

Just copy'ing the file does it. (MSVCR71.dll)

From your java installdir/bin/*here*
To C:/Windows/system32/*here*

Fifth: Failed when compiling
Line 1: [Error] (16634:11): Duplicate identifier 'MOVEMOUSE' in script C:\Program Files\SCAR 3.12_3\includes\Smart.scar

You need include Smart.scar before anything else.





Picture Diagram



A. If it is blocking then you cannot click on the client. if it is not blocking you are allowed to client on the client. leave blocked while autoing.


B. This is the Frames Per Second(FPS) bar. you can lower it so you can run multiple S.M.A.R.T.s . DO NOT LOWER IT TO FAR! this may make it so SRL can not solve a random. I would say a good 10-15% would be good.




FAQ


Q. Is S.M.A.R.T. detecable?
A. No it is not detectable.


Q. I having an error that I can't find a fix for.
A. Post it and we will take it under consideration if its a problem or not.


Q. How many S.M.A.R.T.s can I run at one time?
A. Depends on your computer … but we do not recommend over 6.


Q. How low can we put FPS?
A. As low as 10-15% - or until (RS login screen) flames seem to lag just tiny bit.

- more FAQ to come -

BenLand100

2007-10-13 22:23:19

From: Dark_Sniper
are we going to cover up who made the tutorials identity to mask who is ssrl or are we just releasing it as it is?

If you all are Ok with it, I think I will copy/paste it into the topic I release in, with You all credited as the authors. I don't want to drag the whole topic out of the SSRL section in other words.

Dark_Sniper

2007-10-13 22:41:16

Yes sounds good :)

I'll get pwnazor to check this out now.

pwnaz0r

2007-10-13 22:45:40

yeah sounds good ben. Just put me and dark sniper as writers. And I will edit the post with your changes dark.

EDIT: O yeah and Dark brought up a good point on msn. Could you possibly just let us make the post so we can update if needed? We would just make a new one like you said and you wouldnt have to worry about updating it. Or at least get like first and second post?

Dark_Sniper

2007-10-13 22:59:08

From: pwnaz0r
yeah sounds good ben. Just put me and dark sniper as writers. And I will edit the post with your changes dark.

EDIT: O yeah and Dark brought up a good point on msn. Could you possibly just let us make the post so we can update if needed? We would just make a new one like you said and you wouldnt have to worry about updating it. Or at least get like first and second post?


ya im fine with first and second post really….


you just need to make the thread and let us post afterwards?

unless everytime we want to update it your prompt to do so :p




also pwnazor edited his first post to contain everything but the smart include which is here:


{ Smart.scar
- The following code overwrites basic scar functions
- so that we can auto on smart freely
}

// Moves the mouse using Smart mouse to specified coordinates.
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

// Holds a click down at specified coordinates using smart hold mouse.
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

// Releases a click at specified coordinates using smart release mouse.
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

// Simulates releasing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyUp(key: Byte);
begin
if(key = 13)then
key := 10;
SmartReleaseKey(key);
end;

// Simulates pressing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyDown(key: Byte);
begin
if(key = 13)then
key := 10;
SmartHoldKey(key);
end;

// Sends keys to client using smart send keys.
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

// Gets Smart mouse current position on client.
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

// Gets color off Smart client at specified coordinates.
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

// Sets target to be Smart.
procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

// Returns true because client is already found.
function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

// Does nothing cause the client is always active.
procedure ActivateClient;
begin
end;

// Returns true because client is already found.
function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

Sumilion

2007-10-14 03:55:18

Just remember that if you use the KeyDown/Up function like this :

procedure KeyUp(key: Byte);
begin
if(key = 13)then
key := 10;
SmartReleaseKey(key);
end;

Then you dont need to replace typesend.

Dark_Sniper

2007-10-14 12:54:09

From: Sumilion
Just remember that if you use the KeyDown/Up function like this :

procedure KeyUp(key: Byte);
begin
if(key = 13)then
key := 10;
SmartReleaseKey(key);
end;

Then you dont need to replace typesend.


Pwnazor we are taking out editing typesend in our tutorial :p

we also need to include
Q. SMART is losing focus what do I do?
A. Make sure you have the client blocked, the latest java, the latest version of scar (at the time of this post it is Scar 3.12 c)

pwnazor if we find the answer to rams and your problem then we add on to the answer.

nielsie95

2007-10-14 14:24:31

Would it be a good idea to release a tutorial immedeatly after the release of SCAR with names of SSRL-people? I thought the members should be kept a secret..

Dark_Sniper

2007-10-14 14:35:06

they should be…

we could say

Tutorial Made by Two SSRL Members


or something :p

The Un-Named

2007-10-14 15:38:25

Guys, while making my AnyRockMiner, I thought of a BRILLIANT idea for SMART. Basically, any script can be compatible with SMART even if you don't have it, and it will still run!

(Psst, compiler directives!)

So basically, add this at the top of your script:

//{$Define SMART}  // Uncomment this line if your using SMART
{$IfDef SMART}
{.include smart.scar}
{$EndIf}

Then in your Setup procedure or whatever, put this:

    {$IfDef SMART}
SmartSetup('nav4', False, True);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);
SmartSetRefresh(5);
if not(LoggedIn) then
while not(SmartGetColor(386, 249) = 65535) do Wait(100);
{$EndIf}

(Modify to your preferences).

It could probably be used in the tutorial so anyone who wants to make a SMART script, even for people who don't have it can use it, so the user doesn't need to implement SMART him/herself.

Dark_Sniper

2007-10-14 20:14:21

procedure TypeSend(Text: string);
var
i: Integer;
Shift: Boolean;
begin
for i := 1 to Length(Text) do
begin
Shift := (Text[i] = ':') or (Text[i] = '!') or (Text[i] = '+') or
(Text[i] = '?') or (Text[i] = '<') or (Text[i] = '>') or
(Text[i] = '@') or (Text[i] = '#') or (Text[i] = '$') or
(Text[i] = '&') or (Text[i] = '%') or (Text[i] = '*');
if (Text[i] = '_') then
Text[i]:= ' ';
if (Shift) then
begin
KeyDown(VK_Shift);
Wait(5 + Random(20));
end;
TypeByte(GetKeyCode(Text[i]));
if (Shift) then
begin
KeyUp(VK_Shift);
Wait(5 + Random(20));
end;
Wait(50 + Random(120));
end;
Wait(200 + Random(500));
TypeByte(13);
end;


i added :
if (Text = '_') then
Text:= ' ';

if you have a _ in your name it will not be typed in smart…
space will though.



pwnazors way of typesend will cause some problems…
so we will go with sums idea.


also the latest version of smart.scar is here:

mastaraymond

2007-10-15 01:41:12

From: The Un-Named
Guys, while making my AnyRockMiner, I thought of a BRILLIANT idea for SMART. Basically, any script can be compatible with SMART even if you don't have it, and it will still run!

(Psst, compiler directives!)

So basically, add this at the top of your script:

//{$Define SMART}  // Uncomment this line if your using SMART
{$IfDef SMART}
{.include smart.scar}
{$EndIf}

Then in your Setup procedure or whatever, put this:

    {$IfDef SMART}
SmartSetup('nav4', False, True);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);
SmartSetRefresh(5);
if not(LoggedIn) then
while not(SmartGetColor(386, 249) = 65535) do Wait(100);
{$EndIf}

(Modify to your preferences).

It could probably be used in the tutorial so anyone who wants to make a SMART script, even for people who don't have it can use it, so the user doesn't need to implement SMART him/herself.

Uhm, i posted a similar thing on the previous page ^^.

The Un-Named

2007-10-15 01:45:12

From: mastaraymond
Uhm, i posted a similar thing on the previous page ^^.


Sorry, must have missed that one.

Dark_Sniper

2007-10-17 10:23:44

latest version of smart.scar:

{ Smart.scar
- The following code overwrites basic scar functions
- so that we can auto on smart freely
}

// Moves the mouse using Smart mouse to specified coordinates.
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

// Holds a click down at specified coordinates using smart hold mouse.
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

// Releases a click at specified coordinates using smart release mouse.
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

// Simulates releasing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyUp(key: Byte);
begin
if(key = 13)then
key := 10;
SmartReleaseKey(key);
end;

// Simulates pressing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyDown(key: Byte);
begin
if(key = 13)then
key := 10;
SmartHoldKey(key);
end;

// Sends keys to client using smart send keys.
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

// Gets Smart mouse current position on client.
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

// Gets color off Smart client at specified coordinates.
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

// Sets target to be Smart.
procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

// Returns true because client is already found.
function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

// Does nothing cause the client is always active.
procedure ActivateClient;
begin
end;

// Returns true because client is already found.
function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

//Same as SmartSetup instead you use world number over prefix.
procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;


Should I add this to SMART.scar :

if FileExists('Plugins\Embedded SMART.dll') then

if it finds the plugin it will continue :p
(basically your guys idea but in the include with less hassle :p)


make a function and add it in?

Function SmartExist : Boolean;
begin
Result:= FileExists('Plugins\Embedded SMART.dll');
end;



heres that version :)

{ Smart.scar
- The following code overwrites basic scar functions
- so that we can auto on smart freely
}

// Checks if you have the SMART plugin.
Function SmartExist : Boolean;
begin
Result:= FileExists('Plugins\Embedded SMART.dll');
end;

// Moves the mouse using Smart mouse to specified coordinates.
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

// Holds a click down at specified coordinates using smart hold mouse.
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

// Releases a click at specified coordinates using smart release mouse.
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

// Simulates releasing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyUp(key: Byte);
begin
if(key = 13)then
key := 10;
SmartReleaseKey(key);
end;

// Simulates pressing a key with Smart and converts key bytes to ones that smart uses.
// (Smarts enter key is not chr 13 it is chr 10)
procedure KeyDown(key: Byte);
begin
if(key = 13)then
key := 10;
SmartHoldKey(key);
end;

// Sends keys to client using smart send keys.
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

// Gets Smart mouse current position on client.
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

// Gets color off Smart client at specified coordinates.
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

// Sets target to be Smart.
procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

// Returns true because client is already found.
function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

// Does nothing cause the client is always active.
procedure ActivateClient;
begin
end;

// Returns true because client is already found.
function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

//Same as SmartSetup instead you use world number over prefix.
procedure SmartSetupEx(worldnumber: integer; hiDetail, signed: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(worldnumber), 'Prefix', AppPath + 'includes\SRL\SCSS\worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup(prefix, hiDetail, signed);
end;

mastaraymond

2007-11-04 11:21:17

I made a alternate screenshot function for smart, because if you use smart and use the default screenshots, you will get pictures of your desktop ^^. Place somewhere in your smart.scar file x).

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;


EDIT: @Sniper


"if FileExists('Plugins\Embedded SMART.dll') then"
If the plugin doesn't exist, the include will not compile… Bit useless ^^.

Cheesehunk

2007-11-12 21:27:25

Why not release it under the "SRL" account?

WT-Fakawi

2007-11-18 17:52:49

Enjoy an "inside" conversation.


Closed.

WT-Fakawi

2007-11-27 16:58:38

Moved and reopened.

Markus

2008-01-16 06:26:03

Lots of people are clicking this link in the SMART intro post, but this is in SSRL….

WhoCares357

2009-02-17 20:49:39

Is this tutorial up-to-date?

Widget

2009-02-18 02:15:29

From: WhoCares357
Is this tutorial up-to-date?

Nope, SMART's public now, so check the Tutorial Island :)

WhoCares357

2009-02-18 18:15:30

Mmkay, thanks.