Page 1 of 1

Change server time ?

Posted: Thu Jun 18, 2009 8:23 pm
by Menuval
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision Number:
L2JDP Revision Number:

Hii there,

From some reason my site castle status script and 7s script shows the date is 1970 & 1987.

any clue on where i can change that ?

and another thing, i was looking through npc's and was looking for the right npc to spawn as the glittering meda trader. which one is it ?

Thanks in advance,

Re: Change server time ?

Posted: Thu Jun 18, 2009 8:32 pm
by janiii
Menuval wrote:and another thing, i was looking through npc's and was looking for the right npc to spawn as the glittering meda trader. which one is it ?
must have been included in the script where you downloaded it.

Re: Change server time ?

Posted: Fri Jun 19, 2009 5:17 am
by Menuval
can't find it anywhere. /= any idea where is the main server time settings ?

Re: Change server time ?

Posted: Mon Jun 22, 2009 3:36 pm
by Menuval
bump.

I know my linux server time is right.

how can I know what's my gameserver time ?

Re: Change server time ?

Posted: Mon Jun 22, 2009 3:40 pm
by janiii
Menuval wrote:bump.

I know my linux server time is right.

how can I know what's my gameserver time ?
what you mean by gameserver time? the time in game? /time ? time on the map? but the time, the real time is taken from jvm and that takes the time from OS region settings.

Re: Change server time ?

Posted: Mon Jun 22, 2009 4:13 pm
by Menuval
@mysql_connect ( $db_serv, $db_user, $db_pass ) or die ('Coudn\'t connect to host');
@mysql_select_db( $db_name ) or die ('Couldn\'t select database');

$sql = @mysql_query('SELECT id,name,taxPercent,siegeDate FROM `castle`') or die('Query failed!');

$gen = "\n";

while ($castle = @mysql_fetch_array($sql))
{
$gen .= "\n".strtolower($castle['name']) . 'info = \'<div class="castleWrapper">';
$gen .= '<div class="castlePic" id="' . ucfirst(strtolower($castle['name'])) . 'Pic"></div>';
$gen .= '<div class="castleInfo">';
$gen .= '<div class="castleName"><strong>' . ucfirst(strtolower($castle['name'])) . ' Castle</strong></div>';

$clan = @mysql_fetch_array(mysql_query('SELECT clan_name,hasCastle FROM `clan_data` WHERE hasCastle = ' . $castle['id']));
$clan_name = (isset($clan['clan_name'])) ? htmlspecialchars($clan['clan_name'], ENT_QUOTES) : 'UNCLAIMED';

$gen .= '<div><strong>Controlled by:</strong> ' . $clan_name . '</div>';

if (isset($clan['clan_name'])) $gen .= '<div><strong>Tax Rate:</strong> ' . $castle['taxPercent'] . '%</div>';

$gen .= '<div><strong>Next Siege:</strong> ' . date('M d Y ',$castle['siegeDate']/1000) . $castle['siegeHourOfDay'] . date(':00 T') . '</div>';
$gen .= '</div></div>\';'."\n\n";
}

$handle = @fopen($filename, 'w+');
@fwrite($handle, $gen);
@fclose($handle);

?>

this is my scrupt btw,
anyone have a link to the newer script with the castle map maybe ?

Re: Change server time ?

Posted: Mon Jun 22, 2009 4:18 pm
by Menuval
I just noticed i don't even have the siegehour in my tables.

Re: Change server time ?

Posted: Mon Jun 22, 2009 4:20 pm
by janiii
Menuval wrote:this is my scrupt btw,
anyone have a link to the newer script with the castle map maybe ?
http://l2jserver.com/forum/viewtopic.php?f=94&t=10730

Re: Change server time ?

Posted: Mon Jun 22, 2009 4:22 pm
by Menuval
Thanks man.

Re: Change server time ?

Posted: Mon Jun 22, 2009 5:59 pm
by Menuval
btw, i've seen a share (not the one you post) that shows the castle status on a map , can't find anymore,

any clue ?