Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Server time

Newbie Spellweaver
Joined
Apr 16, 2012
Messages
28
Reaction score
4
To add a server time to your client you need to open up dragon.cpp located in the client latest folder
look for:
DWORD g_packet_recv_send_checktime;
and add underneath it: DWORD g_Current_Server_Time; // finito 060707 holds the current server time

then open up effect.cpp look for :void DrawClock()

and replace it with void DrawClock() //ÁÂÇ¥´Â Àý´ë ÁÂÇ¥ÀÓ
{
static int bell_Count=0;
static bool flag=0;
static DWORD endTime;

// if( MapNumber != 0 ) return; //¸¶À» ¸Ê¿¡¼­¸¸ Ãâ·Â

// Spr* spr_Hour;
// Spr* spr_Minute; //right½Ãħ,ºÐħ ½ºÇÁ¶óÀÌÆ®

int y, mo,d, h, mi, sec; //½Ã°£:0~23, ºÐ:0~59
// int hour_Spr=0, minute_Spr=0;

// CurrentGameDate( g_Current_Server_Time, &y, &mo, &d, &h, &mi, &sec ); //Çö½Ç ½Ã°£º¸´Ù 6¹è ºü¸£Áö!

DWORD rest = g_Current_Server_Time;

d = rest / 86400; // +1
rest = rest % 86400;

h = rest / 3600; // 0
rest = rest % 3600;

mi = rest / 60; // 0
sec = rest % 60;

Hcolor( 255,255,255 );
HprintBold(300, 22, RGB(255,255,255), 0, "Current Server Time : %02d:%02d:%02d", h, mi, sec);
 
Back
Top