Justcheat
2009-03-21 05:44:19
Hello Villavu members,
I made my first script, a oak cutter and dropper. It's a simple oak finder and chopper.
Please comment.
[PHP]program OakCutter;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\WoodCutting.scar}
var
Gx, Gy, i, GetAnimation: integer;
procedure DropInv;
begin;
for i:= 2 to 28 do DropItem(i);
end;
procedure FindOak;
begin
if not LoggedIn then Exit;
while(not(FindObjCustom(Gx, Gy, ['oa','ak'], [1788994, 4617623, 1257258, 1590332, 5013671], 7))) do
begin
Wait(200+random(500));
end;
end;
procedure ChopOak;
begin
if not LoggedIn then Exit;
repeat
FindOak;
Mouse(Gx, Gy, 0, 0, RBool);
Wait(500+random(500));
ChooseOption('hop');
wait(2000+random(1000));
while(GetAnimation > 0) do
begin
Wait(500);
end;
until(InvFull)
DropInv;
end;
begin
ClearDebug;
MakeCompass('S');
SetAngle(True);
SetupSrl;
ActivateClient;
repeat;
ChopOak;
until(false);
end.[/PHP]
I made my first script, a oak cutter and dropper. It's a simple oak finder and chopper.
Please comment.
[PHP]program OakCutter;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\WoodCutting.scar}
var
Gx, Gy, i, GetAnimation: integer;
procedure DropInv;
begin;
for i:= 2 to 28 do DropItem(i);
end;
procedure FindOak;
begin
if not LoggedIn then Exit;
while(not(FindObjCustom(Gx, Gy, ['oa','ak'], [1788994, 4617623, 1257258, 1590332, 5013671], 7))) do
begin
Wait(200+random(500));
end;
end;
procedure ChopOak;
begin
if not LoggedIn then Exit;
repeat
FindOak;
Mouse(Gx, Gy, 0, 0, RBool);
Wait(500+random(500));
ChooseOption('hop');
wait(2000+random(1000));
while(GetAnimation > 0) do
begin
Wait(500);
end;
until(InvFull)
DropInv;
end;
begin
ClearDebug;
MakeCompass('S');
SetAngle(True);
SetupSrl;
ActivateClient;
repeat;
ChopOak;
until(false);
end.[/PHP]