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

The Correct way for Smart


mooman001

2008-03-16 19:18:14

Credits go to HY71194

This will work with ANY script and is easy to add…

go to the top look for …
{.include SRL/SRL.scar}

then above that add…
{.include SRL/SRL/Misc/Smart.scar}


const
SmartWorld = 1;
Signed = True;

This is declaring what World and if you want it to be signed or not…

Then add…

procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
end;

This will display a message saying Smart is loading…

then find the
SetupSRL;

add beneath that…
SetupSmart;

Hope this helps!

PS… You can run as many as you want with this method…

Harry

2008-03-16 19:21:29

Looks nice. :)

Cazax

2008-03-16 19:26:04

instead of…:
procedure SetupSMART;
begin
SmartSetupEx(SMARTWorld, false, SMARTSigned);
ClearDebug;
WriteLn('Setting up SMART');
WriteLn('Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
end;

just …

while SmartLoading do wait(200);
or something like that.

Xeo.Xngel

2008-03-17 17:50:24

I use …
while not(SmartReady) do Wait(100);

instead of …
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);

I found it in the Varrock East Miner by Masterkill.

mooman001

2008-03-17 18:50:30

Ok fixed now it looks nicer :P

Harry

2008-03-17 19:01:42

From: Xeo.Xngel
I use …
while not(SmartReady) do Wait(100);

instead of …
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);

I found it in the Varrock East Miner by Masterkill.


It is the same thing, only the Until(SmartGetColor(……)); is better IMO.

Flamez

2008-03-22 23:47:53

Helped me out alot :D

faster789

2008-03-23 14:37:26

im confuzed so does this mean we dont have to edit anythin in the scar root folder?

Harry

2008-03-23 14:39:21

From: faster789
im confuzed so does this mean we dont have to edit anythin in the scar root folder?


Nope, just edit in the script ^_^

faster789

2008-03-23 15:02:45

ok…i did it to my script evn loook below…but it still doesnt work…plzz help..btw this is the error that appears :
[Runtime Error] : Exception: Access violation at address 029810AB in module 'Embedded SMART.dll'. Read of address 000006DC in line 47 in script C:\Documents and Settings\Owner\My Documents\Grade 7\SCAR 3.15\includes\SRL/SRL/misc/SMART.scar

program Miner;
{.include SRL/SRL/misc/SMART.scar}
{.include SRL/SRL.scar}

var x,y: integer;

const
SmartWorld = 126; // what world smart uses
Signed = True;

LoadsPerPlayer= 2; // how many loads per player?
WaitPerRock= 5000; //how many seconds to waiter between rocks
rockcolor1= 5274794; // 1 color of the rock
rockcolor2= 4944798; // 2nd color of the rock
rockcolor3= 4879005; // 3rd color of the rock

procedure DeclarePlayers;
begin
HowManyPlayers :=1; // how many players do you want
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0
Players[0].Name := 'Username'; //Character Name
Players[0].Pass := 'Password'; //Character Pass
Players[0].Nick := 'nick'; //Nickname 3 - 4 Letter's of char name
Players[0].Active := True; //true if you want this player to be ran in the script false if you dont want it to run
end;

procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
end;



Procedure Myrandom;
begin

FindNormalRandoms;
FindLamp('Mining');

if(FindFight)then
RunAway('N', True,1,15000);
end;

procedure antiban;
begin
if(not(LoggedIn)) then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Mining', False);
3: RandomMovement;
4: BoredHuman;
5: AlmostLogout;
6: DoEmote(400 + Random(90));
end;
end;

procedure Minedarock;

var x, y, MyMark: integer;

begin
if(not(LoggedIn))then
Exit;
Marktime(Mymark);
MakeCompass('N');
repeat
if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2, rockcolor3], 7)
then
begin
Mouse(x,y,0,0,false);
Wait(500+ (random(150)));
writeln('found rock');
if ChooseOption('ine') then
begin
Wait(WaitPerRock);
antiban;
Myrandom;
exit;

end;
end;
if TimeFromMark(MyMark) > (2 * 60 * 100) then
begin
Logout;
Exit;
end;
until false;

end;


procedure Drop;
begin
if Not(LoggedIn) then exit;
GameTab(4);
for x := 3 to 28 do
Begin
if Random(101) < 3 then
Begin
MouseItem(x, true);
MouseItem(x + 1, true);
end;
MouseItem(x, false);
ChooseOption('rop');
end;
end;

begin
if (not(LoggedIn)) then LoginPlayer;
SetupSmart;
SetupSRL;
DeclarePlayers;
if LoggedIn then Logout;
LoginPlayer;
repeat
Minedarock;
if InvFull then
begin
Drop;
Inc(Players[CurrentPlayer].Banked);
if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
begin
NextPlayer(True);
end;
end;
if not Loggedin then NextPlayer(False);

until False;
end.

mixster

2008-03-23 15:22:43

As I said in your topic (in case you don't look there) try removing 'if (not(LoggedIn)) then LoginPlayer;' from the main loop (first one right after the begin).

Brett_bs

2008-04-13 01:21:27

Ok that helps thanks

MrLonely

2008-04-13 01:42:19

nice tut. helped me set it up :D

syn7hetic

2008-04-13 02:35:38

every time i do this i get the error msg


[B]Line 4: [Error] (12650:11): Duplicate identifier 'MOVEMOUSE' in script C:\Documents and Settings\Admin\My Documents\RS\SCAR 3.15\includes\SRL/SRL/Misc/Smart.scar[/B]


my smart.scar looks like this is anything wrong?
// smart.scar overwrites the SCAR procedures.
// You should always include this before any other include, even SRL.scar

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;

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;

mixster

2008-04-14 08:56:01

put {.include srl/srl/misc/Smart.scar} before {.include srl/srl.scar}, not after :)

Unohdus

2008-05-02 21:00:37

*Five stars*

stewiemaniac

2008-05-04 20:04:08

wow. thank you. i found this very useful in addition with the free scripts

fearmi

2008-05-05 17:31:38

Very good thank you you helped me out been trying to figure it out i am kinda computer stupid when it comes to hacking >.<

Drakan

2008-05-05 19:05:06

Well this isnt hacking fearmi :P It's autoing :P Hacking is much more difficult than autoing. And yes this is a great tutorial thanks!

jism

2008-05-09 04:10:39

Man I feel stupid


put {.include srl/srl/misc/Smart.scar} before {.include srl/srl.scar}, not after


After downloading about every different revision thinking I was doing something wrong.

squnky

2008-05-12 21:40:06

… saved me lol -

thanks

Zlakata

2008-05-16 14:20:31

guys every script i try to run with SMART it only says

Successfully compiled (737 ms)
Successfully executed

in about miliseconds. What am i missing??

warrior993

2008-05-16 20:02:48

I do all this and it says "File Access Error", and then it quickly changes to "Setting up Smart… Please Hold…". Soon after that, my SCAR simply closes. Any suggestions?

staffa

2008-12-05 06:02:27

I don't get it, with the setupsmart code do I put that int the script? And I can't find SetupSRL;
Help.

armin

2008-12-12 02:02:38

[Runtime Error] : Exception: Access violation at address 6720138A in module 'Embedded_SMART.dll'. Read of address 00000350 in line 48 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Misc/Smart.scar

I still get this error.

kingmonkeyd

2008-12-12 22:26:55

armin, I'm not sure if this is your problem, but in the "Fixing SMART after you DL new srl rev (29 & 30) thread", it says to get rid of the original Embedded Smart.dll file and rename the Embedded_Smart.dll as Embedded Smart.dll.
Also, thanks mooman001 for the tutorial. I was able to get my smart up and running. The only thing is that I believe SmartSetupEx now require four inputs where the last one is for the Superdetail. I just put that as false.

1337w33d

2008-12-17 11:40:03

……………………………………..________
………………………………,.-‘”……………….``~.,
………………………..,.-”……………………………..“-.,
…………………….,/………………………………………..”:,
…………………,?………………………………………………\,
………………./…………………………………………………..,}
……………../………………………………………………,:`^`..}
……………/……………………………………………,:”………/
…………..?…..__…………………………………..:`………../
…………./__.(…..“~-,_…………………………,:`………./
………../(_….”~,_……..“~,_………………..,:`…….._/
……….{.._$;_……”=,_…….“-,_…….,.-~-,},.~”;/….}
………..((…..*~_…….”=-._……“;,,./`…./”…………../
…,,,___.\`~,……“~.,………………..`…..}…………../
…………(….`=-,,…….`……………………(……;_,,-”
…………/.`~,……`-………………………….\……/\
………….\`~.*-,……………………………….|,./…..\,__
,,_……….}.>-._\……………………………..|…………..`=~-,
…..`=~-,_\_……`\,……………………………\
……………….`=~-,,.\,………………………….\
…………………………..`:,,………………………`\…………..__
……………………………….`=-,……………….,%`>–==``
…………………………………._\……….._,-%…….`\
……………………………..,<`.._|_,-&``…………….`\


Checking dates could also be good.
Last post was:
>05-16-2008, 08:02 PM

Ctrl + F then type "SetupSRL;" (without the quotation marks of course) and replace it with this:


SmartSetupEx(113, false, false, false);
SetTargetDC(SmartGetDC);
SetupSRL;

SmartSetupEx(Smart world, Memembers (true) nonmembers (false), signed, high detail (true) standard (false))

Excuse me if there is something I'm missing, or I'm "doin it rong"

Also make sure everything is updated.

trojan

2008-12-20 16:14:00

Change

procedure SetupSmart;
begin
SmartSetupEx(SmartWorld, false, Signed);
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartReady) do Wait(100);
end;

to

procedure SetupSmart;
begin
SmartSetupEx(Smartworld,false,signed,false); //extra false is for the detail
ClearDebug;
WriteLn('Setting up Smart... Please Hold...');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartActive) do Wait(100); //smartactive instead of smartready
end;

enidraj

2008-12-21 06:58:32

From: armin
[Runtime Error] : Exception: Access violation at address 6720138A in module 'Embedded_SMART.dll'. Read of address 00000350 in line 48 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Misc/Smart.scar

I still get this error.


it could be because of srl 29 / 30 if you have updated to it?


go to c\program files\scar 3.15\plugins
there should be Embedded_smart.dll and Embedded Smart.dll (without the underscore)
delete the one without the underscore.
other than that i have no idea

enidraj

2008-12-21 07:01:19

From: 1337w33d
……………………………………..________
………………………………,.-‘”……………….``~.,
………………………..,.-”……………………………..“-.,
…………………….,/………………………………………..”:,
…………………,?………………………………………………\,
………………./…………………………………………………..,}
……………../………………………………………………,:`^`..}
……………/……………………………………………,:”………/
…………..?…..__…………………………………..:`………../
…………./__.(…..“~-,_…………………………,:`………./
………../(_….”~,_……..“~,_………………..,:`…….._/
……….{.._$;_……”=,_…….“-,_…….,.-~-,},.~”;/….}
………..((…..*~_…….”=-._……“;,,./`…./”…………../
…,,,___.\`~,……“~.,………………..`…..}…………../
…………(….`=-,,…….`……………………(……;_,,-”
…………/.`~,……`-………………………….\……/\
………….\`~.*-,……………………………….|,./…..\,__
,,_……….}.>-._\……………………………..|…………..`=~-,
…..`=~-,_\_……`\,……………………………\
……………….`=~-,,.\,………………………….\
…………………………..`:,,………………………`\…………..__
……………………………….`=-,……………….,%`>–==``
…………………………………._\……….._,-%…….`\
……………………………..,<`.._|_,-&``…………….`\


Checking dates could also be good.
Last post was:
>05-16-2008, 08:02 PM

Ctrl + F then type "SetupSRL;" (without the quotation marks of course) and replace it with this:


SmartSetupEx(113, false, false, false);
SetTargetDC(SmartGetDC);
SetupSRL;

SmartSetupEx(Smart world, Memembers (true) nonmembers (false), signed, high detail (true) standard (false))

Excuse me if there is something I'm missing, or I'm "doin it rong"

Also make sure everything is updated.


Invalid world number or corrupted world list. Please review your settings
Successfully executed

any ideas :S????

tom99

2010-03-13 11:22:37

I see you say this work with any script but do you mean any runescape script or, what so ever script it will work with everything?

Dgby714

2010-03-13 12:00:26

From: tom99
I see you say this work with any script but do you mean any runescape script or, what so ever script it will work with everything?


SMART only works with runescape so whats the point in using it in other scripts?

THIS is very OLD btw =)

FEAR

2010-03-13 12:00:40

From: tom99
I see you say this work with any script but do you mean any runescape script or, what so ever script it will work with everything?


Please look at the dates of threads before you dig them up :/

And SMART is a Runescape client. You can't use it for anything other than Runescape.

Search for APPA if you want to use a minimizable client for web browser.

E: Posted at the same as Dgby714….