SRL Archive - Archive

metalanca - SRL Member Application Form


MetalancA

2009-01-17 04:55:07

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

What is the meaning to life?


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


Programming Knowledge


Other Communitys
Thegrandexchange.com, Sythe.org

How Long have You Played Runescape
3 years on and off

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

Well, my name is Alan, I'm a senior in high school in Southern California. I've applied for members once before, and I've learned a lot since then. I'm always looking for ways to improve my scripting, so I'm open to any suggestions you guys have. The script I'm applying with isn't complete, though only because I just didn't have the time to complete it, what with my tight study schedule. It compiles all right, and I hope it reflects what I know about scripting.

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

{=============================================================================}
{ }
{ _________________________________________________ }
{ |Name: DhideTanner | }
{ |Writer: Metalanca | }
{ |Category: Crafting | }
{ |Description: Tans black dragonhide at Al Kaharid | }
{ |Version: 1.0 | }
{ |SCAR: 3.15 Divi by Freddy1990 | }
{ |________________________________________________ | }
{ }
{=============================================================================}
{ Instructions }
{=============================================================================}
{ 1. Use he Runescape Client, Low Detail, Very Bright, Window Maximized. }
{ 2. Setup lines ' ' to ' ' including your runescape username and password. }
{ 3. Fill out your SRL STATS username and password. }
{ 4. Run the script logged out, It will log your character in. }
{ 5. Make sure you are in the Al-Kaharid bank. }
{ 6. IMPORTANT! Make sure you have your money in the very first slot in your }
{ bank AND have your Dhides in your second slot }
{ 7. Run with no money in your inventory }
{=============================================================================}

program DhideTanner;
{.include SRL/SRL.scar}

const
directionToRun='E';
yourSRLID=''; //Your SRL ID
yourSRLPW=''; //Your SRL Password


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

Players[0].Name := ''; //Your runescape username
Players[0].Nick := ''; //3-4 letters from your username
Players[0].Pass := ''; //Your runescape password
Players[0].Pin := ''; // Dun worry, you wont get haxed :)
Players[0].Strings[0] := 'akb'; //LEAVE THIS!! This tells the script that you are in Al Kaharid bank
Players[0].Strings[1] := 'black dragonhide'; //What kind of hides are you tanning? enter either: cowhide, green dragonhide, red dragonhide, blue, or black.
Players[0].Active := True;
{
Players[1].Name := ''; //Same thing applys here
Players[1].Pass := '';
Players[1].Nick := '';
Players[0].Pin := '';
Players[1].Strings[0] := 'akb';
Players[1].Strings[1] := 'black dragonhide';
Players[1].Active := True; }

MouseSpeed := 15;


end;


var x, y, coins, opx, opy, plant : integer;



Procedure DuntGetBanned; forward;

Procedure AntiRandoms;
begin
Findnormalrandoms;
FindNonInventoryRandoms;
FindInventoryRandoms;
end;

procedure CheckMoney; //Procedure Checkmoney, withdraws 50k from your runescape bank. If you dont have 50k in your bank? Gf. You're a noob.
begin
Coins := DTMFromString('78DA6394626060906440011F8FC8826946289' +
'F5113484831A001465435202DEA04D4F0000971026AF881843201' +
'353240829B801A0D2021825F0D0082760359');
if not LoggedIn then Exit;
if not (FindDTM(Coins, x, y, 3, 2, 759, 494)) then
if OpenBank(Players[CurrentPlayer].Strings[0], true, true) = true then //open bank
begin
wait(200+random(500));
InPin(Players[CurrentPlayer].Pin);
if (BankScreen = true) then
begin
Withdraw(1,1,50000);
wait(500+random(500));
closebank;
Antirandoms;
end;
end;
end;



Procedure WithdrawSt00f; //Withdraws black dragonhides.
begin
if not LoggedIn then Exit;
if OpenBank(Players[CurrentPlayer].Strings[0], true, true) = true then
wait(200+random(400));
SearchBank(players[CurrentPlayer].Strings[1])
wait(1000+random(500));
if (Players[CurrentPlayer].Strings[1]= 'black dragonhide') then
begin
if FindObj(x,y,'lack',2763309,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end else
if (Players[CurrentPlayer].Strings[1]= 'cowhide') then
begin
if FindObj(x,y,'owhide',11382456,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end else
if (Players[CurrentPlayer].Strings[1]= 'green dragonhide') then
begin
if FindObj(x,y,'reen ',672008,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end else
if (Players[CurrentPlayer].Strings[1]= 'blue dragonhide') then
begin
if FindObj(x,y,'lue ',5967371,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end else
if (Players[CurrentPlayer].Strings[1]= 'red dragonhide') then
begin
if FindObj(x,y,'ed ',528199,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end else
begin
cleardebug;
writeln('Please make sure you have hides in your bank before you run the script :)');
logout;
end;
Closebank;
Antirandoms;
Duntgetbanned;
if not invfull = true then
begin
writeln('You dont have any dhides left in your bank, Script Terminated');
Terminatescript;
end;
end;




Procedure Siggy; //Teh siggy. RAWR!
begin
cleardebug;
writeln('----- ___ _____ ___ -----');
writeln('----- /\ /\ | | /\ | /\ |\ | / /\ -----');
writeln('----- / \ / \ |___ | /__\ | /__\ | \ | | /__\ -----');
writeln('----- / \ / \ | | / \ | / \ | \ | | / \ -----');
writeln('----- / \/ \ |___ | / \ |____ / \ | \| \ ___ / \ -----');
writeln('----- -----');
writeln('----- -----');
wait(1000);
cleardebug;
writeln(' ____ ____ ');
writeln(' | \ | \ ');
writeln(' |____/ |____/ ');
writeln(' | | ');
writeln(' |roudly |resents ');
wait(1000);
Cleardebug;
writeln('DhideTanner DhideTanner DhideTanner DhideTanner DhideTanner ');
writeln(' DhideTanner DhideTanner DhideTanner DhideTanner DhideTanner ');
writeln(' DhideTanner DhideTanner DhideTanner DhideTanner DhideTanner ');
writeln(' DhideTanner DhideTanner DhideTanner DhideTanner ');
writeln(' DhideTanner DhideTanner DhideTanner ');
writeln(' DhideTanner DhideTanner DhideTanner DhideTanner ');
writeln(' DhideTanner ');
wait(2000);
cleardebug;
end;


Procedure DuntGetBanned; //some antiban. Feel free to add some more, you can never have too much antiban heh heh.
begin
case Random(30) of
1: RandomRClick;
2: HoverSkill('strength', False);
3: PickUpMouse;
4: SayCurrentLevels('strength');
5: RandomMovement;
6: BoredHuman;
7: SleepAndMoveMouse(500+random(3000));
8: MouseSpeed := MouseSpeed + Random(5) - Random(5);
9: FTWait(RandomRange(1,30));
10:
begin
GameTab(1+Random(6));
wait(1+random(400));
Wait(100+Random(6000)); // #10 from Hy's fightcaver :)
GameTab(4);
FindNormalRandoms;
end;
11: HoverSkill('random',False);


12: begin
if IsUpText('ptions') then
begin
GetMousePos(opx,opy);
Mouse(opx,opy,0,0,False);
ChooseOption('xamine')
end;
end;
end;
end;

function Sand: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 5996441, MMX1, MMY1, MMX2, MMY2, 22);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 9.07) and (H <= 9.38) and (S >= 19.28) and (S <= 30.06) and (L >= 44.69) and (L <= 52.37) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 18.31) and (X <= 27.84) and (Y >= 18.48) and (Y <= 27.61) and (Z >= 11.43) and (Z <= 15.19) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;






function Tannery: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 861772, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 4.24) and (H <= 10.79) and (S >= 56.17) and (S <= 97.64) and (L >= 9.59) and (L <= 25.12) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 1.35) and (X <= 7.62) and (Y >= 0.90) and (Y <= 6.48) and (Z >= 0.11) and (Z <= 1.73) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

procedure walk1;
begin
Plant := DTMFromString('78DA63E4666060E06240018649E2609A11CA6' +
'7140012FC04D40802091E54351A410CA86A8480043B0173788104' +
'0B01356C40828D805D1C4082978039207FF3E157030039C905B5');


if FindColorTolerance(x, y, Plant, MMX1, MMY1, MMX2, MMY2, 15) then
begin
Mouse(x, y, 2, 2, True);
DuntGetBanned;
wait(4000+random(500));
Fflag(10);
end else
if FindColorTolerance(x, y, Plant, MMX1, MMY1, MMX2, MMY2, 10) then
Begin
Mouse(x, y, 2, 2, True);
DuntGetBanned;
wait(4000+random(500));
Fflag(10);
end else
if (FindSymbol(x, y, 'cookery')) then
begin
Mouse(x, y, 5, 5, True);
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
if (FindSymbol(x, y, 'Kebab Shop')) then
begin
Mouse(x, y, 5, 5, True);
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
if radialwalk(Sand, 0, 50, 65, -1, 0) then
begin
Mouse(x, y, 5, 5, True);
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
if radialwalk(Sand, 0, 60, 50, -1, 0) then
begin
Mouse(x, y, 5, 5, True);
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
if radialwalk(Sand, 0, 40, 65, -1, 0) then
begin
Mouse(x, y, 5, 5, True);
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
begin
writeln('Could not find any symbols or the autowalk color');
terminatescript;
end;
end;

procedure walk2;
begin
if FindColorTolerance(x, y, 1068393, MMX1, MMY1, MMX2, MMY2, 15) then
Begin
Mouse(x, y, 2, 2, True);
DuntGetBanned;
wait(4000+random(500));
Fflag(10);
exit;
end else
if radialwalk(tannery, 310, 400, 65, -1, 0) then
begin
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
if radialwalk(tannery, 310, 410, 65, -1, 0) then
begin
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
if radialwalk(tannery, 300, 400, 70, -1, 0) then
begin
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
if radialwalk(tannery, 310, 4100, 60, -1, 0) then
begin
DuntGetBanned;
wait(1000+random(500));
Fflag(10);
exit;
end else
begin
writeln('could not find tannery symbol');
terminatescript;
end;
end;





Procedure Walktotannery; //All the stuff the script does when walking, antirandoms, antiban, messages, etc.
begin
if not LoggedIn then Exit;
Disguise('walking initiated');
Antirandoms;
Duntgetbanned;
setrun(true);
walk1;
Antirandoms;
walk2;
Antirandoms;
end;



Procedure FindEllis;

begin
if FindObjEx(x, y, ['Ellis', 'llis'], [5998055, 5208539], 5, 50, 8, 9, 753, 491) then
begin
Mouse(x, y, 2, 2, False);
wait(500+random(150));
Chooseoption('Trade');
writeln('Traded');
disguise('Found Ellis');
wait(5000+random(500));
exit;
end else
if FindObjEx(x, y, ['Ellis', 'llis'], [5076951, 4747209], 5, 50, 7, 5, 517, 339) then
begin
Mouse(x, y, 2, 2, False);
wait(50+random(150));
Chooseoption('Trade');
writeln('Traded');
disguise('Found Ellis');
wait(5000+random(500));
exit;
end else
if not FindObjEx(x, y, ['Elli', 'llis'], [4747209, 5076951], 5, 50, 7, 5, 517, 339) then
begin
if radialwalk(tannery, 270, 450, 60, -1, 0) then
begin
wait(5000+random(500));
Fflag(10);
exit;
end;
end else
if FindObjEx(x, y, ['Ellis', 'llis'], [5076951, 4747209], 5, 50, 7, 5, 517, 339) then
begin
Mouse(x, y, 2, 2, False);
wait(500+random(150));
Chooseoption('Trade');
writeln('Traded');
disguise('Found Ellis');
wait(5000+random(500));
exit;
end else
begin
writeln('could not find ellis');
terminatescript;
end;
end;




procedure TanHides;// this will find the tanner and trade him
var
x, y :integer;
begin
if not LoggedIn then Exit;
if (Players[CurrentPlayer].Strings[1]= 'black dragonhide') then
begin
if FindObjCustom(x, y, ['lack', 'hide'], [2368551, 3158068], 5) = true then
begin
if FindObjCustom(x, y, ['lack', 'hide'], [6316135, 2894896], 5) = true then
Mouse(X, Y, 1, 1, false);
Wait(500 + Random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['lack', 'hide'], [2631723, 6250342], 5) = true then
begin
Mouse(X, Y, 1, 1, false);
Wait(500 + Random(150));
ChooseOption('All');
end else
begin
writeln('Could not tan dhides.');
terminatescript;
end;
exit;
end else
if (Players[CurrentPlayer].Strings[1]= 'cowhide') then
begin
if FindObjCustom(x, y, ['ard', 'rd '], [11448249, 10921650], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['ard', 'rd '], [11579578, 11448249], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['ard', 'rd '], [10987699, 13224400], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if (Players[CurrentPlayer].Strings[1]= 'green dragonhide') then
begin
if FindObjCustom(x, y, ['ree', 'een '], [806154, 739337], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
begin
if FindObjCustom(x, y, ['ree', 'een '], [1007628, 872970], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['ree', 'een '], [941067, 672264], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if (Players[CurrentPlayer].Strings[1]= 'blue dragonhide') then
if FindObjCustom(x, y, ['lue', 'lue '], [6032907, 6623245], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['lue', 'lue '], [10891797, 5705227], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['lue', 'lue '], [5377290, 11482390], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if (Players[CurrentPlayer].Strings[1]= 'red dragonhide') then
if FindObjCustom(x, y, ['red', 'ed '], [593736, 527938], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['red', 'ed '], [857701, 659533], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
if FindObjCustom(x, y, ['red', 'ed '], [857701, 659533], 5) = true then
begin
Mouse(x, y, 1, 1, false);
wait(500+random(150));
ChooseOption('All');
end else
begin
writeln('Could not tan dhides.');
terminatescript;
end;
exit;
end;
end;
end;
end;





begin
siggy;
SetupSRL;
declarePlayers;
Activateclient;
if not (loggedin) then loginplayer;
Disguise('Logging in player...');
duntgetbanned;
Setangle(true);
Checkmoney;
Withdrawst00f;
walktotannery;
FindEllis;
Tanhides;
end.

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

benjaa

2009-01-17 05:02:27

use cases for which hide you're using

also add
multiplayer
mainloop

script could be shortened alot

i also despise the way you name your procedures, but that's just my opinion and it will not effect the way i vote whatsoever

holding vote, looking through all your srl posts…

Richard

2009-01-17 05:17:53

I've been away from SRL for quite a while, so I don't know what the current standards are, and its been over half a year since I scripted myself, so I'm not going to vote just yet, I'll wait and see what other people think.

One thing I did notice was in your WithdrawSt00f and TanHides procedures, you had alot of ifs and end elses when you could have had it in a case to shorten and simplify it alot:

Procedure WithdrawSt00f;    //Withdraws black dragonhides.
begin
if not LoggedIn then Exit;
if OpenBank(Players[CurrentPlayer].Strings[0], true, true) = true then
wait(200+random(400));
SearchBank(players[CurrentPlayer].Strings[1])
wait(1000+random(500));
Case (Players[CurrentPlayer].Strings[1]) of
'black dragonhide' : begin
if FindObj(x,y,'lack',2763309,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'cowhide' : begin
if FindObj(x,y,'owhide',11382456,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'green dragonhide' : begin
if FindObj(x,y,'reen ',672008,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'blue dragonhide' : begin
if FindObj(x,y,'lue ',5967371,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'red dragonhide' : begin
if FindObj(x,y,'ed ',528199,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
Closebank;
Antirandoms;
Duntgetbanned;
if not invfull = true then
begin
writeln('You dont have any dhides left in your bank, Script Terminated');
Terminatescript;
end;
end;


Good luck with your apllication!

MetalancA

2009-01-17 05:26:30

From: Richard
I've been away from SRL for quite a while, so I don't know what the current standards are, and its been over half a year since I scripted myself, so I'm not going to vote just yet, I'll wait and see what other people think.

One thing I did notice was in your WithdrawSt00f and TanHides procedures, you had alot of ifs and end elses when you could have had it in a case to shorten and simplify it alot:

Procedure WithdrawSt00f;    //Withdraws black dragonhides.
begin
if not LoggedIn then Exit;
if OpenBank(Players[CurrentPlayer].Strings[0], true, true) = true then
wait(200+random(400));
SearchBank(players[CurrentPlayer].Strings[1])
wait(1000+random(500));
Case (Players[CurrentPlayer].Strings[1]) of
'black dragonhide' : begin
if FindObj(x,y,'lack',2763309,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'cowhide' : begin
if FindObj(x,y,'owhide',11382456,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'green dragonhide' : begin
if FindObj(x,y,'reen ',672008,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'blue dragonhide' : begin
if FindObj(x,y,'lue ',5967371,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
'red dragonhide' : begin
if FindObj(x,y,'ed ',528199,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end;
Closebank;
Antirandoms;
Duntgetbanned;
if not invfull = true then
begin
writeln('You dont have any dhides left in your bank, Script Terminated');
Terminatescript;
end;
end;


Good luck with your apllication!


Thanks! Those look a lot less complicated lol. I'll be sure to use them in my next scripts :)

Richard

2009-01-17 05:30:03

Just to let you know it may not work as its been way too long since I last scripted, you may have to edit it to see if it works.

I decided I'll give you a yes, as it seems you know most of what you're doing.

MetalancA

2009-01-17 05:40:02

From: Richard
Just to let you know it may not work as its been way too long since I last scripted, you may have to edit it to see if it works.

I decided I'll give you a yes, as it seems you know most of what you're doing.


Thanks, I'll check it out :)

NiCbaZ

2009-01-17 05:54:14

Hmm no, could of been lots shorter with cases, no credit to aca…

Naum

2009-01-17 05:55:04

Definately Yes!

jakeyboy29

2009-01-17 06:41:05

From: Richard
I've been away from SRL for quite a while, so I don't know what the current standards are, and its been over half a year since I scripted myself, so I'm not going to vote just yet, I'll wait and see what other people think.



Good luck with your apllication!


nice to see you again

and i vote yes.

sirlaughsalot

2009-01-17 07:08:25

No cases, only 1 dtm to speak of and its not for walking, no TPA's, Autocolor was made using ACA (As in you most likely dont know how to make autocoloring yourself), no backup for walking. I am going to have to say no.

Quickmarch

2009-01-17 08:00:11

Sorry it looks too simple. No. :)

boberman

2009-01-17 09:50:12

No from me, though it isn't TOO far off.

Here are the main problems that I saw with it.
  if (Players[CurrentPlayer].Strings[1]= 'black dragonhide') then
begin
if FindObj(x,y,'lack',2763309,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end else

You have a lot of statements that look like this (and then have 40 different options.). It repeats code over and over and over again. If you have something or somewhere where you are repeating the exact same code more then once, you should definitely consider making that code into a function rather then a long if then statement, something like this.

function findMyObj(theObj : string, itsColor : integer) : boolean;
begin
if FindObj(x,y,theObj,itsColor,7) then
begin
mouse(x,y,0,0,false);
Chooseoption('All');
Result := true;
end else
Result := false;
CloseBank;
end;

This will shorten your code a lot, which is a good thing in most cases. It will allow you to just call the function, if the function fails to find the object, you now have a chance to call another function. So you could now put that extra code space to good use and make an new failsafe function (dtm based inventory finding would be good).

Speaking of that code, its a minor bug, but a bug none the less, where you have " if FindObj(x,y,theObj,itsColor,7) then" you put in no begin after that. This means "if this then do the next line". since the next line is just "mouse(x,y,0,0,false);", "Chooseoption('All');" Will always be called, even if the object isn't there. Now, it isn't such a big deal as the code will simply say "nothings there" but it is a bad habit to get into. What if one day the code for some reason decides this is serious enough to terminate the script? Then all the sudden your script is dieing any you have no why of knowing exactly why that is.

Your Sand and Tannery function are EXACTLY the same. Rather then having two functions that do the same thing, why not create one function that you pass parameters in?

You have some failsafes, but not where it counts really. Walking is one of the most common failure points, so you should almost always have a backup walking procedure. You finding Ellis uses the same method (and the same code) many times, rather then doing that, think up a different method for finding Ellis. If one method is failing frequently, a different method is in order.

Your Ellis code, I would say making it into a loop would be better in the long run (I didn't see any loops in your script, the usage of loops is an ESSENTIAL skill for programming). Basically, if you are ever repeating code more then once, you should consider either making it into its own function, or making it into a loop.

I didn't expect you to do everything that I just said above, those are suggestions for making the script a lot better. It was the combination of the things mentioned above that made me vote no. Repeated code especially makes my skin crawl (you might have gotten away with one or two instances, however, most of your code is a repeat of itself).

Practice splitting code off into functions, making functions that take parameters (you don't have any), and doing loops, then apply again and we'll see where you measure up to :). Also, through in some more backup procedures (IE failsafes). Every time you look for something you should have some sort of failsafe in place just in case that fails.

Iroki

2009-01-17 10:33:32

Yes for me, you can script but you need to learn some more staffs :)

Illkillutill

2009-01-17 10:49:09

No from me. No credit to ACA for the autocoloring functions and it could be shortened up a lot. I think you show some knowledge, but not enough to be a member just yet. Look up some more tutorials and try again in 2 weeks if you don't get in. Good luck.

Dervish

2009-01-17 11:23:34

Auto color aid is a good tool, however, don't use it in applications. :(

Could be shortened by cases…


Grade : 35/100.

Sorry : no

WT-Fakawi

2009-01-17 11:26:54

boberman is right in every aspect of his reply. If you see code coming back more than once, you should try to make a function from it. Some of your code will get the player stuck or at least make the player behave odd. Always try to make failsafes, break out of loops, log out in case of anything going wrong… It is a hostile environment out there.

Yes nevertheless.

NCDS

2009-01-17 12:44:49

What Happens If Both of these Fail?

if not (FindDTM(Coins, x, y, 3, 2, 759, 494)) then
if OpenBank(Players[CurrentPlayer].Strings[0], true, true) = true then //open bank

My suggestion would be to look into FailSafes more along with ways to just "Tighten" everything up.
You Do have

if not LoggedIn then
Exit;
Before most of your procedures which is good tho.

The script is not finished :/
At this point I cant gather enough from your script to really make my vote a yes.
Sorry, but I would like to see you apply here again sometime if you dont get it this time.
Good Luck! and Im always free to help!

Nava2

2009-01-17 13:44:51

Nope, try looking into for loops, as well as into cases.

I see people have mentioned the cases but a for loop can be better than even a new function.

Good try.

Scaper

2009-01-17 15:18:29

yes from me looks like you know what you are doing/haveto be doing lots of room for approvemnt

good luck man yes

MetalancA

2009-01-17 17:20:16

From: boberman
No from me, though it isn't TOO far off.

Here are the main problems that I saw with it.
  if (Players[CurrentPlayer].Strings[1]= 'black dragonhide') then
begin
if FindObj(x,y,'lack',2763309,7) then
mouse(x,y,0,0,false);
Chooseoption('All');
Closebank;
exit;
end else

You have a lot of statements that look like this (and then have 40 different options.). It repeats code over and over and over again. If you have something or somewhere where you are repeating the exact same code more then once, you should definitely consider making that code into a function rather then a long if then statement, something like this.

function findMyObj(theObj : string, itsColor : integer) : boolean;
begin
if FindObj(x,y,theObj,itsColor,7) then
begin
mouse(x,y,0,0,false);
Chooseoption('All');
Result := true;
end else
Result := false;
CloseBank;
end;

This will shorten your code a lot, which is a good thing in most cases. It will allow you to just call the function, if the function fails to find the object, you now have a chance to call another function. So you could now put that extra code space to good use and make an new failsafe function (dtm based inventory finding would be good).

Speaking of that code, its a minor bug, but a bug none the less, where you have " if FindObj(x,y,theObj,itsColor,7) then" you put in no begin after that. This means "if this then do the next line". since the next line is just "mouse(x,y,0,0,false);", "Chooseoption('All');" Will always be called, even if the object isn't there. Now, it isn't such a big deal as the code will simply say "nothings there" but it is a bad habit to get into. What if one day the code for some reason decides this is serious enough to terminate the script? Then all the sudden your script is dieing any you have no why of knowing exactly why that is.

Your Sand and Tannery function are EXACTLY the same. Rather then having two functions that do the same thing, why not create one function that you pass parameters in?

You have some failsafes, but not where it counts really. Walking is one of the most common failure points, so you should almost always have a backup walking procedure. You finding Ellis uses the same method (and the same code) many times, rather then doing that, think up a different method for finding Ellis. If one method is failing frequently, a different method is in order.

Your Ellis code, I would say making it into a loop would be better in the long run (I didn't see any loops in your script, the usage of loops is an ESSENTIAL skill for programming). Basically, if you are ever repeating code more then once, you should consider either making it into its own function, or making it into a loop.

I didn't expect you to do everything that I just said above, those are suggestions for making the script a lot better. It was the combination of the things mentioned above that made me vote no. Repeated code especially makes my skin crawl (you might have gotten away with one or two instances, however, most of your code is a repeat of itself).

Practice splitting code off into functions, making functions that take parameters (you don't have any), and doing loops, then apply again and we'll see where you measure up to :). Also, through in some more backup procedures (IE failsafes). Every time you look for something you should have some sort of failsafe in place just in case that fails.


Wow very detailed post :) I appriciate the advice, I kever knew i could turn all that junk into a function lol :duh:
I'll be sure to add more walking failsafes, loops, simpler functions instead of long coding, and TPA's (And don't forget DTM's!) in my next application script :)

Magiic

2009-01-17 18:30:01

yes, although coins change shape, 1 dtm won't work ;).

Gu3st...

2009-01-19 06:10:45

Yes

Torrent of Flame

2009-01-21 09:42:48

I vote yes.

kitchenrange

2009-01-21 09:57:44

i vote no mostly because im trying to uphold the standards that were used to get me in… When I applied with a script like that, it was a stiff no. You are well on your way but in my opinion, you need another month of learning.

Dervish

2009-01-21 10:26:34

Kitchen : was it more than two weeks since you got accepted ?

Bam Bam

2009-01-21 13:22:50

Yes… I see creativity in this script. And clever circumvention of loopage xD

I nearly cried when I saw that ACA aid is responsible for all the looping in your script. Loops are very useful elements of any type of code.

But, you need to work on your failsafes. Like if the bank doesn't actually open try again don't go on to search the bankscreen (which doesn't exist).

-Bam Bam

mixster

2009-01-22 12:05:05

Plant := DTMFromString('78DA63E4666060E06240018649E2609A11CA6' +
'7140012FC04D40802091E54351A410CA86A8480043B0173788104' +
'0B01356C40828D805D1C4082978039207FF3E157030039C905B5');
if FindColorTolerance(x, y, Plant, MMX1, MMY1, MMX2, MMY2, 15) then
Using DTM's for colour finding usually doesn't work too well.

Similarly, you don't loop your mainloop - it will only run once! It also appears that it won't leave the player back at the bank, so you wouldn't be able to loop it and have it run for more than one load anyway.
Likewise, in DuntGetBanned, you add Random(5) then remove Random(5) from the MouseSpeed - consider if luck would have it that it always added 4 removed 0 - this would lead to an overly high and suspicious mouse speed or the opposite of adding 0 then removing 4 leading to a very slow mouse speed - instead store the original mouse speed at the beginning (e.g. var initMouseSpeed := MouseSpeed) then set a random value ontop of that (MouseSpeed := initMouseSpeed + Random(5) - Random(5)) - this way it will only vary by 4+/- at the most

Most other flaws have already been pointed out.

However, few people seem to have picked out the positives.
With a bit of editing, the script could quite easily fully support multiplayer - just a bit of NextPlayer(false) instead of terminate script and the like
Actions are backed up, even if they aren't prone to failure as much as others.
There's a small AntiBan section.
The script is divided nicely into modules

Tootoot222

2009-01-22 16:09:36

I'm going to vote no for the reasons that boberman posted; + no multiplayer