Jump to content

Franimal

Members
  • Posts

    7
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

604 profile views

Franimal's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. Some problems may arise with that though; there are cases where they will be facing and not dying to you
  2. Is there a method on the NPC class like npc.getInteractingEntity() or something? If there is you could use if(npc.getInteractingEntity().equals(getMyPlayer()) && npc.getAnimation() == deathAnim) count++; That kind of thing could work.
  3. I assume NPC animations are in the API, as well as entity interactions, in which case you can check for death animation while you are interacting and add to kill count. I'm just assuming though, I've never actually written a script for osbot.
  4. You'd have to clarify that question.. BotState is an enum, a group of definitions/types. I could give botState parameters; integers, strings, whatever. I can then create an instance of BotState and set it equal to one of the types of BotState, and later check which it is. An easier example of an enum would be something like: private enum Planet { MARS(), JUPITER(), EARTH(), NEPTUNE(); } I could then assign values to them like distance from earth or mass and add getter methods to it private enum Planet { MARS(500, 20000), JUPITER(10000, 200000), EARTH(700, 100), NEPTUNE(100000, -500); private final double distance; private final double mass; public Planet(double distance, double mass){ this.distance = distance; this.mass = mass; } public double mass(){ return mass; } public double distance(){ return distance; } } This would allow me to make a variable currentPlanet, which I could set to any Planet that exists, earth, mars, whatever, and it would then contain that planets distance and mass, which I could check and use. I assume that's what you were asking. :p
×
×
  • Create New...