• 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 Offline to make guild

Why would you want this? The problem with players being online is that it rewrites their database information, here's the preprocess:

When a player logs in, it reads data from the database (skills, level, items, etc.), it puts them into the host's local memory.
When a player logs out, it reads data from the local memory, and puts it into the database, simply erasing everything that is in the database.
If you modify the guild tables in the database, they'll simply be rewritten, erased when a player logs out, reading the guild information from the local memory.

MAYBE you meant you want them to be offline, in that case here's my improbable solution:

At line 995:
Code:
if($player->getLevel() >= $config['site']['guild_need_level'])

Replace with this:
Code:
if($player->getLevel() >= $config['site']['guild_need_level'] && $player->getOnline() == false)

If that doesn't work, what AAC are you using? (Version too please)

Ignazio
 
Why would you want this? The problem with players being online is that it rewrites their database information, here's the preprocess:

When a player logs in, it reads data from the database (skills, level, items, etc.), it puts them into the host's local memory.
When a player logs out, it reads data from the local memory, and puts it into the database, simply erasing everything that is in the database.
If you modify the guild tables in the database, they'll simply be rewritten, erased when a player logs out, reading the guild information from the local memory.

MAYBE you meant you want them to be offline, in that case here's my improbable solution:

At line 995:
Code:
if($player->getLevel() >= $config['site']['guild_need_level'])

Replace with this:
Code:
if($player->getLevel() >= $config['site']['guild_need_level'] && $player->getOnline() == false)

If that doesn't work, what AAC are you using? (Version too please)

Ignazio
He is using Gesior2012 to TFS 0.4.
 
Why would you want this? The problem with players being online is that it rewrites their database information, here's the preprocess:

When a player logs in, it reads data from the database (skills, level, items, etc.), it puts them into the host's local memory.
When a player logs out, it reads data from the local memory, and puts it into the database, simply erasing everything that is in the database.
If you modify the guild tables in the database, they'll simply be rewritten, erased when a player logs out, reading the guild information from the local memory.

MAYBE you meant you want them to be offline, in that case here's my improbable solution:

At line 995:
Code:
if($player->getLevel() >= $config['site']['guild_need_level'])

Replace with this:
Code:
if($player->getLevel() >= $config['site']['guild_need_level'] && $player->getOnline() == false)

If that doesn't work, what AAC are you using? (Version too please)

Ignazio
will this work with tfs 0.4?
 
You can try this instead, at line 1019, find this:
Code:
                        if(!$player->isLoaded())
                                $guild_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> doesn\'t exist.';

... add this after:
Code:
                        if($player->isOnline())
                                $guild_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> can't be online when creating a guild.';

Let me know if it works.

Ignazio
 
You can try this instead, at line 1019, find this:
Code:
                        if(!$player->isLoaded())
                                $guild_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> doesn\'t exist.';

... add this after:
Code:
                        if($player->isOnline())
                                $guild_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> can't be online when creating a guild.';

Let me know if it works.

Ignazio
i went to line 1019 and only found this

$guild_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> isn\'t in any guild.';

the line

if($player->isOnline())

wasnt there
 
Back
Top