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

Smart


bulletq

2008-11-07 23:23:33

Okay
I am aware that there is a post on how to fix smart. could someone please read it and tell me here how I am supposed to do it? because I can't see it yet and i need it to work.

Ruroken

2008-11-07 23:44:28

From: bulletq
Okay
I am aware that there is a post on how to fix smart. could someone please read it and tell me here how I am supposed to do it? because I can't see it yet and i need it to work.


Hmm…

I'll repost it here. Hang tight.

Brain

2008-11-07 23:47:05

http://www.villavu.com/forum/showthread.php?t=36898?t=39721&highlight=nava2

Can you see this thread? It's in the public test corner, so I think you can?

eh, if not, here you go:


Direct quote from the how to fix smart thread:

From: nava2



PLEASE NOTE:
It has come to my attention that SMART v4 is not working correctly. You may try to use these procedures, they work for most. Try them either way SMART Cannot focus on the client. It does not work as it should. Sorry, but BenLand100 is working to correct this. You have been told.

Another note, do NOT use Visual Tool Tip to view SMART while it runs, it causes the canvas to become active, and in turn, activate/change. It will cause SMART to stop working and you will have to restart your script.

Just to help out…

Firstly, Replace SMART.scar with this:


function IsKeyDown(C:Char): Boolean;

begin
Result := SmartIsKeyDown(ord(c));
end;

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;

// SRL Development Team
procedure SmartSetupEx(worldnumber: integer; members, signed, superdetail: 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('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)));
end;

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;

To Load SMART, just switch SmartSetup in your script with SmartSetupEx using the new parameters, after replacing the SMART.scar with the one posted here and replacing the Embedded_SMART.dll with the one attached.

Usage:

In most scripts, you need to replace something like:


SmartSetup('world2', True, True, False);
wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);

If the script you are fixing, already uses SMARTSetupEx, then the easy fix it to just change the trues and falses to how you would like them.
Here are the Parameters: SMARTSetupEx(WorldNum : Integer; Members, Signed, SuperDetail: Boolean);
Here is an example of it being called.


SMARTSetupEx(2, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);

The File attached is the new Embedded_SMART.dll. Just unrar it and place it inside the PLUGINS folder in scar. You MUST delete the old one, or move it to a different folder. I take no credit for fixing the .dll, that was Benland. You must restart scar after replacing the Plugin!

Now, to use SMART.

1. Close all open SCAR and SMART windows
2. Reopen a SMART script
3. Run the script, as soon as SMART opens minimize it
4. DO NOT activate SMART until you are done macroing, or SCAR has said it is finished, it will cause it to mess up.


Enjoy.


Cheers!

Ruroken

2008-11-07 23:48:36

By Mr. nhstarter10

Ok I feel like a lot of people think smart isn't working or is currently down but I am here to re-assure you on that issue. Follow these steps in order to have a working SMART again.

1. Go here first: http://www.villavu.com/forum/showthread.php?t=36898
Do everything that thread says to do and make sure to do it right.


2. Now go to this thread (Most of it is covered in the first thread but just incase you didn't understand it the first time here is a more detailed tutorial)
http://www.srl-forums.com/forum/take...815#post492815

3. Finally you should have a working SMART, the only problem is that it will not work if you don't do one of two things. I will call these two things A and B.

A. Right after you hit run on a script with SMART enabled you need to wait for the SMART client to come up and then click minimize as soon as you possibly can, after you do that click minimize on the actual scar script also as soon as you possibly can. You may check your progress by re-opening the scar script as often as you want to look at the debug box and check out your proggies.

B. Instead of minimizing the SMART client you can literally click anywhere on your desktop when the client pops up. I usually click repeatedly on my desktop (anywhere not on the smart client) until I see that the top of the client is gray or inactive. You may now open up internet explorer or do whatever you want while still being able to look at what your rs character is doing, just make sure not to click on the game client.

bulletq

2008-11-08 02:35:28

wait.. is smart a program? I thought scar was the necessary program. I never get a smart pop up, and I have all the files necessary.

Also: could someone please give a link to the embedded file? I can't see the attachment.

thanks very much for that

Brain

2008-11-08 02:43:49

http://www.srl-forums.com/forum/attachment.php?attachmentid=14813&d=1224342674

There ya are, smart is a "function" of scar that lets you auto without taking over the computer, it's like a self contained runescape window, with it's own mouse. And not all the scripts have smart, only ones that use, but you can add smart to just about all scripts and it will work.

n3ss3s

2008-11-08 05:28:01

You can make any RuneScape script use SMART…

Come on! Someone minus repped me for helping, it's the blue button if you want to rep >.>

Tanks 4 telin me

dinries

2008-11-22 13:17:03

Brain, can you give link to that attached file in nava2's post, please?