Jump to content

HitSplat API


foshomyninja

Recommended Posts

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?
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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