SRL Archive - Research & Development Lounge

Good enough for members?


D1zl3

2008-10-18 18:39:54

Yeah this is only my first script, but I updated it alot and made it really good, and there isnt any bugs that I know of. It has progress reports, anti ban/random, attack style to train of your choice and more. Also give me ideas to make this script better, thanks.

Cazax

2008-10-18 18:58:25

Add standards, learn TPA's, add more failsafes and add walking.

D1zl3

2008-10-18 19:07:45

From: Cazax
Add standards, learn TPA's, add more failsafes and add walking.


Do I really need walking, I'm only killing chickens

Cazax

2008-10-18 19:09:54

From: d1s3l
Do I really need walking, I'm only killing chickens


You can use walking for a death walk for example. for walking use reflection(if you are using SMART), Radial Walk(or RadialRoadWalk) and/or DDTMs.

D1zl3

2008-10-18 19:11:22

Ok thanks I'll add those

P1nky

2008-10-18 19:31:45

no sorry too basic, read more tuts.

MylesMadness

2008-10-18 20:14:54

Well, I hit yes, but I meant no.

Blumblebee

2008-10-18 20:48:51

From: Mylesmadness
Well, I hit yes, but I meant no.


lol.

xI agree with saying its not advanced enoguh to become members with, but if you add some etra details, like deathwalk, more options (like picking up raw chicen and banking, or burying bones), then i would definaty say yes on your application, atm however, i would probably say no. Remember, that showing you have the ability to walk is a big part of applying for members, good luck :)

-Blumblebee

Nava2

2008-10-19 17:14:37

Learn how to nest things. In if statements.

Standards,

TPAs,

At least a calibrate function which if it cant find a chicken, will look for a static point in which to walk to. AKA the chicken pen?

Like to see you trying though, gl ;)

Quickmarch

2008-10-23 07:22:33

no its way to simple

Bonfield

2008-10-23 07:56:35

i fixed the standards for you but as said before to simple, try adding a autocolour functions for the chickens, advanced item finding etc



{


/////// // // //////// /////// // // /////// // //
// // // // // // // // //// //
// //////// // // //// ///// // // //
// // // // // // // // // ///
/////// // // //////// /////// // // /////// // //
/////// // // // // /////// ///////
// // // // //// // // // //
////// // // // // // // ///// ///////
// // // // // /// // // //
// /// /// // // /////// // //
-------------------------------------------------
/ \
/___________________________________________________\
/ Created by: d1s3l \
/ Anti-Randoms + Anti-Bans \
| Version 2.00 |
| Credits To i pro leechin' On The Tutorial |
| On AntiRandoms |
| And |
| BlumbleBee On |
| The Progress Reports |
+========================================================+
}
program ChickenPwner;
{.Include SRL\SRL\Misc\SMART.SCAR}
{.Include SRL\SRL.SCAR}
{.include SRL/SRL/skill/Fighting.scar}

var
X, Y, I, Mark, Clicked, AntiRandomz, FeathersPickedUp: Integer;
AntiBanz, ProggyTimer, ChickensKilled, CountFeathers, Feathers: Integer;

const
YourSRLID = ''; //Your SRL ID, 4 digits long. (create one at <a href="http://www.stats.srl-forums.com/" target="_blank">http://www.stats.srl-forums.com/</a>)
YourSRLPW = ''; //Your Srl Password
ColorOfChicken1 = 4168878; //Pick a main color
ColorOfChicken2 = 857705; //Pick a main color of a diff. type of chicken
//----------------------------->Line 240 to change worlds<-----------------------------//
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
//--------------------------->Line 139 to change fight mode<--_------------------------//
// (top left attack mode=1 , top right=2 , bottom left=3 , bottom right =4) //

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players to use in script
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; //3/4 of the characters name (bobbey = bob)
Players[0].Active := True; // True=yes, False=no//
Players[0].Booleans[1] := False; // False for brightness Check Once. Just leave at false.
end;
//*******Do not change below this point*******//
/////// // // //////// /////// // // /////// // //
// // // // // // // // //// //
// //////// // // //// ///// // // //
// // // // // // // // // ///
/////// // // //////// /////// // // /////// // //
/////// // // // // /////// ///////
// // // // //// // // // //
////// // // // // // // ///// ///////
// // // // // /// // // //
// /// /// // // /////// // //

procedure CounttheFeathers;
var
FeathersDTM: Integer;
begin
FeathersDTM := DTMFromString('78DA637461626078C28002D62C5CC06003A41' + '981F83F1030FA02D55C6740038C482490F600AA794E408D0D50CD' + '5B026AEC806A1EE257030001080C01');
CountFeathers := ItemAmount('inv', 'dtm', FeathersDTM, []);
WriteLn(Padr('|| Featherz Gathered: ' + IntToStr(CountFeathers), 49) + '||');
FreeDTM(FeathersDTM);
end;

procedure AntiRandoms;
begin
FindTalk;
if FindNormalRandoms then
FindLamp('strength');
if FindFight then
begin
RunAway('E', True, 1, 5000);
Wait(10000 + random(2000));
Inc(AntiRandomz);
end;
end;

procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;
inc(AntiBanz);
case random(4) of
0: PickUpMouse;
1: RandomMovement;
2: RandomRClick;
3:
case random(4) of
0: HoverSkill('Strength', false);
1: HoverSkill('Attack', false);
2: HoverSkill('Defence', false);
3: HoverSkill('Hitpoints', false);
end;
end;
end;

procedure TiltScreen;
begin
if not (loggedIn) then
exit;
keydown(VK_DOWN);
wait(200 + random(125) + random(138));
keyup(VK_DOWN);
wait(random(232));
end;

procedure SetupPlayers;
begin
if not LoggedIn then
LoginPlayer;
MakeCompass('n');
SetAngle(true);
SetRun(true);
TiltScreen;
SetFightMode(i + 1);
end;

procedure Report;
begin
WriteLn('===================================================');
WriteLn(Padr('|| Chickenz Killed: ' + IntToStr(ChickensKilled), 49) + '||');
CounttheFeathers;
WriteLn(Padr('|| AntiBanz: ' + IntToStr(AntiBanz), 49) + '||');
WriteLn(Padr('|| AntiRandumz: ' + IntToStr(AntiRandomz), 49) + '||');
WriteLn(Padr('|| Ran For: ' + TimeRunning, 49) + '||');
WriteLn('===================================================');
end;

procedure ClickTheMouse;
begin
Mouse(x, y, 1, 1, true) Clicked := Clicked + 1;
GameTab(4);
end;

function InventoryCount: Integer;
var
i: Integer;
begin
GameTab(4);
Result := Feathers;
for i := 1 to 28 do
if (ExistsItem(i)) then
Result := Result + 1;
Inc(FeathersPickedUp);
end;

function MobTPAs: TPointArray;
var
TPA: TPointArray;
begin
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 195836, MMX1, MMY1, MMX2, MMY2, 0);
if Length(TPA) < 1 then
Exit;
RAaSTPA(TPA, 4);
SortTPAFrom(TPA, IntToPoint(MMCX, MMCY));
result := TPA;
end;

procedure KillChicken;
begin
FindObjCustom(x, y, ['chi', 'hic', 'ick', 'ken'], [2572628, 6916764, 9155272, 3627895, 5928325], 3);
Mouse(x, y, 2, 2, False);
Wait(900 + Random(110));
if not ChooseOption('ttack') then
Exit;
Flag;
MarkTime(Mark);
Wait(5 * 1000 + Random(1050));
if HPPercent < 25 then
RunTo('N', true);
Wait(500);
GameTab(4);
inc(ChickensKilled);
end;

procedure FindFeathers;
begin
if (FindObjCustom(X, Y, ['ake', 'eat', 'ther'], [403205], 3)) then
begin
Mouse(x, y, 2, 2, False) if not (ChooseOption('ake')) then
wait(500);
Exit;
end
else
end;

procedure MainLoop;
var
Mark: Integer;
begin
repeat
repeat
MobTPAs;
AntiRandoms;
AntiBan;
KillChicken;
FindFeathers;
MarkTime(Mark);
if not LoggedIn then
Exit;
KillChicken;
FindFeathers;
AntiBan;
Report;
until ((TimeFromMark(Mark) / 1000 * 60) >= 50);
until (false);
end;
begin
LoadSMART(124, True, False);
SetUpSRL;
SRLID := YourSRLID;
SRLPassword := YourSRLPW;
DeclarePlayers;
SetupPlayers;
MainLoop;
SendSRLReport;
if (GetSystemTime >= ProggyTimer) then
begin
Report;
ProggyTimer := GetSystemTime + 300000; // 300000 ms = 5 minutes
end;
end.

nielsie95

2008-10-23 08:49:24

Did you use my formatter, Bonfield? :p