K I think I have it but the game is in Maintenance currently. Here is the code I have so far.
Lua Code:
LootDice:SetHandler( "OnMoveStop", function()
-- overwrite default position with the updated position of your addon here
end)
local savedVars = ZO_SavedVars:New(savedVariableLootDice, 1, defaults)
local defaults =
{
offsetX = 0,
offsetY = 0,
}
function RollDice()
local num = math.random(1,100)
return num
end
EVENT_MANAGER:RegisterForEvent("LootDice", EVENT_ADD_ON_LOADED, OnAddOnLoaded)