• 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 0.X where i can found C++

supermortaliz

Member
Joined
Jan 26, 2014
Messages
76
Solutions
6
Reaction score
12
The forgotten server 0.4 rev 3884
Where i can found Damage Players to monsters???
i only found this line but is for monster to player..

Code:
if (target->getPlayer() && attacker && attacker->getMonster())
        damage *= 2;
any can help me?
Srry for my bad english..
 
What exactly is going on?
Damage from weapons or spells
Anyway, as I think, the monsters beat 100%
Only in players less
 
try in Combat.cpp
on
C++:
bool Combat::CombatHealthFunc(Creature* caster, Creature* target, const CombatParams& params, void* data)
add
C++:
if (caster && caster->getPlayer())
{
        std::string pkt4;
        caster->getPlayer()->getStorage("bonus", pkt4);  
       
       change = (int32_t) ((float) change * ((100.0 + atoi(pkt4.c_str())) / 100.0)) ;
       }

try something like this
 
try in Combat.cpp
on
C++:
bool Combat::CombatHealthFunc(Creature* caster, Creature* target, const CombatParams& params, void* data)
add
C++:
if (caster && caster->getPlayer())
{
        std::string pkt4;
        caster->getPlayer()->getStorage("bonus", pkt4);
     
       change = (int32_t) ((float) change * ((100.0 + atoi(pkt4.c_str())) / 100.0)) ;
       }

try something like this
i have this line maybe i change
Lua:
 if(change < 0 && caster && caster->getPlayer() && target->getPlayer())
to
Lua:
 if(change < 0 && caster && caster->getPlayer() && target->getMonster())
working only in monsters?
Okey i testing it and is working with monsters only :) now i need how i can get damage with storage value
 
Last edited:
Back
Top