Essa desgraça de tfs 1.0... :v
local t = {
[12001] = {22001, 'entrepreneur', 471, 472},
[12002] = {22002, 'beastmaster', 636, 637},
[12003] = {22003, 'death herald', 666, 667},
[12004] = {22004, 'ranger', 683, 684},
[12005] = {22005, 'ceremonial garb', 694, 695},
[12006] = {22006, 'puppeteer', 696, 697},
[12007] = {22007, 'spirit caller', 698, 699}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
local v = t[item.itemid]
if v then
if player:getStorageValue(v[1]) == -1 then
if player:getSex() == 0 then
player:addOutfitAddon(v[3], 3)
else
player:addOutfitAddon(v[4], 3)
end
if player:getItemCount(item.itemid) > 0 then
player:removeItem(item.itemid, 1)
else
item:remove(1)
end
player:sendTextMessage(MESSAGE_INFO_DESCR, "You now have the " .. v[2] .. " outfit!")
player:setStorageValue(v[1], 1)
player:getPosition():sendMagicEffect(math.random(1, 67))
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already have the " .. v[2] .. " outfit.")
end
end
return true
end