SRL Archive - Archive

Smarter Child - SRL Member Application


Smarter Child

2009-08-29 03:15:21

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Well i know basic web design, and i have learned some java/delphi.


Are you a member of any other communities?
Not really.


Tell us about yourself…
From: Smarter Child
im 13, i like soccer, i like scripting, plan on releasing more scripts. I want to be come a big help to this community :)

Don't play as much of runescape as i used too. I like Scar :p



Please show us one (or multiple) of your scripts.
[scar]program New;
{.include SRL\SRL.Scar}

{=========================================================================]
[ ___ ___ ]
[ / __) / __) ]
[ \__ \( (__ ]
[ (___/ \___) ]
[ ]
[ NAME : Flawless FightCaver ]
[ WRITER : Smarter Child ]
[ CATEGORY : Fighting ]
[ DESCRIPTION : AFKs in fight caves, gets u xp and tokkul ]
[ USAGE : Color ]
[ NOTES : Position player right at cave entrance ]
[ CONTACT : Me @ [email]wowplayermaster@hotmail.com[/email] (mail) ]
[ Version : 0.1 ]
[ Status : Alpha stages ]
[=========================================================================]
[ Instructions ]
[=========================================================================]
[ 1. Have your display settings set to 32 bit TRUE color. ]
[ 2. Fill out DeclarePlayers. ]
[ (For further instructions on how to fill it out, visit this thread: ]
[ [url]http://www.villavu.com/forum/showthread.php?t=5410[/url]) ]
[ 3. Please make sure your player is at the cave ]
[ 4. Make sure you have a weapon/bow + arrows equipped ]
[ 5. Start script! ]
[=========================================================================}

Const
Username = ''; //Players username.

Password = ''; //Players password.

Nick = ''; //Players nick [3-4 letters of username].

Range = true; //Would you like the script to range[must set fight style to range too]

FightStyle = 'range'; //Valid Styles are: 'attack','strength','shared','defense','range'\\

{ BankTheTokkul = false; //REMOVED MAY ADD LATER }

PickupTheArrows = false; //Would you like to pickup the arrows?[STABLE]

Special = true; //Would you like the script to occasionally use special attack?

Prayer = false; //Would you like the script to turn on prayers now and then in fight caves?

Runz = 15; //How many runs b4 sleeping for about 30-50 minutes.

Potion = false; //Drink potions now and then in the fight caves

MaxPot = 4; //Max times to drink the potion? [leave as 0 if potion = false]


//---------------------------------------------------------------------------------------------------------------------------\\
//---------------------------------------------------------------------------------------------------------------------------\\
//----------------------------------------------DO NOT TOUCH BELOW-----------------------------------------------------------\\
//---------------------------------------------------------------------------------------------------------------------------\\
//---------------------------------------------------------------------------------------------------------------------------\\
var
Tokkul, runs, Arrows, specials, entrytries, xTokkul, runsEx, PotsDrank, Pot, sleeps, levels: integer;

Const Version = '0.1'; //DO NOT CHANGE

Procedure GetVer;
Var
Ver: string;
begin
Status('Checking Version..');
Ver := GetPage('http://fightcaver.freehostia.com/FightCaveVersion.txt');
if Ver = Version then
begin
ClearDebug;
Writeln('Script is up-to-date');
end;
if Ver <> Version then
begin
ClearDebug;
Writeln('Script is OUTDATED.');
Writeln('New Version: ');
end;
end;

{*******************************************************************************
function FindBank: boolean;
By: Smarter Child
Description: Finds and clicks the TzHaar banker.
*******************************************************************************}
Function FindBanker: boolean;
var
GetCTS, rx, ry, tx, ty, h: integer;
TPA: TPointArray;
aTPA: T2DPointArray;
I: integer;
begin
GetCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 1.83);
rx := MSCX;
ry := MSCY; //Declare "r" variable to the center of the client.
if FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3505344, MSX1, MSY1, MSX2, MSY2, 22)then
begin
Writeln('Banker found');
aTPA := SplitTPAEx(TPA, 25, 20);
H := High(aTPA);
For I := 0 to H do
begin
if Length(TPA[i])=0 then Exit;
if MiddleTPAEx(TPA, tx, ty)then
begin
writeln('clicking..');
MMouse(tx, ty, 2, 2);
Wait(100 + Random(200) - random(50));
if IsUpText('TzHaar')then
begin
Mouse(tx, ty, 3, 3, true);
Result := true;
ColorToleranceSpeed(GetCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
end;
end;
end;
if(not(FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3505344, MSX1, MSY1, MSX2, MSY2, 22)))then
begin
Writeln('Couldn''t find banker');
Result := false;
ColorToleranceSpeed(GetCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
end;

{*******************************************************************************
Procedure LoadDTM;
By: Smarter Child
Description: Loads all DTMs into memory.
*******************************************************************************}
Procedure LoadDTM;
begin
Tokkul := DTMFromString('78DA639CC2CCC060CAC8800CACCCCC18FE036' +
'99828E36CA01A3D5435E6C6C61039989A25403596A86A0C141450D58' +
'0ECB24755E3E160C22089ACA603A8C61C550D4C16AE663E508D217E3' +
'50084C0087F');

Arrows := DTMFromString('78DA63546260609064400142EC0C0CFF81342' +
'310FF070246901A75543582509A114683E41551D5F0A1ABD10112' +
'12A86AB8D1D5180209013435CC0C0CFCC86AA430CDE1634433471' +
'C48A8E07733008F240748');

Pot := DTMFromString('78DA63DCCFCCC020C4C8800C548BFB18FE036' +
'990E87F2060DC0D542383AA06220B2381F409A01A49026A8E03D5' +
'881250B38F198987502380AC6607508D207E7300FA8F0B47');


end;
{*******************************************************************************
Procedure FreeMemory;
By: Smarter Child
Description: Frees all DTMs from memory.
*******************************************************************************}
Procedure FreeMemory;
begin
FreeDTM(Tokkul);
FreeDTM(Arrows);
FreeDTM(Pot);
end;
{*******************************************************************************
Function CountTokkul: integer;
By: Smarter Child
Description: Counts and stores tokkul value in xTokkul.
*******************************************************************************}
Function CountTokkul: integer;
begin
xTokkul := ItemAmount('inv', 'dtm', Tokkul, []);
Result := xTokkul;
end;

{*******************************************************************************
function BankTokkul: boolean;
By: Smarter Child
Description: Banks tokkul, if tokkul isn't found it exits and continues.
*******************************************************************************
Function BankTokkul: boolean;
var
tx, ty: integer;
begin
CountTokkul;
if BankTheTokkul = false then exit;
Status('Banking...');
repeat
FindBanker;
until(BankScreen);
if BankScreen then
begin
Writeln('Bank = open');
Wait(500 + Random(500));
LoadDTM;
if FindDTM(Tokkul, tx, ty, MIX1, MIY1, MIX2, MIY2)then
begin
MMouse(tx, ty, 3, 3);
Wait(500 + Random(750));
if IsUpText('okkul')then
begin
Wait(RandomRange(250, 650) + Random(500));
Mouse(tx, ty, 2, 2, false);
Wait(RandomRange(650, 750) + Random(750));
if ChooseOption('eposit All')then
begin
Writeln('Banked Tokkul');
CloseBank;
FreeMemory;
Result := true;
end;
end;
end;
if(not(FindDTM(Tokkul, tx, ty, MIX1, MIY1, MIX2, MIY2)))then
begin
CloseBank;
Result := false;
FreeMemory;
Exit;
end;
end;
end;
}
{*******************************************************************************
function InCave: boolean;
By: Smarter Child
Description: Detects if you are in the fight caves, can be a little laggy :P.
*******************************************************************************}
Function InCave: boolean;
var sx, sy: integer;
begin
SymbolAccuracy := 0.8;
Result := (not(FindSymbol(sx, sy, 'bank')))or
(not(FindSymbol(sx, sy, 'minigame')))
end;

{*******************************************************************************
function EnterCave: boolean;
By: Smarter Child
Description: Enters fight cave, will change compass if required.
*******************************************************************************}
Function EnterCave: boolean;
var
x, y, i, dg: integer;
TPA, tempTPA, TPAs: TPointArray;
aTPA : T2DPointArray;
TP: TPoint;
begin
if InCave then exit;
dg := Round(rs_GetCompassAngleDegrees);
if(not(InRange(dg, 200, 150)))then
MakeCompass(180 + Random(20) - RandomRange(10, 20));
SetAngle(false);
FindColorsSpiralTolerance(x, y, tempTPA, 9474460, MSX1, MSY1, MSX2, MSY2, 25);
FindColorsSpiralTolerance(x, y, TPA, 8487563, MSX1, MSY1, MSX2, MSY2, 35);
if(not(Length(TPA) > 0)) or (not(Length(tempTPA) > 0)) then
Exit;
TPAs := CombineTPA(tempTPA, TPA);
ATPA := SplitTPA(TPAs, 22);
SortATPASize(ATPA, True);
for i := 0 to High(ATPA) do
begin
TP := MiddleTPA(ATPA[i]);
MMouse(TP.x, TP.y, 6, 6);
Wait(Random(350 + Random(350)));
if IsUpText('ave') or IsUpText('TzHaar') then
begin
Mouse(TP.x, TP.y, 5, 5, false);
if ChooseOption('nter')then
Result := True;
inc(runs);
inc(runsEx);
Exit;
end;
end;
if(not(FindColorsSpiralTolerance(x, y, TPA, 9474460, MSX1, MSY1, MSX2, MSY2, 15))) or
(not(FindColorsSpiralTolerance(x, y, tempTPA, 8487563, MSX1, MSY1, MSX2, MSY2, 25)))then
Result := false;
inc(entrytries);
Exit;
end;

{*******************************************************************************
function SetStyle integer;
By: Smarter Child
Description: Loads the fight stlye according to the const.
*******************************************************************************}
Function SetStyle: integer;
begin
Case FightStyle of
'attack': Result := 1;
'strength': Result := 2;
'shared': Result := 3;
'defense': Result := 4;
'range': Result := 0;
end;
end;

{*******************************************************************************
Procedure Terminate(reason: string);
By: Smarter Child
Description: Logs out and terminates script according to reason.
*******************************************************************************}
Procedure Terminate(reason: string);
begin
//Proggy;
Writeln('Logging out..');
Logout;
Writeln('Termination Reason: ' + reason);
TerminateScript;
end;

Procedure Declare;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := Username;
Players[0].Pass := Password;
Players[0].Nick := Nick;
Players[0].Active := True;
end;

{*******************************************************************************
function ColorArrow: integer;
By: Smarter Child
Description: Autocolors ground arrows in fight caves.
*******************************************************************************}
Function ColorArrow: integer;
var
ArrowColor, rx, ry, HGC, i, r, g, b: integer;
GC: TIntegerArray;
dTPA: TPointArray;
H, S, L: Extended;
x, y, z: extended;
begin
ArrowColor := 990081;
// Writeln('Original Color := ' + IntToStr(ArrowColor)); Was only for testing purposes.
rx := MSCX;
ry := MSCY; //Declares the "r" variable to the center of the main screen.
FindColorsSpiralTolerance(rx, ry, dTPA, ArrowColor, MSX1, MSY1, MSX2, MSY2, 25);
if Length(dTPA)=0 then exit;
GC := GetColors(dTPA);
HGC := High(GC);
For i := 0 to HGC do
begin
ColorToRGB(GC[i], R, G, B);
ColorToHSL(GC[i], H, S, L);
ColorToXYZ(GC[i], X, Y, Z); //YEAH I KNOW WTF, BUT IT WORKS <3.
if (R >= 103) and (R <= 154) and (G >= 21) and (G <= 32) and (B >= 12) and (B <= 18) then
if (H >= 1.63) and (H <= 1.76) and (S >= 77.76) and (S <= 80.02) and (L >= 22.92) and (L <= 33.35) then
if (X >= 6.05) and (X <= 13.75) and (Y >= 3.53) and (Y <= 7.81) and (Z >= 0.73) and (Z <= 1.33) then
begin
Writeln('Arrow Color: ' + IntToStr(GC[i]));
Result := GC[i];
Exit;
end;
end;
end;

{*******************************************************************************
function PickupArrows: boolean;
By: Smarter Child
Description: Picks up the arrows on the ground in the fightcaves.
*******************************************************************************}
Function PickupArrows: boolean;
var
x, y: integer;
begin
if not loggedin then exit;
if PickupTheArrows = false then exit;
if FindColor(x, y, ColorArrow, MSX1, MSY1, MSX2, MSY2)then
begin
MMouse(x, y, 2, 2);
Wait(500 + Random(500));
if IsUpText('rrow')then
begin
Wait(100 + Random(300));
Case Random(3)of
0: begin
Mouse(x, y, 2, 2, false);
Wait(100 + Random(100));
if ChooseOption('ake')then
Result := true;
end;
1: begin
Mouse(x, y, 2, 2, true);
Wait(500 + Random(500));
Result := true;
end;
2: begin
HoldMouse(x, y, true);
Wait(500 + Random(750));
ReleaseMouse(x, y, true);
Result := true;
end;
end;
end;
end;
end;


{function PickupArrows: Boolean;
var
x, y, i: integer;
aTPA: T2DPointArray;
TPA: TPointArray;
begin
Result := False;
if not LoggedIn then exit;
if PickupTheArrows = false then exit;
if FindColorsSpiralTolerance(x, y, TPA, 00, MSX1, MSY1, MSX2, MSY2, 15)then
begin
writeln('col found');
aTPA := SplitTPAEx(TPA, 50, 50);
for i := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
if IsUpText('rrow') then
begin
Wait(100 + Random(200));
case Random(2) of
0: begin
Mouse(x, y, 2, 2, False);
Wait(400 + Random(200));
ChooseOption('ick');
WriteLn('picked up arrows');;
Break;
Result := true;
end;
1: begin
Mouse(x, y, 2, 2, True);
Wait(100 + Random(100));
WriteLn('picked up arrows');
Break;
Result := true;
end;
end;
end;
end;
end;
end; }

{*******************************************************************************
Function FindArrowsMS(var TPA: TPointArray): boolean;
By: Smarter Child
Description: Results true if detects Arrows on the mainscreen.
*******************************************************************************}
Function FindArrowMS(var TPA: TPointArray): boolean;
begin
Result := FindColors(TPA, ColorArrow, MSX1, MSY1, MSX2, MSY2);
end;

{*******************************************************************************
Function DoPickupArrows: boolean;
By: Smarter Child
Description: Picks up the arrows if PickupTheArrows is true.
*******************************************************************************}
Function DoPickupArrows: boolean;
var
z: integer;
TPA: TPointArray;
begin
if PickupTheArrows = false then exit;
marktime(z);
Alert('Picking up the arrows');
setangle(false);
repeat
PickupArrows;
until((not(FindArrowMS(TPA))) or (TimeFromMark(z) > 20000))
if(not(FindArrowMS(TPA))) or (TimeFromMark(z) > 20000)then
Result := true;
end;

{*******************************************************************************
Function EquipArrows(where: string): boolean;
By: Smarter Child
Description: Will equip the arrows if they are not already equipped.
*******************************************************************************}
Function EquipArrows(where: string): boolean;
var
x, y: integer;
begin
Case where of
'OutOfCave': begin
if Range = false then exit;
if(not(WearingItem(4)))then
begin
LoadDTM;
Writeln('Equipping arrows');
GameTab(tab_inv);
if FindDTM(Arrows, x, y, MIX1, MIX2, MIY1, MIY2) or FindColorTolerance(x, y, 668758, MIX1, MIY1, MIX2, MIY2, 20)then
begin
Writeln('Arrows found');
GameTab(tab_inv);
MMouse(x, y, 3, 3);
if IsupText('rrow')then
begin
Wait(500 + Random(500));
Mouse(x, y, 2, 2, true);
FreeMemory;
Result := true;
end else
if(not(FindDTM(Arrows, x, y, MIX1, MIX2, MIY1, MIY2))) or (not(FindColorTolerance(x, y, 668758, MIX1, MIY1, MIX2, MIY2, 20)))then
begin
if(not(WearingItem(4)))then
Result := false;
Writeln('Failed to equip arrows');
FreeMemory;
Terminate('No arrows');
end;
end;
end;
if WearingItem(4)then
begin
Writeln('Arrows are equipped');
Result := true;
GameTab(tab_inv);
exit;
end;
end;
'InCave': begin
if Range = false then exit;
LoadDTM;
GameTab(tab_inv);
if FindDTM(Arrows, x, y, MIX1, MIX2, MIY1, MIY2) or FindColorTolerance(x, y, 668758, MIX1, MIY1, MIX2, MIY2, 20)then
begin
writeln('Equipping Arrow In Inv');
MMouse(x, y, 2, 2);
if IsUpText('rrow')then
begin
Wait(200 + Random(200));
Mouse(x, y, 2, 2, true);
FreeMemory;
Result := true;
end else
if(not(FindDTM(Arrows, x, y, MIX1, MIX2, MIY1, MIY2))) or (not(FindColorTolerance(x, y, 668758, MIX1, MIY1, MIX2, MIY2, 20)))then
begin
writeln('No arrows - they must be equipped then');
Result := false;
exit;
end;
end;
end;
end;
end;

{*******************************************************************************
function UseSpecial: boolean;
By: Smarter Child
Description: Uses special attack.
*******************************************************************************}
Function UseSpecial: boolean;
var
TPA: TPointArray;
colx, coly: integer;
begin
if Special = false then exit;
if not (InCave) then exit;
if FindColorsTolerance(TPA, 4162877, 564, 410, 612, 444, 10)then
begin
Writeln('Special is availabe');
MouseBox(579, 421, 701, 430, 1);
if FindColorTolerance(colx, coly, 1055619, 1158, 643, 1167, 651, 10)then
begin
Writeln('used special!!');
Inc(Specials);
Result := true;
end;
end;
end;

{*******************************************************************************
function UsePrayer: boolean;
By: Smarter Child/ Idea from Harry's script
Description: Switches on prayer, idea of using if/then/else from Harry.
*******************************************************************************}
Procedure UsePrayer;
var
PrayLvl, P: integer;
PrayColor: string;
begin
if Prayer = false then exit;
if (not(InCave))then exit;
P := GetMMLevels('prayer', PrayColor);
PrayLvl := GetSkillLevel('prayer');
if PrayColor = 'Red' then exit;
Case (LowerCase(FightStyle)) of
'attack','strength','shared','defense':
begin
if PrayLvl > 3 then MouseBox(603, 231, 620, 251, 1)else//Burst of Strength
if PrayLvl > 6 then MouseBox(635, 233, 654, 249, 1)else//Clarity of Thought
if PrayLvl > 12 then MouseBox(696, 264, 623, 290, 1); //Superhuman Strength
if PrayLvl > 15 then MouseBox(632, 269, 658, 286, 1)else//Improved Reflexes
if PrayLvl > 30 then MouseBox(712, 308, 729, 324, 1)else//Ultimate Strength
if PrayLvl > 33 then MouseBox(561, 342, 582, 359, 1);//Incredible Reflexes
end;
'range':
begin
if PrayLvl > 7 then MouseBox(672, 234, 691, 249, 1)else//Sharp Eye
if PrayLvl > 25 then MouseBox(597, 305, 619, 320, 1)else//Hawk Eye
if PrayLvl > 43 then MouseBox(562, 380, 579, 396, 1);//Eagle Eye
end;
end;
end;

Function UsePotion: boolean;
var
c, x, y: integer;
begin
if(not(incave))then exit;
if Potion = false then exit;
if c >= MaxPot then exit;
LoadDtm;
if FindDTM(Pot, x, y, MIX1, MIY1, MIX2, MIY2)then
begin
Wait(500 + Random(500));
MMouse(x, y, 2, 2);
if IsUpText('otion')then
begin
wait(200 + random(600));
case random(2)of
0: begin
Mouse(x, y, 2, 2, false);
ChooseOption('rink');
Result := true;
Writeln('Drank Potion');
inc(c);
inc(potsdrank);
FreeMemory;
end;
1: begin
Mouse(x, y, 3, 3, true);
Result := true;
Writeln('Drank Potion');
inc(c);
Inc(PotsDrank);
FreeMemory;
end;
end;
end;
if(not(IsUpText('otion')))then
begin
Result := false;
FreeMemory;
C := MaxPot;
exit;
end;
end;
if(not(FindDTM(Pot, x, y, MIX1, MIY1, MIX2, MIY2)))then
begin
Result := false;
// FreeMemory;
C := MaxPot;
exit;
end;
end;

{*******************************************************************************
Procedure CBHover;
By: Smarter Child
Description: Hovers over cb skill according to your fight style.
*******************************************************************************}
Procedure CBHover;
begin
Case (LowerCase(FightStyle))of
'range': begin
Writeln('Range hover');
HoverSkill('range', false);
end;
'attack': begin
Writeln('attack hover');
HoverSkill('attack', false);
end;
'strength': begin
Writeln('Strength hover');
HoverSkill('strength', false);
end;
'defense': begin
Writeln('Defense hover');
HoverSkill('defense', false);
end;
'shared': begin
Writeln('shared hover');
Case Random(3) of
0: HoverSkill('attack', false);
1: HoverSkill('strength', false);
3: HoverSkill('defense', false);
end;
end;
end;
end;
{*******************************************************************************
Procedure RWait;
By: Smarter Child
Description: Waits random time.
*******************************************************************************}
Procedure RWait; //only a few options, so i don't use much in the script..
begin
Case Random(50) of
0..10: Wait(750 + Random(750));
11..20: Wait(865 + Random(100));
21..30: Wait(Random(750) + Random(750));
31..40: Wait(Random(1500) + Random(50));
41..50: Wait(500);
end;
end;

{*******************************************************************************
procedure sc_Play;
By: Smarter Child
Description: Antiban method.
*******************************************************************************}
Procedure sc_Play;
begin
Case Random(45) of
0: begin
SetAngle(true);
Wait(750 + Random(750));
MakeCompass(180);
Wait(200 + Random(150));
MakeCompass(1 + Random(20) - Random(20));
Wait(500 + random(600));
end;
1: begin
MakeCompass(-1 + Random(200) - RandomRange(200, Random(50)));
Wait(800 + 750 - Random(500));
SetAngle(false);
Wait(750 + Random(200));
SetAngle(true);
Wait(500 + RandomRange(200, 400));
RandomMovement;
end;
2: begin
MMouse(MSCX - Random(500), MSCY + Random(600), 50, 50);
Wait(2000 - RandomRange(500, 750));
MakeCompass(270 - Random(180) + RandomRange(20, 50));
end;
3: begin
setrun(true);
Wait(500 + Random(999));
setrun(false);
MakeCompass(-1 + Random(20) - RandomRange(15, 20));
Wait(200 + random(200));
MakeCompass(90 + Random(20) - RandomRange(5, 15));
Wait(100 - Random(50) + Random(1000));
MakeCompass('N');
end;
4: begin
// SleepAndMoveMouseSmooth(5000);
GameTab(1);
Wait(2000 - Random(500));
GameTab(2);
Wait(900 + RandomRange(200, 350));
GameTab(tab_Inv);
end;
5: begin
BoredHuman;
Wait(500 + Random(740));
RandomRClick;
end;
6,7: begin
MouseSpeed := RandomRange(10, 20);
MMouse(-303 + Random(100), 162 + RandomRange(200, 500) - Random(100), 25, 25);
Wait(500 + Random(750));
MMouse(Random(600), Random(600), 25, 25);
Wait(5000 - RandomRange(2000, 4000));
MMouse(MSCX - Random(200), MSCY - Random(300), 30, 30);
end;
8: begin
MMouse(MIX1 + Random(75) - random(25),MIX2 + RandomRange(10, 90) - Random(15), 15, 15);
Rwait;
end;
end;
end;

{*******************************************************************************
Procedure QAntiban;
By: Smarter Child
Description: Quick Antiban Method.
*******************************************************************************}
Procedure QAntiban;
begin
//r;
case Random(50) of
0..4: Boredhuman;
5..10: SleepAndMoveMouse(5000);
10..15: RandomRClick;
end;
end;

{*******************************************************************************
Procedure sc_RandomCompass
By: Smarter Child
Description: Randomly moves compass.
*******************************************************************************}
Procedure sc_RandomCompass;
begin
Writeln('Performing random compass movements');
case random(4) of
0:MakeCompass(0 + Random(90) - Random(90));
1:MakeCompass(90 + Random(180) - Random(180));
2:MakeCompass(RandomRange(0, 356));
end;
end;

{*******************************************************************************
function r_tab: boolean
By: Smarter Child
Description: Clicks any tab, then sets it back to the invetory.
*******************************************************************************}
Function r_Tab: boolean;
begin
result := GameTab(RandomRange(1, 16));
Rwait;
GameTab(tab_inv);
end;

{*******************************************************************************
Procedure AB;
By: Smarter Child
Description: Variety of Antiban methods.
*******************************************************************************}
Procedure AB;
begin
Case Random(75)of
0, 20: QAntiban;
5: sc_RandomCompass;
15: sc_Play;
30: UseSpecial;
7: CBHover;
end;
end;
{

Procedure WhileCave;
begin
Retaliate(true);
SetFightMode(SetStyle);
if EnterCave then
begin
Writeln('Performing in-cave functions...');
While InCave Do
begin
AB;
DoPickupArrows;
EquipArrows('InCave');
// UsePrayer;
//Proggy;
end;
end;
end; }

{*******************************************************************************
function HandleChat: boolean;
By: Smarter Child
Description: Handles the chat with tzhaar dude.
*******************************************************************************}
Function HandleChat: boolean;
var
czx, czy: integer;
begin
if FindColorTolerance(czx, czy, 4146314, MIX1, MIY1, MIX2, MIY2, 25) or FindBlackChatMessage('ell done') or FindBlackChatMessage('in the cave')then
begin
ClickToContinue;
Writeln('Handled chat');
Result := true;
end;
if(not(FindColorTolerance(czx, czy, 4146314, MIX1, MIY1, MIX2, MIY2, 15))) or (not(FindBlackChatMessage('ell done'))) or (not(FindBlackChatMessage('in cave')))then
begin
Writeln('No text!');
Result := false;
end;
end;

{*******************************************************************************
Procedure Sleeping;
By: Smarter Child
Description: Sleeps based on your runz in the fight caves.
*******************************************************************************}
Procedure Sleeping;
var
t, minute: integer;
begin
minute := 60000;
if runsEx >= Runz then
begin
runsEx := 0;
t := (minute*30 + RandomRange(minute*10, minute*30));
if LoggedIn then
begin
Writeln('Sleeping...');
Disguise('Sleeping..');
Players[CurrentPlayer].Active := true;
Logout;
Sleep(t);
Inc(sleeps);
LoginPlayer;
end;
end;
end;

Procedure LevelUp;
begin
if not loggedin then exit;
if not incave then exit;
if FindNPCChatText('ongratulations', Clickleft)then inc(levels);
end;

Procedure Proggy;
begin
Writeln('==========================================================');
Writeln(' FLAWLESS FIGHTCAVER ');
Writeln('==========================================================');
Writeln('+ Script has ran for: ' + TimeRunning);
Writeln('+ You have done: ' + IntToStr(runs) + ' runs in the fightcaves');
Writeln('+ Your FightStyle: ' + FightStyle);
Writeln('+ You have earned: ' + IntToStr(xTokkul) + ' tokkul');
Writeln('+ You have gained: ' + IntToStr(levels) + ' ' + FightStyle + ' levels');
Writeln('==========================================================');
Writeln('+ Thanks for using my script +');
Writeln('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++');
Writeln('++++++++++++++++++++ By Smarter Child ++++++++++++++++++++');
Writeln('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++');
end;
{
Procedure LoopIt;
begin FAIL LOOP
Case Players[CurrentPlayer].Loc of
'start': begin
Sleeping;
EquipArrows('OutOfCave');
Retaliate(True);
SetFightMode(SetStyle);
if EnterCave then
Players[CurrentPlayer].Loc := 'cave';
end;
'cave': begin
Writeln('Incave stuff..');
While InCave do
begin
DoPickupArrows;
EquipArrows('InCave');
Case Random(2) of
0: AB;
//UsePrayer;
end;
if(not(InCave))then Players[CurrentPlayer].Loc := 'handle';
end;
end;
'talk': begin
HandleChat;
Players[CurrentPlayer].Loc := 'start'
end;
end;
end;
}

Procedure Loopey;
begin
Sleeping;
EquipArrows('OutOfCave');
Retaliate(true);
if EnterCave then
begin
While InCave do
begin
LevelUp;
DoPickupArrows;
case Random(20) of
1, 5: AB;
2: UsePotion;
10: EquipArrows('InCave');
end;
if not incave then
begin
Handlechat;
Proggy;
end;
end;
end;
end;

begin
SetupSRL;
ActivateClient;
Wait(500);
Declare;
LoginPlayer;
repeat
Loopey;
until(AllPlayersInactive);
if AllPlayersInactive then Terminate('inactive');
end.

My other reflection one i released:

program fish;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}

{=========================================================================]
[ ___ ___ ]
[ / __) / __) ]
[ \__ \( (__ ]
[ (___/ \___) ]
[ ]
[ NAME : Karamja Fisher & Seller ]
[ WRITER : Smarter Child ]
[ CATEGORY : Fishing (FFA) ]
[ DESCRIPTION : Fishes Lobs/Swordies and sells them to store ]
[ USAGE : Reflection/Color ]
[ NOTES : Position players at karamja dock ]
[ CONTACT : Me @ [email]wowplayermaster@hotmail.com[/email] (mail) ]
[ MULTIPLAYER : Yes ]
[ SMART : Yes, it uses reflection, duh :P ]
[ Version : 2.0 ]
[ Status : Alpha stages ]
[=========================================================================]
[ Instructions ]
[=========================================================================]
[ 1. Have your display settings set to 32 bit TRUE color. ]
[ 2. Fill out DeclarePlayers. ]
[ (For further instructions on how to fill it out, visit this thread: ]
[ [url]http://www.villavu.com/forum/showthread.php?t=5410[/url]) ]
[ 3. Please make sure your players are at the dock ]
[ 4. Make sure you have a lobster pot or harpoon with you ]
[ 5. Start script! ]
[=========================================================================}

Const // ___
ScriptVersion = '2.0'; // Serves no purpose [-.-]
// [ U ]

var
x, y : integer;
Loads, Fishes, Lobsters, Tuna, Swordfish: integer;
DLoads, Switches: integer;

Const
LoadsB4Switch = 5; //Loads b4 switch, if your single player it will merely logout and relogin


procedure Smart; //Change Smart to how you like, if needed.
begin
Smart_Members := FALSE; //Are you on a member world? True = yes / False = no
Smart_Signed := true; //Do you wish to run RS signed? True = yes / False = no
Smart_Server := 77; //What world do you wish to run this script on [recommended world : low amount of players]
Smart_SuperDetail := false; //Do you wish to use Smart with Super Detail? True = yes / False = no
end;

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players will be used in the script
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Which player will start first?

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :=''; //Nick 3 - 4 letters in the username
Players[0].Strings[0] := 'age'; //'age' = Cage fishing(lobsters), 'arpoon' = Harpoon fish(swordies/tuna)
Players[0].Active := True; //Will it be used in the script?
{
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :=''; //Nick 3 - 4 letters in the username
Players[1].Strings[0] := 'arpoon'; //'age' = Cage fishing(lobsters), 'arpoon' = Harpoon fish(swordies)
Players[1].Active := True; //Will it be used in the script?

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :=''; //Nick 3 - 4 letters in the username
Players[2].Strings[0] := 'age'; //'age' = Cage fishing(lobsters), 'arpoon' = Harpoon fish(swordies)
Players[2].Active := True; //Will it be used in the script?

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :=''; //Nick 3 - 4 letters in the username
Players[3].Strings[0] := 'arpoon'; //'age' = Cage fishing(lobsters), 'arpoon' = Harpoon fish(swordies)
Players[3].Active := True; //Will it be used in the script?

Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :=''; //Nick 3 - 4 letters in the username
Players[4].Strings[0] := 'age'; //'age' = Cage fishing(lobsters), 'arpoon' = Harpoon fish(swordies)
Players[4].Active := True; //Will it be used in the script?

}

end;

Function SetPos(AngleOrDir: string): boolean;
begin
case AngleOrDir of
'Angle': begin
R_SetAngle(True);
Result := true;
end;
'Dir': begin
R_MakeCompass('n');
Result := true;
end;
'Both': begin
SetPos('Angle');
SetPos('Dir');
end;
end;
end;

Procedure Antiban;
begin
if not LoggedIn then Exit;
case Random(200) of
0..4:RandomRClick;
19..30:SleepAndMoveMouse(7000);
31..56:RandomRClick;
57:BoredHuman;
58..59: MakeCompass(Random(50));//HoverSkill('random',False);
60:RandomMovement;
61:Wait(1500 + Random(750));
62:begin
SetAngle(false);
Wait(Random(560 + Random(450)));
MakeCompass('W');
Wait(Random(560 + Random(450)));
SetAngle(true);
MakeCompass('N');
end;
end;
end;

Procedure RWait;
begin
Case Random(50) of
0..10: Wait(750 + Random(750));
11..20: Wait(865 + Random(100));
21..30: Wait(Random(750) + Random(750));
31..40: Wait(Random(1500) + Random(50));
41..50: Wait(500);
end;
end;

Procedure QAntiban;
begin
//r;
case Random(50) of
0..4: Boredhuman;
5..10: SleepAndMoveMouse(5000);
10..15: RandomRClick;
end;
end;
Procedure RCompass;
begin
Case Random(25)of
0: begin
Rwait;
MakeCompass('E');
RWait;
MakeCompass('N');
end;
1: begin
Rwait;
MakeCompass('S');
Rwait;
MakeCompass('N');
end;
2: begin
Rwait;
MakeCompass('W');
Rwait;
MakeCompass('N');
end;
3: begin
MakeCompass('E');
Rwait;
MakeCompass('S');
RWait;
MakeCompass('W');
Rwait;
RWait;
MakeCompass('N');
end;
end;
end;
{
Procedure RAngle;
begin
Case Random(2) of
0:
}

function DockPath: TPointArray;
begin
Result := [Point(2906, 3149), Point(2907, 3150), Point(2908, 3151),
Point(2911, 3152), Point(2913, 3154), Point(2914, 3155),
Point(2916, 3157), Point(2918, 3160), Point(2919, 3162),
Point(2920, 3165), Point(2922, 3168), Point(2922, 3170),
Point(2923, 3173), Point(2924, 3176), Point(2924, 3179)];
end;

function ShopPath: TPointArray;
begin
Result := [Point(2924, 3174), Point(2922, 3171), Point(2921, 3169),
Point(2919, 3167), Point(2917, 3166), Point(2916, 3164),
Point(2915, 3162), Point(2915, 3160), Point(2914, 3157),
Point(2914, 3155), Point(2914, 3152), Point(2911, 3151),
Point(2908, 3149), Point(2906, 3148)];
end;
{
Procedure DebugPath(Path: TPointArray);
var s: string;
begin
s := tPtArrayToStrEx(Path, ', ');
Writeln('Loading Tile - ' + S);
end;
}

Procedure CountFish;
begin
Lobsters := Lobsters + R_CountItems(378);
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] + R_CountItems(378);//lobbies per player
Tuna := Tuna + R_CountItems(360); //o
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[3] + R_CountItems(360);//tuna per player
Swordfish := Swordfish + R_CountItems(372);
Players[CurrentPlayer].Integers[4] := Players[currentplayer].integers[4] + R_CountItems(372);//swordies per player
Fishes := Lobsters + Tuna + Swordfish;
end;

{*******************************************************************************
function CutDownPath(Path: TPointArray; Index : Integer) : TPointArray;
By: Tad
Description: Cuts down a TPointArray so only tiles after the Index and on the MM
are left in the result.
*******************************************************************************}

function CutDownPath(Path: TPointArray; Index : Integer) : TPointArray;
var
i, Size, j : integer;
begin
Size := 0;
for i:=Index+1 to High(Path) do
if TileOnMM(Path[i]) then
Inc(Size)
else
break;
SetArrayLength(result, Size);
j := 0;
for i:=Index+1 to High(Path) do
if TileOnMM(Path[i]) then
begin
result[j] := Path[i];
Inc(j);
if j > High(result) then exit;
end else
break;
end;

{*******************************************************************************
function DistMore(Tiles: TPointArray; MinDist: Integer): TPointArray;
By: Tad
Description: Returns a TPointArray taken from Tiles that contains the TPoints
that are further away than MinDist.
*******************************************************************************}

function DistMore(Tiles: TPointArray; MinDist: Integer): TPointArray;
var
i, j, Size: integer;
begin
for i:=0 to High(Tiles) do
if DistanceFrom(Tiles[i]) > MinDist then
Inc(Size);
SetArrayLength(result, Size);
j := 0;
for i:=0 to High(Tiles) do
if DistanceFrom(Tiles[i]) > MinDist then
begin
result[j] := Tiles[i];
Inc(j);
end;
end;

{*******************************************************************************
function NextGoodTile(Path: TPointArray; CurIndex: Integer; var NTile: TPoint): boolean;
By: Tad
Description: Puts a random, clickable, yet efficient (more than 3 tiles away,
if possible) tile into NTile and returns whether a suitable tile was found.
*******************************************************************************}

function NextGoodTile(Path: TPointArray; CurIndex: Integer; var NTile: TPoint): boolean;
var
i : integer;
AvailTiles, PosTiles : TPointArray;
begin
result := false;
if TileOnMM(Path[High(Path)]) then
begin
result := true;
NTile := Path[High(Path)];
end;
AvailTiles := CutDownPath(Path, CurIndex);
if GetArrayLength(AvailTiles) = 0 then Exit;
result := true;
for i:=8 downto 3 do
begin
PosTiles := DistMore(AvailTiles, i);
if GetArrayLength(PosTiles) <> 0 then break;
end;
if GetArrayLength(PosTiles) <> 0 then
NTile := PosTiles[random(GetArrayLength(PosTiles))]
else
NTile := AvailTiles[random(GetArrayLength(AvailTiles))];
end;

{*******************************************************************************
function R_WalkPath(Path: TPointArray; Randomness: Integer): boolean;
By: Tad
Description: Walks a path of tiles stores in Path
*******************************************************************************}

function R_WalkPath(Path: TPointArray; Randomness: Integer): boolean;
var
i, t, l, fails: integer;
NTile, D : TPoint;
begin
NTile := NextTile(Path, 10);
i := TileToIndex(NTile, Path);
fails := 0;
l := GetSystemTime;
while (i < High(Path)) and (fails < 20) do
begin
// AntiRandoms;
if (Path[i].x = Path[i+1].x) and (Path[i].y = Path[i+1].y) then
begin
Inc(i);
Continue;
end;
t := GetSystemTime;
while not (NextGoodTile(Path, i, NTile)) and (GetSystemTime - t < 20000) do
wait(200+random(100));
if NextGoodTile(Path, i, NTile) then
if WalkToTile(NTile, Randomness, 17+random(10)) then
i := TileToIndex(NTile, Path)
else
Inc(fails)
else
Inc(fails);
end;
result := fails < 20;
if result then
begin
MarkTime(t);
if not GetFlag(D) then Exit;
repeat
if not GetFlag(D) then break;
if DistanceFrom(D) < 2 then break;
if not CharacterMoving then break;
until(TimeFromMark(t) > 30000);
end;
end;



Function Fish: boolean;
Var
FS: TNPC;
FishingSpot: TPoint;
begin
GameTab(tab_inv);
SetPos('Both');
if FindNPC(324, FS)then
begin
{ if(not(TileOnMS(FS.Tile, 0)))then
Writeln('Walking to fishing spot');
WalkToTile(FS.Tile, 1, 0);
} FishingSpot := TileToMS(FS.Tile, 0);
Wait(500 + Random(200));
MMouse(FishingSpot.x, FishingSpot.y, 3, 3);
Wait(199 + RandomRange(100, 400));
if IsUpText('ishing')then
begin
GetMousePos(FishingSpot.x, FishingSpot.y);
Mouse(FishingSpot.X, FishingSpot.Y, 3, 3, False);
Wait(100 + Random(50));
R_ChooseOption(Players[CurrentPlayer].Strings[0]);
if CharacterAnimating Then
begin
Antiban;
Disguise('Fishing...');
Result := True;
end else
Wait(5000);
if(not(TileOnMS(FS.Tile, 0))) and (not(CharacterAnimating))then
Wait(6);
Result := false;
{ Result := False;
Nextplayer(false);
Exit;}
end;
end; ///532, 533
end;

Function FindSK: boolean;
Var
sK: TNPC;
STile: TPoint;
begin
if FindNPC(532, SK) or FindNPC(533, SK)then
begin
Writeln('SK found');
STile := TileToMS(SK.Tile, 104)
Rwait;
MMouse(STile.X - 5, STile.y, 2, 2);
if R_IsupText('Shop')then
begin
Wait(100 + Random(60));
Mouse(STile.X, STile.Y, 1, 1, false);
Wait(100 + Random(100));
if r_chooseoption('rade')then
begin
Writeln('Shop = vaild');
result := true;
end;
end;
end;
end;
//Quick fix :P
Function ValidateShopScreen: boolean;
begin
MouseSpeed := 25;
repeat
FindSK;
until(FindColorTolerance(x, y, 2070783, MSX1, MSY1, MSX2, MSY2, 15));
if FindColorTolerance(x, y, 2070783, MSX1, MSY1, MSX2, MSY2, 15)then
begin
MouseSpeed := 15;
Writeln('success');
result := true;
end;
//Exit;
end;

Procedure SellFish;
Var { Lobster = 377 / Tuna = 359 / Sworfish = 371 }
ItemSlots: TIntegerArray;
Sell: string;
begin
Sell := 'ell 50'; //change
Disguise('Selling..');
if ValidateShopScreen then
begin
repeat
if InventoryContainsMulti([378, 360, 372], ItemSlots)then
begin
MouseItem(ItemSlots[0], false);
RWait;
r_ChooseOption(Sell);
end;
until((not(InventoryContainsMulti([378, 360, 372], ItemSlots))));
if(not(InventoryContainsMulti([378, 360, 372], ItemSlots)))then Exit;
CloseBank;
end;
end;

Function WhilstFishing: boolean; //Also carries out the Fish function.
var
Tries: integer;
begin
Tries := 0;
Fish;
repeat
if CharacterAnimating then
Case Random(72)of
7, 65: Antiban;
1, 4: QAntiban;
2..4: RCompass;
// 0: if Random(6) = 3 then RAngle;
end;
wait(500);
until(not(CharacterAnimating));
repeat
if(not(CharacterAnimating))then
begin
Fish;
Inc(Tries);
end;
until(InvFull or CharacterAnimating);
if InvFull then
begin
Inc(Loads);
Inc(Players[CurrentPlayer].Integers[5]);
Inc(Players[CurrentPlayer].Integers[6]);
Exit;
end;
{ if Tries >= 900000 then
begin
Writeln('Fishing Failed, next player');
Nextplayer(False);
Result := False;
Exit; }
end;

Procedure Proggy;
var
i : integer;
begin
// CountFish;
Writeln('|==============================================================|');
Writeln('|+-------------------Made By: Smarter Child----------------- +|');
Writeln('|'+ Padl('Script has ran for: ', 34) + TimeRunning + Padl('|', 20));
Writeln('|'+ Padl('Script has done: ', 31) + IntToStr(loads) + ' loads'+ Padl('|', 25));
Writeln('|'+ Padl('Script has caught: ', 33) + IntToStr(Fishes) + ' fish' + Padl('|', 24));
Writeln('|'+ Padl('Script has switched: ', 45) + IntToStr(Switches) + ' times' + Padl('|', 23));
Writeln('|--------------------------------------------------------------|');
for i:=0 to High(Players) do
Writeln('| ' + Players[i].Nick + ': Done: ' + IntToStr(Players[i].Integers[5]) + ' loads, Caught: ' + IntToStr(Players[i].Integers[3]) + ' Tuna, ' + IntToStr(Players[i].Integers[2]) + ' Lobsters, ' + IntToStr(Players[i].Integers[4]) + ' Swordies ' + Padl('|', 4));
Writeln('|--------------------------------------------------------------|');
Writeln('| Post all proggies/comments/suggestions/bugs on script thread |');
Writeln('|==============================================================|');
end;

Procedure Switch;
var minute: integer;
begin
if Players[CurrentPlayer].Integers[6] >= LoadsB4Switch then
begin
Writeln('Loads >= to complete');
Players[CurrentPlayer].Active := true;
Logout;
Minute := 60000;
Sleep(Minute*5 + RandomRange(Minute*2, Minute*10));
Inc(Switches);
Dec(Players[CurrentPlayer].Integers[6]);
NextPlayer(True);
end;
end;

Procedure Terminate;
begin
if AllPlayersInactive then
begin
Writeln('Terminating...');
Writeln('Reason: All players inactive');
if LoggedIn then Logout;
Proggy;
TerminateScript;
end;
end;

Procedure Loop;
begin
Players[CurrentPlayer].Integers[6] := 0;
SetPos('Both');
if(not(InvFull)) then WhilstFishing;
if InvFull then
begin
CountFish;
Proggy;
R_WalkPath(ShopPath, 2);
// WalkToTile(Point(2907, 3148), 1, 0);
if isidle then
begin
SellFish;
MouseSpeed := 15;
Proggy;
R_WalkPath(DockPath, 2);
Switch;
end;
end;
end;


BEGIN
Smart;
SetupSRL;
SetupReflection;
DeclarePlayers;
LoginPlayer;
repeat
Loop;
until(AllPlayersInactive);
Terminate;
END.

I just posted both, but if one of them look crappy, please don't let it make your vote biased.

Thanks~

~Smarter Child

Edit: Sorry about the bad looking instruction box at top of script. IDK what happened :confused:

Edit2: Forgot to credit Tad for his wonderful reflection walking functions. So credits to Tad for that~ :D

JPHamlett

2009-08-29 03:19:54


{*******************************************************************************
function InCave: boolean;
By: Smarter Child
Description: Detects if you are in the fight caves, can be a little laggy :P.
*******************************************************************************}
Function InCave: boolean;
var sx, sy: integer;
begin
SymbolAccuracy := 0.8;
Result := (not(FindSymbol(sx, sy, 'bank')))or
(not(FindSymbol(sx, sy, 'minigame')))
end;
if someone stands on the symbol that wont work

other than that i cant really see anything in your color script granted i skimmed through it

Yes from me

mormonman

2009-08-29 03:31:20

Yes. I like you, reflection, and your cave script. Maybe make the cave script multiplayer, its not that hard, Harry was just too lazy.

Smarter Child

2009-08-29 03:32:46

From: mormonman
Yes. I like you, reflection, and your cave script. Maybe make the cave script multiplayer, its not that hard, Harry was just too lazy.


I could, i just didn't think people would really need it, and i eventually get lazy :p

Edit: And thanks~

Awkwardsaw

2009-08-29 03:46:13

i also vote yes. :)

noidea

2009-08-29 03:53:59

I have seen you since you joined. I think you have grown alot (Scripting wise, and maturity wise)
I say yes.

Smarter Child

2009-08-29 03:57:26

From: noidea
I have seen you since you joined. I think you have grown alot (Scripting wise, and maturity wise)
I say yes.


Yup, this was my first application : http://www.villavu.com/forum/showthread.php?t=40903

I still remember you saying no, and i am grateful, otherwise if i got in (LOL) i'd be ub3r noob, and then i was more in it for the scripts :p. Now i just want to become more advanced, and move up in this community.

noidea

2009-08-29 04:02:37

From: Smarter Child
Yup, this was my first application : http://www.villavu.com/forum/showthread.php?t=40903

I still remember you saying no, and i am grateful, otherwise if i got in (LOL) i'd be ub3r noob, and then i was more in it for the scripts :p. Now i just want to become more advanced, and move up in this community.


I think I'm in love.

Lance

2009-08-29 04:45:11

SC was my teacher, alot of stuff i know is due to him :]
You deffinatly deserve srl members imo, and your a good scripter. I voted yes x]

mixster

2009-08-29 04:59:27

FindBanker
rx/ry are redundant. Looks like someone else was helping you with it, would be interesting to know how much.
Also low tolerance on the FindColor and you don't use an else for no reason.
You also reset the CTS and Mods twice despite being able to do it at the end to reduce duplicate code.
Seems like lack of failsafe, but they may be in the proc/func that uses it.

CountTokkul
The presence of a global variable being assigned and the result being assigned to it makes me think one of them is redundant. Either the code could just access xTokkul or it could just use the result, but I see no reason why both.

InCave
As kinda said above, high symbol accuracy means that it's likely to return false positive. Using something inside the cave rather than just what is not there would be a wiser idea too I believe.

EnterCave
You don't have failsafes if the FindColor's fail, you just exit.
Would make more sense to do
if (Length(tpa) = 0) or (length(temptpa) = 0)) then
eixt;
but even more sense to do
TPAs := CombineTPA(tempTPA, TPA);
if (length(TPAs) = 0) then
exit;
I would say that 6, 6 random for you MMouse is probably a bit high and may mean you end up missing it a few times.
Wait's with random should have a minimum value, especially when the next thing needs time before it comes up. If both randoms return a low number, it's possible the UpText would not appear properly yet and false negative returned (people do have problems with this).
I then am unsure as to how your next bit is supposed to be laid out - you have an if, but no begin & end when I think you want one, but the lack of indenting doesn't help show what you mean.
At the end, you then how those couples of FindColors and I don't see the point in them - you exit'd if you were successful, so this means you weren't and once again you don't have a begin & end or indenting to show what you mean, so Inc(entrytries); will always be run anyway if it gets there as will (the pointless as it's the last command) exit.

ColorArrow
The pointless rx, ry have returned! Using them instead of MSCX and MSCY makes no sense here, but it leads me to believe you originally didn't have FindColors and just FindColor, so that gives you some excuse, but it should have been picked up.
Glad to see some common sense when TPA length checking here though the lack of failsafe makes me die a little inside.
The RGB/HSL/XYZ checks could be cleared up a bit if there's a version of InRange that allows extendeds, but the RGB checks at least could be.

PickedUpArrows
Using ColorArrow like that makes me die a little inside again. Global variable that is updated when the FindColor fails would be a much better idea to reduce the times ColorArrow is run. Also, very disappointed at the half-hearted object finding here compared to else where in the script. You don't even use a spiral search, so it could just end up avoiding nearby ones :(
Your commented out version looks much sexier and I am unsure why you did not fix it up :(

FindArrowMS
Another place where a global arrow colour variable could be used. What's more, is you don't appear to use the TPA, so just using FindColor would work. Not only that, but you could just do a check on if the ColorArrow returns 0, as it can only return a colour when there are arrows on screen.

DoPickupArrows
Silly coding again. You can just do Result := TimeFromMark(z) < 20000; as the other bit is redundant - if you can't find any arrows, then you can't say that means you didn't find any and pick them up. The best indicator would probably be the timer. The exception being if you made it repeat the procedure until false, which would mean that there are no more arrows, but I don't think you would have.

EquipArrows
Oh DTM's, they're meant to be global if you often use them… Making it so that it only loads the archery related DTM's then only frees if they were loaded and then doing that at the beginning and end makes so much more sense and reduces the chance of error drastically. I think you at least a managed to catch all the needed frees in this case though minus one.
You once again don't use else here -
"if(not(WearingItem(4)))then"
"if WearingItem(4)then"
Your indenting also goes a bit off, reducing readability a lot.
You now, despite your goodness before, miss a place where the DTM's are freed in the little bit right at the end of the function, so memory leak it be. It also seems to make little to no sense at the end - I honestly can't see what it's doing.

UseSpecial
Unsure about this one, but if the special is limited to being set off from a certain tab, you do not do the required check or tab change, but may be wrong.

UsePotion
The madness has returned!
" if c >= MaxPot then exit;"
c is a local variable, so unless MaxPotion is 0 or negative, it will always be true.
You once again do not use an else and this is a problem now. UsePotion should return false negatives since you should be able to find the potion DTM, then the UpText should be fine, then you drink it and the UpText goes. Now you come up to "if(not(IsUpText('otion')))then" which returns true since you drank the potion, so it's gone (well, sometimes). This means that false false is returned, FreeMemory should throw an access violation since you already freed the DTM's and you reassign C, which is pointless as it's a local variable as mentioned earlier.
Anyway, you then also have a memory leak in that if you can't find the DTM, you don't free it. Also, due to the above stuff, it should always give an access violation if you had a potion because it will find it. drink it, free the DTM, then try to find it again as you don't exit or reload.

You then go on with a few hundred lines of anti-ban and unimportant code I does not feel like trawling through right now after that failure of potion drinking.

I would also like to know how long the script is minus the commented out stuff, procedure/function descriptions and the anti-ban.


The reflection script doesn't look worth any time tbh. It seems small and as Tad did most of the walking related stuff, which I would say must be the larger part of what the script does, it shouldn't be really be there - even if you say you did a lot, a good quarter of the code is that and it looks like it's the most advanced stuff there.

Edit:
From: noidea
I think I'm in love.

First RM, now you having affairs…

Smarter Child

2009-08-29 05:54:21

*sigh*, mixster. You probably haven't seen the fight caves have you? There is no rock or anything with a different color on the minimap, to pinpoint where i am. My best option was using symbols, and i will change the symbol accuracy. J_Pizzle already pointed that out. What's wrong with antiban? Last time i checked, antiban was a good feature in a script ;). Do my standards have anything to do with how well the script runs? plus i have some form of standards, im not perfect mixster My useless rx/ry variables are redundant, but so what? I will changed them though. Why would i do DoPickUpArrows until false?, what if there was an arrow on the ground too hard to see? The fight cave grounds are very dark, and so are arrows, this is one of the reasons i wrote a auto color function for them. For my xyz/hsl/rgb values i used <, > symbols which works just as fine and look neater in my point of view.

You have a lot of good pointers, and i am glad you posted, i will get started on working on these minor flaws which have become a "pain" towards you.

Thanks~

Edit: The reflection script, originally had my own walking. I found tad's walking to be a bit better, so i used them in my script. If you want to see my previous walk function. I will be more than glad to show it to you.

ZephyrsFury

2009-08-29 06:15:18

Yes from me, been wanting to see you as SRL Mem for a while now. :)

Coh3n

2009-08-29 07:09:45

I'm definitely voting yes. Although I don't feel your scripts are outstanding, I have seen much worse candidates been accepted into SRL Members, and your attitude couldn't be better, especially for such a young kid.

I don't doubt it for a minute that you'll become much more advanced in scripting, and you'll release some really nice scripts. Mixster pointed out a lot of good things. The only thing I want to emphasize on, is standards. Yours aren't bad from what I can see, but they could better. I absolutely HATE reading code with bad standards, and I know I'm not the only one. I'm sure I don't have to lecture you on the benefits of having good standards, so I'll shut up now. :p

I'll be surprised if you don't get in, so congratulations in advanced. :)

Coh3n

Smarter Child

2009-08-29 07:44:08

Yay, thanks for the support everyone.

cycrosism

2009-08-29 10:40:04

Voted no because of what you have said to me in the past.

Link to post: http://www.villavu.com/forum/showpost.php?p=551869&postcount=33

Rich

2009-08-29 12:25:47

From: cycrosism
Voted no because of what you have said to me in the past.

Link to post: http://www.villavu.com/forum/showpost.php?p=551869&postcount=33


That's just lame…You can't vote "no" just because someone said something not nice to you. The script's are great, and you deserve to be an SRL Member. Ignore what Cycrosism says, and don't start flaming him for your own sake.

Richard.

rogeruk

2009-08-29 14:43:40

Smarter Child,

Your scripts look good, but they do need work. Your reflection fisher has only a 2 hour progress report i believe?

Standards needs work on too as pointed out.

I know this is picky but whats up with the commented out parts of the script? Should be clean and tidy (apart from declareplayers bit)

Remember that being an SRL Member you need to show great attitude towards everyone on the forums and not be cursing.

Overall good job.

Yes from me

Sir R. M8gic1an

2009-08-29 14:45:09

Definitely.

~RM

Laimonas171

2009-08-29 15:01:39

Yes. From Me. nice scripts. Also you are pretty active on forums.!I dont know why you still Jr. Mem. .. Good job. and Good luck.

~Laimonas171

Kave

2009-08-29 16:21:30

From: cycrosism
Voted no because of what you have said to me in the past.

Link to post: http://www.villavu.com/forum/showpost.php?p=551869&postcount=33


one post isnt exactly bad when you see his helpful posts (Already voted yes)

mixster

2009-08-29 17:54:27

From: Smarter Child
*sigh*, mixster. You probably haven't seen the fight caves have you? There is no rock or anything with a different color on the minimap, to pinpoint where i am. My best option was using symbols, and i will change the symbol accuracy. J_Pizzle already pointed that out. What's wrong with antiban? Last time i checked, antiban was a good feature in a script ;). Do my standards have anything to do with how well the script runs? plus i have some form of standards, im not perfect mixster My useless rx/ry variables are redundant, but so what? I will changed them though. Why would i do DoPickUpArrows until false?, what if there was an arrow on the ground too hard to see? The fight cave grounds are very dark, and so are arrows, this is one of the reasons i wrote a auto color function for them. For my xyz/hsl/rgb values i used <, > symbols which works just as fine and look neater in my point of view.

You have a lot of good pointers, and i am glad you posted, i will get started on working on these minor flaws which have become a "pain" towards you.

Thanks~

Edit: The reflection script, originally had my own walking. I found tad's walking to be a bit better, so i used them in my script. If you want to see my previous walk function. I will be more than glad to show it to you.


I have not seen the fight caves, but I do feel purely based on what is not there is foolish. Say for example you misclicked away from the entrance area just far enough so that symbols were not seen - the script would think InCaves and so on and so forth.

No problem with the anti-ban, but to me it looks repetitititititititive and as though it could be shortened if I wanted to read through it all. Not to mention it looks like it makes up a good chunk of the script with little complex coding involved.

Your standards may not affect how it runs, but you have some bits where it looks like you were supposed to use begin and end's after if's, but the lack of any indentation afterwards makes me unsure as to whether or not it is. From the surrounding code, it looks like it should be, but it's hard to say.

rx/ry are just an example. I don't know about you, but I put pride in my scripts and I ensure that there is no or as little redundancy as possible in the final version. It is not so much their presence, but that by reading through your own script as carefully as I did would show that they were unneeded.

The DoPickUpArrows until false was one of the ways I thought you may have used it as 20 seconds doesn't seem like quite enough time to pickup multiple amounts of arrows. Either way, my point about silly code still stands as if it were able to break out of the repeat loop, then the if would have to be true every time as it takes the same input as the until() does, so it would always return true, which is fine, but the silly if is silly.

Regarding the autocolouring, it was just a suggestion from me and it is fine as is.

Oh, and I'm surprised you think the potion memory leak is a minor flaw. I am unsure if you have run it, but I am very confident that if you included potion drinking, you would eventually get a memory access violation.

All the other "minor flaws" are what make your "flawless fightcaver" far from flawless, so I don't think you have any ground to stand on by making them seem insignificant.

Second to lastly, I don't think I want to see the reflection walking as it wouldn't really help anyway, I have already voted no and I have more than enough reasons to support it.

My final point is that this script pretty much has no failsafes, no multiplayer, relatively little walking and does need a good bit of work to fix it up. Count yourself lucky your reputation has been pulling you through or people haven't been bothering to read the script too closely.

Smarter Child

2009-08-29 21:54:19

From: cycrosism
Voted no because of what you have said to me in the past.

Link to post: http://www.villavu.com/forum/showpost.php?p=551869&postcount=33


I am sorry, i have a bit of temper at times.


@mixster: yes i rushed this script to apply, i should have taken more time to fix these things. The potion use was new and i added right before i applied, never had the complete chance to check through it. Hmm i have a good reputation then ? :p.

bugger0001

2009-08-29 22:35:22

Ok, the scripts you posted aren't the best, but I think they're better than a few ones I've seen accepted here plus I like your attitude. Hence my vote is a YES!

Laur€ns

2009-08-29 23:07:05

Big yes from me. Keep up the good work.

-Laurens.

Also, welcome in advance :p

Rubix

2009-08-30 00:06:29

Yes.

Janilabo

2009-08-30 02:26:26

Definitely worth a yes! ;)

Sir R. M8gic1an

2009-08-30 23:58:34

Welcome to Jah People :)

~RM