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

Compiling If not hunt add stamina

gmstrikker

Well-Known Member
Joined
Jul 30, 2014
Messages
458
Solutions
1
Reaction score
50
Where in sources 0.4 show
If player hunt -stamina

I want make:
If player is not hunt +stamina
 
Is it working now?

I think yes, ty so much

---

Guys i think i found where edit on sources to add stamina while no hunting...
Idk if will work, i found looking in all files

On game.cpp
Look for
Code:
void Player::onTickCondition(ConditionType_t type, int32_t interval, bool& _remove)
{
   Creature::onTickCondition(type, interval, _remove);
   if(type == CONDITION_HUNTING)
     useStamina(-(interval * g_config.getNumber(ConfigManager::RATE_STAMINA_LOSS)));
}

Change for
Code:
void Player::onTickCondition(ConditionType_t type, int32_t interval, bool& _remove)
{
   Creature::onTickCondition(type, interval, _remove);
   if(type == CONDITION_HUNTING)
   {
     useStamina(-(interval * g_config.getNumber(ConfigManager::RATE_STAMINA_LOSS)));
   }
   else
   {
     useStamina(+(interval * g_config.getNumber(ConfigManager::RATE_STAMINA_GAIN)));
   }
}
 
more easy with .lua on creaturescripts onthinks

if (getCreatureCondition(cid, CONDITION_HUNTING) == FALSE) then
doPlayerAddStamina(cid, 1)
return true
end
 
Back
Top