• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

RevScripts sudden death rune

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,085
Solutions
15
Reaction score
379
Location
Sweden
YouTube
Joriku
Alright, been sitting with this for too long now..
Why is it shooting onto the monster but not dealing any damage?

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, magicLevel)
    local min = (level / 6) + (magicLevel * 8) + 50
    local max = (level / 6) + (magicLevel * 12) + 85
    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("quest sd")
spell:runeId(2263)
spell:group("attack")
spell:id(24)
spell:level(8)
spell:magicLevel(1)
spell:needTarget(true)
spell:isAggressive(false)
spell:allowFarUse(true)
spell:charges(0)
spell:vocation("sorcerer;true", "master sorcerer")
spell:register()
 
spell:isAggressive(false) ??
Dont know if that has to do something with the problem.
Sadly, no. That's the first thing I tried.
Change this
Lua:
return min, max
to this
Lua:
return -min, -max
Thank you alot, solved my Issue and other issues in the future.
Much appreciation,
- Joriku
 
Back
Top