mimus
New Member
- Joined
- Mar 14, 2012
- Messages
- 168
- Reaction score
- 2
im using this mount doll but only worcks whith panda and widow mount can u helpme?
Code:
function onSay(cid, words, param)
local table = {
-- ["mount"] = {price = x, id = x},
["widow"] = {price = 0, id = 1},
["bird"] = {price = 0, id = 2},
["bear"] = {price = 0, id = 3},
["sheep"] = {price = 0, id = 4},
["panther"] = {price = 0, id = 5},
["draptor"] = {price = 0, id = 6},
["titanica"] = {price = 0, id = 7},
["lizzard"] = {price = 0, id = 8},
["blazebringer"] = {price = 0, id = 9},
["rapidBoar"] = {price = 0, id = 10},
["stampor"] = {price = 0, id = 11},
["undeadcavebear"] = {price = 0, id = 12},
["donkey"] = {price = 0, id = 13},
["slug"] = {price = 0, id = 14},
["uniwheel"] = {price = 0, id = 15},
["crystalwolf"] = {price = 0, id = 16},
["panda"] = {price = 0, id = 19},
["dromedary"] = {price = 0, id = 20},
["kingScorpion"] = {price = 0, id = 21}
}
local player, param = Player(cid), string.lower(param)
local mountdoll_id = 9019 -- id do mount doll
local t = table[param]
if player:getItemCount(mountdoll_id) > 0 then
if param ~= "" and t then
if not player:hasMount(t.id) then
player:removeItem(mountdoll_id, 1)
player:sendTextMessage(MESSAGE_INFO_DESCR, "Sua mount foi adicionada!")
Position(getThingPos(cid)):sendMagicEffect(CONST_ME_GIFT_WRAPS)
player:addMount(t.id)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "Voce ja tem esta mount.")
end
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "Digite novamente, algo está errado!")
end
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "Voce não tem um mount doll!")
end
end