blulightning
2009-06-26 20:03:04
Thanks to all of the helpful tutorials I've found here, I've created this Chop and Dropper that cuts down trees wherever you happen to be standing. Using a few procedures i've found around the site and editing them to fit my needs, I've added some anitban as well. However, I'm having trouble making it work. It's obviously some noob error on my part, but I was hoping you all here could help me fix it and make it better in general. *phew* here it goes, no flaming my terrible-ness.
Credits to MACRO_FTW for the Antirandom and dialeyj2 for the Dropping procedure
Thanks to 99_ and The Man, and Griff for helping me learn to script the whole thing out
program New;
{.include srl/srl.scar}
Procedure NamePlayers;
begin
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';{Added this for randoms :)}
Players[0].Active := True;
end;
function AntiRandoms: Boolean;
begin
Result := False;
if FindFight then
begin
RunAway('n', True, 1, 2000);
Result := True;
end else
Result := FindLamp('woodcutting') or FindNormalRandoms;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
Wait(2500+Random(500));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms;
end;
end;
end;
procedure ChopTree;
var x, y: integer;
begin
repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 2584417, 40) then
Mouse(x, y, 0, 0, false);
ChooseOption('hop');
repeat
wait(400+random(250));
AntiBan;
Until not IsUpText('ree') or (InvFull);
until(InvFull);
end;
procedure RandomDrop(StartSlot, EndSlot : Integer);
var i,s,c : Integer;
AlreadyDropped : Array of Integer;
begin
SetArrayLength(AlreadyDropped, (EndSlot-StartSlot) + 1);
for c:= 0 to High(AlreadyDropped) - 1 do AlreadyDropped[c]:= 0;
repeat
i:= Random((EndSlot-StartSlot) + 1);
if (AlreadyDropped[i] = 0) then
begin
case Random(28) of
0..26: DropItem(AlreadyDropped[i]);
27: begin
MouseItem(AlreadyDropped[i],false);
ChooseOption('xamine');
Wait(100 + Random(200));
DropItem(AlreadyDropped[i]);
end;
end;
AntiRandoms;
AlreadyDropped[i]:= 1;
Inc(s);
Wait(200 + Random(200));
end else
begin
end;
until(s = EndSlot-StartSlot + 1);
end;
begin
SetUpSRL;
ActivateClient;
NamePlayers;
ChopTree;
RandomDrop(1, 28);
end.
Credits to MACRO_FTW for the Antirandom and dialeyj2 for the Dropping procedure
Thanks to 99_ and The Man, and Griff for helping me learn to script the whole thing out