Kage Thunder
Advanced User
- Joined
- Sep 30, 2012
- Messages
- 184
- Reaction score
- 3
Siema, mam problem, mianowicie u?ywa?em do tej pory takiej funkcji do niekt?rych spelli jak cooldown osobny, lecz od jakiego? czasu jak j? dodaje do spelli to zwyczajnie nie dzia?a a spellem mo?na rzucac co sekunde .. pomo?e kto??
[LUA]local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 109)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 12)
setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -0, 0, -0, 0)
function onCastSpell(cid, var)
if exhaustion.check(cid, 23000) == false then
exhaustion.set(cid, 23000, 100)
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23000).."]")
end
end
arr1 = {
{0, 0, 0},
{0, 0, 0},
{0, 3, 0},
{0, 0, 0},
{0, 0, 0},
}
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
function onTargetCreature(cid, target)
local t = 5000
doCreatureSetNoMove(target, true)
addEvent(doCreatureSetNoMove, t, target, false)
end
setCombatCallback(combat1, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 0, parameters)
end
[/LUA]
[LUA]local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 109)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 12)
setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -0, 0, -0, 0)
function onCastSpell(cid, var)
if exhaustion.check(cid, 23000) == false then
exhaustion.set(cid, 23000, 100)
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23000).."]")
end
end
arr1 = {
{0, 0, 0},
{0, 0, 0},
{0, 3, 0},
{0, 0, 0},
{0, 0, 0},
}
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
function onTargetCreature(cid, target)
local t = 5000
doCreatureSetNoMove(target, true)
addEvent(doCreatureSetNoMove, t, target, false)
end
setCombatCallback(combat1, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 0, parameters)
end
[/LUA]