Ir para conteúdo
  • 0

Mount System : Monta Mais Não Desmonta


Pergunta

local mounts = {

[12121] = {lookType = 4},

[21212] = {lookType = 5},

[76124] = {lookType = 6},

}

 

function onSay(cid,words)

local mounton = 87871

local haveMount = false

local mountLook = 0

 

for sto, look in pairs(mounts) do

if getPlayerStorageValue(cid, sto) >= 1 then

haveMount = true

mountLook = look

break

end

end

 

if haveMount then

if getPlayerStorageValue(cid, mounton) <= 0 then

doSetCreatureOutfit(cid, mountLook, -1)

setPlayerStorageValue(cid, mounton, 1)

elseif getPlayerStorageValue(cid, mounton) >= 1 then

doRemoveCondition(cid, CONDITION_OUTFIT)

setPlayerStorageValue(cid, mounton,-1)

end

else

doPlayerSendTextMessage(cid, 27, "You don't have a mount.")

end

 

return true

end

Editado por tonynamoral
Link para o comentário
https://xtibia.com/forum/topic/199771-mount-system-monta-mais-n%C3%A3o-desmonta/
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...