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

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
In \data\spells\scripts\healing create 'antidote energy.LUA', 'antidote fire.LUA' and change 'antidote.LUA' to 'antidote poison.LUA'.

antidote energy.LUA:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_ENERGY)

function onCastSpell(cid, var)
	   repeatEffect(cid, CONST_ME_MAGIC_BLUE, 100, 3)
	return doCombat(cid, combat, var)
end

antidote fire.LUA:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_FIRE)

function onCastSpell(cid, var)
	   repeatEffect(cid, CONST_ME_MAGIC_RED, 100, 3)
	return doCombat(cid, combat, var)
end

antidote poison.LUA:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_POISON)

function onCastSpell(cid, var)
	   repeatEffect(cid, CONST_ME_MAGIC_GREEN, 100, 3)
	return doCombat(cid, combat, var)
end

Tags:
Code:
	<instant name="Antidote" words="exana pox" lvl="10" mana="30" aggressive="0" selftarget="1" exhaustion="1000" script="healing/antidote poison.lua">
		<vocation name="Sorcerer" />
		<vocation name="Druid" />
		<vocation name="Paladin" />
		<vocation name="Knight" />
		<vocation name="Master Sorcerer" />
		<vocation name="Elder Druid" />
		<vocation name="Royal Paladin" />
		<vocation name="Elite Knight" />
	</instant>
	<instant name="Antidote" words="exana flam" lvl="15" mana="50" aggressive="0" selftarget="1" exhaustion="1000" script="healing/antidote fire.lua">
		<vocation name="Sorcerer" />
		<vocation name="Druid" />
		<vocation name="Paladin" />
		<vocation name="Knight" />
		<vocation name="Master Sorcerer" />
		<vocation name="Elder Druid" />
		<vocation name="Royal Paladin" />
		<vocation name="Elite Knight" />
	</instant>
	<instant name="Antidote" words="exana vis" lvl="20" mana="70" aggressive="0" selftarget="1" exhaustion="1000" script="healing/antidote energy.lua">
		<vocation name="Sorcerer" />
		<vocation name="Druid" />
		<vocation name="Paladin" />
		<vocation name="Knight" />
		<vocation name="Master Sorcerer" />
		<vocation name="Elder Druid" />
		<vocation name="Royal Paladin" />
		<vocation name="Elite Knight" />
	</instant>

Work in TFS.
Ahh... add in your global.LUA:
Code:
function repeatEffect(cid, effect, delay, repeatTime)
    if repeatTime > 0 then
        doSendMagicEffect(getCreaturePosition(cid), effect)
        repeatTime = repeatTime - 1
        addEvent(repeatEffect, delay, cid, effect, delay, repeatTime)
    end
end
 
Back
Top