Ir para conteúdo

Featured Replies

Postado

Ola, gostaria de um Script que quando eu usar o comando !fly o personagem sai andando sozinho e se eu aperta as setas < \/ /\ > ele continuar andando pro lado que eu aperta, so para se eu usar o comando !Fly novamente

É um servidor de poketibia ele vai esta voando quando usar o comando, e so deve poder usar o comando se ele estiver Voando.

Agradeço dez de ja quem poder me ajudar.

Darei 5+rep

11188415_812414552168757_221887040728992

.

Editado por CarlosHenrique7457 (veja o histórico de edições)

Ajudei? da um Rep+, não custa nada. ;D:P

 

Servidor de PokeTibia ja online.

Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks

Grupo: https://www.facebook.com/groups/257989224406246/

Site: http://pokexstore.wix.com/pokexstore

Resolvido por zipter98

Ir para solução
  • Respostas 35
  • Visualizações 3.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local configuration = {     storage = 918311,     fly_storage = 17000,    --Storage do Fly no seu servidor. } function isWalkable(pos, creature, proj, pz)-- by Nord     if getTopCreature(pos).uid >

  • Hm, fiz umas pequenas alterações no código. Se possível, substitua o seu antigo pelo novo e também faça a outra modificação indicada no meu primeiro comentário. Sobre a velocidade, poderia informar a

  • Falta de atenção minha, código corrigido.   Em data/movements/scripts, fly.lua: Remova as linhas:    for i = 0, 255 do         pos.stackpos = i         local tile = getTileThingByPos(pos)      

Postado
  • Solução
local configuration = {
    storage = 918311,
    fly_storage = 17000,    --Storage do Fly no seu servidor.
}
function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTopCreature(pos).uid > 0 and creature then return false end
    if getTileInfo(pos).protection and pz then return false, true end
    local n = not proj and 3 or 2
    for i = 0, 255 do
        pos.stackpos = i
        local tile = getTileThingByPos(pos)
        if tile.itemid ~= 0 and not isCreature(tile.uid) then
            if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
                return false
            end
        end
    end
    return true
end  
function autoWalk(cid, id)
    if not isCreature(cid) then 
        if id then
            return db.executeQuery("UPDATE player_storage SET value = -1 WHERE key = 918311 AND player_id = "..id)
        end
    elseif getPlayerStorageValue(cid, configuration.storage) < 1 then
        return true
    end
    local topos = getPosByDir(getThingPos(cid), getCreatureLookDir(cid))
    if topos then
        if getPlayerStorageValue(cid, configuration.storage) < 1 or getPlayerStorageValue(cid, configuration.fly_storage) < 1 then
            if getPlayerStorageValue(cid, configuration.fly_storage) < 1 then
                setPlayerStorageValue(cid, configuration.storage, -1)
            end
            return true
        elseif isWalkable(topos) then
            if getTileThingByPos({x = topos.x, y = topos.y, z = topos.z, stackpos = 0}).itemid == 0 then
                doCombatAreaHealth(cid, 0, topos, 0, 0, 0, CONST_ME_NONE)
                doCreateItem(11676, 1, topos)
            end
            doTeleportThing(cid, topos)
        else
            setPlayerStorageValue(cid, configuration.storage, -1)
            doPlayerSendTextMessage(cid, 27, "Há algum objeto à sua frente impedindo a passagem.")
            doPlayerSetNoMove(cid, false)
            return true
        end
    else
        doPlayerSendCancel(cid, "Sorry, not possible.")
        setPlayerStorageValue(cid, configuration.storage, -1)
        doPlayerSetNoMove(cid, false)
        return true
    end
    addEvent(autoWalk, 500, cid, id)
end
function onSay(cid, words)
    if getPlayerStorageValue(cid, configuration.fly_storage) < 1 then
        doPlayerSendCancel(cid, "Para usar este comando, você deve estar em Fly.")
    elseif getPlayerStorageValue(cid, configuration.storage) >= 1 then
        setPlayerStorageValue(cid, configuration.storage, -1)
        doPlayerSendTextMessage(cid, 27, "Comando !fly desativado.")
        doPlayerSetNoMove(cid, false)
    else
        doPlayerSendTextMessage(cid, 27, "Comando !fly ativado.")
        setPlayerStorageValue(cid, configuration.storage, 1)
        doPlayerSetNoMove(cid, true)
        autoWalk(cid, getPlayerGUID(cid))
    end
    return true
end
Em data/actions/scripts, order.lua:
Abaixo de:
doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", let me get down!", 1)
adicione:
doPlayerSetNoMove(cid, false)

Escrevi este código há mais de 1 ano, mas suponho que ainda funcione como deve.

Editado por zipter98 (veja o histórico de edições)

não respondo pms solicitando suporte em programação/scripting

Postado
  • Autor

talkactions certo?


Poderia me informa como devo colocar em talkactions.xml

Ajudei? da um Rep+, não custa nada. ;D:P

 

Servidor de PokeTibia ja online.

Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks

Grupo: https://www.facebook.com/groups/257989224406246/

Site: http://pokexstore.wix.com/pokexstore

Postado
  • Autor

Esta dando erro

11100350_812767422133470_616456548329347

@Up

.

Editado por CarlosHenrique7457 (veja o histórico de edições)

Ajudei? da um Rep+, não custa nada. ;D:P

 

Servidor de PokeTibia ja online.

Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks

Grupo: https://www.facebook.com/groups/257989224406246/

Site: http://pokexstore.wix.com/pokexstore

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.7k

Informação Importante

Confirmação de Termo