foshomyninja Posted January 19, 2020 Share Posted January 19, 2020 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. Can this be added to the API? If not, are there any other ways to achieve the same functionality? Quote Link to comment Share on other sites More sharing options...
Muffins Posted January 20, 2020 Share Posted January 20, 2020 Whats the use case for this? Giving us some more insight might help. Quote Link to comment Share on other sites More sharing options...
foshomyninja Posted January 20, 2020 Author Share Posted January 20, 2020 (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 January 20, 2020 by foshomyninja Quote Link to comment Share on other sites More sharing options...
Camaro Posted January 21, 2020 Share Posted January 21, 2020 The XCharacter interface seems to have some methods related to hitsplats that you could try to mess around with. Once you have a player object, you can access these by player.accessor. I would probably set off an async event to loop over all players and check their hitsplat info individually. Quote Link to comment Share on other sites More sharing options...