LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Lua Programming Help (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=50)
-   -   Event for successful use of a skill. (https://www.lotrointerface.com/forums/showthread.php?t=1793)

Lumbra 04-24-2012 11:15 AM

Event for successful use of a skill.
 
Hello everyone,

does anybody know if there's an event in lua, that fires on the successful use of any skill?

Best regards,
Michael

Sethladan 04-24-2012 03:17 PM

As far as I know, and according to DigitalUtopia (here), there's no such event. However, see the last few posts of the same thread for ideas to monitor the chat/combat log to detect successful skill uses.

moebius92 04-24-2012 04:53 PM

There's SkillInfo - you might use it as a starting point. It's really keyboard based (there's hooks for user created quickslots - so technically you could completely replace the built-in quickslots, but I've never done that), so it may not be suitable for whatever you're planning. It uses a keypress/mouse click -> power drop -> combat log message model in order to detect skill uses. You can skip either the power drop or combat log message, but since all skill uses are user initiated, it does require detecting an appropriate keypress/mouse click.

Lumbra 04-26-2012 09:06 AM

I will have a look at this plugin. But I don't think that I will be able to use it with KragenBars2.

My problem there is, that the tooltips of 4 rune-keeper-skills are changing denpending on the skill category (frost, strom, fire) is casted. I've started to read the combat log now, to figure out, when a damage skill is fired. Then I deactivate and activate the skill again. But on the strom skills it doesn't work properly, and only if the second strom skill in a row was used the tooltip changes.

So it would be great, if there's an event that fires by changing the damage type; but it's not, so I have to find another way - timer based refreshing wouldn't be a good idea I think...

Quote:

Originally Posted by moebius92 (Post 7857)
There's SkillInfo - you might use it as a starting point. It's really keyboard based (there's hooks for user created quickslots - so technically you could completely replace the built-in quickslots, but I've never done that), so it may not be suitable for whatever you're planning. It uses a keypress/mouse click -> power drop -> combat log message model in order to detect skill uses. You can skip either the power drop or combat log message, but since all skill uses are user initiated, it does require detecting an appropriate keypress/mouse click.


moebius92 04-26-2012 06:55 PM

Oh, if that's what you're trying to do, I'd cheat. Look for an integer power drop - probably indicates a skill use. Every time that happens, refresh the tool tip.

Edit: Just occurred to me - I'm not positive *when* the affinity changes with regards to the power drop and the combat message. You may need to play around with delaying the refresh.

Lumbra 04-28-2012 04:54 PM

Hmm, I tried to delay the refresh - but it doesn't work - my client hangs...

The other way does not work too - delaying with the Update-method of Turbine.UI.Control...

How can I solve this? I'm new to lua...

moebius92 04-28-2012 05:52 PM

You need to use the Update method on a control. Make sure you SetWantsUpdates(true) on that control, and that nothing is setting it to false.


All times are GMT -5. The time now is 05:13 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI