Buff Spell for 5secs
data/creaturescripts.xml:
data/creaturescripts/scripts/BuffSystemO
login.lua
data/scripts/BatMan
data/creaturescripts.xml:
Lua:
<event type="healthchange" name="BuffSystemO" script="BuffSystemO"/>
data/creaturescripts/scripts/BuffSystemO
Lua:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
if not creature or not attacker or not attacker:isPlayer() then
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
if attacker:getStorageValue(7373) == 1 then
primaryDamage = primaryDamage + (primaryDamage * 50 / 100)
secondaryType = secondaryType + (secondaryType * 50 / 100)
end
return primaryDamage, primaryType, primaryDamage, secondaryType
end
login.lua
Lua:
player:registerEvent("BuffSystemO")
Lua:
player:setStorageValue(7373, 0)
data/scripts/BatMan
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, 1)
local function castSpellTo(cid, variant)
local player = Player(cid)
if player then
player:setStorageValue(7373, 0)
end
end
local buff = Spell(SPELL_INSTANT)
function buff.onCastSpell(creature, variant)
creature:setStorageValue(7373, 1)
local cid = creature:getId()
addEvent(castSpellTo, 5000, cid, variant)
return true
end
buff:name("exura buff")
buff:words("exura buff")
buff:group("support")
buff:vocation("Knight", "master sorecerer")
buff:id(1)
buff:cooldown(1000)
buff:level(200)
buff:manaPercent(1)
buff:blockWalls(true)
buff:register()