SRL Archive - Archive

p1ng - SRL Member Application


P1ng

2012-06-21 02:13:18

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Very basic HTML from high-school level and whatever I have learned about Pascal through SRL.


Are you a member of any other communities?
No


Tell us about yourself…
From: p1ng
I am an electrical engineering student from Australia, going on 19yo. I am a massive fan and used to play both rugby union and rugby league for various schools and clubs over here. I currently am not participating in any social clubs but I do attend the gym fairly regularly and hope to change my degree to that of exercise and movement science at the end of the year.
I enjoy most things that stretch and challenge my ability in whatever I am doing. Repetitive tasks that I am capable of accomplishing are rather stagnant for me (hence the interest in botting those tasks ;) ).



Please show us one (or multiple) of your scripts.
program P1ngA1rRunn3r;
{$DEFINE SMART} //Comment out if you don't want to use SMART
{$i SRL\SRL.simba}
{$i sps\sps.simba}
//===================== SETUP =====================//
//===== Fill out DeclarePlayers =====//
//===== Start in Varrock west bank =====//
//===== Essence in first bankslot of open tab =====//
//===== Tiara equipped =====//
//===== Runs in W16 =====//
//=================================================//
var
OriginalXP,LvlIncrease,Airs,Ess: integer;
BreakTime,Breaks: integer;
v: TVariantArray;

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

Players[0].Name := 'Username'; // Username
Players[0].Pass := 'Password'; // Password
Players[0].Pin := '1234'; // PIN - Leave Blank If None
Players[0].Active :=True; // Is Player To Be Used?
Players[0].Booleans[0] := True; // Take Breaks + MiniBreaks?
Players[0].Integers[0] := 50; // Average Time To Break (In Mins)
end;

procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 99;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
if not (LoggedIn) then
begin
if LoginPlayerToLob then
ChangeWorld(16);
end else
ActivateClient;
Wait(RandomRange(2000,3000));
WriteLn('Lets Get Runn1ng!');
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('n');
ToggleXPBar(True);
OriginalXP := GetXPBarTotal;
ExitSquealOfFortune;
end;

function Location(Where:String): Boolean;
var
x,y: integer;
begin
case Where of
'Bank':
begin
if (FindSymbol(x,y,Symbol_Bank) or FindSymbol(x,y,Symbol_Anvil)) and FindSymbol(x,y,Symbol_Dungeon) then
begin
Result := True;
//WriteLn('We are at the bank.');
Exit;
end else
WriteLn('Didn''t find bank, using failsafe.');
SymbolAccuracy := 0.5;
if (FindSymbol(x,y,Symbol_Bank) or FindSymbol(x,y,Symbol_Anvil)) and FindSymbol(x,y,Symbol_Dungeon) then
begin
SymbolAccuracy := 0.8;
Result := True;
WriteLn('Failsafe found bank successfully.');
Exit;
end else
Result := False;
//WriteLn('We are not at the bank.');
Exit;
end;

'Ruins':
begin
if FindSymbol(x,y,Symbol_Runecrafting) then
begin
Result := True;
//WriteLn('We are at the ruins');
Exit;
end else
Result := False;
//WriteLn('Not at the ruins');
Exit;
end;

'Altar':
begin
if FindSymbol(x,y,Symbol_Arrow) and FindBlackChatMessage('feel') then
begin
Result := True;
//WriteLn('We are at the altar');
Exit;
end else
Result := False;
//WriteLn('Not at the altar');
Exit;
end;
end;
end;

procedure MiniBreak;
begin
if Players[CurrentPlayer].Booleans[0] then
begin
WriteLn('Taking a short break.');
case Random(20) of
1: Wait(RandomRange(64832,73224));
2: Wait(RandomRange(25641,35743));
3: Wait(RandomRange(8456,12341));
4: Wait(RandomRange(20547,41568));
5: Wait(RandomRange(15613,20756));
end;
end;
end;

procedure AntiBan;
var
GetMouseSpeed: integer;
begin
if not LoggedIn then
Exit else
if not FindNormalRandoms then
begin
FindNormalRandoms;
FindNonInventoryRandoms;
GetMouseSpeed := MouseSpeed;
MouseSpeed := 7 + Random(5);
case Random(400) Of
1:
begin
GameTab(Tab_Stats);
HoverSkill('runecrafting', False);
Wait(RandomRange(2000,2500));
GameTab(Tab_Inv);
end;

2:
begin
HoverSkill('random', False);
Wait(RandomRange(1500,2500));
GameTab(Tab_Inv);
end;

3: PickUpMouse;

4: RandomMovement;

5: RandomRClick;

6: BoredHuman;

7: MakeCompass('rand');

8: MiniBreak;
end;
MouseSpeed := GetMouseSpeed;
end;
end;

procedure RestTime;
var
Counter: integer;
begin
Counter := 0;
if not(RunEnergy(30)) then
begin
SetRest;
repeat
Inc(Counter)
Wait(RandomRange(800,1200));
AntiBan;
if (RunEnergy(75)) then
Break;
until(Counter > 25);
end else
Exit;
end;

procedure POpenBank;
var
Counter: integer;
begin
while IsMoving do
Wait(RandomRange(500,800));
repeat
Inc(Counter);
FFlag(0);
if not LoggedIn then
Break else
if FindNormalRandoms then
Break else
if BankScreen then
Break else
if PinScreen then
InPin(Players[CurrentPlayer].Pin) else
OpenBank('vwb',true,true);
until(Counter > 5);
end;

procedure PDepositAll;
begin
Wait(RandomRange(600,1000));
if not LoggedIn then
begin
WriteLn('Not logged in @PDepositAll.');
TerminateScript;
end else
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end else
if WaitFunc(@BankScreen,50 + random(25),3000+ random(500)) then
begin
if (InvCount > 0) then
begin
if DepositAll then
begin
if InvCount = 0 then
Exit;
end else
WriteLn('Depositing failed @DepositItAll.');
CloseBank;
Exit;
end else
Exit;
end else
WriteLn('Is not in bank @DepositItAll.');
Exit;
end;

procedure WithdEss;
var
amt: integer;
begin
Wait(RandomRange(1500,1800));
if not LoggedIn then
begin
WriteLn('Not logged in @WithdEss.');
TerminateScript;
end else
if WaitFunc(@BankScreen,50 + random(25),3000 + random(500)) then
begin
amt := GetBankItemAmount(0,0);
if (amt >= 29) then
begin
if (InvCount > 0) then
begin
DepositAll;
Wait(RandomRange(800,1200));
Withdraw(0,0,0);
end else
Withdraw(0,0,0);
Exit;
end else
WriteLn('Running low on rune essence @WithdEss.');
TerminateScript;
end else
WriteLn('Not in bank screen @WithdEss.');
Exit;
end;

procedure PCloseBank;
begin
Wait(RandomRange(800,1000));
if not LoggedIn then
begin
WriteLn('Not logged in @PCloseBank.');
TerminateScript;
end else
if BankScreen then
begin
IncEx(Ess,28);
CloseBank;
end else
end;

procedure RadialWalking(WalkStep: Integer);
var
x,y,ri: Integer;
begin
case WalkStep of
0:
begin
Writeln('Walk 0');
if RadialWalkTolerance(8092544,240,190,70,-4,-4,32) then
Exit else
WriteLn('Failed Walk 0');
end;

1:
begin
Writeln('Walk 1');
if RadialWalkTolerance(8092544,260,210,70,-4,-4,32) then
Exit else
WriteLn('Failed Walk 1');
end;

2:
begin
Writeln('Walk 2');
if RadialWalkTolerance(8092544,280,240,70,-4,-4,32) then
Exit else
WriteLn('Failed Walk 2');
end;

3:
begin
Writeln('Walk 3');
if RadialWalkTolerance(2116171,250,220,70,-4,-4,11) then
Exit else
WriteLn('Failed Walk 3');
end;

4:
begin
Writeln('Walk 4');
ri := RandomRange(-2,2);
if FindSymbol(x,y,Symbol_Runecrafting) then
begin
Mouse(x,y,ri,ri,mouse_Left);
Exit;
end else
WriteLn('Failed Symbol Find @Walk 4');
Exit;
end;

5:
begin
Writeln('Walk 5');
if RadialWalkTolerance(8092544,40,80,70,-4,-4,32) then
Exit else
WriteLn('Failed Walk 5');
end;

6:
begin
Writeln('Walk 6');
if RadialWalkTolerance(8092544,65,95,70,-4,-4,32) then
Exit else
WriteLn('Failed Walk 6');
end;

7:
begin
Writeln('Walk 7');
if RadialWalkTolerance(8092544,75,30,70,-4,-4,32) then
Exit else
WriteLn('Failed Walk 7');
end;

8:
begin
Writeln('Walk 8');
if RadialWalkTolerance(8092544,50,90,60,-4,-4,32) then
Exit else
WriteLn('Failed Walk 8');
end;

9:
begin
Writeln('Walk 9');
if RadialWalkTolerance(4614011,0,50,35,-4,-4,28) then
Exit else
WriteLn('Failed Walk 9');
end;
end;
end;

procedure RadialWalk2Altar;
var
i: Integer;
begin
if not LoggedIn then
Exit else
WriteLn('SPS Walk2Altar failed, trying radial');
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
for i := 0 to 4 do
begin
RadialWalking(i);
end;
end;

procedure Walk2Altar;
var
myPath: Array of TPoint;
begin
if not LoggedIn then
begin
WriteLn('Not logged in @Walk2Altar.');
TerminateScript;
end else
if FindNormalRandoms then
Exit else
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE, ['11_7','10_7']);
case Random(5) of
0: myPath := [Point(4574, 2909), Point(4574, 2915), Point(4571, 2923), Point(4571, 2929), Point(4564, 2932), Point(4557, 2932), Point(4548, 2933), Point(4543, 2936), Point(4537, 2937), Point(4531, 2940), Point(4527, 2945), Point(4520, 2949), Point(4514, 2952), Point(4508, 2957), Point(4502, 2962), Point(4498, 2966), Point(4492, 2971), Point(4487, 2975), Point(4483, 2982), Point(4474, 2984), Point(4470, 2987), Point(4461, 2990), Point(4453, 2993), Point(4442, 2993), Point(4434, 2993), Point(4427, 2994), Point(4418, 2995), Point(4410, 3000), Point(4404, 3004), Point(4398, 3009), Point(4391, 3013), Point(4385, 3018), Point(4377, 3020), Point(4369, 3022), Point(4360, 3022)];
1..4: myPath := [Point(4569, 2909), Point(4568, 2917), Point(4568, 2925), Point(4565, 2929), Point(4558, 2932), Point(4552, 2933), Point(4545, 2933), Point(4538, 2935), Point(4531, 2937), Point(4521, 2940), Point(4509, 2943), Point(4502, 2945), Point(4493, 2947), Point(4488, 2951), Point(4480, 2954), Point(4474, 2957), Point(4468, 2961), Point(4461, 2961), Point(4456, 2966), Point(4454, 2972), Point(4448, 2976), Point(4441, 2978), Point(4433, 2982), Point(4426, 2985), Point(4421, 2990), Point(4415, 2994), Point(4407, 2999), Point(4402, 3004), Point(4395, 3009), Point(4391, 3015), Point(4385, 3018), Point(4378, 3022), Point(4371, 3024), Point(4364, 3026), Point(4356, 3028)];
end;
if not Location('Bank') then
Exit;
if not SPS_WalkPath(myPath) then
RadialWalk2Altar;
end;

function FindRuins(x, y: Integer): Boolean;

var
CTS, I: Integer;
MyTPA: TPointArray;
ATPA: array of TPointArray;

begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 2.59);
FindColorsSpiralTolerance(MSCX, MSCY, MyTPA, 14790255, MSX1, MSY1, MSX2, MSY2, 12);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(MyTPA, 30, 30);

for I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 0, 0);
if (WaitUpTextMulti(['nter','nte'],RandomRange(2500,3000))) then
begin
Result := True;
GetMousePos(x, y);
Break;
end else
WriteLn('Ruins were not found @FindRuins');
end;
end;

procedure EnterRuins;
var
x,y,ri: integer;
P: TPoint;
begin
ri := RandomRange(-1,1);
while IsMoving do
Wait(RandomRange(500,800));
if Location('Ruins') then
begin
if FindRuins(x,y) then
begin
ClickMouse2(mouse_Left);
Exit;
end else
if FindSymbol(P.x,P.y,Symbol_Runecrafting) then
begin
Mouse(P.x,P.y,ri,ri,mouse_Left);
FFlag(1);
if FindRuins(x,y) then
begin
ClickMouse2(mouse_Left);
Exit;
end else
WriteLn('Still couldn''t find ruins @EnterRuins');
Exit;
end else
WriteLn('Couldn''t find runecrafting symbol @EnterRuins');
Exit;
end else
WriteLn('Not at ruins @EnterRuins');
end;

function FindAltar(x, y: Integer): Boolean;

var
CTS, I: Integer;
MyTPA: TPointArray;
ATPA: array of TPointArray;

begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.67, 0.09);
FindColorsSpiralTolerance(368, 24, MyTPA, 7696500, 295, 3, 422, 83, 5);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(MyTPA, 5, 5);

for I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 0, 0);
if (WaitUpTextMulti(['raf','lta'],RandomRange(2500,3000))) then
begin
Result := True;
GetMousePos(x, y);
Break;
end else
WriteLn('Altar was not found @FindAltar');
end;
end;

function CraftRunes: Boolean;
var
x,y,Counter: integer;
begin
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
Counter := 0;
Wait(RandomRange(3000,4000));
if not LoggedIn then
Exit else
if FindNormalRandoms then
Exit else
if FindAltar(x,y) then
begin
ClickMouse2(Mouse_Left);
repeat
Inc(Counter)
Wait(RandomRange(800,1200));
if FindBlackChatMessage('emple') then
begin
IncEx(Airs,GetAmountBox(InvBox(1)));
Result := True;
Exit;
end else
Result := False;
Continue;
until(Counter > 10);
Exit;
end else
Result := False;
WriteLn('Couldn''t find altar @CraftRunes');
Exit;
end;

procedure LvlInc;
var
Counter: integer;
begin
if not LoggedIn then
Exit;
repeat
Inc(Counter);
Wait(RandomRange(500,750));
if FindBlackChatMessage('advanced') then
begin
LevelUp;
Inc(LvlIncrease);
Break;
end;
RestTime;
until(Counter > 3);
end;

function FindPortal(x, y: Integer): Boolean;

var
CTS, I: Integer;
MyTPA: TPointArray;
ATPA: array of TPointArray;

begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.36);
FindColorsSpiralTolerance(172, 333, MyTPA, 6333864, MSX1, MSY1, MSX2, MSY2, 16);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(MyTPA, 5, 5);

for I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 0, 0);
if (WaitUpTextMulti(['nte','orta'],RandomRange(2500,3000))) then
begin
Result := True;
GetMousePos(x, y);
Break;
end else
WriteLn('Portal was not found @FindPortal.');
end;
end;

procedure ExitPortal;
var
x,y,ri: integer;
begin
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
ri := RandomRange(-2,2);
Wait(RandomRange(2500,3000));
if not LoggedIn then
Exit else
if FindNormalRandoms then
Exit else
if FindPortal(x,y) then
begin
ClickMouse2(Mouse_Left);
Exit;
end else
if FindSymbol(x,y,'arrow') then
begin
WriteLn('Couldn''t find the portal, using failsafe @ExitPortal.');
Mouse(x,y,ri,ri,mouse_Left);
repeat
Wait(RandomRange(100,500));
until(not(IsMoving));
if FindPortal(x,y) then
begin
WriteLn('Succesfully used failsafe @ExitPortal.');
ClickMouse2(mouse_Left);
Exit;
end else
WriteLn('Tried failsafe, didn''t work, no portal @ExitPortal.');
TerminateScript;
end else
WriteLn('Couldn''t find the portal @ExitPortal.');
TerminateScript;
end;

procedure RadialWalk2Bank;
var
i: Integer;
begin
if not LoggedIn then
Exit else
WriteLn('SPS Walk2Altar failed, trying radial');
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
for i := 5 to 9 do
begin
RadialWalking(i);
end;
end;

procedure Walk2Bank;
var
myPath: Array of TPoint;
begin
if not LoggedIn then
begin
WriteLn('Not logged in @Walk2Bank.');
TerminateScript;
end else
if FindNormalRandoms then
Exit else
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE, ['10_7','11_7']);
case Random(5) of
0..3: myPath := [Point(4358, 3025), Point(4363, 3024), Point(4369, 3022), Point(4375, 3019), Point(4384, 3019), Point(4391, 3016), Point(4396, 3010), Point(4401, 3005), Point(4405, 2999), Point(4411, 2996), Point(4419, 2993), Point(4427, 2990), Point(4433, 2987), Point(4440, 2982), Point(4446, 2978), Point(4447, 2975), Point(4454, 2972), Point(4458, 2968), Point(4464, 2964), Point(4469, 2962), Point(4474, 2959), Point(4479, 2955), Point(4485, 2952), Point(4493, 2948), Point(4499, 2944), Point(4504, 2940), Point(4513, 2939), Point(4520, 2937), Point(4525, 2937), Point(4533, 2936), Point(4539, 2936), Point(4547, 2936), Point(4554, 2933), Point(4558, 2931), Point(4566, 2927), Point(4567, 2921), Point(4568, 2915), Point(4568, 2906)];
4: myPath := [Point(4354, 3021), Point(4358, 3016), Point(4358, 3007), Point(4359, 2996), Point(4362, 2988), Point(4369, 2986), Point(4375, 2986), Point(4380, 2984), Point(4388, 2984), Point(4393, 2984), Point(4398, 2984), Point(4405, 2984), Point(4412, 2984), Point(4417, 2984), Point(4424, 2983), Point(4428, 2982), Point(4436, 2981), Point(4442, 2977), Point(4448, 2974), Point(4455, 2971), Point(4461, 2967), Point(4466, 2964), Point(4474, 2959), Point(4483, 2955), Point(4488, 2952), Point(4494, 2950), Point(4500, 2945), Point(4508, 2943), Point(4516, 2940), Point(4524, 2939), Point(4531, 2937), Point(4535, 2937), Point(4542, 2936), Point(4548, 2935), Point(4555, 2933), Point(4563, 2932), Point(4570, 2929), Point(4573, 2924), Point(4574, 2916), Point(4573, 2909)];
end;
if not Location('Ruins') then
Exit else
if not SPS_WalkPath(myPath) then
RadialWalk2Bank else
FFlag(10);
end;

procedure ProgressReport;
var
XP,CurrentXP: integer;
begin
CurrentXP := GetXPBarTotal;
XP := (CurrentXP - OriginalXP);
//ClearDebug;
Writeln('|------>P1ngs A1r Runn3r<------|');
WriteLn('# Of Airs Crafted: ' + IntToStr(Airs));
WriteLn('# Of Essence Used: ' + IntToStr(Ess));
Writeln('XP Ga1ned: ' + IntToStr(XP));
//Writeln('Est XP Per Hr: ' + IntToStr(round(3600000 * 1.0 / GetTimeRunning * XP)));
Writeln('Levels Ga1ned: ' + IntToStr(LvlIncrease));
if Players[CurrentPlayer].Booleans[0] then
begin
WriteLn('Breaks Taken: ' + IntToStr(Breaks));
WriteLn('Time Runn1ng: ' + (MsToTime(GetTimeRunning, Time_Short)));
Writeln('|------------------------------|');
Exit;
end else
WriteLn('Time Runn1ng: ' + (MsToTime(GetTimeRunning, Time_Short)));
Writeln('|------------------------------|');
end;

procedure ResetBreakTimer;
begin
BreakTime := GetSystemTime + ((Players[CurrentPlayer].Integers[0] * 60000) + RandomRange(-5 * 60000,5 * 60000));
end;

procedure TakeBreak;
var
BreakT,BreakLength: integer;
begin
if (GetSystemTime >= BreakTime) and Players[CurrentPlayer].Booleans[0] then
begin
Inc(Breaks);
ProgressReport;
ExitToLobby;
BreakLength := RandomRange(30000,1200000);
WriteLn('Taking a break for ' + (MsToTime(BreakLength, Time_Short)));
MarkTime(BreakT);
repeat
Wait(100);
until (BreakLength < TimeFromMark(BreakT));
if not LoggedIn then
begin
if LoginPlayerToLob then
ChangeWorld(16);
ToggleXPBar(True);
ResetBreakTimer;
end;
end;
end;

procedure ScriptEnd;
begin
ProgressReport;
WriteLn('Thank-you for using P1ng''s A1r Runn3r');
if LoggedIn then
LogOut else
Exit;
end;

procedure MainLoop;
begin
while Location('Bank') do
begin
POpenBank;
PDepositAll;
WithdEss;
PCloseBank;
RestTime;
if WaitFunc(@InvFull,RandomRange(250,275),5000) then
Walk2Altar;
Break;
end;
while Location('Ruins') do
begin
EnterRuins;
v := ['Altar'];
if WaitFuncEx('Location',v,RandomRange(250,275),5000) then
Break else
Walk2Bank;
end;
while Location('Altar') do
begin
CraftRunes;
LvlInc;
ExitPortal;
ProgressReport;
v := ['Ruins'];
if WaitFuncEx('Location',v,RandomRange(250,275),5000) then
Walk2Bank;
Break;
end;
if (not(IsMoving)) and (not(Location('Bank') or Location ('Ruins') or Location('Altar'))) then
begin
WriteLn('Not at a known location or walking between one.');
TerminateScript;
end;
end;

begin
SetupLogin;
AddOnTerminate('ScriptEnd');
ResetBreakTimer;
repeat
MainLoop;
TakeBreak;
until(not LoggedIn);
TerminateScript;
end.
program P1ngAIOStr1nger;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i SRL/SRL/misc/paintsmart.simba}

//=======================================================================\\
//============================= INSTRUCTIONS ============================\\
//=======================================================================\\
//============= SETUP PLAYERS AND SELECT BANKING LOCATION =============\\
//============= START NEAR BANK BOOTH =============\\
//============= STRINGS IN BANK SLOT 1 VISIBLE =============\\
//============= LONGBOW(U) IN BANK SLOT 2 =============\\
//============= IN OPEN BANK TAB =============\\
//=======================================================================\\
//====== BANK OPTIONS ======\\
var //'feb' (Falador East Bank) \\
BS,LU,x,y,BreakTime: Integer; //'fwb' (Falador West Bank) \\
Failed,strung: Integer; //'veb' (Varrock East Bank) \\
LvlIncrease: Integer; //'vwb' (Varrock West Bank) \\
ScrErr: String; //'db' (Draynor Bank) \\
//'eb' (Edgeville Bank) \\
//'akb' (Al-Kharid Bank) \\
//'SRL_BANK_SW' (Soul Wars) \\
//==========================\\
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
//====================== Basic Script Setup Instructions =====================//
Players[0].Name := 'Username'; // Username
Players[0].Pass := 'Password'; // Password
Players[0].Active :=True; // Is Player To Be Used?
Players[0].Pin := '1234'; // PIN (Leave Blank If None)
Players[0].Booleans[0] := True; // Take Breaks?
Players[0].Booleans[1] := True; // Switch World After Break?
Players[0].Integers[0] := 50; // Min. Time Before Break (In Mins)
Players[0].Integers[1] := 80; // Max. Time Before Break
Players[0].Integers[2] := 2500; // # Bows To String
Players[0].Strings[0] := 'SRL_BANK_SW'; // Bank Location
Players[0].Strings[1] := 'yew'; // Type Of Bows Being Strung
end; // 'normal','oak','willow','maple','yew','magic'
//=============================== End Of Setup ===============================//
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 36;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
if not LoggedIn then
LoginPlayer;
Disguise('P1ngs L0ngbow Str1nger');
MouseSpeed := 12 + Random(3);
end;

procedure SetDTMs;
begin
WriteLn(Players[CurrentPlayer].Name + ' is stringing ' + Players[CurrentPlayer].Strings[1] + ' bows.');
case Players[CurrentPlayer].Strings[1] of
'normal':
begin
LU := DTMFromString('mlwAAAHicY2dgYNjCxMCwFoh3A/E+KN4BxBuB+CNQ/i0QfwXiv0DMxMjA8ANIvwfilnBhkAhWzMOAGzDiwVAAAHMZC94=');
BS := DTMFromString('mlwAAAHicY2dgYOhgYmCYCsSdQFwBxDVA3AzEjUD8FSj/C4gZGBkY/gOpz0D8CYj/AXFUkA2QZMKKjRhwA0Y8GAoAwqQKsw==');
end;

'oak':
begin
LU := DTMFromString('mlwAAAHicY2dgYNjMxMCwEYjXAPEuIN4OxAeAeC8QizAyMPADsQAQSwCxFBCrQnFXnjBQNxNWzMWAGzDiwVAAAFxmBvI=');
BS := DTMFromString('mlwAAAHicY2dgYOhgYmCYCsSdQFwBxDVA3AzEjUD8FSj/C4gZGBkY/gOpz0D8CYj/AXFUkA2QZMKKjRhwA0Y8GAoAwqQKsw==');
end;

'willow':
begin
LU := DTMFromString('mlwAAAHicY2dgYJgKxP1APAWIZwPxPCBeDMQLgTgciEOBOASIE4A4DoizgDgNpKdNB0gyYcVcDLgBIx4MBQDDLggp');
BS := DTMFromString('mlwAAAHicY2dgYOhgYmCYCsSdQFwBxDVA3AzEjUD8FSj/C4gZGBkY/gOpz0D8CYj/AXFUkA2QZMKKjRhwA0Y8GAoAwqQKsw==');
end;

'maple':
begin
LU := DTMFromString('mggAAAHicY2NgYNjCxMCwAYjXAPE+IN4LxAeAOJaRgSEciCOAOAuIc6G4t74KqIsJA/MwYAeMODAEAABKrAhW');
BS := DTMFromString('mlwAAAHicY2dgYOhgYmCYCsSdQFwBxDVA3AzEjUD8FSj/C4gZGBkY/gOpz0D8CYj/AXFUkA2QZMKKjRhwA0Y8GAoAwqQKsw==');
end;

'yew':
begin
LU := DTMFromString('mggAAAHicY2NgYJgKxFOAeCIQzwPiuUC8GIgXAPEcqNgyIF4DxJuAODOaH0gyYWAuBuyAEQeGAABLSAhq');
BS := DTMFromString('mlwAAAHicY2dgYOhgYmCYCsSdQFwBxDVA3AzEjUD8FSj/C4gZGBkY/gOpz0D8CYj/AXFUkA2QZMKKjRhwA0Y8GAoAwqQKsw==');
end;

'magic':
begin
LU := DTMFromString('mrAAAAHic42BgYNjKxMCwEYjXAfEOIN4OxHuBeA8QHwDiZYwMDPOBeCEQLwfiVUC8AYg3A/FWIJaJCQWawoQT8wNJLjyYkQCGAQB2cAxk');
BS := DTMFromString('mlwAAAHicY2dgYOhgYmCYCsSdQFwBxDVA3AzEjUD8FSj/C4gZGBkY/gOpz0D8CYj/AXFUkA2QZMKKjRhwA0Y8GAoAwqQKsw==');
end;
end;
end;

procedure FreeDTMss;
begin
FreeDTM(LU);
FreeDTM(BS);
end;

procedure LvlInc;
begin
if not LoggedIn then
Exit;
if FindBlackChatMessage('advanced') then
begin
LevelUp;
Inc(LvlIncrease);
end;
end;

procedure Proggy;
var
xp: integer;
begin
case Players[CurrentPlayer].Strings[1] of
'normal': xp := (strung * 10);

'oak': xp := (strung * 25);

'willow': xp := (strung * 41);

'maple': xp := (strung * 58);

'yew': xp := (strung * 75);

'magic': xp := (strung * 91);
end;
//ClearDebug;
Writeln('|------>P1ngs Longb0w Str1nger<------|');
WriteLn('# Of Bows Strung: ' + IntToStr(Strung));
Writeln('XP Ga1ned: ' + IntToStr(xp));
Writeln('Est XP Per Hr: ' + IntToStr(round(3600000 * 1.0 / GetTimeRunning * xp)));
Writeln('Levels Ga1ned: ' + IntToStr(LvlIncrease));
WriteLn('Messed Up ' + IntToStr(Failed) + ' Load/s Of Strings');
WriteLn('Time runn1ng: ' + TimeRunning);
Writeln('|------------------------------------|');
end;

procedure ScriptEnd;
begin
Proggy;
Writeln('Script Ended Because ' + (Players[CurrentPlayer].Name) + ScrErr);
FreeDTMss;
if LoggedIn then
LogOut;
end;

procedure POpenBank;
var
Counter: integer;
begin
Counter:= 0;
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end else
if FindNormalRandoms then
Exit else
if (Players[CurrentPlayer].Strings[0]=('SRL_BANK_SW')) then
MakeCompass('w') else
MakeCompass('n');
Wait(RandomRange(500,1000));
repeat
Inc(Counter);
if (Players[CurrentPlayer].Strings[0]=('SRL_BANK_SW')) then
OpenBankChest(SRL_BANK_SW) else
OpenBank(Players[CurrentPlayer].Strings[0], true, true);
Wait(RandomRange(500,1000));
until BankScreen or PinScreen or (Counter > 5);
if (Counter > 5) then
begin
ScrErr:= ' is unable to find bank @POpenBank.';
TerminateScript;
end else
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
Exit;
end;

procedure DepositItAll;
begin
Wait(RandomRange(600,1000));
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end else
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end else
if WaitFunc(@BankScreen,50 + random(25),3000+ random(500)) then
begin
if (InvCount > 0) then
begin
if DepositAll then
begin
if InvCount = 0 then
Exit;
end else
ScrErr:= 'depositing failed @DepositItAll.';
CloseBank;
Exit;
end else
Exit;
end else
ScrErr:= ' is not in bank @DepositItAll.';
Exit;
end;

procedure WithdBS;
var
amt: integer;
begin
Wait(RandomRange(1500,1800));
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end else
if WaitFunc(@BankScreen,50 + random(25),3000 + random(500)) then
begin
amt := GetBankItemAmount(0,0);
if (amt >= 15) then
begin
if (InvCount > 0) then
begin
DepositAll;
Wait(RandomRange(800,1200));
Withdraw(0,0,14);
end else
Withdraw(0,0,14);
Exit;
end else
ScrErr:= ' is running low on bow strings @WithdBS.';
TerminateScript;
end else
ScrErr:= 'not in bank screen @WithdBS.';
Exit;
end;

procedure WithdLU;
var
amt: integer;
begin
Wait(RandomRange(1600,2000));
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end else
if WaitFunc(@BankScreen,50 + random(25),3000 + random(500)) then
begin
amt := GetBankItemAmount(1,0);
if (amt >= 15) then
begin
if (InvCount = 14) then
begin
Withdraw(1,0,14);
Exit;
end else
WriteLn('Didn''t have 14 items in inventory @WithdLU');
WriteLn('Grabbing items blind.');
DepositItAll;
WithdBS;
Withdraw(1,0,14);
Exit;
end else
ScrErr:= ' is running low on longbow(u)';
TerminateScript;
end else
ScrErr:= ' not in bank screen @WithdLU.';
Exit;
end;

procedure CloseIt;
begin
Wait(RandomRange(800,1000));
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
ScriptEnd;
end else
if BankScreen then
begin
CloseBank;
end else
end;

procedure AntiBan;
var
GetMouseSpeed: integer;
begin
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end else
if not FindNormalRandoms then
begin
FindNormalRandoms;
FindNonInventoryRandoms;
Status('Antiban...');
GetMouseSpeed := MouseSpeed;
MouseSpeed := 7 + Random(5);
case Random(750) Of
10:
begin
case Random(3) of
1:
begin
GameTab(Tab_Stats);
HoverSkill('fletching', False);
Wait(RandomRange(2000,2500));
GameTab(Tab_Inv);
end;
2: Wait(RandomRange(250,500));
3: Wait(RandomRange(500,2500));
end;
end;

20:
begin
case Random(5) of
1:
begin
HoverSkill('random', False);
Wait(RandomRange(1500,2500));
GameTab(Tab_Inv);
end;
2: Wait(RandomRange(800,1650));
3: Wait(RandomRange(555,1240));
4: Wait(RandomRange(425,800));
5: Wait(RandomRange(1135,1820));
end;
end;

30: PickUpMouse;

40: RandomMovement;

50: RandomRClick;

60: BoredHuman;

70: MakeCompass('rand');

80: SetScreenMouse('rand',RandomRange(1,10));

90: ExamineInv;

100: SleepAndMoveMouse(2500 + Random(1000));
end;
MouseSpeed := GetMouseSpeed;
end;
end;

procedure StringBS;
begin
Wait(RandomRange(1800,2400));
if not LoggedIn then
begin
WriteLn(' is not logged in.');
TerminateScript;
end else
if not FindNormalRandoms then
if BankScreen then
CloseBank;
if not GameTab(Tab_Inv) then
GameTab(Tab_Inv) else
if InvFull then
begin
if WaitFindDTMEx(BS,x,y,MIX1,MIY1,MIX2,MIY2,250 + random(50),3000 + random(500)) then
begin
case Random(50) of
1: InvMouse(1,1);
2: InvMouse(2,1);
3: InvMouse(3,1);
4: InvMouse(4,1);
5: InvMouse(5,1);
6: InvMouse(6,1);
7: InvMouse(7,1);
8: InvMouse(8,1);
9: InvMouse(9,1);
10: InvMouse(10,1);
11: InvMouse(11,1);
12: InvMouse(12,1);
13..49: InvMouse(13,1);
50: InvMouse(14,1);
end;
Wait(RandomRange(500,600));
if WaitFindDTMEx(LU,x,y,MIX1,MIY1,MIX2,MIY2,250 + random(50),3000 + random(500)) then
Exit else
ScrErr:= ' had no longbow(u) in inventory @StringBS.';
Exit;
end else
ScrErr:= ' had no bow strings in inventory @StringBS.';
Exit;
end else
ScrErr:= ' did not have a full inventory @StringBS.';
Exit;
end;

procedure StringLU;
begin
Wait(RandomRange(800,1200));
if not LoggedIn then
begin
ScrErr:=' is not logged in.';
TerminateScript;
end else
if not FindNormalRandoms then
if BankScreen then
CloseBank;
if not GameTab(Tab_Inv) then
GameTab(Tab_Inv) else
if InvFull then
begin
if WaitFindDTMEx(LU,x,y,MIX1,MIY1,MIX2,MIY2,250 + random(50),5000 + random(500)) then
begin
case Random(50) of
1: InvMouse(15,1);
2: InvMouse(16,1);
3..39: InvMouse(17,1);
40: InvMouse(18,1);
41: InvMouse(19,1);
42: InvMouse(20,1);
43: InvMouse(21,1);
44: InvMouse(22,1);
45: InvMouse(23,1);
46: InvMouse(24,1);
47: InvMouse(25,1);
48: InvMouse(26,1);
49: InvMouse(27,1);
50: InvMouse(28,1);
end;
Wait(RandomRange(500,600));
if WaitFindDTMEx(LU,x,y,MCX1,MCY1,MCX2,MCY2,250 + random(50),8000 + random(500)) then
Exit else
ScrErr:= ' couldn''t find chatbox longbow @StringLU.';
Exit;
end else
ScrErr:= ' no longbow(u) in inventory @StringLU.';
Exit;
end else
ScrErr:= ' not a full inventory @StringLU.';
Exit;
end;

function ClickChatBow: Boolean;
var
ri: integer;
begin
if not LoggedIn then
begin
ScrErr:=' is not logged in.';
TerminateScript;
end else
if not FindNormalRandoms then
if BankScreen then
CloseBank;
if not GameTab(Tab_Inv) then
GameTab(Tab_Inv) else
if InvCount > 14 then
begin
if WaitFindDTMEx(LU,x,y,MCX1,MCY1,MCX2,MCY2,250 + random(50),8000 + random(500)) then
begin
ri := RandomRange(-10,20);
Result := True;
MMouse(x,y,ri,ri);
ClickMouse2(mouse_Left);
Exit;
end else
WriteLn(' couldnt find chatbox longbow @ClickChatBow.');
Result := False;
Exit;
end else
WriteLn(' not a full inventory @ClickChatBow.');
Result := False;
Exit;
end;

procedure WaitToFinish;
var
T: integer;
begin
MarkTime(T);
if not LoggedIn then
begin
ScrErr:=' is not logged in.';
TerminateScript;
end else
if FindNormalRandoms then
Exit else
if ClickChatBow then
begin
Status('Stringing...');
repeat
LvlInc;
AntiBan;
Wait(RandomRange(500,600));
if not FindDTM(BS,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
IncEx(strung,14);
Status('Successful!');
Exit;
end else
if FindBlackChatMessage('interesting happens') then
begin
WriteLn('withdrew the wrong items @WaitToFinish.');
WriteLn('Failed + 1');
Exit;
end else
if (TimeFromMark(T) > 25000 + random(500)) then
begin
WriteLn('taken >25s to fletch, something went wrong @WaitToFinish.');
WriteLn('Failed + 1');
Exit;
end;
until(InvCount <= 14);
end else
WriteLn('fletch didn''t result true @WaitToFinish.');
WriteLn('Failed + 1');
Exit;
end;

procedure ProgressReport;
var
xp: integer;
begin
case Players[0].Strings[1] of
'normal': xp := (strung * 10);

'oak': xp := (strung * 25);

'willow': xp := (strung * 41);

'maple': xp := (strung * 58);

'yew': xp := (strung * 75);

'magic': xp := (strung * 91);
end;

begin
Proggy;
SMART_ClearCanvas;
SMART_DrawTextEx(False, 200, 284, UpChars, 'P1ngs AIO Str1nger', ClWhite);
SMART_DrawTextEx(False, 10, 301, UpChars, 'Strung: ', ClWhite);
SMART_DrawTextEx(False, 154, 301, UpChars, 'Time: ', ClWhite);
SMART_DrawTextEx(False, 10, 318, UpChars, ' XP: ', ClWhite);
SMART_DrawTextEx(False, 55, 301, UpChars, IntToStr(Strung), ClWhite);
SMART_DrawTextEx(False, 190, 301, UpChars, (MsToTime(GetTimeRunning, Time_Short)), ClWhite);
SMART_DrawTextEx(False, 55, 318, UpChars, IntToStr(xp), ClWhite);
end;
end;

procedure ResetBreakTimer;
begin
BreakTime := GetSystemTime + RandomRange(Players[CurrentPlayer].Integers[0] * 60000, Players[CurrentPlayer].Integers[1] * 60000);
end;

procedure TakeBreak;
var
T, BreakFor: Integer;
begin
if (GetSystemTime >= BreakTime) and Players[CurrentPlayer].Booleans[0] then
begin
Logout;
Proggy;
BreakFor := RandomRange(30000,1200000);
WriteLn('Break for: ' + (MsToTime(BreakFor, Time_Short)));
MarkTime(T);
repeat
Wait(RandomRange(800,1200));
until (BreakFor < TimeFromMark(T))
Case (Players[CurrentPlayer].Booleans[1]) of
True: if LoginPlayerToLob then
ChangeWorld(RandomWorld(True, False));
False: LoginPlayer;
end;
ResetBreakTimer;
Wait(RandomRange(4000,5000));
FindNormalRandoms;
end;
end;

procedure MainLoop;
begin
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end else
POpenBank;
DepositItAll;
WithdBS;
WithdLU;
CloseIt;
StringBS;
StringLU;
if ClickChatBow then
begin
WaitToFinish;
Exit;
end else
Inc(Failed);
Status('Failed...');
end;

begin
SetupLogin;
SetDTMs;
AddOnTerminate('ScriptEnd');
ActivateClient;
Wait(RandomRange(4000,5000));
ResetBreakTimer;
ExitSquealOfFortune;
SetAngle(SRL_ANGLE_HIGH);
repeat
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end else
MainLoop;
ProgressReport;
TakeBreak;
until(strung >= Players[CurrentPlayer].Integers[2]) or AllPlayersInactive;
if (strung >= Players[CurrentPlayer].Integers[2]) then
ScrErr:= ' has completed all strings.';
TerminateScript;
if not LoggedIn then
begin
ScrErr:= ' is not logged in.';
TerminateScript;
end;
end.

J J

2012-06-21 07:28:24

P1ngA1rRunn3r
  • WaitFunc, FFlag, Failsafes, Breaks, TPointArrays, usage of cases, while .. do: all positive things
  • SPS walking with radialwalking backup a big plus aswell
  • Loads of (unnecessary?) Exit uses: negative point

P1ngAIOStr1nger
  • Cases, randomness, antiban: positive things

Your activity is pretty good aswell and having played RuneScape for a long time isn't bad either.
Yes from me.

P1ng

2012-06-21 07:40:36

Thanks for the feedback :) could you post an example of some un-necessary exits so I can write more efficiently?

Abu

2012-06-21 07:56:14

Just a little something I noticed, in your MiniBreak procedure you will always call WriteLn('Taking a short break.');, regardless of whether or not you do.

P1ng

2012-06-21 08:31:10

Ahh, whoops! I meant to comment that out, was only for debug purposes while constructing the script, make sure it was actually doing the procedure and what-not.

Ashaman88

2012-06-21 09:01:31

Yes

Tniffoc

2012-06-21 10:50:14

There were only a couple little standards glitches throughout the whole thing. You used a great deal of functions, showing a good knowledge of the SRL library. You hit all the points I find pretty necessary with TPAs and failsafes. Your debug is very good. Too many people find themselves not being able to tell where an error is coming from in their script.

Its a yes from me.

EDIT: Forgot to vote. This has been corrected.

Abu

2012-06-21 17:17:32

Oh yeah… I voted yes

I've seen you around on the forums and you're a very helpful guy as well as active, that itself made me lean towards yes.

Then I went through your scripts and you used everything I could ask for. DTM's, TPA's and SPS as well as RadialWalk.
Also, your standards are pretty good :)

NKN

2012-06-21 18:11:52

Voted yes for the same reasons as above.

Good luck.

P1ng

2012-06-22 08:05:26

Thanks for the support everyone :) I'd appreciate anyone voting no if they could post reasons why so that I know where I can improve in both scripting and my involvement around the forums.

putonajonny

2012-06-22 08:42:03

From: p1ng
Thanks for the feedback :) could you post an example of some un-necessary exits so I can write more efficiently?


Places like here:
  'Altar':
begin
if FindSymbol(x,y,Symbol_Arrow) and FindBlackChatMessage('feel') then
begin
Result := True;
//WriteLn('We are at the altar');
Exit;
end else
Result := False;
//WriteLn('Not at the altar');
Exit;
end;
It would make no difference if you got rid of both of those exits.. scripts look good though, yes from me :)

Edit:
Something like this:
if not LoggedIn then
Break else
if FindNormalRandoms then
Break else
if BankScreen then
Break else
if PinScreen then
Look into boolean operators that could get that down to 2 lines

P1ng

2012-06-22 08:46:07

Ahh, okay :) I was having some issues when I was writing some functions where it seemed to result true and then continue on and write the debug line after the else, that's why I added in those exits. Perhaps it was something else that caused this though, I just figured I'd rather be safe than sorry.

EDIT:
From: putonajonny

Something like this:
if not LoggedIn then
Break else
if FindNormalRandoms then
Break else
if BankScreen then
Break else
if PinScreen then
Look into boolean operators that could get that down to 2 lines


Something like this?
if (not(LoggedIn)) or (FindNormalRandoms) or (BankScreen) then
Break else
if PinScreen then

J J

2012-06-22 10:21:01

From: p1ng
Ahh, okay :) I was having some issues when I was writing some functions where it seemed to result true and then continue on and write the debug line after the else, that's why I added in those exits. Perhaps it was something else that caused this though, I just figured I'd rather be safe than sorry.

That is probably when you have a for .. to .. do loop that has multiple results.

{$i srl/srl.simba}

var
i: Integer;

begin
SetUpSRL;
for i:=0 to 9 do
begin
if (i < 6) and (i > 2) then
begin
WriteLn('Test positive: i = '+IntToStr(i)+'');
Break;
end else
WriteLn('Test false: i = '+IntToStr(i)+'');
end;
WriteLn('Test has been finished with a positive result');
end.

Result:
Test false: i = 0
Test false: i = 1
Test false: i = 2
Test positive: i = 3
Test has been finished with a positive result

As you can see it does write in the line. Using exits:

{$i srl/srl.simba}

var
i: Integer;

begin
SetUpSRL;
for i:=0 to 9 do
begin
if (i < 6) and (i > 2) then
begin
WriteLn('Test positive: i = '+IntToStr(i)+'');
Exit;
end else
WriteLn('Test false: i = '+IntToStr(i)+'');
end;
WriteLn('Test has been finished with a positive result');
end.

–>

Test false: i = 0
Test false: i = 1
Test false: i = 2
Test positive: i = 3

Hope that helps a bit :O


Second part of your questions
{$i srl/srl.simba}

var
i: Integer;

begin
SetUpSRL;
for i:=0 to 9 do
begin
if i=0 then
WriteLn('i=0') else
if i>5 then
WriteLn('i>5');
end;
end.
–>
i=0
i>5
i>5
i>5
i>5

Hope that shows the logic :P

P1ng

2012-06-22 10:32:38

Many thanks, I don't completely remember which functions I was getting it continuing on with the rest of it but my over-caution (un-necessary exits) sort of arose from that.

Thank-you for the time and effort put into those functions they certainly have helped! Turns out this application has been a better learning experience than I had first anticipated :)

Jakkle

2012-06-23 09:47:44

Yes from me :)

Joe

2012-06-23 09:56:51

I like how your script looks in general. You know what you are doing and are capable of doing even more
Yessum.

John

2012-06-23 23:47:34

I am Voting yes for reasons that have been posted and because of your attitude, I Think you've shown everything required for This community rank.

John

BraK

2012-07-26 18:59:19

Awaiting Admin Action Closed for now.