Some API that I think should be added.

Discussion in 'Client & Site Suggestions' started by red, Nov 19, 2013.

  1. Code (Text):
    1.  
    2.     public static boolean canContinue() {
    3.         return getContinueComponent() != null;
    4.     }
    5.     public static void clickContinue() {
    6.         if (canContinue()) {
    7.             WidgetComponent w = getContinueComponent();
    8.             w.click();
    9.         }
    10.     }
    11.     public static WidgetComponent getContinueComponent() {
    12.         List<Widget> valid = Widgets.getLoaded();
    13.         for (Widget iface : valid) {
    14.             for (WidgetComponent component : iface.getComponents()) {
    15.                 if (component.getText().equals("Click here to continue") && component.isValid()) {
    16.                     return component;
    17.                 }
    18.             }
    19.         }
    20.         return null;
    21.     }
    I will probably keep this topic updated
     
  2. An entire chat api would probably be a good idea. A magic api would also be useful.
     
    #2 Cloud, Nov 19, 2013
    Last edited by a moderator: Nov 20, 2013
  3. I'm going to add a basic ChatBox class which will be expanded later on, thanks for the idea.
     
  4. l2final red ;)
     
  5. me no final dog
     
  6. isInCombat()
    isMoving()
    distanceTo()
    turnTo(locatable)
    Walking in general.
     
    #6 drizzy, Nov 19, 2013
    Last edited: Nov 19, 2013
  7. isInCombat() not sure
    isMoving() -> getSpeed, 0 is not walking, 1 is walking, 2 is running
    distanceTo() -> easy method a^2 + b^2 = c^2
    turnTo() -> dunno
    Walking -> non-webwalking probably needs to be implemented(might make it myself)
     
  8. isInCombat() - Absolutely yes
    Okay
    distanceTo() - Not sure if you're trolling, or an idiot.
    turnTo() - Absolutely yes
    Walking - There's no means of walking right now.
     
  9.  
  10. actually that's wrong
    well 0 is not walking, but the other 2 differ on how far you're walking
    walking is 1 and sometimes 2 for longer distances
    running is 2 and sometimes 3 for longer distances
     
  11. Correct, technically it's the size of the walking queue, however it's far simpler for most developers to understand the concept of speed.
     

Share This Page

Loading...