Shuttleu
2012-01-01 11:48:46
Currently it returns false if it is already open (if you set Open to true) or if it is already closed (if you set Open to false)
this fixes it
~shut
{*******************************************************************************
function ToggleXPBar(Open: Boolean): Boolean;
By: Narcle & IceFire908
Description: Opens or closes the XP Bar, true if had to toggle.
*******************************************************************************}
function ToggleXPBar(Open: Boolean): Boolean;
var
TPA: TPointArray;
P: TPoint;
T: Integer;
begin
if Open xor IsXPBarOpen then
begin
TPA := TPAFromBox(IntToBox(521, 51, 546, 75));
FilterPointsPie(TPA, 0, 360, 0, 12, 534, 63);
P := TPA[Random(Length(TPA))];
Mouse(P.X, P.Y, 0, 0, true);
T := GetSystemTime + 300;
repeat
wait(1);
Result := Open = IsXPBarOpen;
until Result or (GetSystemTime > t);
end else
result:= True;
end;this fixes it
~shut