SRL Archive - FAQ

Will Simba work with reflection


JPHamlett

2010-02-04 20:42:22

As many of you may or may not know that I am working on reflection, so here's my question if I copy the reflection include to simbas include and smart will it work or is i not set up for that


the reason being that scar keeps crashing for me and its annoying me

senrath

2010-02-04 20:56:02

Some of the commands might be different, but otherwise it should work. I think.

JPHamlett

2010-02-04 21:02:49

lol i cant even get it to include a file lol is it still


{.include blah/balh}


?

mormonman

2010-02-04 21:13:42

From: senrath
Some of the commands might be different, but otherwise it should work. I think.


Not many of them at all… most commands that reflection uses are from smart.

NiCbaZ

2010-02-05 00:48:01

From: J_Pizzle
As many of you may or may not know that I am working on reflection, so here's my question if I copy the reflection include to simbas include and smart will it work or is i not set up for that


the reason being that scar keeps crashing for me and its annoying me


Yes, i am sure SMART does work for SIMBA, although you must include it in a different way.

Since SCAR has nothing to do with reflection its all the SMART plugin, i am sure reflection will be working.

Now since SMART is open source, it is being debated weather they will include SMART as an extra part of simbe ie. inside the program and not in a plugin form afaik.

As i asaid before i not 100% sure on what the command to include plugin are, just hop onto IRC and ask their, or look at the source of the program.

JPHamlett

2010-02-05 07:24:08

From: NiCbaZ
Yes, i am sure SMART does work for SIMBA, although you must include it in a different way.

Since SCAR has nothing to do with reflection its all the SMART plugin, i am sure reflection will be working.

Now since SMART is open source, it is being debated weather they will include SMART as an extra part of simbe ie. inside the program and not in a plugin form afaik.

As i asaid before i not 100% sure on what the command to include plugin are, just hop onto IRC and ask their, or look at the source of the program.


how do i look at the source?

Naike

2010-02-05 09:39:26


{.LoadDLL libsmart} - To include smart.

Const
SMARTWorld = 19;

{------------------------------}
{-- Makes S.M.A.R.T work.. --}
{------------------------------}
{-- SMART functions --}
{------------------------------}
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: Integer);
begin
If (left = mouse_Right) then
SmartHoldMouse(x, y, False)
else
SmartHoldMouse(x, y, True);
end;

procedure ReleaseMouse(x, y: Integer; left: Integer);
begin
If (left = mouse_Right) then
SmartReleaseMouse(x, y, False)
else
SmartReleaseMouse(x, y, True);
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;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

Procedure RunSMART;
var
iTime: Integer;
begin
SmartSetup('http://world' + ToStr(SMARTWorld) + '.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503);
SetTargetArray(SmartImageArray, 765,503);

iTime := GetSystemTime;
Repeat
Wait(200);
If (GetColor(393, 418) = 13158)then
begin
Writeln('S.M.A.R.T launched.');
Exit;
end;
Until((GetSystemTime - iTime) > 5000);

Writeln('S.M.A.R.T failed launching.');
TerminateScript;
end;

{------------------------------}
{-- End of SMART functions --}
{------------------------------}


^ use RunSMART ;)

and yes, Reflection will work.

JPHamlett

2010-02-05 16:35:53

doesn;t work get a unknown identifier "smartkeydown"

mastaraymond

2010-02-05 17:09:50

From: J_Pizzle
doesn;t work get a unknown identifier "smartkeydown"

Ofcourse, you have to specify the Plugin directory. (somewhere in settings)

Wizzup?

2010-02-05 17:12:28

From: J_Pizzle
doesn;t work get a unknown identifier "smartkeydown"


You don't have the SMART lib. Download the Simba sources and you'll have it.

mastaraymond

2010-02-05 17:16:51

From: Wizzup?
You don't have the SMART lib. Download the Simba sources and you'll have it.

Ninja'd

JPHamlett

2010-02-05 18:01:39

can anyone tell me why it crashed this is the script



number := (SmartGetFieldInt (512 ,xmultiplyer));
writeln(inttostr(number));

that jsut the only part of the script that isn't associated with smart and i know it can be 1 line but that was after i ahd something that needed two lines and i was too lazy to change for 1 line


heres the debug box






i ahd my hooks set as a constint btw
edit: oh and scmart did start up just fine but it was saying it didn't so i got rid of terminatescript;

Wizzup?

2010-02-05 18:13:29

This is not a Simba problem - this is a Reflection problem. You probably don't pass the correct field…? IDK.

Method

2010-02-05 21:03:10

I've told you over and over to stop passing bad arguments for the first parameter of the SmartGet* functions. Either learn what you need to put there or don't use them, please.