Problem with new target_Object function
Posted: Mon Oct 25, 2010 11:43 pm
In the older version I got immediately the control back from the function. For instance I could check the color of the castbar and retry if it becames red (error or in use) or green (success). With the new version I can't check the color, because the function release the control only when the castbar isn't visible anymore. Therefore the older version works more quickly for me.
Please integrate a color-check ore integrate a parameter to get the old behavior.
The following code I use to check the castbar:
Please integrate a color-check ore integrate a parameter to get the old behavior.
The following code I use to check the castbar:
Code: Select all
local visible = nil;
repeat
visible = RoMScript("CastingBarFrame:IsVisible()");
yrest(100);
until visible;
if visible then
repeat
visible = RoMScript("CastingBarFrame:IsVisible()");
red, green, blue = RoMScript("CastingBarFrame:GetBarColor()");
-- canceled?
if (red == 1) then visible = false; end;
-- accomplished?
if (green == 1) then visible = false; end;
yrest(100);
until visible == false;
end;