Results 1 to 7 of 7

Thread: [OGL] .isFinished() Bug?

  1. #1
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default [OGL] .isFinished() Bug?

    Okay so I have been going through hell and back with my timers. After countless hours making changes to my script and comparing other WORKING scripts with countdowns I realized a difference.
    If you have actionBar.getXXX AND isFinished() it will not start the setTime(?) or something and will continuously spam click. An example..

    Here's my summon procedure - I altered the times for testing purposes again this happens with other wait times as well not just this one procedure/setTime..
    Simba Code:
    procedure Summon;
    begin
      pouch := ogl.getTextures(133365);
      mouse.click(pouch[0].toPoint().randomizePointEllipse(5), 1);
      canSummon.setTime(Random(16500,18000));
    end;

    Simba Code:
    else if {actionBar.getSummoningPoints() > 10 and} length(ogl.getTextures(133365)) and canSummon.isFinished() then
        Reaction:=@Summon

    As you can see I have getSummoningPoints quoted out and it runs as expected, my setTime in my Summon procedure works correctly. BUT if I do the following...

    Simba Code:
    else if actionBar.getSummoningPoints() > 10 and length(ogl.getTextures(133365)) and canSummon.isFinished() then
        Reaction:=@Summon

    or even this...

    Simba Code:
    else if actionBar.getSummoningPoints() > 10 and canSummon.isFinished() then
        Reaction:=@Summon

    It will just start spam clicking the pouch to summon until of course the Summoning Points are under the threshold set. I have been able to reproduce this with all actionBar.gets that I have tried so far. Anyone else able to confirm this/ experienced this?
    Last edited by Clutch; 04-24-2015 at 11:38 PM.

  2. #2
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    Parentheses.
    They'll getcha!

    without them:

    Simba Code:
    else if actionBar.getSummoningPoints() > 10 and length(ogl.getTextures(133365)) and canSummon.isFinished() then
        Reaction:=@Summon

    basically turns into:

    Simba Code:
    else if actionBar.getSummoningPoints() then
        Reaction:=@Summon

  3. #3
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by Ross View Post
    They'll getcha!

    without them:

    Simba Code:
    else if actionBar.getSummoningPoints() > 10 and length(ogl.getTextures(133365)) and canSummon.isFinished() then
        Reaction:=@Summon


    basically turns into:

    Simba Code:
    else if actionBar.getSummoningPoints() then
        Reaction:=@Summon
    Just an example, occurs for eating food where you have to know your HP. Can just set a a wait time on those, but I see what your saying for summoning technically doesn't need a threshold yet it does need a timer or for me to add in for it to detect the familiar opposed to a timer. Might be my workaround for the summoning portion.

  4. #4
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Clutch View Post
    Just an example, occurs for eating food where you have to know your HP. Can just set a a wait time on those, but I see what your saying for summoning technically doesn't need a threshold yet it does need a timer or for me to add in for it to detect the familiar opposed to a timer. Might be my workaround for the summoning portion.

    I think you may have missed the point, basically what I'm saying is that your function needs to be this:

    Simba Code:
    else if (actionBar.getSummoningPoints() > 10) and (length(ogl.getTextures(133365) > 0) and (canSummon.isFinished()) then
        Reaction:=@Summon

    in other words:

    Simba Code:
    else if (condition) and (condition) and (condition) then
        Reaction:=@Summon

  5. #5
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by Ross View Post
    I think you may have missed the point, basically what I'm saying is that your function needs to be this:

    Simba Code:
    else if (actionBar.getSummoningPoints() > 10) and (length(ogl.getTextures(133365) > 0) and (canSummon.isFinished()) then
        Reaction:=@Summon

    in other words:

    Simba Code:
    else if (condition) and (condition) and (condition) then
        Reaction:=@Summon
    Huh...that works. This goes back to what we were talking about the other day... gonna re-read what we went over because that just doesn't make sense to me. Only thing I'm getting is thats just the way it is. I just want all of this to start making sense haha

  6. #6
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Clutch View Post
    Huh...that works. This goes back to what we were talking about the other day... gonna re-read what we went over because that just doesn't make sense to me. Only thing I'm getting is thats just the way it is. I just want all of this to start making sense haha
    They're just parentheses, it's just like in math.

    1 + (2 * 3) = 7

    (1 + 2) * 3 = 9

    You need to have parentheses around the conditions in the if statement, or everything's going to be wonky.

  7. #7
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default

    Thank you, very useful way of looking at it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •