PDA

View Full Version : My Log Cutter/Arrow Shaft Maker



I Pick Axes
09-27-2006, 02:30 AM
An idea I got working randomly. It's not that great. I'm not so much expecting you to use it as to tell me what I should be changing in it.

Revision 1:
program Shafter;
//Cuts Evergreen trees and fletches arrow shafts
//Axe in spot 1, knife in spot 28

{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}

const
mstree = 4159600; //A color on main screen found mostly on evergreens.

Procedure SetupAll;
begin
SetupSRL;
FindAxeHeadColor;
end;

Procedure DoRandoms;
begin
FindNormalRandoms;
FindHead;
end;

Procedure DoChop;
begin
repeat
repeat
FindColorSpiralTolerance(x,y,mstree,1,1,500,300,10 );
MoveMouse(x+random(5),y+random(5));
Wait(100+random(25));
until (IsUpText('verg'));
Mouse(x,y,5,5,true);
Wait(5000+random(100));
if (random(5) = 1) then DoRandoms;
until (InventoryFull);
end;

procedure DoFletch;
begin
MouseItem(27,true);
MouseItem(28,true);
Mouse(72,386,10,10,false);
ChooseOption(72,386,'Make X');
TypeSend('555'+chr(13));
Wait(35000+random(1000));
ClickToContinue;
end;

begin
SetupAll;
while (LoggedIn) do
begin
DoChop;
DoRandoms;
DoFletch;
DoRandoms;
end;
end.

a noob
10-12-2006, 08:47 PM
script doesnt click on the trees

I Pick Axes
10-13-2006, 09:28 PM
Did you set mstree to the color of an evergreen? While you were in an evergreen forest?
If you're using normal/dead trees, change the UpText it looks for.
Evergreen: IsUpText('verg')
Tree: IsUpText('ree')
Dead Tree: IsUpText('ead')