function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isPlayer(cid) then
return true
end
-- Check if player has completed quest with ID 19537
local questStatus = getPlayerStorageValue(cid, 19537)
if questStatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You have not completed the required quest.")
return true
end
local newOutfit
-- Condition to check the item used for outfit change
if item.itemid == SOME_ITEM_ID_FOR_253 then
newOutfit = {lookType = 253, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0}
elseif item.itemid == SOME_ITEM_ID_FOR_255 then
newOutfit = {lookType = 255, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0}
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "Invalid item.")
return true
end
-- Change outfit
doCreatureChangeOutfit(cid, newOutfit)
-- Remove the used item
doRemoveItem(item.uid, 1)
-- Send message
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You've changed into a VIP outfit.")
return true
end