• 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+ Spell hit COLLOR

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
200
Hi! I'm using tfs 1.2....
I use this spell in tfs 0.4 and when it goes to 1.2 I realized that the spell does not show the damage.


Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.25, 1, -1.25, 1)
setCombatParam(combat, COMBAT_PARAM_HITCOLOR, 15)

function onCastSpell(cid, var)
local position1 = {x=getThingPos(getCreatureTarget(cid)).x, y=getThingPos(getCreatureTarget(cid)).y, z=getThingPos(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 26)
return doCombat(cid, combat, var)
end

I realized that the error is in this line, because if I put the value 3, it shows the energy damage, if I put 5, it shows the death damage.
Code:
setCombatParam(combat, COMBAT_PARAM_HITCOLOR, 15)
in source 0.4 there are 254 different colors for damage, and in 1.2 there are no 254 colors?
 
These are the color values in 1.2
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 = 155,
    TEXTCOLOR_RED = 180,
    TEXTCOLOR_ORANGE = 198,
    TEXTCOLOR_YELLOW = 210,
    TEXTCOLOR_WHITE_EXP = 215,
    TEXTCOLOR_NONE = 255,
};
 
These are the color values in 1.2
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 = 155,
    TEXTCOLOR_RED = 180,
    TEXTCOLOR_ORANGE = 198,
    TEXTCOLOR_YELLOW = 210,
    TEXTCOLOR_WHITE_EXP = 215,
    TEXTCOLOR_NONE = 255,
};
there are only these?
because in src 0.4 it has 254 different colors
 
there are only these?
because in src 0.4 it has 254 different colors
I am sure there are more colors than that but i don't write the sources. You'd have to ask someone who does how the colors work but those are the constants used to differentiate between the different colors.
 
I am sure there are more colors than that but i don't write the sources. You'd have to ask someone who does how the colors work but those are the constants used to differentiate between the different colors.
someone can help?
How can use all collors of damage?
 
Back
Top