Kinda impoved. You only need 1 const, and I added to check when it moves mouse to tree if it says Chop down.
//////////////////////////////////////////////////////////////////////////////////////
//------------------------Power cutter/burner By Phlame-----------------------------//
//--------Credits to SRL for all the includes etc, i just "glued" together----------//
//---------------Start with axe weilded and tenderbox in first slot.----------------//
//Version Beta1, it works, but extremely rough... Comments please! Updates to come!//
//////////////////////////////////////////////////////////////////////////////////////
program SRLGrillmaster;
{.include SRL\SRL.scar}
Const
//--------Fill-This-Out---------------//
TreeColor1 =0;
TreeColor2 =0;
TreeColor3 =0;
LoadsWanted =25;
//--------Leave-This-Alone----------//
Const StartPlayer =0;
Var Lognumber,Loadsdone,Tinderbox:Integer;
//------------------------------//
Procedure DeclarePlayers;
begin
NumberOfPlayers(1);
Players[0].Name :='Name';
Players[0].Pass :='Pass';
Players[0].Nick :='Nick';
end;
Procedure LoginRoutine;
Begin
DeclarePlayers;
If (LoggedIn=False) then
Begin
LoginPlayer;
End else
End;
Procedure FindChopTree;
Begin
wait(100+random(1000));
If (FindMSColorTol(x,y,TreeColor1,11)) or
(FindMSColorTol(x,y,TreeColor2,11)) or
(FindMSColorTol(x,y,TreeColor3,11)) then
Begin
wait(100+random(1000));
MMouse(x,y,5,0);
Sleep(100+Random(700));
If(IsUpText('Chop down'))Then
Mouse(X,Y,5,0,true);
wait(7500+Random(5000));
end else
Begin
Writeln('Chosen tree not found')
Logout;
Exit;
End;
end;
Procedure BurnInv;
Begin
If (Not(Lognumber=28))then
Begin
UseItem(Lognumber);
Lognumber:=Lognumber+1
wait(100);
UseItem(Tinderbox)
Begin
IdleTime(2000,random(56),10);
end;
end else
If (Lognumber=28) then
Lognumber:=2
end;
Procedure ChopFull;
Begin
Repeat
If LoggedIn=False then
Begin
Break;
End else
FindChopTree;
Until (InventoryFull=True);
Repeat
If LoggedIn=False then
Begin
Break;
End else
BurnInv;
Until (InventoryCount=1);
Loadsdone:=Loadsdone+1
End;
Procedure SetupScript;
Begin
SetupSRL;
Writeln('=====================================================')
Writeln('=-Successfully Started Phlames Power Chopper/Burner-=')
Writeln('=====================================================')
LoginRoutine;
Loadsdone:=0
Tinderbox:=1
Lognumber:=2
end;
Begin
SetupScript;
repeat
If LoggedIn=False then
Begin
Break;
End else
Chopfull
Until (Loadsdone=Loadswanted)
LogOut;
Exit;
End.