Wu-Tang Clan
2013-05-08 16:08:43
How Long have You Played Runescape?
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I just learned Simba with no prior knowledge, very thankful for the opportunity to be a part of this.
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
Entered this one into Sin's competition. Still needs a bit of work.
And the TPA Tester in my sig (just a tool I whipped up)
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
I just learned Simba with no prior knowledge, very thankful for the opportunity to be a part of this.
Are you a member of any other communities?
No
Tell us about yourself…
From: Joseph D
I was looking for a bot for runescape as I myself have become consumed by homework, work, and longboarding. I stumbled upon this wonderful ray of sunshine and thought programming might be good for me. So here I am.
Please show us one (or multiple) of your scripts.
program jdSmelt;
{$Define SMART}
{$I SRL/SRL.Simba}
{$I Sps/Sps.Simba}
// JDscripts presents: Falador Smelt!
// This script smelts bars in Falador.
// TPA finding with DTM failsafes!
var
BankDTM, BankBoothDTM, FurnaceDTM, Furnace2DTM, ProductionDTM, InterfaceDTM: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Pin :=''
Players[0].Active:=True;
end;
procedure SetDTM;
begin
BankDTM := DTMFromString('mLgAAAHicY2JgYHgAxP+A+BwQnwfiCcWBDJNKgxhggBGKGRgAvKwGLQ==');
BankBoothDTM := DTMFromString('mWAAAAHicY2FgYFBkZGD4CaTdgPRNIH0eiC9AMYg9oTiQYUpZEMOkUghGB4xoGAQAaUcK5A==');
FurnaceDTM := DTMFromString('mbQAAAHicY2VgYIhnZGAoA2JHIG4AYm8gPgAUXwrEq4D4KRA/AWIHW1s4trawAGNsgBELBgMApxUJTQ==');
Furnace2DTM := DTMFromString('mLgAAAHicY2JgYLBmZGCwBOKLQPZhIL6hI8dwXFOGAQYYoZiBAQB5WwQ9');
InterfaceDTM := DTMFromString('mbQAAAHicY2VgYGBmZGDgBtJfgfR3IBYAsmcCsSAQSwCxGVDMHIj5+PgYTp06xfB3ow7Dxo0bGTo7OxmwAUYsGAwA3fcLWQ==');
ProductionDTM := DTMFromString('mggAAAHicY2NgYPgHxKyMDAwLgXgJEMcD+VFAnA/E24DYBoiXQLExEPPz8zN8YmFhKNEWYzh+/DhDR0cHw6lTpxhwAUYcGAIAdgIOFA==');
end;
procedure FreeALLtheDTMs;
begin
FreeDTM(BankDTM);
FreeDTM(BankBoothDTM);
FreeDTM(FurnaceDTM);
FreeDTM(Furnace2DTM);
FreeDTM(InterfaceDTM);
FreeDTM(ProductionDTM);
end;
function SetStraight: Boolean;
begin
Result := False;
MakeCompass('N')
SetAngle(SRL_ANGLE_HIGH);
GameTab(Tab_Inv);
Result := True;
end;
procedure BankToSmelt;
var
myPath:TPointArray;
begin
WriteLn('Walking to the Furnace');
SPS_Setup(RUNESCAPE_SURFACE, ['8_7','9_7']);
myPath := [Point(3581, 3126), Point(3577, 3114), Point(3597, 3095), Point(3643, 3079), Point(3643, 3079), Point(3677, 3085), Point(3693, 3123)];
SPS_WalkPath(myPath);
end;
procedure SmeltToBank;
var
myPath:TPointArray;
begin
WriteLn('Walking to the Bank');
SPS_Setup(RUNESCAPE_SURFACE,['9_7','8_7']);
myPath := [Point(3682, 3100), Point(3648, 3084), Point(3616, 3079), Point(3596, 3096), Point(3575, 3116), Point(3580, 3127)];
SPS_WalkPath(myPath);
end;
procedure FindBanker;
var
theCTS, i, x, y, M, r, Fail:integer;
BankerTPA:TPointArray;
begin
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.1, 0.1);
FindColorsTolerance(BankerTPA, 5395286, MSX1, MSY1, MSX2, MSY2, 7);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(BankerTPA)
Fail := 0;
for i := 0 to M do
repeat
r := random(M);
Wait(RandomRange(60, 200));
MMouse(BankerTPA[r].x, BankerTPA[r].y, 2, 2);
inc(Fail);
if WaitUptext('anker', 300) then
writeLn('Banker TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ank ', 'Bank '], 'action', True);
if (BankScreen) then
Exit;
until(Bankscreen) or (Fail > 10);
if Fail > 10 then
begin
if (BankScreen) or (PinScreen) then
Exit;
writeLn('Something went wrong! TPA Unsuccessful! Attempting DTM.');
repeat
if FindDTM(BankDTM, x, y, MSX1, MSY1, MSX2, MSY2) or FindDTM(BankBoothDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(x,y,1,1,False);
Wait(500);
ChooseOption('ank ');
Wait(500);
until (BankScreen) or (PinScreen);
if (BankScreen) or (PinScreen) then
WriteLn('DTM in FindBanker successful!');
Exit;
end;
end;
procedure FindFurnace;
var
theCTS, i, x, y, M, r, Fail:integer;
FurnaceTPA:TPointArray;
begin
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.11, 0.11);
FindColorsTolerance(FurnaceTPA, 3881789, MSX1, MSY1, MSX2, MSY2, 5);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(FurnaceTPA)
Fail := 0;
for i := 0 to M do
repeat
r := random(M);
Wait(RandomRange(60, 200));
MMouse(FurnaceTPA[r].x, FurnaceTPA[r].y, 2, 2);
inc(Fail);
if WaitUptext('urnace', 300) then
writeLn('Furnace TPA Successful!');
ClickMouse2(mouse_right);
ChooseOption('melt');
Wait(1000);
FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2);
Wait(5000);
Mouse(379, 316, 2, 2, True);
wait(789);
Exit;
until (Fail > 10);
if Fail > 10 then
begin
if FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(379, 316, 2, 2, True);
wait(789);
Exit;
writeLn('Something went wrong! Furnace TPA Unsuccessful! Attempting DTM.');
repeat
if FindDTM(FurnaceDTM, x, y, MSX1, MSY1, MSX2, MSY2) or FindDTM(Furnace2DTM, x, y, MSX1, MSY1, MSX2, MSY2) then
Mouse(x,y,1,1,False);
Wait(500);
ChooseOption('melt ');
Wait(500);
until FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2);
FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)
WriteLn('InterfaceDTM in FindFurnace successful!');
Wait(5000);
Mouse(379, 316, 2, 2, True);
wait(789);
Exit;
end;
end;
procedure Smelt;
var
x, y: Integer;
begin
SetStraight;
SetAngle(SRL_ANGLE_HIGH);
FindFurnace;
Wait(75000);
{FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y,1,1,True);
writeLn('Production Dialogue Found... Waiting until it disappears');
repeat
wait(1500);
until not FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2);
writeLn('Production Dialogue has disappeared... Walking to the bank');}
SmeltToBank;
FindSymbol(x,y,'bank');
Mouse(x,y,1,1,True);
Wait(3000);
Exit;
end;
procedure Bank;
var
x,y,t: Integer;
begin
t := (getSystemTime + 30000);
SetStraight;
SetAngle(SRL_ANGLE_LOW);
writeLn('Banking');
repeat
FindBanker;
until(BankScreen) or (PinScreen);
if(PinScreen) then
begin
InPin(Players[0].Pin);
WriteLn('Inputting PIN');
end;
if (getSystemTime > t) and not (BankScreen) then
OpenBankFast('feb');
if (BankScreen) then
if InvCount > 0 then DepositAll; // Just to empty out your pocket as a failsafe
MouseBankSlot(1, mouse_Right);
if (WaitOption('ithdraw-al', 500)) then
Writeln('Got Stuff');
repeat
CloseBank;
until not (BankScreen);
WriteLn('Done Banking, walking to the Furnace');
BankToSmelt;
FindSymbol(x,y,'furnace');
Mouse(x,y,1,1,True);
Wait(3000);
Exit;
end;
begin
SMART_FIXSPEED := True;
SRL_SixHourFix:= True;
SetupSRL;
SetDTM;
DeclarePlayers;
LoginPlayer;
Wait(7000);
SmeltToBank;
repeat
Bank;
Smelt;
until not (LoggedIn);
if not (LoggedIn) then
FreeALLtheDTMs;
WriteLn('Thank you for running JDscripts!');
end.
program JDFaladorBonfire;
{$Define SMART}
{$I SRL/SRL.Simba}
{$I Sps/Sps.Simba}
// JDscripts presents: JDFaladorBonfire!
var
FDTM: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Pin :=''
Players[0].Active:=True;
end;
function FoundFire: Boolean;
var
x,y: integer;
begin
Result := FindDTM(FDTM, x, y, MSX1, MSY1, MSX2, MSY2)
if FindDTM(FDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Result := True;
writeLn('Found fire');
end;
if not FindDTM(FDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Result := False;
writeLn('No fire found');
end;
end;
procedure ZetDTM;
begin
FDTM := DTMFromString('mQwAAAHicY2ZgYDjIyMBwBIiPA7EmEKtA6Wf7VBh+3nJieLhcmYEfqA6GGZEwEAAAYlAIhA==');
end;
procedure PhreDTM;
begin
if DTMExists(FDTM) then
FreeDTM(FDTM);
writeLn('Fire DTM freed');
end;
procedure Bank2Spot;
var
myPath:TPointArray;
begin
writeLn('Walking to the burning spot - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['8_7']);
myPath := [Point(3582, 3132), Point(3577, 3119), Point(3576, 3102)];
SPS_WalkPath(myPath);
end;
procedure Spot2Bank;
var
myPath:TPointArray;
begin
writeLn('Walking to the bank - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['8_7']);
myPath := [Point(3576, 3105), Point(3578, 3115), Point(3580, 3123), Point(3584, 3131)];
SPS_WalkPath(myPath);
end;
procedure Spot2OtherSpot;
var
myPath:TPointArray;
begin
writeLn('Walking to the other spot - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['8_7']);
myPath := [Point(3568, 3101), Point(3561, 3107), Point(3559, 3117), Point(3559, 3129), Point(3562, 3143)];
SPS_WalkPath(myPath);
end;
procedure LightFire;
var
t: integer;
begin
if (invcount >24) then
Exit;
t := (getSystemTime + 75000);
InvMouse(1, mouse_right)
WaitOption('ight', 500);
Wait(2500);
if (FindChatBoxText('ou can', 8, clBlack)) then
Spot2OtherSpot;
Wait(2000);
repeat
InvMouse(10, mouse_right)
WaitOption('ight', 500);
until (isMoving) or (getSystemTime > t);
InvMouse(11, mouse_left);
Wait(2000);
MMouse(366,200,2,2);
ClickMouse2(mouse_left);
repeat
Wait(1000);
until (invEmpty) or (getSystemTime > t)
Spot2Bank;
if (foundFire = True) then
writeLn('Found Fire');
InvMouse(2, mouse_left);
Wait(1500);
MMouse(366,200,2,2); // Add logs to bonfire popup.
ClickMouse2(mouse_left);
repeat
Wait(1000);
until (invEmpty) or (getSystemTime > t)
Spot2Bank;
if (foundFire = False) then
begin
Spot2OtherSpot;
Wait(2000);
repeat
InvMouse(8, mouse_right)
WaitOption('ight', 500);
until (isMoving) or (getSystemTime > t);
InvMouse(9, mouse_left);
Wait(2000);
MMouse(366,200,2,2);
ClickMouse2(mouse_left);
repeat
Wait(1000);
until (invEmpty) or (getSystemTime > t)
Spot2Bank;
end;
end;
Procedure FindFire;
var
theCTS, i, M, r, Timer:integer;
FireTPA:TPointArray;
begin
if (InvEmpty) then
Exit;
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.18, 2.40);
FindColorsTolerance(FireTPA, 4165074, MSX1, MSY1, MSX2, MSY2, 9);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.2, 0.2);
M := High(FireTPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(FireTPA[r].x, FireTPA[r].y, 2, 2);
if WaitUptext('ire', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
if not (isMoving) then
LightFire;
writeLn('No Fires Found');
end;
end;
writeLn('TPA Successful!');
begin
LightFire;
end;
if (isMoving) then
Exit;
end;
Procedure FindBanker;
var
theCTS, i, M, r, Timer:integer;
BankerTPA:TPointArray;
begin
if (invfull) then
exit;
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.1, 0.1);
FindColorsTolerance(BankerTPA, 5395286, MSX1, MSY1, MSX2, MSY2, 7);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(BankerTPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(BankerTPA[r].x, BankerTPA[r].y, 2, 2);
if WaitUptext('anker', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
if (BankScreen) then
Exit;
writeLn('Something went wrong! TPA Unsuccessful!');
Spot2Bank;
OpenBankFast ('feb');
end;
end;
writeLn('TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ank ', 'Bank '], 'action', True);
if (BankScreen) then
Exit;
end;
procedure Bank;
var
t: integer;
begin
if (invEmpty) then
exit;
t := (getSystemTime + 10000);
repeat
FindBanker;
WriteLn('Opening the Falador East Bank');
until(bankScreen or pinScreen or (getSystemTime > t));
if (getSystemTime > t) then
begin
Bank2Spot;
end;
if(PinScreen) then
begin
InPin(Players[0].Pin);
end;
if (BankScreen) then
if InvCount > 0 then depositAll; // Just to empty out your pocket as a failsafe
MouseBankSlot(1, mouse_Right);
if (WaitOption('ithdraw-All', 500)) then
Writeln('Got logs');
if (invFull) then
repeat
CloseBank;
until not (BankScreen);
Bank2Spot;
end;
begin
SMART_FIXSPEED := True;
SRL_SixHourFix:= True;
SetupSRL;
ZetDTM;
DeclarePlayers;
LoginPlayer;
repeat
Bank;
Bank2Spot;
FindFire;
Spot2Bank;
writeLn('Running for:' + TimeRunning);
until (false);
PhreDTM;
end.
Entered this one into Sin's competition. Still needs a bit of work.
program HappyAlKharid;
{$Define SMART}
{$I SRL/SRL.Simba}
{$I SRL/SRL/Skill/Fighting.Simba}
// {$i SRL/SRL/misc/SmartGraphics.simba} Getting around to painting boxes.
{$I Sps/Sps.Simba}
// JDscripts presents: Happy Al-Kharid! This script does a lot of stuff in Al-Kharid. Knock yourself out.
const
//!!Always start in the Al-Kharid Bank!!!
// Firemaking = Have logs in first inventory slot.
// Tanning = Have hides in first inventory slot. Making hard leather for most profit.
// Attacking = Have armor and weapon equipped. Attacks Al Kharid Warriors in the palace. No food or deathwalk support.
// Cooking = Have food to cook in first inventory slot.
// Smithing = Have iron ore in first inventory slot. Only single ore bar support (Silver, Gold, Iron).
Doing = 'Smithing'; // Firemaking, Tanning, Attacking, Cooking, Smithing
// If Doing Attacking, fill out whether or not you want to use abilites, then what each ability's cooldown is !BY KEYBIND!
Abilities = False;
Ability1 = 3000;
Ability2 = 15000;
Ability3 = 20000;
Ability4 = 30000;
var
InterfaceDTM, ProductionDTM, HideDTM, BonfireScreenDTM: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Pin :=''
Players[0].Active:=True;
end;
procedure EOCs;
begin
if (Doing = 'Attacking') and (Abilities = True) then
wait(Ability1);
typesend('1');
wait(Ability2);
typesend('2');
wait(Ability3);
typesend('3');
wait(Ability4);
typesend('4');
end;
procedure SetDTM;
begin
InterfaceDTM := DTMFromString('mbQAAAHicY2VgYGBmZGDgBtJfgfR3IBYAsmcCsSAQSwCxGVDMHIj5+PgYTp06xfB3ow7Dxo0bGTo7OxmwAUYsGAwA3fcLWQ==');
ProductionDTM := DTMFromString('mbQAAAHicY2VgYPgHxEsYGRhWA3ESkJ0AxNlAbAXEK0ByQGwJxLy8vAx/N+owrFq1iqGjo4MhMyuTARtgxILBAABQXgwZ');
HideDTM := DTMFromString('mWAAAAHicY2FgYHBhYmDwAmJ/ILYF4idAsXdA/ACIXwCxuooUGKsoSjBoq8swoANGNAwCAIEDBlo=');
BonfireScreenDTM := DTMFromString('mbQAAAHicY2VgYGBjZGA4DMRHgNgLyPcB4qdA3AHENkAxayBuA7J5eXkZ/m7UYVi4cCHD8ePHGRYsWMCADTBiwWAAAEhqDLY=');
end;
procedure FreeALLtheDTMs;
begin
FreeDTM(InterfaceDTM);
FreeDTM(ProductionDTM);
FreeDTM(HideDTM);
FreeDTM(BonfireScreenDTM);
end;
procedure Spot12Bank;
var
myPath:TPointArray;
begin
writeLn('Walking to the Bank - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4894, 3938), Point(4876, 3933), Point(4877, 3924)];
SPS_WalkPath(myPath);
end;
procedure Spot22Bank;
var
myPath:TPointArray;
begin
writeLn('Walking to the Bank - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4890, 3821), Point(4916, 3826), Point(4919, 3848), Point(4906, 3871), Point(4899, 3896), Point(4900, 3924), Point(4890, 3938), Point(4876, 3940), Point(4876, 3921)];
SPS_WalkPath(myPath);
end;
procedure Spot32Bank;
var
myPath:TPointArray;
begin
writeLn('Walking to the Bank - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4932, 3929), Point(4965, 3918), Point(4966, 3901), Point(4967, 3878), Point(4942, 3875), Point(4922, 3878), Point(4901, 3880), Point(4899, 3905), Point(4899, 3923), Point(4890, 3937), Point(4876, 3935), Point(4877, 3925)];
SPS_WalkPath(myPath);
end;
procedure Spot42Bank;
var
myPath:TPointArray;
begin
writeLn('Walking to the Bank - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4874, 3868), Point(4900, 3875), Point(4898, 3900), Point(4899, 3917), Point(4895, 3937), Point(4877, 3940), Point(4875, 3924)];
SPS_WalkPath(myPath);
end;
procedure Spot52Bank;
var
myPath:TPointArray;
begin
writeLn('Walking to the Bank - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4893, 3842), Point(4921, 3843), Point(4919, 3863), Point(4900, 3882), Point(4896, 3902), Point(4900, 3921), Point(4892, 3936), Point(4875, 3939), Point(4875, 3925)];
SPS_WalkPath(myPath);
end;
procedure Bank2Spot1;
var
myPath:TPointArray;
begin
writeLn('Walking to the Spot - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4875, 3940), Point(4884, 3940), Point(4894, 3941)];
SPS_WalkPath(myPath);
end;
procedure Bank2Spot2;
var
myPath:TPointArray;
begin
writeLn('Walking to the Spot - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4873, 3941), Point(4895, 3939), Point(4899, 3923), Point(4898, 3899), Point(4902, 3877), Point(4918, 3860), Point(4921, 3839), Point(4889, 3822)];
SPS_WalkPath(myPath);
end;
procedure Bank2Spot3;
var
myPath:TPointArray;
begin
writeLn('Walking to the Spot - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4876, 3939), Point(4891, 3938), Point(4900, 3919), Point(4898, 3901), Point(4899, 3882), Point(4910, 3864), Point(4931, 3866), Point(4953, 3873), Point(4967, 3897), Point(4969, 3920), Point(4950, 3926), Point(4931, 3924)];
SPS_WalkPath(myPath);
end;
procedure Bank2Spot4;
var
myPath:TPointArray;
begin
writeLn('Walking to the Spot - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4873, 3939), Point(4891, 3939), Point(4897, 3926), Point(4898, 3905), Point(4900, 3887), Point(4876, 3870)];
SPS_WalkPath(myPath);
end;
procedure Bank2Spot5;
var
myPath:TPointArray;
begin
writeLn('Walking to the Spot - SPS');
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
myPath := [Point(4876, 3941), Point(4891, 3938), Point(4898, 3925), Point(4897, 3903), Point(4901, 3875), Point(4919, 3860), Point(4922, 3844), Point(4903, 3843), Point(4892, 3843)];
SPS_WalkPath(myPath);
end;
procedure Failsafe; // Just repositions the script at the bank if something messed up.
begin
case Doing of // Thanks to JJ this works :D
'Firemaking': Spot12Bank;
'Tanning': Spot22Bank;
'Attacking': Spot32Bank;
'Cooking': Spot42Bank;
'Smithing': Spot52Bank;
end;
end;
procedure FindFire; // Not too sure about this.
var
theCTS, i, M, r, x, y, Timer:integer;
TPA:TPointArray;
begin
if (Doing = 'Firemaking') then
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.09, 0.54);
FindColorsTolerance(TPA, 5158137, MSX1, MSY1, MSX2, MSY2, 12);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(TPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(TPA[r].x, TPA[r].y, 2, 2);
if TimeFromMark(Timer) > 5000 then
begin
if not (FindDTM(BonfireScreenDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Spot12Bank;
Failsafe;
Exit;
writeLn('Something went wrong! Fire TPA Unsuccessful!');
end;
end;
writeLn('Fire TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['se ', 'Use '], 'action', True);
if (FindDTM(BonfireScreenDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Exit;
end;
procedure FindEllis; // Good to go
var
theCTS, i, M, r, Timer, x, y:integer;
TPA:TPointArray;
begin
if (Doing = 'Tanning') then
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.40, 0.92);
FindColorsTolerance(TPA, 2700596, MSX1, MSY1, MSX2, MSY2, 9);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(TPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(TPA[r].x, TPA[r].y, 2, 2);
if WaitUptext('llis', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
if not (FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Spot22Bank;
Failsafe;
Exit;
writeLn('Something went wrong! Ellis TPA Unsuccessful!');
end;
end;
writeLn('Ellis TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['an hides', 'Tan hides'], 'action', True);
if (FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Exit;
end;
procedure FindAlKharidGuard; // Good to go
var
theCTS, i, M, r, Timer:integer;
TPA:TPointArray;
begin
if (Doing = 'Attacking') then
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.16, 0.87);
FindColorsTolerance(TPA, 6134687, MSX1, MSY1, MSX2, MSY2, 15);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(TPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(TPA[r].x, TPA[r].y, 2, 2);
if WaitUptext('arrior', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
if not (isMoving) then
Spot32Bank;
Failsafe;
Exit;
writeLn('Something went wrong! Guard TPA Unsuccessful!');
end;
end;
writeLn('Guard TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ttack', 'Attack'], 'action', True);
if (isMoving) then
Exit;
end;
procedure FindStove; // Good to go
var
theCTS, i, M, r, x, y, Timer: Integer;
TPA:TPointArray;
begin
if (Doing = 'Cooking') then
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.20, 0.44);
FindColorsTolerance(TPA, 4744423, MSX1, MSY1, MSX2, MSY2, 15);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(TPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(TPA[r].x, TPA[r].y, 2, 2);
if WaitUptext('ange', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
if not (FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Spot42Bank;
Failsafe;
Exit;
writeLn('Something went wrong! Stove TPA Unsuccessful!');
end;
end;
writeLn('Stove TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ange', 'Range'], 'object', True);
if (FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Exit;
end;
procedure FindFurnace; // Good to go
var
theCTS, i, M, r, x, y, Timer:integer;
TPA:TPointArray;
begin
if (Doing = 'Smelting') then
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.17, 0.17);
FindColorsTolerance(TPA, 11846608, MSX1, MSY1, MSX2, MSY2, 9);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(TPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(TPA[r].x, TPA[r].y, 2, 2);
if WaitUptext('urnace', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
if not (FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Spot52Bank;
Failsafe;
Exit;
writeLn('Something went wrong! Furnace TPA Unsuccessful!');
end;
end;
writeLn('Furnace TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['melt', 'Smelt'], 'action', True);
if (FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Exit;
end;
procedure FindBanker; // Good to go.
var
theCTS, i, M, r, Timer:integer;
TPA:TPointArray;
begin
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.13, 0.60);
FindColorsTolerance(TPA, 3497567, MSX1, MSY1, MSX2, MSY2, 9);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(TPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(TPA[r].x, TPA[r].y, 2, 2);
if WaitUptext('anker', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
if not (BankScreen) or (PinScreen) then
Failsafe;
OpenBankFast ('akb');
Exit;
writeLn('Something went wrong! Banker TPA Unsuccessful!');
end;
end;
writeLn('Banker TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ank ', 'Bank '], 'action', True);
if (BankScreen) or (PinScreen) then
Exit;
end;
procedure Banking;
var
t: integer;
begin
case Doing of
'Firemaking': Spot12Bank;
'Tanning': Spot22Bank;
'Attacking': Spot32Bank;
'Cooking': Spot42Bank;
'Smithing': Spot52Bank;
end;
t := (getSystemTime + 10000);
repeat
FindBanker;
WriteLn('Opening the Al-Kharid Bank!');
until(BankScreen or PinScreen or (GetSystemTime > t));
if (GetSystemTime > t) then
begin
Failsafe;
end;
if(PinScreen) then
begin
InPin(Players[0].Pin);
end;
if (BankScreen) then
if InvCount > 0 then DepositAll; // Just to empty out your pocket as a failsafe
MouseBankSlot(1, mouse_Right);
if (WaitOption('ithdraw-All', 500)) then
Writeln('Got Stuff');
if (invFull) then
repeat
CloseBank;
until not (BankScreen);
case Doing of
'Firemaking':Bank2Spot1;
'Tanning':Bank2Spot2;
'Attacking':Bank2Spot3;
'Cooking':Bank2Spot4;
'Smithing':Bank2Spot5;
end;
end;
procedure Firemake;
var
t: integer;
begin
if (invcount >24) then
Spot12Bank;
Failsafe;
Banking;
t := (getSystemTime + 75000);
InvMouse(1, mouse_right)
WaitOption('ight', 500);
Wait(2500);
InvMouse(2, mouse_left);
Wait(RandomRange(1500,1600));
MMouse(366,200,2,2); // Add logs to bonfire popup.
ClickMouse2(mouse_left);
repeat
Wait(1000);
until (invEmpty) or (getSystemTime > t)
if (FindChatBoxText('ou can', 8, clBlack)) then
begin
FindFire;
Wait(RandomRange(1200,1300));
Mouse(313, 200, 2, 2, True); // Coord for the bonfire box
end;
if (getSystemTime > t) then
Spot12Bank;
Failsafe;
Exit;
end;
procedure Tan;
var
t, x, y: Integer;
begin
t := (getSystemTime + 30000);
FindEllis;
if (FindDTM(InterfaceDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
Wait(RandomRange(1200,1300));
Mouse(379, 316, 2, 2, True); // ____ All button in production dialogue
Wait(1000);
if (FindDTM(HideDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
WriteLn('We made hides');
Spot22Bank;
Failsafe;
Exit;
if (getSystemTime > t) and not (FindDTM(HideDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
WriteLn('Did not make hides, going back to the bank');
Spot22Bank;
Failsafe;
Exit;
end;
procedure Attack;
var
t: Integer;
begin
t := (getSystemTime + 30000);
FindAlKharidGuard;
if (getSystemTime > t) and not (isMoving) then
WriteLn('Timed out, might not be in the right area');
Spot32Bank;
Bank2Spot3;
while (isMoving) do
EOCs;
end;
procedure Cook;
var
t, x, y: Integer;
begin
t := (getSystemTime + 30000);
FindStove;
Wait(RandomRange(1200,1300));
Mouse(379, 316, 2, 2, True);
if (FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
repeat
wait(100);
until not (FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2));
WriteLn('Done cooking');
Spot42Bank;
Failsafe;
Exit;
if (getSystemTime > t) and not (FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
WriteLn('No production screen, we must not be doing anything, going back to the bank');
Spot42Bank;
Failsafe;
Exit;
end;
procedure Smelt;
var
t, x, y: Integer;
begin
t := (getSystemTime + 30000);
FindFurnace;
Wait(RandomRange(1200,1300));
Mouse(379, 316, 2, 2, True);
if (FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
repeat
wait(100);
until not (FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2));
WriteLn('Done Smelting');
Spot52Bank;
Failsafe;
Exit;
end;
if (getSystemTime > t) and not (FindDTM(ProductionDTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
WriteLn('Timed out, going back to the bank');
Spot52Bank;
Failsafe;
Exit;
end;
begin
SMART_FIXSPEED := True;
SRL_SixHourFix:= True;
SetupSRL;
SetDTM;
DeclarePlayers;
LoginPlayer;
case Doing of
'Firemaking':
repeat
Firemake;
Banking;
until not (LoggedIn);
'Tanning':
repeat
Tan;
Banking;
until not (LoggedIn);
'Attacking':
repeat
Attack;
until not (LoggedIn);
'Cooking':
repeat
Cook;
Banking;
until not (LoggedIn);
'Smithing':
repeat
Smelt;
Banking;
until not (LoggedIn);
end;
FreeALLtheDTMs;
WriteLn('Thank you for running JDscripts Happy Al-Kharid!');
end.
And the TPA Tester in my sig (just a tool I whipped up)
program TPATEST;
{$Define SMART}
{$I SRL/SRL.Simba}
// JDscripts presents: The TPATEST! Confirmed working 3/27/13
// All you have to do is input your results from ACA into the Const and click run in the place you need to find your TPA!
// I have it set up to quit when it finds the bankscreen so it will continually look for your TPA until it finds the bankscreen of PIN screen.
// You can choose the terminate parameters by going to the end of the script and changing the Until statement
const
// From ACA
Hue = 0.1;
Sat = 0.1;
Col = 5395286;
Tol = 7;
// Non ACA
Uptext = 'anker';
Option1 = 'ank '; // Part of the option you want to click
Option2 = 'Bank '; // Another part of the option you want to click
OptionType = 'action'; // Either 'action' or 'player' for whitish grey text, 'npc' for yellow text, or 'object' for cyan
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Pin :='';
Players[0].Active:=True;
end;
Procedure FindThing;
var
theCTS, i, M, r, Timer:integer;
TESTTPA:TPointArray;
begin
theCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(Hue, Sat);
FindColorsTolerance(TESTTPA, Col, MSX1, MSY1, MSX2, MSY2, Tol);
SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
M := High(TESTTPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
MMouse(TESTTPA[r].x, TESTTPA[r].y, 2, 2);
if WaitUptext(Uptext, 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
writeLn('Check your Colors, Uptext, and Options! TPA Unsuccessful!');
Terminatescript;
end;
end;
writeLn('TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( [Option1, Option2], OptionType, True);
end;
begin
SMART_FIXSPEED := True;
SRL_SixHourFix:= True;
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
FindThing;
until (BankScreen);
if (PinScreen) then
InPin(Players[0].Pin);
if (BankScreen) then
repeat
CloseBank;
until not (BankScreen);
writeLn('TPA Successful! Thanks for running JDscripts!');
TerminateScript;
end.