Resolved Magic.isSelected() broken on OSRS.

Discussion in 'Client & Site Support' started by Defeat3d, Sep 18, 2015.

  1. Best Answer:
    Post #4 by Cloud, Sep 18, 2015
  2. It relies on border thickness changing. Do getComponent() and then check it's border thickness when it is and isn't selected.
     
  3. Looks like it's reversed for some reason, isSelected() returns false when I select the spell (border thickness 2) and returns true when it's not selected (border thickness 0).

    Code (Text):
    1. (05:02:35) Selected: false
    2. (05:02:35) Border thickness: 2
    3. (05:02:35) Selected: true
    4. (05:02:35) Border thickness: 0
    Code (Text):
    1.         add(new CTask() {
    2.  
    3.             private InterfaceComponent alch;
    4.  
    5.             @Override
    6.             public void execute() {
    7.                 System.out.println("Selected: " + Magic.HIGH_LEVEL_ALCHEMY.isSelected());
    8.                 System.out.println("Border thickness: " + alch.getBorderThickness());
    9.             }
    10.  
    11.             @Override
    12.             public boolean validate() {
    13.                 return (alch = Magic.HIGH_LEVEL_ALCHEMY.getComponent()) != null;
    14.             }
    15.  
    16.         });
     
  4. Fixed for the next release.
     

Share This Page

Loading...