Thread: Reviving
View Single Post
06/21/21, 02:13 AM   #3
g0dpain
AddOn Author - Click to view addons
Join Date: Jun 2021
Posts: 2
Originally Posted by Baertram View Post
https://wiki.esoui.com/Main_Page
-> Right top side -> Getting Started
You should read a bit about lua and ESO lua there to make yourself comfortable with it
Here is a forum thread for new devs as well:
https://www.esoui.com/forums/showthread.php?t=8413

Events are listed here:
https://wiki.esoui.com/Events
But the most up2date list of API functions, events etc. will be found here:
https://wiki.esoui.com/APIVersion -> Scroll to the current API version on live/pts (depending on which server you code and test) and check the txt file link at "API TXT Documentation"

Your event would be something around "Life and Death", maybe
EVENT_UNIT_DEATH_STATE_CHANGED (number eventCode, string unitTag, boolean isDead)
You should filter the event so that it does not fire for EVERY unit as a unit is even any enemy:
https://wiki.esoui.com/AddFilterForEvent
Filters are applied before lua code and are speeding everything up, so that the event callbacks in your lua code do not fire for nothing.
e.g. REGISTER_FILTER_UNIT_TAG_PREFIX with the unitTag prefix = "group" for group members

Reviving events:
EVENT_RESURRECT_REQUEST (number eventCode, string requesterCharacterName, number timeLeftToAccept, string requesterDisplayName)
EVENT_RESURRECT_REQUEST_REMOVED (number eventCode)
EVENT_START_SOUL_GEM_RESURRECTION (number eventCode, number durationMs)
EVENT_RESURRECT_RESULT (number eventCode, string targetCharacterName, ResurrectResult result, string targetDisplayName)
Thank you very much for this detailed response!
After work I will look into it
  Reply With Quote