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

Stamina Up

marcos16

Falkhonn
Joined
May 4, 2012
Messages
224
Reaction score
1
I need a script that recovers stamina when the player sleeps.

Because it is not recovering stamina offline.

Could someone help me with this?

I'm using Tfs 0.4_svn
 
With 0.4 the stamina recovery system is built into the server, if it isn't working start by checking your config.lua if it's activated / default values.
If the player is offline it shouldn't "recover" any stamina points, if you want that you need to modify the source code.
 
With 0.4 the stamina recovery system is built into the server, if it isn't working start by checking your config.lua if it's activated / default values.
If the player is offline it shouldn't "recover" any stamina points, if you want that you need to modify the source code.

Code:
rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 3
staminaRatingLimitTop = 40 * 60
staminaRatingLimitBottom = 14 * 60
staminaLootLimit = 14 * 60
rateStaminaAboveNormal = 1.0
rateStaminaUnderNormal = 0.5
staminaThresholdOnlyPremium = true

config.lua


I set it up in several ways even so it does not regenerate the stamina.
In source code where could it be configured?
 
Last edited:
Code:
rateStaminaLoss = 1
rateStaminaGain = 3
rateStaminaThresholdGain = 3
staminaRatingLimitTop = 40 * 60
staminaRatingLimitBottom = 14 * 60
staminaLootLimit = 14 * 60
rateStaminaAboveNormal = 1.0
rateStaminaUnderNormal = 0.5
staminaThresholdOnlyPremium = true

config.lua


I set it up in several ways even so it does not regenerate the stamina.
In source code where could it be configured?

Check if you got the code related to stamina in your source code for starters, also try the serach function since there was a thread about this not long ago, might be a server related issue?
 
Check if you got the code related to stamina in your source code for starters, also try the serach function since there was a thread about this not long ago, might be a server related issue?

I used the same .exe file on another server, stamina increased.

Where would the problem be? I looked at everything and did not find, creaturescript, etc.
 
I used the same .exe file on another server, stamina increased.

Where would the problem be? I looked at everything and did not find, creaturescript, etc.

Well take a look in creaturescript and globalevents I suppose.
But i don't know if 0.4 has any Lua functions regarding stamina, was it the same config.lua settings?
 
Yes, same settings

Well 0.4 seems to have 2 functions;
Code:
//getPlayerStamina(cid)
//doPlayerSetStamina(cid, minutes)

Do a file serach if you can find any of those.
But they don't exist and you made sure the server works then there isn't any problems that I can think of.
 
Back
Top