SRL Archive - Archive

* 99_ - SRL Member Application *


ian.

2009-04-20 05:54:45

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
SCAR


Are you a member of any other communities?
Not anymore


Tell us about yourself…
From: 99_
I'm Ian, I guess a few people know me here. I absolutely love helping people and try to as much as I can. I love this community and the people so much :)



Please give show us one of your scripts.
program _99_FC_;
{.include srl/srl.scar}
var
Made, RingsUsed, XPGained, Charge, tx, ty: integer;
Fires: array of integer;

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Fires[0] := 0;

Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;
Fires[1] := 0;

Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := True;
Fires[2] := 0;
end;

function LoadDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..6] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 623;
dtmMainPoint.y := 165;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 4676997;
dtmMainPoint.Tolerance := 300;

dtmSubPoints[0].x := 623;
dtmSubPoints[0].y := 165;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 4676997;
dtmSubPoints[0].Tolerance := 300;

dtmSubPoints[1].x := 645;
dtmSubPoints[1].y := 140;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 3422264;
dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 653;
dtmSubPoints[2].y := 207;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 5067603;
dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 699;
dtmSubPoints[3].y := 149;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 5155485;
dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 520;
dtmSubPoints[4].y := 202;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 6497093;
dtmSubPoints[4].Tolerance := 0;

dtmSubPoints[5].x := 584;
dtmSubPoints[5].y := 118;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 5155485;
dtmSubPoints[5].Tolerance := 0;

dtmSubPoints[6].x := 596;
dtmSubPoints[6].y := 303;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 7831937;
dtmSubPoints[6].Tolerance := 0;

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

function CheckRingInv: Boolean;
var
Charge, Ring, i, rx, ry: integer;
TIA: TIntegerArray;
begin
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');
GameTab(5);
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
MMouse(rx, ry, 2, 2);
FreeDTM(Ring);
Charge := StrToInt(GetNumbers(GetUpText));
TIA := [12, 22, 32, 42, 52, 62, 72, 82];
for i:= 0 to High(TIA) do
if(Charge = TIA[i])then
begin
Writeln(IntToStr(Trunc(TIA[i]/10))+' charge(s)');
if(Charge < 13)then
begin
Result := False;
Exit;
end else
Result := True;
Exit;
end;
end;
end;

function Bank: Boolean;
var
x, y, a, i, ii, l, m, curCTS, ClickColor: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
Colors: TIntegerArray;

begin
if(not(LoggedIn))then
Exit;
if(FindSymbol(x, y, 'bank'))then
Mouse(x, y, 2, 2, True);
curCTS := GetColorToleranceSpeed;
if(Length(Colors) = 0)then
begin
SetArrayLength(Colors, 2);
Colors := [4544615, 11119285];
end;
l := High(Colors);
for ii := 0 to 1 do
for i := 0 to l do
begin
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MSX1, MSY1, MSX2, MSY2, ii * 7);
if(Length(TPA) > 0)then
begin
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 10, 10);
m := High(ATPA);
for a := 0 to m do
if(MiddleTPAEx(ATPA[a], x, y))then
begin
if(ii = 1)then
ClickColor := GetColor(x, y);
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if(Pos('ank', RS_GetUpText) > 0)then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
if(ii = 0)or(InIntArrayEx(Colors, i, ClickColor))then
begin
if(i > 0)then
Swap(Colors[i], Colors[i - 1]);
Exit;
end;
SetArrayLength(Colors, l + 2);
Colors[l + 1] := ClickColor;
Exit;
end;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;

function GetEss: Boolean;
var
ex, ey, Ess, BX1, BY1, BX2, BY2: integer;
begin
BX1 := 29;
BY1 := 85;
BX2 := 477;
BY2 := 291;

Ess := DTMFromString('78DA6374616660E8636440065121C10CFF813' +
'448F43F10300602D5F4A2AA81C8C248206D0D543383801A57A09A' +
'5904D49802D5741150E307543315BF1A00D2D40B2A');

if(FindDTM(Ess, ex, ey, BX1, BY1, BX2, BY2))then
Mouse(ex, ey, 2, 2, False);
Wait(RandomRange(25, 50));
ChooseOption('All');
Result := True;
end;

function CheckRingBank: Boolean;
var
BX1, BY1, BX2, BY2, rx, ry, Ring: integer;
begin
BX1 := 29;
BY1 := 85;
BX2 := 477;
BY2 := 291;
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');

if(Charge > 12)or(CheckRingInv)then
Exit;
if(FindDTM(Ring, rx, ry, BX1, BY1, BX2, BY2))and(IsUpText('duelling'))then
begin
Mouse(rx, ry, 2, 2, True);
Wait(RandomRange(50, 100));
Result := True;
CloseBank;
FreeDTM(Ring);
Exit;
end;
if(not(FindDTM(Ring, rx, ry, BX1, BY1, BX2, BY2))and(IsUpText('duelling')))then
NextPlayer(False);
end;

function Equip: Boolean;
var
rx, ry, Ring: integer;
begin
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');

if(CheckRingBank)then
begin
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(rx, ry, 2, 2, True);
Result := True;
FreeDTM(Ring);
end else
Result := False;
FreeDTM(Ring);
NextPlayer(False);
end;
end;

function Tele(Where: string): Boolean;
var
rx, ry, Ring, bx, by: integer;
begin
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');

case Where of
'Duel Arena': begin
GameTab(5);
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(rx, ry, 2, 2, False);
Wait(RandomRange(25, 50));
ChooseOption('perate');
repeat
Wait(RandomRange(1, 100));
until(GetColor(137, 371) = 128);
MouseBox(183, 385, 334, 397, 1);
repeat
Wait(1);
until(not(FindSymbol(bx, by, 'bank')));
Result := True;
FreeDTM(Ring);
Exit;
end else
Result := False;
FreeDTM(Ring);
NextPlayer(False);
end;

'Castle Wars': begin
GameTab(5);
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(rx, ry, 2, 2, False);
Wait(RandomRange(25, 50));
ChooseOption('perate');
repeat
Wait(1);
until(GetColor(137, 371) = 128);
MouseBox(449, 572, 579, 584, 1);
repeat
Wait(1);
until(FindSymbol(bx, by, 'bank'));
Result := True;
FreeDTM(Ring);
Exit;
end;
Result := False;
FreeDTM(Ring);
NextPlayer(False);
end;
end;
end;

function WalkToAltar: Boolean;
var
x, y, ax, ay, DTM: integer;
begin
Result:=True;
DTM := LoadDDTM;
if(RadialWalk(6463919, 330, 390, 70, -1, -1))then
exit;
if(FindDTM(DTM, ax, ay, MSX1, MSY1, MSX2, MSY2))then
MouseFlag(x, y, 2, 2, 0)
else
Result:=False;
end;

function EnterAltar: Boolean;
var
x, y, a, i, ii, l, m, curCTS, ClickColor: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
Colors: TIntegerArray;

begin
if(not(LoggedIn))then
Exit;
curCTS := GetColorToleranceSpeed;
if(Length(Colors) = 0)then
begin
SetArrayLength(Colors, 3);
Colors := [4018034, 4675962, 5070720];
end;
l := High(Colors);
for ii := 0 to 1 do
for i := 0 to l do
begin
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MSX1, MSY1, MSX2, MSY2, ii * 7);
if(Length(TPA) > 0)then
begin
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 25, 25);
m := High(ATPA);
for a := 0 to m do
if(MiddleTPAEx(ATPA[a], x, y))then
begin
if ii = 1 then
ClickColor := GetColor(X, Y);
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if(Pos('nter', RS_GetUpText) > 0)then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
if(ii = 0)or(InIntArrayEx(Colors, i, ClickColor))then
begin
if i > 0 then
Swap(Colors[i], Colors[i - 1]);
Exit;
end;
SetArrayLength(Colors, l + 2);
Colors[l + 1] := ClickColor;
Exit;
end;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;

function WalkToFires: Boolean;
begin
RadialWalk(3557969, 90, 180, 70, -1, -1);
FFlag(0);
Result := True;
end;

function MakeFires1: Boolean;
var
Ess, ex, ey: integer;
begin
Ess := DTMFromString('78DA6374616660E8636440065121C10CFF813' +
'448F43F10300602D5F4A2AA81C8C248206D0D543383801A57A09A' +
'5904D49802D5741150E307543315BF1A00D2D40B2A');

if(FindDTM(Ess, ex, ey, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(ex, ey, 2, 2, True);
Result := True;
end;
end;

function MakeFires2: Boolean;
var
x, y, a, m, curCTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
if(not(LoggedIn))or(not(MakeFires1))then
Exit;
curCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5590867, MSX1, MSY1, MSX2, MSY2, 7);
if(Length(TPA) = 0)then
begin
ColorToleranceSpeed(curCTS);
Exit;
end;
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 25, 25);
m := High(ATPA);
for a := 0 to m do
if(MiddleTPAEx(ATPA[a], x, y))then
begin
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if(Pos('raft', RS_GetUpText) > 0)then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
Exit;
end;
end;
ColorToleranceSpeed(curCTS);
end;

function NeedRings: boolean;
var
LoadsLeft: integer;
begin
case 2 of
0: begin
if(Charge = 11)then
Result := True
else
end;
1: begin
if(Charge = 22)then
begin
LoadsLeft := 1;
Writeln('We need a ring next load');
end;
end;
2: begin
if(Charge > 22)then
begin
Result := False;
end;
end;
end;
end;

procedure Proggy;
begin
ClearDebug;
Writeln('99_');
Writeln('99_Made : '+IntToStr(Made)+' fire runes');
Writeln('99_Used : '+IntToStr(RingsUsed)+' rings');
Writeln('99_XP : '+IntToStr(XPGained)+' gained');
Writeln('99_Ran : '+TimeRunning);
Writeln('99_');
end;

procedure ScriptTerminate;
begin
Writeln('Script finished. Please post this? ;D');
Wait(RandomRange(1000, 5000));
Proggy;
end;

begin
SetupSRL;
ActivateClient;
repeat
if(InvFull)and(CheckRingInv)then
begin
repeat
if(NeedRings)then
Bank;
CheckRingBank;
Tele('Duel Arena');
WalkToAltar;
EnterAltar;
MakeFires1;
MakeFires2;
repeat
Wait(1);
until(InvCount = 1);
Tele('Castle Wars');
until(Fires[CurrentPlayer] >= Made);
NextPlayer(False);
end else
if(not(CheckRingInv))then
begin
Bank;
repeat
Wait(1);
until(GetColor(198, 34) = 4106994);
CheckRingBank;
Equip;
end else
Tele('Duel Arena');
WalkToAltar;
EnterAltar;
repeat
Wait(1);
until(FindSymbol(tx, ty, 'teleport'));
MakeFires1;
MakeFires2;
Tele('Castle Wars');
IncEx(Made, 28);
until(Fires[CurrentPlayer] >= Made);
end.

TViYH

2009-04-20 06:13:07

[X]: DTMs
[X]: DDTMs
[X]: Walking
[X]: Antiban/Antirandom
[X]: Multiplayer
[X]: TPAs/T2DTPAs


Not enough antiban/antirandom from what I could tell.
Maybe not enough failsafes as well.

Pretty good knowledge of SRL, I'll vote yes.

Nava2

2009-04-20 06:14:14

Sorry its a no from me.

You need to work on begin..end nesting. Logic, Memory Leaks, infinite loops and some efficient coding.

Also, your DDTMs aren't actually dynamic..

Check this out:
function CheckRingInv: Boolean;
var
Charge, Ring, i, rx, ry: integer;
begin
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');
GameTab(5);
Result := (FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2));
FreeDTM(Ring); // Originally, you would only free it if it was found. Memory leak == bad.
if Result then
begin
MMouse(rx, ry, 2, 2);
Charge := StrToInt(GetNumbers(GetUpText));
if InIntArrayEx([12, 22, 32, 42, 52, 62, 72, 82], i, Charge) then // InIntArrayEx returns if the integer is in the array, as well as where it is.
begin // why are the numbers not just 1, 2, 3, 4, 5, 6, 7, 8? Also, what other number could be there..
Writeln(IntToStr(Trunc(TIA[i]/10))+' charge(s)'); // By using the 12 etc you just make this function slower.
Result := Charge < 13;
end;
end;
end;

function Bank: Boolean;
var
x, y, a, i, ii, m, curCTS, ClickColor: Integer; //l,
TPA: TPointArray;
ATPA: T2DPointArray;
Colors: TIntegerArray;

begin
if(not(LoggedIn))then
Exit;
if(FindSymbol(x, y, 'bank'))then // What if its not found...
Mouse(x, y, 2, 2, True);
curCTS := GetColorToleranceSpeed;
//if(Length(Colors) = 0)then // You never initialize the array, whats the point of this?
// begin
//SetArrayLength(Colors, 2); // Unneeded, when declaring an array with [] you set the length.
Colors := [4544615, 11119285];
//end;
//l := High(Colors);
for ii := 0 to 1 do
for i := 0 to 1 do // just use 1?
begin
ColorToleranceSpeed(2); // You never use Hue/Sat mods, might as well use CTS1 here.
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MSX1, MSY1, MSX2, MSY2, ii * 7);
if(Length(TPA) > 0)then
begin
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 10, 10);
m := High(ATPA);
for a := 0 to m do
if(MiddleTPAEx(ATPA[a], x, y))then
begin // This function makes no sense what so ever.
if(ii = 1)then
ClickColor := GetColor(x, y);
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if(Pos('ank', RS_GetUpText) > 0)then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
if(ii = 0)or(InIntArrayEx(Colors, i, ClickColor))then
begin
if(i > 0)then // Begin End nest..
Swap(Colors[i], Colors[i - 1]); // This will make an out of range error, as well.. whats it do?
Exit;
end;
SetArrayLength(Colors, l + 2);
Colors[l + 1] := ClickColor;
Exit;
end;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;

function GetEss: Boolean;
var
ex, ey, Ess: integer;//, BX1, BY1, BX2, BY2
begin
// BX1 := 29;
// BY1 := 85; Whats the point?
//// BX2 := 477;
// BY2 := 291;
if not BankScreen then Exit; // You need a fail safe, no point going through if there is no bank screen..
Ess := DTMFromString('78DA6374616660E8636440065121C10CFF813' +
'448F43F10300602D5F4A2AA81C8C248206D0D543383801A57A09A' +
'5904D49802D5741150E307543315BF1A00D2D40B2A');

if(FindDTM(Ess, ex, ey, 29, 85, 477, 291))then // removed vars
begin // nest...
Mouse(ex, ey, 2, 2, False);
Wait(RandomRange(25, 50));
ChooseOption('All');
Result := True;
end; // nest...
FreeDTM(Ess); // You need to free memory..
end;

Hope I helped bud.

mormonman

2009-04-20 06:47:56

This is an alright script. Could use some better walking though :o! Not really failsafed. This shows great knowledge plus I love your helpful attitude!

Pure1993

2009-04-20 09:37:17

Hmmmm, if you were some Jr. Member I have never heard of, I would have voted "no" on that script, but since I have seen you around quite a lot, and like your attitude, I won't vote at all, I'll let other people make that choice.

Good luck

Tickyy

2009-04-20 11:56:59

You really could improve some failsafes, and your Progress report is Crappy.

But, You've been around for a while, so i am gonna say…. NO!

Jk, Yes :p

ZephyrsFury

2009-04-20 14:14:58

You need to add a lot more failsafes to your script and break out of potential infinite loops.

eg.

repeat
Wait(1);
until(GetColor(137, 371) = 128);
MouseBox(449, 572, 579, 584, 1);
repeat
Wait(1);
until(FindSymbol(bx, by, 'bank'));

What if it never finds the colour or the symbol? The script will just loop forever or until the script is stopped manually. In this particular case it isn't too bad in terms of the safety of the account but imagine if you had something like this:


repeat
Mouse(123, 321, 0, 0, True);
Wait(50);
until(GetColor(5, 5) = 65536);

The mouse would keep clicking on the same spot forever even if the colour never appears. This would prevent the player from logging out and you can imagine what would happen if a character was doing this for 8 hours overnight.

You also need to create backups for many things you do for example your walking function:


function WalkToFires: Boolean;
begin
RadialWalk(3557969, 90, 180, 70, -1, -1);
FFlag(0);
Result := True;
end;

If you really want the script to work well you need to have backups just in case the RadialWalk doesn't work. Even if that means something simple like a blind click or just logging out and switching players. Point being that with scripts nothing is ever going to be exactly the same each time and sometimes things don't work according to plan. Also a function isn't really useful if its going to return True 100% of the tine.

There also seems to be a couple things wrong with your main loop:

begin
SetupSRL;
ActivateClient;
{repeat} //Maybe you want this?
repeat
if(InvFull)and(CheckRingInv)then
begin
repeat
if(NeedRings)then // Missing the begin???
Bank; //
CheckRingBank;
Tele('Duel Arena');
WalkToAltar;
EnterAltar;
MakeFires1;
MakeFires2;
repeat
Wait(1);
until(InvCount = 1);
Tele('Castle Wars');
until(Fires[CurrentPlayer] >= Made);
NextPlayer(False); //What is this doing here? Why does it only switch if the inv is full and CheckRingInv is true.
end else
if(not(CheckRingInv))then
begin
Bank;
repeat
Wait(1);
until(GetColor(198, 34) = 4106994);
CheckRingBank;
Equip;
end else // Again missing the begin?
Tele('Duel Arena'); //
WalkToAltar;
EnterAltar;
repeat
Wait(1);
until(FindSymbol(tx, ty, 'teleport'));
MakeFires1;
MakeFires2;
Tele('Castle Wars');
IncEx(Made, 28);
until(Fires[CurrentPlayer] >= Made);
{NextPlayer(True/False)} // ...and this
{until(False);} // ...this maybe?
end.

Having said that though, you've been very active in the community, helping others and generally I like your attitude. ;)

Home

2009-04-20 14:39:59

I like your attitude and your script it's true what other peple says above but still we all can see that you can definatly script!

Yes from me!

~Home

MylesMadness

2009-04-20 15:15:33

The script has many errors that the others pointed out, but I love your attitude. I do believe you will keep learning even after you get members, so I say yes

Pure1993

2009-04-20 19:32:26

I changed my mind, after reading some of your posts while browsing though the forums, I have decided that you are capable of a lot more than what you put in your script, so it's a "no" for lazyness, put some effort in it next time. :fiery:

Lol, of course, my decision is quite the opposite, I've voted "yes". Good luck, even though it seems like you are in already… :)

lordsaturn

2009-04-21 08:50:58

Fires could be integrated into your own player using records, check them out in the tutorial section.

Your DDTM is only a DTM, it is not dynamic at all. Why not just make it into a string?

Memory Leaks!! The Ring DTM is never freed if it is not found.

if(Charge < 13)then
begin
Result := False;
Exit;
end else
Result := True;
Exit;
Could be changed to simply

Result := Charge > 12;
Exit;
Much neater.

In Bank, when you have

for ii := 0 to 1 do
for i := 0 to l do
, you may want to add a wait at the end of the loop. If nothing is found, searches will only be a few ms apart, defeating the purpose of multiple searches and this failsafe.

Try to avoid redundant code, such as

ColorToleranceSpeed(curCTS);
Exit;
end;
ColorToleranceSpeed(curCTS);
when you could simply break out of the loop instead.

Your GetEss function is bulky the TBox is unnecessary, and the result is always true. I think you forgot a begin/end. And another memory leak!!! The Ess DTM is never freed.

After looking further, you have many memory leaks in your functions which have DTMs in them. Be sure to free a DTM, even when the object is not found. Try replacing the FreeDTM() at the end of the procedure, rather than inside an if/then statement.

Redundant code, again, fixed it up for you
if(CheckRingBank)then
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(rx, ry, 2, 2, True);
Result := True;
end else
NextPlayer(False);
FreeDTM(Ring); //no memory leaks :)

In Tele, is it really necessary to have all that code in both cases statements? Try keeping the code that is consistent across all case statements before the case.

WalkToAltar wont work. You click at x, y when the DTM is found at ax, ay.

EnterAltar looks familiar…alot like Bank.

WalkToFires always returns true. More memory leaks in MakeFires1.

case 2 of
Don't you mean Random(3)?

Too many careless mistakes and incorrectly written code. However I like your attitude at the forums alot.

No. :(

Sir R. M8gic1an

2009-04-22 08:18:26

attitude. yes.

~RM

Naike

2009-04-22 10:33:02

Close call but i say Yes.

Floor66

2009-04-22 13:32:01

Close one too ;)
But yes, for all good reasons stated above and he is a really nice guy with a good attitude =)

P.S;
Was it me that put you to applying? :D

marpis

2009-04-22 16:10:00

Yes from me :) Script is kinda weird, but obviously you know the stuff. Maybe you think too hard way ^^

You're very helpful and kind, which made 80% of my decision.

Hobbit

2009-04-22 18:55:38

Welcome

In!