mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
* Move runes to dedicated folder * Redirect old XML and lib folder to new location * Drop unused custom spells
32 lines
958 B
Lua
32 lines
958 B
Lua
local combat = Combat()
|
|
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
|
|
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
|
|
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
|
|
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
|
|
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
|
|
|
|
function onGetFormulaValues(player, level, magicLevel)
|
|
local min = (level / 5) + (magicLevel * 3.2) + 20
|
|
local max = (level / 5) + (magicLevel * 5.4) + 40
|
|
return min, max
|
|
end
|
|
|
|
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
|
|
|
|
local spell = Spell(SPELL_RUNE)
|
|
|
|
function spell.onCastSpell(creature, variant, isHotkey)
|
|
return combat:execute(creature, variant)
|
|
end
|
|
|
|
spell:name("test rune")
|
|
spell:runeId(2275)
|
|
spell:id(220)
|
|
spell:level(20)
|
|
spell:magicLevel(5)
|
|
spell:needTarget(true)
|
|
spell:isAggressive(false)
|
|
spell:allowFarUse(true)
|
|
spell:charges(25)
|
|
spell:vocation("sorcerer;true", "master sorcerer")
|
|
spell:register()
|