local MusicEffect = {
	[2948] = CONST_ME_SOUND_GREEN, --Wooden Flute
	[2949] = CONST_ME_SOUND_GREEN, --Lyre
	[2950] = CONST_ME_SOUND_GREEN, --Lute
	[14253] = CONST_ME_SOUND_GREEN, --Drum
	[2953] = CONST_ME_SOUND_BLUE, --Panpipes
	[2954] = CONST_ME_SOUND_GREEN, --Simple Fanfare
	[2955] = CONST_ME_SOUND_GREEN, --Fanfare
	[2956] = CONST_ME_SOUND_GREEN, --Royal Fanfare
	[2958] = CONST_ME_SOUND_RED, --War Horn
	[2959] = CONST_ME_SOUND_BLUE, --Piano
	[2960] = CONST_ME_SOUND_BLUE, --Piano
	[2961] = CONST_ME_SOUND_BLUE, --Piano
	[2962] = CONST_ME_SOUND_BLUE, --Piano
	[2963] = CONST_ME_SOUND_BLUE, --Harp
	[2964] = CONST_ME_SOUND_BLUE, --Harp
	[3219] = CONST_ME_SOUND_GREEN, --Waldo's Post Horn
	[3252] = CONST_ME_SOUND_GREEN, --Post Horn
	-- non movable instruments
	[3255] = CONST_ME_SOUND_GREEN, --Drum
	[3256] = CONST_ME_SOUND_GREEN, --Simple Fanfare
	[3103] = CONST_ME_SOUND_YELLOW, --Cornucopia
	[3258] = CONST_ME_SOUND_GREEN, --Lute
	[3259] = CONST_ME_SOUND_BLUE, --Horn of Sundering
	[3260] = CONST_ME_SOUND_GREEN, --Lyre
	[3261] = CONST_ME_SOUND_BLUE, --Panpipes
	--
	[2951] = CONST_ME_SOUND_BLUE, --Bongo Drum
	[2965] = CONST_ME_SOUND_GREEN, --Didgeridoo
	[2966] = CONST_ME_SOUND_RED, --War Drum
	[5786] = CONST_ME_SOUND_GREEN, --Wooden Whistle
	[12602] = CONST_ME_SOUND_BLUE, --Small Whistle
}

local music = Action()
function music.onUse(player, item, fromPosition, target, toPosition, isHotkey)
	player:addAchievementProgress("Rockstar", 10000)
	item:getPosition():sendMagicEffect(MusicEffect[item.itemid])
	return true
end

for index, value in pairs(MusicEffect) do
	music:id(index)
end

music:register()
