SRL Archive - Archive

Entry #1


Sir R. M8gic1an

2010-08-02 08:08:04


{ Gamer716 Presents - Junior Member Competition #2 Entry
_________________________________________________________________________
Start Date: July 22, 2010
Finished Date: July 25, 2010

Features of this Script:
- Full Color Walking Functions & Procedures
- TPA Color Walking and Object Finding
- Anti-Ban & Randoms
- Plenty of Failsafes
-Supports Talisman and Tiaras!

[Important]: Due to the late start date, I am unable to test and fix bugs

Known Bugs: The script has a hard time finding the portal inside the altar
I'm preparing a fix as we speak...but the walking, banking, entering
should be fine.

Credits:
SRL Forums (of course) for all the helpful Tutorials that allowed this to happen

Special Thanks to Cigue who helped me throughout the script!


Instructions: Start off in VWB with full inventory rune ess.
}

program AirRuneCrafter;
{$DEFINE SMART}
{$i SRL\SRL.scar}

const
SmartWorld = 152;
Members = False;
SignedClient = True;
HighDetail = False;

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := '';
Players[0].Integers[0]:= 100; //How many loads?
Players[0].Active := true;
end;

var
x, y, loads, w: integer;
RCPoint: TPoint;

Procedure AntiBan;
begin
If not(LoggedIn) then Exit;
begin
Case Random(50) of
0 : RandomRClick;
1 : RandomAngle(True);
2 : BoredHuman;
3 : ExamineInv;
4 : begin
HoverSkill('runecrafting', False);
GameTab(Tab_Inv);
end;
5..7 : PickUpMouse;
8..10 : SleepAndMoveMouse(500 + Random(5000));
11..12 : GameTab(RandomRange(20, 36));
13..17: Wait(RandomRange(3000, 5500));
end;
If FindNormalRandoms then
begin
GameTab(Tab_Inv);
LampSkill := 'Runecrafting'
SetAngle(True);
end;
end;
end;

Procedure Report;
begin
SRLRandomsReport
Writeln('__________________________________________');
Writeln('|Gamer716 Air Runecrafter Progress Report|');
Writeln('|Total Time Running: ' + TimeRunning);
for w := 0 to (HowManyPlayers - 1) do
begin
Writeln('Total Amount of Loads Done...' + IntToStr(Players[w].Integers[1]));
Writeln('| Thanks for using!|');
Writeln('------------------------------------------');
end;
end;

function Load_DTM(WhichDTM: integer): Boolean;
var
DTM: Integer;
begin
case WhichDTM of
1 : DTM:= DTMFromString('78DA63CC656260F8C00007401EC3DD2B9719F' +
'881342310FF0702C672A0E84B0634C0042619A13CC65220FF3F01' +
'352940FE3F026AE281FC8FF8D50000BE4B0D91');
2 : DTM:= DTMFromString('78DA63F4646660F0676480012620BE7FED1A0' +
'33F900689FE0702460FA09A10841A844A881A306D8B6A0E563501' +
'40354104D480DCE3895F0D002C1F09B3');
3 : DTM:= DTMFromString('78DA63E4676660506264800126205EB968210' +
'317900689FE07024671A01A4D841A844A881A30CD01546342400D' +
'1B508D320135A2403552F8D50000FD860720');
4 : DTM:= DTMFromString('78DA635CC8C8C0B087010E9880D8CDD9194C0' +
'36518FE0301E32A206B13031A6002938C501EE35A206B3F0135F3' +
'81AC9304D44C02B276E1570300A2D50BBD');
end;
if WhichDTM = 2 then
begin
GameTab(Tab_Equip);
If (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
GameTab(Tab_Inv);
Result := True;
end;
If WhichDTM = 4 then
begin
If (FindDTM(DTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
Result := True;
end;
if (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Result := True;
FreeDTM(DTM);
end;

function AreWeInBank: Boolean;//checks rug color in bank
var
TPA: TPointArray;
CTS: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.11, 0.95);

FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10382405, MSX1, MSY1, MSX2, MSY2, 2);
if (Length(TPA) > 0) then
begin
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Writeln('Found Bank Rug');
Result := True
Exit;
end;
end;

Function Find_Tali: Boolean;
begin
if not(LoggedIn) then
Exit;
if (GameTab(Tab_Inv)) then
begin
Result :=(Load_DTM(3));
end;
end;

Procedure Click_Tali;
var a: TPoint;
begin
If (Find_Tali) then
begin
a := ItemCoords(1);
Mouse(a.x, a.y, 5, 5, True);
Wait(250 + Random(250));
end;
end;

function WalkToAltar: Boolean;
var
TPA: TPointArray;
ColorBoxes: T2DPointArray;
P: TPoint;
i : Integer;
begin
If not (LoggedIn) then Exit;
for i := 0 to 3 do
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(24.11, 2.54);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 8752264, MMX1, MMY1, MMCX, MMY2, 3)
//DebugTPA(TPA, '');
if (GetArrayLength(TPA) <10 ) then
begin
Writeln('Error, not enough color found, add tolerance');
TerminateScript;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorBoxes := TPAToATPAEx(TPA, 10, 10);
//debugATPA(ColorBoxes, '')
SortATPAFromFirstPoint(ColorBoxes, Point(570, 115));
P := MiddleTPA(ColorBoxes[0]);
MouseFlag(P.x, P.y, 3, 3, 1);
If i = 3 then
//begin
Break;
Result := True;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
end;

function Find_Banker: Boolean;
var
TPA: TPointArray;
CTS, i, z, j: Integer;
ATPA: T2DPointArray;
begin
If not(LoggedIn) then Exit;
If not(AreWeInBank) then
begin
Writeln('Relocating...');
SymbolAccuracy := 0.4;
if (FindSymbol(x, y, 'bank')) or (FindSymbol(x ,y, 'Dungeon')) then
begin
Mouse(x, y +10, 4, 4, True);
Flag;
Wait(250 + Random(400));
end;
end;
SetAngle(True);
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 5850188, MSX1, MSY1, MSX2, MSY2, 14); //looks for color of bankers
if (Length(TPA) = 0) then
begin
Writeln('No color, exiting...');
ColorToleranceSpeed(CTS);
Exit;
end;
ColorToleranceSpeed(CTS);
ATPA :=TPAtoATPAEx(TPA, 5, 5);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
z := High(ATPA);
for i:= 0 to z do
begin
If MiddleTPAEx(ATPA[i], x, y) then
MMouse(x, y, 2, 2);
If IsUpText('Banker') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(200 +Random(200));
ChooseOption('Bank');
Writeln('Clicked Banker');
Flag;
repeat
Wait(1000 + Random(500));
inc(j);
until (BankScreen) or (PinScreen) or (j =4);
begin
SetColorToleranceSpeed(1);
result := true;
exit;
end;
end;
end;
end;

function Find_RCAltar: TPoint;
var
RCPoint: TPointArray;
RCBox: T2DPointArray;
CTS: integer;
begin
if not(LoggedIn) then exit;
CTS := GetColorToleranceSpeed;
SetColorSpeed2Modifiers(0.27, 4.79);
SetColorToleranceSpeed(2);
begin
FindColorsTolerance(RCPoint, 15251847, MSX1, MSY1, MSX2, MSY2, 6);
if (Length(RCPoint) = 0) then
begin
Writeln('Failed To Find Altar');
Exit;
end;
RCBox := TPAtoATPAEx(RCPoint, 5, 5);
SortATPAFromFirstPoint(RCBox, Point(MSCX, MSCY));
Result:= (RCBox[0] [0]);
SetColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
end;

Function Click_RCAltar: Boolean;
begin
if not(LoggedIn) then Exit;
if Find_Tali then
begin
Click_Tali;
Writeln('Found Talisman in inventory');
end;
RCPoint := Find_RCAltar;
MMouse(RCPoint.x, RCPoint.y, 5, 5);
Wait(250 + Random(250));
If IsUpTextMultiCustom(['ter','yster', 'une']) then
begin
GetMousePos(x, y);
case Random(10) of
0..9 : Mouse(x, y, 0, 0, True);
10 : begin
Mouse(x, y, 5, 5, False);
Wait(250 + Random(250));
ChooseOption('Enter');
end;
end;
end;
Flag;
Wait(RandomRange(3000, 5000));//Waits for game to load
Writeln('Entered Altar');
Result := True;
end;

Procedure Blindclick;
begin
If not (LoggedIn) then Exit;
If (WalktoAltar) then
begin
Writeln('Starting Blind Click');
Mouse(582, 130, 2, 3, True);
Flag;
Wait(RandomRange(1000, 2000));
If Click_RCAltar then
begin
Writeln('Blind Click Worked');
Exit;
end;
end;
end;
Function Find_Portal: TPoint;
var
Portal: TPointArray;
PortalBox: T2DPointArray;
begin
If not(LoggedIn) then Exit;
SetAngle(True);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.11, 0.62);
FindColorsSpiralTolerance(MSCX, MSCY, Portal, 7580340, MSX1, MSY1, MSCX, MSY2, 15);
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
if (Length(Portal) = 0) then
begin
Writeln('Failed to find Portal, exiting');
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
If (LoggedIn) then logout;
Exit;
end;
PortalBox := (TPAtoATPA(Portal, 2));
SortATPAFromFirstPoint(PortalBox, Point(MSCX, MSCY));
Result := MiddleTPA(PortalBox[0]);
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

Procedure Leave_Altar;
var time: integer;
begin
if(not(LoggedIn)) then Exit;
Wait(2000 + Random(500));
AntiBan;
MarkTime(time);
begin
MMouse(Find_Portal.x, Find_Portal.y +12, 2, 2);
if IsUpTextMultiCustom(['nter', 'ortal']) then
begin
GetMousePos(x, y);
Wait(50 + Random(50));
Mouse(x, y, 0, 0, True);
Flag;
Wait(RandomRange(10000, 11000))//loading time
end;
if (TimeFromMark(time) > 20000) then
TerminateScript;
end;
end;

function WalkToBank: Boolean;
var
TPA: TPointArray;
ColorBoxes: T2DPointArray;
P: TPoint;
i, t : Integer;
begin
If not (LoggedIn) then Exit;
If (RunEnergy(60 + random(10))) then SetRun(true);
Leave_Altar;
Wait(250 +Random(250));
for i := 0 to 4 do
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(24.11, 2.54);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 8752264, MMCX, MMY1, MMX2, MMY2, 8)
if (GetArrayLength(TPA) <10 ) then
begin
Writeln('Error, not enough color found, add tolerance');
TerminateScript;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorBoxes := TPAToATPAEx(TPA, 10, 10);
SortATPAFromFirstPoint(ColorBoxes, Point(671, 64));
P := MiddleTPA(ColorBoxes[0]);
MouseFlag(P.x, P.y, 3, 3, 1);
Wait(500 + Random(250));
If i = 4 then
Break;
end;
Wait(RandomRange(1000, 3000));
SymbolAccuracy := 0.5;
MarkTime(t);
if FindSymbol(x, y, 'dungeon') or FindSymbol(x, y, 'bank') then
begin
Mouse(x, y, 5, 5, True);
Wait(250 + Random(250));
Flag;
Wait(RandomRange(2000, 3000));
Writeln('Successfull Walk to Bank');
If (TimeFromMark(t) > 30000) then
begin
if (AreWeInBank) then
Result := True;
Exit;
end;
end else
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
//Writeln('Failed to Walk To Bank');
SymbolAccuracy := 0.8;
Exit;
end;

Function In_Altar: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
CTS, i, z: Integer;
begin
If not(LoggedIn) then Exit;
CTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(1);
FindColorsTolerance(TPA, 6645095, MSCX, MSY1, MSX2, MSY2, 13);
if (High(TPA) < 30) then
begin
SetColorToleranceSpeed(CTS);
Writeln('Failed finding altar');
SetColorToleranceSpeed(CTS);
Exit;
end;
ATPA :=TPAtoATPAEx(TPA, 40, 40);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
z := High(ATPA);
for i:= 0 to z do
begin
If MiddleTPAEx(ATPA[i], x, y) then
MMouse(x, y, 10, 5);
If IsUptext('ltar') then
begin
Wait(500 + Random(250));
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Wait(RandomRange(500, 750));
While IsMoving or FlagPresent do
AntiBan;
Wait(RandomRange(1000, 3000));
If (InvCount < 2) or (Load_DTM(1)) then
begin
Writeln('Crafted Air Runes');
Result := True;
end else
Writeln('No essences in inventory?');
Exit;
end;
end;
end;

Procedure Main_Deposit;
begin
if(not(Find_Banker)) then
begin
Writeln('Could not find Bank');
Exit;
end;
If PinScreen then
begin
InPin((Players[CurrentPlayer].Pin));
Wait(RandomRange(250, 500));
end else
begin
if BankScreen then
If Load_DTM(1) and Load_DTM(3) then
begin
Deposit(2, 28, True);
Wait(RandomRange(1000, 2000));
end;
If Load_DTM(1) then
DepositAll;
end
end;

Procedure Main_Withdraw;
begin
If not(LoggedIn) then exit;
If (BankScreen) then
begin
If Load_DTM(4) then
begin
Mouse(x, y, 5, 5, false);
Wait(100 + Random(250));
If WaitOptionMulti(['Withdraw-All', 'draw-All'], 300) then
begin
Wait(RandomRange(1500, 3000));
CloseBank;
If(InvFull) then
Writeln('Finished Banking');
end;
end;
end else
begin
Writeln('Could Not Withdraw');
TerminateScript;
end;
Report;
Inc(Loads)
Inc(Players[CurrentPlayer].Integers[1]);
end;

Procedure SetupPlayers;
begin
If(not(LoggedIn)) then LoginPlayer;
Wait(1000 + Random(1000));
MakeCompass('N');
SetAngle(True);
SetRun(True);
Loads:= 0
end;

Procedure SetupScript;
begin
{$IFDEF SRL_SMART}
Smart_Server := SmartWorld;
Smart_Members := Members;
Smart_Signed := SignedClient;
Smart_SuperDetail := Highdetail;
{$ENDIF}
SetupSRL;
DeclarePlayers;
activateclient;
SetupPlayers;
end;

begin
SetupScript;
repeat
BlindClick;
In_Altar;
If WalktoBank then
begin
Main_Deposit;
Main_Withdraw;
If (PlayersActive > 1) Then
Begin
If (Loads = Players[CurrentPlayer].Integers[0]) then
NextPlayer(false);
end;
end;
until (AllPlayersInactive);
end.

~RM

Dynamite

2010-08-02 08:17:00

Good knowledge of TPA's with TPA failsafes.
Am away at the moment, so will hold my vote.
Will post little points on each entry.

Sir R. M8gic1an

2010-08-02 08:27:56

Such a little analysis is way below what I expect. Check the sticky to see an example.

~RM

Dynamite

2010-08-02 08:51:48

I know, it was more of a "I am here and will be judging, just not a full analysis yet".
Sorry for the mis-understanding

Coh3n

2010-08-02 11:59:08

Aren't the writers of the script supposed to be taken out?

JPHamlett

2010-08-02 12:27:59

Feedback:

with this

GameTab(Tab_Equip);
If (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
GameTab(Tab_Inv);
Result := True;
end;

that will always return true with an if….then statement if its more then 1 line you need to but a begin and end statement in there so it should be


begin
GameTab(Tab_Equip);
If (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
GameTab(Tab_Inv);
Result := True;
exit;
end;
end;

notice the exit that make the procedure quit so it doen't run through this wholoe part and possibly change the result


if (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Result := True;

In this code

function Load_DTM(WhichDTM: integer): Boolean;
var
DTM: Integer;
begin
case WhichDTM of
1 : DTM:= DTMFromString('78DA63CC656260F8C00007401EC3DD2B9719F' +
'881342310FF0702C672A0E84B0634C0042619A13CC65220FF3F01' +
'352940FE3F026AE281FC8FF8D50000BE4B0D91');
2 : DTM:= DTMFromString('78DA63F4646660F0676480012620BE7FED1A0' +
'33F900689FE0702460FA09A10841A844A881A306D8B6A0E563501' +
'40354104D480DCE3895F0D002C1F09B3');
3 : DTM:= DTMFromString('78DA63E4676660506264800126205EB968210' +
'317900689FE07024671A01A4D841A844A881A30CD01546342400D' +
'1B508D320135A2403552F8D50000FD860720');
4 : DTM:= DTMFromString('78DA635CC8C8C0B087010E9880D8CDD9194C0' +
'36518FE0301E32A206B13031A6002938C501EE35A206B3F0135F3' +
'81AC9304D44C02B276E1570300A2D50BBD');
end;
if WhichDTM = 2 then
begin
GameTab(Tab_Equip);
If (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
GameTab(Tab_Inv);
Result := True;
end;
If WhichDTM = 4 then
begin
If (FindDTM(DTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
Result := True;
end;
if (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Result := True;
FreeDTM(DTM);
end;

you could just use


function Load_DTM(WhichDTM: integer): Boolean;
var
DTM: Integer;
begin
case WhichDTM of
1 : DTM:= DTMFromString('78DA63CC656260F8C00007401EC3DD2B9719F' +
'881342310FF0702C672A0E84B0634C0042619A13CC65220FF3F01' +
'352940FE3F026AE281FC8FF8D50000BE4B0D91');

2 : begin
DTM:= DTMFromString('78DA63F4646660F0676480012620BE7FED1A0' +
'33F900689FE0702460FA09A10841A844A881A306D8B6A0E563501' +
'40354104D480DCE3895F0D002C1F09B3');
GameTab(Tab_Equip);
If (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
GameTab(Tab_Inv);
Result := True;
exit;
end;
end;
3 : DTM:= DTMFromString('78DA63E4676660506264800126205EB968210' +
'317900689FE07024671A01A4D841A844A881A30CD01546342400D' +
'1B508D320135A2403552F8D50000FD860720');
4 : begin
DTM:= DTMFromString('78DA635CC8C8C0B087010E9880D8CDD9194C0' +
'36518FE0301E32A206B13031A6002938C501EE35A206B3F0135F3' +
'81AC9304D44C02B276E1570300A2D50BBD');
If (FindDTM(DTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
begin
Result := True;
exit;
end;
end;
end;
if (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Result := True;
FreeDTM(DTM);
end;

with this code here


Procedure Click_Tali;
var a: TPoint;
begin
If (Find_Tali) then
begin
a := ItemCoords(1);
Mouse(a.x, a.y, 5, 5, True);
Wait(250 + Random(250));
end;
end;


what if the tally isnt in the first slot why not just save the coords from

load_dtm(3);

now it wouldnt be to hard you could just do


Procedure Click_Tali;
begin
If (Find_Tali) then
begin
if load_DTM(3) then
begin
Mouse(x, y, 5, 5, True);
Wait(250 + Random(250));
end;
end;
end;

now granted that is untested so it may not work but it would be better if it did something around those lines

I like your Walking methods they are very good

good job on that




if (FindSymbol(x, y, 'bank')) or (FindSymbol(x ,y, 'Dungeon')) then

that isnt a very good way to relocate to the bank cause what if people are standing on the symbols?

what i would do is just grab the color of both that symbols and use a tolerance cause imo that is more reliable then findsymbol



Wait(200 +Random(200));
ChooseOption('Bank');

just use waitoption like this


waitoption('Bank', 500);

in this code you have a failsafe with the or j = 4 but you dont do anything with it

repeat
Wait(1000 + Random(500));
inc(j);
until (BankScreen) or (PinScreen) or (j =4);

i would do


repeat
Wait(1000 + Random(500));
inc(j);
until (BankScreen) or (PinScreen) or (j =4);
if j = 4 then
begin
writeln('Waited to long to open bank logging out');
result := false;
exit;
end;
SetColorToleranceSpeed(1);
result := true;
end;

that should do the stuff your looking for but it actually uses one of the failsafes

note* not sure if that would actually work didnt test

in your walk to bank funtion


if FindSymbol(x, y, 'dungeon') or FindSymbol(x, y, 'bank') then
begin
Mouse(x, y, 5, 5, True);
Wait(250 + Random(250));
Flag;
Wait(RandomRange(2000, 3000));
Writeln('Successfull Walk to Bank');
If (TimeFromMark(t) > 30000) then
begin
if (AreWeInBank) then
Result := True;
Exit;
end;

again id do a color tolerance

in you IN_ALTER function there is a few changes that could be made that would greatly effect your script for the better

yours is


Function In_Altar: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
CTS, i, z: Integer;
begin
If not(LoggedIn) then Exit;
CTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(1);
FindColorsTolerance(TPA, 6645095, MSCX, MSY1, MSX2, MSY2, 13);
if (High(TPA) < 30) then
begin
SetColorToleranceSpeed(CTS);
Writeln('Failed finding altar');
SetColorToleranceSpeed(CTS);
Exit;
end;
ATPA :=TPAtoATPAEx(TPA, 40, 40);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
z := High(ATPA);
for i:= 0 to z do
begin
If MiddleTPAEx(ATPA[i], x, y) then
MMouse(x, y, 10, 5);
If IsUptext('ltar') then
begin
Wait(500 + Random(250));
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Wait(RandomRange(500, 750));
While IsMoving or FlagPresent do
AntiBan;
Wait(RandomRange(1000, 3000));
If (InvCount < 2) or (Load_DTM(1)) then
begin
Writeln('Crafted Air Runes');
Result := True;
end else
Writeln('No essences in inventory?');
Exit;
end;
end;
end;

id do


Function In_Altar: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
CTS, i, z: Integer;
begin
If not(LoggedIn) then Exit;
CTS := GetColorToleranceSpeed;
SetColorToleranceSpeed(1);
FindColorsTolerance(TPA, 6645095, MSCX, MSY1, MSX2, MSY2, 13);
if (High(TPA) < 30) then
begin
SetColorToleranceSpeed(CTS);
Writeln('Not in altar'); // if you fail to find it your probably not in it
result := false; // dont need to setcolortolerancespeed
Exit;
end;
ATPA :=TPAtoATPAEx(TPA, 40, 40);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
z := High(ATPA);
for i:= 0 to z do
begin
If MiddleTPAEx(ATPA[i], x, y) then
MMouse(x, y, 10, 5);
If IsUptext('ltar') then
begin
Wait(500 + Random(250));
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Wait(RandomRange(500, 750));
While IsMoving or FlagPresent do
AntiBan;
Wait(RandomRange(1000, 3000));
If (InvCount < 2) or (Load_DTM(1)) then
begin
Writeln('Crafted Air Runes');
Result := True;
end else
Writeln('No essences in inventory?');
Exit;
end;
end;
end;

other then that a very great script which if you dont win id apply for members with it


BREAKDOWN

1. Technique (85/100)
I liked how you loaded your dtms with a case and i liked just the overall appearnce of how
you put together the script
2. Individuality (70/100)
I didnt really see to much individuality to increase this next time I would take some of the srl function and change them so they work well for your script
3. Follow all SRL rules (95/100)
Didnt really see anything that needs to be fixed jsut what I said above
4. Creativity (45/100)
IMHO I didnt really see to much creativity
5. Efficiency (/100) will edit after a more thourogh tlook through
6. Presentation (80/100)
You didnt comment your procedures and your proggy could be better
7. Meeting all Requirements (100/100)
fomr what it looks like you did meet all of them
8. Added Extras (0/100)
I didnt see any

Cigue

2010-08-03 16:54:30

From: Coh3n
Aren't the writers of the script supposed to be taken out?


Yeah, I actually helped Gamer716 bits and pieces about his entry, not sure it's fair to leave his name in while I'm judge. I'll still test and rate it, if no one has objections :)

JPHamlett

2010-08-03 19:29:07

From: Cigue
Yeah, I actually helped Gamer716 bits and pieces about his entry, not sure it's fair to leave his name in while I'm judge. I'll still test and rate it, if no one has objections :)


As long asw you judge fairly I ahve no problem with it

EvilChicken!

2010-08-05 15:27:13

Neat and simple introduction. Color-only procedures and TPAs sound promising. Very simple setup – but could use WITH statements in DeclarePlayers to simplify it further, to ease the process of adding more players; like this:
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers (HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Integers[0]:= 100; //How many loads?
Active := true;
end;
end;
:but otherwise so far so good.

Noticing that you only sometimes capitalize bold words. It either case of intention, don't do it. Capitalized bold words contribute make scripts illegible. As we're on it, also don't have spaces before colons.

Your antiban procedure demonstrates knowledge of cases and awareness of SRL includes in the way you eagerly use functions from AntiBan.scar.

Your "Report;" procedure is however slightly disappointing in its simpicity. If I were you, I'd rather use Reports.scar (found in the /misc/ folder) or spice it up by trying to make it look more structurized and contain more data. An example of what I consider a decent report to be could be extracted from my current work-in-progress-smither:
procedure PrintReports;
var
TotalItemsMade, TotalLevelsGained: Integer;
TotalSmithingXP: Extended;
Nick: string;
QC: array [0..1] of TStringArray; // Query = 0, Counter = 1.
ItemsMade: array [0..ITEM_AMOUNT - 1] of Integer;
I, II: Byte;

begin
ClearDebug;
WriteLn('[PHP]');
SRLRandomsReport;
WriteLn('');

for I := 0 to HowManyPlayers - 1 do
begin
IncEx(TotalItemsMade, Players[I].Integers[PV_ITEMSMADE]);
IncEx(TotalLevelsGained, Players[I].Integers[PV_LEVELSGAINED]);
TotalSmithingXP := TotalSmithingXP + Players[I].Extendeds[PV_XPGAINED];

II := GetItemID(Queue[I].Item.Name);
if (II > -1) then
IncEx(ItemsMade[II], Players[I].Integers[PV_ITEMSMADE]);
end;

for II := 0 to 1 do
SetArrayLength(QC[I], 7);

QC[0] := ['Total runtime:',
'Players active:',
'Total smithing XP gained:',
'-> XP gained per hour:',
'Total levels gained:',
'Total amount of items smithed:',
'-> Items made per hour:'];
QC[1] := [TimeRunning,
ToStr(PlayersActive) + ' out of ' + ToStr(HowManyPlayers),
ToStr(Round(TotalSmithingXP)),
ToStr(Round((3600 * (TotalSmithingXP)) div (GetTimeRunning div 1000 + 1))),
ToStr(TotalLevelsGained),
ToStr(TotalItemsMade),
ToStr((3600 * (TotalItemsMade)) div (GetTimeRunning div 1000 + 1))];

for I := 0 to ITEM_AMOUNT - 1 do
if (ItemsMade[I] > 0) then
begin
II := Length(QC[0]);
SetArrayLength(QC[0], II + 1);
SetArrayLength(QC[1], II + 1);
QC[0][II] := '> ' + Items[I].Name + 's made:';
QC[1][II] := ToStr(ItemsMade[I]);
end;

WriteLn('<!---');
WriteLn('<! ' + Padr('EvilChicken!''s ' + SCRIPT_NAME, 32) + SCRIPT_VERSION);
WriteLn('<!---');

II := High(QC[0]);
for I := 0 to II do
WriteLn('<! ' + Padr(QC[0][I], 32) + QC[1][I]);

WriteLn('<!---');
WriteLn('<! ## | Nick | A | W: | L: | Smithing item: | #items: | XP: | Location: | Status: | Rand:');
for I := 0 to HowManyPlayers - 1 do
begin
WriteLn('<! ' + Padr(ToStr(I), 3) +
'| ' + Padr(Nick, 5) +
// ^Is there some way to shorten that? Simba doesn't have Left(); / Right();
'| ' + Padr(ToStr(Players[I].Active)[1], 2) +
'| ' + Padr(ToStr(Players[I].Worked), 5) +
'| ' + Padr(ToStr(Players[I].Level[SKILL_SMITHING]), 3) +
'| ' + Padr(Queue[I].Item.Name, 15) +
'| ' + Padr(ToStr(Players[I].Integers[PV_ITEMSMADE]), 8) +
'| ' + Padr(ToStr(Round(Players[I].Extendeds[PV_XPGAINED])), 6) +
'| ' + Padr(Players[I].Loc, 10) +
'| ' + Padr(Players[I].Status, 13) +
'| ' + Players[I].Rand);
end;
WriteLn('<!---');
WriteLn('[/PHP]');
end;
; I ofcourse don't expect to see all the features used there, in your script, but some usage of various text formatting procedures, such as for example PadR, would show extended knowledge of Simba and also prove that you know to be creative and think outside the box – or, if you had user Reports.scar, it would've shown good include awareness.

Besides, as you anyway make your script Simba only (I'm not sure if SCAR supports "{$i ..}" headers) you might aswell use Simba's ToStr(); which converts any given variable type to a string, instead of specifically having to specify variable types each time. Just a little tip here. ;)

In your Load_DTM(); function, a for-to-loop could be used to shorten down some code. And also, you should always leave a comment next to bitmaps and variables stating what item they're for – or even better, represent them using constants. So instead of having "case (WhichDTM) of 0, 1, 2, ect.", you would have "case (WhichDTM) of DTM_Log:, DTM_Knife:, ect.".

Your AreWeInBank function is looking very good, and shows a creative way of location detection – although since we're talking about the target location being a bank, I'd rather confirm location by searching for the MM bank symbol using a function in Symbol.scar.

Again, I find myself having to refer back to the earlier mentioned need for constants. In your Find_Tali function, you have "Result := (Load_DTM(3));". Now, I have no idea what DTM the "3" reprtesents. Wouldn't it be better if you had constants, so that anybody who read your script would immidiately understand that "Load_DTM(AIR_TALI);" checks for the presence of the air talisman?

If I were you, I'd make "Click_Tali" a function returning a boolean. After all, it it makes sense to rather have it as a boolean function when you consider the fact that it can have two outcomes, no?

WalkToAltar: standards are a bit off, and it definetly needs more failsafes! I see your "for i := 0 to 3" in there, so you definetly know how to ultilize for-to-loops, hence you have no excuses for not using loops way more in your script!

I like the failsafes you have in Find_Banker, like the relocating and such. Practice that more! Although, what's wrong with SRL's current banking functions? For instance, OpenBankFast has not failed me a single time for the past two weeks.

You know, I really like the fact that you ultilize CTS2 throughout your script. I cannot conclude that into meaning anything else than that you possess knowledge about calculating CTS values, something which not even every SRL member knows how to do. Two thumbs up for that.

Seeing how you use Find_Tali & Click_Tali in Click_RCAltar makes me think that you should combine the two mentioned procedures/functions into a single function; provided that you don't separately use Find_Tali somewhere else in the script. And it also makes me think of Tali from the Mass Effect games.

Whoa, whoa, Blindclick; without even incorporating any Uptext check and witch such little randomness? You know you can do better, dude.

Oh, another pair of thumbs directed upwards for your procedure and function naming. Pair that up with constants, and you've got a pretty solid infrastructure, scriptwise.

TerminateScript in WalkToBank just becase the correct color wasn't found? Isn't there something more one could attempt first? Anything's better than terminating the script.. >:

In Main_Deposit, there's atleast one vital failsafe that needs to be added; what if the Pinscreen appears and Players[X].Pin = ''? Your script would just go on, disregarding that.. Besides, shouldn't you anyway put PIN checks in the Find_Banker function? That's another advantage of using SRL's incorporated functions rahter than making one's own.

SetupScript: DEFINEs, cool. They can be pretty nifty sometimes.








GUYS: I really don't feel like rating the scripts. I don't really know why, but I just don't want to. So, this post is more like a "think of this when you rate the script"-thing. I might post a rating later. Feel free to post a comment if I misunderstood or accidentally'd something.

Cigue

2010-08-05 22:52:58

EDIT : Before the ratings, I would like you to know exactly what I did to help Gamer716 write his script, both because I rated him high on many counts and also because this script is so good it looks suspicious, even to me.

So, what I did was teach him how to use ACA v2, and then I threw some code at him and used it to teach him to use the following functions : FindColorsSpiralTolerance, ColorToleranceSpeed, SetColor2SpeedModifiers, TPAtoATPA, MiddleTPA, and the debugTPA & DebugATPA functions. Most of the object finding he designed himself and did not subject it to me for approval.

So, onwards to the ratings…

1. Technique (75/100)
Okay, first off I'm scared. Scared to rate you, because that puts my reputation on the line, but your stuff is just too tight for a junior member. {$IFDEF SRL_SMART} is something I haven't ever got around to using, you have custom TPA functions all around, everything that could/should be in cases is, and I don't see any redundant code. I'd take off a token 5 points because you didn't use SRL's custom reports, but your antiban is comparatively way better than the other submissions, and that matters a lot to me.

EDIT : After re-reading through your script, I have found that antiban is only called in two situations. And that is MAAAJOR bad news if you at any point get caught in a random (-20, but only because the rest is awesome). It's a shame too, because your antiban is very decent !

RE-EDIT : No with..do for declareplayers? That's a petty error, but damn ! (-5).

2. Individuality (75/100)
Starting at 0 : Okay, looking for the bank rug to check if you're in bank is something I haven't seen before (+15). Custom procedures for finding everything (+30). Then there's this little snippet, too :
Result :=(Load_DTM(3));
This is pretty sweet (+15). And this general format comes back all through the script (+15).
The main loop starts by trying to locate you, which is something I have issues with - yet you manage it flawlessly by simply putting Blindclick; and InAltar; before anything else (+20). I kind of wish Blindclick wasn't blind though ! (-10).
You haven't put in any time marks (-10).

3. Follow all SRL rules (80/100)
if not (LoggedIn) then Exit;
IT'S EVERYWHEREEEEE
You also have a working multiplayer but no break procedure (-20). Shame on you !

4. Creativity (80/100)

Same thing as individuality. The use of IFNDEF was pretty fancy (+10).

5. Efficiency (90/100)

First, short script is short, and working better through less effort is the definition of efficiency - the other two submissions are 50% longer than this one. Second, I see neither repeating sequences nor optimizable script. My only regret is that you have used in many places procedures that could be entirely replaced by FindObjTPA from Objects.scar. However, I didn't know about that function before like two weeks ago so I'll spare you on this (-10).

6. Presentation (40/100)

Starting at 100 : The thing I've been looking for all along the contest was indexes, and you have them (+15). However, no single procedure is commented (-40) and the spacing/standards are irregular and sometimes plain wrong (-60). The whole thing is very readable, and the functions are split into understandable blocks (+25).

7. Meeting all Requirements (75/100)
ANTIRANDOM IS BUSTED. There, I've said it.

8. Added Extras (100/100)
Starting at 50 : I'd feel comfortable running this script without supervision (+25). This looks easy to update or tweak (+15), and I probably wouldn't have made a better script than this (+10).

As a finishing word, I honestly expect this to be the winning script. If you tweak it a little, it could be part of a winning member's application.

Heavenguard

2010-08-06 00:26:05

Hello everyone, this is my very first time judging, so im going to do it to the best of my knowledge. Ill go through each procedure/function, then an overall score.

Opening: I am loving the fact you put intructions, features, and bugs [as well as credits] at the top of the script. Easy way for people to get a run-down on what to expect from it =].

Procedure DeclarePlayers; Awesome procedure you put here ^^ Script gets to know the players xD, and as much as it is simple, its also necessary to use correct looping with it. A With..Do loop would not only make it a bit easier to read, but it would make it look more efficient.

Procedure Antiban; Once again, awesome procedure you put here as well. Good to know your interested in lowering ban-rates with your script =]. Nice job adding FindNormalRandoms; into the procedure to make the script more clean.

Procedure Progress; Your script even gives progress reports =] well done, although its quite a bit bland, I wont criticize you for the variables you've used in it. Only thing I would probably add in for this scripts progress report would be each players runtime.

Function Load_DTM(WhichDTM : Integer) : Boolean; Great job taking the initiative to call your useful DTM's from one simple function. I would have at least added in a comment [{}] explaining the real name of each DTM or even better, I would have made WhichDTM into a string and change those integers into the names of each dtm.
As for the if..then statements, i would have [personally] used those if..then's in the procedures / functions themselves rather then in the procedure that loads the DTM's up.
Overall it looks good, nice job on it =].

Function AreWeInBank : Boolean; First off great name, great result. I honestly just love it when a function speaks for its self with its name. I love the TPA usage in it, although it is kinda unnecessary since your not doing anything really with the points, and your length check only checks if it has at least 1 point so probably a simple if FindColorSpiralTolerance(); would have done the trick. I also would have made a failsafe to go along with the function so it had more then just the rug to look for [or different methods of finding the rug]. Also I would have resetted the CTS, HMOD, and SMOD at the end of the function, but hey, the function does look simple and it looks for a pretty big visible and unique color found only in banks. Great job again.

Function Find_Tali : Boolean; Hey look a function that finds an item using a DTM method from the script. Very nice indeed, but its just too simple in my opinion, and while it would seem needed and useful in making it in a seperate function, It just doesn't seem right without some failsafes. Maybe you could make it check the bank for the talisman. Which also brings up another thing, what kind of talisman are we looking for here, a re-name to Find_AirTali, would help when reading it. Overall for the current state of this function, I would say it isn't needed.

Procedure ClickTali; I see that you like breaking down your script into nice and easy functions, which imo is the best thing sometimes, I salute you ^^. However, You kinda made this procedure go into a <static> mode. For example, you put if (Find_Tali) then to begin, which is great. However you then make it move the mouse to the First inventory slot and then click the space there. The least that could be put into this would be an Uptext check, but theres also a better way of doing it in my opinion. You could have either combined this with Find_Tali and make it share the DTM co-ordinates, or another alternative would be to use the Talisman point as a global variable[or as a type or whatnot] and use it in this procedure. Overall the procedure does accomplish what it needs to if instructions are followed correctly [or id like to think so], but it could use more versatility. Good job though on making it get the co-ords using Itemcoords.

Function WalkToAltar : Boolean; Here we go, Walking… probably one of the best ways to see how you script in general. For one I see its just walking to three points, lets keep that in mind. You make the script gather the points of a specific color, check the length, box them, and then click the middle of the closest box to point(X, Y); Great job on it, however what if that does not go through? what if the colors it finds are not the correct color[which I highly doubt since you CTS'ed it], then it would click at the wrong location. One way I would reduce the chance of this happening by checking the bounds of the box(s) it found. Just remember that TPA's can be used for more then just finding colors and organizing :D use them at your will. IMHO, walking should have failsafes, and since the script is only walking 3 points, It shouldn't be too much of an effort to make working DDTM(s), and RadialWalks to backup the TPA's. Also I wouldnt reset the CTS after it found the colors, I would reset the CTS either after the result was true, or before it terminated due to an error. Great job on it though, I see you put some effort into it, and that deserves positive recognition.

Function Find_Banker : Boolean; Time to bank baby. Great name for the function. I don't really like the fact you put the failsafe for AreWeInBank into this function. I see you followed the same format with your TPA's [find colors, check lengths, box, middle],
and its great and all because it does work, but you could add a little more pizazz [wow thats an actual word, i got no spellcheck error, pizazz!] to it. Such as simple things like [again]checking the bounds of the boxes. Based on the way that function is currently, it will move the mouse to the middle of each box in the atpa until it finds the banker. Thing is =/ what if it never does not find the banker even though it did pick up the color [maybe a bad w/h was used], or what if it moves the mouse to a bunch of look-a-like colors on the screen before finally coming across to the banker. I would at least make it try to find the colors and banker at least 1 time before exiting. I know its not doing much but open a bank, but it could use a lot more failsafe's [such as a simple OpenBank for one], as well as more versatility on the TPA's. Good function but has some work to be put into it.

Function Find_RCAltar : TPoint; Awesome a different type of result this time. I must say, even though the function didn't appeal to me at first glance, it is a huge step-up from what i have seen previously in this script. So with that said, this function gets a huge thumbs up.

Function Click_RCAltar : Boolean; Im starting to notice that your skill in naming functions is incredible. Nice names, there so simple and straight forward. Also, I like the look of how your functions begin to improve [not that it should be counted for anything extra, but its really good to see]. I would have made the options in that case into a 70:30 chance rather then a 90:10 chance. I would have also made it check for something to make sure its -In- the altar, this way less errors start happening.

Procedure Blindclick; There are functions that walk, fight, and even act human, but then theres that procedure that could have been summed up in one line… Mouse(); lol, im not gonna say this procedure is bad, because you took the time to make it! It gets an A for effort, but it could have been either implemented as a final failsafe in a function [I dont know what the hell its supposed to click unfortunately =[ ]. You could have also maybe added in a location or something in it, like procedure(blindclick : string); or something, idk… just use mouse my friend =].

Function FindPortal : TPoint; This function is pretty crystal clear, it finds a color, makes a box around it and stores the middle of it as a tpoint. Nothing special, nothing bad, but it gets the job done I suppose. Good job on using the TPoint as a result.

Procedure Leave_Altar; This is the first time im seeing you use Marks [Time Limit]. Its good to see, but the way you used it was not the ideal way. You could have done a while (timefrommark(time) < 20000) do // begin procedure. The procedure could have used different ways of waiting for the loadtimes, rather then a raw wait(X), you could have made it search for the black box that comes up at the top left of your screen when its loading, and then make it continue when that box dissapeared [by the use of TPA's].

Function WalkToBank : Boolean; Second Walking function, I like the fact you just changed the name of the location its walking to and kept everything else in the name the same =]. Good job on making it check the Run Energy and enabling it if it was high enough. In your For..To..Do loop, i would take out the if i = 4 then break, as 4 is the last number in the loop anyway. I would have also resetted the symbol accuracy before it exited in addition to when it fails.

Function In_Altar : Boolean; The Function is decent =]. I like it, and I wouldn't really change much about it. Things go into a nice alignment in this functon ^^.

Procedure Main_Deposit; Once again things into good allignment here. However I would have used a ClickAllItemsExcept() instead of Deposit/DepositAll since you have a DTM for the item your depositing, but your script still does the same thing either way. Great job.

Procedure Main_Withdraw; Good job on it, I would use WithdrawItem() as a Failsafe though [since you have the DTM's lol]. Good job =].

Procedure SetupPlayers; Alright this could use a lot of work, but im not going to tackle you for it. Instead ill post up what it could have been doing in the summary.

Procedure SetupScript; It could have gone in the mainloop, but hell, it fits the organization of the script. So great job.

Mainloop: Not going to put my thoughts as this is the task lisk for the script.

——————————————————————————

Overall Summary

Technique (50/ 100)
+ Alot of If..Then Statements and For..To..Do Loops.
- Not many With..Do Statements and While..Do Loops.

Individuality (43 / 100)
- The script doesn't seem to have much more then a repeat of the same methods.

Follow All SRL Rules (90 / 100)
~ There is not much loop usage to break out of.
+ You exited if your player is not logged in.

Creativity (90 / 100)
+ Abundant TPA Usage.

Efficiency (30 / 100)
+ Organization.
- Most of your procedures are not failsafed and look very prone to errors.
- It does not have many notes that come up to help debugging the script if needed.

Presentation (55 / 100)
+ Title Page: Nicely Done(+25).
+ Progress Report: could add more(+10).
- Commented Procedures and Functions: Not really(+0).
+ Scripting Standards : (+15);

Meeting All Requirements (80/ 100)
+ Progress Report (+10).
+ Antiban and AntiRandom(+40).
+ Multiplayer(20).

Added Extras: (30 / 100)
+ Talisman Support.

Summary: Your script is good to say the most. It had a insufficient amount of marks in it. It could have made more use with the Player arrays, its in need of fail safes[especially for walking], it also could have used more antiban[which has findnormalrandoms in it] involved. Your TPA usage was abundant in the script, unfortunately the same methods were repeatedly used each time. For the most part, some procedures/functions could have gone without the TPA's, and a simple FindColor(Spiral)Tolerance would have cleared made it easier. You also reset your CTS way too often in the script[you should just reset it at the end/exiting]. Your usage of loops was not so much, and you used if.then alot more then any other loop[which is not necessarily bad, but it would have been great to see other ones in use]. The SetupPlayers procedure could of have had a much better use if it kept track of the players loads and acted as each players mainloop. However, the organazation of the script was kept well [even though some comments would have been nice :P], and that deserves recognition.

Total Score (468 / 800) = 58.5%

Thanks for Reading :D
-My first time judging, Heavenguard

TRiLeZ

2010-08-08 03:43:03

DeclarePlayers:

A with…do would be more efficient.

AntiBan:

The extra begin…end is not necessary (The begin under the logged out check).


11..12 : GameTab(RandomRange(20, 36));
It would be better to use constants instead of numbers.

Report:


SRLRandomsReport
You forgot the semi-colon. :p

It would be better if you had a more informative progress report. Telling the time ran and the loads done isn't enough. A better progress report would have been one that shows the users' name, loads done, runes crafted, running time and maybe even how much money they made.

Load_DTM:

It would have been better to make WhichDTM a string so that script readers could easily see what DTM is being loaded.


if WhichDTM = 2 then
begin
GameTab(Tab_Equip);
If (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
GameTab(Tab_Inv);
Result := True;
end;
That sets the result to true, whether or not the DTM is found. Is that supposed to happen or did you make an error?

The name of the function is misleading… it doesn't return a DTM and the loaded DTM is freed; it should be named something like DTM_Found or something along the lines of that.

The code could be shortened if you used the case for everything, instead of the if statements.

Ex:

function Load_DTM(WhichDTM: integer): Boolean;
var
DTM: Integer;
begin
case WhichDTM of
1 :
begin
DTM := DTMFromString('78DA63CC656260F8C00007401EC3DD2B9719F' +
'881342310FF0702C672A0E84B0634C0042619A13CC65220FF3F01' +
'352940FE3F026AE281FC8FF8D50000BE4B0D91');
end;
2 :
begin
DTM := DTMFromString('78DA63F4646660F0676480012620BE7FED1A0' +
'33F900689FE0702460FA09A10841A844A881A306D8B6A0E563501' +
'40354104D480DCE3895F0D002C1F09B3');
If (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
GameTab(Tab_Inv);
Result := True;
end;
end;
3 : DTM:= DTMFromString('78DA63E4676660506264800126205EB968210' +
'317900689FE07024671A01A4D841A844A881A30CD01546342400D' +
'1B508D320135A2403552F8D50000FD860720');
4 :
begin
DTM := DTMFromString('78DA635CC8C8C0B087010E9880D8CDD9194C0' +
'36518FE0301E32A206B13031A6002938C501EE35A206B3F0135F3' +
'81AC9304D44C02B276E1570300A2D50BBD');
If (FindDTM(DTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
Result := True;
end;
end;
if (FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Result := True;
FreeDTM(DTM);
end;

AreWeInBank:


Exit;
This isn't needed since it's already at the end of the function.

Click_Tali:


a := ItemCoords(1);
What if the talisman isn't in the 1st inventory slot? Why not use a DTM to get the coordinates of the tali and click with that? It would also eliminate the need of Find_Tali.

WalkToAltar:

Nice use of TPA walking. I suggest you use FilterPointsPie make make the walking more accurate.

Find_Banker:

No use of SRL's banking functions?

Leave_Altar:


Wait(RandomRange(10000, 11000))//loading time
That's a long time to wait. Why not just look for a minimap change or the "Loading… Please Wait" frame in the top-left corner of RS?
You also forgot the semi-colon. :p


if (TimeFromMark(time) > 20000) then
TerminateScript;
Why not just check if it didn't find the uptext instead of guessing that it didn't work. Also, the time from the mark shouldn't be over 20 seconds, especially if it didn't find the portal.

WalkToBank:

Nice use of TPA walking. Once again, I suggest that you use FilterPointsPie.


Writeln('Successfull Walk to Bank');
If (TimeFromMark(t) > 30000) then
begin
if (AreWeInBank) then
Result := True;
Exit;
end;
It doesn't necessary take more than 30 seconds to walk to the bank… if it takes less, the result will remain false.


Exit;
end;
Why use Exit when it's already at the end of the function?

In_Altar:


While IsMoving or FlagPresent do
AntiBan;

That's a lot of antiban… just saying.

Main_Deposit:


If PinScreen then
begin
InPin((Players[CurrentPlayer].Pin));
Wait(RandomRange(250, 500));
end else
begin
if BankScreen then
If Load_DTM(1) and Load_DTM(3) then
begin
Deposit(2, 28, True);
Wait(RandomRange(1000, 2000));
end;
If Load_DTM(1) then
DepositAll;
end
If the pinscreen comes up, it won't bank.


If Load_DTM(1) then
DepositAll;
This will be called whether the bank screen is open or not.

Main_Withdraw:

What if the pin screen is showing?

Overall:

Decent job overall. There's a bunch of fixes that you need to do before the script is bug free. I didn't see any fail-safes, which is bad. Fail-safes are very important in scripts. Your organization was good, but could have been better.

GRADE:

1. Technique (65/100)
2. Individuality (70/100)
3. Follow all SRL rules (80/100)
4. Creativity (45/100)
5. Efficiency (55/100)
6. Presentation (55/100)
7. Meeting all Requirements (75/100)
8. Added Extras (0/100)

Overall: 445/800