@luangop
to usando esse...
Só adaptando as montarias e outfit
Como quero usar 10 itens diferentes.... como faço? Crio 10 itens novos??
local table = {
-- Montaria de até 100 reais do mês x
[26194] = {mountId = 58, mountName = "Blackpelt"},
-- Montaria de 101 a 200 reais do mês x
[26194] = {mountId = 107, mountName = "Gold Sphinx"},
-- Montaria de 201 a 400 reais do mês x
[26340] = {mountId = 23, mountName = "Armoured War Horse"},
-- Montaria de 401 a 600 reais do mês x
[26341] = {mountId = 45, mountName = "Carpacosaurus"},
-- Montaria de 601 a 700 reais do mês x
[24760] = {mountId = 65, mountName = "Flying Divan"},
-- -- Montaria de 701 a 800 reais do mês x
-- [24760] = {mountId = 145, mountName = "Jousting Eagle"},
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local useId = table[item.itemid]
if not useId then
return false
end
if not player:hasMount(useId.mountId) then
player:addMount(useId.mountId)
player:say("You receive the permission to ride a ".. useId.mountName ..".", TALKTYPE_MONSTER_SAY)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
item:remove(1)
else
player:sendCancelMessage("You already have this mount.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end