View Full Version : reflection help
uncfan1119
12-16-2010, 02:30 AM
I'm trying to make a simple reflection fighting script. I want to wait until the animation is -1 (no animation) to click the next NPC. But the animation goes from #### back to -1 while fighting the NPC, it does not just stay at ####.
-So, if you understand what I'm asking "how can I make a wait until the animation equals -1 for atleast 2 seconds?"
Wait((until)animation = '-1'));
This is what I got, idk if it's even work to detect -1..
TomTuff
12-16-2010, 02:34 AM
program TA;
{$i SRL\SRL.scar}
{$i Reflection\Reflection.simba}
function Fighting: Boolean;
var
T: Integer;
Me: TMe;
begin
Me := GetMe;
if Me.InFight then
begin
MarkTime(T)
repeat
Wait(10 + Random(15))
until (TimeFromMark(T) > 2000);
Me := GetMe;
Result := Me.InFight;
end;
end;
function rInFight: boolean; // By Narcle
var
T: Integer;
begin
T := GetSystemTime + 2405;
repeat
wait(66)
if (GetAnimation > -1) then
Result := true;
until Result or (GetSystemTime > T);
end;
...
i luffs yeww
12-16-2010, 02:35 AM
repeat
if(Me.GetAnimation = -1)then
begin
Wait(1500 + Random(1000));
if(Me.GetAnimation = -1)then
//Do whatever.
end;
until(Me.GetAnimation = -1);
Or something.
Or the other two options. :p
Bad Boy JH
12-16-2010, 11:23 AM
MarkTime(Mark)
repeat
if GetAnimation <> -1 then
marktime(mark)
until timefrommark(Mark) > 2000
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.