So, I actually manage to make my own script to get full addon when click on item, But If i use the item again, I get lighting effect and it remove my item, instead of saying You own no premium account or already own this outfit part
Lua:
local config = {
-- Racoon
[40869] = {female = 1372, male = 1371, addon = 3, effect = CONST_ME_GIANTICE},
}
local addons = Action()
function addons.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local useItem = config[item.itemid]
if not useItem then
return true
end
local looktype = player:getSex() == PLAYERSEX_FEMALE and useItem.female or useItem.male
if useItem.addon then
player:addOutfitAddon(useItem.female, useItem.addon)
player:addOutfitAddon(useItem.male, useItem.addon)
player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
item:remove()
else
if not player:isPremium() or player:hasOutfit(looktype) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You own no premium account or already own this outfit part.')
return true
end
player:addOutfit(useItem.female)
player:addOutfit(useItem.male)
player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
item:remove()
end
return true
end
addons:id(40869)
addons:register()