God Mythera
Veteran OT User
can someone help me make it so players have to be online to make a guild?
this is my guilds.php
http://pastebin.com/xHpMjttX
this is my guilds.php
http://pastebin.com/xHpMjttX
if($player->getLevel() >= $config['site']['guild_need_level'])
if($player->getLevel() >= $config['site']['guild_need_level'] && $player->getOnline() == false)
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?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
if(!$player->isLoaded())
$guild_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> doesn\'t exist.';
if($player->isOnline())
$guild_errors[] = 'Character <b>'.htmlspecialchars($name).'</b> can't be online when creating a guild.';
i went to line 1019 and only found thisYou 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