Justin
2012-02-06 00:56:03
How Long have You Played Runescape?
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
-
What is your general programming knowledge?
Java, HTML, php, VB and some basic ones
Are you a member of any other communities?
RSBuddy, PowerBot, RSBots.NET
Tell us about yourself…
[quote=[J]ustin]
Im Justin, I mainly idle on IRC, join in every now and then, I think I am a down-to-earth guy, easy to talk ect.
Please show us one (or multiple) of your scripts.
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
-
What is your general programming knowledge?
Java, HTML, php, VB and some basic ones
Are you a member of any other communities?
RSBuddy, PowerBot, RSBots.NET
Tell us about yourself…
[quote=[J]ustin]
Im Justin, I mainly idle on IRC, join in every now and then, I think I am a down-to-earth guy, easy to talk ect.
Please show us one (or multiple) of your scripts.
program ArtisansWorkshop;
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i srl/srl/misc/debug.simba}
{$i SPS/sps.simba}
{$i SRL/SRL/misc/paintsmart.simba}
Const
SRLStats_Username = '';
SRLStats_Password = '';
var
IronI, IronI_MS, HelmChat, ChestplateChat, BootsChat, GauntletsChat,
DepositArmour, SmithDTM, WorkshopInterface, FailSafe_Change,
FailSafe_Withdraw, FailSafe_Smith, FailSafe_Deposit, CloseInterface,
x, y, StartingXP, LastCommit_EXPBar, XPGain, SRLStats: Integer;
CurrentSmithing: string;
myPath: TPointArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['mote', 'oins', 'Coins'];
Active := true;
end;
end;
//Start of DDTMs
function SetDDTM_Helm: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 155;
dtmMainPoint.y := 417;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 855310;
dtmMainPoint.Tolerance := 20;
dtmSubPoints[0].x := 155;
dtmSubPoints[0].y := 417;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 855310;
dtmSubPoints[0].Tolerance := 20;
dtmSubPoints[1].x := 142;
dtmSubPoints[1].y := 414;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 855310;
dtmSubPoints[1].Tolerance := 20;
dtmSubPoints[2].x := 138;
dtmSubPoints[2].y := 419;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 855310;
dtmSubPoints[2].Tolerance := 20;
dtmSubPoints[3].x := 151;
dtmSubPoints[3].y := 422;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 855310;
dtmSubPoints[3].Tolerance := 20;
dtmSubPoints[4].x := 153;
dtmSubPoints[4].y := 411;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 2500392;
dtmSubPoints[4].Tolerance := 20;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function SetDDTM_Chestplate: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 220;
dtmMainPoint.y := 406;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1776700;
dtmMainPoint.Tolerance := 20;
dtmSubPoints[0].x := 220;
dtmSubPoints[0].y := 406;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 1776700;
dtmSubPoints[0].Tolerance := 20;
dtmSubPoints[1].x := 214;
dtmSubPoints[1].y := 423;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 2961716;
dtmSubPoints[1].Tolerance := 20;
dtmSubPoints[2].x := 220;
dtmSubPoints[2].y := 423;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 6119777;
dtmSubPoints[2].Tolerance := 20;
dtmSubPoints[3].x := 223;
dtmSubPoints[3].y := 420;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 1447447;
dtmSubPoints[3].Tolerance := 20;
dtmSubPoints[4].x := 230;
dtmSubPoints[4].y := 409;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 1645339;
dtmSubPoints[4].Tolerance := 20;
dtmSubPoints[5].x := 209;
dtmSubPoints[5].y := 408;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 4737611;
dtmSubPoints[5].Tolerance := 20;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function SetDDTM_Boots: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 286;
dtmMainPoint.y := 407;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 4079681;
dtmMainPoint.Tolerance := 20;
dtmSubPoints[0].x := 286;
dtmSubPoints[0].y := 407;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 4079681;
dtmSubPoints[0].Tolerance := 20;
dtmSubPoints[1].x := 285;
dtmSubPoints[1].y := 420;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1447703;
dtmSubPoints[1].Tolerance := 20;
dtmSubPoints[2].x := 299;
dtmSubPoints[2].y := 425;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 855566;
dtmSubPoints[2].Tolerance := 20;
dtmSubPoints[3].x := 299;
dtmSubPoints[3].y := 409;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 6382694;
dtmSubPoints[3].Tolerance := 20;
dtmSubPoints[4].x := 303;
dtmSubPoints[4].y := 416;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 1184274;
dtmSubPoints[4].Tolerance := 20;
dtmSubPoints[5].x := 283;
dtmSubPoints[5].y := 403;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 4079681;
dtmSubPoints[5].Tolerance := 20;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function SetDDTM_Gauntlets: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..6] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 370;
dtmMainPoint.y := 403;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 855566;
dtmMainPoint.Tolerance := 20;
dtmSubPoints[0].x := 370;
dtmSubPoints[0].y := 403;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 855566;
dtmSubPoints[0].Tolerance := 20;
dtmSubPoints[1].x := 361;
dtmSubPoints[1].y := 409;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 131072;
dtmSubPoints[1].Tolerance := 20;
dtmSubPoints[2].x := 353;
dtmSubPoints[2].y := 422;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 131072;
dtmSubPoints[2].Tolerance := 20;
dtmSubPoints[3].x := 358;
dtmSubPoints[3].y := 426;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 855310;
dtmSubPoints[3].Tolerance := 20;
dtmSubPoints[4].x := 377;
dtmSubPoints[4].y := 418;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8356741;
dtmSubPoints[4].Tolerance := 20;
dtmSubPoints[5].x := 378;
dtmSubPoints[5].y := 415;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 6645866;
dtmSubPoints[5].Tolerance := 20;
dtmSubPoints[6].x := 370;
dtmSubPoints[6].y := 413;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 131072;
dtmSubPoints[6].Tolerance := 20;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
//End Of DDTMs
procedure LoadDTMs;
begin
IronI := DTMFromString('mggAAAHicY2NgYOACYiEgZmWAAHYg5gViDiBmAWJ+IOaGioNAaFAQQ6CvL4O7iwtDREgIg5O9PYOPpyfYHGyYEQeGAACc/gX8');
IronI_MS := DTMFromString('mlwAAAHicY2dgYNgIxKuBeDEQrwPi3UB8EIh3AvFeIN4GZR8B4hNAfBiI9wBxYkwMQ25GBkNveztDcEAAmJ2ZksKQn5XFwAyUx4UZ8WAoAABmfBLS');
//HelmChat := DTMFromString('mlwAAAHicY2dgYJgKxLOAeAoQzwbihUC8AIiXAPEmRgaG9UC8F4j3QemtQLwTiAPVVBgy01MYeHl54VhdXQ1MswL14sKMeDAUAABSvgxi');
//ChestplateChat := DTMFromString('mggAAAHicY2NgYHgJxA+A+CmU/RaIPwLxI0YGhidA/AGIvwDxeyjfR0WJIS01icHK1IghKyuNQVxcjMHIUJ9BBKgHG2bEgSEAALnRD+0=');
//BootsChat := DTMFromString('mlwAAAHicY2dgYNBjZGBQBWJ1IFYCYkMgNgFicyDeCcQbgHgHEB8A4sNAvB+ItwBxoKcdQ1RkGAMvLy+DkJAgGGurqzKYmZowsALNxYUZ8WAoAADxVQoX');
//GauntletsChat := DTMFromString('mrAAAAHic42BgYMhnZGCoAOIGIC4C4hwoDeLXAPF6KN4BxIehGMTeDRWPDHRj0NXRZsjPzQKaxsQQEx3BICYmyhAXG8Xg6urEwAoUxYcZCWAYAAAd3A+n');
HelmChat := SetDDTM_Helm;
ChestplateChat := SetDDTM_Chestplate;
BootsChat := SetDDTM_Boots
GauntletsChat := SetDDTM_Gauntlets;
DepositArmour := DTMFromString('mbQAAAHicY2VgYGAHYj4g5gJiRgYIYAViDiQ2SJyPlxcDs0LlkTEjFgwGAES0AR8=');
WorkshopInterface := DTMFromString('mAAEAAHic42FgYNgGxDuBeA8Q7wfiQ0B8AohPAvEFKL4ExDeA+BYQ8wCxBBALQmkYnx+KQWwhIOaG0qQCVhIxI4kYGQAAIZ8KjA==');
CloseInterface := DTMFromString('mbQAAAHicY2VgYPjHyMDwHYqZmSDYHch2BmJfKAaxX946wmDOycagxcrEIMfEyKDMzsHAxYAJGLFgMAAAa8oHyw==');
end;
procedure AntiBan; //Used from one of PatDuffy's scripts - Edited.
begin
if (not(LoggedIn)) then
Exit;
case Random(5000) of
0..2: PickUpMouse;
3..5: ExamineInv;
9..11: BoredHuman;
15..17: RandomRClick;
21..23: RandomMovement;
27..29: PickUpMouse;
end;
end;
function GetItems: string;
begin
Result := GetTextAtExWrap(234, 37, 290, 53, 0, 5, 2, 16777215, 5, StatChars);
end;
function FindColour(Col, Height, Width, tol: Integer;
uptext, Action: string; LeftClick: Boolean): Boolean;
var
i, x, y, cts: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then
Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, Col, MSX1, MSY1, MSX2, MSY2, tol);
if Length(tpa) = 0 then
Exit;
ColorToleranceSpeed(cts);
atpa := TPAtoATPAEx(tpa, Height, Width);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
wait(100 + Random(50));
if (WaitUpText(uptext, 1000)) then
begin
GetMousePos(x, y);
if (not (LeftClick)) then
begin
Mouse(x, y, 1, 1, false);
wait(200 + Random(50));
ChooseOption(Action);
if (DidRedClick) then
begin
wait(200 + Random(143));
Result := true;
Exit;
end
else
Exit;
end
else if (LeftClick) then
begin
Mouse(x, y, 2, 2, true);
if (DidRedClick) then
begin
wait(200 + Random(150));
Result := true;
Exit;
end
else
Exit;
end;
end;
end;
end;
Function IsMoving_F: Boolean; //Flights
begin
Result := PixelShift(IntToBox(MMCX-30, MMCY-30, MMCX+30, MMCY+30), 200) > 200;
end;
Procedure TryToFix;
begin
myPath := [Point(4064, 3309)];
SPS_WalkPath(myPath);
Wait(RandomRange(800,1600));
while (IsMoving_F) do
wait(250);
end;
function BarsInInvo: Boolean;
begin
Result := FindDTM(IronI, x, y, MIX1, MIY1, MIX2, MIY2);
end;
procedure Smith;
var
TPA: TPointArray;
ATPA: T2DPointArray;
i, x, y, m, OMS: Integer;
ToSmith: string;
begin
if (InvCount = 0) then
begin
writeln('We have no Ingots...');
exit;
end;
if not (BarsInInvo) then
begin
Writeln('Failsafe');
exit;
end;
OMS := MouseSpeed;
MouseSpeed := 35;
//6712951
FindColorsSpiralTolerance(MSCX,MSCY,TPA,6449522,222,MSY1,MSX2,MSY2,5);
ColorToleranceSpeed(1);
ATPA:= TPAtoATPAEx(TPA,20,20);
// DebugATPABounds(ATPA);
m := High(ATPA);
for i:=0 to m do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 4, 4);
GetMousePos(x, y);
if (WaitUpTextMulti(['mith', 'Smith'], 500)) then
begin
MouseSpeed := OMS;
ToSmith := GetItems;
Writeln('We are going to smith: ' + ToSmith);
FailSafe_Change := 0;
begin
ClickMouse2(mouse_left);
if (DidRedClick) then
wait(10 + Random(350));
while not (FindText(x, y, 'Smith', SmallChars, MCX1, MCY1, MCX2, MCY2)) do
begin
Wait(100);
Inc(FailSafe_Smith);
if (FailSafe_Smith = 50) then
begin
FailSafe_Smith := 0;
Smith;
Exit;
end;
end;
if (FindText(x, y, 'Smith', SmallChars, MCX1, MCY1, MCX2, MCY2)) then
begin
case (ToSmith) of
'Helm':
SmithDTM := HelmChat;
'Chestplate':
SmithDTM := ChestplateChat;
'Boots':
SmithDTM := BootsChat;
'Gauntlets':
SmithDTM := GauntletsChat;
end;
If DTMRotated(SmithDTM, X, Y, MCX1, MCY1, MCX2, MCY2) Then
WriteLn('Found: '+ ToSmith);
//FindDTM(SmithDTM, x, y, MCX1, MCY1, MCX2, MCY2);
MMouse(x, y, 15, 15);
if (WaitUptext('ake', 650)) then
begin
wait(450 + Random(350));
ClickMouse2(mouse_left);
CurrentSmithing := GetItems;
Break;
end
else
Exit;
end
else
Exit;
end;
end;
end;
//TryToFix ;
MouseSpeed := OMS;
end;
procedure CheckChange;
begin
if (CurrentSmithing = '') then
begin
Writeln('Unable to find what we should be smithing');
Writeln('Plesae contact [J]ustin');
Terminatescript;
end;
repeat
wait(500);
Inc(FailSafe_Change);
AntiBan;
FindNormalRandoms;
until ((CurrentSmithing <> GetItems) or (FailSafe_Change = 360) or
not (BarsInInvo));
end;
function WithdrawScreen: Boolean;
begin
Result := FindDTM(WorkshopInterface, x, y, MSX1, MSY1, MSX2, MSY2);
end;
procedure GetMoreBars;
begin
if (FindColour(8410738, 15, 15, 5, 'ingo', 'Smelter', true)) then
begin
if (DidRedClick) then
repeat
Wait(200);
Inc(FailSafe_Withdraw);
until ((PinScreen) or (WithdrawScreen) or (FailSafe_Withdraw = 100));
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
FailSafe_Withdraw := 0;
repeat
Wait(200);
Inc(FailSafe_Withdraw);
until ((WithdrawScreen) or (FailSafe_Withdraw = 100));
if WithdrawScreen then
begin
Writeln('We have the WithdrawScreen open!');
FailSafe_Deposit := 0;
MMouse(67, 168, 17, 17);
ClickMouse2(mouse_left);
FailSafe_Withdraw := 0;
repeat
Wait(200);
Inc(FailSafe_Withdraw);
until (not (WithdrawScreen) or (FailSafe_Withdraw = 120));
end;
if (FailSafe_Withdraw = 120) then
begin
Writeln('FailSafe on opening the smithing screen... (Are we out of ore?)');
TerminateScript;
end;
end;
SetScreenMouse('',RandomRange(4,8));
end;
procedure DepositJunk;
begin
FindColour(6514803, 20, 20, 5, 'Chute', 'eposit', true);
while (InvCount <> 0) do
begin
Wait(250);
Inc(FailSafe_Deposit);
if (FailSafe_Deposit = 40) then
begin
writeln('Failsafe when trying to deposit the items...');
writeln('Script stopping...');
TerminateScript;
end;
end;
end;
procedure MainLoop;
begin
if not (BarsInInvo) then
begin
Writeln('Out of bars, Getting some more');
DepositJunk;
GetMoreBars;
end;
Smith;
CheckChange;
FindNormalRandoms;
end;
procedure FreeAllDTMs;
begin
FreeDTM(IronI);
FreeDTM(IronI_MS);
FreeDTM(HelmChat);
FreeDTM(ChestplateChat);
FreeDTM(BootsChat);
FreeDTM(GauntletsChat);
FreeDTM(DepositArmour);
FreeDTM(WorkshopInterface);
FreeDTM(CloseInterface);
end;
Procedure SRLStatsCommit;
begin
XPGain := GetXPBarTotal - LastCommit_EXPBar;
stats_IncVariable('Smithing EXP (Gained)', XPGain);
Stats_Commit;
LastCommit_EXPBar := GetXPBarTotal;
writeln('Submitting EXP as: '+IntToStr(XPGain));
MarkTime(SRLStats);
end;
Procedure CheckSRLInfomation;
begin
if ((SRLStats_Username = '') And (SRLStats_Password = '')) then
begin
SetupSRLStats(614,'Anonymous','anon1337');
Exit;
end else
SetupSRLStats(614,SRLStats_Username,SRLStats_Password);
end;
begin
Smart_Server := 38;
Smart_Members := true;
Smart_Signed := true;
Smart_SuperDetail := false;
setupSRL();
DeclarePlayers;
LoadDTMs;
if not LoggedIn then
LoginPlayer;
Wait(RandomRange(1200, 1800));
ClickNorth(SRL_ANGLE_HIGH);
CurrentSmithing := GetItems;
SPS_Setup(RUNESCAPE_SURFACE, ['10_8']);
SPS_Continue := True;
CheckSRLInfomation;
ToggleXPBar(true);
StartingXP := GetXPBarTotal;
LastCommit_EXPBar := GetXPBarTotal;
MarkTime(SRLStats);
repeat
if not LoggedIn then
begin
LoginPlayer;
ClickNorth(SRL_ANGLE_HIGH);
CurrentSmithing := GetItems;
end;
if (TimeFromMark(SRLStats)>=300000) then
SRLStatsCommit;
MainLoop;
until (false);
FreeAllDTMs;
end.
program SnapeGrass;
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i sps/sps.simba}
var
Snape, SnapePrice, RandomChange, loads: Integer;
Jarvald, SnapeGrass: TIntegerArray;
HouseToBoat, GoIntoBank, SnapeGrassLocation, SafePlace: TPointArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := true;
Players[0].Pin := '';
end;
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 97;
Smart_Members := true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;
procedure SetupSps;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['6_5', '5_5', '5_4', '5_3', '4_3', '4_4', '10_6']);
SPS_Continue := false;
end;
procedure Antiban; //idea taken from Coh3n's tutorial.
begin
if not (LoggedIn) then
Exit;
begin
case Random(250) of // Random(250) generates a random integer from 0 to 250
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;
procedure DoRest;
begin
if not (LoggedIn) then
Exit;
begin
SetRest;
while not RunEnergy(95) do
begin
Antiban;
Wait(Random(1000));
end;
end;
end;
procedure TeleToBankAndWalk;
begin
if not (LoggedIn) then
Exit;
if not FindNormalRandoms then
begin
if not RunEnergy(25) then
DoRest;
MakeCompass('n');
Writeln('Teleporting to bank...');
while (srl_InFight) do
begin
Wait(RandomRange(1500, 1800));
Writeln('Waiting to be out of combat...');
end;
Wait(Random(1000));
GameTab(Tab_Magic);
MMouse(574, 232, 8, 7);
if WaitUptext('Cast', 400) then
ClickMouse2(true);
begin
MMouse(574, 232, 10, 3);
end;
GoIntoBank := [Point(4211, 2670)];
if SPS_WalkPath(GoIntoBank) then
Writeln('At the Bank..');
end;
end;
procedure Banking;
var
p, t: Integer;
begin
if not (LoggedIn) then
Exit;
while (IsMoving) do
begin
Wait(RandomRange(900, 1200));
end;
t := 0; //Tries starts at zero
repeat
Inc(t);
Wait(RandomRange(700, 1000));
OpenBankNPC;
until BankScreen or PinScreen or (t = 5);
if PinScreen then
begin
p := 0;
repeat
InPin(Players[0].Pin);
Inc(p)
until BankScreen or (p > 0) or not (LoggedIn);
end;
if BankScreen then
begin
Writeln('Opened the bank...');
DepositAll;
Withdraw(0, 0, 1);
Wait(RandomRange(500, 1200));
CloseBank;
end;
if (t = 5) then
begin
Writeln('Couldn''t find bank in time... Terminating...');
TerminateScript;
end;
Inc(loads);
end;
procedure TeleportToHouse;
begin
InvMouse(1, 1);
wait(RandomRange(2400, 4800));
end;
procedure WalkToBoat_SPS;
begin
if not (LoggedIn) then
Exit;
if not FindNormalRandoms then
begin
if not RunEnergy(25) then
DoRest;
MakeCompass('n');
Writeln('Walking to boat via SPS');
Wait(Random(1000));
begin
case Random(5) of // Randomize walking path
0..1:
HouseToBoat := [Point(2517, 2097), Point(2499, 2075), Point(2481, 2054),
Point(2446, 2051), Point(2413, 2054), Point(2371, 2048),
Point(2360, 2021), Point(2344, 2008), Point(2327, 1982),
Point(2316, 1949), Point(2313, 1922), Point(2317, 1910)];
2:
HouseToBoat := [Point(2511, 2093), Point(2481, 2056), Point(2464, 2053),
Point(2438, 2051), Point(2430, 2037), Point(2392, 2017),
Point(2361, 2014), Point(2341, 1997), Point(2338, 1972),
Point(2315, 1937), Point(2321, 1911)];
3:
HouseToBoat := [Point(2513, 2087), Point(2489, 2057), Point(2441, 2048),
Point(2409, 2053), Point(2374, 2051), Point(2347, 2043),
Point(2319, 2027), Point(2293, 2013), Point(2290, 1959),
Point(2316, 1925), Point(2318, 1905)];
4:
HouseToBoat := [Point(2505, 2080), Point(2485, 2057), Point(2443, 2047),
Point(2406, 2048), Point(2368, 2044), Point(2329, 2036),
Point(2328, 2010), Point(2334, 1991), Point(2339, 1969),
Point(2351, 1932), Point(2327, 1923), Point(2321, 1913)];
5:
HouseToBoat := [Point(2508, 2081), Point(2460, 2051), Point(2425, 2049),
Point(2370, 2046), Point(2322, 2028), Point(2331, 1984),
Point(2306, 1948), Point(2322, 1919), Point(2317, 1909)];
end;
end;
if SPS_WalkPath(HouseToBoat) then
begin
Writeln('Walked to the boat via SPS');
Wait(RandomRange(1200, 1500));
end else
begin
Writeln('Failed to walk to the boat via Radial and SPS... Terminating script!');
TerminateScript;
end;
end;
end;
procedure WalkToBoat_Radial;
begin
if not (LoggedIn) then
Exit;
if not FindNormalRandoms then
begin
if not RunEnergy(25) then
DoRest;
MakeCompass('n');
Writeln('Walking to boat via Radial');
Wait(Random(1000));
begin
RadialWalkTolerance(6451052, 318, 345, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 322, 338, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 315, 333, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(6451052, 282, 303, 72, -1, 0,25);
Wait(RandomRange(800, 1200));
RadialWalkTolerance(1795803, 273, 294, 70, -1, 0,15);
Wait(RandomRange(800, 1200));
writeln('Walked to the boat via Radial... If not will SPS failsafe!');
end;
end;
end;
procedure WalkToGoodSnapeGrass;
begin
begin
case Random(5) of // Randomize walking path
0..1: SnapeGrassLocation := [Point(2013, 1581), Point(1971, 1570),
Point(1936, 1570), Point(1898, 1573), Point(1863, 1586), Point(1851, 1605)];
2: SnapeGrassLocation := [Point(2010, 1601), Point(1988, 1587),
Point(1977, 1580), Point(1955, 1572), Point(1920, 1595),
Point(1893, 1605), Point(1857, 1615)];
3: SnapeGrassLocation := [Point(2004, 1597), Point(1979, 1576),
Point(1957, 1572), Point(1922, 1570), Point(1896, 1572),
Point(1875, 1572), Point(1857, 1593), Point(1849, 1610)];
4: SnapeGrassLocation := [Point(2025, 1606), Point(1996, 1583),
Point(1966, 1568), Point(1938, 1566), Point(1897, 1572),
Point(1870, 1580), Point(1847, 1618)];
5: SnapeGrassLocation := [Point(2021, 1601), Point(1962, 1575),
Point(1932, 1583), Point(1913, 1596), Point(1851, 1619)];
end;
end;
if not SPS_WalkPath(SnapeGrassLocation) then
begin
Writeln('We are unable to walk to Snape Grass Location.. Going to bank!');
TeleToBankAndWalk;
Banking;
end;
end;
procedure Travel;
var
Tries, x, y: Integer;
begin
Writeln('We are trying to find Jarvald...');
Tries := 0;
repeat
Inc(Tries);
Writeln('Trying to find Jarvarl...');
MakeCompass('n');
Wait(RandomRange(700, 1000));
if FindObjCustom(x, y, ['alk-to Jarvald'], Jarvald, 3) then
begin
Writeln('Found Jarvald!');
Mouse(x, y, 3, 3, false);
Writeln('Selecting Travel option...');
WaitOptionMulti(['ravel-Water', 'ravel-W'], 1000);
Writeln('Waiting...');
Wait(RandomRange(2000, 6000));
end;
until ((Tries = 3) or (IsChatBoxTextBetween('eaving Rellekka', clBlack, 8, 8)));
begin
if (Tries = 3) then //Failed!
begin
Writeln('We failed to Travel! Trying to walk via SPS');
WalkToBoat_SPS;
Travel;
end;
end;
end;
procedure CollectSnapeGrass;
var
RandomNorthCount, fs, x, y: Integer;
begin
case Random(1) of
0: MakeCompass('e');
1: MakeCompass('w');
end;
case RandomRange(15, 19) of
15..19: MouseSpeed := RandomRange(15, 19);
end;
RandomNorthCount := RandomRange(17, 27);
fs := 0;
if (InvCount <= 28) then
begin
repeat
while (IsMoving) do
begin
Wait(RandomRange(200, 250));
end;
if (FindObjCustom(x, y, ['ake', 'ttack'], SnapeGrass, 25)) then
begin
Mouse(x, y, 4, 4, false);
WaitOptionMulti(['ake Snape', 'Take Snape', 'seaweed'], 50);
//Ensure that we don't click 'Walk' - Add a Seaweed check (had a player try to break my bot)
AntiBan;
Wait(RandomRange(100, 180));
end;
Inc(fs);
if (fs = 70) then
begin
Writeln('Been doing nothing for too long... changing worlds and going to bank to starting again');
ChangeWorld(RandomWorld(true, false));
Wait(RandomRange(3400, 9800));
TeleToBankAndWalk;
Wait(RandomRange(400, 1200));
Banking;
TeleportToHouse;
Wait(RandomRange(700, 1800));
WalkToBoat_Radial;
Wait(RandomRange(270, 2200));
Travel;
Exit;
end;
if (InvCount = RandomNorthCount) then
begin
MakeCompass('n');
end;
until InvFull;
end;
if (InvFull) then
begin
SafePlace := [Point(1902, 1605)];
if not (SPS_WalkPath(SafePlace)) then
begin
Writeln('Something went wrong when walking to the safe spot... Will try to teleport at current location');
end;
Exit;
end;
end;
function GetPrice(ObjID: Integer): Integer; //Credits to putonajonny
var
Str, str2, str3, str4: string;
startat, endat, com, k, b, m: Integer;
begin
Str := GetPage('http://services.runescape.com/m=itemdb_rs/g=runescape/viewitem.ws?obj=' +
IntToStr(ObjID));
startat := Pos('<th scope="row">Current guide price:</th>', Str);
if (startat > 0) then
begin
endat := Pos('<th scope="row">Today', Str);
str2 := Copy(Str, (startat + 46), endat - startat - 63);
k := Pos('k', str2);
com := Pos(',', str2);
b := Pos('b', str2);
m := Pos('m', str2);
str4 := str2;
if (k > 0) then
begin
str3 := Copy(Str2, 1, k - 1);
str4 := IntToStr(StrToInt(Copy(Str3, 1, Length(Str3) - 2) + Copy(Str3,
Length(Str3), 1)) * 100);
end;
if (b > 0) then
begin
str3 := Copy(Str2, 1, b - 1);
str4 := IntToStr(StrToInt(Copy(Str3, 1, Length(Str3) - 2) + Copy(Str3,
Length(Str3), 1)) * 100000000);
end;
if (m > 0) then
begin
str3 := Copy(Str2, 1, m - 1);
str4 := IntToStr(StrToInt(Copy(Str3, 1, Length(Str3) - 2) + Copy(Str3,
Length(Str3), 1)) * 100000);
end;
if (com > 0) then
begin
str4 := Copy(Str2, 1, com - 1) + Copy(Str2, com + 1, Length(str2) - com);
end;
Result := StrToInt(str4);
end
else
begin
Result := 0;
end;
end;
procedure Progress;
begin
Snape := Snape + InvCount;
Writeln('|===============|');
Writeln('| Snape Grass |');
Writeln('| ' + IntToStr(Snape) + ' | $' + IntToStr(Snape * SnapePrice) +
' |');
Writeln('| Time running: ' + TimeRunning + ' |');
Writeln('|===============|');
Writeln('');
end;
begin
SetupLogin;
SetupSps;
Jarvald := [3026992, 2436400, 3884876, 3757671];
SnapeGrass := [6067245, 5272868, 6195498, 5075235];
SnapePrice := GetPrice(231);
TeleToBankAndWalk;
Banking;
TeleportToHouse;
RandomChange := RandomRange(30, 80);
repeat
if (loads = 85) then //Just incase we mess up and go past out limit.
begin
loads := 0;
end;
{WalkToBoat_SPS;}
WalkToBoat_Radial;
Wait(RandomRange(100, 800));
Travel;
WalkToGoodSnapeGrass;
Wait(RandomRange(300, 1200));
CollectSnapeGrass;
TeleToBankAndWalk;
Progress;
Wait(RandomRange(640, 940));
Banking;
TeleportToHouse;
Wait(RandomRange(705, 1200));
if (RandomChange = loads) then
begin
ChangeWorld(RandomWorld(true, false));
RandomChange := RandomRange(8, 18);
loads := 0;
end;
until (false)
end.
//EDGEVILLE MAN KILLER - MADE BY ~JUSTIN
program EdgeManKiller;
{.include SRL/SRL/Misc/Smart.simba}
{.include SRL/SRL.simba}
{.include SRL/SRL/Skill/Fighting.simba}
{$i sps/sps.simba}
{$DEFINE UseLaptopMouse}
var
ManColours, HerbColours: TIntegerArray;
x, y, StartAttack, StartStrength, StartDefence, StartHitpoints,
CurrentAttack, CurrentStrength, CurrentDefence, CurrentHitpoints : Integer;
WalkBank, WalkMen: TPointArray;
//LootHerbs : Boolean;
const
Tolerance = 3; //Make higher if it wont attack;
Version = '0.612'; //Please don't change.
AverageFood = '14';
//How many food should the bot withdraw from bank (will be randomized from this number)
LootHerbs = false;
// Set to true if you want to loot Grimy Herbs - **WILL SLOW DOWN SCRIPT**
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Pin := ''; //Pin for bank
Active := true;
end;
end;
function GetCustomXP(skill: variant): Integer;
var
b: TBox;
p: TPoint;
tpa: TPointArray;
begin
Result := -1;
if (not gameTab(TAB_STATS)) then
Exit;
p := skillToCoords(skill);
if (p.x < 1) then
Exit;
mmouse(p.x, p.y + 5, 12, 4);
Wait(150);
if (WaitFindColors(tpa, 921102, MIX1, MIY1, MIX2, MIY2, 0, 3000)) then
begin
b := getTPABounds(tpa);
Result := StrToIntDef(getNumbers(getTextAt(b.x1 + 15,
b.y1 + 15, 0, 1, 4, 4305653, 0, 75, smallChars)), - 1);
end;
end;
procedure WalkToBank;
begin
WalkBank := [Point(4224, 2633), Point(4208, 2649),
Point(4210, 2667)] SPS_WalkPath(WalkBank)
end;
procedure WalkToMen;
begin
WalkMen := [Point(4208, 2649), Point(4232, 2608)] SPS_WalkPath(WalkMen)
end;
procedure CheckRandoms;
begin
FindNormalRandoms;
end;
procedure Attack;
var
Xi, Yi : Integer;
begin
if InFight then
begin
repeat
FindNormalRandoms;
until (not (OthersInFight) or (not LoggedIn) or (not InFight))
end;
x := Random(8)
case x of 4: WalkToMen; //Failsafe if we get lured
end;
if FindObjEx(Xi, Yi, ['ttack'], ManColours, Tolerance, 50, 1, 5, 689, 390) then
begin
if not (IsFightAt(Xi, Yi) and not InFight) then
begin
GetMousePos(Xi, Yi);
Mouse(Xi, Yi, 5, 5, false);
WaitOptionMulti(['ttack M', 'attack Man'], 200);
end;
while IsMoving do
begin
Wait(250);
end;
end
else
begin
wait(800)
end;
end;
procedure CheckLoot;
var
Xi, Yi : Integer;
begin
if LootHerbs then
begin
if InFight then
begin
repeat
FindNormalRandoms;
until (not (OthersInFight) or (not LoggedIn) or (not InFight))
end;
if FindObjEx(Xi, Yi, ['ake'], HerbColours, Tolerance, 50, 1, 5, 689, 390) then
begin
if not InFight then
begin
GetMousePos(Xi, Yi);
Mouse(Xi, Yi, 5, 5, false);
WaitOptionMulti(['Take Grimy', 'ake Grimy'], 200);
Wait(RandomRange(1000, 1800));
end;
while IsMoving do
begin
Wait(250);
end;
end
else
begin
wait(800)
end;
end;
end;
procedure AntiBan;
begin
x := Random(500) case x of 0: HoverSkill('Attack', false);
1:
HoverSkill('Strength', false);
2:
HoverSkill('Defence', false);
3:
HoverSkill('hitpoints', false);
12..15:
PickUpMouse;
16..25:
RandomMovement;
26..27:
RandomRClick;
28..32:
BoredHuman;
33:
ExamineInv;
34:
RandomAngle(SRL_ANGLE_HIGH);
end;
Wait(RandomRange(800, 1200));
end;
procedure DoBanking;
var
FailSafe: Integer;
begin
if not (LoggedIn) then
Exit;
while (IsMoving) do
begin
Wait(RandomRange(900, 1200));
end;
FailSafe := 0;
repeat
Inc(FailSafe);
MakeCompass('w');
Wait(RandomRange(400, 1200));
OpenBankNPC;
until BankScreen or PinScreen or (FailSafe = 7);
if PinScreen then
begin
repeat
InPin(Players[0].Pin);
until BankScreen or not (LoggedIn);
end;
if BankScreen then
begin
DepositAll;
Withdraw(0, 0, RandomRange(StrToInt(AverageFood), StrToInt(AverageFood) + 5));
Wait(RandomRange(800, 1200));
CloseBank;
Wait(RandomRange(800, 1200));
begin
MMouseItem(1);
GetMousePos(x, y);
if WaitUptext('Eat', 400) then
begin
Mouse(x, y, 0, 0, false);
if WaitOption('Eat', 400) then
begin
while ExistsItem(1) do
wait(20);
end;
Exit;
end;
end;
WalkToMen;
end;
if (FailSafe = 7) then
begin
Writeln('We failed to find the bank 7 times. Terminating script.');
TerminateScript;
end;
end;
procedure Report;
begin
CurrentAttack := GetCustomXP(0);
CurrentStrength := GetCustomXP(2);
CurrentDefence := GetCustomXP(1) CurrentHitpoints := GetCustomXP(3);
Writeln('||=====');
Writeln('||===== Attack EXP Gained : ' + IntToStr(CurrentAttack - StartAttack));
Writeln('||===== Strength EXP Gained : ' +
IntToStr(CurrentStrength - StartStrength));
Writeln('||===== Defence EXP Gained : ' + IntToStr(CurrentDefence - StartDefence));
Writeln('||===== Hitpoints EXP Gained : ' +
IntToStr(CurrentHitpoints - StartHitpoints));
Writeln('||=====');
Exit;
end;
procedure HpCheck; //Credits to Narcle
var
c, T, i, x, y: Integer;
begin
if InvFull then
begin
WalkToBank;
if IsMoving then
repeat
Wait(500);
until not (IsMoving);
Report;
DoBanking;
WalkToMen;
Exit;
end;
if InvEmpty or (HPPercent < 30) and LoggedIn then
begin
WalkToBank;
if IsMoving then
repeat
Wait(500);
until not (IsMoving);
Report;
DoBanking;
WalkToMen;
Exit;
end;
if (HPPercent < RandomRange(45, 65)) and LoggedIn then
begin
if not InvEmpty then
for c := 0 to 2 do
for i := 1 to 28 do
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
if WaitUptext('Eat', 400) then
begin
Mouse(x, y, 0, 0, false);
if WaitOption('Eat', 400) then
begin
t := GetSystemTime;
while ExistsItem(i) and ((GetSystemTime - t) < 2000) do
wait(20);
end;
Exit;
end;
end;
end;
end;
procedure VersionCheck();
var
oVersion: string;
begin
oVersion := GetPage('http://www.srljustin.com/scripts/edgevillemankiller/edgeman_version.txt');
if (oVersion <> Version) then
begin
Writeln('The version you''re using is outdated!');
Writeln('Downloading new version...');
if (WriteFileString(RewriteFile(ScriptPath + 'EdgeManKiller ~Justin.simba',
true), GetPage('http://www.srljustin.com/scripts/edgevillemankiller/edgeman_script.txt'))) then
Writeln(
'Successfully downloaded the script! Please close the script and re-open to see the changes, thank you!');
TerminateScript;
end
else
Writeln('You have the current version, good to go!');
end;
procedure Counter;
begin
GetPage('http://www.srljustin.com/scripts/edgevillemankiller/counter.php');
//Hit counter
end;
begin
Cleardebug;
Writeln('Please wait while I check your script version...');
VersionCheck();
ManColours := [5416890, 3818298, 5063747, 1977910];
HerbColours := [674626, 2387746, 2786896, 3043619, 3242277,
2655071, 1610005, 3374375];
Smart_Server := 97;
Smart_Members := false;
Smart_Signed := false;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LoginPlayer;
SPS_Areas := ['10_6'];
SPS_Setup(RUNESCAPE_SURFACE, SPS_Areas);
Writeln('Welcome to ~Justin''s Edgeville Man Killer! Verson: ' + Version);
Wait(800);
Counter;
Writeln('Grabbing starting EXP...');
MouseSpeed := RandomRange(17, 22);
StartAttack := GetCustomXP(0); //atk
StartStrength := GetCustomXP(2); //str
StartDefence := GetCustomXP(1) //def
StartHitpoints := GetCustomXP(3); //hp
Writeln('Grabbed and saved starting EXP!');
SetAngle(SRL_ANGLE_HIGH);
WalkToMen;
repeat
Attack;
CheckLoot;
AntiBan;
HpCheck;
CheckRandoms;
until (false)
end.