SRL Archive - Archive

cycrosism - SRL Member Application


cycrosism

2009-04-20 13:43:32

How Long have You Played Runescape?
6 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
No


What is your general programming knowledge?
Visual Basic and A little bit of java


Are you a member of any other communities?
RSbot, Scythe, MoparScape, rs-hacking and Freddy1990.


Tell us about yourself…
From: cycrosism
My name is Mark and for a hobby I enjoy using computers and gardening. For my school electives I chose Programming, Animation, Agricultue and IT. Last year I got an A in computer programming and A+ in IT. In my spare time I go on my computer or tend to my garden which has various plants in it. I also play 2 sports which is Cricket and Basketball which I also enjoy and I play with my friends during school too.



Please give show us one of your scripts.
{My latest script (and my best one too) would have to be "Drain Willows" Which is my Draynor willow chopper and banker.

The best progress report posted so far is

Worked for 15 Hours, 23 Minutes and 6 Seconds
Gained 665280 Exp
Chopped 9856 Willows
Gained 10 Levels}

//Main Script is below

program Drain_willows; {Version 5.4}
{.include SRL/SRL/Misc/Smart.scar}
{.Include SRL\SRL.SCAR}
{.Include SRL\SRL\skill\WoodCutting.scar}

Var
logs,logxp,Levels,dtm,x,y:Integer;

const
member = false; //True if using a member world

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players?
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters of name
Players[0].Pin := ''; //bank Pin
Players[0].Booleans[0] := true; //true if weilding an axe
Players[0].Booleans[1] := true; //true if using sleep
Players[0].Integers[1] := 10; //Switch players/relog after how many loads?
Players[0].BoxRewards := ['XP']; //Use the random event box on what?
Players[0].Active := True;
{
Players[1].Name := ''; //username
Players[1].Pass := ''; //password
Players[1].Nick := ''; //3-4 letters of name
Players[1].Pin := ''; //Bank Pin
Players[1].Booleans[0] := true; //true if weilding the axe
Players[1].Booleans[1] := true; //true if using sleep
Players[1].BoxRewards := ['XP']; //Use the random event box on what?
Players[1].Active := True;
}{
Players[2].Name := ''; //username
Players[2].Pass := ''; //password
Players[2].Nick := ''; //3-4 letters of name
Players[2].Pin := ''; //Bank Pin
Players[2].Booleans[0] := true; //true if weilding the axe
Players[2].Booleans[1] := true; //true if using sleep
Players[2].BoxRewards := ['XP']; //Use the random event box on what?
Players[2].Active := True;
}{
Players[3].Name := ''; //username
Players[3].Pass := ''; //password
Players[3].Nick := ''; //3-4 letters of name
Players[3].Pin := ''; //Bank Pin
Players[3].Booleans[0] := true; //true if weilding the axe
Players[3].Booleans[1] := true; //true if using sleep
Players[3].BoxRewards := ['XP']; //Use the random event box on what?
Players[3].Active := True;}

end;

procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(240) of
0: Begin
RandomRClick;
wait(1000+random(1000));
end;
1: HoverSkill('random', False);
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: If (Players[CurrentPlayer].Booleans[1] = true) then
Begin
Writeln('Sleeping');
SleepAndMoveMouse(1000+random(9000));
Writeln('Finished sleeping');
end;
end;
end;

Procedure AntiRandom;
begin
FindNormalRandoms;
If (FindFight = True) then
begin
runaway('E',true,1,5000+random(2000));
end;
end;

procedure DeathWalk;
Var
x,y,hometele:integer;
begin
If not loggedin then exit;
Cleardebug;
Writeln('Unable to find water color or bank symbol or fishing symbol');
If(TabExists(7)) then
begin
Writeln('Death walk activated');
GameTab(7);
wait(700+random(700));
end else AntiRandom;
HomeTele := DTMFromString('78DA63FCC3CCC07087910119FCFDF70F4CC34' +
'4197F01D53C4655D3D7FB1955CD4FA09AEBA86AAAAA7EA0AA6160214' +
'ECD03026AFE12E19EAF98FEC2500332E7320135AC40F7DCC6AF06003' +
'B5820DA');
if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true);
Writeln('Found Home Teleport DTM!');
FreeDTM(HomeTele);
wait(1000);
End else begin
Writeln('Could not find Home Teleport DTM!');
wait(500+random(500));
end;
If (FindBlackChatMessage('need to wait')) then
Repeat
Writeln('We need to wait before casting this spell');
FreeDTM(HomeTele);
Logout;
Writeln('Waiting 5 minutes');
wait(60000*5);
Loginplayer;
if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true);
end else
if(FindBitmap(Hometele,x,y)) then
begin
Mouse(X+(11), Y+(10), 10, 10,true);
end else
begin
Mouse(571,228,12,12,true);
end;
wait(1000+random(500));
Until(not(FindBlackChatMessage('need to wait')));
begin
Writeln('Looking for Home Teleport Bitmap');
wait(200+random(200));
HomeTele := BitmapFromString(24, 24, 'beNpzMPFwGDKIgYE' +
'RDZFtSF/vZzgi1ShME8gwDdkQUSF9NESkUZiGVFX9gCPijUI2BNkE' +
'NNPgRuF3DLJLTE3y4AjNVVidhMuQv//+QaSADGKMwvQRUBdEO9wcI' +
'IlsFFbfoZkDMQTTHLhRZJgDR2SYQ56/vFysqBXOZMc70A3USocQo5' +
'ANpCRfAM2BGOVsbQhEVMmn5JQbduSXY3Av0K1cJck6sk3AogYAZGI' +
'N/w==');
if(FindBitmap(Hometele,x,y)) then
begin
Mouse(X+(11), Y+(10), 10, 10,true);
Writeln('Clicked Bitmap');
FreeBitmap(HomeTele);
end else begin
Writeln('Could not find Bitmap!');
FreeBitmap(HomeTele);
wait(500+random(500));
Writeln('Using last resort');
Mouse(571,228,12,12,true);
If (FindBlackChatMessage('need to wait')) then
Repeat
Writeln('We need to wait before casting this spell');
Logout;
Writeln('Waiting 5 minutes');
wait(60000*5);
Loginplayer;
if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true);
end else
begin
Mouse(571,228,12,12,true);
end;
wait(1000+random(500));
Until(not(FindBlackChatMessage('need to wait')));
end;
wait(17500+Random(5000));
Writeln('Walking Back');
Makecompass('n');
SetAngle(True);
Setrun(true);
RadialRoadWalk(FindLumbyRoadColor,30,80,65,1,1);
RadialRoadWalk(FindLumbyRoadColor,340,0,50,1,1);
RadialRoadWalk(FindLumbyRoadColor,270,345,60,1,1);
RadialRoadWalk(FindLumbyRoadColor,240,330,40,1,1);
RadialRoadWalk(FindLumbyRoadColor,240,330,40,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,180,300,60,1,1);
RadialWalk(FindDirtRoadColor,180,300,60,1,1);
RadialWalk(FindDirtRoadColor,180,300,60,1,1);
RadialRoadWalk(FindRoadColor,270,360,60,1,1);
RadialRoadWalk(FindRoadColor,270,360,60,1,1);
Cleardebug;
SymbolAccuracy := 0.4;
If(FindSymbol(x, y, 'bank')) then
Begin
Writeln('We returned to the Draynor bank');
Mouse(x, y, 4, 4, True);
FFlag(10);
symbolAccuracy := 0.4;
if(FindSymbol(x, y, 'bank')) then
begin
mouse(x-30,y+30,6,6,true);
FFlag(10);
end else RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
Gametab(4);
end else
begin
Writeln('Could not find the bank symbol');
wait(500+random(500));
Writeln('Switching Players');
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
end;
end;

procedure ChopWillow;
var
Tree: array [0..3] of integer;
x, y, z:Integer;
begin
AntiRandom;
Tree[0] := 3757641
Tree[1] := 3301454
Tree[2] := 2834486
if not (LoggedIn) then Exit;
if (InvFull) then
Begin
If(Players[CurrentPlayer].Booleans[0] = true) Then
Begin
Logs:= Logs+28;
Logxp := Round(Logs*67.5);
End Else
Begin
Logs:= Logs+27;
Logxp := Round(Logs*67.5);
end;
end;
SetRun(True);
Repeat
if (FindObj(x, y, 'illo', Tree[z],20)) then
begin
MMouse(x, y, 5, 5);
end;
if(isuptext('illo')) then
begin
Mouse(x,y,1,1,true);
wait(2000);
end;
Repeat
If (Not(Loggedin)) Then exit;
FindBirdsNest;
wait(500);
Antiban;
Antirandom;
If (ClickContinue(true, true)) then
begin
Levels:= Levels+1;
ClickContinue(true, true);
end;
If (FindBlackChatMessage('you are dead')) then
Begin
Writeln('You died');
Deathwalk;
end;
Until(not(isuptext('illo'))) or (InvFull)
Until(InvFull)
If(Players[CurrentPlayer].Booleans[0] = true) Then
Begin
Logs:= Logs+28;
Logxp := Round(Logs*67.5);
End Else
Begin
Logs:= Logs+27;
Logxp := Round(Logs*67.5);
end;
end;

procedure ProgressReport;
Begin
ClearDebug;
Writeln('-------------------------------');
Writeln('Worked for '+TimeRunning);
If(Players[CurrentPlayer].Booleans[0] = true) Then Begin
Writeln('Gained ' + FloatToStr(Logxp) + ' Exp');
End Else Begin
Writeln('Gained ' + FloatToStr(Logxp) + ' Exp');
End;
Writeln('Chopped '+IntToStr(Logs)+' Willows');
Writeln('Gained ' + IntToStr(Levels) + ' Levels');
Writeln('-------------------------------');
end;

function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
MakeCompass('n');
dtmMainPoint.x := 666;
dtmMainPoint.y := 180;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindRockColor;
dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 666;
dtmSubPoints[0].y := 180;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 6643801;
dtmSubPoints[0].Tolerance := 60;

dtmSubPoints[1].x := 674;
dtmSubPoints[1].y := 181;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 2262385;
dtmSubPoints[1].Tolerance := 65;

dtmSubPoints[2].x := 668;
dtmSubPoints[2].y := 175;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 2262385;
dtmSubPoints[2].Tolerance := 65;

dtmSubPoints[3].x := 658;
dtmSubPoints[3].y := 180;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 2262385;
dtmSubPoints[3].Tolerance := 65;

dtmSubPoints[4].x := 665;
dtmSubPoints[4].y := 187;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 2262385;
dtmSubPoints[4].Tolerance := 65;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

Procedure WalkToWillow;
begin
If (not(loggedin)) then exit;
If(FindDTM(SetDDTM,x,y,MMX1,MMY1,MMX2,MMY2)) then
begin
FindDTM(SetDDTM,x,y,MMX1,MMY1,MMX2,MMY2);
Mouse(x-(10),y,12,12,true);
FFlag(10);
end else begin
Writeln('Could not find DDTM');
symbolAccuracy := 0.7;
if(FindSymbol(x, y, 'bank')) then
begin
mouse(x-30,y+30,6,6,true);
FFlag(10);
end else
begin
Writeln('Could not find willows');
wait(700);
writeln('Looking for water color');
RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
if (not(RadialWalk(FindWaterColor, 180, 270, 60, -1, 0))) then
begin
If(FindSymbol(x,y, 'Bank')) then
begin
Mouse(x,y,7,7,true);
FFlag(10);
end else
if (FindSymbol(x, y, 'fishing spot')) then
begin
Mouse(x,y,7,7,true);
FFlag(10);
end else
begin
ClearDebug;
DeathWalk;
end;
end;
end;
end;
end;

procedure Bank;
begin
if not loggedin then exit;
Setrun(true);
symbolAccuracy := 0.7;
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 5, 5, True);
Writeln('Found Bank Symbol');
FFlag(7);
OpenBankQuiet('db');
If(Players[CurrentPlayer].Booleans[0] = true) Then
Begin
DepositAll;
Closebank;
ProgressReport;
End Else
Begin
Deposit(2, 28, True);
CloseBank;
ProgressReport;
end;
end else
begin
writeln('Could not find bank symbol');
Wait(600);
Writeln('Trying again');
begin
symbolAccuracy := 0.2;
if (FindSymbol(x, y, 'bank')) then
Begin
Mouse(x, y, 5, 5, True);
FFlag(7);
OpenBankQuiet('db');
If(Players[CurrentPlayer].Booleans[0] = true) Then
Begin
DepositAll;
Closebank;
ProgressReport;
End Else
Begin
Deposit(2, 28, True);
CloseBank;
ProgressReport;
end;
end else
begin
ClearDebug;
DeathWalk;
end;
end;
end;
end;

Procedure SetupSmart;
Begin
Writeln('Loading SMART');
SmartSetupEx(23, member, true, false);
wait(3000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
Cleardebug;
Writeln('SMART loaded');
end;

procedure MainLoop;
var
Reps:Integer;
begin
If(not(loggedin)) then loginplayer;
Reps:=0;
repeat
Reps:=Reps+1;
Walktowillow;
ChopWillow;
Bank;
until(Reps>=Players[0].Integers[1]) or (AllPlayersInactive) or (not(loggedin));
if (AllPlayersInactive) then
begin
Logout;
Cleardebug;
ProgressReport;
Writeln('All players are inactive');
wait(500+random(500));
Writeln('Thank you for using Drain Willows!');
TerminateScript;
end;
If (Reps>=Players[0].Integers[1]) then
begin
Reps:=0;
Nextplayer(True);
end;
If(not(loggedin)) then
Begin
If (AllPlayersInactive) then
begin
ClearDebug;
ProgressReport;
Writeln('All players are inactive');
wait(500+random(500));
Writeln('Thank you for using Drain Willows!');
TerminateScript;
end else
loginplayer;
end;
end;

Procedure SetupScript;
Begin
Cleardebug;
SetupSRL;
Cleardebug;
SetupSmart;
DeclarePlayers;
If (not(loggedin)) then
begin
Loginplayer;
end;
makecompass('n');
SetAngle(True);
end;

begin
Setupscript;
Repeat
Mainloop;
Until(AllPlayersInactive);
end.

NCDS

2009-04-20 16:39:55

Things Like:

If (FindFight = True) then

Can be shortened into:

If FindFight then


No FailSafe's??

RadialRoadWalk(FindLumbyRoadColor,30,80,65,1,1);
RadialRoadWalk(FindLumbyRoadColor,340,0,50,1,1);
RadialRoadWalk(FindLumbyRoadColor,270,345,60,1,1);
RadialRoadWalk(FindLumbyRoadColor,240,330,40,1,1);
RadialRoadWalk(FindLumbyRoadColor,240,330,40,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,200,300,60,1,1);
RadialWalk(FindDirtRoadColor,180,300,60,1,1);
RadialWalk(FindDirtRoadColor,180,300,60,1,1);
RadialWalk(FindDirtRoadColor,180,300,60,1,1);
RadialRoadWalk(FindRoadColor,270,360,60,1,1);
RadialRoadWalk(FindRoadColor,270,360,60,1,1);


You forgot to free your "Home Tele" DTM.

Standards got pretty messy in some areas.


Overall I would say to make sure you add as many FailSafe's as possible pretty much, Standards arent a big deal really, and read up on some more complex code. The whole things is pretty simple right now.

I have to go with 'no' this time, Sorry but good attempt!

Iron Man

2009-04-21 03:56:27

You should write some procedures into a boolean function, that way you can see if it did it and logout or something if it failed. (you already are, but this could save some lines as it wouldn't be repeated if you use a case or something) This way you could also do a Continue; in the mainLoop for when you're going through the looping of the procedures incase it failed and it deathWalked or something.

Add some randomness to those un-random waits you have!

You forgot to have a if not loggedIn then exit in a few areas, add these to them. Only the ones that require you to be logged in for them, procedures such as progressReport don't need it. :p

In a few spots you have an unnecessary begin/end such as your antiRandoms can be shortened down to (and changed the standards and added the if not loggedIn then exit):

Procedure AntiRandom;
begin
if not LoggedIn then exit;
FindNormalRandoms;
if (FindFight) then
runaway('E',true,1,5000+random(2000));
end;

In your deathWalk procedure:

If(TabExists(7)) then
begin
Writeln('Death walk activated');
GameTab(7);
wait(700+random(700));
end else AntiRandom;

Ok, it will go on if it finds the antiRandom, I think you're going to want to exit so that it's not going to look for the home symbol if it's not on the gameTab, or if you're in Draynor already.


HomeTele := DTMFromString('78DA63FCC3CCC07087910119FCFDF70F4CC34' +
'4197F01D53C4655D3D7FB1955CD4FA09AEBA86AAAAA7EA0AA6160214' +
'ECD03026AFE12E19EAF98FEC2500332E7320135AC40F7DCC6AF06003' +
'B5820DA');
if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true);
Writeln('Found Home Teleport DTM!');
FreeDTM(HomeTele);

It will only free the DTM if it finds it? Not such a good idea.



if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true);
end else
if(FindBitmap(Hometele,x,y)) then
begin
Mouse(X+(11), Y+(10), 10, 10,true);
end else
begin
Mouse(571,228,12,12,true);
end;

Can be shortened to:

if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
Mouse(X, Y, 10, 10,true)
else begin
if(FindBitmap(Hometele,x,y)) then
Mouse(X+11, Y+10, 10, 10,true)
else
Mouse(571,228,12,12,true);
end;

For that findBitmap you haven't even loaded to a bitmap yet, so.. yeah.



Until(not(FindBlackChatMessage('need to wait')));
begin
Add a time marker or something for that loop. As for that begin, I think you'll need a boolean before and an else? (you'll see once you look at the procedure, it's not an else for the repeat, otherwise it's kind of a pointless begin afaik?)

For that bitmap you'll probably need tolerance -
function FindBitmapTolerance(Bitmap: Integer; var x, y: Integer; Tol: Integer): Boolean;


end else begin
Writeln('Could not find Bitmap!');
FreeBitmap(HomeTele);
wait(500+random(500));
Writeln('Using last resort');
Mouse(571,228,12,12,true);

You should have an end there, so it won't just wait if it clicks using a set point.

Write a function that does that wait system for the 'need to wait'. That way you can save yourself some repeated lines.

For those radialWalks, I told you to use failsafes on IRC! The very least to do is add a logout and exit.

Do something like:

var i: integer; a: boolean;
for i := 0 to 13 do //I think 13's right
begin
case i of
0: a := RadialRoadWalk(FindLumbyRoadColor,30,80,65,1,1);
1: a := RadialRoadWalk(FindLumbyRoadColor,340,0,50,1,1);
2: a := RadialRoadWalk(FindLumbyRoadColor,270,345,60,1,1);
3: a := RadialRoadWalk(FindLumbyRoadColor,240,330,40,1,1);
4: a := RadialRoadWalk(FindLumbyRoadColor,240,330,40,1,1);
5: a := RadialWalk(FindDirtRoadColor,200,300,60,1,1);
6: a := RadialWalk(FindDirtRoadColor,200,300,60,1,1);
7: a := RadialWalk(FindDirtRoadColor,200,300,60,1,1);
8: a := RadialWalk(FindDirtRoadColor,200,300,60,1,1);
9: a := RadialWalk(FindDirtRoadColor,180,300,60,1,1);
10: a := RadialWalk(FindDirtRoadColor,180,300,60,1,1);
11: a := RadialWalk(FindDirtRoadColor,180,300,60,1,1);
12: a := RadialRoadWalk(FindRoadColor,270,360,60,1,1);
13: a := RadialRoadWalk(FindRoadColor,270,360,60,1,1);
end;
if (not(a)) then
begin
Logout;
Exit;
end;
end;
Edit as you need to, such as if you want to add another failsafe you could add another by a begin/end and another a := failSafeThing;. This way just saves you from doing a begin logout exit; for every one.

end else RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
Logout and exit or whatever for this too.


If(Players[CurrentPlayer].Booleans[0] = true) Then
Begin
Logs:= Logs+28;
Logxp := Round(Logs*67.5);
End Else
Begin
Logs:= Logs+27;
Logxp := Round(Logs*67.5);
end;
end;
Could just be:

Logs:= Logs+28;
If not(Players[CurrentPlayer].Booleans[0]) Then
Dec(Logs);
Logxp := Round(Logs*67.5);
Same thing goes for the one under it. Although, for this one don't you want to exit the procedure since it already has a full inventory?

With if (FindObj(x, y, 'illo', Tree[z],20)) then I don't think you're increasing z, so won't it look for tree[0] every time?

I don't think you're freeing SetDDTM in walkToWillow.

If(FindDTM(SetDDTM,x,y,MMX1,MMY1,MMX2,MMY2)) then
begin
FindDTM(SetDDTM,x,y,MMX1,MMY1,MMX2,MMY2);
What's the point of the second findDTM there?


RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
if (not(RadialWalk(FindWaterColor, 180, 270, 60, -1, 0))) then
That will walk twice, I'm not sure if you want that since it's a short walk (I'm really not 100%, you might be wanting to). Also, failsafes for the first one in case you do need the first one.


OpenBankQuiet('db');
Failsafes again! Try a repeat so it will try it like 3 times or something like until((bankScreen) or (i > 5));.

You could shorten the depositing to:

If(Players[CurrentPlayer].Booleans[0]) Then
DepositAll;
else
Deposit(2, 28, True);
CloseBank;
ProgressReport;


Well, I'm not exactly sure about what I should vote. You show the basic knowledge of SRL, but have a few bugs in your script.

I'll see some other comments and decide my vote later, maybe.

Good luck anyways. If you do not get in this time, make sure you keep trying, you're very close, so if so I'm sure you'll get in next time if you stick with it!

EDIT: Sorry for the standards in this post, copying and pasting from his thing messed things up. :(

EDIT2: Yes from me.

Nava2

2009-04-21 04:31:22

I'm going to have to say no.

You need to look into using loops more effectively. As well as using arrays. Here is your deathwalk function.

function DeathWalk: Boolean;
Var
x,y,hometele:integer;
i, ii, WalkColor: integer;
Info, Cols: TIntegerArray;
begin
Result := False;
if not loggedin then exit;
//Cleardebug; might want to see WHY you are death walking ;)
Writeln('Unable to find water color or bank symbol or fishing symbol');
GameTab(7);
//If(TabExists(7)) then This isnt necessary, GameTab calls if for you.
//begin
Writeln('Death walk activated');
wait(700+random(700));
//end else AntiRandom; not needed
HomeTele := DTMFromString('78DA63FCC3CCC07087910119FCFDF70F4CC34' +
'4197F01D53C4655D3D7FB1955CD4FA09AEBA86AAAAA7EA0AA6160214' +
'ECD03026AFE12E19EAF98FEC2500332E7320135AC40F7DCC6AF06003' +
'B5820DA');
if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true);
Writeln('Found Home Teleport DTM!');
//FreeDTM(HomeTele); You use it later on ;)
Wait(200 + Random(500)) ///wait(1000);
end else
begin
Writeln('Could not find Home Teleport DTM!');
wait(500+random(500));
Logout;
Exit;
end;
if (FindBlackChatMessage('need to wait')) then
repeat
Writeln('We need to wait before casting this spell');
//FreeDTM(HomeTele); Why are you freeing this here... ?
Logout; // You could also just antiban here... :)
Writeln('Waiting 5 minutes'); // Why not use GetLastChatText then get the part of the string that tells how many minutes?
Wait(60000*5);
Loginplayer;
if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
// begin
Mouse(X, Y, 10, 10,true)
else
// if(FindBitmap(Hometele,x,y)) then Its a DTM... o.O
// begin
// Mouse(X+(11), Y+(10), 10, 10,true);
// end else
//begin
Mouse(571,228,12,12,true);
// end;
wait(1000+random(500));
until(not(FindBlackChatMessage('need to wait'))); // Not a great failsafe.. You should do somethigna long the lines of looking for a symbol in Lumby
//begin
Writeln('Looking for Home Teleport Bitmap');
wait(200+random(200));
{HomeTele := BitmapFromString(24, 24, 'beNpzMPFwGDKIgYE' +
'RDZFtSF/vZzgi1ShME8gwDdkQUSF9NESkUZiGVFX9gCPijUI2BNkE' +
'NNPgRuF3DLJLTE3y4AjNVVidhMuQv//+QaSADGKMwvQRUBdEO9wcI' +
'IlsFFbfoZkDMQTTHLhRZJgDR2SYQ56/vFysqBXOZMc70A3USocQo5' +
'ANpCRfAM2BGOVsbQhEVMmn5JQbduSXY3Av0K1cJck6sk3AogYAZGI' +
'N/w==');
if(FindBitmap(Hometele,x,y)) then
begin
Mouse(X+(11), Y+(10), 10, 10,true);
Writeln('Clicked Bitmap');
FreeBitmap(HomeTele);
end else begin
Writeln('Could not find Bitmap!');
FreeBitmap(HomeTele);
wait(500+random(500));
Writeln('Using last resort');
Mouse(571,228,12,12,true); } // You just did this... in that loop...
{If (FindBlackChatMessage('need to wait')) then
Repeat
Writeln('We need to wait before casting this spell');
Logout;
Writeln('Waiting 5 minutes');
wait(60000*5);
Loginplayer;
if FindDTM(HomeTele, X, Y, 557, 214, 605, 259) then
begin
Mouse(X, Y, 10, 10,true); Again...?
end else
begin
Mouse(571,228,12,12,true);
end;
wait(1000+random(500));
Until(not(FindBlackChatMessage('need to wait')));
end; }
wait(17500+Random(5000));
Writeln('Walking Back');
Makecompass('n');
SetAngle(True);
Setrun(true);

SymbolAccuracy := 0.4;
SetLength(Cols, 2);
repeat
Cols[0] := FindLumbyRoadColor;
Cols[1] := FindDirtRoadColor;
WalkColor := Cols[i];
if WalkColor = 0 then
begin
LogOut;
Exit;
end;
for ii := 0 to 4 do
begin
if i = 0 then
case ii of // SR, ER, R
0: Info := [30, 80, 65];
1: Info := [340, 0, 50];
2: Info := [270, 345, 60];
3..4: Info := [240, 330, 40];
end
else
case ii of
0..3: Info := [200, 300, 60];
4..6: Info := [180, 300, 60];
7..8: Info := [270, 360, 60];
end;
if not RadialRoadWalk(WalkColor, Info[0], Info[1], Info[2], 1, 1) then
begin
LogOut;
Exit;
end;
end;
Result := FindSymbol(x, y, 'Bank');
until Result or not LoggedIn;

if not Result then Exit;

Writeln('We returned to the Draynor bank');
Mouse(x, y, 4, 4, True);
FFlag(10);
// symbolAccuracy := 0.4; already set
if(FindSymbol(x, y, 'bank')) then
begin
mouse(x-30,y+30, 6, 6, true);
FFlag(10);
end else
RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
Gametab(4);
end {else
begin
Writeln('Could not find the bank symbol');
wait(500+random(500));
Writeln('Switching Players');
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end; }
end;

Check out the changes and read the comments, I'd like to see you apply again. :)

lordsaturn

2009-04-21 09:38:38

I'm not going to tear apart your DeathWalk function, check out the three posts above.

Standards, they are horrendous. You should always make standards a top priority while programming, as when others try to read through your code, it can be difficult and sometimes aggravating to trace loops and follow along.

Your DDTM is not dyanmic, all values are static. Use a string please unless you plan on making it dynamic.

Try to avoid redundant code in Bank, such as CloseBank and ProgressReport. These methods could be simply placed at the end pf the procedure to be called in all possible cases. SymbolAccuracy is never returned to its original value, perhaps you could use a progress accuracy decrease as a failsafe rather than so many if statements? e.g.
while not FindSymbol(x, y, 'bank') do
begin
SymbolAccuracy := SymbolAccuracy - 0.1;
if SymbolAccuracy < 0.3 then Break;
Wait(100);
end;

In your main loop, you should have one check for AllPlayersInactive, and one TerminateScript. Simply copying and pasting code is messy and unnecessary. Overall your mainloop could be much more efficient.

The only object finding I've found is FindObj, perhaps check out some TPAs in the tutorial section.

However I know you very well from ventrilo, and you're a great guy to talk to you. I love your attitude on the forums, and I think you could easily make it in next time you apply.

No. :(

ZephyrsFury

2009-04-23 16:24:46

From: lordsaturn
IYour DDTM is not dyanmic, all values are static. Use a string please unless you plan on making it dynamic.


He did use FindRockColor as the main point colour. Besides its easier to edit a DDTM especially if you're testing subtle things like tolerances. He's got a good reason to use a DDTM imo.

Naike

2009-04-25 23:54:21

Yes.

You reminds me of myself when i started out, and i see you're trying.
Voting yes, and i hope you keep learning..
Also, Read the feedback and make sure you understand what you're doing!.

You got potential!

TBH, kinda unfair judgement..

lordsaturn

2009-04-26 03:37:42

From: ZephyrsFury
He did use FindRockColor as the main point colour. Besides its easier to edit a DDTM especially if you're testing subtle things like tolerances. He's got a good reason to use a DDTM imo.


You are absolutely correct, my apologies to cycrocism.

And cycrocism, don't let this poll disappoint you! If you don't make it in this time around, don't give up, you are so very close to becoming an SRL member.

Daniel

2009-04-27 12:15:51

Standards are poor, but better than some others. A few parts contain fail-safes but a lot do not, which is a bad sign. Finding stuff can fail due to finding techniques which can easily fail, without backups.

You have a fair way to go, good luck ;)

Hobbit

2009-05-05 08:58:42

10 - Yes
11 - No

Sorry but you didn't make it

Please stick around and read some tutorials and take what people have suggested to improve on your script then apply in 2 weeks.