• 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!

Script requested: Precentage HP & Mana

mernes

New Member
Joined
Jul 30, 2009
Messages
41
Reaction score
0
Is there anyone that knows how to script so that you have precentage hp and mana. I saw this in a few OTs now, instead of like having 50k hp you have 100 hp, losing like 10k (20%) then you'll lose 20 hp.

Thanks!!
 
I would assume that instead of sending the actual health values you change the function
void ProtocolGame::AddPlayerStats(NetworkMessage& msg) in protocolgame.cpp so MAXHEALTH 100 at all times and out of getHealth and getPlayerInfo(PLAYERINFO_MAXHEALTH) you calculate the percentage (0-100)
 
I would assume that instead of sending the actual health values you change the function
void ProtocolGame::AddPlayerStats(NetworkMessage& msg) in protocolgame.cpp so MAXHEALTH 100 at all times and out of getHealth and getPlayerInfo(PLAYERINFO_MAXHEALTH) you calculate the percentage (0-100)

Is there a tutorial about protocolgame? I don't have so much experience about this :/ Thanks though!
 
Back
Top