Log in

View Full Version : Need help with dropping logs in my script.



in_jeopardy
09-04-2006, 04:34 PM
function InventoryFull: Boolean;
Counts all items in inventory. Returns True if full. False if not.

procedure DropAllLogs;
Description:
Will drop all logs, ignoring anythig you can Wield, Birds Nests,
Knifes and Tinder Boxes

Ok, I have these, can comeone please explain (slowly lol) how to use them in my script to get it to drop all of the logs?

program BasicTreeCutter;
//with help from Sumilion =]

{.include SRL\SRL.scar}
Var TempCount, CutMark : integer;

procedure Setup;
begin;
SetupSRL;
ActivateClient;
MouseSpeed := 20;
end;

procedure colourpick1;
begin;
If FindColorSpiral(x, y, 4483168, 000, 000, 516, 337) Then;
begin;
Mouse(x, y, 3, 5, true);
TempCount := InvCount;
MarkTime(CutMark);
repeat
Wait(200)
Until(InvCount = TempCount +1) Or (TimeFromMark(CutMark) >= 10000)
end;
end;

begin;
Setup;
repeat
colourpick1;
until(false)
end.

Thanks.

JLewis
09-04-2006, 04:41 PM
im helping him now

WT-Fakawi
09-04-2006, 04:42 PM
Look closely at the Ratz script. It will tell you all you need :)

Sumilion
09-04-2006, 04:42 PM
This ain't a long question, here is what you should do :

Repeat;
DropAllLogs;
Until Not(FindBitmapMaskTolerance(LogMask, x, y, MIX1, MIY1, MIX2, MIY2, 5, 5))

Ill explain the bitmap mask later, cause you probably don't know how yet. So this alone won't work, but it is the basics of how to get it to work :)

Sumilion
09-04-2006, 05:05 PM
im helping him now
Hey i met him first ! :tongue:

in_jeopardy
09-04-2006, 06:51 PM
Thanks to all of you for your help, especially sumilion who helped with all of the script. here is the finished version:

program BasicTreeCutter;
//with help from Sumilion =]
//whith some guidance on log dropping from JLewis
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}
Var TempCount, CutMark, Mymark : integer;

procedure Setup;
begin;
SetupSRL;
ActivateClient;
MouseSpeed := 20;
end;

procedure colourpick1;
begin;
If FindColorSpiral(x, y, 2246712, 000, 000, 516, 337) Then;
begin;
Mouse(x, y, 3, 5, true);
TempCount := InvCount;
MarkTime(CutMark);
repeat
FindNormalRandoms;
Wait(200)
Until(InvCount = TempCount +1) Or (TimeFromMark(CutMark) >= 10000)
end;
end;

begin;
Setup;
repeat
marktime(mymark);
repeat
colourpick1;
until(InvFull);
If(InvFull) Or (TimeFromMark(CutMark) >= 60000) Then;
begin;
DropAllLogs;
end;
Until(false);
end.