Ir para conteúdo

Featured Replies

Postado

apenas quando tiver debaixo d'água sua velocidade aumentar +100 de speed

E qual seria a condição em seu servidor que determina que o creatureid está "debaixo d'água"?

The corrupt fear us.

The honest support us.

The heroic join us.

  • Respostas 9
  • Visualizações 1.4k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

essa  Drowning   

 

Porém, ela só dá caso o player esteja sem o helmet.

e não existe condição under_water, uma solução seria colocar um array de pisos que são underwater...

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Postado

drown.lua (data\movements\scripts) PS: caso já exista (imagino que deve existir), apenas substitua o script

local speed, key = 100, 45678 -- value, storage key
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -20)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 2000)

local function checkDrowning(uid)
    local item = 5461 -- Helmet of the Deep Id
    
    if getPlayerSlotItem(uid, CONST_SLOT_HEAD).itemid == item and getPlayerStorageValue(uid, key) < 1 then
        doChangeSpeed(uid, getCreatureSpeed(uid) + speed)
        setPlayerStorageValue(uid, key, 1)
    elseif not getPlayerSlotItem(uid, CONST_SLOT_HEAD).itemid == item and getPlayerStorageValue(uid, key) > 0 then
        doChangeSpeed(uid, getCreatureSpeed(uid) - speed)
        setPlayerStorageValue(uid, key, -1)
    end
    
    return true
end

function onStepIn(cid)
    return isPlayer(cid) and doAddCondition(cid, condition) and checkDrowning(cid) or true
end

function onStepOut(cid)
    return getPlayerStorageValue(cid, key) > 0 and doChangeSpeed(cid, getCreatureSpeed(cid) - speed) and setPlayerStorageValue(cid, key, -1) and doRemoveCondition(cid, CONDITION_DROWN) or doRemoveCondition(cid, CONDITION_DROWN)
end




movements.xml (data\movements)

<movevent type="StepIn" fromid="5405" toid="5410" event="script" value="drown.lua"/>
<movevent type="StepOut" fromid="5405" toid="5410" event="script" value="drown.lua"/>

The corrupt fear us.

The honest support us.

The heroic join us.

Postado
  • Autor

 

drown.lua (data\movements\scripts) PS: caso já exista (imagino que deve existir), apenas substitua o script

local speed, key = 100, 45678 -- value, storage key
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -20)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 2000)

local function checkDrowning(uid)
    local item = 5461 -- Helmet of the Deep Id
    
    if getPlayerSlotItem(uid, CONST_SLOT_HEAD).itemid == item and getPlayerStorageValue(uid, key) < 1 then
        doChangeSpeed(uid, getCreatureSpeed(uid) + speed)
        setPlayerStorageValue(uid, key, 1)
    elseif not getPlayerSlotItem(uid, CONST_SLOT_HEAD).itemid == item and getPlayerStorageValue(uid, key) > 0 then
        doChangeSpeed(uid, getCreatureSpeed(uid) - speed)
        setPlayerStorageValue(uid, key, -1)
    end
    
    return true
end

function onStepIn(cid)
    return isPlayer(cid) and doAddCondition(cid, condition) and checkDrowning(cid) or true
end

function onStepOut(cid)
    return getPlayerStorageValue(cid, key) > 0 and doChangeSpeed(cid, getCreatureSpeed(cid) - speed) and setPlayerStorageValue(cid, key, -1) and doRemoveCondition(cid, CONDITION_DROWN) or doRemoveCondition(cid, CONDITION_DROWN)
end

movements.xml (data\movements)

<movevent type="StepIn" fromid="5405" toid="5410" event="script" value="drown.lua"/>
<movevent type="StepOut" fromid="5405" toid="5410" event="script" value="drown.lua"/>

script funfa ele anda rapido ums 3 sqms só que parece que buga  ai do nada toma um paralyse que custa andar :s

I like

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