• 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 that enchants player

DestinationSer

@echo off
Joined
Mar 7, 2009
Messages
2,806
Solutions
1
Reaction score
676
I need a spell that enchants the player with 50 magic levels..
Like
lativus "playername
Playername recieves 50 magic levels for 10 minutes.
Thanks
 
Spells.xml
XML:
	<instant name="Enchant Friend" words="lativus" lvl="20" mana="100" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="2000" needlearn="0" event="script" value="healing/enchant friend.lua">
		<vocation id="2"/>
		<vocation id="6"/>
	</instant>

enchant friend.lua
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 600000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 50)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

You can also do it as a procent of someones magiclevel, this will make it less overpowerd if people do it on low levels.
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 600000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 150)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Nice, but can you also make it countain effect type 39? and that it says "Enchanted!" over the player? That would have been awesome
 
Back
Top