View Single Post
03-13-18, 04:48 PM   #6
Eungavi
A Theradrim Guardian
Join Date: Nov 2017
Posts: 64
Originally Posted by WhirlyTV View Post
I was wondering if there was a way to tell when you're characters experience bar turns rested. If not I can find all the coordinates of the inns and post them.
Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:RegisterEvent("PLAYER_UPDATE_RESTING")
  3. f:SetScript("OnEvent", function(self, event, ...)
  4.     if IsResting() then
  5.         -- You are now resting. Play some music!
  6.         -- PlayMusic
  7.     else
  8.         -- You are no longer resting. Turn off the music :(
  9.         -- StopMusic
  10.     end
  11. end)

You might want to use PlayMusic and StopMusic function, but cannot 100% guarantee.
  Reply With Quote