• 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+ Question where is hit style show up

Stanos

Veteran OT User
Joined
Jun 12, 2018
Messages
587
Solutions
4
Reaction score
315
Location
Europe
Hi
so i want to change or delete my effectS when i get hit by monster so when i get hit effect applies this is default tfs function but i dont know where can i find this script? Same with when spell it send weird effects on target so i want to delete or change stuff like this., but i have no clue where to look. Thanks :)
 
Hi
so i want to change or delete my effectS when i get hit by monster so when i get hit effect applies this is default tfs function but i dont know where can i find this script? Same with when spell it send weird effects on target so i want to delete or change stuff like this., but i have no clue where to look. Thanks :)
otland/forgottenserver
 
Solution
I'm really sorry for comment again but i have one more question :D so i deleted one effect from energy damage, compiled source but then when i tried to test i saw that now energy damage sends random effects, it should send no effects at all.
Code:
                case RACE_ENERGY:
                    color = TEXTCOLOR_PURPLE;
                    break;
                default:
Code:
        case COMBAT_ENERGYDAMAGE: {
            color = TEXTCOLOR_PURPLE;
            break;
        }
Why is it happening?
 
I'm really sorry for comment again but i have one more question :D so i deleted one effect from energy damage, compiled source but then when i tried to test i saw that now energy damage sends random effects, it should send no effects at all.
Code:
                case RACE_ENERGY:
                    color = TEXTCOLOR_PURPLE;
                    break;
                default:
Code:
        case COMBAT_ENERGYDAMAGE: {
            color = TEXTCOLOR_PURPLE;
            break;
        }
Why is it happening?
Since effect is a reference I believe off hand that its using a junk value every-time it executes since you have omitted redefining it within the case statement.
Just change this:
C++:
                case RACE_ENERGY:
                    color = TEXTCOLOR_ELECTRICPURPLE;
                    effect = CONST_ME_ENERGYHIT;
                    break;
to this
C++:
                case RACE_ENERGY:
                    color = TEXTCOLOR_ELECTRICPURPLE;
                    effect = CONST_ME_NONE;
                    break;
A little difficult to explain to someone how C++ works, although learning about a switch statements execution is pretty easy its just for me a difficult task to explain to someone who has little to no interest in learning about it.

However if you are interested you can read up about it on page 75 of the pdf I uploaded in the tools section. However I do recommend you start from the beginning of the book, but to each their own ;)

Learn C++ (PDF)
 
Last edited:
Since effect is a reference I believe off hand that its using a junk value every-time it executes since you have omitted redefining it within the case statement.
Just change this:
C++:
                case RACE_ENERGY:
                    color = TEXTCOLOR_ELECTRICPURPLE;
                    effect = CONST_ME_ENERGYHIT;
                    break;
to this
C++:
                case RACE_ENERGY:
                    color = TEXTCOLOR_ELECTRICPURPLE;
                    effect = CONST_ME_NONE;
                    break;
A little difficult to explain to someone how C++ works, although learning about a switch statements execution is pretty easy its just for me a difficult task to explain to someone who has little to no interest in learning about it.

However if you are interested you can read up about it on page 75 of the pdf I uploaded in the tools section. However I do recommend you start from the beginning of the book, but to each their own ;)

Learn C++ (PDF)
Still the same.

Wait what now it works maybe i did something wrong with compiling. Thank you sir :)
 
Last edited:
Back
Top