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

[Request] Mage Armor

MarkSmartRemark

Lua-Noob in Training :D
Joined
Jan 27, 2010
Messages
139
Reaction score
3
Hellooo, i was wondering, is there a way to set certain armors on mages? i mean it would be a very cool spell, (idea from wow), if example... a mage casts a spell and they have an armor (not visible) and if the mage is melee hit or spell hit w.e idc, the person who him him gets paralyzed... example

knight comes attacks mage who has frost armor on, the knight gets slowed(paralyzed)...

or maybe something similar to this =) is it possible? if not that then maybe something like a fire armor... when the mage is struck the person who attacked the mage receives X damage... thanks!
 
Ok. this is just a quicky. This is what I came up with.

This is a energy strike mixed with paralyze. If they are wherein a AoL they will paralyze as well as do the damage. If not they will just do the damage.

PHP:
local distanceCombat = createCombatObject()
setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(distanceCombat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(distanceCombat, COMBAT_FORMULA_LEVELMAGIC, -0.4, 0, -0.5, 0)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)

function onCastSpell(cid, var)
	if getPlayerSlotItem(cid, 2) == 2173 then  --checking for amulet of loss
		setCombatCondition(combat, condition)
	end
	return doCombat(cid, combat, var)
end
 
Ok i think i read what you needed wrong. I think i can do what you need. I'll post it in a bit if i make it.
 
Last edited:
add to data/creaturescripts/creaturescripts.xml
PHP:
<event type="attack" name="Armorpara" event="script" value="armorpara.lua"/>

make /data/creaturescripts/scripts/armorpara.lua
PHP:
-- Made by Delconis from Eclipseonline.servegame.com

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

local _slot = 2 -- Slot item should be in
local _itemid = 2173 -- Item you need to wear

function onAttack(cid, target)
	if getPlayerSlotItem(cid, _slot) == _itemid then  --Check for Item in slot
		return doCombat(cid, combat, var) -- Do combat
	end
end
 
Back
Top