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

well i have this

agomez

Member
Joined
Jan 28, 2009
Messages
211
Reaction score
5
i have this spell but i want when you attack you have 50% possibiliti of "pacified" the opponent :D

PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, -15, 1, 0)

function spellCallback(param)
	if param.count > 0 or math.random(0, 1) == 1 then
createConditionObject(CONDITION_DROWN)
	end

	if(param.count < 5) then
		param.count = param.count + 1
		addEvent(spellCallback, math.random(1000, 4000), param)
	end
end

function onTargetTile(cid, pos)
	local param = {}
	param.cid = cid
	param.pos = pos
	param.count = 0
	spellCallback(param)
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

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

local condition = createConditionObject(CONDITION_PACIFIED)
setConditionParam(condition, CONDITION_PARAM_TICKS, 6000)
setCombatCondition(combat, condition)

local condition = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition, CONDITION_PARAM_TICKS, 6000)
setCombatCondition(combat, condition)

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