• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Spell to rebirth

I will give you an example of a spell that will not work unless the player who uses it has xx amount of rebirths:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 10, 12)

function onCastSpell(cid, var)
    local storage = 85987
    local minimumrebs = xx -- change to minimum number of rebirths
    if getPlayerStorageValue(cid, storage) >= minimumrebs then
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "You must have atleast ".. minimumrebs .." rebirths to cast this spell."
        doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
    end
    return true
end
 

Similar threads

Back
Top