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

UPDATED Tutorial to add SMART to any script.


SeanJohn

2009-01-29 15:58:29

As this post was clearly outdated, I've decided to edit it in order to bring it up to standards since I've become active in the forums again.

SMART is a plug-in available for SCAR. It allows a Runescape client to be opened in a separate "private" window that uses a virtual mouse to perform the script's commands, freeing up your mouse and computer for regular use.

In order to use SMART or add it to any script of your choice, you first need to make sure you have the latest versions of SCAR and SRL.

Now for the actual code. At the top of your script, in your includes, before:

{.include/SRL/SRL.scar}

Add this line:

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

So that it now looks like this:

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

Now that that's done, we can move on to the next step. In order for the script to properly utilize SMART, and to customize the options, we need to add these a couple constants at the top of your script. Add these contstants:

const
SmartWorld := 15; // Which World/Server do you want to use?
SmartMembers := False; // Is it a Members World?
SmartSigned := True; // Signed/UnSigned Client?
SmartSuperDetail: False; // Use Super Detail?

These constants at the top of your script will allow you to quickly change settings without altering your Main loop, which we will address next.

Now to call SMART into use in your main loop add these lines:


Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;

Before the
SetupSRL;
line. So that the beginning of your main loop now looks like:



begin
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupSRL;
.....rest of the loop.....
end.

And that's it. Your script will now run in SMART. As a final note before you post any questions make sure that you have updated BOTH, SRL and SCAR. This will solve most problems and issues.

William

2009-02-01 17:01:10

works gr8 thanks :D

zencius1

2009-02-03 11:32:49

thx man.It work gr8 rep you+++:D

SeanJohn

2009-02-03 14:28:12

No problem guys, If you do encounter any problems though post them so I can try and solve them. Thanks,

Q Golden Q

2009-02-04 16:45:35

Thank you :) good to know this.

rontherhino

2009-02-06 15:14:13

easy enough

Choroid

2009-02-07 09:13:58

Failed when compiling
Line 10: [Error] (16224:11): Duplicate identifier 'RELEASEMOUSE' in script C:\Documents and Settings\****.HPPENT4DESKTOP\Desktop\SCAR 3.15\includes\SRL/SRL/Misc/smart.scar

Baked0420

2009-02-07 09:27:34

Choroid, you probably put

{.include SRL/SRL/misc/SMART.scar}

under

{.include srl/srl.scar}

make sure it looks like this

{.include SRL/SRL/misc/SMART.scar}
{.include srl/srl.scar}



SeanJohn: update your thread so it says this:


Smartsetupex(35, false, true, false); /first false is members, true is signed, last false is high detail
Settargetdc(smartgetdc);
repeat //you forgot
wait(100); //to add
until(SmartGetColor(253, 233)<>1118604); //these lines

ZephyrsFury

2009-02-07 09:47:33

From: Baked0420

SeanJohn: update your thread so it says this:


Smartsetupex(35, false, true, false); /first false is members, true is signed, last false is high detail
Settargetdc(smartgetdc);
repeat //you forgot
wait(100); //to add
until(SmartGetColor(253, 233)<>1118604); //these lines


Those lines aren't really necessarily, at least I've never had any trouble by not putting them in.

Choroid

2009-02-07 09:49:34

Thats exactly what i did…. Thank you It works now!:duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh:


From: Baked0420
Choroid, you probably put

{.include SRL/SRL/misc/SMART.scar}

under

{.include srl/srl.scar}

make sure it looks like this

{.include SRL/SRL/misc/SMART.scar}
{.include srl/srl.scar}



SeanJohn: update your thread so it says this:


Smartsetupex(35, false, true, false); /first false is members, true is signed, last false is high detail
Settargetdc(smartgetdc);
repeat //you forgot
wait(100); //to add
until(SmartGetColor(253, 233)<>1118604); //these lines

Heavenzeyez1

2009-02-07 10:24:30

Maybe add scar tags? :) [scar*] and [/scar*] without the *'s. :)
{.include SRL/SRL/misc/SMART.scar}
{.include srl/srl.scar}
SMARTSetUpEX(55, False, True, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
Nice guide though!
~Eerik~

Baked0420

2009-02-07 12:00:29

oh, well I always put them in Zeph, it doesn't hurt, and it might be needed for people with slow laggy computers. I don't know, I'm just guessing.

Adroit707

2009-02-22 17:10:47

Yay!!! it works!!! Thank You:D :D

pointer

2009-05-05 14:23:44

I've aded it, but it still moves my real mouse?
Any help would be appreciated :D
Thanks

Dark Arcana

2009-05-07 10:50:14

From: pointer
I've aded it, but it still moves my real mouse?
Any help would be appreciated :D
Thanks


Post the script you are using.

rpg711

2009-05-15 00:46:25

So… a few questions:
Most scripts will need this to be added, right?
Also:
SMARTSetUpEX(55, False, True, False);

This line, so is it the true/false after the world selection?

And, where would you add the two lines, inside the loop or outside? I couldn't infer that from you saying "Modify the main loop"

jacoby6000

2009-05-18 04:27:18

If you want my version just PM me and ill send it to you, i wont post it for uhhh… SRL reasons lol (keep in mind that stuff is removed, so it might not be as reliable)

magixboy

2009-05-23 09:43:55

:D

Hey, it works. And its simple. Thanks alot SeanJohn.

hopetobedabest

2009-06-03 07:02:26

her it is the set up but it said
Line 6: [Error] (16763:1): Unknown identifier 'smartsetupex' in script C:\Program Files\SCAR 3.20\Scripts\srl template.scar
in the debug box

her it is
              program test;
{.inclyde SRL/SRL/misc/SMART.scar}
{.include SRL\SRL.Scar}

begin
smartsetupex(55,false,true,false);
settargetDC(SMARTgetdc);
SetUpSRL; //Must have this as the first thing in the main loop
//Rest of script
end.
plz help

Da 0wner

2009-06-03 07:47:52

Update your SMART.

Babilo

2009-06-10 15:20:52

Works!
Thank you very much.

Da 0wner

2009-06-11 12:01:23

From: hopetobedabest
her it is the set up but it said
Line 6: [Error] (16763:1): Unknown identifier 'smartsetupex' in script C:\Program Files\SCAR 3.20\Scripts\srl template.scar
in the debug box

her it is
              program test;
{.inclyde SRL/SRL/misc/SMART.scar}
{.include SRL\SRL.Scar}

begin
smartsetupex(55,false,true,false);
settargetDC(SMARTgetdc);
SetUpSRL; //Must have this as the first thing in the main loop
//Rest of script
end.
plz help


{.inclyde SRL/SRL/misc/SMART.scar}

You spelled include wrong.

Change it to:
{.include SRL/SRL/misc/SMART.scar}

V3n

2009-06-15 05:19:36

EDIT: Nevermind, solved this issue :) Works well, Thanks!

samm

2009-06-16 06:34:53

Epic!
Thanks!!

lewiss

2009-06-16 06:47:32

great help, ill be a top dollar programmer in no time!
plehh :)

m4r1us

2009-06-16 18:03:18

From: Baked0420
Choroid, you probably put

{.include SRL/SRL/misc/SMART.scar}

under

{.include srl/srl.scar}

make sure it looks like this

{.include SRL/SRL/misc/SMART.scar}
{.include srl/srl.scar}



SeanJohn: update your thread so it says this:


Smartsetupex(35, false, true, false); /first false is members, true is signed, last false is high detail
Settargetdc(smartgetdc);
repeat //you forgot
wait(100); //to add
until(SmartGetColor(253, 233)<>1118604); //these lines


tyvm now i can use narcle fast fighter on my rune pure

kyleisntwild

2009-06-17 08:54:40

Thank you :)

I really wanted to know how to do this and it was the first thing I found when I checked the SMART section lol

I can't believe its so easy :)

nahiyan

2009-06-19 21:37:08

If people are having the problem that makes the real mouse move than the smart mouse, use SmartMoveMouse instead of MoveMouse etc.

Dextima

2009-06-20 00:46:11

Very helpful, but I for one don't use SMART very often. Either my screen saver or just battery saver always comes up; it never thinks I'm doing anything. :rolleyes:

Brandon W

2009-06-27 15:42:53

Does this seriously work? If it does, thank-you haha! I was running a Minotaur script before and it wasn't SMART, now it is :D I hope….

arash

2009-06-29 03:56:26

gracias, very good tutorial.

easyas4

2009-07-06 23:44:31

wow thank you so much! this works great!

added you to my siggy, just because

cycrosism

2009-07-15 10:37:05

why is it called updated when it is outdated

Coh3n

2009-07-15 22:44:41

From: cycrosism
why is it called updated when it is outdated


When this was posted, it was up to date.

SeanJohn

2009-07-19 01:12:49

Sorry I haven't been paying attention to my thread lately. I've been very busy with school and work. I'll try and update it here in the next couple weeks. Thanks guys for all the commets.

slackeru

2009-07-29 15:09:03

There is no setupSRL; :S

snowleader

2009-09-13 19:52:50

Thanks. I'll be using this pretty soon.

SeanJohn

2010-04-04 16:50:20

Just updated the tutorial on the first post. The tutorial is current as of 4/4/10. Be sure to check it and make sure your SMART usage is within standards.

g0tp0t

2010-04-10 21:12:18

From: SeanJohn

const
SmartWorld := 15; // Which World/Server do you want to use?
SmartMembers := False; // Is it a Members World?
SmartSigned := True; // Signed/UnSigned Client?
SmartSuperDetail: False; // Use Super Detail?


lol, 'smartsuperdetail: false' shoud be := false

i luffs yeww

2010-04-12 02:08:26

Actually, since they're constants, it should be SmartWorld = 15;, SmartMembers = False;, SmartSigned = True;, and SmartSuperDetail = False;.

deadlywario0

2010-04-27 14:33:01

Everything in Bold throws me errors,
Line 17: [Error] (146:12): is ('=') expected in script
(It doesn't like the ":"?)

const
[B]FishSpot3 := 10590612;
SmartWorld := 15; // Which World/Server do you want to use?
SmartMembers := False; // Is it a Members World?
SmartSigned := True; // Signed/UnSigned Client?
SmartSuperDetail := False; // Use Super Detail?

begin
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupSRL;[/B]

MylesMadness

2010-04-27 14:35:51

Consts dont use ":=" just "="

deadlywario0

2010-04-27 14:37:07

Nvm problem fixed :)
+Rep

Supertrent1

2012-01-29 01:15:46

How do I get the script to log in? My script is "over-powering" the log in so my script is searching for colors before is logs in. Help please :)

Here is my script
Program SuperPowerChopper;

{.include/SRL/SRL.simba}
{.include SRL/SRL/Misc/SMART.simba}
{.include SRL\SRL.simba}
{.Include SRL\SRL\Misc\Debug.simba}

const
SmartWorld = 15; // Which World/Server do you want to use?
SmartMembers = True; // Is it a Members World?
SmartSigned = True; // Signed/UnSigned Client?
SmartSuperDetail = False; // Use Super Detail?
Version = '1.0 Alpha';
NumbOfPlayers = 1;
StartPlayer = 0;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ' '; //Username
Players[0].Pass := ' '; //Password
Players[0].Nick := ' '; //4 character Nickname for you character
Players[0].Active := True;
Players[0].Pin := ''; //Pin, leave blank if none
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Woodcutting', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

function TreeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 0.17);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 3162183, MMX1, MMY1, MMX2, MMY2, 3);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 3.03) and (X <= 7.51) and (Y >= 3.21) and (Y <= 7.94) and (Z >= 2.19) and (Z <= 5.16) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Function ChopDown:Boolean;
Var
x, y , PlusOne, TreeCounter: Integer;

Begin;
PlusOne:= InvCount + 1
x:= MSCX;
y:= MSCY;
If FindObjTPA(x, y, TreeColor, 3, 1, 15, 80, 600, ['Chop']) Then
Begin
StatsGuise('Horay, We found a tree');
Case Random(2) Of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
Wait(100+Random(100));
WaitOption('Chop', 500);
End;

end;

Flag;

MarkTime(TreeCounter);

Repeat;
FindNormalRandoms;
StatsGuise('Antiban, Please wait!');
Antiban;
wait(1000);
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 3500)


End;

End;
Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

Begin

LogDTM := DTMFromString('mwQAAAHic42RgYHBmYmBwBGIfIA4EYicgNgZiEyA2B2IvIH4KVHcbiB8D8Ssgfg/Ebxgg4neB+CYQe5rJA0kmDOxmKAqmbXSlGAiB/0DMSASGAwDH/w0r');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
StatsGuise('Dropping All Your Logs!');
For I:=0 To 27 Do
Begin
FindNormalRandoms;
SlotBox:=InvBox(LogPattern[I]);
If FindDtm(LogDTM, x, y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I], MOUSE_RIGHT);
ChooseOption('Drop');
End;
End;

FreeDTM(LogDTM);


End;





Begin
DeclarePlayers;
Smart_Server := SmartWorld;
Smart_Members := SmartMembers;
Smart_Signed := SmartSigned;
Smart_SuperDetail := SmartSuperDetail;
SetupSRL;
repeat
ChopDown;
if InvFull Then
DropLogs;
Until (false);

end.

It starts SMART but it doesn't log in. It sits there spamming "Failed to find the color, no result." as in this line

FindColorsSpiralTolerance(MMCX, MMCY, arP, 3162183, MMX1, MMY1, MMX2, MMY2, 3);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');

Because it is starting my script before it logs in, in SMART.