SRL Archive - First Scripts

Frozen Chicken Killer !!


Frozen Tear

2012-01-30 17:55:44

Hello, this is my first script ever.
Its a chicken killer whit pick up feature, I did it because someone request it i did it like on 45min.
You should start on varrock chickens farm. !

[attach]13532[/attach]

Credits :

laakerules - for gis awesome item looter.

x[Warrior]x3500

2012-01-30 18:08:18

http://villavu.com/forum/showthread.php?t=60288&highlight=standards

please read that :)

i will run the script now and test out how it functions

EDIT:
- get rid of your repeat … until in KillChickens(); it never exits (ur mouse(); is set to true).
- get rid of ChooseOption('ttack'); in KillChickens(); reason above ^
- change line 43 to FindObjCustom(x, y, ['Chicken'], [4811140,8960460,1851484], 7);
- the constant 'feather' is never used, nor do u ever use your feather finding function
- for feather finding, use TPAtoATPAEx(TPA, 10,10); (line 77)
- change line 107 to If FeatherFinder([11514827, 8685465, 9608362], ['hicken', 'eather'], MSCX, MSCY) then
- ^ create an autocolor function for that line

Frozen Tear

2012-01-30 18:17:50

From: x[Warrior]x3500
http://villavu.com/forum/showthread.php?t=60288&highlight=standards

please read that :)

i will run the script now and test out how it functions


Thx for that amazing source, and i find that my script dosnt works great :P i will try to fix it.

x[Warrior]x3500

2012-01-30 18:32:58

ill be updating my first post with observations and things that could be improved :)

laakerules

2012-01-31 00:00:14

Hmmm nice script bro, except for the pickup feathers! :P


Function FeatherFinder(Colors: TIntegerArray; TheUpText: TStringArray; midx, midy: integer): Boolean;
Var
T,i,X,Y,b: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
MarkTime(T);
Repeat
SetArrayLength(ATPA, Length(Colors));
for i := 1 to High(Colors) do
FindColorsSpiralTolerance(midx, midy, ATPA[i], Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
TPA := MergeATPA(ATPA);
ATPA := TPAtoATPAEx(TPA, 2, 2);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if (Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], x, y);

if (TimeFromMark(T) > 5000) then
Exit;

MMouse(x, y, 10, 10);
Wait(randomrange(100,150));
If(IsUpTextMultiCustom(TheUpText)) then
begin
ClickMouse2(False);
WaitOption('eather', 500);
if DidRedClick then
begin
Inc(Feathers);
Result := True;
Break;
end;
end;
Until(Result)
end;
Function PickupFeathers:Boolean;
Var
X, Y: Integer;
begin
FindNormalRandoms;
If FeatherFinder([10198179, 11053488], ['Take', 'feather'], MSCX, MSCY) then
Begin
writeln('You have found the some Feathers!');
While IsMoving do
Wait(50);
FindNormalRandoms;
Wait(RandomRange(500,750));
End;
end;

And then heres mine from my scripts! :P


Function CharmFinder(Colors: TIntegerArray; TheUpText: TStringArray; midx, midy: integer): Boolean;
Var
T,i,X,Y,b: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
MarkTime(T);
Repeat
SetArrayLength(ATPA, Length(Colors));
for i := 1 to High(Colors) do
FindColorsSpiralTolerance(midx, midy, ATPA[i], Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
TPA := MergeATPA(ATPA);
ATPA := TPAtoATPAEx(TPA, 2, 2);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if (Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], x, y);

if (TimeFromMark(T) > 5000) then
Exit;

MMouse(x, y, 10, 10);
Wait(randomrange(100,150));
If(IsUpTextMultiCustom(TheUpText)) then
begin
ClickMouse2(False);
WaitOption('harm', 500);
if DidRedClick then
begin
Inc(Charms);
Result := True;
Break;
end;
end;
Until(Result)
end;

Function PickupCharms:Boolean;
Var
X, Y: Integer;
begin
FindNormalRandoms;
If CharmFinder([6133669], ['Take', 'charm'], MSCX, MSCY) then
Begin
writeln('You have found the some Charms!');
While IsMoving do
Wait(50);
FindNormalRandoms;
Wait(RandomRange(500,750));
End;
end;

I find that funny how similar they look! :P good work on the attacking method though. :)

partyboyrawr

2012-02-02 13:16:36

the mouse clicks randomly. like it clicks the chicken then it clicks on another chicken. how do we make it so that after it finish killing it goes to the next one?

kingsleyeng

2012-02-10 23:22:08

um i got this error Exception in Script: Unable to find file 'srl/srl.scar' used from ''
any1 help new here