Jump to content

HitSplat API


Recommended Posts

Posted

Hi, I'm looking for a HitSplat API, similar to RuneLite's HitSplat API (https://github.com/runelite/runelite/blob/master/runelite-api/src/main/java/net/runelite/api/Hitsplat.java)

Basically, I need an event (e.g. `onHitsplat`) that is triggered any time there is a HitSplat on my screen, whether it's on my user or on another user. And I need to be able to get the  player the hitsplat was on.

  1. Can this be added to the API?
  2. If not, are there any other ways to achieve the same functionality?
Posted (edited)

I need to hook into an event that is triggered whenever a hitsplat appears on the screen.  

If I'm standing around 10 people in combat, there would be anywhere from 10-20 hitsplats on the screen at any given time. I want an action triggered on each of those hitsplats.

Every time the event is triggered, I want an object like `Hitsplat hitsplat`, where the hitsplat class may look something like this:

class Hitsplat {
    Player player;
    HitsplatInfo info;
}

class HitsplatInfo {
	int damage;
  	HitsplatType type;
}

enum HitsplatType {
	DAMAGE,
  	POISON,
  	VENOM,
  	BLOCK
}

That way, I know which player the hitsplat was on, and using that player, I can get their opponent with `getInteracting()`.

That's all I need, the details don't really matter. I know Runelite allows me to do this, as I've already written a plugin to do it...but I'd like to script it in OSBot as well. Just need to know if this kind of an API exists or if it can be created to match the functionality of Runelite. Or, if there is another way to achieve this without having to write an entire library on my own.

Cheers!

Edited by foshomyninja

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...