• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell Bloody Roar!

Exedion

Active Member
Joined
Jun 11, 2007
Messages
628
Reaction score
30
Well i made this spell for my berserker knight based promotion of my ot, i take the name of famous videogame xD but no have relation with it :S well this spell take the 30% of the character hp to cast, doing a blood area which reduces the states depending on the vocation affected, giving him a berserker state but greatly reducing their defenses, I hope you like it! Enjoy!

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)

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, 10000)
    setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 50)
end
    setConditionParam(condition[1], CONDITION_PARAM_STAT_MAGICLEVEL, 5)
    setConditionParam(condition[2], CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
    setConditionParam(condition[3], CONDITION_PARAM_SKILL_MELEEPERCENT, 150)

function onTargetCreature(cid, target)
    if(isSorcerer(target) or isDruid(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.3 - 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
 
Last edited:
What do you need picture for? It just does something like Blood Rage, but different attributes for different vocations.

really not, this is not a "personal" buffer, this affect to the people in the spell area, not the own character, and don't need pic, is a small circle area with blood effect...
 
it doesnt work for me.
[14/08/2010 22:05:42] [Error - Spell Interface]
[14/08/2010 22:05:42] In a callback: mods/scripts/customspells/custom/bloodroar.lua:eek:nTargetCreature
[14/08/2010 22:05:42] (Unknown script file)
[14/08/2010 22:05:42] Description:
[14/08/2010 22:05:42] (internalGetPlayerInfo) Player not found when requesting player info #6
also u can change this
local tribute = getCreatureMaxHealth(cid) * 1.3 - getCreatureMaxHealth(cid)
to
local tribute = getCreatureMaxHealth(cid) * 0.3
and it would be nice if it effected the user also. i tried doing it but failed terribly
 
Back
Top