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

TFS 1.X+ Effect Energy in Spell tfs 1.5 nekiro 7.72

bpm91

Intermediate OT User
Joined
May 23, 2019
Messages
928
Solutions
7
Reaction score
127
Location
Brazil
YouTube
caruniawikibr
I recently started to work on the nekiro 7.72 tfs 1.5 server and I realized that there are many new version tibia things, one of them is the purple energya that comes out in the damage numbering, the other thing would be this energy in the form of a shock under the damage, does anyone know how to fix this?

1649793507435.png
 
In your mort hur spells script delete

Lua:
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)

edit.
nvm just checked it wont work
It's about COMBAT_ENERGYDAMAGE that's send that effect, get into sources probably can be changed somewhere there
 
Last edited:
yes the effect can work for energy field, energy bomb, etc, but for spells like mort hur, exori vis, it wouldn't exist in the case of the old version. I would like to know how to remove
 
Change COMBAT_ENERGYDAMAGE to COMBAT_PHYSICALDAMAGE

That will change the color and effect. What color should the numbers be?
 
yes the effect can work for energy field, energy bomb, etc, but for spells like mort hur, exori vis, it wouldn't exist in the case of the old version. I would like to know how to remove
it's an area spell, what it seems like is that impact effect is sent after hit effect even tho it's looped before (blockhit/changehealth/changemana), no idea how to fix it without breaking anything tho
TFS-1.5-Downgrades/combat.cpp at 7.72 · nekiro/TFS-1.5-Downgrades (https://github.com/nekiro/TFS-1.5-Downgrades/blob/7.72/src/combat.cpp#L986)
 
yes the effect can work for energy field, energy bomb, etc, but for spells like mort hur, exori vis, it wouldn't exist in the case of the old version. I would like to know how to remove
I'm not an old protocol guy, but if I remember correctly it was because mort hur wasn't in fact using energy element, I think it used physical and that should make the color grey.
Unless you want to completely remove the numbers from spells, then that's not possible with current code.
The best way (probably) and I would do it this way is to add new parameter to combat object, so you can specify when you want the damage number to show up and when not.
 
understand, the energy that comes out below should not exist, only the "teleport" which is the effect of mort hur, in relation to purple damage is light blue.this would be the right of this old version. I remember that I already made a 8.60 server become a 7.4 version but I don't remember how to get that energy out of the ground for spells like mort hur, "mort hur is not physical" is energy

1649893386027.png

I used this formula in my old tfs 0.4 but in nekiro I can't use it

(not physical, the name says, Energy wave)
if I'm not mistaken maybe I have to create a new function as if it were a second energy, which would result in using teleport instead of energy

Lua:
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)
function onGetFormulaValues(cid, level, maglevel)
    min = (level * 1.1 + maglevel * 2.2) * 2
    max = (level * 2.5 + maglevel * 2.6) * 2
   
    if min < 200 then
        min = 250
    end

    return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")


local area = createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)
setCombatArea(combat, area)

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Last edited:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 18)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.4, -3, -2.7, 0)

local arr = {
{1, 1, 1},
{1, 1, 1},
{1, 1, 1},
{0, 1, 0},
{0, 3, 0},
}

local arrDiag = {
{1, 1, 1, 0, 0},
{1, 1, 0, 0, 0},
{1, 0, 1, 0, 0},
{0, 0, 0, 1, 0},
{0, 0, 0, 0, 3},
}

local area = createCombatArea(arr, arrDiag)

setCombatArea(combat, area)

function onCastSpell(cid, var)
doSendAnimatedText(getPlayerPosition(cid), "DEATH ..", 215)
    return doCombat(cid, combat, var)
end
Post automatically merged:

Try this, it works fine, let me know if you encounter other problems
spells xD
 
you mean this?


Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 38)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.9, -30, -2.1, 0)

local arr = {
{1, 1, 1},
{1, 1, 1},
{1, 1, 1},
{0, 1, 0},
{0, 3, 0},
}

local arrDiag = {
{1, 1, 1, 0, 0},
{1, 1, 0, 0, 0},
{1, 0, 1, 0, 0},
{0, 0, 0, 1, 0},
{0, 0, 0, 0, 3},
}

local area = createCombatArea(arr, arrDiag)

setCombatArea(combat, area)

function onCastSpell(cid, var)
doSendAnimatedText(getPlayerPosition(cid), "ENERGY", 220)
    return doCombat(cid, combat, var)
end
 
@Nekiro how could i change the energy damage color to light blue? and how could i make a new race_ for an energy that is made of teleport without effect?
Go to your sources game.cpp and look for this:

C++:
        case COMBAT_ENERGYDAMAGE: {
            color = TEXTCOLOR_ELECTRICPURPLE;
            effect = CONST_ME_ENERGYHIT;
            break;
        }

If you want without hit effect change to this - CONST_ME_NONE

There is a list of available colors that you can find in const.h

C++:
enum TextColor_t : uint8_t {
    TEXTCOLOR_BLUE = 5,
    TEXTCOLOR_LIGHTGREEN = 30,
    TEXTCOLOR_LIGHTBLUE = 35,
    TEXTCOLOR_MAYABLUE = 95,
    TEXTCOLOR_DARKRED = 108,
    TEXTCOLOR_LIGHTGREY = 129,
    TEXTCOLOR_SKYBLUE = 143,
    //TEXTCOLOR_PURPLE = 154,
    TEXTCOLOR_PURPLE = 155,
    TEXTCOLOR_ELECTRICPURPLE = 155,
    TEXTCOLOR_RED = 180,
    TEXTCOLOR_PASTELRED = 194,
    TEXTCOLOR_ORANGE = 198,
    TEXTCOLOR_YELLOW = 210,
    TEXTCOLOR_WHITE_EXP = 215,
    TEXTCOLOR_NONE = 255,
};

I just tested it and worked
ZGI52Tx.png
 
Last edited:
@Nekiro how could i change the energy damage color to light blue? and how could i make a new race_ for an energy that is made of teleport without effect?
understand, the energy that comes out below should not exist, only the "teleport" which is the effect of mort hur, in relation to purple damage is light blue.this would be the right of this old version. I remember that I already made a 8.60 server become a 7.4 version but I don't remember how to get that energy out of the ground for spells like mort hur, "mort hur is not physical" is energy

View attachment 67033

I used this formula in my old tfs 0.4 but in nekiro I can't use it

(not physical, the name says, Energy wave)
if I'm not mistaken maybe I have to create a new function as if it were a second energy, which would result in using teleport instead of energy

Lua:
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)
function onGetFormulaValues(cid, level, maglevel)
    min = (level * 1.1 + maglevel * 2.2) * 2
    max = (level * 2.5 + maglevel * 2.6) * 2
 
    if min < 200 then
        min = 250
    end

    return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")


local area = createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)
setCombatArea(combat, area)

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
How did You managed to get retrocores client for your own use? Would You mind to share it?

and what's the problem with energy effect? it shouldn't be there? o.o
 
Last edited:
How did You managed to get retrocores client for your own use? Would You mind to share it?

and what's the problem with energy effect? it shouldn't be there? o.o
I don't have a retrocores client, I'm doing the same, his client is buggy, the energy in this version didn't have the energy effect on low, only the teleport when it hits.
 
I don't have a retrocores client, I'm doing the same, his client is buggy, the energy in this version didn't have the energy effect on low, only the teleport when it hits.
retrocores has it wrong then, because this is how it should look like in 7.x-7.72+, they might have changed it in later versions tho, anyway "forgottenserver " has it reversed, also i believe it could be fixed somehow in area combat

3.png
 
retrocors didn't make a mistake, there was no such energy effect, only the teleport
the effect of exevo vis lux and exevo gran vis lux was energy and fire combat, and energy damage, but I don't know how to do it so I left everything energy
 
Post automatically merged:

retrocors didn't make a mistake, there was no such energy effect, only the teleport
the effect of exevo vis lux and exevo gran vis lux was energy and fire combat, and energy damage, but I don't know how to do it so I left everything energy
Oh yea it was like i think, i don't really know either how to do it xD
 
Last edited:
Back
Top