SRL Archive - S.M.A.R.T. Questions and Answers.

Is smart working?


brad734

2009-05-04 09:26:38

Solved! Ty hobbit

Capricorn

2009-05-04 10:45:45

SMART works fine for me.

brad734

2009-05-04 11:03:54

how dod you get smart to work?

i used to use it then rs updated and ben never fixed. so i quit. i come back 6 months later i hear its fixed. wut must i do to fix my out of date smart files :S

Capricorn

2009-05-04 11:24:23

Have you got SMART 4.4?

Dark Arcana

2009-05-04 12:15:37

If you don't have SMART4.4 you can get it here, if it that doesn't work do you mind posting the script you are using.

brad734

2009-05-04 21:55:43

ok i got smart v4.4

still get error "Error starting SMART, Please check word prefex."

heres the script: (could u tell me how 2 fix smart working on this one and any other script i may have).

I use scar 3.15b but i have 3.20b if thats what i need to use.

program willows;

{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}

const
treecolor=5341817;
entcolor=514778;
symbolcolor=10089719;

var
x, y, dud, time, elapse, loads, logs, lastcheck, axe, willowdtm, h ,m ,s : integer;
smartworld : string;

procedure declareplayers;
begin
howmanyplayers:=1; //how many players
numberofplayers(howmanyplayers);


players[0].name:=''; //your runescape name
players[0].pass:=''; //your runescape pass
players[0].nick:='H00d '; //a few letters from your name (use correct capitals)
players[0].active:=true;
players[0].worked:=0;

{players[1].name:=''; //your runescape name
players[1].pass:=''; //your runescape pass
players[1].nick:='S P L'; //a few letters from your name (use correct capitals)
players[1].active:=true;
players[1].worked:=1;

players[2].name:=''; //your runescape name
players[2].pass:=''; //your runescape pass
players[2].nick:='Str'; //a few letters from your name (use correct capitals)
players[2].active:=true;
players[2].worked:=2;}
end;

procedure init;
begin
smartworld:='world21'; //the world you want to use
willowdtm := DTMFromString('78DA8DD2C10A40501404D0F7FC92246527144' +
'A3E9F90C80A4FFEC0D8C9C2CC5DDCBB398B5B33D6F78C59CD67EC' +
'6BE306300B3121CC484C04D31393082685E988C9615A624AC1543' +
'0836026C1CCC434421635CC4E4C01731093C138218B939818E612' +
'727742C7D8CF4F57B77F7303BE121766');
end;

procedure randoms;
begin
if gettimerunning>lastcheck then
begin
findnormalrandoms;
lastcheck:=gettimerunning+10000+random(2000);
end else findtalk;
if findfight=true then runaway('E',true,1,5000+random(1000));
end;

procedure bank;
begin
if loggedin=false then exit;
randoms;
findnormalrandoms;
case random(10) of
0: begin hoverskill('woodcutting',false); end;
1: begin gametab(1+random(13)); wait(800+random(500)); gametab(4) end;
end;
makecompass('n');
if findcolortolerance(x,y,symbolcolor,MMX1,MMY1,MMX2,MMY2,40) then
begin
mouse(x-3,y-3,2,2,true);
time:=gettimerunning+11000+random(2000);
repeat
wait(100);
randoms;
until((gettimerunning>time) or (flagpresent=false))
randoms;
findnormalrandoms;
repeat
if openbankfast('db')=false then openbank('db',false,false);
wait(100);
randoms;
until((bankscreen=true) or (loggedin=false))
if bankscreen=true then
begin
logs:=logs+countitems(willowdtm,'dtm',[0,0]);
deposit(2,28,true);
wait(100+random(100));
if (invempty=false) and (axe=0) then
begin
mmouse(570,215,20,25);
wait(100+random(100));
if pos('axe',getuptext)=0 then
begin
deposit(1,1,true);
wait(100+random(100));
end else axe:=1;
end;
closebank;
loads:=loads+1;
converttime(gettimerunning,h,m,s);
writeln('#### progress ####');
writeln('#### time: ' + inttostr(h) + ':' + inttostr(m) + ':' + inttostr(s));
writeln('#### loads: ' + inttostr(loads));
writeln('#### total logs: ' + inttostr(logs));
writeln('##################');
end;
end;
wait(100+random(100));
end;

procedure omfg_ent;
begin
makecompass('n');
mouse(MMCX-10,MMCY-10,20,20,true);
x:=MSCX;
y:=MSCY;
wait(300+random(100));
if findcolortolerance(x,y,symbolcolor,MMX1,MMY1,MMX2,MMY2,40) then
begin
mouse(x-40,y+40,10,10,true);
time:=gettimerunning+8000+random(2000);
repeat
wait(100);
randoms;
until((gettimerunning>time) or (flagpresent=false))
randoms;
end;
end;

procedure chop;
begin
makecompass('n');
if findcolortolerance(x,y,symbolcolor,MMX1,MMY1,MMX2,MMY2,40) then
begin
mouse(x-40,y+40,10,10,true);
time:=gettimerunning+11000+random(2000);
repeat
wait(100);
randoms;
until((gettimerunning>time) or (flagpresent=false))
randoms;
end;
x:=MSCX;
y:=MSCY;
repeat
randoms;
wait(100);
if findobjtpa(x,y,treecolor,20,-1,50,50,40,['Chop down Willow']) then
begin
mmouse(x,y,0,0);
wait(100+random(100));
if findcolortolerance(dud,dud,entcolor,80,10,130,20,40)=false then
begin
mouse(x,y,2,2,true);
wait(100+random(100));
if flagpresent=true then
begin
time:=gettimerunning+4000+random(1000);
repeat
wait(100);
randoms;
until((flagpresent=false) or (gettimerunning>time))
wait(300+random(200));
end else
begin
wait(100);
time:=gettimerunning+20000+random(5000);
repeat
wait(100);
randoms;
until((startswith('Chop',getuptext)=false) or (invfull=true) or (findcolortolerance(dud,dud,entcolor,80,10,130,20,40)=true) or (gettimerunning>time))
if findcolortolerance(dud,dud,entcolor,80,10,130,20,40)=true then omfg_ent;
end;
end else omfg_ent;
end else
begin
makecompass('n');
if findcolortolerance(x,y,symbolcolor,MMX1,MMY1,MMX2,MMY2,40) then
begin
mouse(x-40,y+40,10,10,true);
time:=gettimerunning+8000+random(2000);
repeat
wait(100);
randoms;
until((gettimerunning>time) or (flagpresent=false))
randoms;
end;
end;
until((loggedin=false) or (invfull=true))
wait(100+random(100));
end;

begin
cleardebug;
init;
smartsetup(smartworld,false,true,false);
settargetdc(smartgetdc);
setupsrl;
lampskill:='woodcutting';
declareplayers;
currentplayer:=0;
loads:=0;
logs:=0;
lastcheck:=0;
axe:=0;
logout;
closefile(rewritefile('C:\WINDOWS\.jagex_cache_32\uid.dat',true));
loginplayer;
repeat
setangle(true);
elapse:=gettimerunning+2700000+random(1800000);
if invfull=true then bank;
repeat
chop;
if invfull=true then bank;
until((gettimerunning>elapse) or (loggedin=false))
logout;
axe:=0;
currentplayer:=currentplayer+1;
if currentplayer>=howmanyplayers then currentplayer:=0;
if (gettimerunning>players[currentplayer].worked) and (players[currentplayer].active=true) then
begin
closefile(rewritefile('C:\WINDOWS\.jagex_cache_32\uid.dat',true));
loginplayer;
players[currentplayer].worked:=gettimerunning+3600000+random(1800000);
end;
until(false)
end.

brad734

2009-05-04 22:30:57

ok i figured out wut i did wrong with v4.4

but now i get this error

Line 85: [Error] (88:46): Invalid number of parameters in script C:\Program Files\SCAR 3.15\includes\srl/srl/misc/smart.scar

heres my smart.scar

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;

procedure SmartSetupEx(worldnumber: integer; safe, 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(prefix, safe, signed, superDetail);
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;

Capricorn

2009-05-05 22:31:33

Give us the line in your script that you call SMART with. It should look like

SmartSetupEx(worldnumber: integer; safe, signed, superdetail: boolean);

Where worldnumber is a integer of the world number (1) and the rest boolean, safe being members, signed being if you want unsigned or singed java and superdetail if you want HD. Heres a example

SmartSetupEx(150, false, true, false);

Edit: Atleast I think its that procedure your having troubles with, give us a copy of the line that the error is.

brad734

2009-05-06 11:17:52

FIXED thanks to HOBBIT. uploaded his files for me 2 copy into mine.

BIG THANKS!