Page 1 of 1

Problem with new target_Object function

Posted: Mon Oct 25, 2010 11:43 pm
by Andreas_B
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:

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;

Re: Problem with new target_Object function

Posted: Tue Oct 26, 2010 12:36 am
by rock5
Hey, great idea. Maybe I can find memory pointers for the color of the cast bar and integrate that behavior in rombot. It will have to be tomorrow though.