SRL Archive - RS3 Script Requests

Chicken Bones


Gooneroo

2011-12-05 05:14:00

Just a thought here for a simple script that saves you a lot of money when training prayer. At any popular chicken pen, most players pick up the chicken's feathers, and leave their bones behind. I chose chicken pen as it's a very small area and doesn't involve too much walking. This script would go there, pick up and bury all the bones that have been left behind. A good beginners script, this sounds like, and I may get into making it if I get the time/find a good tutorial to help me along. Just a thought to put out there!

I Am Legend

2011-12-05 05:35:53

where is this popular chicken pen ?

Gooneroo

2011-12-05 05:42:56

The main one is in Lumbridge, across from the cows, but I believe there's also a decent one in Falador. Correct me if I'm mistaken.

I Am Legend

2011-12-05 06:07:49

ok i made the script if u wanna test it them pm me or come to lumbridge chicken pen above cowfield in world 1 now.

{ Made on request some function used from Flights method   }


program ChickenBone;
{$DEFINE SMART}
{$i srl/srl.scar}
{$i sps/sps.simba}

var
t: integer;
myPath, bank: TPointArray;
x, y , DTM, tries: integer;
ChoseAngle : boolean;
const

howManyRuns = 50; // how many runs

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := '';
// Players[0].Load := 50;
Players[0].Active := true;


end;

//handles bank

Procedure A_Antiban;
var
c : integer;
begin
c := random(60);

case c of
0..2: Gametab(randomrange(tab_Combat, tab_Notes));
3..6: wait(1000 + random(3000));
7..9: begin
MakeCompass(IntToStr(random(180)));
MakeCompass(IntToStr(random(1)));
end;
10: HoverSkill('smithing', false);
11..13: PickUpMouse;
14..25: RandomMovement;
end;
findnormalrandoms;
end;

Procedure SetInitialCamera;
begin
//First, we move all the way down
Wait(RandomRange(550,750));
KeyDown(VK_Down);
Wait(RandomRange(950,1050));
KeyUp(VK_Down);
//Now, set it to the preferred height
Wait(RandomRange(550,750));
KeyDown(VK_Up);
Wait(RandomRange(350,450));
KeyUp(VK_Up);
end;

Procedure RotateToObj(Direction: String; Range: integer);
begin
if(Direction = 'West') then
begin
case Range of //3 zones in relation to player's north-bound viewing region
0:
begin
//Already in northern region, but we declare "0" just for laughs :)
end;
1: //North-west
begin
Wait(RandomRange(350,450));
KeyDown(VK_Right);
Wait(RandomRange(475,510));
KeyUp(VK_Right);
Wait(RandomRange(150,210));
end;
2: //South-west
begin
Wait(RandomRange(350,450));
KeyDown(VK_Right);
Wait(RandomRange(1575,1610));
KeyUp(VK_Right);
Wait(RandomRange(150,210));
end;
3: //Very south-west?
begin
Wait(RandomRange(350,450));
KeyDown(VK_Right);
Wait(RandomRange(1675,1710));
KeyUp(VK_Right);
Wait(RandomRange(150,210));
end;
end;
// Inc(RotateCount);
end else if(Direction = 'East') then
begin
case Range of
0:
begin
//Already in northern region, but we declare "0" just for laughs :)
end;
1: //North-east
begin
Wait(RandomRange(350,450));
KeyDown(VK_Left);
Wait(RandomRange(475,510));
KeyUp(VK_Left);
Wait(RandomRange(150,210));
end;
2: //South-east
begin
Wait(RandomRange(350,450));
KeyDown(VK_Left);
Wait(RandomRange(1575,1610));
KeyUp(VK_Left);
Wait(RandomRange(150,210));
end;
3: //Very south-east?
begin
Wait(RandomRange(350,450));
KeyDown(VK_Left);
Wait(RandomRange(1675,1710));
KeyUp(VK_Left);
Wait(RandomRange(150,210));
end;
end;
end;
end;

Procedure GetObjPosition(Point:TPoint);
begin
if (Not ChoseAngle) then
begin
if(PointInBox(Point,IntToBox(0,0,175,165))) then
begin
RotateToObj('West',1);
end else if(PointInBox(Point,IntToBox(0,166,190,230))) then
begin
RotateToObj('West',2);
end else if(PointInBox(Point,IntToBox(0,231,265,335))) then
begin
RotateToObj('West',3);
end else if(PointInBox(Point,IntToBox(350,0,515,165))) then
begin
RotateToObj('East',1);
end else if(PointInBox(Point,IntToBox(350,166,515,231))) then
begin
RotateToObj('East',2);
end else if(PointInBox(Point,IntToBox(350,231,515,335))) then
begin
RotateToObj('East',3);
end;
end;
ChoseAngle := True;
end;

procedure pickCabbage;
begin


x := MSCX;
y := MSCY;

if(not IsMoving) then
begin
if(FindColorTolerance(x, y, 13553624, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
MMouse(x,y, 4,4);
GetObjPosition(Point(x,y));
ChoseAngle := False;

Wait(200 + Random(100));
inc(tries);
if tries = 3 then
begin
writeln(' ');
A_Antiban;
wait(1000+random(500));
tries := 0;

end;
if IsUpText('ake') then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('one');
tries := 0;
wait(1000 + random(250));
end else
Writeln('bone not found');
end;
end;
end;


// main function


begin
smart_server := 1;
smart_members := false;
smart_signed := true;
smart_superDetail := false;

clearDebug();
setupSRL();
DeclarePlayers;
if not loggedin then
loginplayer;

// SPS_Debug := true;




repeat

if not invFull then
begin
repeat
pickCabbage;
until InvFull;
end;


if invFull then

begin
DTM := DTMFromString('mWAAAAHicY2FgYJjGxMAwBYjnAfFkIPZnZGDwAuIAIA4H4k2rVzE01dQwbFu3jiEvK5NBDqgHGTOiYRAAAE9JCvw=');
repeat

if FindDTM(DTM,x, y,MIX1, MIY1, MIX2, MIY2 ) then
begin

writeln('found bones in inventory');
MMouse (x, y, 1, 1);


if (IsUpTextMultiCustom(['ury', 'one'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
wait(300+random(100));


Wait(500+random(250));



end;
end;
until not FindDTM(DTM,x, y,MIX1, MIY1, MIX2, MIY2 );

FreeDTM(DTM);




end;
until(t = howManyRuns);




end.





Enjoy