zabuzo
Well-Known Member
- Joined
- Jun 10, 2016
- Messages
- 238
- Reaction score
- 54
Is it possible to make a spell that mute another player?
Really mute, so the other player can not even use exura gran, exura...
Really mute, so the other player can not even use exura gran, exura...
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 21)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, true)
local condition = createConditionObject(CONDITION_MANASHIELD)
setConditionParam(condition, CONDITION_PARAM_TICKS, 200000)
setCombatCondition(combat, condition)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
function onCastSpell(cid, var)
local requiredMana = (getPlayerLevel(cid) * spellcfg_exorimutethir_MPperLVLreq)
if getPlayerMana(cid) >= requiredMana then
doPlayerAddMana(cid, -requiredMana)
doCombat(cid, combat, var)
return true
end
return doPlayerSendCancel(cid, "You don't have mana. ["..tostring(requiredMana).."]")
end