View Single Post
03-13-18, 07:36 PM   #13
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Originally Posted by Eungavi View Post
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.
Originally Posted by Ammako View Post
Also, as far as I'm aware, there isn't an easy/straightforward way to tell whether you are in an inn or not, unless you want the shop music to constantly play while you are anywhere in a major city.
Major cities put your character at rest, aka you will have shop music playing all the time while in cities.
  Reply With Quote