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

stunning arrow

Scooty

Enemia.EU
Joined
Jul 24, 2010
Messages
564
Reaction score
14
Location
Kraków
Hi mans ;)

i need a stunning arrow spell.

ill try to explain:

-arrow like a ethereal spear:
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)

function onGetFormulaValues(cid, level, skill, attack, factor)
	return -(((skill + 25) / 3) + (level / 5)), -((skill + 25) + (level / 5))
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
        if exhaustion.check(cid, 24012) == false then
                exhaustion.set(cid, 24012, 2)
	return doCombat(cid, combat, var)
			else
		doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 24012).."]")
	end
end

but target can't move(doCreatureSetNoMove function) for 2 seconds.


Thanks for help ;)
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)

function onGetFormulaValues(cid, level, skill, attack, factor)
	return -(((skill + 25) / 3) + (level / 5)), -((skill + 25) + (level / 5))
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, 'onGetFormulaValues')

local function f(k)
	if isCreature(k) then
		doCreatureSetNoMove(k, false)
	end
end

function onCastSpell(cid, var)
	if exhaustion.check(cid, 24012) == false then
		exhaustion.set(cid, 24012, 2)
		if doCombat(cid, combat, var) then
			local k = variantToNumber(var)
			doCreatureSetNoMove(k, true)
			addEvent(f, 2000, k)
			return true
		end
	else
		doPlayerSendCancel(cid, 'Cooldown[' ..exhaustion.get(cid, 24012)..']')
	end
end
 
Back
Top