View Single Post
03-14-18, 01:03 PM   #15
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Originally Posted by MunkDev View Post
Lua Code:
  1. IsIndoors()
1- Cities have other buildings that aren't inns, too.
2- Rested state only updates when you enter or leave the city (a.k.a. PLAYER_UPDATE_RESTING only fires then.)

Checking for IsIndoors(), the script will see you aren't indoors once you enter the city and stop there. The music won't play while inside inns that are within cities.
If you were inside a building while the script runs (tping back from an instance, or if the event fires at login), then it'll see you're indoors, and play the music constantly even after leaving.

If there is an event that tells when you go indoors/outdoors, that would make it activate in buildings that aren't inns, so that's not reliable either.

Last edited by Ammako : 03-14-18 at 01:05 PM.
  Reply With Quote