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

Solved TFS 1.0 - Skill gain

Cadyan

Well-Known Member
Joined
Mar 30, 2008
Messages
845
Reaction score
63
I attempted to add player flags to eliminate soul and skill gain. Didn't work. Any help?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group id="1" name="player" flags="2048;268435456" access="0" maxdepotitems="0" maxvipentries="0" />
    <group id="2" name="gamemaster" flags="2048;268435456;137438953471" access="1" maxdepotitems="0" maxvipentries="200" />
    <group id="3" name="god" flags="2048;268435456;127540697997304" access="1" maxdepotitems="0" maxvipentries="200" />
</groups>
 
flags have to be single number, it's binary so flags if flags 2, 4, 5 are enabled it'll be: 0 + 2^2 + 2^4 + 2^5
I'd write flags converter, but I don't know what cpp file has full list of them and I don't trust global.lua flags
 
So for flags 11 + 28 I'd have to calculate this:
0 + 2^11 + 2^28 =
0 + 2048 + 268435456 =
268437504
So for having both flag 11 and 28 I would need to put :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group id="1" name="player" flags="268437504" access="0" maxdepotitems="0" maxvipentries="0" />
    <group id="2" name="gamemaster" flags="137438953471" access="1" maxdepotitems="0" maxvipentries="200" />
    <group id="3" name="god" flags="127540697997304" access="1" maxdepotitems="0" maxvipentries="200" />
</groups>
Is this correct? Because I tried it, and didn't work.
 
flags have to be single number, it's binary so flags if flags 2, 4, 5 are enabled it'll be: 0 + 2^2 + 2^4 + 2^5
I'd write flags converter, but I don't know what cpp file has full list of them and I don't trust global.lua flags
Here you go: https://raw.github.com/otland/forgottenserver/master/src/const.h.

From what I know there is no way to disable soul gain. To disable skill gain you need to add 2^28 (268435456) to your flags.
 
Back
Top