SRL Archive - Archive

Joseph D - SRL Member Application


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…
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.

Wetish

2013-05-08 17:52:13

Voted no based on activity.

The Mayor

2013-05-08 19:44:48

This is a good attempt Joseph D :) You have learnt a lot since you've been here. There are however, some inefficiencies in you code which stand out to me.

Potentially infinite loops are a big no. What happens if it cannot find the banker?
  
repeat
FindBanker;
until(BankScreen) or (PinScreen);

In your second script you have a whole bunch of different walking procedures. Considering each of these paths use the same surface map, this could be easily simplified.

Things like this
 
if (getSystemTime > t) then
begin
Bank2Spot;
end;

if(PinScreen) then
begin
InPin(Players[0].Pin);
end;

can simply be written as

 
if (getSystemTime > t) then
Bank2Spot;

if PinScreen then
InPin(Players[0].Pin);

You have a whole bunch of colour finding procedures which are basically the same. These could be rewritten as a single procedure which could then be called each time you wanted to find the banker, or stove etc.

Also, I don't see any use of ATPAs throughout your scripts. The ability to manipulate ATPAs to suit your needs is what most members will look for in an application.

Other than those things, well done on coming this far :D

Wu-Tang Clan

2013-05-09 07:33:04

Thank you for your constructive criticism. Would anybody else care to say why they have voted no?

Kevin

2013-05-09 15:25:10

I will also be voting no, first and foremost due to your activity. As this is a community based rank, there is a significant community requirement, so while your attitude is good, you still need to work on community contributions and activity. You can see a guide for applying to member's here: http://villavu.com/forum/showthread.php?t=74195

As for your script itself, there are the issues that Mayor pointed out, as well as other issues I will go into a little bit. While it is nice to see a variety of scripts, none of them are of any real complexity, and in fact don't remotely meet the membership script requirements (not even one of them meets the 300 line requirement). However, as your first script seems to be the most complex, I will give a little review of what I see in there:
The first thing your SetStraight function does is set the result to false (which it defaults at anyway) and the last thing it does is set the result to true. There is no way for that function to not return true as there's no branching to reach that point, it will simply always return true.
You don't seem to understand if statements as seen here:
      if WaitUptext('anker', 300) then
writeLn('Banker TPA Successful!');//this will be in the if statement
ClickMouse2(mouse_right);//These next 2 lines will always happen
ChooseOptionMultiEx( ['ank ', 'Bank '], 'action', True);
Indenting them does not make all of them occur in the if, to make them all occur in the if, you need to throw a begin..end statement around them like this:
      if WaitUptext('anker', 300) then
begin
writeLn('Banker TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ank ', 'Bank '], 'action', True);
end;
And then there are issues of possibly infinite loops, lack of randomness (Mouse(x,y,1,1,True);), and while I understand that 'randoms' don't occur in EOC, that doesn't make FindNormalRandoms; a useless statement - it still detects all sorts of things, such as Mods, so it can avoid those as well.

Wu-Tang Clan

2013-05-09 18:38:44

From: Kevin
I will also be voting no, first and foremost due to your activity. As this is a community based rank, there is a significant community requirement, so while your attitude is good, you still need to work on community contributions and activity. You can see a guide for applying to member's here: http://villavu.com/forum/showthread.php?t=74195

As for your script itself, there are the issues that Mayor pointed out, as well as other issues I will go into a little bit. While it is nice to see a variety of scripts, none of them are of any real complexity, and in fact don't remotely meet the membership script requirements (not even one of them meets the 300 line requirement). However, as your first script seems to be the most complex, I will give a little review of what I see in there:
The first thing your SetStraight function does is set the result to false (which it defaults at anyway) and the last thing it does is set the result to true. There is no way for that function to not return true as there's no branching to reach that point, it will simply always return true.
You don't seem to understand if statements as seen here:
      if WaitUptext('anker', 300) then
writeLn('Banker TPA Successful!');//this will be in the if statement
ClickMouse2(mouse_right);//These next 2 lines will always happen
ChooseOptionMultiEx( ['ank ', 'Bank '], 'action', True);
Indenting them does not make all of them occur in the if, to make them all occur in the if, you need to throw a begin..end statement around them like this:
      if WaitUptext('anker', 300) then
begin
writeLn('Banker TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ank ', 'Bank '], 'action', True);
end;
And then there are issues of possibly infinite loops, lack of randomness (Mouse(x,y,1,1,True);), and while I understand that 'randoms' don't occur in EOC, that doesn't make FindNormalRandoms; a useless statement - it still detects all sorts of things, such as Mods, so it can avoid those as well.


Very sorry for not being active enough. I thought that achieving a 53 rep was considered having a good attitude. I have almost 100 posts, so I though it was time to up my status a bit- I thought wrong. < After reading this I sound a little snarky- I don' mean any negativity.
I thank you for all your comments and will work on it for the next stage of this script (maybe my next application if this one doesn't work out.)

However, I still have faith in this vote. It isn't over til its over! Start off a little weak but there's time :)

Kevin

2013-05-09 18:46:11

From: Joseph D
Very sorry for not being active enough. I thought that achieving a 53 rep was considered having a good attitude. I have almost 100 posts, so I though it was time to up my status a bit- I thought wrong. < After reading this I sound a little snarky- I don' mean any negativity.
I thank you for all your comments and will work on it for the next stage of this script (maybe my next application if this one doesn't work out.)

However, I still have faith in this vote. It isn't over til its over! Start off a little weak but there's time :)


Oh I don't mean to make you sound snarky or negative by any means. And you do have a good attitude - I believe that. But it's just that 100 posts isn't exactly a large quantity. Are you familiar with the Junior member level? For a frame of reference, that ranking requires 6 months & 300 posts (but no script), and it has a smaller amount of status than even the Member ranking does.

I believe you have what it takes in you, you're just not there yet. :)

Wu-Tang Clan

2013-05-10 22:39:28

Making a comeback guys! 2-8! There's still hope!

Vinyl Scratch

2013-05-16 08:01:33

From: The Mayor
This is a good attempt Joseph D :) You have learnt a lot since you've been here. There are however, some inefficiencies in you code which stand out to me.

Potentially infinite loops are a big no. What happens if it cannot find the banker?
  
repeat
FindBanker;
until(BankScreen) or (PinScreen);

In your second script you have a whole bunch of different walking procedures. Considering each of these paths use the same surface map, this could be easily simplified.

Things like this
 
if (getSystemTime > t) then
begin
Bank2Spot;
end;

if(PinScreen) then
begin
InPin(Players[0].Pin);
end;

can simply be written as

 
if (getSystemTime > t) then
Bank2Spot;

if PinScreen then
InPin(Players[0].Pin);

You have a whole bunch of colour finding procedures which are basically the same. These could be rewritten as a single procedure which could then be called each time you wanted to find the banker, or stove etc.

Also, I don't see any use of ATPAs throughout your scripts. The ability to manipulate ATPAs to suit your needs is what most members will look for in an application.

Other than those things, well done on coming this far :D


This.

Instead of posting another reply that's the same as all of the others, I'm going to leave this one, and say that the scripts are good, but need a little work


Recap:
-ATPAs
-Failsafes
-Walking Failsafes //This falls under failsafes, but it's good to be specific.
-Extra color failsafes, to make sure that we aren't just having a buggy DTM. ODTMs (Object DTMs) are perfect for things like this. Since bankers are static, they don't walk.


And, your activity needs work.

Sorry, man. Gonna vote no.

Good luck, though.

rj

2013-05-16 19:51:15

Hello, I noticed that your walk bank procedure is extremely repetitive and bulky, so here is a way you can compress it while still having the randomness:


Procedure WalkBank;
Var
myPath:TPointArray;

begin
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
case random(10) of
0: 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)];
1: myPath := [Point(4873, 3939), Point(4891, 3939), Point(4897, 3926), Point(4898, 3905), Point(4900, 3887), Point(4876, 3870)];
2: 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)];
3: 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)];
4: 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)];
5: myPath := [Point(4875, 3940), Point(4884, 3940), Point(4894, 3941)];
6: 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)];
7: myPath := [Point(4874, 3868), Point(4900, 3875), Point(4898, 3900), Point(4899, 3917), Point(4895, 3937), Point(4877, 3940), Point(4875, 3924)];
8: 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)];
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)];
end;
SPS_WalkPath(myPath);
end;

it sets myPath to a random one of those TPointArrays and then walks to it!

my code: 20 lines, your code:109 lines

P1ng

2013-05-26 22:23:47

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;

could be written as:
function FoundFire: Boolean;
var
x,y: integer;

begin
Result := FindDTM(FDTM, x, y, MSX1, MSY1, MSX2, MSY2);

if result then
writeLn('Found fire') else
writeLn('No fire found');
end;
Simply cutting down clutter, un-necessary results and so forth.

I like your use of writeln in debugging scripts.

More failsafes in your SPS walking would be nice, I hear its reliable at the moment, but theyre always nice to see.

Failsafes on loops, use of CTS2 and custom made function are all good

Mainloop is an infinite loop in bonfire script… :/

Use of DTMs is good.

    repeat
Bank;
Smelt;
until not (LoggedIn);
if not (LoggedIn) then
FreeALLtheDTMs;
WriteLn('Thank you for running JDscripts!');

Would prefer to see AddOnTerminate('FreeALLtheDTMs'); as this currently, if the script fails and the account is not logged out it wont free the DTMs


initial result := false; is un-necessary, booleans are set to false as standard
there is also no way this function could ever return false, there are no conditions for it and may as well be a procedure
function SetStraight: Boolean;
begin
Result := False;
MakeCompass('N')
SetAngle(SRL_ANGLE_HIGH);
GameTab(Tab_Inv);
Result := True;
end;


In short, there are simpler ways for you to write some of the things you are writing.
More consistency with failsafes

Given your short time here and my lack of activity throughout that period, I cannot make full judgement on your activity and attitude but from what I have seen it appears to be pretty good.

You've only been here a little while, don't get disheartened because you've clearly learned alot in this short amount of time. Keep at it and it'll probably be a yes from me next time.

Unfortunately, this time around I would have voted no.

Daniel

2013-06-02 05:34:10

Looks like you won't be getting in this time, Joseph D :(

Take into account all the suggestions given by members.

You may apply again in two weeks, or whenever you feel ready. :)