Sweet.
Thanks again.
+Rep
Sweet.
Thanks again.
+Rep
Nice!
I still can't get it to work for chopping.. something like look for the tree (object) after the player stops the chopping animation. Anyone?
Oldgen.
Miner & Urn Crafter & 07 Chicken Killer
SPS BlindWalk Tutorial
Working on: Nothing
teacher in every art, brought the fire that hath proved to mortals a means to mighty ends
SCAR Code:Function notSmashing : Boolean;
var
PBox : TBox;
begin
PBox := IntToBox(245, 190, 285, 195);
Result := (AveragePixelShift(PBox, 5000, 500) < 300);
end;
Does that seem right? :/
Oldgen.
started using it =3 awesome
only problem is when some1 get too close and start atking my character wont move but shhhhhh
This works great for woodcutting scripts. I've used it in my willow cutter. Works really well after adjusting the threshold. Has some minor problems when standing right next to people or behind large trees, but overall its a pretty handy tool.
Thanks Flight, I'm using this in my fisher and it works like a charm
And that PixelShift finding tool is downright handy! Rep+
Last edited by Ian; 11-30-2012 at 02:02 AM.
Yea, this is where I got my chopping and mining checks from
I didn't even see/ read about the pixelshift finding tool.
~Rez
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
Great tut, I got my animation detection working good, but I have one queston, how would I make it click a lot faster after it no longer see's as much pixels shifting?
My code is:
Simba Code:program test;
{$i srl/srl.simba}
const
TREEX=120;
TREEY=81;
TREEX2=382;
TREEY2=226;
Function Choppin: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(249, 134, 277, 180);
Result := (AveragePixelShift(PBox, 200, 300) > 150);
Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
end;
Procedure Woodchop;
var
X, Y: Integer;
begin
if (Choppin) then
begin
//writeln('Waiting to stop Cutting');
wait(100);
end else
begin
//writeln('Lets look for a Tree');
if FindColorTolerance(X,Y,12400,TREEX,TREEY,TREEX2,TREEY2,10)then
MouseSpeed:=15;
mmouse(x, y,1,1);
Wait(350 + Random(150));
ClickMouse(X, Y, mouse_Left);
Wait(500 + Random(700));
end;
end;
begin
repeat
Woodchop;
until (IsKeyDown (114));
end.
Try this bud:
Simba Code:program test;
{$i srl/srl.simba}
const
TREEX=120;
TREEY=81;
TREEX2=382;
TREEY2=226;
Function Choppin: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(249, 134, 277, 180);
Result := (AveragePixelShift(PBox, 200, 300) > 150);
Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
end;
Procedure Woodchop;
var
X,Y: Integer;
begin
if (Choppin) then
begin
//writeln('Waiting to stop Cutting');
wait(100);
end else
begin
//writeln('Lets look for a Tree');
if FindColorTolerance(X,Y,12400,TREEX,TREEY,TREEX2,TREEY2,10)then
begin
mmouse(x,y,1,1);
ClickMouse2(mouse_left)
WaitFunc(@Choppin, 10, 3000); //Wait for 3 seconds if we've started chopping.
end;
end;
end;
begin
SetupSRL;
MouseSpeed:=15;
repeat
Woodchop;
until (IsKeyDown (114));
end.
Current projects:
[ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]
"I won't fall in your gravity. Open your eyes,
you're the Earth and I'm the sky..."
Could this be used to detect if an item has spawned on the ground in a specific spot? I'm a far way from implementing anything like this but I have been thinking about things scripts I make could accomplish. Thanks for the tut!!!
I actually use this same code for my mining script. it's outdated now tho but going to get it running again.
There are currently 1 users browsing this thread. (0 members and 1 guests)