Ir para conteúdo
  • Cadastre-se

Adicionar uma Storage para diferenciar!


Posts Recomendados

Citar

    <instant name="Shunpo" words="Shunpo" direction="1" lvl="100" mana="200" prem="1"  exhaustion="100"  event="script" value="support/shunpo.lua">
    <vocation id="4"/>
    </instant>

Citar

local config = { 
storage = 1400,
cooldown = 3

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 4 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), 173)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), 173)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), 173)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 1 --tempo em segundos
local storage = 1401 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end 

 abaixo temos o Sonido 

Citar

    <instant name="Sonido" words="Sonido" direction="1" lvl="100" mana="200" prem="1"  exhaustion="100"  event="script" value="support/sonido.lua">
    <vocation id="4"/>
    </instant>

 

Citar

local config = { 
storage = 1600,
cooldown = 3

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 5 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), 172)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), 172)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), 172)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 3 --tempo em segundos
local storage = 1601 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end  

 o problema é que está saindo o mesmo effect

Link para o post
Compartilhar em outros sites

Este tópico foi movido para a seção de Suporte Otserv Alternativo

 

 

 

 

 

                                                                                                                                                     tumblr_nwmv2z4VEM1ujiquxo1_100.gif.2db64bb36f0f565e68ff2a90cb98f439.gif.59f4c4cf234d2f6906621cac0553a862.gif

https://github.com/italoxxx1

 

Link para o post
Compartilhar em outros sites

Segundo o que eu li, você só precisa alterar o numero nas linhas em que estão em vermelho nos scripts, a função doSendMagicEffect é a que envia efeitos, apenas basta trocar o numero do efeito em cada spell, marquei as linhas em vermelho, e os numeros em vermelho(negrito)

OBS: Não sou programador, caso esteja errado, me corrijam.

Shunpo:

Spoiler

 

local config = { 
storage = 1400,
cooldown = 3

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 4 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), 173)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), 173)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), 173)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 1 --tempo em segundos
local storage = 1401 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end 

 

Sonido:

Spoiler

 

local config = { 
storage = 1600,
cooldown = 3

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 5 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), 172)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), 172)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), 172)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 3 --tempo em segundos
local storage = 1601 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end  

 

 

Link para o post
Compartilhar em outros sites
Em 16/11/2020 em 06:04, FlameArcixt disse:

Segundo o que eu li, você só precisa alterar o numero nas linhas em que estão em vermelho nos scripts, a função doSendMagicEffect é a que envia efeitos, apenas basta trocar o numero do efeito em cada spell, marquei as linhas em vermelho, e os numeros em vermelho(negrito)

OBS: Não sou programador, caso esteja errado, me corrijam.

Shunpo:

  Ocultar conteúdo

 

local config = { 
storage = 1400,
cooldown = 3

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 4 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), 173)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), 173)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), 173)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 1 --tempo em segundos
local storage = 1401 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end 

 

Sonido:

  Ocultar conteúdo

 

local config = { 
storage = 1600,
cooldown = 3

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 5 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), 172)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), 172)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), 172)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 3 --tempo em segundos
local storage = 1601 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end  

 

 mudar como?

 

 

Link para o post
Compartilhar em outros sites
3 horas atrás, Bruce Pereira disse:

esse é o problema, são diferentes mas todos ficam iguais

 

Ao que eu li no seu script, eles estão diferentes, talvez os effects sejam iguais nas sprites, já olhou isso?

Link para o post
Compartilhar em outros sites
8 horas atrás, FlameArcixt disse:

Ao que eu li no seu script, eles estão diferentes, talvez os effects sejam iguais nas sprites, já olhou isso?

já olhei mano, isso é a script '-

sou iniciante, já fiz muita coisa no meu server mas ta dificil multiplicar os dashes

Link para o post
Compartilhar em outros sites
2 minutos atrás, Bruce Pereira disse:

já olhei mano, isso é a script '-

sou iniciante, já fiz muita coisa no meu server mas ta dificil multiplicar os dashes

Então mano, ali em cima, eu percebi que o numero dos efeitos estão iguais, só pode ser isso..

Link para o post
Compartilhar em outros sites

Pega esses script, e muda apenas ali no config o effect number

Shunpo:

Spoiler

 

local config = { 
storage = 1400,
cooldown = 3

local effectnumber = 172 -- NUMERO DO EFEITO

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 4 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), effectnumber)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), effectnumber)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), effectnumber)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 1 --tempo em segundos
local storage = 1401 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end 

 

Sonido:

Spoiler

 

local config = { 
storage = 1600,
cooldown = 3


effectNumber = 160 -- NUMERO DO EFEITO

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 5 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), effectNumber )
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), effectNumber )
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), effectNumber )
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 3 --tempo em segundos
local storage = 1601 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end  

 

 

Link para o post
Compartilhar em outros sites
3 minutos atrás, FlameArcixt disse:

Pega esses script, e muda apenas ali no config o effect number

Shunpo:

  Ocultar conteúdo

 

local config = { 
storage = 1400,
cooldown = 3

local effectnumber = 172 -- NUMERO DO EFEITO

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 4 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), effectnumber)
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), effectnumber)
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), effectnumber)
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 1 --tempo em segundos
local storage = 1401 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end 

 

Sonido:

  Ocultar conteúdo

 

local config = { 
storage = 1600,
cooldown = 3


effectNumber = 160 -- NUMERO DO EFEITO

local damage = 0 -- dano que toma qnd bate em algum obstáculo
local speed = 1000 -- velocidade do player ao usar o dash (vai de 0 a mil)
local pzprotect = true -- nao deixa entrar em pz com a spell
local distance = 5 -- quantos sqms anda

local function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    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 onWalk(cid)
    if isCreature(cid) then 
        local poslook = getCreatureLookPosition(cid)
        poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
        if isWalkable(poslook, false, false, pzprotect) then
            if not isCreature(getThingfromPos(poslook).uid) then
                doMoveCreature(cid, getPlayerLookDirection(cid))
                doSendMagicEffect(getPlayerPosition(cid), effectNumber )
            else
                doCreatureAddHealth(cid, -damage)
                doSendMagicEffect(getPlayerPosition(cid), effectNumber )
                doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
            end
        else      
            doCreatureAddHealth(cid, -damage)
            doSendMagicEffect(getPlayerPosition(cid), effectNumber )
            doSendAnimatedText(getPlayerPosition(cid), "-"..damage , 180) 
        end
    end
return true
end

function onCastSpell(cid, var)    
local waittime = 3 --tempo em segundos
local storage = 1601 --storage do exuast, em cada magia uma storage diferente.

if exhaustion.check(cid, storage) then
   doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.")
return false 
end

exhaustion.set(cid, storage, waittime)
    for i = 0, distance do
        addEvent(onWalk, (1001- math.min(speed, 1000)) *i, cid)
    end
return true
end  

 

 

vou testar aki vllw

Link para o post
Compartilhar em outros sites
2 minutos atrás, FlameArcixt disse:

Não tem como dar errado, eu mesmo testei aqui na maquina e tava certo, effects saindo diferentes

mostra aí como tu fez entao, como um tutorial para ver se está certo aqui. até onde sei está tudo como deve estar

 

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo