A few api suggestions

Discussion in 'Client & Site Suggestions' started by PurpleKush, Mar 17, 2014.

  1. A few suggestions for Players.getLocal

    #isAnimating
    #isMoving
    #isUnderAttack

    I know these can already be done, but it would be nice if it was in the official api :)
     
  2. isAnimating -> getAnimationId() != -1
    isMoving -> getSpeed() != 0
    isUnderAttack -> getCombatGauge() != null

    is it rly that hard
     
    #2 dog_, Mar 17, 2014
    Last edited: Mar 17, 2014
  3. Thanks bae <3
     
  4. May I close?
     
    dog_ likes this.
  5. Purplekush re-read I edited the isMoving part, I durped
     
  6. Re-opened.
     
  7. Imo: Should be closed @Quantum. As it's very easy to do, and if someone would like it to be done that way could simply do it locally.
     
  8. While it is indeed very simple to do these things, to the beginner scripter it may not be quite as obvious of a solution and therefore i think it should be added to the api.
     
    PurpleKush likes this.
  9. If a beginner scripter can't figure this out, then frankly how are they going to figure out other things? I'd rather someone who doens't know what they're doing ask questions on how to check animation, check for objects, npc's, or more then to have every bit of code spoonfed to them hindering their learning.
     
  10. It's not being spoonfed. The whole point of an api is to make things as easy and understandable as possible. This method would simply take the numbers out of the equation and make it easier for the untrained eye of a beginner scripter to understand what's going on in a script bot.
     
  11. Also makes it marginally more readable. How about documenting the convenience method with the "proper" method? For example...

    // Equivalent to getAnimationId() != -1
    public static boolean isAnimating() {

    I feel this encourages learning and discovery of new methods, while still offering the intended convenience.
     
  12. Good idea :)
     
  13. >static
     
  14. >Arbiter
     
    Arbiter likes this.
  15. Hey hey no need for name calling. :p Just trying to mediate between the noob sympathizers and haters. Plus, convenience methods are a norm in just about every major third party library.
     

Share This Page

Loading...