Michcol94
Member
- Joined
- Sep 2, 2021
- Messages
- 108
- Reaction score
- 23
How to center graphics?
Resolved
Post automatically merged:
Resolved
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_USECHARGES, true)
combat:setArea(createCombatArea(AREA_SQUARE1X1))
function onGetFormulaValues(player, skill, attack, factor)
local min = (player:getLevel() / 5) + (skill * attack * 0.03) + 7
local max = (player:getLevel() / 5) + (skill * attack * 0.05) + 11
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
local pos = creature:getPosition()
Position(pos.x + 5, pos.y + 5. pos.z):sendMagicEffect(154)
return combat:execute(creature, variant)
end
Last edited: