adamk33n3r / runelite-watchdog

Custom notification plugin for RuneLite
BSD 2-Clause "Simplified" License
6 stars 24 forks source link

Create new alert based on stat value #135

Closed TicTac7x closed 7 months ago

TicTac7x commented 7 months ago

Describe the solution you'd like I would like to create a new notification for specific stat value. For example, i want to alert when my prayer drops to 57, to tell me that I can now drink a prayer potion.

Describe alternatives you've considered I tried to create notification by selecting "Stat Changed", and setting "Changed Amount == 57", but it doesn't work, because i need the event to fire on stat value not stat change.

Additional context I would also like to create HP low alert in similar fashion, maybe this makes more sense.

Current workaround I am currently using "Idle Notifier" in tandem with this plugin. Idle notifier plugin sends ingame messages about low health and low prayer and then i use those messages to send custom sound with this plugin. Would be nice to be able to disable that plugin, notifications and ingame messages and just use this plugin for the custom sounds.

adamk33n3r commented 7 months ago

Set the changed amount to your current level - 57

adamk33n3r commented 7 months ago

I do eventually want to add an option to have it be "value" rather than "changed by", but it's technically possible. You just have to update it based on your current level

TicTac7x commented 7 months ago

Doesn't seem to be working for me. Tried all of the operators, no matter what the number value is set, the trigger is not working.

For example... image

Am i doing something wrong?

adamk33n3r commented 7 months ago

Oh my apologies, I didn't indicate that it needs to be negative. A positive value triggers for buffs. So the alert you sent would fire if your prayer got to 28 levels higher. Let me know if setting it to -28 solves that for you.

TicTac7x commented 7 months ago

Thanks, it worked. The whole process was more difficult than i expected and the UI is bit rough. "-28" is cut off and shown as "-2" in the panel now.

adamk33n3r commented 7 months ago

Feel free to make a PR if you think you can improve it. Let me know what you found difficult about the whole process. Especially as a fellow programmer, that surprises me.

Btw, try hovering over the settings. Everything has a tooltip. image

TicTac7x commented 7 months ago

I just got thrown off by not being able to set the specific stat level when to trigger the alert. And then since i didn't think about buffs and that i have to insert the - before it made things even worse...

I will take a look at the code later, if it's easy enough to add it in, then i'll probably open the PR for it, will see :stuck_out_tongue:

adamk33n3r commented 7 months ago

I just got thrown off by not being able to set the specific stat level when to trigger the alert. And then since i didn't think about buffs and that i have to insert the - before it made things even worse...

There are plans to add an absolute value mode in the next release, so then you'll be able to set it to the level you want! This alert type was originally designed for alerting on a delta so that while you're levelling you don't have to keep updating it to higher levels. And I don't think this alert type got much use for a long while so it really hasn't been changed since inception. I think most people go the Idle Notifier route.

TicTac7x commented 7 months ago

Yes, i used idle notifier before as well, but thats a past thing. I'm now in the big boy league, where samuel tells me to "Sip a prayer potion you mothertrucker!" 😂