• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

when internet player dropped reduce monster damage

Sorry dude you're going to have to explain what the problem is for anyone to be able to help you.
Its hard to read but possible.

He wants a code that will reduce the damage you get by monsters when your Internet goes down(like Router restart) or like that.
 
Add an extra variable to player, uint32_t lastPing;//or whatever u wanna call it
onRecievePingBack? player->lastPing = OTSYS_TIME()

Monster.cpp onAttack/doAttack
If(OTSYS_TIME() - targetPlayer->lastPing > 10) damageFormula = newDamageFormula
 
Add an extra variable to player, uint32_t lastPing;//or whatever u wanna call it
onRecievePingBack? player->lastPing = OTSYS_TIME()

Monster.cpp onAttack/doAttack
If(OTSYS_TIME() - targetPlayer->lastPing > 10) damageFormula = newDamageFormula
I thought you could do with script, I do not have the sources
 
Back
Top