Bug Actionbar methods always returning false

Discussion in 'Developer Support' started by Zasz, May 18, 2016.

  1. Zasz

    Joined:
    Jun 20, 2015
    Messages:
    181
    Likes Received:
    52
    Code (Text):
    1. for(Slot m : ActionBar.getFilledSlots()){
    2.                 if(adrenPercent<100){
    3.                      
    4.                      if(Globals.stringInArray(m.getName(), Threshholds)){
    5.                             System.out.println("Found thresh");
    6.                             if(!m.isCoolingDown() || m.isReady()){
    7.                                 Keyboard.typeKey(m.getKeyBind());
    8.                                 System.out.println("Activating thresh");
    9.                                 //m.activate(true);
    10.                                 return;
    11.                             }
    12.                      }
    13.                } else {
    14.                         if(Globals.stringInArray(m.getName(), Ultimates)){
    15.                             System.out.println("Found ult");
    16.                             if(!m.isCoolingDown() || m.isReady()){
    17.                                 Keyboard.typeKey(m.getKeyBind());
    18.                                 System.out.println("Activating ult");
    19.                                 //m.activate(true);
    20.                                 return;
    21.                             }
    22.                         }
    23.                 }
    24.                 }
    The slot.activate() method doesn't work either, but getKeyBind() works. But it will find the ability and never activate. @Vaped
     
  2. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,779
    Likes Received:
    733
    Could be due to the global cooldown. I'll see if I can replicate this issue (never activating) with Alpha Fighter later today.
     
  3. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,300
    Likes Received:
    729
    @SlashnHax What happened?
     
  4. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,779
    Likes Received:
    733
    It was activating, but it looks like activate() uses isCoolingDown(), which includes the global 3s cooldown after each skill is cast, including the ones automatically activated when in Revolution mode, meaning that there is a very small window that the bot will activate skills.
     
  5. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,300
    Likes Received:
    729
    It uses isReady() which means isActivatable() && !isCoolingDown(). Are you suggesting it should be changed? If so how?
     

Share This Page

Loading...