• 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.2 How to fix no delay on poof effect when failing to cast something

Tbol

Well-Known Member
Joined
Apr 7, 2019
Messages
529
Reaction score
56
Hello,
i noticed for example when u cant cast the spell it sends poof effect right? And if u put it on hotkey f1 and hold it, it spams this poof effect like crazy, it doesnt really look normal or optimized. How can i make like delay of this effect or something?
 
You could set timer and after the line which performs the poof, check timer, if nil then set to 2000 and poof, if > 0 then don’t poof.
 
I think it would be much more beneficial if I walk you through the steps:

1. go to official tfs repo (I always just google the forgotten server github, and it's the first result)
2d05f8da5921f2ca52593fa060f5cb1d.png

Gyazo (https://gyazo.com/2d05f8da5921f2ca52593fa060f5cb1d)

2. You know you're looking for poff or something so search POFF and you'll find CONST_ME_POFF which is magic effect, poff (what you're looking for)

3. check c++ (sources which uses CONST_ME_POFF) and find the situation you're talking about (if exhausted, send poff)
14277c165963c00dcfaf62a687007bdf.png

Gyazo (https://gyazo.com/14277c165963c00dcfaf62a687007bdf)

the specific lines regarding this (599-607)
forgottenserver/spells.cpp at 84337dfc9a997126a3505e6782fa8713654cacbb · otland/forgottenserver (https://github.com/otland/forgottenserver/blob/84337dfc9a997126a3505e6782fa8713654cacbb/src/spells.cpp#L599)

Hope that helps more than a simple reply!
 
Back
Top