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

REMOVE soul regeneration

Activity

Member
Joined
Apr 7, 2016
Messages
182
Reaction score
22
I need to remove gaining soul and i removed it from VOCATIONS.xml but i still gaining soul from it so i found that at sources and i don't know which part i should remove
Code:
{
    if(!rateExperience(gainExp, fromMonster))
        return false;

    //soul regeneration
    if(gainExp >= level)
    {
        if(Condition* condition = Condition::createCondition(
            CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
        {
            condition->setParam(CONDITIONPARAM_SOULGAIN,
                vocation->getGainAmount(GAIN_SOUL));
            condition->setParam(CONDITIONPARAM_SOULTICKS,
                (vocation->getGainTicks(GAIN_SOUL) * 1000));
            addCondition(condition);
        }
    }

    addExperience((uint64_t)gainExp);
    return true;
}
TFS 0.4
 
Code:
{
if(!rateExperience(gainExp, fromMonster))
return false;

addExperience((uint64_t)gainExp);
return true;
}
I didn't try it yet but I have another question, I already compiled my source before with my WIN and i totally forgot what changes that i made with my source and it is very good atm but the question is, Will i need to compile it again when i get my host? in Debian or other system?
 
@Danger II That's what i found when i tried to compile ~.~
t6dwue.jpg
 
Code:
   //soul regeneration
    if(gainExp >= level)
    {
        if(Condition* condition = Condition::createCondition(
            CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
        {
            condition->setParam(CONDITIONPARAM_SOULGAIN,
                vocation->getGainAmount(GAIN_SOUL));
            condition->setParam(CONDITIONPARAM_SOULTICKS,
                (vocation->getGainTicks(GAIN_SOUL) * 1000));
            addCondition(condition);
        }
    }
Try removing this part
 
Code:
   //soul regeneration
    if(gainExp >= level)
    {
        if(Condition* condition = Condition::createCondition(
            CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
        {
            condition->setParam(CONDITIONPARAM_SOULGAIN,
                vocation->getGainAmount(GAIN_SOUL));
            condition->setParam(CONDITIONPARAM_SOULTICKS,
                (vocation->getGainTicks(GAIN_SOUL) * 1000));
            addCondition(condition);
        }
    }
Try removing this part
Well same errors.
EDIT: so that's all i've removed until now and still same errors
Code:
if(!rateExperience(gainExp, fromMonster))
        return false;

    //soul regeneration
    if(gainExp >= level)
    {
        if(Condition* condition = Condition::createCondition(
            CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
        {
            condition->setParam(CONDITIONPARAM_SOULGAIN,
                vocation->getGainAmount(GAIN_SOUL));
            condition->setParam(CONDITIONPARAM_SOULTICKS,
                (vocation->getGainTicks(GAIN_SOUL) * 1000));
            addCondition(condition);
        }
    }

    addExperience((uint64_t)gainExp);
    return true;
 
Code:
{
if(!rateExperience(gainExp, fromMonster))
return false;

//soul regeneration
if(gainExp >= level)
{
if(Condition* condition = Condition::createCondition(
CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
{
condition->setParam(CONDITIONPARAM_SOULGAIN,
vocation->getGainAmount(GAIN_SOUL));
condition->setParam(CONDITIONPARAM_SOULTICKS,
(vocation->getGainTicks(GAIN_SOUL) * 1000));
addCondition(condition);
}
}

addExperience((uint64_t)gainExp);
return true;
}

To
Code:
{
if(!rateExperience(gainExp, fromMonster)){
return false;
}

addExperience((uint64_t)gainExp);

return true;
}
 
Code:
{
if(!rateExperience(gainExp, fromMonster))
return false;

//soul regeneration
if(gainExp >= level)
{
if(Condition* condition = Condition::createCondition(
CONDITIONID_DEFAULT, CONDITION_SOUL, 4 * 60 * 1000))
{
condition->setParam(CONDITIONPARAM_SOULGAIN,
vocation->getGainAmount(GAIN_SOUL));
condition->setParam(CONDITIONPARAM_SOULTICKS,
(vocation->getGainTicks(GAIN_SOUL) * 1000));
addCondition(condition);
}
}

addExperience((uint64_t)gainExp);
return true;
}

To
Code:
{
if(!rateExperience(gainExp, fromMonster)){
return false;
}

addExperience((uint64_t)gainExp);

return true;
}
Well Player.cpp just passed without any errors i hope so it work :p thanks.
@Danger II
Edit: I'm still checking and seems like it will work, I tried to do something like this post
https://otland.net/threads/channels-xml-private-chat-channel-question.224152/#post-2242862
So i tried to do a new char without Premium and still there isn't private chat.
 
Last edited:
Well Player.cpp just passed without any errors i hope so it work :p thanks.
@Danger II
Edit: I'm still checking and seems like it will work, I tried to do something like this post
https://otland.net/threads/channels-xml-private-chat-channel-question.224152/#post-2242862
So i tried to do a new char without Premium and still there isn't private chat.

Actually TFS 0.4 is only checking for premium in chat.cpp here:
Code:
      if(!player->isPremium() || getPrivateChannel(player))
         return NULL;
replaced with:
Code:
      if(getPrivateChannel(player))
         return NULL;

while channels.xml should contain this:
Code:
<channel id="65535" name="Private Chat Channel"/>

This should totally enough to let private channel work with free premium, else you did something wrong.
 
Actually TFS 0.4 is only checking for premium in chat.cpp here:
Code:
      if(!player->isPremium() || getPrivateChannel(player))
         return NULL;
replaced with:
Code:
      if(getPrivateChannel(player))
         return NULL;

while channels.xml should contain this:
Code:
<channel id="65535" name="Private Chat Channel"/>

This should totally enough to let private channel work with free premium, else you did something wrong.
what if i say that's all i've done? and still same result :(.
 
Then I would say you still did something wrong or you're not using clean tfs 0.4 (any edited private channel version, no clue)
TFS's part of checking for premium is only in in chat.cpp, try to give yourself premium and see if you can use private channel, if not - you will know the private channel is disabled somehow..
 
Then I would say you still did something wrong or you're not using clean tfs 0.4 (any edited private channel version, no clue)
TFS's part of checking for premium is only in in chat.cpp, try to give yourself premium and see if you can use private channel, if not - you will know the private channel is disabled somehow..
Well I'm using Edited Source, Downloaded it from google and a friend of mine edited it for me with alot of changes like Cast system/ Hp.Mana percentage etc.
And When i get premium i find My private chat nothing else so its not disabled.
 
Back
Top