SRL Archive - Archive

caustic - SRL Member Application


BKNYKavkaz

2009-05-10 20:08:14

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


Are you affilated in anyway with Jagex LTD?
no

Were you Referred to SRL?



What is your general programming knowledge?
a little c++, barely any vb, and pretty good in delphi


Are you a member of any other communities?
unkn0wn.ws (is down right now for legality issues, its a hacking forum), project-7.net (im a mod there, its down right now from dos and ddos), darkresistance.net (its a gaming clan)


Tell us about yourself…
From: caustic
Well, i live in brooklyn, new york. i go to brooklyn tech which is on the top 30 list of best high schools in USA. i get a lot of pressure from friends, family, school and my getaway is my computer and a nice fat joint. it kinda just takes all the stress away from me and im just chillin. i love it and ill never quit it, at the same time im not obsessive with it and play 24/7, i have a life. I love UFC, football, and ice hockey. I am really good and math and logic, even ap calculus is a breeze for me naturally. Im very open minded and am willing to help anyone, im very good at philosophy and psychology so i can relate to many people even if i was never in there shoes. To be honest i dont even know what more to tell you lol. If you interesting in knowing anything else, just ask me.



Please show us one (or multiple) of your scripts.
Well, i am still writing my maple chopper in seers but i lost my member shipand my paypal is limited right now so i cant code for like a week. So i thought meanwhile, why not apply with my script that i got 24 hour proggies on. So here it is…


{=========================================================================|
| ~Caustic's Willow ChoBank~ |
| ~Version: 1.03~ |
|=========================================================================|
|-Description: |
| ~SMART if set True |
| ~Willow chopper and banker |
| ~Unbelievble Failsafes |
| ~Instant TreeFinding |
| ~Awesome Anti-Randoms |
| ~Anti-Ban |
| ~Anti-Leaching |
| ~Support for multiple players |
| ~Birds nest finder |
| ~SRL Stats reports and support(Please sign up at stats.srl-forums.com)|
|-------------------------------------------------------------------------|
|-Instructions: |
| 1. Start logged out |
| 2. If not using SMART use low detail |
| 6. All players must start in bank. |
| 7. Setup |
|-------------------------------------------------------------------------|
|-Next Versions: |
| ~AutoRespond |
| ~Support for seers maple and yew banking |
| ~Powerchopping option |
| ~World Switcher |
| ~Will basically listen to suggestions until perfection |
| ~Keep an eye out, I will constantly update the script |
|=========================================================================}

program FirstScript;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.Include SRL/SRL/Misc/Users.Scar}
//----------------------------SETUP---------------------------------------------
const
YourSRLId = '65h45';
YourSRLpass = '56h7456';


var
x, y, rx, ry, ST, Start, LoadsToDo, Banked, Chopped,
t, Tri, Ents, RockColor, xp: Integer;


procedure PlayerForm;
begin
SRLPlayerForm(True, ['Is Axe Wielded?', 'Smart'], ['Bank Pin', 'Loads to do before nextplayer'], ['Lampskill'], []);
end;


procedure SetupScript;
begin
SetupSRL;
ScriptID := '814';
SRLID := YourSRLId;
SRLPassword := YourSRLPass;
//MouseSpeed:= Speed;
ClearDebug;
end;

procedure Talk;
begin
{case Smart of
True: Sendkeys('woodcuttinglevels?');
False: Addmistakes('woodcuttinglevels?', 20);
end; }
end;

function SearchBirdsNest: Boolean; //original by Deathscytex modified by caustic

var
CTS, I, X, Y: Integer;
NestATPA: T2DPointArray;
NestTPA: TPointArray;
Nest: TPoint;
Timer: LongInt;

begin
if (FindText(x, y, 'nest falls', SmallChars, 0, 400, 495, 460)) then
begin
MarkTime(Timer);
repeat
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
X := MSCX;
Y := MSCY;
FindColorsSpiralTolerance(X, Y, NestTPA, 3952984, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 15);
NestATPA := TPAtoATPAEx(NestTPA, 5, 5);
for I := 0 to Length(NestATPA) - 1 do
begin
if (TimeFromMark(Timer) >= (10000)) then
Exit;
Nest := MIddleTPA(NestATPA[I]);
X := 0;
Y := 0;
MMouse(Nest.X, Nest.Y, 5, 5);
Wait(250);
if (IsUpText('ird')) then
begin
Mouse(Nest.X, Nest.Y, 5, 5, True);
Result := True;
Wait(250 + Random(150));
Exit;
end;
end;
until (TimeFromMark(Timer) >= (10000)) or (Result);
Exit;
end else
Exit;
end;

procedure AntiBan;
//-------------------------------AntiBan------------------------------------
begin
if (not (LoggedIn)) then Exit;
case Random(50) of
2, 15: RandomRClick;
// 3: talk;
4, 16: PickUpMouse;
5, 17: HoverSkill('random', False);
6: RandomMovement;
7: BoredHuman;
end;
end;


procedure CheckEnt;

var
ix, iy: integer;
//------------------------------- Simple Ent checker-------------------------------------
begin
if FindColorTolerance(ix, iy, 388075, 85, 15, 115, 15, 30) then
begin
WriteLn('Advoiding Ent');
Ents := Ents + 1;
Mouse(626, 63, 2, 2, true);
Wait(7000 + random(2500));
Mouse(629, 67, 2, 2, true);
WriteLn('Ent Advoided');
end
else Exit;
end;


procedure AntiRandoms;
//------------------------------- AntiRandom-------------------------------------
begin
FindNormalRandoms;
FindLamp('' + Players[CurrentPlayer].strings[0] + '');
SearchBirdsNest;
{ if (FindFight) then
begin
MakeCompass('N');
RunTo('N', True);
RunAway('S', true, 3, (7000+random(3000)));
end; }
end;

procedure PlayerStats;
//-------------------------------Reports player status-------------------------------
var
Active: string;
i: Integer;

begin
Writeln(' ');
WriteLn('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
for I := 0 to HowManyPlayers - 1 do
begin
if Players[i].Active = True then Active := 'True' else Active := 'False';
WriteLn('< ' + Inttostr(I) + ' : ' + Players[i].Name + ' = ' + Active);
end;
WriteLn('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
end;


procedure ProgressReport;
//-------------------------------Reports Progress?-------------------------------
var
Mins: Longint;

begin
ClearDebug;
ClearReport;
SRLRandomsReport;
Mins := (GetSystemTime - ST) div 1000 div 60;
PlayerStats;
Writeln('[-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=]');
Writeln('| Caustics Willow ChoBank V1 |');
Writeln('| ' + TimeRunning + ' |');
Writeln('| Chopped: ' + IntToStr(Chopped) + ' Willows. |');
Writeln('| Banked: ' + IntToStr(Banked) + ' times. |');
Writeln('| Ents avoided.' + IntToStr(Ents) + ' |');
Writeln('| Total xp gained ' + IntToStr(Chopped * 65) + ' |');
Writeln('[-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=]');
end;

procedure Hold;
begin
MMouse(rx, ry, 10, 10);
repeat
t := t + 1;
if (t = 8) then Break;
// if InChat('Woodcut') or InChat('Wc') then SayCurrentLevels('Woodcutting');
Antirandoms;
Wait(1000);
Antiban;
Wait(1000 + random(500));
until not isuptext('hop') or invfull;
end;

procedure Chop;
//-------------------------------Chops willows-------------------------------
var
Times, WillowTree: Integer;

begin
{TheColor:=1517860;
TheColor1:=2594433;
TheColor2:=6326170; }
Marktime(Times);
Status('AutoColoring...');
// WillowTree := BitmapFromString(5, 5, 'beNqLs4oJNYEgVwd1IEqK' +
// 'toAgX3cdIIJzgSjQWy8nxS4tzgqCQv0M8tPtgQgqAgBLzRcE');
// TheColor := AutoColorThis(WillowTree, 50, MSX1, MSY1, MSX2, MSY2);
repeat
Status('Chopping...');
if FindObjTPA(rx, ry, 8105880, 15, -1, 10, 10, 1, ['hop', 'illow']) then
// if FindObjEx(rx, ry, ['hop','illow'], [8240044, 2178094, 2110520], 10, 40, MSX1, MSY1, MSX2, MSY2) then
begin
case Random(3) of
0, 2: begin
Mouse(rx, ry, 2, 2, true);
AntiRandoms;
Wait(4000 + random(500));
hold;
end;
1: begin
Mouse(rx, ry, 2, 2, false);
Wait(150 + random(250));
ChooseOption('hop');
MMouse(rx, ry, 5, 5);
AntiRandoms;
wait(4000+random(500));
hold;
end;
end;
if IsupText('hop') then Hold;
t := 0;
end;
until (InvFull) or (TimeFromMark(times) > 450000);
//FreeBitmap(WillowTree);
end;



procedure RuNoob;
//------------------------------- checks if ur a noob-------------------------------
begin
GetCombatLevel;
if (GetCombatLevel < 16) then
begin
WriteLn('Lvl 3 normal clothes froob');
NextPlayer(False);
end;
if (GetCombatLevel > 15) then
begin
WriteLn('Thx lvling player to and being a true macroer ;)');
end;
end;



procedure ShutDownPC;
//--------------Shuts down Computer------ Credits Hy71194---Fixed by Caustic---------------
begin
{ if (ShutDown = False) then
TerminateScript;
if (ShutDown = True) then
begin
WriteLn('');
WriteLn('Shutting down your PC.');
WriteLn('To stop it once it starts counting, go to Start, Run, then type ''shutdown -a''');
Wait(2000);
KeyDown(92);
Wait(200);
KeyDown(82);
Wait(200);
KeyUp(82);
Wait(200);
KeyUp(92);
Wait(2000);
SendKeys('shutdown -s -f -t 80 -c "Thank you for using Caustics First Script. '+TimeRunning+'"');
Wait(2000);
KeyDown(13);
Wait(200);
KeyUp(13);
Wait(160000);
TerminateScript;
end;}
end;

procedure RULeacher;
begin
if ((YourSRLId = '') or (YourSRLpass = '')) then
repeat
Writeln('Noob leacher.');
Wait(500);
Writeln('Noob leacher.');
Wait(500);
Writeln('Noob leacher.');
Wait(500)
until (False)
end;


procedure RetaliateC;
//--------------------Turns autoretaliate off-------------------------------
begin
GameTab(1);
if (FindColor(x, y, 1777020, 624, 385, 719, 396)) then
begin
Mouse(639, 386, 5, 5, true)
end;
if (not (FindColor(x, y, 1777020, 624, 385, 719, 396))) then Exit;
end;


procedure ToBank2;

var
xx, xy, Dbankers: Integer;
Angle: Extended;

begin
Dbankers := DTMFromString('78DA636C67626008644001FFFFFD63F80FA41' +
'9416C2060AC01AAF182C8B140D5FCF9C304A619A17CB09A204C35' +
'22E86AC2F09B0300F8811153');
AntiRandoms;
if FindDtmRotated(Dbankers, xx, xy, MMX1, MMY1, MMX2, MMY2, Radians(-30), Radians(30), 0.05, Angle) then
begin
Mouse(xx, xy, 1, 1, True);
FFlag(2);
if OpenBankQuiet('db') then
begin
FreeDTM(Dbankers);
if Pinscreen then InPin(IntToStr(Players[CurrentPlayer].Integers[0]));
if Players[CurrentPlayer].Booleans[0] then
begin
Wait(500 + random(1000));
Depositall;
Closebank;
end
else deposit(5, 28, true);
Wait(500 + random(1000));
Closebank;
Banked := Banked + 1;
LoadsToDo := LoadsToDo + 1;
Chopped := Chopped + 27;
ProgressReport;
FreeDTM(dbankers);
Exit;
end;
end;
FreeDTM(Dbankers);
end;


procedure ToBank; forward;

procedure ToBank;
//-------------------------------walks to bank-------------------------------
var
xx, xy: Integer;
Angle: Extended;

begin
Setrun(true);
AntiRandoms;
if (FindSymbol(xx, xy, 'bank')) then
begin
Mouse(xx - 8, xy, 5, 5, True);
Writeln('Found Bank Symbol');
FFlag(5);
if OpenBankQuiet('db') then
begin
Tri := 0;
if Pinscreen then InPin(IntToStr(Players[CurrentPlayer].Integers[0]));
if Players[CurrentPlayer].Booleans[0] then
begin
Wait(500 + random(1000));
Depositall;
Closebank;
end
else Deposit(5, 28, true);
Wait(500 + random(1000));
Closebank;
Banked := Banked + 1;
LoadsToDo := LoadsToDo + 1;
Chopped := Chopped + 27;
ProgressReport;
Exit;
end
else
begin //resets bank symbol
Tri := Tri + 1;
Logout;
LoginPlayer;
ToBank;
if Tri = 2 then ToBank2;
end;
end;
end;


function DDTM: Integer;

var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..4] of TDTMPointDef;
TempTDTM: TDTM;

begin
MakeCompass('n');
dtmMainPoint.x := 786;
dtmMainPoint.y := 328;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindWaterColor;
dtmMainPoint.Tolerance := 1;

dtmSubPoints[0].x := 786;
dtmSubPoints[0].y := 328;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindWaterColor;
dtmSubPoints[0].Tolerance := 1;

dtmSubPoints[1].x := 781;
dtmSubPoints[1].y := 320;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 6447963;
dtmSubPoints[1].Tolerance := 50;

dtmSubPoints[2].x := 785;
dtmSubPoints[2].y := 318;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 6447963;
dtmSubPoints[2].Tolerance := 50;

dtmSubPoints[3].x := 787;
dtmSubPoints[3].y := 336;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 6447963;
dtmSubPoints[3].Tolerance := 50;

dtmSubPoints[4].x := 791;
dtmSubPoints[4].y := 337;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 6447963;
dtmSubPoints[4].Tolerance := 50;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;


procedure WalkToWillows;
begin
AntiRandoms;
if FindDTM(ddtm, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
AntiRandoms;
FindDTM(DDTM, x, y, MMX1, MMY1, MMX2, MMY2);
Mouse(x + 31 + Random(7), y + Random(3), 5, 5, true);
FFlag(10);
end
else
begin
repeat
if (FindSymbol(x, y, 'bank')) then
begin
AntiRandoms;
Mouse(x - 30, y + 30, 6, 6, True);
FFlag(10);
end;
SymbolAccuracy := SymbolAccuracy - 0.1;
until (FindSymbol(x, y, 'bank')) or (SymbolAccuracy = 0.4);
if (SymbolAccuracy = 0.4) then
begin
AntiRandoms;
SymbolAccuracy := 0.8;
Wait(700);
RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
if not (RadialWalk(FindWaterColor, 180, 270, 60, -1, 0)) then Exit;
end;
end;
end;


procedure Chats;
//-----------------------Changes all the chat settings-----------------------
begin
SetChat('on', 1);
SetChat('friends', 2);
SetChat('on', 3);
SetChat('on', 4);
SetChat('on', 5);
end;


procedure Setup;
begin
SetupSRL;
LoginPlayer;
Wait(1000 + Random(1000));
RuNoob;
RetaliateC;
SetAngle(True);
Chats;
end;


procedure MainLoop;
//-----------------------//--------Sexy Time, I Like----------------//---------------------------

begin
PlayerForm;
RULeacher
if (Players[CurrentPlayer].Booleans[1]) then
begin
Writeln('Loading SMART');
SmartSetupEx(39, true, True, False);
Wait(3000);
SetTargetDC(SmartGetDC);
repeat
Wait(100);
until (SmartGetColor(253, 233) <> 1118604);
Cleardebug;
Writeln('SMART loaded');
Wait(800);
ClearDebug;
end;
Setup;
repeat
WalkToWillows;
Wait(1000 + random(500));
Chop;
Wait(1000 + random(500));
ToBank;
Wait(500 + random(500));
if (LoadsToDo = Players[CurrentPlayer].integers[1]) then
begin
NextPlayer(True);
LoadsToDo := 0;
Setup;
end;
until (False)
end;


begin
MarkTime(Start);
SetupScript;
repeat
Mainloop;
until (TimeFromMark(Start) > Time * 1000);
// ShutDownPC;
end.

NCDS

2009-05-10 20:29:43

Try and avoid Global vars, especially X and Y.


procedure CheckEnt;

var
ix, iy: integer;
//------------------------------- Simple Ent checker-------------------------------------
begin
if FindColorTolerance(ix, iy, 388075, 85, 15, 115, 15, 30) then
begin
WriteLn('Advoiding Ent');
Ents := Ents + 1;
Mouse(626, 63, 2, 2, true);
Wait(7000 + random(2500));
Mouse(629, 67, 2, 2, true);
WriteLn('Ent Advoided');
end
else Exit;
end;
Coord clicks := very detectable.


To be completely honest this is pretty sloppy:
procedure Chop;
//-------------------------------Chops willows-------------------------------
var
Times, WillowTree: Integer;

begin
{TheColor:=1517860;
TheColor1:=2594433;
TheColor2:=6326170; }
Marktime(Times);
Status('AutoColoring...');
// WillowTree := BitmapFromString(5, 5, 'beNqLs4oJNYEgVwd1IEqK' +
// 'toAgX3cdIIJzgSjQWy8nxS4tzgqCQv0M8tPtgQgqAgBLzRcE');
// TheColor := AutoColorThis(WillowTree, 50, MSX1, MSY1, MSX2, MSY2);
repeat
Status('Chopping...');
if FindObjTPA(rx, ry, 8105880, 15, -1, 10, 10, 1, ['hop', 'illow']) then
// if FindObjEx(rx, ry, ['hop','illow'], [8240044, 2178094, 2110520], 10, 40, MSX1, MSY1, MSX2, MSY2) then
begin
case Random(3) of// you only have 2 options. Sometimes it will just do nothing?
0, 2: begin
Mouse(rx, ry, 2, 2, true);
AntiRandoms;
Wait(4000 + random(500));
hold;
end;
1: begin
Mouse(rx, ry, 2, 2, false);
Wait(150 + random(250));
ChooseOption('hop');
MMouse(rx, ry, 5, 5);
AntiRandoms;
wait(4000+random(500));
hold;
end;
end;
if IsupText('hop') then Hold;
t := 0;
end;
until (InvFull) or (TimeFromMark(times) > 450000);// why so many times?
//FreeBitmap(WillowTree);
end;


Also, this is currently against SRL rules:

procedure RuNoob;
//------------------------------- checks if ur a noob-------------------------------
begin
GetCombatLevel;
if (GetCombatLevel < 16) then
begin
WriteLn('Lvl 3 normal clothes froob');
NextPlayer(False);
end;
if (GetCombatLevel > 15) then
begin
WriteLn('Thx lvling player to and being a true macroer ;)');
end;
end;

procedure RULeacher;
begin
if ((YourSRLId = '') or (YourSRLpass = '')) then
repeat
Writeln('Noob leacher.');
Wait(500);
Writeln('Noob leacher.');
Wait(500);
Writeln('Noob leacher.');
Wait(500)
until (False)
end;
your not aloud to end a script because of that anymore or not having SRL stats anymore(I'm almost positive, double check though).


read up on 'else'

procedure RetaliateC;
//--------------------Turns autoretaliate off-------------------------------
begin
GameTab(1);
if (FindColor(x, y, 1777020, 624, 385, 719, 396)) then
begin
Mouse(639, 386, 5, 5, true)
end;
if (not (FindColor(x, y, 1777020, 624, 385, 719, 396))) then Exit;
end;

in ToBank and ToBank2 you should include some better FailSafe's.

Also, read up on the difference between procedure's and functions and how they can be used with each other.
Nauman has a good TuT for that.

I'm not usually too much of a standards freak, but you should touch up on them a bit.

I like some of the logic you have used, though I dont really understand the purpose for the ShutDownPC.

You know what your doing but I think there is still a couple basic things you should know more about before becoming a member. Although I am not going to vote No, nor am I going to vote yes.

I will let the others decide on this one.

I may come back and vote later if I feel the need.

GoodLuck.

Naike

2009-05-10 21:29:48

Kinda between yes & no for me..

Yes tho.

Floor66

2009-05-10 22:12:31

No from me, soz.
Same reasons as NCDS. Don't use FindObjTPA btw.

oh btw willows give 67.5 exp per log, not 65!

BKNYKavkaz

2009-05-10 22:31:17

From: Floor66
No from me, soz.
Same reasons as NCDS. Don't use FindObjTPA btw.

oh btw willows give 67.5 exp per log, not 65!


tbh i dont understand his reasons. the ent checker is obsolete, theres no more ents, i never bothered with it, i just never removed it because i felt sentimental about it lol because even though its pretty simple but when i made it i just started scripting and i made that proc from scratch and it worked 100%. I also dont understand how much chopping proc is sloppy, maybe because of all the comments, but how does that relate, i just didnt want to delete it because maybe itll come to use later. so technically ur voting no on my standards which i believe are fine, maybe not perfect, but perfection is not being asked for here, its quality that counts and i believe this is a very stable quality script, but hey, everyone got their own opinions.

Floor66

2009-05-10 22:34:22

Not your standards, but things like FindObjTPA aren't really SRL-Member stuff. You'd rather use hard TPA's and T2DPA's.

NCDS

2009-05-10 23:06:08

From: caustic
tbh i dont understand his reasons. the ent checker is obsolete, theres no more ents, i never bothered with it, i just never removed it because i felt sentimental about it lol because even though its pretty simple but when i made it i just started scripting and i made that proc from scratch and it worked 100%. I also dont understand how much chopping proc is sloppy, maybe because of all the comments, but how does that relate, i just didnt want to delete it because maybe itll come to use later. so technically ur voting no on my standards which i believe are fine, maybe not perfect, but perfection is not being asked for here, its quality that counts and i believe this is a very stable quality script, but hey, everyone got their own opinions.


Thats not really the best attitude to have either.

When you apply for members you should expect some criticism and build from it. Not give excuses.

All I did was read through it and comment on the things I feel could be stronger/more efficient.
Im only here to help, honest.

BKNYKavkaz

2009-05-10 23:11:32

From: NCDS
Thats not really the best attitude to have either.

When you apply for members you should expect some criticism and build from it. Not give excuses.

All I did was read through it and comment on the things I feel could be stronger/more efficient.
Im only here to help, honest.


ye i think i have a right to comment on other peoples criticism too. I never said anything negative, just opinion.

Da 0wner

2009-05-11 00:40:23

Umm your attitude is not really great right now. Most things pointed out by NCDS were all perfectly valid. You seem to blive that this is tv best script in the world and there is mo problems with it. There ARE problems with it as in every other script. accept peoples' critisism and build on it to make your script better.

Cazax

2009-05-11 00:48:15

From: Floor66
Not your standards, but things like FindObjTPA aren't really SRL-Member stuff. You'd rather use hard TPA's and T2DPA's.

What's the difference between FindObjTPA and a normal TPA function? Almost nothing. FindObjTPA is way shorten than a TPA one, and they both do the same.

Da 0wner

2009-05-11 00:50:50

Does findobjtpa use HSL and ATPAs?

Cazax

2009-05-11 00:54:10

{*******************************************************************************
function FindObjTPA(var x, y: integer; color, tol, cts, ObjWidth, ObjHeight, minCount :Integer; UpText: tstringarray): Boolean;
By: Wizzup?
Description: Finds object using WizzyPlugin functions.
Starts with a Spiral from x and y.
Put in the color, Tolerance and ColorToleranceSpeed.
If you don't know what colortolerancespeed to choose, put in -1.
ObjWidth and ObjHeight are the parameters TPAToATPAEx uses, thus filtering
the MS's FindColorsSpiralTolerance points in boxes defined by
ObjWidth and ObjHeigth.
minCount is the amount of colors it should at least find in a Object box.
UpText, is ofcourse the text the object should have. In the Multi variant the
UpText is a string array.

*******************************************************************************}

function FindObjTPA(var X, Y: Integer; Color, Tol, CTS, ObjWidth, ObjHeight, minCount: Integer; UpText: TStringArray): Boolean;
var
I, j, tCTS: Integer;
myPoint: TPoint;
Points: TPointArray;
aPoints: T2DPointArray;
s: string;
begin
Result := False;
if not LoggedIn then exit;
tCTS := GetColorToleranceSpeed;
if CTS * 9 mod 3 <> 0 then
CTS := 1;
ColorToleranceSpeed(CTS);
FindColorsSpiralTolerance(X, Y, Points, Color, MSX1, MSY1, MSX2, MSY2, Tol);
if Length(Points) = 0 then
begin
ColorToleranceSpeed(tCTS);
Exit;
end;
ColorToleranceSpeed(1);
aPoints := TPAtoATPAEx(Points, ObjWidth, ObjHeight);
SetLength(Points, 0);
for I := 0 to High(aPoints) do
begin
if Length(aPoints[I]) < minCount then
Continue;
myPoint := MiddleTPA(aPoints[I]);
MMouse(myPoint.X, myPoint.Y, 0, 0);
Wait(100 + Random(50));
s := RS_GetUpText;
for j := 0 to High(UpText) do
if Pos(uptext[j], s) > 0 then
begin
GetMousePos(X, Y);
Result := True;
ColorToleranceSpeed(tCTS);
Exit;
end;
end;
ColorToleranceSpeed(tCTS);
end;
Yes it does.

Nadeem

2009-05-11 01:05:54

Hi caustic,

This is not that bad actually, BUT, there are some instances in the script which could be better represented, but very small. Such as:
Banked := Banked + 1;
LoadsToDo := LoadsToDo + 1;
Chopped := Chopped + 27;

Could be:
Inc(Banked);
Inc(LoadsToDo);
IncEx(Chopped, 27);

I think your chopping proc is not really sloppy, but because of all your comment lines it seems very sloppy, and in one of the cases the spacings are off. If you are unsure when to free a bitmap or dtm, use try finally except. Now I know your ShutDownPC; isn't being used but note, you may need to set Desktop as DC, or else I don't think it will be able to do the key pressing properly, since SMART is set as the DC. And everything has been said I think.

I would vote yes, but looking at your attitude, I'm going to hold my vote till later on. Remember, they are not really criticizing you, but just letting you know of where you can improve based on trial and error. Sure your script may run with stability but its not perfect, like everything else.



~NS

BKNYKavkaz

2009-05-11 03:04:45

Okay im sorry, was in a pissy mood long day. Just came home from basketball with lightened up mood and re-read the whole thread. Thank you for the criticism and ill use it for my benefit, actually i want you to critique it even more in case i do not get accepted so then my next application with this script will be up to all of your standards and beyond because i will add a seers maple chopper + fletcher.

Its just that i took it the wrong way and thought NCDS just kinda picked on the script because i dont really have the best of rep here, but once again i reread it, and i shouldnt take things personally, ty for the critique, it is what it is.

BobboHobbo

2009-05-11 11:19:43

I think the script is to simple, tbh. Also this:


procedure WalkToWillows;
begin
AntiRandoms;
if FindDTM(ddtm, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
AntiRandoms;
FindDTM(DDTM, x, y, MMX1, MMY1, MMX2, MMY2);// No need to recall this just slows it down.
Mouse(x + 31 + Random(7), y + Random(3), 5, 5, true);
FFlag(10);
//Your not freeing the DTM. Memory leak?
end

BUT very good for a first script. Normally first scripts are really scrappy but this one isnt that bad. Just needs to be more advanced.

Sorry, im voting No though. Good try however.

Sir R. M8gic1an

2009-05-11 18:32:40

I've seen you around before. you have a good attitude. I can see a lot of work was put into the script. Some parts are not quite as good as they could be, some are very well indeed.

I think that you are one of those who will keep on putting effort into scripting. And for what it's worth, you remind me of myself.

btw, procedures such as RULeecher are not allowed in SRL.

~RM

Nadeem

2009-05-11 19:45:12

I'll voted YES, everyone has a bad day sometimes, and I don't see why that one day should stop you from becoming a member :) But I hope, you keep up the good attitude and continue giving back for the community.

Blumblebee

2009-05-11 20:00:19

Its a great start, I like where your headed, but its just not there yet. Theres a lot of redunant code that can be shortened, and some of your walking ways seem borrowed (I wont say copied because you did not do it in the exact same way but pretty similiar). When I say that I'm just refering to walktowillows and stuff, look like some ideas from cycrosisms (went through his script with him not too long ago thats why I'm saying this). I know its difficult to not have similiar coding to other peoples, but thats what happens when you write a draynor willow chopper, as theres like 500 of them out, somethings seem a bit redunant so I sometimes just question.

The script does look a tad messy, if your not going to use a procedure, or parts of procedures maybe just remove them, dont just keep // ing them out.

I will refrain from voting as I'm on the edge and I want to see you do well. I'm positive if you dont get admitted this time, you'll be in the next.

btw i dont know if anyone else told you, but you cant have

procedure RULeacher;
begin
if ((YourSRLId = '') or (YourSRLpass = '')) then
repeat
Writeln('Noob leacher.');
Wait(500);
Writeln('Noob leacher.');
Wait(500);
Writeln('Noob leacher.');
Wait(500)
until (False)
end;

in your script ;) Its against the rules. and lastly for your mainloop, you final repeat is until
TimeFromMark(whatever) > Time*1000;
what if the scipt stops before that though? Maybe add an or in so
(TimeFromMark(whatever) > Time*1000) or AllPlayersInactive;

Da 0wner

2009-05-12 02:46:16

Btw ur RULeacher procedure is longer than needed:
procedure AreYouLeecher;
begin
if ((YourSRLId = '') or (YourSRLpass = '')) then
repeat
Writeln('Noob leecher.');
Wait(500);
until(False);
end;

Leecher was spelled wrong also ;p.

Gu3st...

2009-05-16 11:41:09

How come people started noticing AreYouLeecher; first when RM noticed it :P
I voted yes. I like it

Quickmarch

2009-05-16 11:49:13

Sorry, it's a no from me. Add TPA/ATPAs, a few more failsafes and make it a bit more advanced and i will vote yes next time. :)

Floor66

2009-05-16 12:29:00

Your tree switching isn't that good, you have to keep the mouse over the tree at all times now which is kinda inconvenient.

With my own script I created a TBox around the point I clicked and checked for colours inside it.

XcanadamanX

2009-05-17 00:46:38

From: Nadeem
Such as:
Banked := Banked + 1;
LoadsToDo := LoadsToDo + 1;
Chopped := Chopped + 27;

Could be:
Inc(Banked);
Inc(LoadsToDo);
IncEx(Chopped, 27);


i believe wizzup? did a benchmark between inc and x := x + 1 and the latter was faster. there is nothing wrong with doing it like caustic did it. it is all a matter of choice and should not be looked down on.