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

Embedded SMART Release 4 & Smart.scar


BenLand100

2007-08-27 00:25:10

I'm just going to release one whenever I come up with something worth releasing. This version should have the speed and frame rate set in stone. Less lag, more compatibility, plus removal of any 'update pending' whitish areas being sent to 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
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
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;

Dark_Sniper

2007-08-27 00:55:27

woot i will test and see if works then i will test all night.

Smartzkid

2007-08-27 12:23:44

Workin' fine for me

Ejjman

2007-08-27 14:06:17

Tarajunky's LAME v0.60
-> Took a little longer to find the mage than it did on previous versions (May be script, I am not sure.)
-> The screen started freaking out and going in circles, I don't know. (Once again, possibly a script problem.)


I'll give it one more test.

EDIT: I cannot tell if its the script or SMART (I'm leaning towards script problems) But ya, the mouse seems to be working.

Dark_Sniper

2007-08-27 16:10:52

got it to work for 4-6 hours using VEM … not minimized…


but ya.


the only thing that stopped it is i think scar keeps loosing focus after so many hours…. it fails to find gametabs …. and just sits there :p (in smart and reg client so who knows :P.)

shaunthasheep

2007-08-28 14:17:50

^even with SmartSetTarget?

Sumilion

2007-08-28 14:51:14

Found either a bug in scar, smart or me. When i do SaveScreenShot it will also show the red dot that represents the mouse … ?

BenLand100

2007-08-28 15:44:13

From: Sumilion
Found either a bug in scar, smart or me. When i do SaveScreenShot it will also show the red dot that represents the mouse … ?

Try a CopyCanvas, see if the dot is still there. If it is then you've got SMART setup wrong, if it isn't then its a scar bug…

Sumilion

2007-08-28 18:51:36

Weird :) CopyCanvas showed no red dot. It seems like when walking it takes a long time before it clicks again. Meaning, it will click somewhere, wait till its there, then wait an extra time, which is the odd thing, then after 3-4? seconds it will continue…

Doesnt seem to happen in regular RS client..

Ejjman

2007-08-28 19:53:09

I'll have to agree with you on that, Sumilion, which is causing LAME to give me some crap. Also, I always thought MouseSpeed := Lowernumber = Faster, and MouseSpeed := Highernumer = Slower, but apparently its changed or something? Cuz 4 was really really slow, and 15 extremely fast….I dunno :S lol.

BenLand100

2007-08-28 21:50:52

From: Ejjman1
I'll have to agree with you on that, Sumilion, which is causing LAME to give me some crap. Also, I always thought MouseSpeed := Lowernumber = Faster, and MouseSpeed := Highernumer = Slower, but apparently its changed or something? Cuz 4 was really really slow, and 15 extremely fast….I dunno :S lol.

Yea, mousespeed is backwards (or rightwards?) from what it used to be.

Sumilion

2007-08-29 03:23:47

From: BenLand100
Yea, mousespeed is backwards (or rightwards?) from what it used to be.


Yes but do you have an answer to both our problems ? :) I cant make 2 loads with 1 player like this … it always times out my script (cause i build it that way)

The Claw

2007-08-31 12:45:34

so this is what solar was talking about lol

ive got it working, but it doesnt press enter when auto responding, and it messes up badly when i minimize it, for it to work it has to be fully in view. these have probably been answered elsewhere, so tomorrow ill read around a bit and try to get it working better (its 3 am nearly) but the silent mouse is great.

YoHoJo

2007-08-31 20:38:21

DW claw.
No scripts which use compass (almost all -.-) work yet
Compass functions are built into scar so ben cant make a 'smartcompass' until freddy shows him the code.

Smartzkid

2007-08-31 20:45:10

Claw, you have to make all Chr(13)'s Chr(10)'s, I believe. Ben says that 13 isn't a true Unix (by which java is greatly influenced) enter, it's a carriage return.

Boreas

2007-08-31 21:16:40

From: The Claw
so this is what solar was talking about lol


Haha kinda sorta in the ballpark.

The Claw

2007-08-31 21:51:57

ah ok, thanks guys. the enter key is working now, but still when i minimise the window the script goes haywire. nvm i'll wait :)

Wizzup?

2007-09-01 05:03:41

From: YoHoJo
DW claw.
No scripts which use compass (almost all -.-) work yet
Compass functions are built into scar so ben cant make a 'smartcompass' until freddy shows him the code.


Let me get you a compass function.. ;)

{*******************************************************************************
function FindCompassAngle: Integer;
By: Tarajunky
Description: returns degrees clockwise compass is rotated
returns -1 if compass angle not found
*******************************************************************************}

function FindCompassAngle2: integer; // By Tarajunky
var
i, Radius, X1, Y1, x, y: Integer;
begin
Radius:=7;
repeat
for i := 1 to 360 do
begin
x1 := Round(Radius * Sine(i)) + 561;
y1 := Round(-Radius * Cose(i)) + 20;
if i>180 then x1:=x1-1;
if (FindColor(x, y, 723587, X1, Y1, X1+1, Y1+1)) then
begin
Result:=360-i;
Exit;
end;
end;
Radius := Radius - 1;
until Radius <= 2;
WriteLn(IntToStr(result));
Writeln('Error detecting Compass Angle.');
Result:=-1;
end;