SRL Archive - Archive

sandos1234 - SRL Member Application Form


Magiic

2008-09-14 11:20:09

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

What is the meaning to life?


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


Programming Knowledge
small amount of pascal

Other Communitys
scythe

How Long have You Played Runescape
2 years

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

well ive been knuckles down studying scar since i joined because i really liked srl so i wanted to contribute started learning speedily although it took a while to grasp some concepts i kept trying lol it got easier with more attempts :)

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

{start in bank top banker have iron and coal visible
reccomended for at least 2 players}
{setup lines 12-21 and 29-53}
//credits to narcle
//for his sig and the base of the sleep and breaks


Program alkharadsmelter;
{.include srl/srl.scar}
{.include srl/srl/skill/smithing.scar}
Var
i, load, sleepsdone, sleeps, breaks, breaksdone, done, x, smith, y, coalbnk, steelbar:integer;
Const
MySrlId=('');
MySrlPassword=('');
//Sleeping / Breaking options:
TakeBreaks = true;//Take 5-15 min breaks every 1-3 hours?
TakeSleeps = true;//Take couple hour sleeps?
//randoms setup
LampLevel= 'smithing'; //Set the skill you want a lamp to do.
//dont touch
scriptname='al kharad smelter';//don't touch
version='1.0';//don't touch

Procedure declareplayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';//user
Players[0].Pass := '';//pass
Players[0].Nick := '';//3-4 letters of name in order except first
Players[0].pin := '0000';//pin
Players[0].Active := True;//use this player?
players[0].integers[0]:=10;//loads

{Players[1].Name := 'username';//user
Players[1].Pass := 'password';//pass
Players[1].Nick := 'sern';//3-4 letters of name in order except first
Players[1].pin := '0000'//pin
Players[1].Active := True;//use this player?
players[1].integers[0]:=10;//loads
players[1].booleans[0]:=true;//cannonballs

Players[2].Name := 'username';//user
Players[2].Pass := 'password';//pass
Players[2].Nick := 'sern';//3-4 letters of name in order except first
Players[2].pin := '0000'//pin
Players[2].Active := True;//use this player?
players[2].integers[0]:=10;//loads
players[0].booleans[0]:=true;//cannonballs}
End;

Procedure proggy;
Begin
writeln(scriptname+'v'+version)
writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~') ;
writeln('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.');
writeln(('Current Player: ' + Players[CurrentPlayer].Nick));
writeln('script ran for '+timerunning);
writeln('did '+(inttostr(I))+'loads');
srlrandomsreport;
End;

Procedure loadbitmap2;
Begin
coalbnk := BitmapFromString(84, 64, 'beNrt0c0KAVEAhuHjIiwsRDLN' +
'ggVmyPhJRDIlpUSIkBKllFJWsnLZvjo1Gzdg6n06TV9n954xplXOL' +
'YaVVejvJ/XjtHFddvTVNibheZ6+mUyyVMpW/bxOoZDWTcMv2qN9W3' +
'efh8H7HH6uYxM3Xd9R+HZcU+9l3r5veqdZU/lRu+OkovYgcLWjfA2' +
'91WPXj2n7oO7acCVHP1H7t13h9mjr3r6AHa/TKI7tAAAAAAAAAAAA' +
'AAAAAAAAAAAAAAAAAP7RF8AdMGA=');
End;

Procedure loadbitmap3;
Begin
smith := BitmapFromString(134, 132, 'beNrt10EKgCAQQNG5XRdo2/2PU' +
'aEgQ9FWJ3gPF7rt02QRx77d62ze+76CiXKFfsx7RVYVGSFGDkWqFT' +
'G1lhfJ80qRau9IzqGIqaXIY165/br9osgvviP56H+kyO33a3lKAAA' +
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
'AAAAAMAMF9WTxs8=');
End;

Procedure srlid2;
Var
V: TVariantArray;
Begin
SRLid:= MySRLId;
SRLpassword:= MySRLPassword;
Begin
If (SRLID = '') or (SRLPassword = '') then
Begin
ClearDebug;
If (MySRLPassword = '') and not(MySRLID = '') then writeln('Nice try, trying to trick it with just a ID ');
writeln('To set up a SRL stats ID go here: http://www.stats.srl-forums.com');
ThreadSafeCall('NoID', V);
terminateScript;
End;
End;
End;

Procedure NoID;
Begin
Disguise('No more leeching');
ShowMessage('Please register at SRL-stats to use this script' +Chr(13)+
'To set up a SRL stats ID go here: '+Chr(13)+' http://www.stats.srl-forums.com'+Chr(13)+
+Chr(13)+' -sandos');
End;
Procedure Randoms;
Begin
If (not(loggedin)) then exit;
If(FindFight)then
RunAway('N', True, 1, 15000);
FindNormalRandoms;
FindLamp((LampLevel));
End;

Procedure loaddtms;
Begin
steelbar := DTMFromString('78DA63D46064607065400113DBDBC1342394C' +
'FA80F643930A001465435BA40960F0135D240961F013512409627' +
'01352A40962D01356A4056107E3500287204B3');
End;

Procedure autoresponder;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
exit;
End;
If InChat((Players[CurrentPlayer].Nick)) then
Begin
Wait(1000 + Random(500));
Case Random(6) of
0: Typesend('hello');
1: Typesend('hey');
2: Typesend('yo');
3: Typesend('ye?');
4: Typesend('sup');
5: Typesend('hi');
6: Typesend('?');
End;
End;
End;

Procedure antiban;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
exit;
End;
randoms;
autoresponder;
Case random(5) of
1:Begin
wait(15000+random(4000));
hoverskill('smithing', false);
gametab(4);
End;
2:Begin
typesend('lol, this is sooo boring');
End;
3:Begin
pickupmouse;
wait(200);
End;
4:Begin
randommovement;
End;
5:Begin
gametab(random(10));
End;
End;
End;

Procedure BEGGINING;
Var
I,II:integer;
s:string;
Begin
Disguise('Sig Call');
ChangeReportWidth(255);
Status('Signature call; Watch the report box!');
For I := 0 to 57 do
Begin
clearreport;
For II := 0 to 5 do
Addtoreport(s+'||');
wait(30);
If I < 29 then s := s + ' ' else delete(s, Length(s), 1);
End;
For I := 1 to 29 do
Begin
ClearReport;
AddtoReport(Left('---- _ _ ---- ', I));
AddtoReport(Left('----, | \ | |___o ---- ', I));
AddtoReport(Left('|| _ | .\| | \ || ', I));
AddtoReport(Left('---- / _ | |\ .|| \ \---- ', I));
AddtoReport(Left(' || (_| | | \ ||_/ / ||', I));
AddtoReport(Left('---- \__,_|_| \|___/ ---- ', I));
AddtoReport(Left('---- o ---- ',I));
wait(50);
End;
AddtoReport(ScriptName+' v'+Version);
End;

Procedure open;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
exit;
End;
Begin
openbankfast('akb');
End;
End;

Procedure enterpin;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
exit;
End;
Begin
If pinscreen then inpin(players[currentplayer].pin);
End;
End;

Procedure withdrawiron;
Begin
If (not(loggedin)) then exit;
Begin
makecompass('n');
If (findcolortolerance(x, y, 1976386, msx1, msy1, msx2, msy2, 5)) then
Begin
mouse(x,y,3,3,false);
End else
Begin
closebank;
logout;
Players[CurrentPlayer].Active := False;
exit;
End;
wait(50);
If chooseoption('X') then
Begin
wait(500);
typesend('9');
wait(500);
End else
Begin
closebank;
logout;
Players[CurrentPlayer].Active := False;
exit;
End;
End;
End;

Procedure withdrawcoal;
Begin
If (not(loggedin)) then exit;
loadbitmap2;
If (findbitmaptolerancein(coalbnk, x, y, msx1, msy1, msx2, msy2, 20)) then
Begin
mouse(x,y,3,3,false);
End else
Begin
closebank;
logout;
Players[CurrentPlayer].Active := False;
exit;
End;
wait(50);
If chooseoption('X') then
Begin
wait(500);
typesend('18');
closebank;
End else
Begin
closebank;
logout;
Players[CurrentPlayer].Active := False;
exit;
End;
freebitmap(coalbnk);
reportvars[3]:=reportvars[3]+1;
srlrandomsreport;
End;

Function FindFurnaceColor: Integer;
Var
R, G, B, TestColor, i, C2, MyColor: Integer;
H, S, L, X, Y, Z: Extended;
ColorsTPA : TPointArray;
C1 : TIntegerArray;
Begin
If (not(loggedin)) then exit;
Players[CurrentPlayer].Active := False;
MyColor := 7115452;
FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2, MMY2, 60);
C1 := GetColors(ColorsTPA);
C2 := High(C1);
For i := 0 to C2 do
Begin
If RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then
Begin
TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);
If SimilarColors(TestColor, 1322555, 50) then
Begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
If InRange(R - G, 27, 57) then
If InRange(R - B, 65, 95) then
If InRange(G - B, 23, 53) then
If InRange(Round(S) - Round(H), 14, 44) then
If InRange(Round(L) - Round(H), 35, 65) then
If InRange(Round(S) - Round(L), -36, -6) then
If InRange(Round(X) - Round(Y), -14, 16) then
If InRange(Round(Y) - Round(Z), -1, 29) then
If GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2) = TestColor then
If GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1) = TestColor then
Begin
Writeln('MyColor = '+Inttostr(TestColor));
Result := TestColor;
Exit;
End;
End;
End;
End;
Writeln('Couldnt find My Color!');
Result := 0;
logout;
End;

Function FindbankColor: Integer;
Var
R, G, B, TestColor, i, C2, MyColor: Integer;
H, S, L, X, Y, Z: Extended;
ColorsTPA : TPointArray;
C1 : TIntegerArray;
Begin
If (not(loggedin)) then exit;
Players[CurrentPlayer].Active := False;
MyColor := 6194852;
FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2, MMY2, 60);
C1 := GetColors(ColorsTPA);
C2 := High(C1);
For i := 0 to C2 do
Begin
if RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then
Begin
TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);
If SimilarColors(TestColor, 1322555, 50) then
Begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
If InRange(R - G, 15, 45) then
If InRange(R - B, 55, 85) then
If InRange(G - B, 25, 55) then
If InRange(Round(S) - Round(H), 3, 33) then
If InRange(Round(L) - Round(H), 26, 56) then
If InRange(Round(S) - Round(L), -38, -8) then
If InRange(Round(X) - Round(Y), -15, 15) then
If InRange(Round(Y) - Round(Z), -3, 27) then
If GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2) = TestColor then
If GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1) = TestColor then
Begin
Writeln('MyColor = '+Inttostr(TestColor));
Result := TestColor;
Exit;
End;
End;
End;
End;
Writeln('Couldnt find My Color!');
Result := 0;
logout;
End;

Procedure walktofurnace;
Var
furnacecolor:integer;
Begin
wait(200);
If (not(loggedin)) then exit;
wait(500+random(200));
furnacecolor:=FindFurnaceColor;
If RadialWalk(furnacecolor, 65, 107, 70, 1, 1) then
Begin
If (findfurnace(x, y)) then exit;
End else
Begin
findsymbol(x, y, 'kebab shop');
mouse(x, y, 3, 3, true);
fflag(8);
End;
Begin
If (not(findfurnace(x, y))) then
logout;
exit;
End;
End;

Procedure smelting;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
exit;
End;
Begin
If findfurnace(x, y) then
Begin
loadbitmap3;
mouse(x, y, 0, 0, false)
chooseoption('melt');
wait(200);
If (findcolortolerance(x, y, 7303032, msx1, msy1, msx2, msy2, 20)) then
mouse(x,y,3,3,false);
If (findbitmaptolerancein(smith, x, y, 275, 641, 615, 547, 20)) then
wait(200);
mouse(x,y,3,3,true);
wait(300)
typesend('9');
While (not(finddtm(steelbar, x, y, 682, 436, 715, 465))) do
Begin
randoms;
wait(100);
smelting;
End;
freebitmap(smith);
reportvars[2] :=1;
I:=I+1;
srlrandomsreport;
End else
logout;
exit;
End;
End;

Procedure walktobank;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
End;
Begin
wait(500+random(200));
Begin
bankcolor:=FindbankColor;
RadialWalk(bankcolor, 287, 274, 65, -1, 0);
If openbankfast('akb') then exit;
logout;
End;
End;
End;

Function TakeABreak: boolean;
Var
BreakFor,breaktime: integer;
Begin
BreakTime := GetSystemTime+RandomRange(60*60000, 150*60000);
If (not(loggedin)) then exit;
If ( GetSystemTime >= BreakTime ) then
Begin
result := true;
BreakFor := RandomRange(5 * 60000, 14 * 60000);
Disguise('Break '+ inttostr(BreakFor/60000) + ' Mins.');
writeln(inttostr(BreakFor/60000) + ' minute break.');
Logout;
Wait(BreakFor);
Disguise('Break Ended');
If howManyPlayers=1 then wait(random(60000));
nextplayer(true);
reportvars[1] := reportvars[1]+1;
srlrandomsreport;
breaksdone:=breaks+1;
End;
End;

Procedure banking;
Begin
If (not(loggedin)) then exit;
loaddtms;
If (finddtm(steelbar, x, y, mix1, miy1, mix2, miy2)) then
Begin
mouse(x, y, 3, 3, false);
chooseoption('ll');
wait(300);
End else
Begin
closebank;
logout;
exit;
End;
freedtm(steelbar);
End;

Function TakeASleep: boolean;
Var
H, M, S, SleepFor,Sleeptime,breaktime: integer;
Begin
BreakTime := GetSystemTime+RandomRange(60*60000, 150*60000);
SleepTime := GetSystemtime+RandomRange(480*60000, 720*60000);
If (not(loggedin)) then exit;
If ( GetSystemTime >= SleepTime ) then
Begin
Result := true;
SleepFor := RandomRange(180 * 60000, 300 * 60000);
ConvertTime(SleepFor, H, M, S);
Disguise('Sleep '+inttostr(H) +'h:'+inttostr(M)+'M');
Writeln('Sleep '+inttostr(H) +'h:'+inttostr(M)+'M');
Logout;
Sleep(SleepFor);
Disguise('Sleep Ended');
NextPlayer(true);
reportvars[0] :=reportvars[0]+1;
srlrandomsreport;
sleepsdone:=sleeps+1;
End;
End;

Begin
declareplayers;
beggining;
wait(1500);
addtoreport('start time:'+thetime);
srlid2;
setupsrl;
ScriptID := ('960');
wait(2000);
srlrandomsreport;
disguise(scriptname+'v'+version);
activateclient;
wait(1000);
If (not(loggedin)) then
loginplayer;
Repeat
randoms;
Repeat
open;
enterpin;
wait(100+random(200));
withdrawiron;
withdrawcoal;
randoms;
walktofurnace;
randoms;
smelting;
randoms;
walktobank;
If TakeSleeps then TakeASleep;
If TakeBreaks then TakeABreak;
Until (not(loggedin)) or (load>(players[currentplayer].integers[0]));
NextPlayer(Players[CurrentPlayer].Active);
Until (AllPlayersInactive);
proggy;
End.

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

Gu3st...

2008-09-14 11:30:45

Yes.

- Why?
You know many of the srl functions and know much about scripting.

You will learn.

Harry

2008-09-14 11:35:04

Holding vote. Standards are epic fail.

Method

2008-09-14 11:37:45

I'm not really sure. You have very few failsafes in the parts of the script that really need them, like banking and smithing, but you do have some for the walking, which is nice. I'd also like to see you load all of the DTMs or bitmaps in one procedure or function instead of multiple throughout the script. Apart from that, standards are all over the place, but those can certainly be fixed pretty easily.

I'm going to hold my vote for the moment. It's certainly a good start, though. :)

Gu3st...

2008-09-14 11:37:58

From: Hy71194
Holding vote. Standards are epic fail.


I hope you mean that standars is a part of other reasons why you vote no..?

Harry

2008-09-14 11:43:37

From: Zytex!
I hope you mean that standars is a part of other reasons why you vote no..?


Holding vote <> No..?
I can not even read a script and judge it without proper standards; that's why I said holding vote, not no/yes. Once he fixes his standards I will be able to judge his work.

Gu3st...

2008-09-14 11:47:46

From: Hy71194
Holding vote <> No..?
I can not even read a script and judge it without proper standards; that's why I said holding vote, not no/yes. Once he fixes his standards I will be able to judge his work.


Yeah I know Yes <> No :p :D

But I meant that other things than standars made you not vote yes/no.

Magiic

2008-09-14 11:55:18

i think i fixed the standards :P

Harry

2008-09-14 11:58:46

From: sandos1234
i think i fixed the standards :P


No, they are still fail, but they improved a bit :p But the rest of the code is okay, I'm gonna say yes.

Magiic

2008-09-14 12:01:18

ok lol (fingers still crossed)

P1nky

2008-09-14 12:03:21

standards could always be fixed, so i hope no-one makes there decision by that, ill hold my vote.

Magiic

2008-09-14 12:05:26

okay thanks joker/pinky/ whatever else they call you :0
Edit:what is the main issue with the standards in the script? which parts are "epic fail" :P :) ill fix em
edit2:erm how long does the poll last for?

Gu3st...

2008-09-14 12:11:47

From: sandos1234
i think i fixed the standards :P


Try having 1 space between each procedure ;)

You should have something like:

program Example;

var
X, Y : Integer;
TreeDTM : array [0..2] of Integer;

procedure LoadDTMs;
begin
TreeDTM[0] := DTMFromString('ASGKIHDSLS4HD3235JSH3DV5');
TreeDTM[1] := DTMFromString('ASGKIHDSLS4HD3235JSH3DV5');
TreeDTM[2] := DTMFromString('ASGKIHDSLS4HD3235JSH3DV5');
end;

procedure FindDTMs;
var
I : Integer;
begin
for I := 0 to 2 do
begin
if FindDTM(TreeDTM[i], x, y, 0, 0, 100, 100) then
begin
WriteLn('Found TreeDTM[' + IntToStr(I) + '].');
MoveMouse(X, Y);
Wait(50);
ClickMouse(X, Y, True);
end;
end;
end;

procedure FreeDTMs;
var
I : Integer;
begin
for I := 0 to 2 do
FreeDTM(TreeDTM[i]);
end;

procedure WriteString(Write : String);
begin
WriteLn('| - ' + Write);
end;

begin
LoadDTMs;
WriteString('Neat standars ;)');
FindDTMs;
FreeDTMs;
end;

After 'Procedure [ProcedureName];' have 2 spaces. Not 4. ;)

Magiic

2008-09-14 12:12:55

oh yeah that is fail lol thanks zytex

Gu3st...

2008-09-14 12:15:01

This poll will close on 09-21-2008 at 05:20 PM

3Garrett3

2008-09-14 12:16:31

Looking through script now..

This poll will close on 09-21-2008 at 12:20 PM

Magiic

2008-09-14 12:16:52

ok :p

3Garrett3

2008-09-14 12:19:03

Everything is teh lowercase? It burns!

I love it when people have a capital at the beginning of each word. Seems much neater to me.. :\ I will live. Voting yes btw.

Magiic

2008-09-14 12:21:52

thanks :)

Gu3st...

2008-09-14 12:26:24

From: 3Garrett3
Everything is teh lowercase? It burns!

I love it when people have a capital at the beginning of each word. Seems much neater to me.. :\ I will live. Voting yes btw.


And btw… No capital At start Of Words that Is bold in SCAR.

E: That was to sandos1234, not to you 3Garrett3 ;)

Magiic

2008-09-14 12:28:24

ah too much bold "my eyes burn" ill fix that lol

Gu3st...

2008-09-14 12:40:56

Talking about standars and capital letters:

var
I, Load, SleepsDone, Sleeps, Breaks, BreaksDone, Done, Smith, X, Y, CoalBnk, SteelBar : Integer;

Magiic

2008-09-14 12:45:08

I know lol…btw i've got to go get something to eat so i can't reply
edit:im back

Metagen

2008-09-14 15:25:50


and while were on topic, im like hy now!!!


Magiic

2008-09-14 16:00:16

rofl!!
gtg guys ill be able to check on this either later or tomorrow
thanks for voting whether you said yes or no

sirlaughsalot

2008-09-14 22:43:30

Okay, you need more failsafes for sure, use a timed failsafe for your while do loop

You dont use TPA's for finding the furnace, well you do but it isnt your TPA, and sure it seems fickle and useless in application if it is already made but the point of the SRL members app is to show you know these things…

I am holding my vote, im not sure about this one…

NiCbaZ

2008-09-14 23:25:44

He uses TPA's in his auto color tho.

no wait…




function FindTreeColor : Integer;  // Jetho auto maker
var
R,G,B,TestColor : Integer;
H,S,L : Extended;
X,Y,Z : Extended;
MyColor : Integer;
ColorsTPA : TPointArray;
C1 : TIntegerArray;
i,C2: Integer;
begin
MyColor := 2247283;
FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2,
MMY2, 60);
C1 := GetColors(ColorsTPA);
C2 := High(C1);
for i := 0 to C2 do
begin
if RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then
begin
TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);
if SimilarColors(TestColor, MyColor, 50) then
begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
if InRange(R - G, 21, 61) then
if InRange(R - B, 61, 101) then
if InRange(G - B, 20, 60) then
if InRange(Round(S) - Round(H), 31, 61) then
if InRange(Round(L) - Round(H), 6, 36) then
if InRange(Round(H) - Round(L), -36, -6) then
if InRange(Round(X) - Round(Y), -6, 8) then
if InRange(Round(Y) - Round(Z), -1, 13) then
if GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2)
= TestColor then
if GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1)
= TestColor then
begin
Writeln('TreeColor = ' +Inttostr(TestColor));
Result := TestColor;
Exit;
end;
end;
end;
end;
Writeln(Could not find TreeColor);
Result := 0;
end;


//His
Function FindbankColor: Integer;
Var
R, G, B, TestColor, i, C2, MyColor: Integer;
H, S, L, X, Y, Z: Extended;
ColorsTPA : TPointArray;
C1 : TIntegerArray;
Begin
If (not(loggedin)) then exit;
Players[CurrentPlayer].Active := False;
MyColor := 6194852;
FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2, MMY2, 60);
C1 := GetColors(ColorsTPA);
C2 := High(C1);
For i := 0 to C2 do
Begin
if RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then
Begin
TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);
If SimilarColors(TestColor, 1322555, 50) then
Begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
If InRange(R - G, 15, 45) then
If InRange(R - B, 55, 85) then
If InRange(G - B, 25, 55) then
If InRange(Round(S) - Round(H), 3, 33) then
If InRange(Round(L) - Round(H), 26, 56) then
If InRange(Round(S) - Round(L), -38, -8) then
If InRange(Round(X) - Round(Y), -15, 15) then
If InRange(Round(Y) - Round(Z), -3, 27) then
If GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2) = TestColor then
If GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1) = TestColor then
Begin
Writeln('MyColor = '+Inttostr(TestColor));
Result := TestColor;
Exit;
End;
End;
End;
End;
Writeln('Couldnt find My Color!');
Result := 0;
logout;
End;

Looks kinda the same slightly

Raskolnikov

2008-09-14 23:56:12

Holding vote, but first, some things:

Now, the standards need to be picked up. That can be learned quickly, as there is a recurring problem (not plural) but it still factors into my decision. Since they aren't that bad (we've seen much worse), that isn't a major problem.

Next I'm not a huge fan of bitmaps, they have problems (takes very long to load, unreliable unless used correctly (you used them well, but still). I recommend using dtms instead (faster loading time, more reliable)

You did an amazing job at autocoloring by the way!

Great job, the standards make me think about it but leaning to yes.

Cut em2 it

NiCbaZ

2008-09-15 01:40:08

errr…


program AutoColorer;
{
By : Jethr0x
}


var
R, G, B,
RGl, RGh, RBl, RBh, GBl, GBh,
SH1, SHh, LHl, LHh, HLl, HLh,
XYl, XYh, YZl, YZh : Integer;
H,S,L,X,Y,Z : Extended;

const
NameofFunct = 'FindTreeColor'; // What is the name of the function you are making?
OutputName = 'TreeColor'; // The Output... Outputname = Color.. like WaterColor = 1223124.
Error = ('Could not find ' + OutputName);
Color = 2247283; // set your color



begin

{ Breaks Down your Color }

ColorToRGB(Color, R, G, B);
ColorToHSL(Color, H, S, L);
ColorToXYZ(Color, X, Y, Z);

{ STARTS CALULATING! }

RGl := (R - G) - 20;
RGh := (R - G) + 20;
RBl := (R - B) - 20;
RBh := (R - B) + 20;
GBl := (G - B) - 20;
GBh := (G - B) + 20;
SH1 := (Round(S) - Round(H)) - 15;
SHh := (Round(S) - Round(H)) + 15;
LHl := (Round(L) - Round(H)) - 15;
LHh := (Round(L) - Round(H)) + 15;
HLl := (Round(H) - Round(L)) - 15;
HLh := (Round(H) - Round(L)) + 15;
XYl := (Round(X) - Round(Y)) - 7;
XYh := (Round(X) - Round(Y)) + 7;
YZl := (Round(Y) - Round(Z)) - 7;
YZh := (Round(Y) - Round(Z)) + 7;

{ Begins the Autocolor Output... }
Writeln('******************************************************************');
Writeln('~~~~~ Jethr0x''s AutoColorer v1! Fill in the color and watch! ~~~~~');
Writeln('******************************************************************');
Writeln('function ' +NameofFunct+ ' : Integer;');
Writeln('var');
Writeln(' R,G,B,TestColor : Integer;');
Writeln(' H,S,L : Extended;');
Writeln(' X,Y,Z : Extended;');
Writeln(' MyColor : Integer;');
Writeln(' ColorsTPA : TPointArray;');
Writeln(' C1 : TIntegerArray;');
Writeln(' i,C2: Integer;');
Writeln('begin');
Writeln(' MyColor := ' +IntToStr(Color)+';');
Writeln(' FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2,');
Writeln(' MMY2, 60);');
Writeln(' C1 := GetColors(ColorsTPA);');
Writeln(' C2 := High(C1);');
Writeln(' for i := 0 to C2 do');
Writeln(' begin');
Writeln(' if RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then ');
Writeln(' begin');
Writeln(' TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);');
Writeln(' if SimilarColors(TestColor, MyColor, 50) then');
Writeln(' begin');
Writeln(' ColorToRGB(TestColor, R, G, B);');
Writeln(' ColorToHSL(TestColor, H, S, L);');
Writeln(' ColorToXYZ(TestColor, X, Y, Z);');
Writeln(' if InRange(R - G, '+inttostr(RGl) + ', ' +IntToStr(RGh)+ ') then');
Writeln(' if InRange(R - B, ' +IntToStr(RBl)+ ', ' +IntToStr(RBh)+ ') then');
Writeln(' if InRange(G - B, ' +IntToStr(GBl)+ ', ' +IntToStr(GBh)+ ') then');
Writeln(' if InRange(Round(S) - Round(H), '+inttostr(SH1) + ', ' +IntToStr(SHh)+ ') then');
Writeln(' if InRange(Round(L) - Round(H), ' +IntToStr(LHl)+ ', ' +IntToStr(LHh)+ ') then');
Writeln(' if InRange(Round(H) - Round(L), ' +IntToStr(HLl)+ ', ' +IntToStr(HLh)+ ') then');
Writeln(' if InRange(Round(X) - Round(Y), ' +IntToStr(XYl)+ ', ' +IntToStr(XYh)+ ') then');
Writeln(' if InRange(Round(Y) - Round(Z), ' +IntToStr(YZl)+ ', ' +IntToStr(YZh)+ ') then');
Writeln(' if GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2)');
Writeln(' = TestColor then');
Writeln(' if GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1)');
Writeln(' = TestColor then');
Writeln(' begin');
Writeln(' Writeln(''' +OutPutName+ ' = '' +Inttostr(TestColor));');
Writeln(' Result := TestColor;');
Writeln(' Exit;');
Writeln(' end;');
Writeln(' end;');
Writeln(' end;');
Writeln(' end;');
Writeln(' Writeln(' + Error +');');
Writeln(' Result := 0;');
Writeln(' end;');
Writeln('******************************************************************');
Writeln('~~~~~~~~~~~~~~ Dont forget to credit me! (Jethr0x) ~~~~~~~~~~~~~~~');
Writeln('******************************************************************');
end.

Scaper

2008-09-15 07:02:57

Yes from me

be back later to give my reasons why :)

HyperSecret

2008-09-15 10:45:55

I'm gonna vote no. The script is average, seems like its just a script that compiles and works.

I also just don't think you have been here long enough to be an SRL Member. barely 2 months if that, depending on when you registered in July.

I rarely vote in apps but this one I feel like I should vote and put in my opinion.

Magiic

2008-09-15 10:46:16

the reason i used bitmaps was so i could show i could use them i have used dtms and the people who said no please post and i didn't use that autocolor thingy i read cazax'z guide it basically tells you how to make exactly the same thing. i was gonna take the bmp out when i released it i just thought that the more things you used the better :P thanks for voting
edit: i origanally (i know its spelt wrong) had just rgb coloring but then skilld said it was crap so i rewrote it. tbh i never heard of that autocoloring machine.

Magiic

2008-09-15 10:48:31

laggy pc sorry

Gu3st...

2008-09-15 11:40:41

If you double post you can just delete the other post ;)

BTW: For every srl member: Do you notice how much the first vote affect the other votes? Just take tniffoc as an example. I voted no there (for a reason tought) and here I voted yes. Yes I know this script is better than his, but It is easier to learn when you firs become an srl member. And at dj cheaters thread: I think the reason why he did not get in was because we expected more from him. The script had multiplayer, tpa, dtm, walking, banking, antiban and antirandoms (enough to get in if you ask me..) and his attitude are great. But since the first voter voted no everybody voted no…
I wonder why..

HyperSecret

2008-09-15 11:44:01


Procedure open;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
exit;
End;
Begin
openbankfast('akb');
End;
End;

Procedure enterpin;
Begin
If (not(loggedin)) then
Begin
Players[CurrentPlayer].Active := False;
exit;
End;
Begin
If pinscreen then inpin(players[currentplayer].pin);
End;
End;

should be


Procedure open;
Begin
If (not(loggedin)) then exit;
openbankfast('akb');
End;

Procedure enterpin;
Begin
If (not(loggedin)) then exit;
If pinscreen then inpin(players[currentplayer].pin);
End;

That is if they are really needed in the first place and not just useless functions, to each his own though. You should have the players be set false in the mainloop, functions should exit into the mainloop and then if something in mainloop fails then the player should be made false, or if your player isn't logged in while going through the mainloop.

Magiic

2008-09-15 11:45:33

theyll all vote no now to prove you wrong lol
edit:ohyeah i neer thought of putting t into the main loop lol ill add that now

HyperSecret

2008-09-15 11:54:21

From: Zytex!
If you double post you can just delete the other post ;)

BTW: For every srl member: Do you notice how much the first vote affect the other votes? Just take tniffoc as an example. I voted no there (for a reason tought) and here I voted yes. Yes I know this script is better than his, but It is easier to learn when you firs become an srl member. And at dj cheaters thread: I think the reason why he did not get in was because we expected more from him. The script had multiplayer, tpa, dtm, walking, banking, antiban and antirandoms (enough to get in if you ask me..) and his attitude are great. But since the first voter voted no everybody voted no…
I wonder why..


No djcheater had an attitude problem towards some SRL Members that he kept argueing about reflection. He had more reflection than color-based script and those are the 2 main reasons why he didn't get in. He should have bit his tongue learned to script more with color and re-applied in the 2 weeks the admins gave him.

Back to this thread and sandos1234's members app

Magiic

2008-09-15 11:58:30

ok thanks hyper btw does anyone know who the other no's were? they never posted why they said no so i can't improve same with some of the yes's

3Garrett3

2008-09-15 15:13:28

I am actually changing my vote to a no. I guess my not so thourough read through missed the problems noted above. That is why I usually hold me vote until the end..

So Garrett = No instead of Yes.

Magiic

2008-09-15 15:35:12

which reasons? nobody has posted reasons except the standards and some failsafes which is sorta annoying cos i know there are things wrong with it and anyway shouldnt the failsafes be sorted now?

3Garrett3

2008-09-15 15:54:23

From: sandos1234
which reasons? nobody has posted reasons except the standards and some failsafes which is sorta annoying cos i know there are things wrong with it and anyway shouldnt the failsafes be sorted now?


1) Your autocolor seems based off a premade one.
2) I prefer looking at the original script. If something is wrong with it, don't apply just yet
3) Failsafes and such.

Magiic

2008-09-15 16:02:00

well i have tried explaining but i had never seen that thing before so its got nothing to do with the autocolor (if you read cazax's guide you'll see what its based on) and i sorted the failsafes that were in there and im adding some to the banking as we speak so just don't bother trying to say that and if you want thats basically the script ive got right now up there that is the original script so yeah on the failsafes your right i guess but how was i supposed to know the rest? i mean you never mentioned you like to see the original

3Garrett3

2008-09-15 16:08:22

From: sandos1234
well i have tried explaining but i had never seen that thing before so its got nothing to do with the autocolor (if you read cazax's guide you'll see what its based on) and i sorted the failsafes that were in there and im adding some to the banking as we speak so just don't bother trying to say that and if you want thats basically the script ive got right now up there that is the original script so yeah on the failsafes your right i guess but how was i supposed to know the rest? i mean you never mentioned you like to see the original


I just think that since you are given enough time to make a script, and then check the tuts for what you need to get in, then ask around, then fix the script, then test, then fix. In all that time, you should have the script that you want. Not after you get here, you can change it.

Its like a test at school. You get all the time to prepare. Then you get there. You write the test. Your teacher is marking it. You don't get to grab it out of his hands and change things while he marks it. Common sense.

Magiic

2008-09-15 16:12:12

yes i do get that and i did that all i have realistically changed while i have put it up here is the standards and moved some things around nothing else,
and the standards don't make the script but ok idc whether you vote yes or not tbh its not exactlythe most important thing in the world

HyperSecret

2008-09-15 16:15:41

From: 3Garrett3
Its like a test at school. You get all the time to prepare. Then you get there. You write the test. Your teacher is marking it. You don't get to grab it out of his hands and change things while he marks it. Common sense.


I agree 100% about the editing while in a app. I've never thought of a good analogy but this one is excellent! Way better than your book one that you stated in another app :D.


{start in bank top banker have iron and coal visible
reccomended for at least 2 players}
{setup lines 12-21 and 29-53}
//credits to narcle
//for his sig and the base of the sleep and breaks


Program alkharadsmelter;
{.include srl/srl.scar}
{.include srl/srl/skill/smithing.scar}
Var
i, load, sleepsdone, sleeps, breaks, breaksdone, done, x, smith, y, coalbnk, steelbar:integer;
Const
MySrlId=('');
MySrlPassword=('');
//Sleeping / Breaking options:
TakeBreaks = true;//Take 5-15 min breaks every 1-3 hours?
TakeSleeps = true;//Take couple hour sleeps?
//randoms setup
LampLevel= 'smithing'; //Set the skill you want a lamp to do.
//dont touch
scriptname='al kharad smelter';//don't touch
version='1.0';//don't touch

Procedure declareplayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';//user
Players[0].Pass := '';//pass
Players[0].Nick := '';//3-4 letters of name in order except first
Players[0].pin := '0000';//pin
Players[0].Active := True;//use this player?
players[0].integers[0]:=10;//loads

{Players[1].Name := 'username';//user
Players[1].Pass := 'password';//pass
Players[1].Nick := 'sern';//3-4 letters of name in order except first
Players[1].pin := '0000'//pin
Players[1].Active := True;//use this player?
players[1].integers[0]:=10;//loads
players[1].booleans[0]:=true;//cannonballs

Players[2].Name := 'username';//user
Players[2].Pass := 'password';//pass
Players[2].Nick := 'sern';//3-4 letters of name in order except first
Players[2].pin := '0000'//pin
Players[2].Active := True;//use this player?
players[2].integers[0]:=10;//loads
players[0].booleans[0]:=true;//cannonballs}
End;

Procedure proggy;
Begin
writeln(scriptname+'v'+version)
writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~') ;
writeln('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.');
writeln(('Current Player: ' + Players[CurrentPlayer].Nick));
writeln('script ran for '+timerunning);
writeln('did '+(inttostr(I))+'loads');
srlrandomsreport;
End;

Procedure srlid2;
Var
V: TVariantArray;
Begin
SRLid:= MySRLId;
SRLpassword:= MySRLPassword;
Begin
If (SRLID = '') or (SRLPassword = '') then
Begin
ClearDebug;
If (MySRLPassword = '') and not(MySRLID = '') then writeln('Nice try, trying to trick it with just a ID ');
writeln('To set up a SRL stats ID go here: http://www.stats.srl-forums.com');
ThreadSafeCall('NoID', V);
terminateScript;
End;
End;
End;

Procedure NoID;
Begin
Disguise('No more leeching');
ShowMessage('Please register at SRL-stats to use this script' +Chr(13)+
'To set up a SRL stats ID go here: '+Chr(13)+' http://www.stats.srl-forums.com'+Chr(13)+
+Chr(13)+' -sandos');
End;

Procedure Randoms;
Begin
If (not(loggedin)) then exit;
If(FindFight)then
RunAway('N', True, 1, 15000);
FindNormalRandoms;
FindLamp((LampLevel));
End;

Procedure autoresponder;
Begin
If (not(loggedin)) then exit;
If InChat((Players[CurrentPlayer].Nick)) then
Begin
Wait(1000 + Random(500));
Case Random(6) of
0: Typesend('hello');
1: Typesend('hey');
2: Typesend('yo');
3: Typesend('ye?');
4: Typesend('sup');
5: Typesend('hi');
6: Typesend('?');
End;
End;
End;

Procedure antiban;
Begin
If (not(loggedin)) then exit;
randoms;
autoresponder;
Case random(5) of //more randomness, dont need to do something everytime... random(20-30) maybe? or random(randomRange(20, 30));
1:Begin
hoverskill('smithing', false);
gametab(4);
End;
2: typesend('lol, this is sooo boring');
3: pickupmouse;
4: randommovement;
5: gametab(random(10));
End;
End;

Procedure BEGGINING;
Var
I,II:integer;
s:string;
Begin
Disguise('Sig Call');
ChangeReportWidth(255);
Status('Signature call; Watch the report box!');
For I := 0 to 57 do
Begin
clearreport;
For II := 0 to 5 do
Addtoreport(s+'||');
wait(30);
If I < 29 then s := s + ' ' else delete(s, Length(s), 1);
End;
For I := 1 to 29 do
Begin
ClearReport;
AddtoReport(Left('---- _ _ ---- ', I));
AddtoReport(Left('----, | \ | |___o ---- ', I));
AddtoReport(Left('|| _ | .\| | \ || ', I));
AddtoReport(Left('---- / _ | |\ .|| \ \---- ', I));
AddtoReport(Left(' || (_| | | \ ||_/ / ||', I));
AddtoReport(Left('---- \__,_|_| \|___/ ---- ', I));
AddtoReport(Left('---- o ---- ',I));
wait(50);
End;
AddtoReport(ScriptName+' v'+Version);
End;

Procedure withdrawiron;
Begin
If (not(loggedin)) then exit;
Begin
openbankfast('akb');
If pinscreen then
inpin(players[currentplayer].pin);
makecompass('n');
If (findcolortolerance(x, y, 1976386, msx1, msy1, msx2, msy2, 10)) then
mouse(x,y,3,3,false) else
Begin
closebank;
logout;
exit;
End;
wait(50);
If chooseoption('X') then
Begin
wait(500);
typesend('9');
wait(500);
End else
Begin
closebank;
logout;
exit;
End;
End;
End;

Procedure withdrawcoal;
Begin
coalbnk := BitmapFromString(84, 64, 'beNrt0c0KAVEAhuHjIiwsRDLN' +
'ggVmyPhJRDIlpUSIkBKllFJWsnLZvjo1Gzdg6n06TV9n954xplXOL' +
'YaVVejvJ/XjtHFddvTVNibheZ6+mUyyVMpW/bxOoZDWTcMv2qN9W3' +
'efh8H7HH6uYxM3Xd9R+HZcU+9l3r5veqdZU/lRu+OkovYgcLWjfA2' +
'91WPXj2n7oO7acCVHP1H7t13h9mjr3r6AHa/TKI7tAAAAAAAAAAAA' +
'AAAAAAAAAAAAAAAAAP7RF8AdMGA=');

If (not(loggedin)) then exit;
If (findbitmaptolerancein(coalbnk, x, y, msx1, msy1, msx2, msy2, 20)) then
mouse(x,y,3,3,false) else
Begin
closebank;
logout;
freebitmap(coalbnk);//free here before exit
exit;
End;
wait(50);
If chooseoption('X') then
Begin
wait(500); //add randomness to ALL your waits!
typesend('18');
closebank;
End else
Begin
closebank;
logout;
freebitmap(coalbnk);//free here before exit
exit;
End;
freebitmap(coalbnk);
reportvars[3]:=reportvars[3]+1;
srlrandomsreport;
End;

Function FindFurnaceColor: Integer;
Var
R, G, B, TestColor, i, C2, MyColor: Integer;
H, S, L, X, Y, Z: Extended;
ColorsTPA : TPointArray;
C1 : TIntegerArray;
Begin
If (not(loggedin)) then exit;
Players[CurrentPlayer].Active := False;
MyColor := 7115452;
FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2, MMY2, 60);
C1 := GetColors(ColorsTPA);
C2 := High(C1);
For i := 0 to C2 do
Begin
If RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then
Begin
TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);
If SimilarColors(TestColor, 1322555, 50) then
Begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
If InRange(R - G, 27, 57) then
If InRange(R - B, 65, 95) then
If InRange(G - B, 23, 53) then
If InRange(Round(S) - Round(H), 14, 44) then
If InRange(Round(L) - Round(H), 35, 65) then
If InRange(Round(S) - Round(L), -36, -6) then
If InRange(Round(X) - Round(Y), -14, 16) then
If InRange(Round(Y) - Round(Z), -1, 29) then
If GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2) = TestColor then
If GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1) = TestColor then
Begin
Writeln('MyColor = '+Inttostr(TestColor));
Result := TestColor;
Exit;
End;
End;
End;
End;
Writeln('Couldnt find My Color!');
Result := 0;
logout;
End;

Function FindbankColor: Integer;
Var
R, G, B, TestColor, i, C2, MyColor: Integer;
H, S, L, X, Y, Z: Extended;
ColorsTPA : TPointArray;
C1 : TIntegerArray;
Begin
If (not(loggedin)) then exit;
Players[CurrentPlayer].Active := False;
MyColor := 6194852;
FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2, MMY2, 60);
C1 := GetColors(ColorsTPA);
C2 := High(C1);
For i := 0 to C2 do
Begin
if RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then
Begin
TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);
If SimilarColors(TestColor, 1322555, 50) then
Begin
ColorToRGB(TestColor, R, G, B);
ColorToHSL(TestColor, H, S, L);
ColorToXYZ(TestColor, X, Y, Z);
If InRange(R - G, 15, 45) then
If InRange(R - B, 55, 85) then
If InRange(G - B, 25, 55) then
If InRange(Round(S) - Round(H), 3, 33) then
If InRange(Round(L) - Round(H), 26, 56) then
If InRange(Round(S) - Round(L), -38, -8) then
If InRange(Round(X) - Round(Y), -15, 15) then
If InRange(Round(Y) - Round(Z), -3, 27) then
If GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2) = TestColor then
If GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1) = TestColor then
Begin
Writeln('MyColor = '+Inttostr(TestColor));
Result := TestColor;
Exit;
End;
End;
End;
End;
Writeln('Couldnt find My Color!');
Result := 0;
logout;
End;

Procedure walktofurnace;
Var
furnacecolor:integer;
Begin
wait(200);
If (not(loggedin)) then exit;
wait(500+random(200));
furnacecolor:=FindFurnaceColor;
If RadialWalk(furnacecolor, 65, 107, 70, 1, 1) then
Begin
If (findfurnace(x, y)) then exit;
End else
Begin
findsymbol(x, y, 'kebab shop');
mouse(x, y, 3, 3, true);
fflag(8);
End;
Begin
If (not(findfurnace(x, y))) then
logout;
exit;
End;
End;

Procedure smelting;
Begin
smith := BitmapFromString(134, 132, 'beNrt10EKgCAQQNG5XRdo2/2PU' +
'aEgQ9FWJ3gPF7rt02QRx77d62ze+76CiXKFfsx7RVYVGSFGDkWqFT' +
'G1lhfJ80qRau9IzqGIqaXIY165/br9osgvviP56H+kyO33a3lKAAA' +
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
'AAAAAMAMF9WTxs8=');

steelbar := DTMFromString('78DA63D46064607065400113DBDBC1342394C' +
'FA80F643930A001465435BA40960F0135D240961F013512409627' +
'01352A40962D01356A4056107E3500287204B3');

If (not(loggedin)) then exit;
Begin
If findfurnace(x, y) then
Begin
mouse(x, y, 0, 0, false)
chooseoption('melt');
wait(200);
If (findcolortolerance(x, y, 7303032, msx1, msy1, msx2, msy2, 20)) then
mouse(x,y,3,3,false);
If (findbitmaptolerancein(smith, x, y, 275, 641, 615, 547, 20)) then
wait(200); //take this wait out, or it will move to a x,y location even if it doesnt find the smith bitmap
mouse(x,y,3,3,true);
wait(300)
typesend('9');
While (not(finddtm(steelbar, x, y, 682, 436, 715, 465))) do
Begin
randoms;
wait(100);
smelting;
End;
freebitmap(smith);
freedtm(steelbar); //free steelbar dtm
reportvars[2] :=1;
I:=I+1;
srlrandomsreport;
End else
logout;
exit; //don't need to exit at the end of the function
End;
End;

Procedure walktobank;
Begin
If (not(loggedin)) then exit;
Begin
bankcolor:=FindbankColor;
RadialWalk(bankcolor, 287, 274, 65, -1, 0);
If openbankfast('akb') then exit;
logout;
End;
End;

Function TakeABreak: boolean; //credit? looks a lot like Narcle's
Var
BreakFor,breaktime: integer;
Begin
BreakTime := GetSystemTime+RandomRange(60*60000, 150*60000);
If (not(loggedin)) then exit;
If ( GetSystemTime >= BreakTime ) then
Begin
result := true;
BreakFor := RandomRange(5 * 60000, 14 * 60000);
Disguise('Break '+ inttostr(BreakFor/60000) + ' Mins.');
writeln(inttostr(BreakFor/60000) + ' minute break.');
Logout;
Wait(BreakFor);
Disguise('Break Ended');
If howManyPlayers=1 then wait(random(60000));
nextplayer(true);
reportvars[1] := reportvars[1]+1;
srlrandomsreport;
breaksdone:=breaks+1;
End;
End;

Procedure banking;
Begin
steelbar := DTMFromString('78DA63D46064607065400113DBDBC1342394C' +
'FA80F643930A001465435BA40960F0135D240961F013512409627' +
'01352A40962D01356A4056107E3500287204B3');

If (not(loggedin)) then exit;
openbankfast('akb');
If pinscreen then
inpin(players[currentplayer].pin);
If (finddtm(steelbar, x, y, mix1, miy1, mix2, miy2)) then
Begin
mouse(x, y, 3, 3, false);
chooseoption('ll');
wait(300);
End else
Begin
closebank;
logout;
End;
freedtm(steelbar);
End;

Function TakeASleep: boolean; //credit here also? looks a lot like narcles...
Var
H, M, S, SleepFor,Sleeptime,breaktime: integer;
Begin
BreakTime := GetSystemTime+RandomRange(60*60000, 150*60000);
SleepTime := GetSystemtime+RandomRange(480*60000, 720*60000);
If (not(loggedin)) then exit;
If ( GetSystemTime >= SleepTime ) then
Begin
Result := true;
SleepFor := RandomRange(180 * 60000, 300 * 60000);
ConvertTime(SleepFor, H, M, S);
Disguise('Sleep '+inttostr(H) +'h:'+inttostr(M)+'M');
Writeln('Sleep '+inttostr(H) +'h:'+inttostr(M)+'M');
Logout;
Sleep(SleepFor);
Disguise('Sleep Ended');
NextPlayer(true);
reportvars[0] :=reportvars[0]+1;
srlrandomsreport;
sleepsdone:=sleeps+1;
End;
End;

Begin
declareplayers;
beggining;
wait(1500);
addtoreport('start time:'+thetime);
srlid2;
setupsrl;
ScriptID := ('960');
wait(2000);
srlrandomsreport;
disguise(scriptname+'v'+version);
activateclient;
wait(1000);
If (not(loggedin)) then
loginplayer;
Repeat
If (not(loggedin)) then
loginplayer; //need this here!
randoms;
Repeat
withdrawiron;
withdrawcoal;
randoms;
walktofurnace;
randoms;
smelting;
randoms;
walktobank;
banking;
If TakeSleeps then TakeASleep;
If TakeBreaks then TakeABreak;
Until (not(loggedin)) or (load>(players[currentplayer].integers[0]));
Players[CurrentPlayer].Active := False;
proggy;
Until (AllPlayersInactive);
proggy;
End.

Here is your script, I took some things out that weren't needed and added some freebitmaps/dtms where they were needed took out some useless begin/ends and commented on some things that should be fixed.

Overall after going through it, it is a pretty basic script, the mainloop needs work has nothing to organize it rather than run this then this type of loop, needs some organization there.

like this for example from my script

begin
Setup;
EqualZero;
repeat
if not LoggedIn then LoginPlayer;
SetupPlayer;
if LoggedIn then
repeat
if not LoggedIn then break;

if TimeFromMark(T2RhP) > 25000 then
begin
hP := GetMMLevels('hp', ColorSign);
MarkTime(T2RhP);
end;

if Tries mod 50 = 1 then
Calibrate;

if (Tries > 150) then
begin
Writeln('Clearing CmbColors Array - To Many Tries');
SetLength(CmbColors, 0);
break;
end;

if hP < RhP then
RunTo(RunAwayDir, True);

if AttackTheMonster(175, 100, 350, 255) then
Fighting;

if Random(2) = 0 then
PickFeathers;

if AutoRespond then
AutoResponce;

if FillInv then
PickBones;

if not AttackTheMonster(MSX1, MSY1, MSX2, MSY2) then
PickFeathers else Fighting;

//if not AttackTheMonster(MSX1, MSY1, MSX2, MSY2) then
//FTWait(20) else Fighting;

until ((TimeFromMark(PlayerTime)) > (TimeEachPlayer * 60000));
ProgressReport;
if LoggedIn then
begin
case random(4) of

0,1,2: begin
ProgressReport;
if LoggedIn then LogOut;
if SleepBetween then Sleep(PlayerSleepTime);
NextPlayer(true);
end;

3: begin
Status('Timing Out - Waiting To LogOut');
while LoggedIn do wait(10);
if SleepBetween then Sleep(PlayerSleepTime);
ProgressReport;
NextPlayer(True);
end;
end;
end;
until False;

certain things have to be met before the next one can procedure, you need some structure to your mainloop

3Garrett3

2008-09-15 16:18:16

From: HyperSecret
I agree 100% about the editing while in a app. I've never thought of a good analogy but this one is excellent! Way better than your book one that you stated in another app :D.


Yes! Finally a good analogy :).

The book one was quite bad, but admit, the circumstances were not in my favour there.

Magiic

2008-09-15 16:20:53

like you were the first to note on hyper i have only been here for two months its gonna be basic lol but anyway off topic ive just been banned off the pc till the end of the week after the next 10 minutes so i won't be able to check this so i can't answer any questions :\ well thats kinda bad i guess but oh well…cya guys

NiCbaZ

2008-09-15 16:40:47

This is my no, there no credit.


program AutoColorer;
{
By : Jethr0x
}


var
R, G, B,
RGl, RGh, RBl, RBh, GBl, GBh,
SH1, SHh, LHl, LHh, HLl, HLh,
XYl, XYh, YZl, YZh : Integer;
H,S,L,X,Y,Z : Extended;

const
NameofFunct = 'FindTreeColor'; // What is the name of the function you are making?
OutputName = 'TreeColor'; // The Output... Outputname = Color.. like WaterColor = 1223124.
Error = ('Could not find ' + OutputName);
Color = 2247283; // set your color



begin

{ Breaks Down your Color }

ColorToRGB(Color, R, G, B);
ColorToHSL(Color, H, S, L);
ColorToXYZ(Color, X, Y, Z);

{ STARTS CALULATING! }

RGl := (R - G) - 20;
RGh := (R - G) + 20;
RBl := (R - B) - 20;
RBh := (R - B) + 20;
GBl := (G - B) - 20;
GBh := (G - B) + 20;
SH1 := (Round(S) - Round(H)) - 15;
SHh := (Round(S) - Round(H)) + 15;
LHl := (Round(L) - Round(H)) - 15;
LHh := (Round(L) - Round(H)) + 15;
HLl := (Round(H) - Round(L)) - 15;
HLh := (Round(H) - Round(L)) + 15;
XYl := (Round(X) - Round(Y)) - 7;
XYh := (Round(X) - Round(Y)) + 7;
YZl := (Round(Y) - Round(Z)) - 7;
YZh := (Round(Y) - Round(Z)) + 7;

{ Begins the Autocolor Output... }
Writeln('******************************************************************');
Writeln('~~~~~ Jethr0x''s AutoColorer v1! Fill in the color and watch! ~~~~~');
Writeln('******************************************************************');
Writeln('function ' +NameofFunct+ ' : Integer;');
Writeln('var');
Writeln(' R,G,B,TestColor : Integer;');
Writeln(' H,S,L : Extended;');
Writeln(' X,Y,Z : Extended;');
Writeln(' MyColor : Integer;');
Writeln(' ColorsTPA : TPointArray;');
Writeln(' C1 : TIntegerArray;');
Writeln(' i,C2: Integer;');
Writeln('begin');
Writeln(' MyColor := ' +IntToStr(Color)+';');
Writeln(' FindColorsSpiralTolerance(MSCX, MSCY, ColorsTPA, MyColor, MMX1, MMY1, MMX2,');
Writeln(' MMY2, 60);');
Writeln(' C1 := GetColors(ColorsTPA);');
Writeln(' C2 := High(C1);');
Writeln(' for i := 0 to C2 do');
Writeln(' begin');
Writeln(' if RS_OnMinimap(ColorsTPA[i].X, ColorsTPA[i].Y) then ');
Writeln(' begin');
Writeln(' TestColor := GetColor(ColorsTPA[i].X, ColorsTPA[i].Y);');
Writeln(' if SimilarColors(TestColor, MyColor, 50) then');
Writeln(' begin');
Writeln(' ColorToRGB(TestColor, R, G, B);');
Writeln(' ColorToHSL(TestColor, H, S, L);');
Writeln(' ColorToXYZ(TestColor, X, Y, Z);');
Writeln(' if InRange(R - G, '+inttostr(RGl) + ', ' +IntToStr(RGh)+ ') then');
Writeln(' if InRange(R - B, ' +IntToStr(RBl)+ ', ' +IntToStr(RBh)+ ') then');
Writeln(' if InRange(G - B, ' +IntToStr(GBl)+ ', ' +IntToStr(GBh)+ ') then');
Writeln(' if InRange(Round(S) - Round(H), '+inttostr(SH1) + ', ' +IntToStr(SHh)+ ') then');
Writeln(' if InRange(Round(L) - Round(H), ' +IntToStr(LHl)+ ', ' +IntToStr(LHh)+ ') then');
Writeln(' if InRange(Round(H) - Round(L), ' +IntToStr(HLl)+ ', ' +IntToStr(HLh)+ ') then');
Writeln(' if InRange(Round(X) - Round(Y), ' +IntToStr(XYl)+ ', ' +IntToStr(XYh)+ ') then');
Writeln(' if InRange(Round(Y) - Round(Z), ' +IntToStr(YZl)+ ', ' +IntToStr(YZh)+ ') then');
Writeln(' if GetColor(ColorsTPA[i].X + 2, ColorsTPA[i].Y + 2)');
Writeln(' = TestColor then');
Writeln(' if GetColor(ColorsTPA[i].X + 1, ColorsTPA[i].Y + 1)');
Writeln(' = TestColor then');
Writeln(' begin');
Writeln(' Writeln(''' +OutPutName+ ' = '' +Inttostr(TestColor));');
Writeln(' Result := TestColor;');
Writeln(' Exit;');
Writeln(' end;');
Writeln(' end;');
Writeln(' end;');
Writeln(' end;');
Writeln(' Writeln(' + Error +');');
Writeln(' Result := 0;');
Writeln(' end;');
Writeln('******************************************************************');
Writeln('~~~~~~~~~~~~~~ Dont forget to credit me! (Jethr0x) ~~~~~~~~~~~~~~~');
Writeln('******************************************************************');
end.

Magiic

2008-09-15 17:02:53

what but i didn't use that? btw ill be at my dads from thursday onwards ill probably check it then cya
edit;has anyone actually read cazax's guide cos i don't like people coming to false conclusions nicbaz *evils*

HyperSecret

2008-09-15 17:45:12

He followed Cazax's tutorial, there are few differences but the color values that are compared in the HSL are different. They are the same as Cazax's tutorial compares but different than what that script compares.

Gu3st...

2008-09-16 01:48:33

Thanks for pointing that out HyperSecret ;)
I didn't even know he was like that…

Back on-topic: When editing script, the applyer should post the edited script under the orginal one. So that the "teacher" can see what he edited.

Example:

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

What is the meaning to life?
42.

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

Programming Knowledge
Java

Other Communitys
Jagex forums.

How Long have You Played Runescape
16 years

Are you affilated in anyway with Jagex LTD?

Yep. I am Mod Mark.

—————————————————–
Please write down a paragraph about Yourself.

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

orginal

edited

NiCbaZ

2008-09-16 02:39:54

Oh ok my apologies.

Magiic

2008-09-16 10:45:53

thanks hyper, (lol i managed to make a quick check on this from my school pc they haven't banned srl so im lucky :))
edit:hyper i just looked through the script you posted and the things that are narcles are credited at te top but i only said base because i edited them a bit and thanks btw do you mind if i take that as the script ive got offline but the one thats up here ill leave the same?
edit2:sorry about the editing while in app even if im just sorting the standards ill do that now thanks zytex. (thats if i am allowed to edit at all?)
edit3:lol my mum forgot :P i can come back on

P1nky

2008-09-16 14:22:34

yes gj.
pretttty sure your in :P so no need to cross fingers nOw lol

Magiic

2008-09-16 14:35:21

really im still not sure lol id rather not get my hopes up and thanks :)

Gu3st...

2008-09-17 08:20:09

Usually only like 20-30 members vote, and right now you got 17 votes.. I think (and hope ;)) you get in.

Magiic

2008-09-17 10:44:33

thanks man btw who voted no nobody except hyper's posted why

Raskolnikov

2008-09-17 17:50:25

Yes! You know what your doing. Standards are something that can be fixed quickly.

Cut em2 it

Magiic

2008-09-18 10:58:07

thanks :)

Metagen

2008-09-18 21:22:38

People who vote no and don't say why just like to vote no because they are jealous of your script

Magiic

2008-09-19 17:44:29

ok thanks metagen lol

nielsie95

2008-09-20 11:25:13

Welcome, sir.