Ir para conteúdo

Featured Replies

  • Respostas 15
  • Visualizações 447
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local monster, storage = "donkey", 5918 function onUse(cid, item, frompos, itemEx, topos)     if getPlayerStorageValue(cid, storage) > -1 then         return doPlayerSendTextMessage(cid, 19, "Sorry

  • local mounts = {     --[itemid] = {name = "monster", storage = storage, mountId = xxx, chance = xxx},      [13937] = {name = "donkey", storage = 5918, mountId = 13, chance = 50},        --Sendo a chan

  • local mounts = {     --[itemid] = {name = "monster", storage = storage, mountId = xxx},      [13937] = {name = "donkey", storage = 5918, mountId = 13}, } function onUse(cid, item, frompos, itemEx, top

Postado
  • Autor
local monster, storage = "donkey", 5918
function onUse(cid, item, frompos, itemEx, topos)
    if getPlayerStorageValue(cid, storage) > -1 then
        return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")
    elseif not isMonster(itemEx.uid) then
        return doPlayerSendCancel(cid, "Use this in a monster.")
    elseif getCreatureName(itemEx.uid):lower() ~= monster then
        return doPlayerSendCancel(cid, "Use this in "..monster..".")
    end
    doPlayerAddMount(cid, 13)
    doPlayerSendTextMessage(cid, 19, "The strange wheel seems to vibrate and slowly starts turning continuosly.")
    doRemoveItem(item.uid, 1)
    setPlayerStorageValue(cid, storage, 1)
    return true
end

Seria bom se remove-se a criatura e como eu faço pra colocar em outras montarias é só mudar o ID do item que vai remover e o nome da criatura?

Postado

local mounts = {
    --[itemid] = {name = "monster", storage = storage, mountId = xxx}, 
    [13937] = {name = "donkey", storage = 5918, mountId = 13},
}
function onUse(cid, item, frompos, itemEx, topos)
    local target = mounts[item.itemid]
    if target then
        if getPlayerStorageValue(cid, target.storage) > -1 then
            return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")
        elseif not isMonster(itemEx.uid) then
            return doPlayerSendCancel(cid, "Use this in a monster.")
        elseif getCreatureName(itemEx.uid):lower() ~= target.name then
            return doPlayerSendCancel(cid, "Use this in "..target.name..".")
        end
        doPlayerAddMount(cid, target.mountId)
        doRemoveCreature(itemEx.uid)
        doPlayerSendTextMessage(cid, 19, "The strange wheel seems to vibrate and slowly starts turning continuosly.")
        doRemoveItem(item.uid, 1)
        setPlayerStorageValue(cid, target.mountId, 1)
    end
    return true
end
Postado
  • Autor
local mounts = {
    --[itemid] = {name = "monster", storage = storage, mountId = xxx}, 
    [13937] = {name = "donkey", storage = 5918, mountId = 13},
}
function onUse(cid, item, frompos, itemEx, topos)
    local target = mounts[item.itemid]
    if target then
        if getPlayerStorageValue(cid, target.storage) > -1 then
            return doPlayerSendTextMessage(cid, 19, "Sorry, you already have that ride.")
        elseif not isMonster(itemEx.uid) then
            return doPlayerSendCancel(cid, "Use this in a monster.")
        elseif getCreatureName(itemEx.uid):lower() ~= target.name then
            return doPlayerSendCancel(cid, "Use this in "..target.name..".")
        end
        doPlayerAddMount(cid, target.mountId)
        doRemoveCreature(itemEx.uid)
        doPlayerSendTextMessage(cid, 19, "The strange wheel seems to vibrate and slowly starts turning continuosly.")
        doRemoveItem(item.uid, 1)
        setPlayerStorageValue(cid, target.mountId, 1)
    end
    return true
end

Não da erro e nem funciona xD não aparece nada =(

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo