local MusicEffect = {
[2076] = CONST_ME_SOUND_GREEN, --Fanfare
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 2076 then
-- area
if isInRange(player:getPosition(), Position(32330, 32214, 7), Position(32332, 32216, 7)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Wow that is a terrible song.")
end
-- exact location
if player:getPosition() == Position(32330, 32214, 7) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Wow that is a beautiful song.")
end
end
item:getPosition():sendMagicEffect(MusicEffect[item.itemid])
return true
end