sabodden
Member
- Joined
- Sep 27, 2019
- Messages
- 138
- Reaction score
- 18
i want to make some runes that are alloweds to use together with attack runes (i mean, this rune + sd or hmm)?
i've tried this:
it's working so far, but there are some bugs idk how to fix
-- 1 how to use COMBAT_PARAM_DISTANCEEFFECT = CONST_ANI_ENERGYBALL ?
-- 2 how to set elemental damage? COMBAT_PARAM_TYPE: COMBAT_ENERGYDAMAGE ?
-- 3 it don't print the damage
-- 4 player can kill other players without even get an injust
-- 5 how to check UTAMO VITA to remove mana instead HP (if there is mana enoght until remove health) ?
is anybody here know how to do?
i've tried this:
Code:
local maglv = 3
function onGetFormulaValues(cid)
local min = ( (((getPlayerMagLevel(cid)) * 10) * 0.5 ) + (40) )
local max = ( (((getPlayerMagLevel(cid)) * 10) * 1.0 ) + (40) )
local value = math.random(min, max)
return value
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local target = itemEx.uid
if (not isCreature(target)) then
doPlayerSendCancel(cid, "You need to have a target to use this rune.")
return true
end
if(os.time() - getPlayerStorageValue(cid, spellcfg_actions_exausted_storage)) < spellcfg_actions_exausted_secs then
doPlayerSendCancel(cid, "You are exausted.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return true
end
if getPlayerMagLevel(cid) < maglv then
doPlayerSendCancel(cid, "You do not have enought magic level.")
return true
end
-- 1 how to use COMBAT_PARAM_DISTANCEEFFECT = CONST_ANI_ENERGYBALL ?
doSendMagicEffect(getThingPos(target), CONST_ME_ENERGYHIT)
-- 2 how to set elemental damage? COMBAT_PARAM_TYPE: COMBAT_ENERGYDAMAGE ?
local dmg = onGetFormulaValues(cid) * -1
-- 3 it don't print the damage
-- 4 player can kill other players without even get an injust
-- 5 how to check UTAMO VITA to remove mana instead HP (if there is mana enoght until remove health) ?
doCreatureAddHealth(target, dmg)
setPlayerStorageValue(cid, spellcfg_actions_exausted_storage, os.time())
doRemoveItem(item.uid, 1)
return TRUE
end
it's working so far, but there are some bugs idk how to fix
-- 1 how to use COMBAT_PARAM_DISTANCEEFFECT = CONST_ANI_ENERGYBALL ?
-- 2 how to set elemental damage? COMBAT_PARAM_TYPE: COMBAT_ENERGYDAMAGE ?
-- 3 it don't print the damage
-- 4 player can kill other players without even get an injust
-- 5 how to check UTAMO VITA to remove mana instead HP (if there is mana enoght until remove health) ?
is anybody here know how to do?