I'm using 8.0 version of Umbyevo.. And there is exhausted bug..
When you cast spell/rune too fast.. it will take mana without doing any affect..
Example: when you shoot sd too fast sometimes the SD will waste charges without shooting..
Please help me!!!
here is example of a code:
When you cast spell/rune too fast.. it will take mana without doing any affect..
Example: when you shoot sd too fast sometimes the SD will waste charges without shooting..
Please help me!!!
here is example of a code:
PHP:
local storevalue = 2578 -- value where exhausted is saved
local exhausttime = 1 -- 1 second exhaustion
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -.8, 0, 0, 0)
local arr = {
{0, 1, 0},
{0, 1, 0},
{0, 1, 0},
{0, 3, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
local pAccess = getPlayerAccess(cid) -- Returns the player's access
if (isPlayer(cid) == TRUE and pAccess < 3) then
if (exhaust(cid, storevalue, exhausttime) == 1) then
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
else
return doCombat(cid, combat, var)
end
end
Last edited: