SRL Archive - Archive

leelokhin - SRL Member Application Form


Lee Lok Hin

2008-05-19 08:02:00

<!– BEGIN TEMPLATE: formanswers –>
leelokhin - SRL Member Application Form
leelokhin

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?



Programming Knowledge
A little. And I mean Little bit of C++. Not much use to anyone though.

Other Communitys


How Long have You Played Runescape
3 years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

So, Hi. I have not much experience in programming; so Scar/Pascal is my first language I can use to do something with more than hello world. So. I learn pretty fast in the area of programming, and I am willing to learn.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

{                                                                                                                                                                                                                                                                                            {
.oPYo. o o 8 o .oPYo. 8
8 8 8 8 8 8 8
`Yooo. o8P o8 8 o8P .oPYo. odYo. 8 8oPYo. .oPYo. .oPYo. .oPYo. .oPYo.
`8 8 8 8 8 8 8 8' `8 8 8 8 8oooo8 8oooo8 Yb.. 8oooo8
8 8 8 8 8 8 8 8 8 8 8 8 8 8. 8. 'Yb. 8.
`YooP' 8 8 8 8 `YooP' 8 8 `YooP' 8 8 `Yooo' `Yooo' `YooP' `Yooo'
:.....:::..::....::..::.....:..::..:::.....:..:::..:.....::.....::.....::.....:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Instructions:
Start in Draynor village with at least 224 coins in the bank.
Coins Must be in first slot.

Const
SRLStatsID = ''; //Your Srl stats ID
SRLStatsPassword = ''; //Your Srl stats Password
Blindclick = false; //Use blindclicking when lost? *VERY limited help*
World = 153; //World where SMART loads
Signed = true; //Signed world?


}
program New;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/misc/DraynorColorFinder.scar}

const
SRLStatsID = '';
SRLStatsPassword = '';
Blindclick = false;
World = 153;
Signed = true;
TurnOffMusicAtStart = true;

var
cole,timerplayer:integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].Active := True;
end;

procedure Fixproggie;
begin
while getdebugline(getdebuglinecount - 1) <> '||==========================================================||' do
deletedebugline(getdebuglinecount - 1);
end;

procedure antiban;
begin
if not(loggedin) then Exit;
case random(10) of
2:ftwait(4);
3:begin
randommovement;
Makecompass('N');
setangle(true);
end;
4:randomrclick;
5:pickupmouse;
7:almostlogout;
end;
ReportVars[1]:=ReportVars[1]+1;
end;

function Draynorroadcolor:integer;
var
i:integer;
begin;
if not(loggedin) then Exit;
i:= Getcolor(MMCX - 3, MMCY);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX + 3, MMCY);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX, MMCY - 3);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX - 3, MMCY - 3);
if not(SimilarColors(i, 7369080, 35)) then
begin;
if not(FindDraynorRoadColor(i, MMX1, MMY1, MMX2, MMY2)) then
begin
Logout;
i:=-1;
Result:=-1;
Exit;
end;
end;
end;
end;
end;
if not(i=-1) then
result:=i;
end;

function WaterWalkEx(StartRadial, EndRadial: Integer; Radius, FFlagBreakOut: Integer; Xoff, Yoff, Xmod, Ymod: Integer): Boolean;
var
tpa: TPointArray;
i,c: Integer;
begin //Edited from srl includes
Result := False;
c:=findwatercolor;
if RadialWalkEx(tpa, MMCX, MMCY, c, 0, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x + Xoff, tpa[i].y + Yoff, Xmod, Ymod) then
begin
FFLag(FFlagBreakOut);
Result := True;
Break;
end;
end;

function Banker:integer;
var
RoadMP: TDTMPointDef;
RoadSP: array[0..2] of TDTMPointDef;
BankerDTM: TDTM;
done: boolean;
i:integer;

Begin
if not(loggedin) then Exit;
i:=draynorroadcolor;
RoadMP.x:=730;
RoadMP.y:=274;
RoadMP.areasize:=1;
RoadMP.areashape:=0;
RoadMP.color:=i;
if not(i<0) then
done:=true
else
RoadMP.color:=6842480;
if done then
RoadMP.tolerance:=0
else
RoadMP.tolerance:=25;

RoadSP[0].x:=720;
RoadSP[0].y:=281;
RoadSP[0].areasize:=1;
RoadSP[0].areashape:=0;
RoadSP[0].color:=195836;
RoadSP[0].tolerance:=30;

RoadSP[1].x:=720;
RoadSP[1].y:=276;
RoadSP[1].areasize:=1;
RoadSP[1].areashape:=0;
RoadSP[1].color:=195836;
RoadSP[1].tolerance:=30;

RoadSP[2].x:=719;
RoadSP[2].y:=269;
RoadSP[2].areasize:=1;
RoadSP[2].areashape:=0;
RoadSP[2].color:=195836;
RoadSP[2].tolerance:=30;

bankerdtm.MainPoint:=RoadMP;
bankerdtm.SubPoints:=RoadSP;
Result:=AddDTM(bankerdtm);
End;

function antirandom:boolean;
var
i:integer;

begin
if not(loggedin) then Exit;
result:=false;
if findfight then
begin
i:=random(10);
Mouse(MMCY,MMCX - 50 - i,0,0,true);
SleepAndMoveMouse(3000+random(2000));
Mouse(MMCY,MMCX +50 + i,0,0,true);
end;
if findnormalrandoms then
if not(loggedin) then
begin
Players[currentplayer].loc:='Found unsolvable random';
Players[currentplayer].active:=false;
logout;
result:=true;
exit;
end;
//SRLRandomsReport
FTwait(0+random(1));
end;

function RadialWalkTol(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod, tol: Integer): Boolean;
var
tpa: TPointArray; //Edited to fit in tol.
i: Integer;
begin
if not(loggedin) then Exit;
Result := False;
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, tol, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
wait(100);
if antirandom then exit;
FFlag(10);
Result := True;
Break;
end;
end;

function activeplayers:integer;
var
i,c:integer;
begin
for i:=0 to howmanyplayers - 1 do
begin
if players[i].active = true then
inc(c);
end;
result:=c;
end;

procedure bank;
var
i,c:integer;

begin
if not(loggedin) then Exit;
Makecompass('N');
setrun(false);
setangle(true);
if antirandom then exit;
if not(bankscreen) then
begin
case random(2) of
1:begin
if not(openbankfast('db')) then
openbankquiet('db');
end;
0:begin
if not(openbankquiet('db')) then
openbankfast('db');
end;
end;
while flag do
wait(10);
end;
if not(bankscreen) then
begin
Logout;
Players[currentplayer].loc:='Cannot find bank';
players[currentplayer].active:=false;
Exit;
end;
cole:=draynorroadcolor;
c:= DTMFromString('78DA63DCC3C8C0F08401055CDC21CDA003140' +
'62286FF40C0B811C87ACE800618914820BD1FC87A4540CD3120EB' +
'1901354781ACFB04D480DC7C87809A6D40D623FC6A005FCD114A');
players[currentplayer].integers[0]:= players[currentplayer].integers[0] + AmountDtm('inventory',c);
ReportVars[0]:=ReportVars[0]+AmountDtm('inventory',c);
if not(invempty) then
begin
for i:=1 to 28 do
begin
if Existsitem(i) then
begin
Mouseitem(i,false);
chooseoption('All');
wait(100+random(600));
end;
end;
end;
freedtm(c);
wait(100);
Fixbank;
if coinamount('bank') < 8 then
begin
Logout;
Players[currentplayer].loc:='Not enough money';
Players[currentplayer].Active:=false;
freedtm(c);
Exit;
end;
players[currentplayer].integers[1]:=coinamount('bank');
Mousebox(88,70,105,87,2);
if not(chooseoption('ithdraw X')) then
begin
Logout;
Players[currentplayer].loc:='Money not in first slot 2';
Players[currentplayer].Active:=false;
Exit;
end;
wait(600+random(200));
case random(2) of
1:typesend('224');
0:begin
i:=100+random(100);
typesend(inttostr(i));
Mousebox(88,70,105,87,2);
chooseoption('ithdraw X');
wait(600+random(200));
typesend(inttostr(224 - i));
end;
end;
closebank;
if antirandom then exit;
antiban;
Fixproggie;
end;

procedure walkback;
var
i,x,y,c,deck1,deck2,fx,fy:integer;
same:boolean;
begin
if not(loggedin) then Exit;
Setrun(true);
Makecompass('N');
Setangle(true);
deck1:=1392200;
deck2:=995643;
x:=679;
y:=72;
FindColorSpiralTolerance(x, y,deck1, MMX1, MMY1, MMX2, MMY2,30);
if antirandom then exit;
deck1:=getcolor(x,y);
x:=679;
y:=72;
FindColorSpiralTolerance(x, y,deck2, MMX1, MMY1, MMX2, MMY2,30);
deck2:=getcolor(x,y);
if deck1=deck2 then
same:=true;
repeat
if same = true then
begin
RadialWalk(deck1 , 15, 80, 65, 2, 2);
inc(i);
end else
begin
case random(2) of
0:begin
if antirandom then exit;
end;
1:begin
RadialWalk(deck1 , 15, 80, 65, 2, 2);
inc(i);
end;
2:begin
RadialWalk(deck2 , 15, 80, 65, 2, 2);
inc(i);
end;
end;
end;
until(i = 4)
same:=false;
x:=653;
y:=34;
if not(FindcolorspiralTolerance(x,y,2063715,MMX1,MMY1,MMX2,MMY2,20)) then
begin
symbolaccuracy:=0.8;
if findsymbol(x,y,'farming spot') then
begin
same:=true;
Mouse(x,y,5,5,true);
symbolaccuracy:=0.8;
end else
begin
Logout;
Players[currentplayer].loc:='Lost between draynor and port';
Players[currentplayer].Active:=false;
Exit;
end;
end;
if antirandom then exit;
if not(same = true) then
RadialWalk(getcolor(x,y) , 13, 39, 70, -2, -2);
c:= DTMFromString('78DA63FCCDC0C0D0CC8002129A95184480342' +
'310FF0702C61F40463DAA1ADFE030B81A1060FC05243A09A86164' +
'C4B00B5D0D00C80C0D39');
if not(DTMrotated(c,x,y,MMX1,MMY1,MMX2,MMY2)) then
begin
c:= DTMFromString('78DA63B4676260C8624001DEE9520C3A8C0C0' +
'C40C4F01F0818AD816AD250D5F8387B32C83140D48000A32BA639' +
'186A6C816AF2F1AB0100AA8B0A8D');
if not(DTMrotated(c,x,y,MMX1,MMY1,MMX2,MMY2)) then
begin
if blindclick then
begin
Mouse(644,40,5,5,true);
freedtm(c);
c:=0;
end else
begin
Logout;
Players[currentplayer].loc:='Lost between draynor and port';
Players[currentplayer].Active:=false;
freedtm(c);
Exit;
end;
end;
end;
if not(c=0) then
Mouse(x,y,3,3,true);
if antirandom then exit;
freedtm(c);
flag;
x:=680;
y:=114;
if FindcolorspiralTolerance(x,y,195836,680 - 100, 114 - 100, 680 + 100, 114 + 100,10) then
begin
RadialWalk(getcolor(x,y) , 88, 135, 70, -2, -2)
if antirandom then exit;
end else
begin
fx:=805;
fy:=222;
if findcolorspiraltolerance(fx,fy,15068649,680 - 70, 114 - 20, 680 + 20, 114 + 20,10) then
begin
c:=getcolor(fx - 2 - random(4),fy - 2 + random(4));
RadialWalk(c , 88, 135, 70, 0, -1);
end else
begin
Logout;
Players[currentplayer].loc:='Lost between wall 1';
Players[currentplayer].Active:=false;
Exit;
end;
end;
if FindDraynorRoadColor(i, MMX1, MMY1, MMX2, MMY2) then
RadialWalk(i , 156, 120, 60, 0, 1)
else
begin
FindcolorspiralTolerance(x,y,195836,680 - 100, 114 - 100, 680 + 100, 114 + 100,10);
RadialWalk(getcolor(x,y) , 156, 120, 60, -2, -2);
end;
FFlag(5);
c:= Banker;
if dtmrotated(c, x, y, mmx1,mmy1,mmx2,mmy2) then
Mouse(x,y,3,3,true)
else
begin
RadialWalk(i , 156, 120, 60, 0, 1); //Even if this one fails, it should still be close enough
end;
flag;
if antirandom then exit;
end;


procedure walktoshop;
var
i,x,y,c,shopfloor,tp,tp2:integer;
TPA:Tpointarray;
ATPA:T2dPointArray;
posshop:Tintegerarray;
roadet:Tpoint;

begin
if not(loggedin) then Exit;
Makecompass('N');
Setrun(true);
setangle(true);
cole:=draynorroadcolor;
if not(Linearwalk(draynorroadcolor,300, 70, 2, 2)) then
begin
Logout;
Players[currentplayer].loc:='Lost just ouside bank';
Players[currentplayer].Active:=false;
Exit;
end;
while flag do
begin
if antirandom then exit;
if not(flag) then
break;
end;
SymbolAccuracy:=0.7;
if findsymbol(x,y,'farming spot') then
begin;
Mouse(x + random(5), y + random(5), 0, 0,true);
symbolaccuracy:=0.8;
antiban;
wait(3300+random(1000));
FFlag(5+random(3));
end else
begin
Symbolaccuracy:=0.8;
x:=606;
y:=40;
if Findcolorspiraltolerance(x,y,2328410,606 - 15,40 - 15, 606, 40 ,50)then //Can't be bothered to calculate
begin
Mouse(x,y,2,2,true);
FFlag(5);
end else
begin
if not(RadialwalkTol(1796935,327, 300, 40, 2, 0, 30)) then
begin
if blindclick then
Mouse(597,37,5,5,true)
else
begin
Logout;
Players[currentplayer].loc:='Lost between draynor and port';
Players[currentplayer].Active:=false;
Exit;
end;
end;
end;
x:=0;
y:=0;
c:= DTMFromString('78DA63FCCDC0C0D0CC8002129A95184480342' +
'310FF0702C61F40463DAA1ADFE0300639A81A1060FC05243A09A8' +
'6164C4B00B5D0D00CDAC0D57');
if not(DTMrotated(c,x,y,MMX1, MMY1, MMX2, MMY2)) then
begin
c:= DTMFromString('78DA63B4676260C8624001DEE9520C46409A1' +
'188FF0301A335504D1AAA1A1F674F0639A81A106074C53407438D' +
'2D504D3E7E3500ACE40A92');
if not(DTMrotated(c,x,y,MMX1, MMY1, MMX2, MMY2)) then
begin
c:= DTMFromString('78DA638C676260F06340019105320C22409A1' +
'188FF0301632C504D10AA9A94A84CB81A10604C03AAF127A00664' +
'973B7E3500DF1C0B6E');
if not(DTMrotated(c,x,y,MMX1, MMY1, MMX2, MMY2)) then
begin
if blindclick then
begin
Mouse(591,127,8,8,true);
freedtm(c);
c:=0;
Flag;
end else
begin
Players[currentplayer].loc:='Lost Between Wall';
Logout;
Players[currentplayer].Active:=false;
freedtm(c);
Exit;
end;
end;
end;
end;
if not((c = 0) or (y = 0) or (x = 0))then
begin
freedtm(c);
Mouse(x,y,3,3,true);
wait(3000 + random(500));
Flag;
end else
begin
Players[currentplayer].loc:='Lost next to wall';
players[currentplayer].active:=false;
Logout;
Exit;
end;
if not(RadialWalkTol(cole, 197, 235, 72, 1, 1,3)) then
begin
Mouse(MMCX - 5,MMCY - 5, 4, 4, true);
if antirandom then exit;
if not(RadialWalkTol(cole, 197, 235, 72, 1, 1,3)) then
begin
Symbolaccuracy:=0.5;
if findsymbol(x,y,'bar') then
Mouse(x,y,2,2,true)
else
begin
if findsymbol(x,y,'farming spot') then
Mouse(x,y,2,2,true)
else
begin
Players[currentplayer].loc:='Lost near sarim';
players[currentplayer].active:=false;
Logout;
Exit;
end;
end;
end;
end;
end;
shopfloor:= DTMFromString('78DA634C65626098C980021202B4197418191' +
'88088E13F10300602D52C4455F311889519206A40803106A86611' +
'AA9AB7E86A82806AA6A0AAF9C3C686A2060032FD0C38');
repeat
if WaterWalkEx(290, 190,70,3,2,2,2,2) then
writeln('Walked once');
inc(i);
until(i = 7) or (DTMrotated(shopfloor,x,y,mmx1,mmy1,mmx2,mmy2))
fixproggie;
if i<>6 then
begin
freedtm(shopfloor);
Mouse(x,y,3,3,true);
FFlag(2);
Exit;
end;
for i:=0 to 15 do
begin
if DTMrotated(shopfloor,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
Mouse(x,y,2,2,true);
fflag(2+random(2));
freedtm(shopfloor);
break;
end else
begin
symbolaccuracy:=0.7;
if findsymbol(x,y,'Cookery Shop') then
begin
Mouse(x,y,2,2,true);
if antirandom then exit;
symbolaccuracy:=0.8;
end else
begin
symbolaccuracy:=0.8;
Makecompass('n');
findcolorstolerance(TPA,cole,MMx1,MMY1,MMX2,MMY2,3);
freedtm(shopfloor);
try
roadet:=MiddleTPA(TPA);
except
Players[currentplayer].loc:='Lost near sarim';
Players[currentplayer].Active:=false;
Logout;
Exit;
end;
Mouse(roadet.x,roadet.y,2,2,true);
flag;
SetArrayLength(TPA,1);
try
findcolorsspiraltolerance(x,y,TPA,5066066,MMx1,MMy1,MMx2,MMy2,25);
ATPA:=TPAtoATPA(TPA,5);
for i:=0 to high(ATPA) do
begin
for tp:=0 to high(ATPA[i]) do
inc(posshop[i]);
end;
c:=0
for tp2:=0 to high(posshop) do
begin
if posshop[i]>c then
c:=i;
end;
Roadet:=MiddleTPA(ATPA[c]);
Mouse(roadet.x,roadet.y,3,3,true);
except
Players[currentplayer].loc:='Lost near shop';
Players[currentplayer].Active:=false;
Logout;
Exit;
end;
end;
end;
end;
end;

Procedure Findshopkeeper;
var
x,y,i,cheese,infinite:integer;
man:boolean;

begin
if not(loggedin) then Exit;
Gametab(4);
wait(100+random(5));
Setangle(false);
Keydown(VK_UP);
wait(400+random(50));
keyup(VK_up);
antiban;
case random(3) of
1:Makecompass('341.565051177078');
2:Makecompass('37.8749836510982');
0:makecompass('190.304846468766');
end;
if antirandom then exit;
repeat
case random(10) of
1,3,5:antirandom;
2,4:antiban;
end;
if not(FindObjTPA(x, y, 14604766, 10, -1, 10, 10, 20, ['ydin','alk-to'])) then
FindObjTPA(x, y, 4800314, 10, -1, 10, 10, 20, ['ydin','alk-to']);
if not(x = 0)or(y = 0) then
begin
Mouse(x,y,1,1,false);
man:=chooseoption('rade');
wait(2000+random(500));
end else
begin
case random(4) of
1:Makecompass('341.565051177078');
0:makecompass('190.304846468766');
3:if antirandom then exit;
end;
end;
inc(i);
until((shopscreen) or (i = 10))
if i = 10 then
begin
Players[currentplayer].loc:='Lost near shop';
Players[currentplayer].Active:=false;
Logout;
Exit;
end;
ShopSwitchTab('main');
infinite := BitmapFromString(14, 7, 'beNqNjsEOgCAMQ+svAUclO' +
'xn4/w/CYskgetClhzV76wZUSyXHTwGd7DBQsqTRw06yGtuNam0Ai4' +
'3nEZyc4XcgGUWRZP8ihzA/gbZsD8v1pHOUkt36n3/rAh+lLXI=');
if not(FindBitmapToleranceIn(infinite,x,y,msx1, msy1, msx2, msy2,10)) then
begin
if(shopscreen)then
begin
shopswitchtab('main');
end else
begin
Players[currentplayer].loc:='Lost near shop';
freebitmap(infinite);
Players[currentplayer].Active:=false;
Logout;
Exit;
end;
end;
writeln('found bitmap infinite');
freebitmap(infinite);
cheese := DTMFromString('78DA63DCC3C8C0F08401055CDC21CDA003140' +
'62286FF40C0B811C87ACE800618914820BD1FC87A4540CD3120EB' +
'1901354781ACFB04D480DC7C87809A6D40D623FC6A005FCD114A');
if not(finddtm(cheese,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
Players[currentplayer].loc:='Lost near shop';
Players[currentplayer].Active:=false;
freedtm(cheese);
Logout;
Exit;
end;
Mouse(x,y,3,3,false);
wait(10+random(5));
chooseoption('uy X');
wait(100+random(5));
wait(600+random(200));
case random(3) of
1:typesend('28');
2:typesend('555');
0:typesend(inttostr(28 + random(50)));
end;
freedtm(cheese);
if antirandom then exit;
if random(4) = 2 then
antiban;
case random(3) of
1:closewindow;
end;
fixproggie;
end;

procedure depositcheese;
var
c,x,y:integer;

begin
if not(loggedin) then Exit;
Makecompass('N');
setrun(false);
setangle(true);
if antirandom then exit;
if not(bankscreen) then
begin
case random(2) of
1:begin
if not(openbankfast('db')) then
openbankquiet('db');
end;
0:begin
if not(openbankquiet('db')) then
openbankfast('db');
end;
end;
while flag do
wait(10);
end;
if not(bankscreen) then
begin
Logout;
Players[currentplayer].loc:='Cannot find bank';
players[currentplayer].active:=false;
Exit;
end;
c:= DTMFromString('78DA63DCC3C8C0F08401055CDC21CDA003140' +
'62286FF40C0B811C87ACE800618914820BD1FC87A4540CD3120EB' +
'1901354781ACFB04D480DC7C87809A6D40D623FC6A005FCD114A');
players[currentplayer].integers[0]:= players[currentplayer].integers[0] + AmountDtm('inventory',c);
ReportVars[0]:=ReportVars[0]+AmountDtm('inventory',c);
if finddtm(c,x,y,mix1,miy1,mix2,miy2) then
begin
mouse(x,y,5,5,false);
chooseoption('all');
end;
end;
procedure progressreport;
var
i:integer;
begin
cleardebug;
Writeln('||==========================================================||');
Writeln(Padr('|| Stilton Cheese for Srl 4',60)+'||');
Writeln('||==========================================================||');
writeln('||'+padr('We have been running for '+timerunning,58)+'||');
for i:=0 to howmanyplayers - 1 do
begin
if players[i].loc <> '' then
writeln(padr('||'+players[i].name+': '+players[i].loc,60));
end;
Writeln('||==========================================================||');
Writeln('||'+padr('Players:',58)+'||');
for i:=0 to howmanyplayers - 1 do
writeln('||'+(Padr(players[i].name+' |Cheese:'+inttostr(players[i].integers[0])+' |Money left $'+inttostr(players[i].integers[1])+' | Active?:'+booltostr(players[i].active),58)+'||'));
Writeln('||==========================================================||');
SRLRandomsReport;
end;

procedure setupscript;
begin
smartsetupex(world,false,signed);
while not SmartReady do wait(100);
SetTargetDC(SmartGetDC);
setupsrl;
scriptid:='860';
SRLID := SRLStatsID;
SRLPassword := SRLStatsPassword;
declareplayers;
cleardebug;
progressreport
activateclient;
loginplayer;
end;

begin
setupscript;
repeat
Marktime(timerplayer)
repeat
bank;
progressreport;
walktoshop;
findshopkeeper;
walkback;
depositcheese;
until (timefrommark(timerplayer)>15*60*60) or not(loggedin)
if (activeplayers = 0) then
break;
nextplayer(players[currentplayer].active);
progressreport;
until(activeplayers=0)
progressreport;
end.

Credits to Everybody who helped~

——————————————————
<!– END TEMPLATE: formanswers –>

Wizzup?

2008-05-19 09:49:51

Yes, looks nice.

Runescapian321

2008-05-19 15:47:22

Yes. It seems like you have all of the requirements - (D)DTMs, Radialwalk, failsafes, some cases…And you've been pretty active around the forums. GL :)

skilld u

2008-05-19 18:34:53

yes.

Macrosoft

2008-05-19 20:14:54

Yes! You seem to have all the requirements. Nice work.

itSchRis917

2008-05-20 21:57:19

Well, its a yes from me, but i'm just going to point out a few things..


function Draynorroadcolor:integer;
var
i:integer;
begin;
if not(loggedin) then Exit;
i:= Getcolor(MMCX - 3, MMCY);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX + 3, MMCY);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX, MMCY - 3);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX - 3, MMCY - 3);
if not(SimilarColors(i, 7369080, 35)) then
begin;
if not(FindDraynorRoadColor(i, MMX1, MMY1, MMX2, MMY2)) then
begin
Logout;
i:=-1;
Result:=-1;
Exit;
end;
end;
end;
end;
end;
if not(i=-1) then
result:=i;
end;

Autocoloring using RGB, HSL, and XYZ i think would work better here.. Cause with this, you need to be standing on the road originally for this to work.. Which i'm sure works perfectly in your script, but im just saying…

Correct me if i'm wrong but couldn't you have just used RadialWalkEx since it already uses tolerance instead of:

function RadialWalkTol(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod, tol: Integer): Boolean;
var
tpa: TPointArray; //Edited to fit in tol.
i: Integer;
begin
if not(loggedin) then Exit;
Result := False;
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, tol, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
wait(100);
if antirandom then exit;
FFlag(10);
Result := True;
Break;
end;
end;

There's nothing wrong with this next thing, but figured i'd point it out..

if same = true then

That can be written as:

if same then


You can replace this:

if not(x = 0)or(y = 0) then

With..

if x and y <> 0 then

But like i said, its a yes from me. Nice script.

NiCbaZ

2008-05-20 22:30:14

From: itschris917
Well, its a yes from me, but i'm just going to point out a few things..


function Draynorroadcolor:integer;
var
i:integer;
begin;
if not(loggedin) then Exit;
i:= Getcolor(MMCX - 3, MMCY);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX + 3, MMCY);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX, MMCY - 3);
if not(SimilarColors(i, 7369080, 35)) then
begin
i:= Getcolor(MMCX - 3, MMCY - 3);
if not(SimilarColors(i, 7369080, 35)) then
begin;
if not(FindDraynorRoadColor(i, MMX1, MMY1, MMX2, MMY2)) then
begin
Logout;
i:=-1;
Result:=-1;
Exit;
end;
end;
end;
end;
end;
if not(i=-1) then
result:=i;
end;

Autocoloring using RGB, HSL, and XYZ i think would work better here.. Cause with this, you need to be standing on the road originally for this to work.. Which i'm sure works perfectly in your script, but im just saying…

Correct me if i'm wrong but couldn't you have just used RadialWalkEx since it already uses tolerance instead of:

function RadialWalkTol(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod, tol: Integer): Boolean;
var
tpa: TPointArray; //Edited to fit in tol.
i: Integer;
begin
if not(loggedin) then Exit;
Result := False;
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, tol, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
wait(100);
if antirandom then exit;
FFlag(10);
Result := True;
Break;
end;
end;

There's nothing wrong with this next thing, but figured i'd point it out..

if same = true then

That can be written as:

if same then


You can replace this:

if not(x = 0)or(y = 0) then

With..

if x and y <> 0 then

But like i said, its a yes from me. Nice script.





or

if x and y xor 0 then

i think :confused:

anyway i voted yes

- good walking
- good failsafes
- DDTMs
- good attitude around forums

yess!

itSchRis917

2008-05-20 22:31:49

From: nicbaz
or

if x and y xor 0 then

i think :confused:

anyway i voted yes

- good walking
- good failsafes
- DDTMs
- good attitude around forums

yess!


I'm pretty sure xor sets x and y to zero…

EDIT: yeah it does..


program New;
{.include SRL\SRL.scar}

var
x, y, cx, cy: Integer;

procedure thing;
begin
x:= 5;
y:= 10;
cx := x xor x;
cy := y xor y;
Writeln(IntToStr(CX));
Writeln(IntToStr(CY));
end;

begin
SetupSRL;
thing;
end.

Lee Lok Hin

2008-05-21 01:18:25

itschris917

Thanks for the tips. I am still trying to get my head around HSL and XYZ, so that was the first method I could think of (That was still reliable)

And for the radialwalk, Yes, but Srl already has Radialwalk, so why not use it?

Thanks for the yesses everybody :p

Nava2

2008-05-21 18:40:31

if not(invempty) then
//Could be
If InvFull then

Also, try not to capitalize bolded words! :)

Yes.

Nava2

JuKKa

2008-05-21 19:08:55

From: Nava2
if not(invempty) then
//Could be
If InvFull then

Also, try not to capitalize bolded words! :)

Yes.

Nava2


No it couldnt..

and whats wrong on capitalizing bolded words? i do it all the time!

Nava2

2008-05-21 19:52:59

From: JuKKa
No it couldnt..

and whats wrong on capitalizing bolded words? i do it all the time!


Hmm why couldnt it be? Is not InvEmpty not saying the same as otherwise?

And not capitalizing bold words is in the SRL Standards if I'm not mistaken. Its not a must, but it does make it easier to read.

Nava2

NiCbaZ

2008-05-21 19:58:05

From: Nava2
Hmm why couldnt it be? Is not InvEmpty not saying the same as otherwise?
Nava2


beacuse if the inv is not full, doesn't mean it has to be empty :)

Nava2

2008-05-21 20:12:52

From: nicbaz
beacuse if the inv is not full, doesn't mean it has to be empty :)


Touche.

My point is invalid :P

Nava2

FreakyMonkey

2008-05-22 00:37:42

Yes, excellent use of DDTMS, mapwalking, good failsafes, and an overall feel that you really know your SRL functions ;). good job. Ill look through the script a bit more later. You probably coulda broken some of your procedures into smaller ones but its just personal opinion. i like making short concise procedures =)

nielsie95

2008-05-23 10:15:04

Nicbaz and Itschris:


program New;
begin
WriteLn(IntToStr(8 xor 100));
WriteLn(IntToStr(112 xor 100));
WriteLn(IntToStr(112 xor 0));

WriteLn(BoolToStr(1 and 2 <> 0));
WriteLn(BoolToStr((1 <> 0) and (1 <> 0)));
end.

You can not replace


if not(x = 0)or(y = 0) then

//with

if x and y <> 0 then

//nor

if x and y xor 0 then

But I think you should replace it with

if not ((x = 0) or (y = 0)) then

note the brackets, or you could replace it with

if (x <> 0) and (y <> 0) then


program New;
begin
Writeln(BoolToStr(not (1 = 0) or (0 = 0)));
Writeln(BoolToStr(not ((1 = 0) or (0 = 0))));
Writeln(BoolToStr((1 <> 0) and (0 <> 0)));
end.

Anyway, leelokhin:

Welcome, sir!