View Single Post
04/25/14, 08:48 AM   #14
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
K I think I have it but the game is in Maintenance currently. Here is the code I have so far.

Lua Code:
  1. LootDice:SetHandler( "OnMoveStop", function()
  2.      -- overwrite default position with the updated position of your addon here
  3. end)
  4.  
  5. local savedVars = ZO_SavedVars:New(savedVariableLootDice, 1, defaults)
  6.  
  7. local defaults =
  8. {
  9.     offsetX = 0,
  10.     offsetY = 0,
  11. }
  12.  
  13. function RollDice()
  14.     local num = math.random(1,100)
  15.     return num
  16. end
  17.  
  18. EVENT_MANAGER:RegisterForEvent("LootDice", EVENT_ADD_ON_LOADED, OnAddOnLoaded)
  Reply With Quote