Blz, Tenta assim amigo:
function onSay(cid, words, param)
local cfg = {storage = 6666,monster = "Horse",speed = 600,lookType = 327,time = 600 * 6000 * 1000000}
local summon = getPlayerStorageValue(cid, cfg.storage)
function mosnter(cid)
if (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then
local m = doCreateMonster(cfg.monster, getCreaturePosition(cid))
doConvinceCreature(cid, m)
setPlayerStorageValue(cid, cfg.storage, m)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You Can'Not Summon Your Creature In Pz Zone.")
return TRUE
end
end
if param:lower() == "go" then
if summon <= 0 then
mosnter(cid)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have already summoned a horse.")
return TRUE
end
elseif param:lower() == "mount" then
if isCreature(summon) then
local outfit = getCreatureOutfit(cid)
outfit.lookType = cfg.lookType
doRemoveCreature(summon)
doChangeSpeed(cid, cfg.speed)
doSetCreatureOutfit(cid, outfit, cfg.time)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to summon a horse.")
end
elseif param:lower() == "ride" then
if summon > 0 then
local outfit = getCreatureOutfit(cid)
if outfit.lookType ~= cfg.lookType then
doPlayerSendCancel(cid, "Sorry!")
return TRUE
else
if getTilePzInfo(getCreaturePosition(cid)) == 0 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doChangeSpeed(cid, -cfg.speed)
local m = doCreateMonster(cfg.monster, getCreaturePosition(cid))
doConvinceCreature(cid, m)
setPlayerStorageValue(cid, cfg.storage, m)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You Can'Not Summon Your Creature In Pz Zone.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You're not riding a horse.")
return TRUE
end
return TRUE
end
elseif param:lower() == "back" then
if isCreature(summon) then
doRemoveCreature(summon)
setPlayerStorageValue(cid, cfg.storage, 0)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not summoned a horse.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
end
return TRUE
end
-- Modificado --
abraços!



info
Grupo: Campones
Registrado: 05/06/10
Posts: 58
Reputação: +13
Char no Tibia: noob
Ola Galera eu estou fazendo 1 systema de Montaria a Muito tempo tive ajudas de algumas pessoas tal mas eu continuo no mesmo problema de sempre No do pz zone desa ves fis as coisas sertas mas acontece o seguinte Não da nenhum erro no console
function onSay(cid, words, param) local cfg = {storage = 6666,monster = "Horse",speed = 600,lookType = 327,time = 600 * 6000 * 1000000} local summon = getPlayerStorageValue(cid, cfg.storage) if param:lower() == "go" then if summon <= 0 then if getTilePzInfo(getCreaturePosition(cid)) == 0 then local m = doCreateMonster(cfg.monster, getCreaturePosition(cid)) doConvinceCreature(cid, m) setPlayerStorageValue(cid, cfg.storage, m) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You Can'Not Summon Your Creature In Pz Zone.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have already summoned a horse.") end elseif param:lower() == "mount" then if isCreature(summon) then local outfit = getCreatureOutfit(cid) outfit.lookType = cfg.lookType doRemoveCreature(summon) doChangeSpeed(cid, cfg.speed) doSetCreatureOutfit(cid, outfit, cfg.time) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to summon a horse.") end elseif param:lower() == "ride" then if summon > 0 then if getTilePzInfo(getCreaturePosition(cid)) == 0 then doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -cfg.speed) local m = doCreateMonster(cfg.monster, getCreaturePosition(cid)) doConvinceCreature(cid, m) setPlayerStorageValue(cid, cfg.storage, m) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You Can'Not Summon Your Creature In Pz Zone.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You're not riding a horse.") end elseif param:lower() == "back" then if isCreature(summon) then doRemoveCreature(summon) setPlayerStorageValue(cid, cfg.storage, 0) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not summoned a horse.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") end return TRUE endoque acontece
assim quando você tenta summonar o Horse fora do protection zone ele fala q não posso sumonar o cavalo pq to em pz zone mas mesmo eu tando fora do pz zone ele dis (14:28 You Can'Not Summon Your Creature In Pz Zone.)
eu keria arumar isso so para falar isso quando você estiver no protection zone mas eu to com duvida de como fazer
e tb tem 1 erro que quando você fala ride quando n esta No cavalo ele Buga queria que so usase o !animal ride quando ele estivese so en cima do cavalo assim ele poderia sair
Editado Outubro 18 por Antiemoxml