1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Some API that I think should be added.

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

  1. red

    red

    Joined:
    Nov 17, 2013
    Messages:
    259
    Likes Received:
    111
    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. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    I'm going to add a basic ChatBox class which will be expanded later on, thanks for the idea.
     
  4. dog_

    Joined:
    Nov 3, 2013
    Messages:
    277
    Likes Received:
    95
    l2final red ;)
     
  5. red

    red

    Joined:
    Nov 17, 2013
    Messages:
    259
    Likes Received:
    111
    me no final dog
     
  6. drizzy

    Joined:
    Nov 19, 2013
    Messages:
    2
    Likes Received:
    0
    isInCombat()
    isMoving()
    distanceTo()
    turnTo(locatable)
    Walking in general.
     
    #6 drizzy, Nov 19, 2013
    Last edited: Nov 19, 2013
  7. red

    red

    Joined:
    Nov 17, 2013
    Messages:
    259
    Likes Received:
    111
    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. drizzy

    Joined:
    Nov 19, 2013
    Messages:
    2
    Likes Received:
    0
    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. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
     
  10. dog_

    Joined:
    Nov 3, 2013
    Messages:
    277
    Likes Received:
    95
    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. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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...