program TurpOrbCharger;
{$DEFINE SMART} //////////////////////////
{$i SRL\SRL.simba} //Many Credits to GOOGLE//
{$i SPS\SPS.simba} //////////////////////////
Const
FireOrb = True; // True/False (True = Fire, False = Water)
//AgilityPath = 'Trap'; // Trap or Pipe (walk/dustykey to be added) (no support yet)
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
With Players[0] Do
Begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP', 'amp'];
Active := True;
Member := True;
End;
End;
var
x, y, RunCount, HomeTele, ChargeDTM, XPGain : Integer;
ObeliskTIA : TIntegerArray;
HTtoBank, BanktoDungeon, LaddertoJumpTrap, JumpTraptoLadder, JumpTraptoObelisk: TPointArray;
ObeliskTSA : TStringArray;
Function HPLevel: Integer; //ggzz/Brandon
var
ColourString: String;
Begin
Result:= GetMMLevels('HP', ColourString);
End;
Procedure DefineVars;
Begin
RunCount := 0
HomeTele := DTMFromString('mggAAAHicY2NgYNjGxMCwiQlBrwbinUD8Gyj3H4pB7L8w/Pcvw74jn8AYxG6bc4PBR7OeQRIohw0z4sAQAADcGhiV');
HTtoBank := [Point(3361, 2886), Point(3366, 2901), Point(3369, 2913), Point(3368, 2928), Point(3363, 2933), Point(3360, 2945), Point(3360, 2957), Point(3359, 2968), Point(3356, 2974), Point(3353, 2982), Point(3346, 2982), Point(3341, 2982)];
BanktoDungeon := [Point(3339, 2983), Point(3348, 2984), Point(3355, 2984), Point(3372, 2984), Point(3380, 2989), Point(3388, 2992), Point(3403, 2993), Point(3411, 2993), Point(3420, 2993), Point(3426, 2993), Point(3433, 2994), Point(3440, 2994), Point(3448, 2996), Point(3452, 3005), Point(3444, 3015), Point(3439, 3023), Point(3430, 3028), Point(3421, 3029), Point(3413, 3031), Point(3404, 3032), Point(3395, 3034), Point(3389, 3042), Point(3389, 3049), Point(3387, 3059), Point(3384, 3066), Point(3378, 3069)];
LaddertoJumpTrap := [Point(327, 312), Point(329, 301), Point(327, 289), Point(327, 280), Point(323, 269)];
JumpTraptoLadder := [Point(292, 267), Point(284, 267), Point(275, 261), Point(270, 254), Point(265, 248), Point(257, 243), Point(246, 237), Point(233, 236), Point(223, 235), Point(212, 234), Point(201, 237), Point(190, 243), Point(181, 246), Point(169, 250), Point(158, 248), Point(148, 246), Point(132, 240), Point(133, 232), Point(166, 216), Point(165, 216)];
JumpTrapToObelisk := [Point(297, 263), Point(280, 267), Point(270, 259), Point(266, 250), Point(259, 244), Point(252, 238), Point(237, 233), Point(228, 237), Point(218, 234), Point(198, 237), Point(190, 245), Point(178, 252), Point(156, 249), Point(142, 249), Point(133, 242), Point(133, 236), Point(87, 204), Point(73, 199)];
Case FireOrb of
True:
Begin
ChargeDTM := DTMFromString('m6wAAAHic42ZgYHBkY2BwB2I3ILYFYmso7cAGkXMBYhso/Y6ZgeE9EL+EYhD7ExB/gfI/A/EbKH4XyMJQy8XIoMfIzDBTnAnMTuNmZPBnY2J4V+oI5p+LcmL4MJ+VgRTASAJGAgCTCBak');
XPGain := 73;
ObeliskTIA := [4816798];
ObeliskTSA := ['belisk'];
End;
False:
Begin
ChargeDTM := DTMFromString('mwQAAAHic42RgYNjGxsCwhw1CbwTiDUC8iQ0hvhOI/ZkZGEKAOAKIw4A4CIh9gdgHiAOAOByIH/34xcAunYOCpTUmgTGMTwxgJALDAQBFzxF/');
XPGain := 66;
ObeliskTIA := [6382956, 6711913, 10263973];
ObeliskTSA := ['belisk'];
End;
End;
End;
Procedure Walking;
var
walk1: tpointarray;
begin
walk1 := [Point(118, 344), Point(119, 350), Point(122, 357), Point(126, 363), Point(126, 371), Point(127, 378), Point(126, 386), Point(124, 393), Point(120, 402), Point(101, 426)];
SPS_WALKPATH(walk1);
If SPS_WALKPATH(WALK1) Then
Begin
Writeln('Banking');
Wait(175 + Random(15));
Writeln('Idle');
end;
end;
Procedure Walking2;
var
fla: tpointarray;
begin
fla := [Point(124, 429), Point(131, 429), Point(136, 429), Point(141, 429), Point(155, 430), Point(162, 432), Point(172, 435), Point(204, 437), Point(194, 471), Point(183, 472), Point(175, 472), Point(170, 472), Point(136, 498)];
SPS_WALKPATH(fla);
If SPS_WALKPATH(fla) Then
Begin
Writeln('Dungeon');
Wait(175 + Random(15));
Writeln('waiting');
end;
end;
Procedure spots;
var
spot: tpointarray;
begin
spot := [Point(362, 207), Point(362, 201), Point(362, 193), Point(362, 185), Point(348, 159)];
SPS_WALKPATH(spot);
If SPS_WALKPATH(spot) Then
Begin
Writeln('found trap');
Wait(175 + Random(15));
Writeln('waiting');
end;
end;
Procedure sobe;
var
obe: tpointarray;
begin
obe := [Point(307, 154), Point(301, 149), Point(290, 140), Point(284, 138), Point(263, 133), Point(240, 134), Point(216, 151), Point(207, 151), Point(194, 149), Point(170, 138), Point(166, 130), Point(137, 104), Point(115, 97)];
SPS_WALKPATH(obe);
If SPS_WALKPATH(obe) Then
Begin
Writeln('charging obelisk');
Wait(175 + Random(15));
Writeln('waiting');
end;
end;
Procedure EatFood;
Begin
Withdraw(2, 0, 10);
CloseBank;
InvMouse(1, 3);
ClickMouse2(True);
Wait(RandomRange(500, 900));
InvMouse(2, 3);
ClickMouse2(True);
Wait(RandomRange(500, 900));
InvMouse(3, 3);
ClickMouse2(True);
Wait(RandomRange(500, 900));
InvMouse(4, 3);
ClickMouse2(True);
Wait(RandomRange(500, 900));
InvMouse(5, 3);
ClickMouse2(True);
Wait(RandomRange(500, 900));
InvMouse(6, 3);
ClickMouse2(True);
Wait(RandomRange(500, 900));
InvMouse(7, 3);
ClickMouse2(True);
OpenBankNPC;
End;
Procedure ReleaseDTMs;
Begin
FreeDTM(HomeTele);
FreeDTM(ChargeDTM);
End;
function BankGuyColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.58);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 4795701, MSX1, MSY1, MSX2, MSY2, 9);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.61) and (X <= 6.67) and (Y >= 1.37) and (Y <= 5.93) and (Z >= 3.07) and (Z <= 11.63) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Procedure Bank;
Var
T: Integer;
Begin {4795701}
FindObjCustom(X, Y,['Banker','anker','ker','Banke'],[4795701], 9); {it will spit out all the colors we choose to find it}
clickmouse2(false);
WaitOption('Bank Banker',1000);
Marktime(T);
Repeat
Wait(1);
Until(BankScreen) Or (TimeFromMark(T) > 6000)
End;
Procedure BankTaverly;
var
FailCount:Integer;
Begin
FailCount := 0;
Repeat
GameTab(Tab_Inv);
Repeat
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('N');
Bank;
Until BankScreen or PinScreen;
If PinScreen then
Begin
Repeat
InPin(Players[0].Pin);
Until BankScreen or not (LoggedIn);
End;
If BankScreen then
Begin
DepositAll;
If ( HPLevel < 600 ) then
EatFood;
Wait(RandomRange(200, 300));
Withdraw(1, 0, 81);
Wait(RandomRange(300, 400));
Withdraw(0, 0, 0);
Wait(RandomRange(300, 350));
CloseBank;
Wait(RandomRange(900,1100));
End;
Inc(FailCount);
If FailCount > 3 then
Begin
WriteLn('Out of orbs, Thanks for using Turp''s Orb Charger!')
LogOut;
TerminateScript;
End;
Until (FindColorTolerance(x, y, 6185314, 698, 444, 704, 450, 10))
End;
Procedure ReturnToBank;
// Xtrapsp and ReadySteadyGo (HT code)
Begin
GameTab(tab_Magic);
If FindDTM(HomeTele, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
MMouse(x, y, 3, 3);
If WaitUptext('ome', 1000) then
Begin
Repeat
ClickMouse2(mouse_Left);
If WaitFunc(@LodestoneScreen, 250, 4000) then
MMouse(252,182,1,1);
If WaitColor(252,182,3610376,10,5000) Then
Begin
ClickMouse2(True);
//LodestoneTeleport('Taverley');
End;
Wait(RandomRange(12000, 15000));
Until not LodestoneScreen
End;
End;
Wait(RandomRange(1500,2000));
//SPS_Setup(RUNESCAPE_SURFACE,['8_7']);
FindNormalRandoms;
Walking;
FindNormalRandoms;
End;
Function GoStairs:Boolean;
Var
a, H, T: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
tmpCTS : Integer;
Begin
If (BankScreen) Then Exit;
FindNormalRandoms;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.25, 0.02); {its a TPA so you have to change arp > TPA}
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5986903, MSX1, MSY1, MSX2, MSY2, 17); //<< monster color + spiral tolerance search from ACA autocolor function
ATPA := TPAtoATPAEx(TPA, 20, 20); // width height < 20 20 makes it a atpa
SortATPASize(ATPA,True);
H := High(ATPA);
for a := 0 to H do
Begin
MiddleTPAEx(atpa[a], X, Y);
MMouse(X, Y, 5, 5); {up text below with a wait time to make sure uptext is correct}
If (WaitUpTextMulti(['Climb-down Steps', 'down Ste', 'imb-dow', 'teps', 'own'], 1000)) Then
Begin
ClickMouse2(False); // idk which is which but this brings the options up
WaitOption('Steps',1000); // waits for the option for 1 sec
If DidRedClick then {from < red click splat}
MarkTime(T); {Marks the time from the click}
Repeat
If (TimeFromMark(T) > 4000) Then Exit; {Wait until 4 seconds have gone by}
Until(BankScreen) Or (FindNormalRandoms); {<<or if it finds normal randoms}
Result := True
Exit;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
End;
Procedure WalkToObelisk;
var
Found:Boolean;
Begin
Found := False;
Walking2;
Wait(RandomRange(300,600));
Repeat
Case Random(2) of
2: RandomMovement;
End;
If FindObjTPA(x, y, 5986903, 6, 17, 5, 5, 12, ['teps']) then
Begin
MMouse(x, y, 3, 3);
ClickMouse2(false);
If ChooseOption('teps') then
Found := True;
End;
Found := True;
Until Found
spots;
Found := False;
Repeat
Case Random(2) of
2: RandomMovement;
End;
Repeat Wait(275 + Random(75)); Until(Not(Ismoving))
If FindObjTPA(x, y, 2110266, 1, 2, 4, 3, 2, ['trange', 'oor']) then
Begin
MMouse(x, y, 3, 3);
ClickMouse2(false);
If ChooseOption('trange') then
Found := True;
End;
Until Found
Wait(RandomRange(1950,2750));
Case FireOrb of
True: sobe;
False:
Begin
sobe;
Found := False;
Repeat
Case Random(2) of
2: RandomMovement;
End;
If FindObjTPAMulti(x, y, [4739155, 4936791], 3, -1, 3, 3, 6, ['adder']) then
Begin
MMouse(x, y, 3, 3);
ClickMouse2(false);
If ChooseOption('adder') then
Found := True;
End;
Until Found
End;
End;
Wait(RandomRange(900,1900));
End;
Procedure ChargeOrbs;
var
Found : Boolean;
Begin
GameTab(Tab_Magic);
If FindDTM(ChargeDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
MMouse(x, y, 3, 3);
ClickMouse2(True);
Repeat
Case Random(1) of
1: RandomMovement;
End;
If FindObjTPAMulti(x, y, ObeliskTIA, 10, 2, 5, 5, 3, ObeliskTSA) then
Begin
MMouse(x, y, 5, 5);
ClickMouse2(False);
If ChooseOption('belisk') then
Found := True;
End;
Until Found
End;
Wait(RandomRange(1800,2500));
If Not FireOrb then
Wait(RandomRange(2500, 3500));
MMouse((MCX1+MCX2)/2 ,(MCY1+MCY2)/2 , 5, 5);
ClickMouse2(True);
Repeat
Wait(100+Random(10));
FindNormalRandoms;
GameTab(tab_Inv);
Until not FindColorTolerance(x, y, 6185314, 698, 444, 704, 450, 10) //waits until slot 28 is NOT white/grey
End;
Procedure Report;
Var
OrbType: String;
Begin
If FireOrb then OrbType := 'Fire'
else OrbType :='Water';
WriteLn('+-----------Turp''s Orb Charger-----------');
WriteLn('| Charging ' + OrbType +' Orbs.');
WriteLn('| We have made ' + IntToStr(RunCount) + ' Runs.');
WriteLn('| We have charged ' + IntToStr(RunCount*27) + ' Orbs.');
WriteLn('| We have gained ' + IntToStr(RunCount*27*XPGain) + ' Magic XP.');
WriteLn('+---------------End Report----------------');
End;
Begin
Smart_Server := 86;
Smart_Members := True;
Smart_Signed := True;
ClearDebug;
SetupSRL;
DeclarePlayers;
DefineVars;
SPS_Setup(RUNESCAPE_OTHER,['tav_dung']);
MouseSpeed := 20;
If (not LoggedIn) then
LoginPlayer;
ClickNorth(SRL_ANGLE_HIGH);
FindNormalRandoms;
ReturnToBank;
Repeat
BankTaverly;
WalkToObelisk;
ChargeOrbs;
ReturnToBank;
Inc(RunCount);
Report;
Until(NoT(Loggedin))
End.
New updated script. Copy and paste tav_dung IMG into path–> C:\Simba\Includes\SPS\img\runescape_other
Please: realize this version only supports fire orbs atm!!!Questions about setting up? PM me and i'll teamviewer you :)
I DO NOT OWN THIS SCRIPT, THEREFORE, ALL DONATIONS GO TO 'OP' OR 'GOOGLE' FOR HELPING IMMENSELY!!