t4q
2013-05-05 05:23:55
How Long have You Played Runescape?
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Only pascal scripts for Simba
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Only pascal scripts for Simba
Are you a member of any other communities?
No
Tell us about yourself…
From: t4q
I'am 24 years old. I like doing sports and at home learning scripting.
Please show us one (or multiple) of your scripts.
{ It mines gold in crafting guild and banks in Burthorpe
It's EOC script
SPS map goes to /Includes/SPS/img/RUNESCAPE_Other
Proggy stopped manually cuz started breaking
|=========Guild Gold Ore Miner by t4q========
|Running For: 2 Hours, 1 Minutes and 0 Seconds
|Done 0 break(s) for 00:00:00
|Mining EXP gained: 21840
|Mining EXP / hour: 10829
|Gold ores per hour: 167
|Gold ores mined: 336
=============================================}
program GuildGoldMiner;
{$DEFINE SMART8}
{$i SRL/SRL.Simba}
{$i sps/sps.simba}
{$i srl\srl\misc\SmartGraphics.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
var
break, breaking, goldmined, miningexpH, goldhour, miningexp, t, exp, breaks: integer;
const
breakminutes = 111; //botting minutes before taking break
breakrandom = 15; //add random minutes to botting
breakfor = 12; //How long is break in minutes
breakforran = 12; //add random minutes to breakng
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := 'name';
Pass := 'pass';
BoxRewards := ['XP', 'ostume', 'mote', 'oins', 'une', 'ssence'];
LampSkill := Skill_mining;
Active := True;
end;
end;
procedure Setup;
begin
SRL_SixHourFix := True;
SetupSRL;
ObjDTM_Setup;
ActivateClient;
SPS_Setup(RUNESCAPE_Other, ['golddigger']);
DeclarePlayers;
if not LoggedIn then
LoginPlayer;
Wait(2050 + Random(2000));
Writeln(Thetime + ': Started Script');
if IsActionBarOpen then
MouseBox(500, 264, 514, 274, mouse_Left);
exp := 0;
breaks := 0;
t := 0;
marktime(break);
end;
function IsAtPort: Boolean;
begin
Result := ObjDTM_InArea('80:80:2:1:7:115:53:3:7:105:84:5:59:63:61:95:107:98:109:52:56:53', True);
end;
function IsAtBurt: Boolean;
begin
Result := ObjDTM_InArea('80:80:2:0:7:61:20:1:7:120:53:5:57:60:60:97:106:99:105:56:56:57', True);
end;
function IsAtMine: Boolean;
begin
Result := ObjDTM_InArea('80:80:5:1:7:115:67:1:7:99:80:1:7:91:55:1:7:91:100:1:7:94:35:4:53:56:53:87:90:87:87:57', True);
end;
function IsAtDoor: Boolean;
begin
Result := ObjDTM_InArea('80:80:4:1:7:58:28:1:7:70:7:1:7:84:29:1:7:96:50:4:68:64:94:64:82:94:66:85', True);
end;
procedure FindChest;
var
ChestTPA: TPointArray;
ChestATPA: T2DPointArray;
ChestBox: TBox;
x, y, i, toolong, wholebanking: integer;
begin
marktime(toolong);
marktime(wholebanking);
repeat
FindNormalRandoms;
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.21, 0.12);
x := MSCx;
y := MSCy;
if findcolorsspiraltolerance(x, y, ChestTPA, 5859188, MSX1, MSY1, MSX2, MSY2, 3) then
begin
ChestATPA := SplitTPAEx(ChestTPA, 2, 2);
SortATPASize(ChestATPA, true);
SetLength(ChestTPA, 0);
for i := 0 to high(ChestATPA) do
begin
if Length(ChestATPA[i]) < 40 then
Continue;
if MiddleTPAEx(ChestATPA[i], x, y) then
begin
SMART_DebugATPA(true, ChestATPA);
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
mmouse(x, y, 3, 3);
if WaitUptext('Bank', 1000) then
break;
end;
end;
end;
until WaitUptext('Bank', 1000) or (timefrommark(toolong) > 10000);
if (timefrommark(toolong) > 10000) then
begin
Writeln('Did not find chest');
exittolobby;
terminatescript;
end;
wait(30 + random(30));
clickmouse2(mouse_left);
repeat
Wait(250 + Random(120));
until BankScreen or (timefrommark(wholebanking) > 30000);
if timefrommark(wholebanking) > 30000 then
begin
writeln('Banking took too long');
exittolobby;
terminatescript;
end;
end;
function NeedsTools: Boolean;
var
PicDTM, ApronDTM, x, y: integer;
begin
PicDTM := DTMFromString('mWAAAAHicY2FgYPBnYmBwAWIvILYB4ixGBoYEIA4F4kQgjnbRYDD2j2bQdwth8MxpZuAC6kHGjGgYBABeigZ7');
ApronDTM := DTMFromString('mggAAAHicY2NgYGhgYmBoBOJOIK4A4mYgrgHiKEYGhnwgjgPieCAOgWEzKQZ/YwkwBrFBOMhEkoELaBY2zIgDQwAAOFMJSQ==');
gametab(tab_Equip);
wait(100 + random(100));
if not findDTM(PicDTM, x, y, 550, 274, 670, 335) or not findDTM(ApronDTM, x, y, 550, 274, 670, 335) then
result := true;
freedtm(PicDTM);
freedtm(ApronDTM);
end;
procedure TakeTools;
var
picDTM, ApronDTM, toolong, x, y: integer;
begin
GameTab(tab_Magic);
MMouse(574, 303, 10, 10);
ClickMouse2(true);
repeat
Wait(50 + Random(20));
until FindColortolerance(x, y, 2566047, 252, 146, 252, 146, 10);
MMouse(252, 146, 8, 8);
ClickMouse2(true);
Wait(550 + Random(2600));
ClickNorth(SRL_ANGLE_HIGH);
MarkTime(toolong);
Wait(550 + Random(2600));
repeat
Wait(randomrange(200, 500));
until IsAtBurt or (TimeFromMark(toolong) > 30000);
if (TimeFromMark(toolong) > 30000) then
begin
writeln('Teleporting to Burthorpe took too much time');
exittolobby;
terminatescript;
end;
Wait(4250 + Random(1200));
if not IsAtBurt then
exit;
MMouse(603, 146, 3, 3);
Wait(randomrange(20, 50));
ClickMouse2(true);
fflag(0);
Wait(1000 + random(200));
FindChest;
Mouse(406, 305, 5, 5, mouse_left);
wait(200 + random(100));
DepositAll;
repeat
Wait(50 + Random(20));
until invempty;
PicDTM := DTMFromString('mbQAAAHicY2VgYEgF4hAgTgLiKCAOBeJgRgaGACB2AGIXIPYA4lg3TQaP7EYGA/cwBquwdAbn5HIGLqBadMyIBYMBADesCFw=');
ApronDTM := DTMFromString('mggAAAHicY2NgYDABYlsg1gNiHSA2AGJTIPZlZGDwBOJgIPYCYnsgtgPiIBNJBl9DCYYQMykw299YAsznAurBhhlxYAgAAC1TBtc=');
if findDTM(PicDTM, x, y, 19, 41, 500, 295) then
Mouse(x, y, 5, 5, mouse_left)
else
begin
writeln('No rune pickaxe in bank');
exittolobby;
terminatescript;
end;
freedtm(PicDTM);
repeat
wait(100 + random(100));
until existsitem(1);
wait(600 + random(300));
if findDTM(ApronDTM, x, y, 19, 41, 500, 295) then
Mouse(x, y, 5, 5, mouse_left)
else
begin
writeln('No brown apron in bank');
exittolobby;
terminatescript;
end;
freedtm(ApronDTM);
Wait(500 + random(200));
mousebox(485, 30, 494, 40, mouse_left);
repeat
Wait(50 + Random(20));
until not BankScreen;
gametab(tab_inv);
if existsitem(1) then
begin
MMouseItem(1) GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_left);
end;
wait(500 + random(300));
if existsitem(2) then
begin
MMouseItem(2) GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_left);
end;
repeat
Wait(50 + Random(20));
until not existsitem(2);
end;
procedure Antiban;
begin
if FindMod then
logout;
FindNormalRandoms;
case Random(231) of
0..3:
begin
MMouseOffClient('rand');
Wait(500 + Random(500));
end;
4..8:
begin
GameTab(tab_Stats);
mouseBox(682, 216, 729, 231, mouse_move);
Wait(800 + Random(300));
end;
9: HoverMovingObject;
10..12: Wait(100 + Random(300));
13: PickUpMouse;
14..15:
begin
Wait(6000 + Random(6000));
PickUpMouse;
end;
16: MMouseOffClient('rand');
17:
begin
MMouseOffClient('rand');
Wait(30200 + Random(30000));
PickUpMouse;
end;
18:
begin
BoredHuman;
MakeCompass('S');
end;
19:
begin
RandomMovement;
MakeCompass('S');
end;
20..220: Wait(200 + Random(500));
221..224:
begin
GameTab(tab_Stats);
mouseBox(682, 216, 729, 231, mouse_move);
Wait(1000 + Random(2000));
end;
225: RandomTab(True);
226:
begin
MakeCompass('rand');
MakeCompass('S');
end;
227..230: MakeCompass('S');
end;
end;
procedure ToBank;
begin
if not IsAtBurt then
begin
writeln('We are not in Burthorpe');
exittolobby;
terminatescript;
end;
RadialWalkTolerance(2244678, 190, 230, 68, - 1, 2, 10);
Wait(400 + random(200));
fflag(0);
wait(1400 + random(450));
FindChest;
Wait(400 + random(200));
if bankscreen then
begin
DepositAll;
Wait(150 + Random(80));
mousebox(485, 30, 494, 40, mouse_left);
repeat
Wait(50 + Random(20));
until not BankScreen;
end
else
begin
writeln('Did not enter bank');
ExitToLobby;
terminatescript;
end;
end;
procedure BurtTele;
var
toolong, x, y: Integer;
begin
FindNormalRandoms;
if invempty then
begin
Wait(80 + Random(40));
ClickNorth(SRL_ANGLE_HIGH);
exit;
end;
GameTab(tab_Magic);
MMouse(574, 303, 10, 10);
ClickMouse2(true);
repeat
Wait(50 + Random(20));
until FindColortolerance(x, y, 2566047, 252, 146, 252, 146, 10);
MMouse(252, 146, 8, 8);
ClickMouse2(true);
Wait(550 + Random(2600));
ClickNorth(SRL_ANGLE_HIGH);
Wait(2550 + Random(600));
MarkTime(toolong);
repeat
Wait(randomrange(200, 500));
until IsAtBurt or (TimeFromMark(toolong) > 50000);
if (TimeFromMark(toolong) > 30000) then
begin
writeln('Teleporting to Burt took too much time');
exittolobby;
terminatescript;
end;
Wait(4850 + Random(500));
ToBank;
end;
procedure PortTele;
var
toolong, x, y: Integer;
begin
FindNormalRandoms;
if IsAtMine then
exit;
if not FindColortolerance(x, y, 10711921, 567, 305, 567, 305, 10) then
GameTab(tab_Magic);
MMouse(574, 303, 10, 10);
ClickMouse2(true);
repeat
Wait(50 + Random(20));
until FindColortolerance(x, y, 2566047, 252, 146, 252, 146, 10);
MMouse(275, 248, 8, 8);
ClickMouse2(true);
Wait(250 + Random(1200));
MarkTime(toolong);
repeat
Wait(randomrange(100, 500));
until IsAtPort or (TimeFromMark(toolong) > 30000);
if (TimeFromMark(toolong) > 30000) then
begin
writeln('Did not make it to Port');
exittolobby;
terminatescript;
end;
Wait(4250 + Random(1200));
end;
procedure FindDoor;
var
DoorTPA: TPointArray;
DoorATPA: T2DPointArray;
DoorBox: TBox;
i, x, y: integer;
begin
FindNormalRandoms;
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 1.71);
x := MSCx;
y := MSCy;
if findcolorsspiraltolerance(x, y, DoorTPA, 1395043, MSX1, MSY1, MSX2, MSY2, 7) then
begin
DoorATPA := SplitTPAEx(DoorTPA, 5, 5);
SortATPASize(DoorATPA, true);
SetLength(DoorTPA, 0);
for i := 0 to High(DoorATPA) do
begin
if i = High(DoorATPA) then
begin
SetLength(DoorATPA[i], 0);
ObjDTM_Walk('58:103:2:1:7:76:72:1:7:88:75:8:14:64:16:97:47:85:74:85:87:98:99:93:112:59:11:51', 1, 20, 5, true);
end;
if Length(DoorATPA[i]) < 40 then
continue;
DoorBox := GetTPABounds(DoorATPA[i]);
SMART_DebugATPA(true, DoorATPA);
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
mousebox(DoorBox.x1, Doorbox.Y1, Doorbox.X2, Doorbox.Y2, mouse_move);
wait(30 + random(30));
exit;
end;
end;
end;
procedure WalkMine;
begin
wait(500 + random(250));
RadialWalkTolerance(3499638, 110, 's', 44, - 1, 2, 10);
wait(50 + random(500));
MakeCompass('S');
end;
procedure OpenDoor;
var
toolong: integer;
guildPath3: TpointArray;
begin
marktime(toolong);
repeat
if timefrommark(toolong) > 35000 then
begin
Writeln('Did not find door!');
exittolobby;
terminatescript;
end;
FindDoor;
wait(100 + random(100));
until WaitUptext('pen Guild', 1000);
clickmouse2(mouse_right);
waitoption('pen Gui', 1000);
fflag(1);
wait(400 + random(200));
WalkMine;
exit;
end;
procedure WalkGuild;
var
guildPath1, guildPath2, guildPath3: TpointArray;
begin
if IsAtMine then
begin
makecompass('s');
exit;
end;
guildPath1 := [Point(348, 331), Point(319, 317), Point(301, 288), Point(295, 264), Point(286, 244), Point(272, 224), Point(257, 211), Point(238, 196), Point(220, 182), Point(202, 169), Point(183, 158), Point(164, 151), Point(145, 141), Point(127, 123), Point(118, 103), Point(107, 81), Point(95, 71), Point(59, 61)] SPS_WalkPath(guildPath1);
repeat
wait(200 + random(100));
until not ismoving;
wait(150 + random(150));
OpenDoor;
end;
function IsMining: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 120);
end;
procedure FindOre;
var
RockTPA: TPointArray;
RockATPA: T2DPointArray;
RockBox: TBox;
i, x, y, toolong: integer;
begin
if not (loggedin) then
exit;
if invfull then
exit;
marktime(toolong);
repeat
x := MSCx;
y := MSCy;
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.80);
if findcolorsspiraltolerance(x, y, RockTPA, 4553357, MSX1, MSY1, MSX2, MSY2, 7) then
begin
RockATPA := SplitTPA(RockTPA, 6);
SortATPAFromMidPoint(RockATPA, point(MSCx, MSCy));
for i := 0 to high(RockATPA) do
begin
RockBox := GetTPABounds(RockATPA[i]);
SMART_DebugATPA(true, RockATPA);
SetColorSpeed2Modifiers(0.02, 0.02);
if findcolortolerance(x, y, 5033981, RockBox.x1, Rockbox.Y1, Rockbox.X2, Rockbox.Y2, 10) then
begin
if MiddleTPAEx(RockATPA[i], x, y) then
begin
SetColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.02, 0.02);
mmouse(x, y, 6, 6);
if WaitUptext('old ore', 1000) then
break;
end;
end;
end
end;
until WaitUptext('old ore', 1000) or (timefrommark(toolong) > 200000 + random(10000));
if WaitUptext('old ore', 1000) then
begin
clickmouse2(mouse_left);
fflag(1);
wait(2300 + random(400));
end;
if timefrommark(toolong) > 200000 then
begin
writeln('Did not find gold ore');
logout;
terminatescript;
end;
end;
procedure MineGold;
begin
repeat
if invfull then
exit;
while ismining do
case random(470) of
0..449: wait(100 + random(50));
450..468: Antiban;
469:
begin
GameTab(tab_Stats);
mouseBox(682, 216, 729, 231, mouse_move);
Wait(800 + Random(300));
end;
end;
FindOre;
FindNormalRandoms;
Antiban;
until invfull;
end;
procedure Proggy;
begin
exp := (exp + 1);
ClearDebug;
goldmined := (exp * 28);
miningexp := (exp * 28 * 65);
miningexpH := Round(((miningexp) / (GetTimeRunning / 1000.0)) * 3600);
goldhour := Round(((exp * 28) / (GetTimeRunning / 1000.0)) * 3600);
Writeln('|=========Guild Gold Ore Miner by t4q========');
Writeln('|Running For: ' + TimeRunning);
Writeln('|Done ' + IntToStr(breaks) + ' break(s) for ' + MsToTime(t, Time_Bare));
Writeln('|Mining EXP gained: ' + IntToStr(miningexp));
Writeln('|Mining EXP / hour: ' + IntToStr(miningexpH));
Writeln('|Gold ores per hour: ' + IntToStr(goldhour));
Writeln('|Gold ores mined: ' + IntToStr(goldmined));
Writeln('=============================================');
end;
procedure TakeBreak;
begin
if timefrommark(break) > breakminutes * 60000 + random(breakrandom * 60000) then
begin
Writeln(Thetime + ': Taking break');
ExitToLobby;
marktime(breaking);
Wait(breakfor * 60000 + Random(breakforran * 60000));
if not LoggedIn then
LoginPlayer;
Wait(8000 + Random(7000));
Writeln(Thetime + ': Back from break');
breaks := (breaks + 1);
t := (t + (TimeFromMark(breaking)));
FindNormalRandoms;
marktime(break);
end;
end;
begin
Setup;
if NeedsTools then
begin
writeln('Going to get pickaxe and apron');
TakeTools;
end
else
begin
if invfull then
BurtTele;
end;
repeat
PortTele;
WalkGuild;
MineGold;
Proggy;
TakeBreak;
BurtTele;
until not (LoggedIn);
end.