SRL Archive - OSR Help

Net Fishing Animation Help Required


NickMystre

2012-01-22 13:23:02

The traditional method to monitor animations is to use the AveragePixelShift function. I am looking specifically at the net fishing one - which takes about 2 1/2 seconds to complete. So to be sure you are 'measuring' only the net fishing animation, you need to monitor more than just one cycle - perhaps even 3 or 4. This is to make sure that the animation you are 'monitoring' is indeed the net fishing one - and not someone running past you or any other movements to the side of you.

This means that checking for animation will take several multiples of the approx. 2.5 secs that net fishing has. This seems to me to be a rather long time just to monitor an animation - especially if you have this in a loop.

Are their any words of wisdom on this to reduce this to a more reasonable time - say 1 sec ? Have I missed a trick that the experienced scripters of this forum are using. Thank you!

RISK

2012-01-22 13:25:45

function IsMining: Boolean;
begin
Result := (PixelShift(IntToBox(MSCX - 15, MSCY - 15, MSCX + 15, MSCY + 15), 1500) > 500);
end;

That is my mining check in my scripts. It relies on PixelShift, as you can see and it is very accurate as I have found.

I also created this to help grab the animations and find out the information I required for my mining check:
procedure AnimationGrabber;
var
I: Integer;
begin
WriteLn('Animations for the character:');

for I := 0 to 20 do
begin
WriteLn('I - ' + ToStr(I) + ': ' + ToStr(PixelShift(IntToBox(MSCX - 15, MSCY - 15, MSCX + 15, MSCY + 15), 1000)));
end;

WriteLn('Done grabbing animations, please check the debug.');
end;

NickMystre

2012-01-22 14:51:53

From: RISK
function IsMining: Boolean;
begin
Result := (PixelShift(IntToBox(MSCX - 15, MSCY - 15, MSCX + 15, MSCY + 15), 1500) > 500);
end;

That is my mining check in my scripts. It relies on PixelShift, as you can see and it is very accurate as I have found.

I also created this to help grab the animations and find out the information I required for my mining check:
procedure AnimationGrabber;
var
I: Integer;
begin
WriteLn('Animations for the character:');

for I := 0 to 20 do
begin
WriteLn('I - ' + ToStr(I) + ': ' + ToStr(PixelShift(IntToBox(MSCX - 15, MSCY - 15, MSCX + 15, MSCY + 15), 1000)));
end;

WriteLn('Done grabbing animations, please check the debug.');
end;


RISK - I see that you capture your PixelShift over 1.5 seconds. I suppose that their is no getting away from it - if your animation is that long - then you need to check it over at least one cycle - perhaps more.

I appreciate your scriptlets however and thanks for your feedback. :)

RISK

2012-01-22 15:12:25

I do a 1.5 second check because of the pause in animation when it goes to an idle animation for a 'bit in mining. It can be lowered as much as you desire depending on the animation, you see. It just requires a 'bit of tweaking to your preference.