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

SMART v6.9


BenLand100

2011-10-31 20:32:14

Version 6.9 was almost version 7.0, but then I decided I just couldn't live with myself if I skipped 6.9. This includes a few minor bug fixes, but adds support for middle mouse buttons. (You'll need a new smart.scar to make use of this, however. It's in the zip, committed to srl-opendev, and on my github). There's also the ability to set the maximum JVM memory directly via SmartSetMaxJVMMem(mb: integer). Call it before anything else, such as with SmartSetJVMPath.

Zipped Binaries:
http://bland.no-ip.org/files/SMARTv6.9.zip

Source (GIT Repos):
https://github.com/BenLand100/SMART

Changelog v6.9:
+Middle mouse button support included
+Double buffering fixes flickering/disappearing mouse dot/debug graphics
+Ability to set maximum JVM memory
+Potential bug in native graphics if using a larger window resolved.
+Efficiency improvements for debug graphics
+Fixed bug in disable graphics
+Removed -Xcheck:jni from JVM startup args

Coh3n

2011-10-31 20:33:48

Awesome! :)

What happens if the maximum memory set is reached?

BenLand100

2011-10-31 20:47:18

It crashes. That being said, the default for Java is 64mb. Jagex tries to ensure that the maximum is set to 256mb, but this is not always honored by the java plugin (ironically) if the JVM is already started. Due to the way I load the JVM, I'm really not sure what the maximum has been set to, but I've received some complaints about out of memory errors. I've set SMART to default to 256mb, but it can be set higher if need be.

Wanted

2011-10-31 21:04:40

Nice work

Useful functionality and bug fixes.

noidea

2011-10-31 21:14:19

Much appreciated!

Edit:

So people dont have to go hunting for smart.scar

{$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(c));
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[i], v[i], 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[i] := ReadINI('SMART', ts[i], 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}


BenLand100

2011-10-31 22:13:33

If you downloaded before now, you might have problems with SMART rendering to the screen. This is because I forgot how I did a few parts of SMART and overwrote some key functionality while solving the flicker. Everything should be fine now though.

Silent

2011-11-01 01:06:30

I'm getting this error after the latest update….

[Error] C:\Simba\Includes\srl/srl/misc/smart.scar(29:5): Unknown identifier 'SmartHoldMousePlus' at line 28
Compiling failed.

Literally didn't have it, and then it updated, re-ran a script and now I get this error. Suggestions?

kingarabian

2011-11-01 02:22:55

From: Silent SPY
I'm getting this error after the latest update….

[Error] C:\Simba\Includes\srl/srl/misc/smart.scar(29:5): Unknown identifier 'SmartHoldMousePlus' at line 28
Compiling failed.

Literally didn't have it, and then it updated, re-ran a script and now I get this error. Suggestions?


Do it manually. Download the Zip binaries and manually copy and paste.

chitin

2011-11-01 02:58:48

cool but does this fix the rs has been updated? as in does it refresh itself?

Silent

2011-11-01 03:03:47

From: kingarabian
Do it manually. Download the Zip binaries and manually copy and paste.


Link to Zip times out for me..

Flight

2011-11-01 03:04:27

From: chitin
cool but does this fix the rs has been updated? as in does it refresh itself?


I believe that idea's being tossed around right now, but at the moment, as far as I know, it won't refresh itself. But from the discussions we've had lately concerning this, I wouldn't be surprised if something like this is just around the corner.

chitin

2011-11-01 03:42:50

From: Silent SPY
Link to Zip times out for me..


2 lazy 2 reupload. try thru proxy.

From: Flight
I believe that idea's being tossed around right now, but at the moment, as far as I know, it won't refresh itself. But from the discussions we've had lately concerning this, I wouldn't be surprised if something like this is just around the corner.


ah. thanks.

Wizzup?

2011-11-01 07:47:56

Uploaded to plugins. Next time please give me some more time before changing the SMART include file, now everyone got compilations errors. :)

BenLand100

2011-11-01 08:43:54

Next time don't go to sleep when I say update plugins. OR make a script that does this automatically lool

anth_

2011-11-01 10:03:46

This is awesome, happy to have my friend the red dot back. Thanks xD

Jakkle

2011-11-01 11:47:50

Very nice update, thanks alot :)

Coh3n

2011-11-01 13:57:24

The RS has been updated isn't just when you're playing. If SMART is open for a while, it'll happen when I try to log back in. I'm going to try the same thing in the browser. I'll also mess around with restarting SMART when an update is detected.

Ben, is there anything I need to worry about (memory-wise) when restarting SMART?

BenLand100

2011-11-01 17:08:17

From: Coh3n
Ben, is there anything I need to worry about (memory-wise) when restarting SMART?

Jagex sort of prevents the client from being unloaded in the JVM memory, so there might be significant overhead after a few restarts.

Gu3st...

2011-11-01 17:15:49

From: BenLand100
Jagex sort of prevents the client from being unloaded in the JVM memory, so there might be significant overhead after a few restarts.
"sort of" meaning there is solutions to avoid it?

BenLand100

2011-11-01 18:35:14

From: Zyt3x
"sort of" meaning there is solutions to avoid it?

Sure, if you can find a way to forcibly kill the JVM without killing the process. (usually the jvm runs in it's own process and hence the usual way to kill it results in the process being destroyed)

Coh3n

2011-11-01 18:36:34

I wonder if you can use GetProcess in Simba then somehow kill the one you want.

BenLand100

2011-11-01 18:41:00

From: Coh3n
I wonder if you can use GetProcess in Simba then somehow kill the one you want.

I can tell you which one you want right now — Simba's process. I run the JVM in there so the image can be transfered / methods can be called without a ton of overhead. Hence you see the difficulty in killing the process ;)

Coh3n

2011-11-01 18:42:42

From: BenLand100
I can tell you which one you want right now — Simba's process. I run the JVM in there so the image can be transfered / methods can be called without a ton of overhead. Hence you see the difficulty in killing the process ;)
Lol well that really screws that idea. :p I guess we'll have to see how bad it gets after a few restarts. I'll also have to add the option to SRL so users can choose not to restart.

noidea

2011-11-01 21:00:53

From: Coh3n
Lol well that really screws that idea. :p I guess we'll have to see how bad it gets after a few restarts. I'll also have to add the option to SRL so users can choose not to restart.


Gone are the days of 300+ hour progress reports :(

Narcle

2011-11-01 21:40:50

From: noidea
Gone are the days of 300+ hour progress reports :(


BS. Where there's a will there's a way. Restart SMART via script etc. I was actually thinking of making a 1 month+ script using this method.

noidea

2011-11-01 22:39:45

From: Narcle
BS. Where there's a will there's a way. Restart SMART via script etc. I was actually thinking of making a 1 month+ script using this method.


breaks dont count :p
I mean gl if the JVM is running in Simba's process. You reckon itd be difficult to have it in a subprocess or another process then use interprocess communication? I mean I havent looked at the source, but having the JVM run inside Simba's process is what allows us to restart a script without it killing SMART everytime, right?

BenLand100

2011-11-01 22:52:10

From: noidea
breaks dont count :p
I mean gl if the JVM is running in Simba's process. You reckon itd be difficult to have it in a subprocess or another process then use interprocess communication? I mean I havent looked at the source, but having the JVM run inside Simba's process is what allows us to restart a script without it killing SMART everytime, right?

No, running inside simba's process is what allows the color data to be transfered without crippling your computer or making setup extremely complex. The only resource that will be wasted by restarting SMART is ram, not cpu power. It's not like one or two restarts is going to kill you.

lordsaturn

2011-11-02 23:39:43

I do believe that MML-Daemon was going to address this issue.

Wizzup?

2011-11-03 13:46:55

From: lordsaturn
I do believe that MML-Daemon was going to address this issue.


Yep, yep. But we haven't worked on that in some time. First is up a rework of some of Simba's core functionality (GUI-wise), which will probably ease the MML-Daemon work.

Main

2011-11-06 00:49:55

Thanks alot:P Free bump for easy access.

EDIT: I still can't get smart working. I am getting this error"Unknown identifier 'SmartHoldMousePlus' at line 28"

I forced an srl update, then replace all the plugin include simba plugin with the zip attached on top and still no work:(

KingKong

2011-11-07 00:13:48

Uh not sure what happend since the new update but the red dot in smart keeps showing up even though my debug is disabled. Also SMART takes longer to load for some reason.

PremiumBotter

2011-11-07 00:42:25

is this safe?

Main

2011-11-07 00:47:58

yes its safe, think of it as a rs client with mouse and keyboard.

Also, could any one help me solve this error?
"Unknown identifier 'SmartHoldMousePlus' at line 28""

Coh3n

2011-11-07 01:10:28

From: KingKong
Uh not sure what happend since the new update but the red dot in smart keeps showing up even though my debug is disabled. Also SMART takes longer to load for some reason.
I think it's the new client since the bot-buster update. Not sure what's up with the dot, though.

From: Main
yes its safe, think of it as a rs client with mouse and keyboard.

Also, could any one help me solve this error?
"Unknown identifier 'SmartHoldMousePlus' at line 28""
Looks like you still have 6.8.

KingKong

2011-11-07 03:42:23

From: Coh3n
I think it's the new client since the bot-buster update. Not sure what's up with the dot, though.


Is it just me or does everyone with SMART v6.9 has it(the mouse moving)?

Yago

2011-11-07 14:37:23

From: KingKong
Is it just me or does everyone with SMART v6.9 has it(the mouse moving)?


I get the same crap on disable graphics.

BenLand100

2011-11-07 15:28:53

Was the red dot not always there? I could have sworn it was. It was supposed to be.
E: I see what you mean. This could be a bit of a performance issue. I'll push a fix to git, and upload new binaries.

WT-Fakawi

2011-11-07 16:23:20

From: BenLand100
Was the red dot not always there? I could have sworn it was. It was supposed to be.
E: I see what you mean. This could be a bit of a performance issue. I'll push a fix to git, and upload new binaries.

I know 100% for certain the red dot has always been there.

n3ss3s

2011-11-07 17:40:34

The red dot should always be there (and has always been) if your smart is enabled…

Yago

2011-11-07 18:44:14

He released a fix for this…

KingKong

2011-11-07 19:48:17

From: n3ss3s
The red dot should always be there (and has always been) if your smart is enabled…


Yes it should, but if you read my post you wouldve know that the red dot shows up when the debug and graphics is disabled. Before v6.9 when debug was disabled all i had was a black screen on smart, and im 100% sure that the mouse movement was not drawn. This is what happens after a few mins of running my script.

Yago

2011-11-07 20:02:49

From: KingKong
Yes it should, but if you read my post you wouldve know that the red dot shows up when the debug and graphics is disabled. Before v6.9 when debug was disabled all i had was a black screen on smart, and im 100% sure that the mouse movement was not drawn. This is what happens after a few mins of running my script.


Ben gave wizzup a new version I believe. I'm currently using it and its fine no red dot error. The update should go through soon.

putonajonny

2011-11-12 19:11:06

Can I alert devs to this thread as I think it is a smart problem https://villavu.com/forum/showthread.php?t=67815

Harry

2011-11-12 19:18:35

That's not a SMART problem, that's just a problem with an old outdated script not working because it's outdated.

YoHoJo

2011-11-12 19:19:15

What do you suggest is a good SmartSetMaxJVMMem to set it at?
What if Runescape needs more memory that what we set it at, what would happen?
Thanks for all of the hard work Ben, hope to see more things in the future that help everything run smoothly and with less resources :D!

LemonHaze

2011-12-12 09:10:13

nice.

'Toxin

2011-12-12 11:18:12

Just a question… Should we not be looking at ways to improve smart and integrate Harry's SmartCrashFix in it, to avoid the numerous posts regarding just that, and future updates…etc?

Coh3n

2011-12-12 17:18:54

From: XxX Toxin XxX
Just a question… Should we not be looking at ways to improve smart and integrate Harry's SmartCrashFix in it, to avoid the numerous posts regarding just that, and future updates…etc?
It's already in SMART, it just doesn't work on Windows. Apparently it works fine on Linux. I guess there's no way to close the JVM (I think) in Windows without closing Simba itself.

Myke

2011-12-18 14:00:01

hey noob here

where do i extract the files to?
to make it work…

jakeyboy29

2011-12-18 14:02:29

nowhere, this should work automatically if you have srl/simba set up, head on over to the "how to auto" section for more help!

shebee

2011-12-18 14:07:54

Sometimes the performance of the client is so bad the scripts can't run properly.
I apologize if this has been reported already, I have to restart simba and usually my "main" runescape client for it to work smoothly again. It's not a hardware performance issue.

Myke

2011-12-18 14:08:21

i can get msi scripts to work
so i dont know if that means i have srl simba scripts set up …

any suggestions?

Harry

2011-12-18 14:27:29

From: shebee
Sometimes the performance of the client is so bad the scripts can't run properly.
I apologize if this has been reported already, I have to restart simba and usually my "main" runescape client for it to work smoothly again. It's not a hardware performance issue.

It's because Jagex's client is garbage. Try increasing the FPS bar on the right (make it higher).

From: Myke
i can get msi scripts to work
so i dont know if that means i have srl simba scripts set up …

any suggestions?

This has nothing to do with SMART, search more.

shebee

2011-12-18 14:29:22

From: Harry
It's because Jagex's client is garbage. Try increasing the FPS bar on the right (make it higher).


This has nothing to do with SMART, search more.


Increasing the bar doesn't help, I have to close my main rune client and restart simba. (I'm running multiple simbas from their own installs).

Myke

2011-12-18 14:42:12

it does have to do with smart im simply un sure how to set it up

i have it downloaded but is that it?
dont have to extract anywhere?

shebee

2011-12-18 14:47:14

From: Myke
it does have to do with smart im simply un sure how to set it up

i have it downloaded but is that it?
dont have to extract anywhere?


You extract the packed file's content into the plugins folder.

Haag

2012-01-01 16:10:56

wtf, download is down :o?

superuser

2012-01-01 16:43:09

From: BenLand100
I can tell you which one you want right now — Simba's process. I run the JVM in there so the image can be transfered / methods can be called without a ton of overhead. Hence you see the difficulty in killing the process ;)


Hmm.. how about separate process with IPC (shared memory / or MMF's)? Shouldn't be that much overhead if any.

BenLand100

2012-01-07 01:06:05

From: superuser
Hmm.. how about separate process with IPC (shared memory / or MMF's)? Shouldn't be that much overhead if any.

True, but it's terribly unsupported across various windows operating systems, poorly documented, and requires windows faggotry. But if you want a legitimate reason, the setup the end user has to do is much too complicated for the average idiot that wants to macro. There's also the problem that mouse movements / key presses would be noticeably bogged down (IPC is no where near real time, and then faux-real-time behavior would eat processing power).

hooga

2012-01-16 11:47:33

HI! Rs has updated as of now and SMART recieves a launch error any suggestions?

Shuttleu

2012-01-16 11:50:38

From: hooga
HI! Rs has updated as of now and SMART recieves a launch error any suggestions?


launch it in your browser first

~shut

Faboking

2012-01-21 11:44:34

How to fix the Client Token Failure that comes every 6 hours? I want to be able to bot for atleast 12 hours straight lol

Brandon

2012-01-21 12:06:47

From: Faboking
How to fix the Client Token Failure that comes every 6 hours? I want to be able to bot for atleast 12 hours straight lol


Leeching much? There is a tutorial on this.. ur posting on the wrong thread.. this has nothing to do with smart.. search button will show you the way.

immaboss69

2012-01-25 23:37:28

i am just setting up my simba bot, and trying to run this script
get this when try to compile summoning
Exception in Script: Unable to find file 'SRL/SRL/skill/summoning.simba' used from ''
Exception in Script: Unable to find file 'SRL/SRL/skill/summoning.simba' used from ''
[Error] (32:21): Unknown identifier 'GetMMLevels' at line 31
Compiling failed.
and this when try to compile nat rune bot
Exception in Script: Unable to find file 'SRL/SRL/skill/summoning.simba' used from ''

ryangux

2012-02-04 15:35:09

its taking a Very long time to download it starts out @ 7 seconds to complete and keeps increasing till it goes 1 hr+ is this normal?

PootisMann

2012-03-04 12:23:20

maybe its just me but it seems the zipped binaries download is down?

holyness

2012-03-13 00:12:42

is there an alternate download? as i cannot download form the link provided?

VanityDeity

2012-03-13 19:13:59

Yep, the zipped binaries link is down. Is there an alternate link, or can this be updated and fixed, please? Thanks!

BenLand100

2012-03-23 11:40:29

There has been a newer version available for days before you all posted, and further it's already included with Simba so there's no reason for you to manually download.