|
12/06/15, 04:33 AM | #1 | |
Join Date: Nov 2015
Posts: 20
|
Get Ability/Skill name from "EVENT_SKILL_RANK_UPDATE"?
Hi,
I am wondering if it's possible to retrieve the actual skill/ability name from the event which is fired when it levels up. I think you can manually get it by outputing the info when you level up and write it down etc, but i am assuming there must be some logic behind it. The event gives 2 numbers that coordinate this, the "type" and "index". EVENT_SKILL_RANK_UPDATE, function(eventCode, skillType, skillIndex, rank) From my current assumption, on a Termplar at least, i think it's something like this for some skills. //Copy pasting my code as i am lazy to rewrite, but should be clear enough. //EDITED later on when i figured out how the Type/Indexing worked, probably* Code:
if skillType == 1 and skillIndex == 1 then type = "Aedric Spear" elseif skillType == 1 and skillIndex == 2 then type = "Dawn's Wrath" elseif skillType == 1 and skillIndex == 3 then type = "Restoration Light" elseif skillType == 2 and skillIndex == 1 then type = "Two Handed" elseif skillType == 2 and skillIndex == 2 then type = "One Hand and Shield" elseif skillType == 2 and skillIndex == 3 then type = "Dual Wield" elseif skillType == 2 and skillIndex == 4 then type = "Bow" elseif skillType == 2 and skillIndex == 5 then type = "Destruction Staff" elseif skillType == 2 and skillIndex == 6 then type = "Restoration Staff" elseif skillType == 3 and skillIndex == 1 then type = "Light Armor" elseif skillType == 3 and skillIndex == 2 then type = "Medium Armor" elseif skillType == 3 and skillIndex == 3 then type = "Heavy Armor" elseif skillType == 4 and skillIndex == 1 then type = "Legerdemain" elseif skillType == 4 and skillIndex == 2 then type = "Soul Magic" end Meaning, if i level up in restoration staff it would output "skillType 2 and skillIndex 6", that way i can assume that those two number combined is Restoration Staff. If there is a way to actually know this without doing it that way it would be nice though, as it's kinda a pain;p *EDIT: After looking into it, it seems quite logical. Type is the "Category", so Class is 1, Weapons is 2, Armor is 3. Index is, well index in that Category. I looked up the variables, and "SKILL_TYPE_ARMOR" has the value of 3, which is correct. Now, if only one could reverse it, so knowing the numbers could retrieve the name of the skill. Most of the skills i am sure remain constant, but Classes don't for example. Last edited by Zerowalker : 12/06/15 at 05:17 AM. |
|
12/06/15, 02:51 PM | #2 |
|
This gives you the name:
Lua Code:
|
12/06/15, 02:57 PM | #3 | |
Join Date: Nov 2015
Posts: 20
|
Are you kidding me, was it so simple, was looking for such a function but thought that it surely couldn't exist -_-!
Thanks Also, got other questions, should i ask them here or create new threads? One is if there is an event when skillpoint and skyshards are earned, can't find that. Other is if there is a way to get the Center_Announcement text, all in the current queue i guess. |
|
12/08/15, 03:58 PM | #4 | |
|
Lua Code:
SkyShards: Same answer, EVENT_SKILL_POINTS_CHANGED Lua Code:
Center Screen Announcements: This grabs the queued event to be displayed for the center screen announcements after all checks have been made, right before it gets displayed. This means some messages could be blocked (but they are supposed to be), like when your at the crafting station or duplicate messages that get sent to often to quickly. Argument Indices:
Warning: Spoiler
Lua Code:
Warning: Spoiler
Lua Code:
Or if you want to grab all messages that are added, regardless of if they are blocked or not and handle the checks yourself you could do something like this:
Warning: Spoiler
Lua Code:
Last edited by circonian : 12/08/15 at 04:31 PM. |
|
12/08/15, 08:10 PM | #5 | |
Join Date: Nov 2015
Posts: 20
|
Wow, and i have been looking all over the place, especially on the Center Announcement,
got into it a bit but had no idea how to grab anything. Really grateful Will have to play around with this. I am assuming the Skyshard thing is supposed to work by checkning amount of them before and after, and if it has increased you assume that you just gained your 3rd Skyshard? |
|
12/09/15, 07:37 PM | #6 | |
|
Since you can't lose skyshards if the partial value changes then you gained one. You don't need to check if it increased. If you only want to know when you gained your "3rd" skyshard then see if the partial value changed and if the new value is 0: Lua Code:
|
|
ESOUI » AddOns » AddOn Help/Support » Get Ability/Skill name from "EVENT_SKILL_RANK_UPDATE"? |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|