Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Oi toda vez que o player usa essa talkaction ele aparece no default e eu queria que não aparecesse

tipo quando o player fala, só usa o comando e não aparece nenhuma words no default

 

script

local config = {
battle = true    -- se precisa estar sem battle (true). Se colocar false, poder?usar teleport no meio de batalhas
}

function onSay(cid, words, param)

local storage = 23564
local tempo = 30
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar esse comando novamente.")
return true
end
if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, "Sair de Battle Primeiro.")
return true
end
doSendMagicEffect(getPlayerPosition(cid),250)
doPlayerSendCancel(cid,"Teleportado!")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
exhaustion.set(cid, storage, tempo*60)
end

 

talkacton.xml

<talkaction hide="yes" words="!bug" event="script" value="saffron.lua"/>

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Resolvido por Orochi Elf

Ir para solução
Postado
  • Solução

Prontinho

 

local config = {
    battle = true,    -- se precisa estar sem battle (true). Se colocar false, poder?usar teleport no meio de batalhas
}

function onSay(cid, words, param)
    local storage = 23564
    local tempo = 30
    
    if exhaustion.check(cid, storage) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar esse comando novamente.")
        return true
    end
    
    if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
        doPlayerSendCancel(cid, "Sair de Battle Primeiro.")
        return true
    end
    
    doSendMagicEffect(getPlayerPosition(cid),250)
    doPlayerSendCancel(cid,"Teleportado!")
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    exhaustion.set(cid, storage, tempo*60)
    return true
end

Tony Araújo  ;D 

 

Postado
  • Autor

 

Prontinho

local config = {
    battle = true,    -- se precisa estar sem battle (true). Se colocar false, poder?usar teleport no meio de batalhas
}

function onSay(cid, words, param)
    local storage = 23564
    local tempo = 30
    
    if exhaustion.check(cid, storage) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar esse comando novamente.")
        return true
    end
    
    if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
        doPlayerSendCancel(cid, "Sair de Battle Primeiro.")
        return true
    end
    
    doSendMagicEffect(getPlayerPosition(cid),250)
    doPlayerSendCancel(cid,"Teleportado!")
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    exhaustion.set(cid, storage, tempo*60)
    return true
end

thanks funcionou kkkk, pode ajuda aqui: http://www.tibiaking.com/forum/topic/45029-otc-bug/?p=261645

estou com o mesmo bug (quero fazer isso no meu otc)

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

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