Resolved Animating

Discussion in 'Developer Support' started by Matty20, Jul 31, 2016.

  1. Hi guys,

    How do I check if the player is animating or doing an action?
  2. Best Answer:
    Post #2 by SuperBotter, Jul 31, 2016
  3. Players.getLocal().getAnimationId() returns...the Animation ID. This allows you to know what action a player is doing. For example, when this returns -1, the player is just standing still, doing nothing. When it returns 624, the player is mining. You can use the Development Toolkit to find the Animation ID to any action you need.
    Matty20 likes this.
  4. Thank you for your help SuperBotter.
  5. You're welcome. I hope to see some bots from you in the future :)
  6. Thanks SuperBotter, I've got a pretty good working Portable bot. Just making it better and making it so I can use different portables.
    Can you help me with adding a combobox to the runemate interface so I can choose what portable I am using?
  7. For GUI stuff in my bots I used Tutorial - EmbeddableUI Tutorial/Reference. I had to change some of it to be specific to my bot instead of to flax picking, but the code shouldn't be too hard to understand. The example GUI includes a combobox that you can modify for your uses.
  8. Thanks, you have been a great help.
  9. Hmmm, as for animation IDs, if you're only worried about if the player is animated, animationId != -1 would do, but if you're looking for a specific animation, animationId == specificAnimationId would be what you want. This is important cases where animations can be different depending on the player.
    Matty20 likes this.

Share This Page