brad734
2009-05-04 09:26:38
Solved! Ty hobbit
2009-05-04 09:26:38
2009-05-04 10:45:45
2009-05-04 11:03:54
2009-05-04 11:24:23
2009-05-04 12:15:37
2009-05-04 21:55:43
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.
2009-05-04 22:30:57
Line 85: [Error] (88:46): Invalid number of parameters in script C:\Program Files\SCAR 3.15\includes\srl/srl/misc/smart.scarfunction 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;
2009-05-05 22:31:33
2009-05-06 11:17:52