SRL Archive - Archive

abu_jwka - SRL Member Application


Abu

2012-03-26 13:10:28

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


Are you affilated in anyway with Jagex LTD?
No, No I'm not

Were you Referred to SRL?
N/A


What is your general programming knowledge?
Pascal


Are you a member of any other communities?
www.mmorpguides.com - moderator


Tell us about yourself…
From: abu_jwka
Basically I'm 16 years of age and I joined this website just over a month ago because someone on RuneDream said that Simba Bots(program :p) kicked their asses when it came to botting.
So, I joined this site initially as a leech, only looking to take scripts and give nothing in return. However, I was dissapointed by the lack of quality in Air Runecrafting Scripts and soon realised that if I wanted a good script, I'll have to make one myself.
So I started learning the basics of scripting and helping around the community. In fact, in my very first post on this forum I was already helping multiple members. Eventually, this became a habit and around a week ago I got this little Teddy Bear under my username which gives the drop-down text: SRL Helper.
I was very surprised at this and was quite honoured as I had no idea this cup even existed. Anyway, so I released my first script a few weeks ago. It wasn't amazing, but it was stable and received positive feedback from the users.
However, I still wasn't satisfied - I wanted to make the best Air Runecrafting available to the public. So, I released a Version 2 of my script which showed my ability to use Multiplayer and put Progress Reports into scripts, but, it still wasn't the best as Bolshak25 released a script which was better than mine.
As a result, I did a bit of research on more advanced methods such as TPA. Though I am not amazing with TPA functions, in my latest update (uploaded just today), I showed that I can use them successfully to detect objects as well as moving NPC's. I now feel that my latest update makes this script the best Air Runecrafting script available to the public :)
By becoming an SRL Member, I am hoping to improve my knowledge on more advanced functions and be more patient when releasing scripts and updates, so that I get them near perfect first time round. It would also be a huge to become an SRL Member after only just over month on this site - I really have been working hard to improve skills.
Finally, I used BobboHobbo's SRL Member Application Decider Tool to see if I should apply and this was my result:
Add tdtmpointdef
Add while
Make sure include walking in your script!
You should Apply for members.
[==================================]
[= Result: 83%
[==================================]

That is all :)



Please show us one (or multiple) of your scripts.
http://villavu.com/forum/showthread.php?t=78041

footballjds

2012-03-26 13:12:01



program Abu_jwkaAirKrafter; /// 100% ORGINAL NAME!! (lol:p)
{$DEFINE SMART}
{$i srl\srl.simba}
{$i ObjectDTM\ObjDTMInclude.simba}

Var
x, y, StartTime, OriginalXP, CurrentXP: Integer;
XPGain, LoadsDone, TimeGone, Runes: Array of Integer;
XPPerHour, LoadsPerHour, RunesPerHour: Array of Integer;


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


with Players[0] do
begin
Name := '';
Pass := '';
Nick := ''; // use four characters from your username
Pin := '';
Active := True;
end;

with Players[1] do
begin
Name := '';
Pass := '';
Nick := 'N/A.'; //use four characters from your username
Pin := '';
Active := False; // Set to True if you want to use!
end;
end;




//-- AntiBan Procedure -- \\

procedure Antiban;
begin
case Random(18) of
1: RandomRClick;
2: HoverSkill(Skill_Runecrafting, False);
3: HoverSkill(Skill_Crafting, False);
4: PickUpMouse;
5: ExamineInv;
7: MissMouse(100,100);
9: ExamineInv;
10:
end;
end;



//-- MiniBreak --\\


procedure BreakText;
begin
SMART_DrawText(100,200,UpCharsEx,'Dont Worry, Just Taking A Human-Like Break...',clAqua);
end;


procedure MiniBreak;
begin
case(Random(70))of
1: begin BreakText; Wait(15000 + random(7900)); end;

2: begin BreakText; Wait(20500 + random(8550)); end;

3: begin BreakText; Wait(35040 + random(6759)); end;

4: begin BreakText; Wait(60000 + random(12549)); end;
end;
end;



//--Bank, Ruins, Altar and Portal Locations--\\

function IsAtBank: Boolean;
begin
Result := ObjDTM_InArea('80:80:7:10:7:58:75:10:7:101:55:10:7:101:47:10:7:58:59:10:7:58:51:10:7:58:67:10:7:101:63:4:58:25:60:99:104:98:101:25', True) or
ObjDTM_InArea('80:80:5:10:7:103:49:10:7:103:57:10:7:56:87:10:7:56:78:10:7:56:70:4:54:27:56:97:112:101:110:26', True);
end;

function IsAtRuins: Boolean;
begin
Result := ObjDTM_InArea('80:80:6:1:7:103:71:1:7:57:106:1:7:98:115:1:7:54:53:3:7:108:96:3:7:43:70:7:71:63:56:73:45:86:50:112:94:115:101:89:97:70', True);
end;

function IsAtAltar: Boolean;
begin
Result := ObjDTM_InArea('80:80:6:1:7:105:122:1:7:89:122:1:7:74:125:1:7:43:102:1:7:35:86:1:7:32:71:4:53:52:124:54:123:101:56:104', True) or
ObjDTM_InArea('80:80:5:1:7:124:125:1:7:108:125:1:7:91:125:1:7:28:71:1:7:28:54:4:47:58:50:114:128:106:126:57', True) or
ObjDTM_InArea('80:80:6:1:7:34:110:1:7:26:94:1:7:23:78:1:7:65:134:1:7:81:130:1:7:97:131:4:45:44:111:43:113:114:45:117', True);
end;

function IsAtPortal: Boolean;
begin
Result := ObjDTM_InArea('80:80:2:1:7:74:126:1:7:43:103:5:70:82:71:94:82:96:91:87:82:73', True);
end;




//-- Listen to Music --\\

function WaitTill70: Boolean;
begin
Result := RunEnergy(70);
end;

function ListenToMusic: Boolean;
var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, Retry: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10322521, MSX1, MSY1, MSX2, MSY2, 30);
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 30, 30);
SortATPASize(TPAA, True);
for I := 0 To High(TPAA) do
If GetArraylength(TPAA[i]) > 5 Then
begin
repeat
inc(Retry);
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
Wait(500);
if (IsUpTextMultiCustom(['alk', 'cian'])) then
begin
Result := True;
GetMousePos(X, Y);
Mouse(x,y,3,3,false);
Wait(100 + random(200));
ChooseOption('isten');
Writeln('Found Musician, listening to music');
Wait(5000 + random(1000));
Break;
end;
until (Retry = 7);
WaitFunc(@WaitTill70, 10 + Random(15), 15000);
Break;
end;
end;


// -- Walking to Ruins and Walking to Bank --\\

procedure WalkToRuins;
begin
if not LoggedIn then Exit;
Antiban;
SetRun(True);
if not ObjDTM_Walk('63:133:4:1:7:23:122:10:7:42:98:10:7:42:90:10:7:42:82:4:77:125:79:138:39:140:37:124', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('74:116:3:10:7:62:98:10:7:105:91:1:7:42:103:4:54:106:53:123:90:119:91:107', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('37:95:5:10:7:54:70:10:7:54:58:1:7:34:76:10:7:98:32:10:7:99:24:5:43:78:11:78:15:105:56:104:66:80', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('26:88:4:0:7:46:121:10:7:65:66:10:7:65:46:1:7:45:71:4:12:81:11:106:39:106:49:61', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('34:103:5:1:7:78:63:1:7:47:102:10:7:97:59:10:7:97:47:10:7:97:40:4:18:90:23:124:57:108:57:78', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('28:110:4:1:7:57:129:1:7:44:107:1:7:78:67:0:7:79:118:4:12:101:21:130:60:119:45:83', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('26:107:4:1:7:70:99:1:7:94:82:1:7:58:111:1:7:106:103:5:13:91:19:122:47:122:54:106:43:80', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('31:108:4:1:7:95:83:1:7:69:126:1:7:69:99:1:7:56:113:4:12:90:15:116:48:116:46:75', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('40:116:5:1:7:66:63:1:7:46:67:1:7:42:99:1:7:114:83:5:7:57:46:5:24:100:27:132:56:132:64:99:50:81', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('31:120:5:1:7:113:88:1:7:61:66:1:7:39:70:5:7:51:48:6:7:49:50:4:16:105:22:129:52:131:52:85', 0, 100, 80, True);
end;
FFlag(0);
repeat
ObjDTM_Walk('80:80:2:1:7:91:103:3:7:101:83:4:74:77:73:98:92:97:91:77', 0, 100, 80, True);
until IsAtRuins;
end;


procedure WalkToBank;
begin
if not LoggedIn then Exit;
if not IsAtRuins then Exit;
if not ObjDTM_Walk('115:40:6:1:7:90:98:1:7:123:83:1:7:123:66:1:7:110:54:1:7:94:54:3:7:100:79:4:99:23:98:59:129:56:128:22', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('111:41:4:1:7:95:64:1:7:110:64:3:7:99:87:3:7:81:24:4:101:24:98:49:140:48:129:23', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('122:64:6:1:7:86:54:1:7:69:50:1:7:65:71:1:7:82:87:1:7:107:49:5:7:97:32:4:98:41:101:76:149:75:143:40', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('123:80:5:1:7:90:52:1:7:90:71:1:7:86:103:5:7:101:51:6:7:99:54:4:105:69:106:90:147:90:147:66', 0, 100, 80, True);
end;
FFlag(0);
if ObjDTM_Walk('108:66:3:1:7:128:88:1:7:78:67:5:7:69:49:4:94:41:94:68:129:69:129:41', 0, 100, 15, True) then
repeat
Wait(1500);
ClickNorth(1);
ListenToMusic;
SetRun(True);
until True;
if not ObjDTM_Walk('124:76:5:1:7:74:71:1:7:53:76:1:7:126:91:1:7:138:77:1:7:49:109:4:104:59:106:97:150:95:142:51', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('114:79:3:1:7:97:102:1:7:109:90:1:7:132:75:4:93:71:94:103:131:99:126:60', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('118:57:5:1:7:88:101:1:7:100:87:1:7:126:68:1:7:101:113:1:7:118:107:4:101:49:103:82:143:80:130:42', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('105:54:4:0:7:142:77:1:7:86:107:1:7:74:95:1:7:121:87:4:88:50:90:74:123:74:115:39', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('107:66:5:1:7:66:114:1:7:92:95:1:7:105:118:1:7:84:135:1:7:126:52:4:90:48:90:81:129:76:131:40', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('105:61:3:1:7:118:51:1:7:98:111:1:7:86:90:5:92:56:90:72:126:74:120:40:104:41', 0, 100, 80, True);
end;
FFlag(0);
if not ObjDTM_Walk('118:86:5:1:7:70:113:1:7:104:70:10:7:126:36:10:7:126:45:10:7:126:28:5:122:73:90:72:90:96:138:95:140:78', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('119:87:3:1:7:82:31:1:7:98:75:1:7:78:135:4:101:80:99:97:143:91:144:75', 0, 100, 80, True);
end;
FFlag(0);
repeat
if not ObjDTM_Walk('98:48:4:1:7:55:71:10:7:117:28:10:7:117:36:10:7:74:41:4:72:13:74:65:122:65:121:13', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('83:50:4:1:7:26:27:1:7:38:71:0:7:71:15:10:7:102:26:4:65:26:65:61:102:61:101:24', 0, 100, 80, True);
end;
until IsAtBank;
if IsAtBank then
begin
Wait(100);
if not RunEnergy(50) then
begin
RestUntil(70);
end;
end;
end;




///////------ Crafting Process ------\\\\\\\
//--Click Ruins, then Altar, then Portal--\\


function FindClickRuins: Boolean;
var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, Retry: Integer;
begin
if not LoggedIn then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 16631693, MSX1, MSY1, MSX2, MSY2, 40);
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 5, 5);
SortATPASize(TPAA, True);
for I := 0 To High(TPAA) do
If GetArraylength(TPAA[i]) > 5 Then
begin
repeat
inc(Retry);
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
Wait(500);
if (IsUpTextMultiCustom(['yste', 'uins'])) then
begin
Result := True;
GetMousePos(X, Y);
Mouse(x,y,0,0,True);
Wait(100 + random(200));
Writeln('Found Ruins, clicking Ruins');
Break;
end;
until (Retry = 7);
Break;
end;
end;


function FindAltarTwo: Boolean;
var
Runes1: Integer;
Text, Text1: String;
begin
if not LoggedIn then Exit;
if FindObjCustom(x, y, ['raft', 'rune', 'ltar'], [5591379, 5722966], 3) then
begin
MMouse(x, y, 2, 2);
Mouse(x, y, 0, 0, True);
WaitInvMaxCount(1, 6000);
Writeln('Crafted Runes');
Inc(LoadsDone[CurrentPlayer]);
Text := GetTextAtExWrap(560,210,582,222,0,0,0,65535,5,'StatChars');
If (Text<>'') Then
begin
Text1 := Replace(Text,' ','');
end else
begin
Text1 := '0';
end;
Runes1 := StrToInt(Text1);
IncEx(Runes[CurrentPlayer],Runes1);
Result := True;
end;
end;


function FindPortalTwo: Boolean;
begin
if not LoggedIn then Exit;
if not IsAtAltar then Exit;
if FindObjCustom(x, y, ['nter', 'ortal'], [4884361,5213326, 6660513], 5) then
begin
MMouse(x, y, 2, 2);
Mouse(x, y, 0, 0, True);
Wait(500);
Result := True;
end;
end;



//-- Proggy --\\

procedure ProggyTest;
var
i: Integer;
begin
if LoadsDone[CurrentPlayer] mod 5=0 then
ClearDebug;
CurrentXP := GetXPBar(1);
TimeGone[CurrentPlayer] := (GetTimeRunning/1000);
XPGain[CurrentPlayer] := (CurrentXP - OriginalXP);
XPPerhour[CurrentPlayer] :=(3600*(XPGain[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
LoadsPerhour[CurrentPlayer] :=(3600*(LoadsDone[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
RunesPerHour[CurrentPlayer] := (3600*(Runes[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
begin
ClearDebug;
Writeln('******************************************************************');
Writeln('*/////////---------- Abu''s''AirKrafter Version 2 ----------\\\\\\\*');
Writeln('*/////////----------____________________________----------\\\\\\\*');
Writeln('******************************************************************');
Writeln('');
for i := 0 to HowManyPlayers - 1 do
begin
Writeln('*/////////--------- Proggy for the player: ' + Players[i].Nick + ' --------\\\\\\\\\*');
Writeln('*/////////We have done: ' + IntToStr(LoadsDone[i]) + ' Loads / Thats ' + IntToStr(LoadsPerHour[i]) + ' loads per hour');
Writeln('*/////////We have gained: ' + IntToStr(XPGain[i]) + ' xp / Thats ' + IntToStr(XPPerHour[i]) + ' xp per hour');
Writeln('*/////////We have crafted ' + IntToStr(Runes[i]) + ' Runes / Thats ' + IntToStr(RunesPerHour[i]) + ' Runes Per Hour');
Writeln('');
end;
end;
end;


procedure Arrays;
begin
SetLength(TimeGone,HowManyPlayers);
SetLength(XPPerHour,HowManyPlayers);
SetLength(LoadsPerHour,HowManyPlayers);
SetLength(XPGain,HowManyPlayers);
SetLength(LoadsDone,HowManyPlayers);
SetLength(Runes,HowManyPlayers);
SetLength(RunesPerHour,HowManyPlayers);
end;

procedure ScriptTerminate;
begin
ProggyTest;
end;


begin
ClearDebug;
Smart_Server := 16;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
SetUpSRL;
ObjDTM_Setup;
ObjDTM_Debug := True;
StartTime := GetSystemTime;
ActivateClient;
DeclarePlayers;
Arrays;
if not LoggedIn then
begin
LogInPlayer;
WaitFunc(@LoggedIn, 10 + Random(15), 15000);
FindNormalRandoms;
end;
OriginalXP := GetXPBar(1);
repeat
repeat
if IsAtBank then
begin
if((InvCount = 0) or (InvCount < 28)) then
begin
if not (BankScreen) then
begin
ClickNorth(0);
OpenBankFast('vwb');
end else
begin
DepositAll;
if (Withdraw(0,0,0)) then
begin
Sleep(1000);
MiniBreak;
if (InvCount < 28) then
begin
Logout;
Break
end;
end;
end;
end else
begin
if (InvCount = 28) then
begin
WalkToRuins;
Wait(1000);
end;
end;
end;
if IsAtRuins then
repeat
if (InvCount = 28) then
begin
ClickNorth(0);
FindClickRuins;
Wait(1000);
end;
if (InvCount = 1) then
begin
Wait(500);
WalkToBank;
ProggyTest;
end;
until True;
if IsAtAltar then
repeat
if (InvCount = 28) then
begin
if FindAltarTwo then
begin
Wait(3200 + Random(500));
FindPortalTwo;
WaitFunc(@IsAtRuins, 10 + Random(15), 4000);
end;
end;
if (InvCount = 1) then
begin
FindPortalTwo;
WaitFunc(@IsAtRuins, 10 + Random(15), 4000);
end;
until True;
until False;
NextPlayer(Players[CurrentPlayer].Active = False);
until AllPlayersInactive;
ScriptTerminate;
end.

Abu

2012-03-26 13:47:30

The reasons for your vote (Yes or No) would be really helpful and appreciated :)

masterBB

2012-03-26 14:01:43

Here is my review. Please take it lightly, it seems you put a lot of effort in this script. It looks great and you aren't far from being a member by my standards imo.


7: MissMouse(100,100);
9: ExamineInv;
10:
end;

Why you kept the 10: there? Looks a bit like you didn't cared.


 1: begin BreakText; Wait(15000 + random(7900)); end;

Way too many semicolons on one line.


//--Bank, Ruins, Altar and Portal Locations--\\

function IsAtBank: Boolean;

function IsAtRuins: Boolean;

function IsAtAltar: Boolean;

function IsAtPortal: Boolean;

They all do the same, just with a different ObjectDTM. Could be one function.


function WaitTill70: Boolean;
begin
Result := RunEnergy(70);
end;

Not a really meaning full name. It doesn't wait. Seventy what? IsEnergie70 or Got70Energie would be better.

procedure WalkToRuins;

procedure WalkToBank;

These procedures look really repetive. It would be better to use an array of ObjectDtms or add more non objectsDtms method as back up. These procedures look a bit ugly.

procedure Arrays;
Not a real meaning full procedure name. SetArraysLength or SetupGlobalArrays would be better.

procedure ScriptTerminate;
begin
ProggyTest;
end;

One line procedure.

The end loop contains too much begin and end statements. You used x and y as global vars. Note that all thick black words don't start with a capital letter. I also find the script a bit too simple.

Abu

2012-03-26 14:10:09

Wow, thanks for that!

Now I realise all the faults in my script, I'll try to improve the quality of my actual coding in future.

Raskolnikov

2012-03-26 16:06:51

Ok. Here's what I'm noticing.

Standards

You have some mess ups. Let me show you.

    if LoadsDone[CurrentPlayer] mod 5=0 then
ClearDebug; //should be 2 more lines
CurrentXP := GetXPBar(1);
TimeGone[CurrentPlayer] := (GetTimeRunning/1000);
XPGain[CurrentPlayer] := (CurrentXP - OriginalXP);
XPPerhour[CurrentPlayer] :=(3600*(XPGain[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
LoadsPerhour[CurrentPlayer] :=(3600*(LoadsDone[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
RunesPerHour[CurrentPlayer] := (3600*(Runes[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
begin //why do you have a begin here? I'll delete it so I can show you what I mean.
ClearDebug; //this whole next block of text will be two lines back after begin is gone
Writeln('******************************************************************');
Writeln('*/////////---------- Abu''s''AirKrafter Version 2 ----------\\\\\\\*');
Writeln('*/////////----------____________________________----------\\\\\\\*');
Writeln('******************************************************************');
Writeln('');
for i := 0 to HowManyPlayers - 1 do
begin //two lines back
Writeln('*/////////--------- Proggy for the player: ' + Players[i].Nick + ' --------\\\\\\\\\*');
Writeln('*/////////We have done: ' + IntToStr(LoadsDone[i]) + ' Loads / Thats ' + IntToStr(LoadsPerHour[i]) + ' loads per hour');
Writeln('*/////////We have gained: ' + IntToStr(XPGain[i]) + ' xp / Thats ' + IntToStr(XPPerHour[i]) + ' xp per hour');
Writeln('*/////////We have crafted ' + IntToStr(Runes[i]) + ' Runes / Thats ' + IntToStr(RunesPerHour[i]) + ' Runes Per Hour');
Writeln('');
end; //two lines back

Before I show you the corrected one, I just want to ask why you had that random begin in there? Well, I deleted it in this version so I could show you what I meant.

    if LoadsDone[CurrentPlayer] mod 5=0 then
ClearDebug; //should be 2 more lines
CurrentXP := GetXPBar(1);
TimeGone[CurrentPlayer] := (GetTimeRunning/1000);
XPGain[CurrentPlayer] := (CurrentXP - OriginalXP);
XPPerhour[CurrentPlayer] :=(3600*(XPGain[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
LoadsPerhour[CurrentPlayer] :=(3600*(LoadsDone[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
RunesPerHour[CurrentPlayer] := (3600*(Runes[CurrentPlayer]))/((TimeGone[CurrentPlayer]));
ClearDebug; //this whole next block of text will be two lines back after begin is gone
Writeln('******************************************************************');
Writeln('*/////////---------- Abu''s''AirKrafter Version 2 ----------\\\\\\\*');
Writeln('*/////////----------____________________________----------\\\\\\\*');
Writeln('******************************************************************');
Writeln('');
for i := 0 to HowManyPlayers - 1 do
begin //two lines back
Writeln('*/////////--------- Proggy for the player: ' + Players[i].Nick + ' --------\\\\\\\\\*');
Writeln('*/////////We have done: ' + IntToStr(LoadsDone[i]) + ' Loads / Thats ' + IntToStr(LoadsPerHour[i]) + ' loads per hour');
Writeln('*/////////We have gained: ' + IntToStr(XPGain[i]) + ' xp / Thats ' + IntToStr(XPPerHour[i]) + ' xp per hour');
Writeln('*/////////We have crafted ' + IntToStr(Runes[i]) + ' Runes / Thats ' + IntToStr(RunesPerHour[i]) + ' Runes Per Hour');
Writeln('');
end; //two lines back

Ok? Here's another problem area.

function FindAltarTwo: Boolean;
var
Runes1: Integer;
Text, Text1: String;
begin
if not LoggedIn then Exit;
if FindObjCustom(x, y, ['raft', 'rune', 'ltar'], [5591379, 5722966], 3) then
begin //should be two lines back
MMouse(x, y, 2, 2); //this whole block two lines back
Mouse(x, y, 0, 0, True);
WaitInvMaxCount(1, 6000);
Writeln('Crafted Runes');
Inc(LoadsDone[CurrentPlayer]);
Text := GetTextAtExWrap(560,210,582,222,0,0,0,65535,5,'StatChars');
If (Text<>'') Then //I wouldn't capitalize these.
begin //two lines back
Text1 := Replace(Text,' ',''); //this should be two lines in front of begin
end else //two lines back
begin //three lines back
Text1 := '0'; //one line back
end; //three lines back
Runes1 := StrToInt(Text1); //two lines back
IncEx(Runes[CurrentPlayer],Runes1); //two lines back
Result := True;
end;
end;

Now, another (albeit different) problem I have with this.

end else
begin
Text1 := '0';
end; //you don't need the begin and ends

You don't need them, because you're only calling one line after. Here's the complete change for this section.

function FindAltarTwo: Boolean;
var
Runes1: Integer;
Text, Text1: String;
begin
if not LoggedIn then Exit;
if FindObjCustom(x, y, ['raft', 'rune', 'ltar'], [5591379, 5722966], 3) then
begin
MMouse(x, y, 2, 2);
Mouse(x, y, 0, 0, True);
WaitInvMaxCount(1, 6000);
Writeln('Crafted Runes');
Inc(LoadsDone[CurrentPlayer]);
Text := GetTextAtExWrap(560,210,582,222,0,0,0,65535,5,'StatChars');
if (Text<>'') then
Text1 := Replace(Text,' ','');
else
Text1 := '0';
Runes1 := StrToInt(Text1);
IncEx(Runes[CurrentPlayer],Runes1);
Result := True;
end;
end;

Yeah. So there are just some inefficient blocks of code and standard errors. No huge problem, just something you should always keep in mind.

Finding Methods

Alright. I have a couple of concerns here:

if FindObjCustom(x, y, ['raft', 'rune', 'ltar'], [5591379, 5722966], 3) then
begin
MMouse(x, y, 2, 2);
Mouse(x, y, 0, 0, True);

I would just not use FindObjCustom. You demonstrate that you know how to use TPAs, but then you go off and use FindObjCustom. It makes you seem noobish. I would use TPA functions if at all possible.

Another problem I have with this (and this is really nitpicky) is the fact that you have randomness in MMouse but don't have it in Mouse. It doesn't matter if you have randomness in MMouse, because you're going straight for the x, y point anyways.

A similar problem is that FindObjCustom by definition is going to go to your x,y point, so I fail to see the purpose in using MMouse. Your pointer is already there… just call Mouse.


Other than that, I really liked your usage of ATPAs and think you're cool on that front.

Failsafes

Love 'em. You have them everywhere. Just want to commend you a little bit.

      if not LoggedIn then Exit;
if not IsAtRuins then Exit;
if not ObjDTM_Walk('115:40:6:1:7:90:98:1:7:123:83:1:7:123:66:1:7:110:54:1:7:94:54:3:7:100:79:4:99:23:98:59:129:56:128:22', 0, 100, 15, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('111:41:4:1:7:95:64:1:7:110:64:3:7:99:87:3:7:81:24:4:101:24:98:49:140:48:129:23', 0, 100, 80, True);
end;

It's not correct standards, but you have three failsafes in what… five lines? Liking it. Just as a point of efficiency:

      if not LoggedIn then Exit;
if not IsAtRuins then Exit;

In the function IsAtRuins, you could have called if not LoggedIn then Exit; Doesn't really matter, just a little point to help you out.

Walking

ObjectDTM is great and all, and you do have failsafes, but I would recommend making another backup walking procedure. (not ObjectDTM) Even radialwalk would be a fine backup, but that's just a suggestion. The fact that you even have walking is awesome, and if it works for you, do it.

Well, that's the end of my shpiel for now, but I'm undecided as for how to vote. I'll wait for some more input.

Abu

2012-03-27 11:26:23

Wow! That is some great feedback!

Okay, as to why I always indent begin, I always thought you were supposed to. However, thanks to your comments I went back to the beginners guide and saw that you don't indent begin's, you indent if's and everything you write after begin. That would explain my poor standards.

As to why I use begin..end for single lines - it's because I just want to make sure they work. Sometimes I get worried that If I don't add a begin..end statement, then it won't work. However, I won't use them anymore for single statements.

Furthermore, about the FindObjCustom uses, they were there from when I first made the script. With updates, I eventually began to use TPA's but I also noticed that I didn't have any problems finding the Altar or the Portal using FindObjCustom so I just left them how they were - I didn't want to mess anything up that worked perfectly fine.

Anyways, thanks for the tips about when to use failsafes and helping me correct my standards. In future scripts I will obliterate the use of FindObjCustom and will start to use alternative walking methods as backup paths.

Thanks :)

masterBB

2012-03-27 11:37:41

You also seem to use too many of these guys, ( ).

example:
XPPerhour[CurrentPlayer] :=(3600*(XPGain[CurrentPlayer]))/((TimeGone[CurrentPlayer]));

Could look like:

XPPerhour[CurrentPlayer] := 3600 * XPGain[CurrentPlayer] / TimeGone[CurrentPlayer];

Abu

2012-03-27 11:42:40

Omd! I just realised that because of BIDMAS/BODMAS, it would the division first anyway, clever girl guy… :garfield:

Also, you commented on why in my AntiBan procedure I left an empty value like this:
10:
It's because in all the AntiBan threads I read, they all seemed to leave the last value blank for some reason… so I did too :p

masterBB

2012-03-27 15:42:02

Rougly fixed the standards of the mainloop, not all.

begin
ClearDebug;

Smart_Server := 16;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;

SetUpSRL;
ObjDTM_Setup;
ObjDTM_Debug := True;
StartTime := GetSystemTime;
ActivateClient;
DeclarePlayers;
Arrays;

if not LoggedIn then
begin
LogInPlayer;
WaitFunc(@LoggedIn, 10 + Random(15), 15000);
FindNormalRandoms;
end;

OriginalXP := GetXPBar(1);

repeat
repeat
if IsAtBank then
begin
if InvCount < 28 then
begin
if not (BankScreen) then
begin
ClickNorth(0);
OpenBankFast('vwb');
end else
begin
DepositAll;
if (Withdraw(0,0,0)) then
begin
Sleep(1000);
MiniBreak;
if (InvCount < 28) then
begin
Logout;
Break
end;
end;
end;
end else
if (InvCount = 28) then
begin
WalkToRuins;
Wait(1000);
end;
end;

if IsAtRuins then
if (InvCount = 28) then
begin
ClickNorth(0);
FindClickRuins;
Wait(1000);
end
else if (InvCount = 1) then
begin
Wait(500);
WalkToBank;
ProggyTest;
end;

if IsAtAltar then
if (InvCount = 28) then
begin
if FindAltarTwo then
begin
Wait(3200 + Random(500));
FindPortalTwo;
WaitFunc(@IsAtRuins, 10 + Random(15), 4000);
end;
end
else if (InvCount = 1) then
begin
FindPortalTwo;
WaitFunc(@IsAtRuins, 10 + Random(15), 4000);
end;

until False;
NextPlayer(Players[CurrentPlayer].Active = False);
until AllPlayersInactive;
ScriptTerminate;
end.

Also divisions aren't higher on the priority list. It just works from left to right in this case. * and / do have higher priorities than + and - but are lower than ( ). Note that precision could be lost if it divides before it multiplies cause it will ignore everything behind the point (1 / 10 * 3600 equals 0 * 3600).

Harry

2012-03-27 15:46:19

You never check if your backup walking method works (just skimmed other replies and didn't see anything about actually CONFIRMING (Result=x) if the walking resulted true).

BTW, that "should you apply for members" program is rillllie old :p Don't take it too seriously.

Frement

2012-03-27 15:47:33

From: masterBB
You also seem to use too many of these guys, ( ).

example:
XPPerhour[CurrentPlayer] :=(3600*(XPGain[CurrentPlayer]))/((TimeGone[CurrentPlayer]));

Could look like:

XPPerhour[CurrentPlayer] := 3600 * XPGain[CurrentPlayer] / TimeGone[CurrentPlayer];


XPPerhour[CurrentPlayer] :=(3600 * XPGain[CurrentPlayer]) / TimeGone[CurrentPlayer];

I think that would be much better for readability.

Kyle Undefined

2012-03-27 15:53:39

From: Harry
You never check if your backup walking method works (just skimmed other replies and didn't see anything about actually CONFIRMING (Result=x) if the walking resulted true).

BTW, that "should you apply for members" program is rillllie old :p Don't take it too seriously.


Didn't BH updated it? Still holding my vote.

Abu

2012-03-27 15:57:08

From: Harry
You never check if your backup walking method works (just skimmed other replies and didn't see anything about actually CONFIRMING (Result=x) if the walking resulted true).


Explain a bit more please on how I would confirm it?




EDIT:
From: Kyle Undefined
Didn't BH updated it? Still holding my vote.


Yes he did, he updated it yesterday :cartman:

Raskolnikov

2012-03-27 15:58:45

From: abu_jwka
Wow! That is some great feedback!

Okay, as to why I always indent begin, I always thought you were supposed to. However, thanks to your comments I went back to the beginners guide and saw that you don't indent begin's, you indent if's and everything you write after begin. That would explain my poor standards.

As to why I use begin..end for single lines - it's because I just want to make sure they work. Sometimes I get worried that If I don't add a begin..end statement, then it won't work. However, I won't use them anymore for single statements.

Furthermore, about the FindObjCustom uses, they were there from when I first made the script. With updates, I eventually began to use TPA's but I also noticed that I didn't have any problems finding the Altar or the Portal using FindObjCustom so I just left them how they were - I didn't want to mess anything up that worked perfectly fine.

Anyways, thanks for the tips about when to use failsafes and helping me correct my standards. In future scripts I will obliterate the use of FindObjCustom and will start to use alternative walking methods as backup paths.

Thanks :)


I totally understand. If it works, don't break it :P. Still, you want to move over to showing an understanding of TPAs and stuff ASAP as they are much better.

From: Kyle Undefined
Didn't BH updated it? Still holding my vote.


He updated it. Just search for BobboHobbo 2012 and it's the first result.

I'll also still hold my vote.

Edit:

From: abu_jwka
Explain a bit more please on how I would confirm it?


I think what he's saying is that you keep walking until AtRuins. You never actually have a function to call (after your backup methods) if it can't find it. You should have an if not FindOBJDtm(backupdtm) then (whatever). This is a failsafe so it doesn't just keep trying to walk to further points when it couldn't get to the first one in the first place.

Another thing to consider in your repeat at the bottom of that function is to put Until(AtRuins) or not (LoggedIn)
That's a pretty good failsafe imo.

Abu

2012-03-27 16:06:24

Thanks, I'm gonna clean up the script now, but I won't update my initial thread - this is just for me so I get used to using proper standards and failsafes for my next script :)

[XoL]

2012-03-27 20:36:39

It appears on my little break everyone else took over! argh, I have nothing to say they explained it very well.

WT-Fakawi

2012-03-28 02:38:42

Voting yes on account of style. Your coding skills will need to improve over time.

'Toxin

2012-03-28 02:45:47

I'm on the line with this one… You seem to have knowledge, great attitude, willing to learn… Don't know if that'll cut it however. Longevity is something I look for so I am holding for now…

Raskolnikov

2012-03-28 02:53:33

I'll vote yes. Your standards aren't very great, but I think that you're showing improvement and being a good member of the community.

BobboHobbo

2012-03-28 07:01:53

As Harry said, dont take my Application tool too seriously, its just a basic outline of whats expected in a script to be accepted by SRL Members. Although you Include mostly all requirements (TPA's, DDTM's, etc.) but sadlyits the way you use it and your consistency with it. Like you have TPA's then you switch to FindObj, which to me shows lazyness.

This one is difficult, but due to your attitude and accepting of constructive criticism I say.
Yes.

Sin

2012-03-28 07:03:31

God lol, forgot to say why I voted No.

I voted no on account of you being too new, you just got here, take sometime and chill out and get to know us ;P

Jagex_Fagex

2012-03-28 10:49:47

You are much too new, sorry, i vote no on all applications for people that are only a couple of months old. I don't feel that is a long enough period of time to become integrated with the community.

Abu

2012-03-28 11:07:18

From: BobboHobbo
Like you have TPA's then you switch to FindObj, which to me shows lazyness.

This one is difficult, but due to your attitude and accepting of constructive criticism I say.
Yes.


Thank you for the vote. However, I was not being lazy as I did not switch to FindObjectCustom, they were already in my first version of the script. I introduced TPA's in the later version, but simply placed the TPA functions above the FindObject functions which make it looked like I stopped using TPA's - but I did not. This is because the FindObject functions I was using were working brilliantly and I saw no need to change them.

However, I really appreciate the vote.


To all those who say I haven't been here long enough, I completely understand.. but doesn't that show my commitment as I've made a fully working and probably the best public Air Runecrafting script in so less time?

To everyone else, thank you for your votes :)


EDIT: My standards were poor only due to the reason I misread the beginners guide on when to indent. I have been indenting begins for some time now and honestly, to me it's much easier on the eye

masterBB

2012-03-28 11:12:53

I changed my mind, I want to vote yes instead of no.

Abu

2012-03-28 12:53:34

From: masterBB
I changed my mind, I want to vote yes instead of no.


May I ask why? :redface:

masterBB

2012-03-28 13:12:55

From: abu_jwka
May I ask why? :redface:


My vote is based upon several factors. I still think that the script you posted is not good enough to get the members status, but your attitude is great. You've received the helpers cup within 200 posts, that means something. You got my yes vote as a person, not as a scripter.

After someone commented here that you are not integrated enough in this community, I though about that, and I don't agree. I do think you are a part of this community, I rarely post within the script section yet I knew your name. That's a big plus. I usually only remember the names of members that made a certain impression on me.

If you ask me what a SRL Member is, then I don't see that rank as prove of scripting abilities, but rather as a proof of commitment in the community. You learned scripting, and I believe not only for the cause of botting but because you are eager to learn too. This makes you a great SRL Member in my opinion.

Abu

2012-03-28 13:15:19

From: masterBB
My vote is based upon several factors. I still think that the script you posted is not good enough to get the members status, but your attitude is great. You've received the helpers cup within 200 posts, that means something. You got my yes vote as a person, not as a scripter.

After someone commented here that you are not integrated enough in this community, I though about that, and I don't agree. I do think you are a part of this community, I rarely post within the script section yet I knew your name. That's a big plus. I usually only remember the names of members that made a certain impression on me.

If you ask me what a SRL Member is, then I don't see that rank as prove of scripting abilities, but rather as a proof of commitment in the community. You learned scripting, and I believe not only for the cause of botting but because you are eager to learn too. This makes you a great SRL Member in my opinion.


I'm gobsmacked.:surprised:

Thank you for that praise, it gives me a real boost of confidence.

BobboHobbo

2012-03-29 03:13:51

From: abu_jwka
Thank you for the vote. However, I was not being lazy as I did not switch to FindObjectCustom, they were already in my first version of the script. I introduced TPA's in the later version, but simply placed the TPA functions above the FindObject functions which make it looked like I stopped using TPA's - but I did not. This is because the FindObject functions I was using were working brilliantly and I saw no need to change them.

However, I really appreciate the vote.


Ah okay, makes sense. Well when you make your next script, be sure to play with TPA's instead of FindObj, otherwise ill be disappointed !! but you do have a valid point there. Goodluck.

@Master - Could not agree anymore with that, well said.

rice

2012-03-29 04:06:14

I have to say No, I feel as if your too new in the community. Your knowledge of scripting is quite nice Keep it up and you will be a member in no time

the flea

2012-03-29 10:16:33

I voted yes and was actually very suprised too see there are more no's than yes!

Although its been pointed out there are many flaws in your script your attitude throughout this thread and the forums where I have seen your posts has been great. The scripting ability will improve with time so I don't think there is any need for worries there.

I am actually wondering how you have collected 13 no's in a thread where almost everyone is saying yes :/

WT-Fakawi

2012-03-29 11:01:08

Changed MasterBB's vote from no to yes.

Abu

2012-03-29 11:04:10

From: the flea


I am actually wondering how you have collected 13 no's in a thread where almost everyone is saying yes :/


Because not many people like to justify their vote, it's sad really because I'm not in a position to flame nor would I flame even if I could.

Thanks for the vote :)

footballjds

2012-03-29 11:15:34

From: abu_jwka
Because not many people like to justify their vote, it's sad really because I'm not in a position to flame nor would I flame even if I could.

Thanks for the vote :)


False, some people keep their piece to themselves.
I don't need to be "justified". I believe my knowledge justifies my vote…

Abu

2012-03-29 11:38:01

From: footballjds
False, some people keep their piece to themselves.
I don't need to be "justified". I believe my knowledge justifies my vote…


Hmmmm true I guess, but feedback would help me know where I am going wrong …. if it hasn't been mentioned already :p

Abu

2012-03-29 14:42:19

BUMP

Taken into account all Feedback, I spent a few hours (3) rewriting the script. I won't update my public thread with this version, but thought I'd post it here to show your feedback has not gone to waste.

In this rewrite I have:
- Improved my overall standards - thanks to those who fixed certain functions
- Fixed the empty value in the Antiban
- Removed unnecessary semicolons in my MiniBreak procedure
- Renamed functions to fit their purpose
- Added more than one line in ScriptTerminate procedure
- Fixed unnecessary begins in the Proggy
- Removed the capitals in the If…Then statement
- Removed begin and ends for one line statements, with the exception of one
- Changed FindPortal from a FindObjCustom into a TPA function
- Added failsafes in correct places
- Removed excessive use of brackets in Proggy
- I kept one FindObjectCustom function as it works flawlessly
- Finally, instead of having ObjectDTM's as bakup paths, I added RadialRoadWalk and RadialWalk methods as backup walking functions


Here is the script, I added comments in most of the places where I made changes - with the exception of spamming 'improved standards':
program Abu_jwkaAirKrafter; /// 100% ORGINAL NAME!! (lol:p)
{$DEFINE SMART}
{$i srl\srl.simba}
{$i ObjectDTM\ObjDTMInclude.simba}

Var
x, y, StartTime, OriginalXP, CurrentXP: Integer;
XPGain, LoadsDone, TimeGone, Runes: Array of Integer;
XPPerHour, LoadsPerHour, RunesPerHour: Array of Integer;


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


with Players[0] do
begin
Name := '';
Pass := '';
Nick := ''; // use four characters from your username
Pin := '';
Active := True;
end;

with Players[1] do
begin
Name := '';
Pass := '';
Nick := 'N/A.'; //use four characters from your username
Pin := '';
Active := False; // Set to True if you want to use!
end;
end;




//-- AntiBan Procedure -- \\

procedure Antiban;
begin
case Random(18) of
1: RandomRClick;
2: HoverSkill(Skill_Runecrafting, False);
3: HoverSkill(Skill_Crafting, False);
4: PickUpMouse;
5: ExamineInv;
7: MissMouse(100,100);
9: ExamineInv;
end; // removed empty 10: value
end;



//-- MiniBreak --\\


procedure BreakText;
begin
SMART_DrawText(100,200,UpCharsEx,'Dont Worry, Just Taking A Human-Like Break...',clAqua);
end;


procedure MiniBreak;
begin
case(Random(70))of
1: begin BreakText; Wait(15000 + random(7900)) end; // removed unnecessary semicolons..

2: begin BreakText; Wait(20500 + random(8550)) end;

3: begin BreakText; Wait(35040 + random(6759)) end;

4: begin BreakText; Wait(60000 + random(12549)) end;
end;
end;



//--Bank, Ruins, Altar and Portal Locations--\\

function IsAtBank: Boolean;
begin
if not LoggedIn then Exit; //added failsafe here rather than later on
Result := ObjDTM_InArea('80:80:7:10:7:58:75:10:7:101:55:10:7:101:47:10:7:58:59:10:7:58:51:10:7:58:67:10:7:101:63:4:58:25:60:99:104:98:101:25', True) or
ObjDTM_InArea('80:80:5:10:7:103:49:10:7:103:57:10:7:56:87:10:7:56:78:10:7:56:70:4:54:27:56:97:112:101:110:26', True);
end;

function IsAtRuins: Boolean;
begin
if not LoggedIn then Exit; //added failsafe here rather than later on
Result := ObjDTM_InArea('80:80:6:1:7:103:71:1:7:57:106:1:7:98:115:1:7:54:53:3:7:108:96:3:7:43:70:7:71:63:56:73:45:86:50:112:94:115:101:89:97:70', True);
end;

function IsAtAltar: Boolean;
begin
if not LoggedIn then Exit; //added failsafe here rather than later on
Result := ObjDTM_InArea('80:80:6:1:7:105:122:1:7:89:122:1:7:74:125:1:7:43:102:1:7:35:86:1:7:32:71:4:53:52:124:54:123:101:56:104', True) or
ObjDTM_InArea('80:80:5:1:7:124:125:1:7:108:125:1:7:91:125:1:7:28:71:1:7:28:54:4:47:58:50:114:128:106:126:57', True) or
ObjDTM_InArea('80:80:6:1:7:34:110:1:7:26:94:1:7:23:78:1:7:65:134:1:7:81:130:1:7:97:131:4:45:44:111:43:113:114:45:117', True);
end;




//-- Listen to Music --\\

function WaitTill70Energy: Boolean; // renamed to fit purpose
begin
Result := RunEnergy(70);
end;

function ListenToMusic: Boolean;
var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, Retry: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 10322521, MSX1, MSY1, MSX2, MSY2, 30);
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 5, 5);
SortATPASize(TPAA, True);
for I := 0 to High(TPAA) do //removed capitalised block letters
if GetArraylength(TPAA[i]) > 5 then // here also...
begin
repeat
inc(Retry);
Writeln('Finding Musician');
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
Wait(500);
if (IsUpTextMultiCustom(['musi', 'cian'])) then
begin
Result := True;
GetMousePos(X, Y);
Mouse(x,y,3,3,false);
Wait(100 + random(200));
ChooseOption('isten');
Writeln('Found Musician, listening to music');
Wait(5000 + random(1000));
Break;
end;
until (Retry = 7);
WaitFunc(@WaitTill70Energy, 10 + Random(15), 15000);
Break;
end;
end;




// -- Walking to Ruins and Walking to Bank --\\

function GetRoadColor: Integer; // made this myself because SRL RoadColor...
var // and srl_VarrockRoadColor don't work
x, y: Integer;
begin
if(FindColorTolerance(x, y, 8949387, MMX1, MMY1, MMX2, MMY2, 10))then
Result:= GetColor(x, y);
end;

function GetGrassColor: Integer;
var
TPA: TPointArray;
begin
if(FindColorsTolerance(TPA, 2056030, MMX1, MMY1, MMX2, MMY2, 15))then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;

function GetAltarColors: Integer;
var
TPA: TPointArray;
begin
if(FindColorsTolerance(TPA, 2312782, MMX1, MMY1, MMX2, MMY2, 15))then
Result:= GetColor(TPA[0].X, TPA[0].Y);
end;


procedure WalkToRuins; // added RadialRoadWalk and RadialWalk methods
begin // fixed standards
if not LoggedIn then Exit;
Antiban;
SetRun(True);
if not ObjDTM_Walk('63:133:4:1:7:23:122:10:7:42:98:10:7:42:90:10:7:42:82:4:77:125:79:138:39:140:37:124', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialRoadWalk(GetRoadColor, 180, 190, 72, 99, 99);
end;
FFlag(0);

if not ObjDTM_Walk('37:95:5:10:7:54:70:10:7:54:58:1:7:34:76:10:7:98:32:10:7:99:24:5:43:78:11:78:15:105:56:104:66:80', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialRoadWalk(GetRoadColor, 240, 280, 40, 99, 99);
end;
FFlag(0);

if not ObjDTM_Walk('34:103:5:1:7:78:63:1:7:47:102:10:7:97:59:10:7:97:47:10:7:97:40:4:18:90:23:124:57:108:57:78', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialRoadWalk(GetRoadColor, 200, 240, 40, 99, 99);
end;
FFlag(0);

if not ObjDTM_Walk('26:107:4:1:7:70:99:1:7:94:82:1:7:58:111:1:7:106:103:5:13:91:19:122:47:122:54:106:43:80', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialRoadWalk(GetRoadColor, 180, 270, 60, 99, 99);
end;
FFlag(0);

if not ObjDTM_Walk('40:116:5:1:7:66:63:1:7:46:67:1:7:42:99:1:7:114:83:5:7:57:46:5:24:100:27:132:56:132:64:99:50:81', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialWalk(GetGrassColor, 200, 270, 50, 99, 99);
end;
FFlag(0);

repeat
if not ObjDTM_Walk('80:80:2:1:7:91:103:3:7:101:83:4:74:77:73:98:92:97:91:77', 0, 100, 80, True) then
RadialWalk(GetAltarColors, 280, 260, 50, 99, 99);
until IsAtRuins;
end;


procedure WalkToBank; // added RadialRoadWalk and RadialWalk methods
begin // fixed standards
if not IsAtRuins then Exit;

if not ObjDTM_Walk('115:40:6:1:7:90:98:1:7:123:83:1:7:123:66:1:7:110:54:1:7:94:54:3:7:100:79:4:99:23:98:59:129:56:128:22', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialWalk(GetGrasscolor, 20, 90, 60, 99, 99);
end;
FFlag(0);

if not ObjDTM_Walk('122:64:6:1:7:86:54:1:7:69:50:1:7:65:71:1:7:82:87:1:7:107:49:5:7:97:32:4:98:41:101:76:149:75:143:40', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialRoadWalk(GetRoadColor, 45, 90, 72, 99, 99);
end;
FFlag(0);

if ObjDTM_Walk('108:66:3:1:7:128:88:1:7:78:67:5:7:69:49:4:94:41:94:68:129:69:129:41', 0, 100, 15, True) then
repeat
Wait(1500);
ClickNorth(1);
ListenToMusic;
SetRun(True);
until True;

if not ObjDTM_Walk('124:76:5:1:7:74:71:1:7:53:76:1:7:126:91:1:7:138:77:1:7:49:109:4:104:59:106:97:150:95:142:51', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialRoadWalk(GetRoadColor, 60, 100, 40, 99, 99);
end;
FFlag(0);

if not ObjDTM_Walk('118:57:5:1:7:88:101:1:7:100:87:1:7:126:68:1:7:101:113:1:7:118:107:4:101:49:103:82:143:80:130:42', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
RadialRoadWalk(GetRoadColor, 60, 45, 60, 99, 99);
end;
FFlag(0);

if not ObjDTM_Walk('107:66:5:1:7:66:114:1:7:92:95:1:7:105:118:1:7:84:135:1:7:126:52:4:90:48:90:81:129:76:131:40', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('105:61:3:1:7:118:51:1:7:98:111:1:7:86:90:5:92:56:90:72:126:74:120:40:104:41', 0, 100, 80, True);
end;
FFlag(0);

if not ObjDTM_Walk('118:86:5:1:7:70:113:1:7:104:70:10:7:126:36:10:7:126:45:10:7:126:28:5:122:73:90:72:90:96:138:95:140:78', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('119:87:3:1:7:82:31:1:7:98:75:1:7:78:135:4:101:80:99:97:143:91:144:75', 0, 100, 80, True);
end;
FFlag(0);

repeat
if not ObjDTM_Walk('98:48:4:1:7:55:71:10:7:117:28:10:7:117:36:10:7:74:41:4:72:13:74:65:122:65:121:13', 0, 100, 5, True) then
begin
Writeln('Using Backup Path');
ObjDTM_Walk('83:50:4:1:7:26:27:1:7:38:71:0:7:71:15:10:7:102:26:4:65:26:65:61:102:61:101:24', 0, 100, 10, True);
end;
until IsAtBank;

if IsAtBank then
begin
Wait(100);
if not RunEnergy(50) then
begin
RestUntil(70);
end;
end;
end;




///////------ Crafting Process ------\\\\\\\
//--Click Ruins, then Altar, then Portal--\\


function FindClickRuins: Boolean;
var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, Retry: Integer;
begin
if not IsAtRuins then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 16631693, MSX1, MSY1, MSX2, MSY2, 40);
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 5, 5);
SortATPASize(TPAA, True);
for I := 0 to High(TPAA) do
if GetArraylength(TPAA[i]) > 5 then
begin
repeat
inc(Retry);
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
Wait(500);
if (IsUpTextMultiCustom(['yste', 'uins'])) then
begin
Result := True;
GetMousePos(X, Y);
Mouse(x,y,0,0,True);
Wait(100 + random(200));
Writeln('Found Ruins, clicking Ruins');
Break;
end;
until (Retry = 7);
Break;
end;
end;


function FindAltarTwo: Boolean; // kept as FindObjCustom - works fine
var
Runes1: Integer;
Text, Text1: String;
begin
if not IsAtAltar then Exit;
if FindObjCustom(x, y, ['raft', 'rune', 'ltar'], [5591379, 5722966], 3) then
begin
MMouse(x, y, 2, 2); // removed MMouse, but then portal wasn't being found
Mouse(x, y, 2, 2, True); //added randomness
WaitInvMaxCount(1, 6000);
Writeln('Crafted Runes');
Inc(LoadsDone[CurrentPlayer]);
Text := GetTextAtExWrap(560,210,582,222,0,0,0,65535,5,'StatChars');
if (Text<>'') then
begin
Text1 := Replace(Text,' ',''); // needed to keep the begin..end
end else // because it wouldn't compile.
Text1 := '0';
Runes1 := StrToInt(Text1);
IncEx(Runes[CurrentPlayer],Runes1);
Result := True;
end;
end;


function FindPortal: Boolean; //replaced previous FindObjCustom function
var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, Retry: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5080969, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 5, 5);
SortATPASize(TPAA, True);
for I := 0 To High(TPAA) do
If GetArraylength(TPAA[i]) > 5 Then
begin
repeat
inc(Retry);
Writeln('Finding Portal');
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
Wait(500);
if (IsUpTextMultiCustom(['nter', 'orta'])) then
begin
Result := True;
GetMousePos(X, Y);
Mouse(x, y, 3, 3, True);
Wait(100 + random(200));
Writeln('Found Portal');
Wait(5000 + random(1000));
Break;
end;
until (Retry = 7);
Break;
end;
end;




//-- Proggy --\\

procedure ProggyTest; //removed unnecessary begins - thanks to cut em2 it
var
i: Integer;
begin
if LoadsDone[CurrentPlayer] mod 5=0 then
ClearDebug;
CurrentXP := GetXPBar(1);
TimeGone[CurrentPlayer] := (GetTimeRunning/1000);
XPGain[CurrentPlayer] := (CurrentXP - OriginalXP);
XPPerhour[CurrentPlayer] :=(3600 * XPGain[CurrentPlayer]) / TimeGone[CurrentPlayer]; //removed...
LoadsPerhour[CurrentPlayer] :=(3600 * LoadsDone[CurrentPlayer]) / TimeGone[CurrentPlayer]; //excessive..
RunesPerHour[CurrentPlayer] := (3600 * Runes[CurrentPlayer]) / TimeGone[CurrentPlayer];//use of brackets
ClearDebug;
Writeln('******************************************************************');
Writeln('*/////////---------- Abu''s''AirKrafter Version 2 ----------\\\\\\\*');
Writeln('*/////////----------____________________________----------\\\\\\\*');
Writeln('******************************************************************');
Writeln('');
for i := 0 to HowManyPlayers - 1 do
begin
Writeln('*/////////--------- Proggy for the player: ' + Players[i].Nick + ' --------\\\\\\\\\*');
Writeln('*/////////We have done: ' + IntToStr(LoadsDone[i]) + ' Loads / Thats ' + IntToStr(LoadsPerHour[i]) + ' loads per hour');
Writeln('*/////////We have gained: ' + IntToStr(XPGain[i]) + ' xp / Thats ' + IntToStr(XPPerHour[i]) + ' xp per hour');
Writeln('*/////////We have crafted ' + IntToStr(Runes[i]) + ' Runes / Thats ' + IntToStr(RunesPerHour[i]) + ' Runes Per Hour');
Writeln('');
end;
end;


procedure SetArrayLengths; //renamed to fit purpose
begin
SetLength(TimeGone,HowManyPlayers);
SetLength(XPPerHour,HowManyPlayers);
SetLength(LoadsPerHour,HowManyPlayers);
SetLength(XPGain,HowManyPlayers);
SetLength(LoadsDone,HowManyPlayers);
SetLength(Runes,HowManyPlayers);
SetLength(RunesPerHour,HowManyPlayers);
end;

procedure ScriptTerminate;
begin
ProggyTest;
Writeln('Thank you for using Abu''s''AirKrafter Version 2'); //added a line
end;


begin //standards in mainloop fixed by masterbb
ClearDebug;

Smart_Server := 16;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;

SetUpSRL;
ObjDTM_Setup;
ObjDTM_Debug := True;
StartTime := GetSystemTime;
ActivateClient;
DeclarePlayers;
SetArrayLengths;

if not LoggedIn then
begin
LogInPlayer;
WaitFunc(@LoggedIn, 10 + Random(15), 15000);
FindNormalRandoms;
end;

OriginalXP := GetXPBar(1);

repeat
repeat
if IsAtBank then
begin
if InvCount < 28 then
begin
if not (BankScreen) then
begin
ClickNorth(0);
OpenBankFast('vwb');
end else
begin
DepositAll;
if (Withdraw(0,0,0)) then
begin
Sleep(1000);
MiniBreak;
if (InvCount < 28) then
begin
Logout;
Break
end;
end;
end;
end else
if (InvCount = 28) then
begin
WalkToRuins;
Wait(1000);
end;
end;

if IsAtRuins then
if (InvCount = 28) then
begin
ClickNorth(0);
FindClickRuins;
Wait(1000);
end
else if (InvCount = 1) then
begin
Wait(500);
WalkToBank;
ProggyTest;
end;

if IsAtAltar then
if (InvCount = 28) then
begin
if FindAltarTwo then
begin
Wait(3200 + Random(500));
FindPortal;
WaitFunc(@IsAtRuins, 10 + Random(15), 4000);
end;
end
else if (InvCount = 1) then
begin
FindPortal;
WaitFunc(@IsAtRuins, 10 + Random(15), 4000);
end;

until False;
NextPlayer(Players[CurrentPlayer].Active = False);
until AllPlayersInactive;
ScriptTerminate;
end.



Thank you for all the help guys, hopefully that script is now 'fixed' :p

Well the voting seems to be 60/40 which means it can still go either way, but don't worry, if all fails…

I'll be back … ooohoohoohh yes … I'll definitely be back :stirthepot:


Special Thanks to:
Cut em2 it and masterbb for all their help and feedback


EDIT: Regarding the issue about my longevity:
From: Daniel
Daniel's Guide to SRL Members


Important requirements needed…..
skipping
skipping

ah yess….

Longevity:
This is least important as so many people have little regard for it, or will only take this into account if the user applying is submitting his/her application immediately after registration, or within the same month of registering on the forums. If however, you are well known, helpful and active, then longevity won't really matter regardless of your duration here at the forums.
Just to confirm, I've been here longer than one month

Er1k

2012-03-30 03:08:03

I consider at least 2 months to be better longevity, but that's probably just me.

Script is fine, I think you could use some more time hanging around though. I noticed your helper cup and I'm sure you're on the right track. Overall I don't think you need more no votes - feedback alone is more encouraging.

Abu

2012-03-30 14:37:11

From: Er1k
I consider at least 2 months to be better longevity, but that's probably just me.

Script is fine, I think you could use some more time hanging around though. I noticed your helper cup and I'm sure you're on the right track. Overall I don't think you need more no votes - feedback alone is more encouraging.


I appreciate that. From previous experience, it's always important to get involved and get recognised by the community before advancing in rank. :)

'Toxin

2012-03-30 20:18:26

My final take on this application here is that you do have a great attitude, and as you can see most of us like that. I personally want to see more dedication and a some public releases even maybe alongside with your application. It goes to show that you do care and are willing to give a helping hand around here. For now… my vote is a no, but should you re-apply(and I'm hoping you will), then we will see how matters are then. Good luck :)

Abu

2012-03-31 16:46:19

Thanks you, I'll be sure to release more scripts - you don't have to worry about that ;)

BraK

2012-04-05 22:56:31

I didn't like that in the original post you didn't follow the directions and post your script and Footballjds posted it for you in the next one. That's more of a lack of attention to detail there. Then I carefully read through the whole thread and got a feel for you. I think at this time I'll vote yes. though in the future please pay attention to the details to small ones will get you. ;)

and with my vote I believe I will tie the vote up 13-13. Win one more person over and you might get in it's real close.

Abu

2012-04-06 12:35:54

:spot:

No but seriously sorry about only posting the link - I was careless and rushed my application, it won't happen next time (if there is a next time)

Thanks for the vote though, I almost forgot I even applied but I'm overwhelmed by the change in votes from the first day.


Thank you :)



EDIT:
From: BraK

and with my vote I believe I will tie the vote up 13-13. Win one more person over and you might get in it's real close.

Isn't it supposed to be 65% of votes in favour before being accepted ?- just being honest
EDIT2: That's why you said might ;)

WT-Fakawi

2012-04-08 18:52:32

In. Welcome!