canary/data/scripts/actions/items/party_hat.lua
Marco 2c6b196444
chore: adjusting file locations (#2798)
Removing several duplicate scripts and adjusting the logic of others.
Also added missing achievements.
2024-08-19 11:13:05 -03:00

15 lines
423 B
Lua

local partyHat = Action()
function partyHat.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local headSlotItem = player:getSlotItem(CONST_SLOT_HEAD)
if not headSlotItem or item.uid ~= headSlotItem:getUniqueId() then
return false
end
player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
player:addAchievementProgress("Party Animal", 200)
return true
end
partyHat:id(6578)
partyHat:register()