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

"No elemental" dmg OR unresistable elemental dmg?

  • Thread starter Deleted member 210450
  • Start date
D

Deleted member 210450

Guest
Hi.
I am working on 5th vocation on OTS - Warlock. In my mind, I took of death-element wands, rods and spells from Sorc (only fire & energy spells & wands) and Druid (only ice & earth spells & rods) and gave that to Warlock (only death spells, death rods and wads [necrotic, voodoo, underworld, decay]).

But since he is able to using only one element, he wouldnt hunt creatures which has damage reduction from death. So... Can i do something to cheat that? Like, hm... His spells would have "non element" dmg (neither physical as well)? In result his "death spells" like utori mort would do damage to minions like Undead Dragon, Lich etc.? But at the same time, this spells (mainly UE, waves, AoE) still would have death-elemental animation (black circle with skull)?

Or second way to do that: can i imply something like "true" dmg to all damage sources in one vocation? You know, when Warlock would use death-damage wand (Wand of Voodoo for example) on Undead Dragon, that would take damage regardless he is immune for death?

I could delete death immune from all creatures, but, you know... Then even sorc/druid/pals could do dmg to death-immune minions. And there are too much creature to do that for single one.
 
These are the different types of combat damage a creature can do.
Code:
    COMBAT_PHYSICALDAMAGE
    COMBAT_ENERGYDAMAGE
    COMBAT_EARTHDAMAGE
    COMBAT_FIREDAMAGE
    COMBAT_UNDEFINEDDAMAGE
    COMBAT_LIFEDRAIN
    COMBAT_MANADRAIN
    COMBAT_HEALING
    COMBAT_DROWNDAMAGE
    COMBAT_ICEDAMAGE
    COMBAT_HOLYDAMAGE
    COMBAT_DEATHDAMAGE

The majority of other things defined in the spell are just visual so you could do earth damage and the visual could be ice, the point here is you don't need to provide the exact visual representation of the damage type.
 
So I can deal psychical, life drain, drown damage with death damage animation? How?

I am not good in LUA, so my way to create new death damage spells looks that:
-> Take spell, for example "energy wave"
-> Replace first 4 lines:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
With new one, which i took from death damage spell:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)

And, interestingly, it works :D So, to do life drain damage with death animation, should it be like this?
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
Am i right?
@E:
No. I am not. I tried with this spell below, but third line I replaced with energy effect, and still death animation, and death danage).

To preview, I created UE from death. Originally was a Exevo gran mas tera, but as above, i replaced first 4 lines.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)

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

function onGetFormulaValues(cid, level, maglevel)
    min = -((level / 5) + (maglevel * 5.5) + 25)
    max = -((level / 5) + (maglevel * 11) + 50)
    return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

Unfortunately, creatures immune for death, are immune for life drain as well :( So it has to be "undefinded" i guess so?
 
Last edited by a moderator:
As I said the combat type is the only thing in the spell which applies the damage type, the effect and distant effect are just for visuals.

Here is an example, I will take 3 spells and combine them into one.
Code:
-- envenom.lua
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON)

-- explosion.lua
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)

-- fire wave.lua
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
New spell
Code:
-- new spell
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
In the new spell the COMBAT_POISONDAMAGE is the only damage type, CONST_ME_EXPLOSIONAREA & CONST_ANI_FIRE these values are what you see in the client its special effect.
 
Ok. Thanks a lot!

But i got awareness 'bout one thing I forgot earlier. How can I change wands/rods elemental damage into "lifedrain", "drown", or "undefined"?
 
But when I have wand:
Code:
    <wand id="2181" level="37" mana="5" min="37" max="59" type="earth"> <!-- Terra Rod -->
        <vocation name="Druid" />
    </wand>
I can't replace "earth" with "drown" or "lifedrain".
 
But when I have wand:
Code:
    <wand id="2181" level="37" mana="5" min="37" max="59" type="earth"> <!-- Terra Rod -->
        <vocation name="Druid" />
    </wand>
I can't replace "earth" with "drown" or "lifedrain".
For this you wouldn't need a movements script.
You would just change the values in weapons.xml
<wand id="2181" level="37" mana="5" min="37" max="59" type="earth"> <!-- Terra Rod -->
<vocation name="Druid" />
</wand>
to
<wand id="2181" level="37" mana="5" min="37" max="59" script=" name of script ">
<vocation name="Druid" />
</wand>

Then you would write a script for the weapon assigned to the script, like this.
This is a 1.2 script.
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH)

function onGetFormulaValues(player, level, maglevel)
    local min = (level / 5) + (maglevel * 1.4) + 8
    local max = (level / 5) + (maglevel * 2.2) + 14
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onUseWeapon(player, variant)
    return combat:execute(player, variant)
end
From here you can make the changes to the combat type of damage with the list I mentioned above.
 
Back
Top