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

make spell give skull and pz lock!

Seanr

New Member
Joined
Jul 11, 2011
Messages
167
Reaction score
3
Location
Mo Town
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)

AREA_CIRCLE = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 2, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0}
}

local area = createCombatArea(AREA_CIRCLE)
setCombatArea(combat, area)

local condition = {}
for i = 1, 4 do
condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 15000)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 50)
end
setConditionParam(condition[1], CONDITION_PARAM_STAT_MAGICLEVEL, -40)
setConditionParam(condition[2], CONDITION_PARAM_SKILL_DISTANCEPERCENT, -150)
setConditionParam(condition[3], CONDITION_PARAM_SKILL_MELEEPERCENT, -150)

function onTargetCreature(cid, target)
if(isMage(target) or isBard(target)) then
return doTargetCombatCondition(cid, target, condition[1], CONST_ME_MAGIC_BLUE), true
elseif(isPaladin(target)) then
return doTargetCombatCondition(cid, target, condition[2], CONST_ME_MAGIC_GREEN), true
elseif(isKnight(target)) then
return doTargetCombatCondition(cid, target, condition[3], CONST_ME_MAGIC_RED), true
end
return true
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

function onCastSpell(cid, var)
local tribute = getCreatureMaxHealth(cid) * 1 - getCreatureMaxHealth(cid)

if getCreatureHealth(cid) <= tribute then
doPlayerSendCancel(cid, "You need more health points.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return LUA_ERROR
else
doCreatureAddHealth(cid, -tribute)
return doCombat(cid, combat, var)
end
end






Is there any way to make this spell give skull when used on player and not in party or guild with the player(s)?
 
Back
Top