Ir para conteúdo
  • 0

Durar menos tempo


Allangod

Pergunta

2 respostass a esta questão

Posts Recomendados

  • 0

Eu queria que o efeito 131, dura-se 0,5 segundos à cada vez que aparecer.

Mas queria saber fazer isso com a sprite 131, aonde que abaixo a duração dela pelo dat editor ou qualquer outro programa?

 

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 83)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
local arr = {
{0, 0, 0},
{0, 3, 0},
{0, 0, 0},
}
local condition = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition, CONDITION_PARAM_TICKS, 15000)
setCombatCondition(combat, condition)
local condition = createConditionObject(CONDITION_PHYSICAL)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 12, 1000, -110)
setCombatCondition(combat, condition)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 0.5 + levelTotal), -(skillTotal * 2.5 + levelTotal)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local area = createCombatArea(arr)
setCombatArea(combat, area)
local function random(pos)
return {x = pos.x+math.random(-2, 7), y = pos.y+math.random(-2, 7), z = pos.z}
end
local function sendEff(cid, eff, t)
if t > 0 and isCreature(cid) then
local pos = getPlayerPosition(cid)
for i = 1, 60 do
doSendMagicEffect(random(pos), eff, cid)
doSendMagicEffect({x = pos.x + 2, y = pos.y - 1, z = pos.z}, 189, cid)
doSendMagicEffect({x = pos.x - 2, y = pos.y - 1, z = pos.z}, 188, cid)
end
addEvent(sendEff, 1000, cid, eff, t-1)
end
end
local eff = 131 --efeito
local time = 15 --por qnts segs vai aparecer o efeito
function onCastSpell(cid, var)
if exhaustion.get(cid, 23009) == false then
local target = getCreatureTarget(cid)
doSendMagicEffect(getPlayerPosition(cid), 110)
exhaustion.set(cid, 23009, 60)
if not isCreature(target) then
doPlayerSendCancel(cid, "You need a target.")
return false
end
sendEff(target, eff, time)
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23009).."]")
end
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...