quanto tempo de exhausted?..
6
756
22 de março de 2014 às 16:32
22 de março de 2014 às 16:44
10 segundos
info
Grupo: Artesão
Registrado: 22/02/14
Posts: 101
Reputação: +21

22 de março de 2014 às 17:54
local dirs = {
[0] = {0, -1},
[1] = {1, 0},
[2] = {0, 1},
[3] = {-1, 0},
}
local function push(cid, target)
local dir = dirs[getCreatureLookDirection(cid)]
local pos = getCreaturePosition(target)
pos.x = pos.x + dir[1]
pos.y = pos.y + dir[2]
if doTileQueryAdd(target, pos) == RETURNVALUE_NOERROR then
doTeleportThing(target, pos, true)
end
return true
end
function onTargetCreature(cid, target)
if not isNpc(target) then
addEvent(push, 100, cid, target)
end
return true
end
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 55)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -39.5, -375, -39.5, -37)
setCombatArea(combat, createCombatArea({{3}}))
setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
local function onCastSpell1(cid, var)
return isCreature(cid) and doCombat(cid, combat, var) or false
end
function onCastSpell(cid, var)
local waittime = 10
local storage = 3010
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, 27, "Voce tem que espera " .. exhaustion.get(cid, storage) .. " segundos.")
return false
end
for a = 1, 8 do
addEvent(onCastSpell1, a * 100, cid, var)
exhaustion.set(cid, storage, waittime)
end
return true
end
Testa ae.
Editado Março 22 por lucasromero
22 de março de 2014 às 18:01
Vlw, Funfou REP+






info
Grupo: Cavaleiro
Registrado: 04/09/12
Posts: 185
Reputação: +2
Por favor, alguém poderia colocar cooldown nesta spell?