PDA

View Full Version : Help with Tree Cutter



WileyCoyot
11-26-2006, 11:34 PM
the code....

program woodcutter;
{.include SRL/SRL.scar}
{.Include SRL/SRL/Skill/Woodcutting.Scar}




begin
setupsrl;
FindAxeHeadColor: Boolean;
FindHead; Boolean;
AttachHead; Boolean;
if InvFull then DropAllLogs;
until(getskilllevel('woodcutting')=99);
end.

procedure findit;
begin
setupsrl;
LoadFireMakingBitmaps;
if (FindColor(x, y, 2903139)) then begin Mouse(x, y, 1, 1, true);



the error.....

Line 9: [Error] (15875:17): Identifier expected in script
Failed when compiling

(i realize its not close to finishing if anyone would like to help let me know. and ty in advance for the answer.)

Junior
11-27-2006, 12:11 AM
Ok thats not even a script...
First off when you call procedure you dont need the 'Boolean' attatched to it. When you call the procedure find head, take out the procedure after it. You can do this because if the head is lost it will automatically find it for you. I dont think you will want to run a script until you get 99 woodcutting... that will never happen and thats a awfully long time to stay logged in autoing.

And why is there a procedure after your main loop?
That wouldnt even be used because it is after the end with a period after it, meaning everything past the period wont work. '.' atfer an end means the end of the script.

I dont know how I can help you but this is a start.



Procedure FindIt;
Begin
Setupsrl; //Dont need SetUpSRL; in a procedure, once in begining of main loop is fine.
LoadFireMakingBitmaps;
If (FindColor(x, y, 2903139)) Then // Use FindColorSpiralTolerance, or FindColorTolerance instead.
Begin
Mouse(x, y, 1, 1, true);
// needs to be placed before main loop, but I dont even see this procedure called.

Begin
setupsrl;
FindAxeHeadColor;
Repeat // need one repeat to repeat find head and chop

Repeat // need second repeat to repeat until all your logs are cut.
FindHead;
//AttachHead; ---dont need this
Chop; // you will need a chop procedure

If (InvFull) Then // replace this with this > ' Until (InvFull) '

// If (InvFull) Then
DropAllLogs;
until(LogsCut >= LogsToCut);
End.


until(LogsCut >= LogsToCut);

Now LogsCut will be an integer named in the begining of the script. LogsToCut will be set as a Const meaning that number will never changed, and set it to how many you want to cut. Now with "LogsCut" you will need to place this after every time you chop down a log, like this.

LogsCut := LogsCut +1;

That will add '1' to LogsCut.

Any questions ask.
~jR

da_professa
11-27-2006, 05:15 AM
yo help me out plz wid my prob in members help secion plZ