Ir para conteúdo

Featured Replies

Postado

alguém pode alterar esse script de levivate? pra quando o player for subir e descer aparecer x effect?

e se fer pra remover esse effect azul na foto abaixo seria bom, deixar só o effect quando for subir e descer

5a856d93b4579_firejump.thumb.png.5367568baccdcbaab2cca5f859805bbc.png

Spoiler

local function levitate(creature, parameter)
    local fromPosition = creature:getPosition()

    if parameter == "up" and fromPosition.z ~= 8 or parameter == "down" and fromPosition.z ~= 7 then
        local toPosition = creature:getPosition()
        toPosition:getNextPosition(creature:getDirection())

        local tile = Tile(parameter == "up" and Position(fromPosition.x, fromPosition.y, fromPosition.z - 1) or toPosition)
        if not tile or not tile:getGround() and not tile:hasFlag(parameter == "up" and TILESTATE_IMMOVABLEBLOCKSOLID or TILESTATE_BLOCKSOLID) then
            tile = Tile(toPosition.x, toPosition.y, toPosition.z + (parameter == "up" and -1 or 1))

            if tile and tile:getGround() and not tile:hasFlag(bit.bor(TILESTATE_IMMOVABLEBLOCKSOLID, TILESTATE_FLOORCHANGE)) then
                return creature:move(tile, bit.bor(FLAG_IGNOREBLOCKITEM, FLAG_IGNOREBLOCKCREATURE))
            end
        end
    end
    return RETURNVALUE_NOTPOSSIBLE
end

function onCastSpell(creature, variant)
    local returnValue = levitate(creature, variant:getString())
    if returnValue ~= RETURNVALUE_NOERROR then
        creature:sendCancelMessage(returnValue)
        creature:getPosition():sendMagicEffect(2) -- já alterei esse valor não muda o effect
        return false
    end
    creature:getPosition():sendMagicEffect(2) -- já alterei esse valor não muda o effect
    return true
end

 

 

Postado

Tenta trocar esses:

        creature:getPosition():sendMagicEffect(2) -- já alterei esse valor não muda o effect
    creature:getPosition():sendMagicEffect(2) -- já alterei esse valor não muda o effect

por:

   doSendMagicEffect(getPlayerPosition(cid), 18)

(troca o 18 pelo valor que vc quer).

 

OBS: N SOU SCRIPTER, mas n custa nada tentar kkkkkkkkk

Postado
  • Autor
57 minutos atrás, tavarb disse:

Tenta trocar esses:


        creature:getPosition():sendMagicEffect(2) -- já alterei esse valor não muda o effect

    creature:getPosition():sendMagicEffect(2) -- já alterei esse valor não muda o effect

por:


   doSendMagicEffect(getPlayerPosition(cid), 18)

(troca o 18 pelo valor que vc quer).

 

OBS: N SOU SCRIPTER, mas n custa nada tentar kkkkkkkkk

ja tentei não funcionou ;x

  • 3 weeks later...

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo