• 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!

Spell editing.

Zambaku

New Member
Joined
Jan 2, 2009
Messages
17
Reaction score
0
I have the need to edit a spell on my server, in this case the invisibility spell to make it last a bit longer.

Taken from the "Spells.xml":
Code:
<instant name="Invisible" words="utana vid" selftarget="1" aggressive="0" lvl="35" maglv="14" mana="440" soul="0" exhaustion="1" prem="1" enabled="1" script="invisible.lua"><vocation id="2"/><vocation id="1"/><vocation id="3"/><vocation id="6"/><vocation id="5"/><vocation id="7"/></instant>

Do I edit anything in the "Spells.xml" or do I jump into the scripts folder and edit the .lua file?
 
find your invisible.lua and edit ;)


PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 200000)
setCombatCondition(combat, condition)

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

setConditionParam(condition, CONDITION_PARAM_TICKS, 200000)

200000 - it's time. Make it bigger, as you wanted.
 
Many, many thanks!^^


While we are on the subject of xml and lua. I was thinking about learning how to make quests. Is there a guide on how to make a simple quest where you simply fetch an item from a treasure chest, or where you will have to slay a certain number of a certain type of enemy?
 
Last edited:
Back
Top