SRL Archive - Archive

Joseph D - SRL Member Application


Wu-Tang Clan

2013-07-15 10:59:49

How Long have You Played Runescape?
6 Year(s)


Are you affilated in anyway with Jagex LTD?
nah

Were you Referred to SRL?



What is your general programming knowledge?
Not much really, a little java and some html before this. But I'm glad I came because Pascal is beautiful.


Are you a member of any other communities?
No.


Tell us about yourself…
From: Joseph D
I don't have much to tell, I sit in the basement playing xbox, botting, and scripting. Not much of a social person.



Please show us one (or multiple) of your scripts.
program HK6;
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i srl\srl\skill\fighting.simba}
{$i sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba}

const
WerePoor = True; //True = Picking up Stuff
Swag = 'Runes'; // Are you going to Pick Up 'Runes' or 'Coins' To do this, make WerePoor = True

procedure DeclarePlayers;
begin
HowManyPlayers := 2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;


with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
end;

with Players[1] do // Multiplayer!
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
end;
end;

procedure Welcome;
begin
WriteLn('******************************************************************');
WriteLn('********************* Dead Hill Giants- Enjoy! *******************');
WriteLn('******************************************************************');
end;

procedure NoBan;
begin
if(not LoggedIn) then Exit;
case Random(250) of

10:
begin
Hoverskill('Strength', False);
wait(1551+Random(2111));
end;

20:
begin
Hoverskill ('Attack', False);
wait(1661+Random(2221));
end;

30:
begin
Hoverskill ('Defence', False);
wait(1771+Random(2331));
end;

40: RandomRClick;


50: PickUpMouse;


end;
end;

procedure KillHill;
var
theCTS, i, M, r, Timer:integer;
TESTTPA:TPointArray;
TESTaTPA:Array of TPointArray;

begin
theCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.10, 0.81);

FindColorsTolerance(TESTTPA, 2108978, MSX1, MSY1, MSX2, MSY2, 14);

SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);

if (High(TESTTPA)> 0) then
begin
TESTaTPA := SplitTPA(TESTTPA,10);
SortATPASize(TESTaTPA,True);
end;

M := High(TESTTPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
SetArrayLength(TESTaTPA,i);
SortATPAFromMidpoint(TESTaTPA, Point(MSCX, MSCY));
MMouse(TESTTPA[r].x, TESTTPA[r].y, 2, 2);
if WaitUptext('iant', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
writeLn('no');
Exit;
end;
end;
writeLn('TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ttack', 'Attack'], 'action', True);
WriteLn('Good');
Exit;
end;

function PickUpBone (var x, y : Integer): Boolean; // Need I say more?
var
a, Bones, tmpCTS: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
GetIt : Extended;


begin
if(not(LoggedIn))then Exit;
NoBan;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.91, 0.67);

FindColorsSpiralTolerance(MSCX, MSCY, TPA, 15857114, MSX1, MSY1, MSX2, MSY2, 7);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 2, 2);

for a := 0 to High(ATPA) do
begin
if (IsUpTextMultiCustom(['ake', 'ig', 'bones'])) then
begin
result := True;
mouse(x,y,1,1,False);
ChooseOption('ake');
Break;
WriteLn('We picked up some Big Bones!');
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.22, 0.22);
begin
Bones := DTMFromString('mbQAAAHicY2VgYPjBxMDwDoj/AvE/IP4MxF5A7AvEAUDsCcQuQJydmc2QnZrMsHTWHIbqwmKGYiDGBhixYDAAANV5DWo=');
if(InvFull) then
begin
repeat
if FindDTMRotated(Bones, x, y, MIX1, MIY1, MIX2, MIY2, -Pi/4, Pi/4, Pi/60, GetIt) then
mouse(x,y,1,1,False);
ChooseOption('ury');
inc(Bones);
Until not(IsUpTextMultiCustom(['ury', 'ig', 'bones'])or(InvEmpty))
end;
FreeDTM(Bones);
end;
end;

function BankStroll: Boolean;
var
a, tmpCTS, cx, cy, x, y, Ladder, Door, Bwalk: Integer;
myPath:TPointArray;
TPA: TPointArray;
ATPA: T2DPointArray;
GetIt: Extended;

begin
if(not(LoggedIn))then Exit;
if(InvFull) then
begin
if ObjDTM_Find ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', cx, cy, True) then
begin
WriteLn('We will now walk to the Bank!');
ObjDTM_Walk ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', 2, 102, 8, True);
end;
end;

begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.81, 0.16);

FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2171937, MSX1, MSY1, MSX2, MSY2, 13);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 4, 4);

for a := 0 to High(ATPA) do
begin
if (IsUpTextMultiCustom(['xit', 'ysterious', 'oor'])) then
begin
NoBan;
mouse(x,y,1,1,False);
ChooseOption('xit');
Break;
WriteLn('We have Left the Resource Dungeon!');
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.22, 0.22);

begin
SPS_Setup(RUNESCAPE_SURFACE,['0_3','0_2']);
myPath := [Point(248, 1275), Point(260, 1254), Point(275, 1244), Point(292, 1228), Point(291, 1214), Point(292, 1200), Point(292, 1183), Point(293, 1166)];
SPS_WalkPath(myPath);
FFlag(2);
end;

begin
Ladder := DTMFromString('mbQAAAHicY2VgYEhghOA4II4F4nggLgDiBiCeC8QngfgFEHs5GjIkhzoxeNkYMjhZaDI4mWgyMAH1o2NGLBgMAIFQCOY=');
if FindDTMRotated(Ladder, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, GetIt) then
begin
mouse(x,y,1,1,False);
ChooseOption('limb-up');
end;
end;

begin
Door := DTMFromString('mggAAAHicY2NgYIhiZGAoBmIbILYDYg9GiFg0lO0LxEFAbA/FigoSDIoqEgyWFpYMEhISDJoaimAxZqBZ2DAjDgwBADFoBkc=');
if FindDTMRotated(Door, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, GetIt) then
begin
mouse(x,y,1,1,False);
ChooseOption('pen')
end;

begin
SPS_Setup(RUNESCAPE_SURFACE,['10_7','11_7']);
myPath := [Point(4301, 2860), Point(4319, 2880), Point(4330, 2897), Point(4341, 2916), Point(4359, 2931), Point(4376, 2945), Point(4394, 2961), Point(4417, 2977), Point(4451, 2983), Point(4485, 2970), Point(4494, 2953), Point(4512, 2939), Point(4538, 2939), Point(4573, 2931), Point(4580, 2909), Point(4576, 2899)];
SPS_WalkPath(myPath);
FFlag(2);
end;
end;

begin
if FindSymbol (x,y,'bank') then
WriteLn('We are at the Bank fo shizzle');
end;

inc(Bwalk);
FreeDTM(Ladder);
FreeDTM(Door);
end;
end;

function Bankinator: Boolean;
var
Banked, Key, x, y: Integer;
GetIt: Extended;

begin
Key := DTMFromString('mQwAAAHicY2ZgYFjCxMCwDohnAPEURgaGHiCeB8QtsQIMW5skwDQyYETCQAAANAEG6Q==');
if (not Loggedin) then Exit;
if (invFull) then
begin
NoBan;
if not OpenBankFast('veb') then
OpenBankNPC
else
Bankinator;

if BankScreen then
DepositAll;

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

if FindDTMRotated(Key, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, GetIt) then
begin
mouse(x,y,1,1,False);
ChooseOption('ake')
end;
end;
inc(Banked);
end;

procedure DungeonStroll;
var
myPath:TPointArray;
x,y, cx, cy, Door, LadderIn, Entrance, Dwalk: Integer;
GetIt: Extended;

begin
if(InvEmpty) then
begin
SPS_Setup(RUNESCAPE_SURFACE,['11_7','10_7']);
myPath := [Point(4578, 2909), Point(4564, 2932), Point(4539, 2935), Point(4515, 2938), Point(4494, 2956), Point(4485, 2970), Point(4467, 2976), Point(4445, 2985), Point(4432, 2973), Point(4405, 2962), Point(4380, 2946), Point(4354, 2923), Point(4341, 2913), Point(4325, 2894), Point(4324, 2875), Point(4309, 2868), Point(4299, 2856)];
SPS_WalkPath(myPath);
FFlag(2);
end;

begin
Door := DTMFromString('mggAAAHicY2NgYIhiZGAoBmIbILYDYg9GiFg0lO0LxEFAbA/FigoSDIoqEgyWFpYMEhISDJoaimAxZqBZ2DAjDgwBADFoBkc=');
if FindDTMRotated(Door, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, GetIt) then
begin
mouse(x,y,1,1,False);
ChooseOption('pen');
end;
end;

begin
NoBan;
LadderIn := DTMFromString('mWAAAAHicY2FgYFjAyMAwC4gPMELYDkAcC6XVgZiDh4PByUKAwclEgCHI15CBCagHGTOiYRAAAGUgBbM=');
if FindDTMRotated(LadderIn, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, GetIt) then
begin
mouse(x,y,1,1,False);
ChooseOption('limb-down')
end;
end;

begin
SPS_Setup(RUNESCAPE_SURFACE,['0_2','0_3']);
myPath := [Point(289, 1169), Point(288, 1187), Point(285, 1204), Point(277, 1221), Point(263, 1236), Point(253, 1254), Point(246, 1270), Point(237, 1273)];
SPS_WalkPath(myPath);
FFlag(2);
end;

begin
Entrance := DTMFromString('mWAAAAHicY2FgYKhiZGCYAcRxQFwOxN5A7AfErkAcAMR7TTQZkhOjGHq6WhiCQoMYWIF6kDEjGgYBALyhCAU=');
if FindDTMRotated(Entrance, x, y, MSX1, MSY1, MSX2, MSY2, -Pi/4, Pi/4, Pi/60, GetIt) then
begin
mouse(x,y,1,1,False);
ChooseOption('nter')
end;
end;

begin
if ObjDTM_Find ('26:118:3:10:7:60:116:10:7:68:92:10:7:48:92:5:86:37:4:79:29:137:101:137:122:56', cx, cy, True) then
begin
WriteLn('We will now walk to the Center of the Dungeon! Dah Dun Dun Dahhhhhh!');
ObjDTM_Walk ('26:118:3:10:7:60:116:10:7:68:92:10:7:48:92:5:86:37:4:79:29:137:101:137:122:56', 2, 102, 8, True);
end;
end;

inc(Dwalk);
FreeDTM(Door);
FreeDTM(LadderIn);
FreeDTM(Entrance);
end;

procedure Progress;
var
Bones, HillGiant, Dwalk, Bwalk, Loot, Banked, Time: Integer;

begin
Time := GetTimeRunning div 1000;
WriteLn('*************************** ! Dead Giants ! *********************************');
WriteLn('Loads Banked:' + IntToStr(Banked));
WriteLn('Bones Buried:' + IntToStr(Bones));
WriteLn('Hill Giants Killed:' + IntToStr(HillGiant));
WriteLn('Successful Bank Walks:' + IntToStr(Bwalk));
WriteLn('Successful Dungeon Walks:' + IntToStr(Dwalk));
WriteLn('Swag Picked:' + IntToStr(Loot));
WriteLn('Time Running:'+ IntToStr(Time));
WriteLn('*************************** ! Dead Giants ! *********************************');
end;

procedure Inventory;
begin
if(InvFull) then
begin
WriteLn('Well be stepping out to catch some air now...');
BankStroll;
Wait(1000 + Random(1500));
Bankinator;
Wait(1000 + Random(1500));
DungeonStroll;
Wait(1000 + Random(1500));
Progress;
end;
end;

function SwagPicker: Boolean; // Picks Up: Runes (all of them) and Coins (all stacks) -> Working on more
var
theCTS, i, M, r, Timer:integer;
TESTTPA:TPointArray;
TESTaTPA:Array of TPointArray;
Hue, Sat: Extended;
col, tol, Loot: Integer;

begin
if (WerePoor = True) then
begin
case Swag of
'Runes' : begin
Col := 11711143;
Hue := 5.35;
Sat := 0.32;
Tol := 9;
end;

'Coins' : begin
Col := 4905207;
Hue := 0.72;
Sat := 4.24;
Tol := 2;
end;
end;

end;

begin
theCTS := GetToleranceSpeed;

SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.10, 0.20);

FindColorsTolerance(TESTTPA, Col, MSX1, MSY1, MSX2, MSY2, Tol);

SetColorToleranceSpeed(theCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);

if (High(TESTTPA)> 0) then
begin
TESTaTPA := SplitTPA(TESTTPA,10);
SortATPASize(TESTaTPA,True);
end;

M := High(TESTTPA)
Marktime(Timer);
for i := 0 to M do
begin
r := random(M);
Wait(RandomRange(60, 200));
SetArrayLength(TESTaTPA,i);
SortATPAFromMidpoint(TESTaTPA, Point(MSCX, MSCY));
MMouse(TESTTPA[r].x, TESTTPA[r].y, 2, 2);
if WaitUptext('all', 300) then
Break;
if TimeFromMark(Timer) > 5000 then
begin
writeLn('no');
Exit;
end;
end;
writeLn('TPA Successful!');
ClickMouse2(mouse_right);
ChooseOptionMultiEx( ['ake', 'oins', 'unes'], 'action', True);
WriteLn('Good');
inc(Loot);
Exit;
end;
end;

begin
SMART_FIXSPEED := True;
SRL_SixHourFix:= True;
SetupSRL;
ObjDTM_Setup;
DeclarePlayers;
LoginPlayer;
Wait(2000);
Welcome;
GameTab(tab_Inv);

if (not(LoggedIn)) then
if Players[CurrentPlayer].Active then
LoginPlayer;
repeat
repeat
KillHill;
SwagPicker;
until (not LoggedIn);
NextPlayer(Players[CurrentPlayer].Active = False);
until AllPlayersInactive;
end.

This is TPATEST, a tool I whipped up, didn't see much attention from the community, but I hoped it would help more people than just me. Probably didn't need to be released, but contributing any way I can is always nice.

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.

I won the competition with this script, it was also one of my very first scripts ever. I'm pretty proud of it.

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.

EDIT: I was told by the guys on skype to only show my best work, so I have decided to remove my other scripts. If you are interested in seeing some of my incomplete work to see that I have indeed been working avidly on my scripting, please send me a message and I will be more than happy to send you some of my work.

Kevin

2013-07-15 11:26:31

Hey Joseph, I'm glad to see you apply again! I'll go ahead and do my little code review as I read everything over and finish this off with my decision.

As far as multiplayer is concerned… I don't think I've actually read a script that implemented it, so as far as I know you might have implemented it correctly or incorrectly… I'll leave that a wash simply due to the low use/desire of it and assume it's correct ;)

You save the CTS setting to set it back (very good), but you don't save the hue and saturation and you're just assuming they're 0.02 as the procedures start. You can save the hue and saturation as easily as the CTS with this:
GetColorspeed2Modifiers(tempHue, tempSat);
I'm a little confused by your tpa logic in each procedure… Could you explain why in KillHill you sort the atpas by size, and then while iterating over it by size, you resort it (every loop) from the midpoint instead? Especially since either way, you simply end up clicking on any random (literally you call random(M)) point in the original tpa instead of the atpa pieces that you already sorted - leaving the logic involving atpas to exist and happen, but not do anything? Then in FindBones aand BankStroll you iterate over the atpa as expected, but you don't move the mouse to any of the tpas in the atpa - thus you never actually check the uptext and won't find any of the bones unless your mouse happens to be over a set of bones as you start the procedure.

Something else to note about the uptextMulti functions are cases like this: ['ttack', 'Attack']. Basically they go through the array you pass it and see if any of the matches are found in the uptext. So with what you passed it, any time 'Attack' would be true, 'ttack' is also guaranteed to have been found first because 'ttack' is a substring of 'Attack'.

Your ODTM walking logic:

if ObjDTM_Find ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', cx, cy, True) then
begin
WriteLn('We will now walk to the Bank!');
ObjDTM_Walk ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', 2, 102, 8, True);
end;
could be shortened to simply be:

if (ObjDTM_Walk ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', 2, 102, 8, True))then//It does a find before it does the walk anyway and returns true if both were successful
begin
WriteLn('We are now walking to the Bank!');
end;

This here is a very dangerous infinite loop that will result in an eventual stack overflow if you had any possible failure anywhere prior in getting to the bank:

if not OpenBankFast('veb') then
OpenBankNPC
else
Bankinator;//recursively calling the function this code is in
Then you check to see if the bank screen is there, and if so deposit, and AFTERWARDS, you check for the pin screen to enter it (and if it was at the pin screen, you never deposit your bank load). Since you are looking to withdraw the key from the bank menu, there are much more convenient bank constants as opposed to the MS constants: MBX1, MBY1, MBX2, MBY2.

Now with that all noted, I have been much happier since your prior application with how helpful and great you have been around the forums, but I think you need to work on your scripting a little more before I'm willing to vote yes - so it will be a no for now, however I definitely do believe you are coming along well and wish you the best of luck from further voters!

Wu-Tang Clan

2013-07-15 11:44:05

From: Kevin
Hey Joseph, I'm glad to see you apply again! I'll go ahead and do my little code review as I read everything over and finish this off with my decision.

As far as multiplayer is concerned… I don't think I've actually read a script that implemented it, so as far as I know you might have implemented it correctly or incorrectly… I'll leave that a wash simply due to the low use/desire of it and assume it's correct ;)

You save the CTS setting to set it back (very good), but you don't save the hue and saturation and you're just assuming they're 0.02 as the procedures start. You can save the hue and saturation as easily as the CTS with this:
GetColorspeed2Modifiers(tempHue, tempSat);
I'm a little confused by your tpa logic in each procedure… Could you explain why in KillHill you sort the atpas by size, and then while iterating over it by size, you resort it (every loop) from the midpoint instead? Especially since either way, you simply end up clicking on any random (literally you call random(M)) point in the original tpa instead of the atpa pieces that you already sorted - leaving the logic involving atpas to exist and happen, but not do anything? Then in FindBones aand BankStroll you iterate over the atpa as expected, but you don't move the mouse to any of the tpas in the atpa - thus you never actually check the uptext and won't find any of the bones unless your mouse happens to be over a set of bones as you start the procedure.

Something else to note about the uptextMulti functions are cases like this: ['ttack', 'Attack']. Basically they go through the array you pass it and see if any of the matches are found in the uptext. So with what you passed it, any time 'Attack' would be true, 'ttack' is also guaranteed to have been found first because 'ttack' is a substring of 'Attack'.

Your ODTM walking logic:

if ObjDTM_Find ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', cx, cy, True) then
begin
WriteLn('We will now walk to the Bank!');
ObjDTM_Walk ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', 2, 102, 8, True);
end;
could be shortened to simply be:

if (ObjDTM_Walk ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', 2, 102, 8, True))then//It does a find before it does the walk anyway and returns true if both were successful
begin
WriteLn('We are now walking to the Bank!');
end;

This here is a very dangerous infinite loop that will result in an eventual stack overflow if you had any possible failure anywhere prior in getting to the bank:

if not OpenBankFast('veb') then
OpenBankNPC
else
Bankinator;//recursively calling the function this code is in
Then you check to see if the bank screen is there, and if so deposit, and AFTERWARDS, you check for the pin screen to enter it (and if it was at the pin screen, you never deposit your bank load). Since you are looking to withdraw the key from the bank menu, there are much more convenient bank constants as opposed to the MS constants: MBX1, MBY1, MBX2, MBY2.

Now with that all noted, I have been much happier since your prior application with how helpful and great you have been around the forums, but I think you need to work on your scripting a little more before I'm willing to vote yes - so it will be a no for now, however I definitely do believe you are coming along well and wish you the best of luck from further voters!


Thanks for the input. I'll apply this to (hopefully not) future applications, but I do hope that I've worked hard enough to make it to the members spot.

Kevin

2013-07-15 11:53:00

Wow, I came back and there's suddenly several more scripts here. By no means are you limited to a number of scripts, HOWEVER, I would recommend that you only show off the scripts you are most proud of and feel are the best. Quality over quantity is more likely to win the day here. :)

Kasi

2013-07-15 12:11:44

Some of kevin's points are pretty picky. @Kevin; The SRL include sets the default hue and sat to 0.02 at startup so there is no need for the script to get the values. it would be pointless for the script maker to use "custom" hue and sat values, if he knows his script is constantly at 0.02, 0.02 then there is no need to save them. also with his code regarding objectdtm's he can do it both way's, sure its more efficient your way however his code isn't incorrect either.

The use of random in your TPA finding functions is wrong. you end up missing points and searching the same points over. You have no TPA filtering on most of your TPA functions, which again is very bad and every inefficient.
Your standards seem like they are coming along but they still need improving. I see too much SPS. Please learn other methods of walking too, I'd like to see DDTM, DTM, TPA? symbol walking? you've made a handful of working scripts yet they all contain SPS.
Kevin said some important things like that potential infinate loop there. which also will be loading a DTM over and over again may i add.
Based on the things Kevin has said and the things I've said, I think you'd be ready in 2 weeks time providing you add those changes. most of which we have pointed out doesn't need substantial learning. Infact you could even edit your scripts now.

I'm at a no but I haven't voted, but if you change your scripts and include all those changes and pm me. I will happily check through and change my vote.

rj

2013-07-15 13:13:25

I have noticed that you use mmouse(x, y, 1, 1) A LOT (in like everyscript), also why are you spliting ATPA's into 4x4 boxes? That's a bit small. Last, function/procedures/variables should be named foe what they do because it makes the code more easy to read.(Yes I am talking about the swag variables/procedures). Also, you should only apply with the scripts that you have completed..Also.. the TPA tester.. why can't someone just use DebugATPABounds(ATPA) or (smart debug) instead of it looking for the TPA? Also, I noticed you have calls to other functions in your CTS functions, why? IMO it's best to have one main loop that calls procedure/functions when needed

Janilabo

2013-07-15 13:56:34

From: Kasi
Some of kevin's points are pretty picky. @Kevin; The SRL include sets the default hue and sat to 0.02 at startup so there is no need for the script to get the values. it would be pointless for the script maker to use "custom" hue and sat values, if he knows his script is constantly at 0.02, 0.02 then there is no need to save them. also with his code regarding objectdtm's he can do it both way's, sure its more efficient your way however his code isn't incorrect either.
However, the way @Kevin does it is A LOT safer way for everybody. He gave a really smart advice there.
I'd say all of us should learn to use that way, at least if you want to be professional with color/bitmap detection now and in future.

There's so many jumps in scripts from script line to another, BUT also for lines inside include(s), that means so many ways things can get messed up, if you don't restore original settings (that includes CTS-mode, hue & saturation modifiers).
..and those things can get problematic easier than you could imagine.

Yeah, SRL is well designed and I do hope that there's absolutely no logical flaws in it about CTS things (shouldn't be, but I haven't been really digging SRL source code too much).

I have personally paid extra attention for this part (CTS restoring) in MSSL development, where I made sure script writers cannot mess up ANY things from include-side with their own custom CTS things, only the script-side, which is their responsibility to take care off of anyways. :) Mostly because there used to be a lot of problems with detection (due to those jumps everywhere around include/script).

On-topic: Those scripts really need some standards, big time. Currently the standards are floating around in your scripts..
Although, I do see that you have probably improved your standards during time, as it seems that some scripts are a little cleaner.
Everything in time..
Infact, it took me a "while" to catch up with clean (enough) standards. :) My code used to be really dirty/ugly in past…

Kasi

2013-07-15 14:29:18

From: Janilabo
However, the way @Kevin does it is A LOT safer way for everybody. He gave a really smart advice there.
I'd say all of us should learn to use that way, at least if you want to be professional with color/bitmap detection now and in future.

There's so many jumps in scripts from script line to another, BUT also for lines inside include(s), that means so many ways things can get messed up, if you don't restore original settings (that includes CTS-mode, hue & saturation modifiers).
..and those things can get problematic easier than you could imagine.

Yeah, SRL is well designed and I do hope that there's absolutely no logical flaws in it about CTS things (shouldn't be, but I haven't been really digging SRL source code too much).

I have personally paid extra attention for this part (CTS restoring) in MSSL development, where I made sure script writers cannot mess up ANY things from include-side with their own custom CTS things, only the script-side, which is their responsibility to take care off of anyways. :) Mostly because there used to be a lot of problems with detection (due to those jumps everywhere around include/script).


Yeah not saying its not smart advice, but it is picky. afaik the include uses CTS 1 as default meaning it doesn't matter what the Hue and sat is at. And anyone who sets CTS 2 always sets their Hue and Sat because if they didn't the whole idea of CTS 2 would be useless. if you wanna test it go ahead and temporarily comment out SetToleranceSpeed2Modifiers in SetupSRL, and see if everything still functions.
Saying that, I would yet again say as long as the user sets the CTS back to 1, it doesn't matter what the Hue and Sat is at. Every procedure/function using CTS 2 changes these values.

In conclusion, Setting everything back to how it was is good programming practice and you may even see it as professional. but within the include, if the user didn't change it back it wouldn't have an effect on anything else.

Edit: Missed out a little point. This also requires the script maker to make sure he / she doesn't "thread" multiple functions which all change the Hue and Sat. but this again is within the User's power. if it's not needed, they do not need to bother with the changing the Hue / Sat back

DemiseScythe

2013-07-15 15:30:14

I wasn't sure you had strong scripting knowledge with the first few scripts but I really liked what you did with the HappyAlKharid one. It is organized and you used multiple techniques throughout the script. I am not sure how well it actually runs since it isnt compatible with my Simba/smart install but from the code, it seems you put a lot of effort and time into it. You know way more about color scripting than I do even now. You could try implementing some DTMs to your scripts since it makes item finding easy. Then you wouldn't have to require the user to have items in a certain bankslots, but the script would be able to determine their x,y location by actually seeing the item. Keep improving and good luck, I vote yes.

Ashaman88

2013-07-15 15:37:26

Lots of areas for improvements (don't we all), but I say yes

Wu-Tang Clan

2013-07-15 21:15:08

From: Ashaman88
Lots of areas for improvements (don't we all), but I say yes


From: DemiseScythe
I wasn't sure you had strong scripting knowledge with the first few scripts but I really liked what you did with the HappyAlKharid one. It is organized and you used multiple techniques throughout the script. I am not sure how well it actually runs since it isnt compatible with my Simba/smart install but from the code, it seems you put a lot of effort and time into it. You know way more about color scripting than I do even now. You could try implementing some DTMs to your scripts since it makes item finding easy. Then you wouldn't have to require the user to have items in a certain bankslots, but the script would be able to determine their x,y location by actually seeing the item. Keep improving and good luck, I vote yes.


Thanks for the yes vote, and I am improving with each compiling error.
I've been working on improving TPA methods and working on walking paths, but for the most part I like to see the script work before it goes into improvement phase. For all I know I could be making a bigger mess for myself by improving a TPA that didn't work in the first place.
True, better safe than sorry, but before that its better working than getting compiling errors.

Ashaman88

2013-07-16 00:06:56

From: Joseph D
Thanks for the yes vote, and I am improving with each compiling error.
I've been working on improving TPA methods and working on walking paths, but for the most part I like to see the script work before it goes into improvement phase. For all I know I could be making a bigger mess for myself by improving a TPA that didn't work in the first place.
True, better safe than sorry, but before that its better working than getting compiling errors.


I mostly mean logic wise - the technique and advanced stuff is much less important

The Mayor

2013-07-16 04:10:12

Your never say die attitude and willingness to learn is enough for me. The rest will come with practice, yes ;)

Chris!

2013-07-16 04:25:26

I voted yes, basically for what @The Mayor stated above. I love a person with a good attitude and having your cup shows that you have sufficient scripting ability.

Good luck! :)

rj

2013-07-16 12:27:02

I hate to be that guy… but I voted no. Don't take this personally, but I feel that if I voted that way I should at-least say why. The reasons are (I am 100% willing to change my vote if they are fixed)

1) Variable names. They should be somewhat relevant to the script "werepoor" is borderline, but "swag" just makes no sense. I know it's not "required" for you to have certain names, but it just makes some things confusing.
2) MMouse 1 1 is in there A LOT. This can turn out to be BAD even if it's for main-screen objects! This is really bad.
3) Calling functions in others function, that makes the script hard to debug and to read.
4) Some broken logic as kevin pointed out (atpas being split into 4x4 boxes)
5) This comment may be potentially useless, but you should only apply with the scripts that are completed and solid, you have applied with 9 scripts, but you see only 3 of them are complete and solid(I am not counting the TPA tester as a script).

Now some positive things:

1) Object DTM walking.
2) You applied with what I consider 3 solid working scripts, I'd say that is pretty good
3) You are fairly active (I'd like to see more, but you have only been about 4 months)

Olly

2013-07-16 13:12:01

From: Officer Barbrady
3) Calling functions in others function, that makes the script hard to debug and to read.


what…?

DemiseScythe

2013-07-16 13:17:52

I agree, that is not a valid argument. Using long code instead of functions is not coding efficiently. Functions in functions are meant to shorten up code. More than 80% of SRL is probably functions with other functions in it. Tbh I don't see what is the problem here.

(*
IsChatBoxTextBetween
~~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

function IsChatBoxTextBetween(Text: string; TextCol, StartLine, EndLine: Integer): Boolean;

Returns true if Text with colour TextCol is found anywhere in the chat box.


.. note::

by ZephyrsFury

Example:

.. code-block:: pascal


*)
function IsChatBoxTextBetween(Text: string; TextCol, StartLine, EndLine: Integer): Boolean; // A function
var
II: Integer;
begin
Result := True;
for II := Max(StartLine, EndLine) downto Min(StartLine, EndLine) do
if (FindChatBoxText(Text, II, TextCol)) then // A function inside a function
Exit;
Result := False;
end;

rj

2013-07-16 13:20:30

From: Olly
what…?


For example in the procedure "bankscroll":
function BankStroll: Boolean;
var
a, tmpCTS, cx, cy, x, y, Ladder, Door, Bwalk: Integer;
myPath:TPointArray;
TPA: TPointArray;
ATPA: T2DPointArray;
GetIt: Extended;

begin
if(not(LoggedIn))then Exit;
if(InvFull) then
begin
if ObjDTM_Find ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', cx, cy, True) then
begin
WriteLn('We will now walk to the Bank!');
ObjDTM_Walk ('85:82:3:10:7:41:108:10:7:49:97:10:7:68:111:5:57:67:89:31:131:99:63:148:3:74', 2, 102, 8, True);
end;
end;

It's supposed to get to the bank, but it should only be executed under certain conditions (such as being besides it so it should have no need to check if the inv is full or whatever)

Sin

2013-07-16 13:30:31

Yea.

Kasi

2013-07-16 16:16:59

@Officer Barbrady;

Some of what you said is complete bs lol. The script doesn't even have to work. The script is there simply to demonstrate your knowledge of programming capability. if it doesn't work then it doesn't work; Doesn't make it unworthy of applying for members with.

xtrapsp

2013-07-16 16:57:26

From: Kasi
@Officer Barbrady;

Some of what you said is complete bs lol. The script doesn't even have to work. The script is there simply to demonstrate your knowledge of programming capability. if it doesn't work then it doesn't work; Doesn't make it unworthy of applying for members with.


Voted yes.

Ignore RJJ, He's a wannabe mod.

BRB deleting all my functions in functions.

The Killer

2013-07-16 17:03:49

Haven't properly looked through your scripts. I'v read what my fellows have posted and I think you have enough to consider already.
You're a very nice guy. I haven't spoken to you loads but when I do you're very pleasant. You're very helpful and I'v seen you try and be helpful on my thread (and I'm sure it doesn't stop there).

I'm voting yes simply based on my experience. I wasn't the perfect scripter when I got in. And had a fair amount of feedback on my app however I got in and still took in everything else said to improve.

I probably wouldn't of voted yes several months ago, but several people of not what I'd call ready, got mems and I don't see why you shouldn't.

Good luck with the rest of your app.
~Tk

NKN

2013-07-16 21:33:41

Voted yes.
@Officer Barbrady I would advise you not to start rep-wars because you get upset. If you have a problem with me, take it out in PM. Abusing rep is against the rules here. I thought you'd know that by now.

Rich

2013-07-17 06:21:14

Voted yes. You've got a decent attitude and your scripts are good. Like Ashaman said, there's room for improvement, but people with a lot worse apps have got in.

Wu-Tang Clan

2013-07-17 09:20:14

From: Rich
Voted yes. You've got a decent attitude and your scripts are good. Like Ashaman said, there's room for improvement, but people with a lot worse apps have got in.


From: NKN
Voted yes.
@Officer Barbrady I would advise you not to start rep-wars because you get upset. If you have a problem with me, take it out in PM. Abusing rep is against the rules here. I thought you'd know that by now.


I'm sorry, I don't mean to be rude or anything, but I was at 12-6 before both of you voted? I'm not calling out liars or anything I'm just wondering if something went wrong.

Janilabo

2013-07-17 09:36:57

From: Joseph D
I'm sorry, I don't mean to be rude or anything, but I was at 12-6 before both of you voted? I'm not calling out liars or anything I'm just wondering if something went wrong.
It's possible that they gave the votes already earlier, before those posts that you quoted there.

Rich

2013-07-17 09:51:59

From: Joseph D
I'm sorry, I don't mean to be rude or anything, but I was at 12-6 before both of you voted? I'm not calling out liars or anything I'm just wondering if something went wrong.


Don't know what happened to be honest. I voted when I posted and I'm sure it said 11-6 before that. Just made sure and it does say that I've voted yes.

Wu-Tang Clan

2013-07-17 10:21:06

From: Rich
Don't know what happened to be honest. I voted when I posted and I'm sure it said 11-6 before that. Just made sure and it does say that I've voted yes.


No worries. Its all good

NKN

2013-07-17 10:40:12

From: Joseph D
No worries. Its all good


I voted before I commented.

Wu-Tang Clan

2013-07-17 12:46:53

Alright well thanks then. Didn't mean to stir the pot.

[XoL]

2013-07-17 19:45:10

Yes no doubt :)

Enslaved

2013-07-18 18:50:32

abstaining till later date when I have chance to go through the script thoroughly, but looking good so far

Kevin

2013-07-18 20:40:51

From: Enslaved
abstaining till later date when I have chance to go through the script thoroughly, but looking good so far


You should read the rules on voting and Member's, you're not supposed to vote until you've been a member for a while and have watched a few other apps go through ;)

Wu-Tang Clan

2013-07-18 21:55:07

From: Kevin
You should read the rules on voting and Member's, you're not supposed to vote until you've been a member for a while and have watched a few other apps go through ;)


If you know the rules, do you know how long these votes last for? I don't see a "poll ending at"

rj

2013-07-18 22:02:04

From: Joseph D
If you know the rules, do you know how long these votes last for? I don't see a "poll ending at"


2 weeks from the time this thread was made

Daniel

2013-07-18 22:52:58

Yes.

Vinyl Scratch

2013-07-19 01:53:25

Voting no because you're a good person on the forums. You've also got a script that looks good (Haven't gone through it much, mostly making sure there aren't any big nono's.

Yeah, so. Congrats on my no-vote.

I'm kidding, it's a yes vote.

Daniel

2013-07-26 23:47:05

Does anybody else have anything against @Joseph D; becoming an SRL member? If so, speak now or forever hold your peace.

Kevin

2013-07-27 00:06:30

From: Daniel
Does anybody else have anything against @Joseph D; becoming an SRL member? If so, speak now or forever hold your peace.


I like him as a person, and had he posted more than 1 script as I voted I may have said yes ;) Nonetheless that doesn't mean I wanna change my vote because that's his own fault :p (but not meaning i'm saying he shouldn't become mem either, so my peace is held at least).

Brandon

2013-07-27 00:10:49

I will vote yes but lets try not to use "case swag of" in your script. Just a turn off for me. Other than that, the code looks good to me so why not.

Yes from me.

Wu-Tang Clan

2013-07-27 10:20:53

From: Brandon
I will vote yes but lets try not to use "case swag of" in your script. Just a turn off for me. Other than that, the code looks good to me so why not.

Yes from me.


Well I was using it as an older term if that changes anything… swag as in loot. Not swag as in pants down low

Daniel

2013-07-30 07:05:19

Congratulations!

Welcome in. :)