Opatulek
New Member
- Joined
- Apr 25, 2021
- Messages
- 22
- Reaction score
- 2
Hello! If anyone can help me with change calculating value in this script I I will be grateful:
to
local runeTest = Spell(SPELL_RUNE)
function runeTest.onCastSpell(creature, variant)
local target = Tile(variant:getPosition()):getTopVisibleCreature(creature)
if not target or not target:isPlayer() then
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
local maxMana = creature:getMaxMana() / 100
target:addMana(math.random(maxMana * 10, maxMana * 15))
target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
target:say("MR Aaahh!")
return true
end
runeTest:name("ManaRune#1")
runeTest:isAggressive(false)
runeTest:runeId(2280)
runeTest:blockWalls(true)
runeTest:magicLevel(0)
runeTest:level(1)
runeTest:group("support")
runeTest:vocation("sorcerer", "master sorcerer")
runeTest:id(24)
runeTest:cooldown(1 * 1000)
runeTest:groupCooldown(1 * 1000)
runeTest:isPremium(true)
to
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