void CRingAttackEvent::ProcState_Closed()
{
	int iTICK_MSEC = GetTickCount() - this->m_iTIME_TICK_COUNT;

	if ( iTICK_MSEC >= 1000 )
	{
		this->m_iTIME_MSEC_REMAIN -= iTICK_MSEC;
		this->m_iTIME_TICK_COUNT = GetTickCount();

		if ( this->m_bDoEvent )
		{
			if ( this->m_iTIME_MSEC_REMAIN <= (this->m_iTIME_MIN_OPEN * 60 * 1000 ) &&
				 this->m_iTIME_MSEC_REMAIN > 0 &&
				 (this->m_iTIME_MSEC_REMAIN / 60000 ) != this->m_iTIME_NOTIFY_COUNT )
			{
				this->m_iTIME_NOTIFY_COUNT = this->m_iTIME_MSEC_REMAIN / 60000;

				if ( (this->m_iTIME_NOTIFY_COUNT+1) == 3 )
				{
					AllSendServerMsg("The White Wizard and his minions are starting to assemble!");

					PMSG_ANS_CL_EFFECT pMsg;

					PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
					pMsg.wEffectNum = 0;

					DataSendAll((LPBYTE)&pMsg, pMsg.h.size);

					LogAdd("[Ring Event] - Before 3 minutes - Advertise");
				}
			}
		}
	}

	if ( this->m_iTIME_MSEC_REMAIN <= 0 )
	{

		AllSendServerMsg("The White Wizard and his Orcs have invaded us!");

		PMSG_ANS_CL_EFFECT pMsg;

		PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
		pMsg.wEffectNum = 1;

		DataSendAll((LPBYTE)&pMsg, pMsg.h.size);

		if ( this->m_bDoEvent )
		{
			this->SetState(2);
		}
		else
		{
			this->SetState(0);
		}

		LogAdd("[Ring Event] - Event Started");
	}
}
Exemple #2
0
void cSummerEvent__InsideTrigger(void * lpParam)
{
    SummerEvent.Start = 1;

    LogAddTD("[SummerEvent] Event Start");
    AllSendServerMsg(lMsg.Get(MSGGET(14, 135)));
    SummerEvent.SetMonsters();
    Sleep(SummerEvent.Minutes * 60000);
    SummerEvent.ClearMonsters();
    LogAddTD("[SummerEvent] Event End");
    AllSendServerMsg(lMsg.Get(MSGGET(14, 136)));

    SummerEvent.Start = 0;
    _endthread();
}
Exemple #3
0
void BroadCastMessage(BroadCastMessageInfo* lpResult)
{
	if( strlen(lpResult->Text) < 2 )
	{
		return;
	}
	
	switch(lpResult->Type)
	{
	case 0:
		{
			AllSendServerMsg(&lpResult->Text[1]);
		}
		break;
	case 1:
		{
			USER_REQ_POST lpInfo = { 0 };
			PHeadSetB((LPBYTE)&lpInfo, 0, sizeof(lpInfo));
			lpInfo.h.headcode = 2;
			lpInfo.chatmsg[0] = '!';
			memcpy(lpInfo.id, lpResult->Sender, 10);
			strcat(lpInfo.chatmsg, lpResult->Text);
			DataSendAll((LPBYTE)&lpInfo, sizeof(lpInfo));
		}
		break;
	}
	
}
void CCastleDeepEvent::ProcState_Playing() 
{
	int iTICK_MSEC = ( GetTickCount() - this->m_iTIME_TICK_COUNT );

	if( iTICK_MSEC >= 1000 )
	{
		this->m_iTIME_MSEC_REMAIN += iTICK_MSEC;
		this->m_iTIME_TICK_COUNT = GetTickCount();

		for( std::map<int, int>::iterator it = this->m_mapRunCheck.begin(); it != this->m_mapRunCheck.end(); it++)
		{
			int iMapTime = it->second;

			//DebugLog("%s Info: iMapTime:%d, m_mapRunCheck:%d, m_iTIME_MSEC_REMAIN:%d, m_iCUR_ASSULT_TYPE:%d",
			//	__FUNCTION__,iMapTime,this->m_mapRunCheck.size(),this->m_iTIME_MSEC_REMAIN,this->m_iCUR_ASSULT_TYPE
			//);

			if( iMapTime == (this->m_iTIME_MSEC_REMAIN / 60000) )
			{
				this->AddMonster(this->m_iCUR_ASSULT_TYPE,it->first);
				this->m_mapRunCheck.erase(it);
				break;
			}
		}
		
		//LogAddC(3, "[CastleDeep Event] ProcState_Playing()\tLEFT-MSEC:%d", this->m_iTIME_MSEC_REMAIN);

		if( this->m_mapRunCheck.size() <= 0 )
		{
			if( this->m_bCheckEnd == FALSE )
			{
				this->m_bCheckEnd = TRUE;
				this->m_uCheckEndTick = GetTickCount();
				LogAddTD("[CastleDeep Event] - Preparing to END Event");
			}
			else
			{
				if( GetTickCount() > (this->m_uCheckEndTick + 600000) )
				{
					char szMsg[256];
					//wsprintf(szMsg, "3.");
					wsprintf(szMsg, "[CastleDeep] The event finished.");
					AllSendServerMsg(szMsg);

					if( this->m_bDoEvent )
					{
						this->SetState(CASTLE_STATE_CLOSED);
					} 
					else 
					{
						this->SetState(CASTLE_STATE_NONE);
					}
					LogAddTD("[CastleDeep Event] - Event Ended");
					this->ClearMonster();
				}
			}
		}
	}
}
void CEledoradoEvent::RegenTitan()
{
	#if (MP==1)
	#pragma omp parallel for
	#endif
	for (int n=0;n<OBJ_MAXMONSTER;n++)
	{
		if ( gObj[n].Class == 53 )	// Golden Titan
		{
			gObj[n].Live = TRUE;
			int rnd = Random(0,GTitanMap.size()-1);
			int MapNumber = GTitanMap[rnd];
			gObj[n].MapNumber = MapNumber;

			while ( gMSetBase.GetBoxPosition(MapNumber, GTitanXmin[rnd], GTitanYmin[rnd], GTitanXmax[rnd], GTitanYmax[rnd], gObj[n].X, gObj[n].Y) == 0 )
			{

			}

			this->m_BossTitanMapNumber = gObj[n].MapNumber;
			this->m_BossTitanMapX = gObj[n].X;
			this->m_BossTitanMapY = gObj[n].Y;

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;

			LogAdd("Make GoldTaitan : %d, %d,%d",
				MapNumber, gObj[n].X, gObj[n].Y);

			AllSendServerMsg((char*)GTitanTown[rnd].c_str());
		}
		else if ( gObj[n].Class == 54 ) // Golden Soldier
		{
			gObj[n].Live = TRUE;
			int MapNumber = this->m_BossTitanMapNumber;
			gObj[n].MapNumber = MapNumber;

			gMSetBase.GetBoxPosition(MapNumber, this->m_BossTitanMapX-4, this->m_BossTitanMapY-4,
				this->m_BossTitanMapX+4, this->m_BossTitanMapY+4, gObj[n].X, gObj[n].Y);

						gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;
		}
	}
}
BOOL CRingMonsterHerd::MonsterHerdItemDrop(LPOBJ lpObj)
{
	switch(lpObj->Class)
	{
		case 135:
			{
				int iIndex = gObjMonsterTopHitDamageUser(lpObj);
				int itemnumber = ItemGetNumberMake(Configs.WW_Group, Configs.WW_ID);

				ItemSerialCreateSend(lpObj->m_Index, lpObj->MapNumber, lpObj->X, lpObj->Y, itemnumber, 
					Configs.WW_Level, Configs.WW_Dur, Configs.WW_Luck, Configs.WW_Skill, Configs.WW_Opt, iIndex, Configs.WW_Exc, Configs.WW_Anc);

				char szTemp[256];
				wsprintf(szTemp, lMsg.Get(MSGGET(4, 181)), gObj[iIndex].Name, Configs.MapName[lpObj->MapNumber]);

				AllSendServerMsg( szTemp );

				LogAddTD("[Ring Event] White Wizard Killed by [%s][%s], MapNumber:%d", gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iIndex].MapNumber);
				return TRUE;
			}
			break;
		case 136:
		case 137:
			{
				if ( (rand()%100) < 30 )
				{
					int iIndex = gObjMonsterTopHitDamageUser(lpObj);
					int itemnumber = ItemGetNumberMake(13, 20);
					ItemSerialCreateSend(lpObj->m_Index, lpObj->MapNumber, lpObj->X, lpObj->Y, itemnumber, 0, 30, 0, 0, 0, iIndex, 0, 0);
					return TRUE;
				}

				if ( (rand() % Configs.RingOrcKillGiftRate) == 0 )
				{
					int iIndex = gObjMonsterTopHitDamageUser(lpObj);
					this->SendEventGiftWinner(iIndex, 1);
					return TRUE;
				}

				MapC[lpObj->MapNumber].MoneyItemDrop(10000, (BYTE)lpObj->X, (BYTE)lpObj->Y);
				return TRUE;
			}
			break;
		default:
			return FALSE;
			break;
	}



}
void CEledoradoEvent::RegenGoldDercon()
{
	int MapNumber=-1;
	int Map[3]={0,3,2};
	int count = 0;

	this->CheckGoldDercon(MapNumber);	// clearing golden invision map

	#if (MP==1)
	#pragma omp parallel for private(MapNumber) reduction(+: count)
	#endif
	for (int n=0;n<OBJ_MAXMONSTER;n++)
	{
		if ( gObj[n].Class == 79 )	// Gold Dercon
		{
			gObj[n].Live = TRUE;
			int rnd = Random(0,GDragonMap.size()-1);
			MapNumber = GDragonMap[rnd];

			gObj[n].MapNumber = MapNumber;

			while ( gMSetBase.GetBoxPosition(MapNumber, GDragonXmin[rnd], GDragonYmin[rnd], GDragonXmax[rnd], GDragonYmax[rnd], gObj[n].X, gObj[n].Y) == 0 )
			{

			}

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;

			LogAdd("Make GoldDercon : %d, %d,%d", MapNumber, gObj[n].X, gObj[n].Y);

			AllSendServerMsg((char*)GDragonTown[rnd].c_str());


			this->m_BossGoldDerconMapNumber[count] = MapNumber;
			gObj[n].m_BossGoldDerconMapNumber = MapNumber;	
			count++;

		}
	}

	this->CheckGoldDercon(MapNumber);
}
Exemple #8
0
void AllNoticeRecv( SDHP_NOTICE * lpMsg)
{
	char szNotice[101];

	szNotice[100]=0;

	memcpy(szNotice, lpMsg->Notice , sizeof(lpMsg->Notice)-1);

	LogAddTD("[Mu Manager][Notice Log][Type:ALL] %s", szNotice);

	if ( strlen(szNotice) > 1 )
	{
		AllSendServerMsg(szNotice);
	}
}
Exemple #9
0
void LoveHeartEventRecv( SDHP_LOVEHEARTEVENT_RESULT * lpMsg )
{
    char szName[11];
    int number;
    char Msg[256];

    szName[10]=0;

    memcpy(szName, lpMsg->Name, sizeof(lpMsg->Name));
    number = lpMsg->Number;

    switch ( lpMsg->Result )
    {
    case 0: // Registered Hearts of Love PangPangEvent
    {
        wsprintf(Msg, "You have registered No.%d heart item(s)", number );

        for (int n = OBJ_STARTUSERINDEX; n<OBJMAX; n++)
        {
            if ( gObj[n].Connected >= PLAYER_LOGGED )
            {
                if (gObj[n].Name[0] == szName[0] )
                {
                    if ( gObj[n].Name[1] == szName[1] )
                    {
                        if ( strcmp( gObj[n].Name, szName ) == 0 )
                        {
                            GCServerMsgStringSend(Msg, n, 1);
                            strcpy(Msg,"Sorry, better luck next time.");
                            GCServerMsgStringSend(Msg, n, 1);
                            return;
                        }
                    }
                }
            }
            continue;
        } // For
    }
    break;

    case 1: // Winner of the Love Pang Pang Event
        wsprintf(Msg, "%s is the lucky winner of the Love Pang Pang event.", szName);
        AllSendServerMsg(Msg);
        break;
    }
}
Exemple #10
0
void LoveHeartEventRecv( SDHP_LOVEHEARTEVENT_RESULT * lpMsg )
{
	char szName[11];
	int number;
	char Msg[256];

	szName[10]=0;

	memcpy(szName, lpMsg->Name, sizeof(lpMsg->Name));
	number = lpMsg->Number;

	switch ( lpMsg->Result )
	{
		case 0: // Registered Hearts of Love PangPangEvent
			{
				wsprintf(Msg, lMsg.Get( MSGGET(4, 80)), number );

				for (int n = OBJ_STARTUSERINDEX;n<OBJMAX;n++)
				{
					if ( gObj[n].Connected >= PLAYER_LOGGED )
					{
						if (gObj[n].Name[0] == szName[0] )
						{
							if ( gObj[n].Name[1] == szName[1] )
							{
								if ( strcmp( gObj[n].Name, szName ) == 0 )
								{
									GCServerMsgStringSend(Msg, n, 1);
									wsprintf(Msg, lMsg.Get( MSGGET( 4, 81 ) ) );
									GCServerMsgStringSend(Msg, n, 1);
									return;
								}
							}
						}
					}
					continue;
				} // For
			}
		break;

		case 1: // Winner of the Love Pang Pang Event
			wsprintf(Msg, lMsg.Get( MSGGET ( 4, 82 ) ), szName, number);
			AllSendServerMsg(Msg);
			break;
	}
}
void CRingAttackEvent::Start_Menual()
{
	this->SetMenualStart(TRUE);
	this->StopEvent();

	LogAdd("[Event Management] [Start] RingAttack Event!");
	this->m_iTIME_MIN_PLAY = 30;

	AllSendServerMsg("The White Wizard and his Orcs have invaded us!");

	PMSG_ANS_CL_EFFECT pMsg;

	PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
	pMsg.wEffectNum = 1;

	DataSendAll((LPBYTE)&pMsg, pMsg.h.size);
	this->SetState(2);
}
BOOL CRingMonsterHerd::MonsterHerdItemDrop(LPOBJ lpObj)
{

    if ( lpObj->Class == 135 )
    {
        int iIndex = gObjMonsterTopHitDamageUser(lpObj);
        int itemnumber = ItemGetNumberMake(14, 13);
        ItemSerialCreateSend(lpObj->m_Index, lpObj->MapNumber, lpObj->X, lpObj->Y,
                             itemnumber, 0, 0, 0, 0, 0, iIndex, 0, 0);
        char szTemp[256];
        wsprintf(szTemp, lMsg.Get(MSGGET(4, 181)), gObj[iIndex].Name, gMapName[lpObj->MapNumber]);	// #error Apply Deathway fix here
        AllSendServerMsg( szTemp );
        LogAddTD("[Ring Event] White Wizard Killed by [%s][%s], MapNumber:%d",
                 gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iIndex].MapNumber);

        return TRUE;

    }

    if ( lpObj->Class == 136 || lpObj->Class == 137)
    {
        if ( (rand()%100) < 30 )
        {
            int iIndex = gObjMonsterTopHitDamageUser(lpObj);
            int itemnumber = ItemGetNumberMake(13, 20);	// Wizards Ring
            ItemSerialCreateSend(lpObj->m_Index, lpObj->MapNumber, lpObj->X, lpObj->Y,
                                 itemnumber, 0, 30, 0, 0, 0, iIndex, 0, 0);
            return TRUE;
        }

        if ( (rand() % g_iRingOrcKillGiftRate) == 0 )
        {
            int iIndex = gObjMonsterTopHitDamageUser(lpObj);
            this->SendEventGiftWinner(iIndex, 1);
            return TRUE;
        }

        MapC[lpObj->MapNumber].MoneyItemDrop(10000, (BYTE)lpObj->X, (BYTE)lpObj->Y);
        return TRUE;
    }

    return FALSE;

}
BOOL CRingMonsterHerd::MonsterHerdItemDrop(LPOBJ lpObj)
{
	
	if ( lpObj->Class == 135 )
	{
		int iIndex = gObjMonsterTopHitDamageUser(lpObj);
		int itemnumber = ItemGetNumberMake(14, 13);
		ItemSerialCreateSend(lpObj->m_Index, lpObj->MapNumber, (BYTE)lpObj->X, (BYTE)lpObj->Y,
			itemnumber, 0, 0, 0, 0, 0, iIndex, 0, 0);
		char szTemp[128];
		wsprintf(szTemp, "%s has defeated the White Wizard Corps", gObj[iIndex].Name);	
		AllSendServerMsg( szTemp ); 
		LogAdd("[Ring Event] White Wizard Killed by [%s][%s], MapNumber:%d",
			gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iIndex].MapNumber);

		return TRUE;

	}
	
	if ( lpObj->Class == 136 || lpObj->Class == 137)
	{
		if ( Random(0,99) < 30 )
		{
			int iIndex = gObjMonsterTopHitDamageUser(lpObj);
			int itemnumber = ItemGetNumberMake(13, 20);	// Wizards Ring
			ItemSerialCreateSend(lpObj->m_Index, lpObj->MapNumber, (BYTE)lpObj->X, (BYTE)lpObj->Y,
				itemnumber, 0, 30, 0, 0, 0, iIndex, 0, 0);
			return TRUE;
		}
		
		if ( !Random(0,g_iRingOrcKillGiftRate-1)  )
		{
			int iIndex = gObjMonsterTopHitDamageUser(lpObj);
			this->SendEventGiftWinner(iIndex, 1);
			return TRUE;
		}

		MapC[lpObj->MapNumber].MoneyItemDrop(10000, (BYTE)lpObj->X, (BYTE)lpObj->Y);
		return TRUE;
	}

	return FALSE;

}
void CDragonEvent::Start()
{
    char szTemp[256];
    char map[3];

    if ( this->EventState != 0 )
    {
        return;
    }

    this->Init();

    map[0]=MAP_INDEX_RORENCIA;
    map[1]=MAP_INDEX_DEVIAS;
    map[2]=MAP_INDEX_NORIA;

    this->EventState = 1;
    this->m_MapNumber  = map [ rand()%3 ];

    strcpy(szTemp, "¡Ù ");

    switch ( this->m_MapNumber  )
    {
    case MAP_INDEX_RORENCIA:
        strcat(szTemp, lMsg.Get(MSGGET(7, 208)) );
        break;

    case MAP_INDEX_DEVIAS:
        strcat(szTemp, lMsg.Get(MSGGET(7, 210)) );
        break;

    case MAP_INDEX_NORIA:
        strcat(szTemp, lMsg.Get(MSGGET(7, 211)) );
        break;

    }

    strcat(szTemp, lMsg.Get(MSGGET(4, 132)) );
    strcat(szTemp, " ¡Ù");

    AllSendServerMsg(lMsg.Get(MSGGET(4, 132)));
    this->EventStartTime  = GetTickCount();
}
void XMasEvent::MonsterDie(int iIndex)
{
	LPOBJ lpObj = &gObj[iIndex];
	if(this->STATE == 1)
	{
	for ( int iCount=0;iCount<this->m_XMasMonster.GetCount();iCount++)
	{
		if ( this->m_XMasMonster.m_iObjIndex[iCount] == iIndex )
		{
			this->m_iAliveMonsterCount--;
				if(this->m_iAliveMonsterCount <= 0){
					LogAddTD("[XMAS Event] All Monster dead");
					AllSendServerMsg("[XMAS Event] All monster dead, go Santa Town!!!");
					this->XMasEventEnd(); }
			return;
		}
	}


	}
}
void CRingAttackEvent::Start_Menual()
{
    this->SetMenualStart(TRUE);
    this->StopEvent();

    LogAddTD("¡Û¡Ü[Event Management] [Start] RingAttack Event!");
    this->m_iTIME_MIN_PLAY = 30;

    char szTemp[256];

    wsprintf(szTemp, lMsg.Get(MSGGET(4, 184)));
    AllSendServerMsg(szTemp);

    PMSG_ANS_CL_EFFECT pMsg;

    PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
    pMsg.wEffectNum = 1;

    DataSendAll((LPBYTE)&pMsg, pMsg.h.size);
    this->SetState(2);
}
void CEledoradoEvent::RegenGoldGoblen()
{
	#if (MP==1)
	#pragma omp parallel for
	#endif
	for (int n=0;n<OBJ_MAXMONSTER;n++)
	{
		if ( gObj[n].Class == 78 )
		{
			gObj[n].Live = TRUE;
			int rnd = Random(0,GGoblinMap.size()-1);
			int MapNumber = GGoblinMap[rnd];
			gObj[n].MapNumber = MapNumber;

			while ( gMSetBase.GetBoxPosition(MapNumber, GGoblinXmin[rnd], GGoblinYmin[rnd], GGoblinXmax[rnd], GGoblinYmax[rnd], gObj[n].X, gObj[n].Y) == 0 )
			{

			}

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;

			LogAdd("Make GoldGoblen : %d, %d,%d",
				MapNumber, gObj[n].X, gObj[n].Y);

			AllSendServerMsg((char*)GGoblinTown[rnd].c_str());
		}
	}
}
void CEledoradoEvent::RegenKantur()
{

	//	int Map[2]={0,3};
	#if (MP==1)
	#pragma omp parallel for
	#endif
	for (int n=0;n<OBJ_MAXMONSTER;n++)
	{
		if ( gObj[n].Class == 82 )	// Gold Tantalos
		{
			gObj[n].Live = TRUE;
			int rnd = Random(0,GTantalosMap.size()-1);
			int MapNumber = GTantalosMap[rnd];
			gObj[n].MapNumber = MapNumber;

			while ( gMSetBase.GetBoxPosition(MapNumber, GTantalosXmin[rnd], GTantalosYmin[rnd], GTantalosXmax[rnd], GTantalosYmax[rnd], gObj[n].X, gObj[n].Y) == 0 )
			{

			}

			this->m_BossKanturMapNumber = gObj[n].MapNumber;
			this->m_BossKanturMapX = gObj[n].X;
			this->m_BossKanturMapY = gObj[n].Y;

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_PoisonBeattackCount = 0;
			gObj[n].m_ColdBeattackCount = 0;
			gObj[n].m_ViewState = 0;
			gObj[n].Teleport = 0;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;

			LogAdd("Make GoldTantarus : %d, %d,%d",
				MapNumber, gObj[n].X, gObj[n].Y);

			AllSendServerMsg((char*)GTantalosTown[rnd].c_str());
		}
		else if ( gObj[n].Class == 83 ) // Gold Iron Wheel
		{
			gObj[n].Live = TRUE;
			int MapNumber = this->m_BossKanturMapNumber;
			gObj[n].MapNumber = MapNumber;

			gMSetBase.GetBoxPosition(MapNumber, this->m_BossKanturMapX-10, this->m_BossKanturMapY-10,
				this->m_BossKanturMapX+10, this->m_BossKanturMapY+10, gObj[n].X, gObj[n].Y);

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;
		}
	}
}
void CEledoradoEvent::RegenDevilLizardKing()
{

//	int Map[2]={0,3};
	#if (MP==1)
	#pragma omp parallel for
	#endif
	for (int n=0;n<OBJ_MAXMONSTER;n++)
	{
		if ( gObj[n].Class == 80 )	// Devil Lizard King
		{
			gObj[n].Live = TRUE;
			int rnd = Random(0,GLizardMap.size()-1);
			int MapNumber = GLizardMap[rnd];
			gObj[n].MapNumber = MapNumber;

			while ( gMSetBase.GetBoxPosition(MapNumber, GLizardXmin[rnd], GLizardYmin[rnd], GLizardXmax[rnd], GLizardYmax[rnd], gObj[n].X, gObj[n].Y) == 0 )
			{

			}

			this->m_BossDevilLizardKingMapNumber = gObj[n].MapNumber;
			this->m_BossDevilLizardKingMapX = gObj[n].X;
			this->m_BossDevilLizardKingMapY = gObj[n].Y;

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;

			LogAdd("Make GoldLizarKing : %d, %d,%d",
				MapNumber, gObj[n].X, gObj[n].Y);

			AllSendServerMsg((char*)GLizardTown[rnd].c_str());
		}
		else if ( gObj[n].Class == 81 ) // Golden Velparie
		{
			gObj[n].Live = TRUE;
			int MapNumber = this->m_BossDevilLizardKingMapNumber;
			gObj[n].MapNumber = MapNumber;

			gMSetBase.GetBoxPosition(MapNumber, this->m_BossDevilLizardKingMapX-4, this->m_BossDevilLizardKingMapY-4,
				this->m_BossDevilLizardKingMapX+4, this->m_BossDevilLizardKingMapY+4, gObj[n].X, gObj[n].Y);

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = (BYTE)gObj[n].X;
			gObj[n].StartY = (BYTE)gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;
		}
	}
}
Exemple #20
0
void cNewsSystem::Load()
{

	int news_intMinute = GetPrivateProfileInt("News", "NewsEveMinute", 30, gDirPath.GetNewPath("Custom\\NewsSys.ini"));

	SYSTEMTIME t;
	GetLocalTime(&t);
	if (t.wMinute == news_intMinute && t.wSecond == 00)
	{

		int randNumber = rand() % 5 + 1;

		if (randNumber == 1) {
			char news1Texta[255];
			char news1Textb[255];
			char news1Textc[255];
			GetPrivateProfileString("News", "News1Texta", "zGameServer", news1Texta, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News1Textb", "zGameServer", news1Textb, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News1Textc", "zGameServer", news1Textc, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			AllSendServerMsg(news1Texta);
			AllSendServerMsg(news1Textb);
			AllSendServerMsg(news1Textc);
			LogAddTD("[NewsSystem] %s ", news1Texta);
			LogAddTD("[NewsSystem] %s ", news1Textb);
			LogAddTD("[NewsSystem] %s ", news1Textc);
		}

		else if (randNumber == 2) {
			char news2Texta[255];
			char news2Textb[255];
			char news2Textc[255];
			GetPrivateProfileString("News", "News2Texta", "zGameServer", news2Texta, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News2Textb", "zGameServer", news2Textb, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News2Textc", "zGameServer", news2Textc, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			AllSendServerMsg(news2Texta);
			AllSendServerMsg(news2Textb);
			AllSendServerMsg(news2Textc);
			LogAddTD("[NewsSystem] %s ", news2Texta);
			LogAddTD("[NewsSystem] %s ", news2Textb);
			LogAddTD("[NewsSystem] %s ", news2Textc);
		}

		else if (randNumber == 3) {
			char news3Texta[255];
			char news3Textb[255];
			char news3Textc[255];
			GetPrivateProfileString("News", "News3Texta", "zGameServer", news3Texta, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News3Textb", "zGameServer", news3Textb, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News3Textc", "zGameServer", news3Textc, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			AllSendServerMsg(news3Texta);
			AllSendServerMsg(news3Textb);
			AllSendServerMsg(news3Textc);
			LogAddTD("[NewsSystem] %s ", news3Texta);
			LogAddTD("[NewsSystem] %s ", news3Textb);
			LogAddTD("[NewsSystem] %s ", news3Textc);
		}

		else if (randNumber == 4) {
			char news4Texta[255];
			char news4Textb[255];
			char news4Textc[255];
			GetPrivateProfileString("News", "News4Texta", "zGameServer", news4Texta, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News4Textb", "zGameServer", news4Textb, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News4Textc", "zGameServer", news4Textc, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			AllSendServerMsg(news4Texta);
			AllSendServerMsg(news4Textb);
			AllSendServerMsg(news4Textc);
			LogAddTD("[NewsSystem] %s ", news4Texta);
			LogAddTD("[NewsSystem] %s ", news4Textb);
			LogAddTD("[NewsSystem] %s ", news4Textc);
		}

		else if (randNumber == 5) {
			char news5Texta[255];
			char news5Textb[255];
			char news5Textc[255];
			GetPrivateProfileString("News", "News5Texta", "zGameServer", news5Texta, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News5Textb", "zGameServer", news5Textb, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			GetPrivateProfileString("News", "News5Textc", "zGameServer", news5Textc, 255, gDirPath.GetNewPath("Custom\\NewsSys.ini"));
			AllSendServerMsg(news5Texta);
			AllSendServerMsg(news5Textb);
			AllSendServerMsg(news5Textc);
			LogAddTD("[NewsSystem] %s ", news5Texta);
			LogAddTD("[NewsSystem] %s ", news5Textb);
			LogAddTD("[NewsSystem] %s ", news5Textc);
		}

	}
}
Exemple #21
0
VOID WINAPI	TimerProcQueue(LPVOID lpParametar, BOOL TimerOrWaitFired)
{
	if( g_MuTimer.GetTimerEnd() == TRUE )
		return;

	g_MuTimer.m_QueueTimer1.SyncLock();

	int nEventID = *(int*)(lpParametar);
	
	switch(nEventID)
	{
	case WM_GUILD_LIST_REQUEST:	DGGuildListRequest();	break;
	case WM_MONSTER_AND_MSG_PROC:
		MonsterAndMsgProc();
		//gDuelSystem.Run();
#if (ENABLETEST_NEWPVP == 1)
		g_NewPVP.Run();
#endif
		break;
	case WM_DUEL_RUN_PROC:
		//g_DuelManager.Run();
		break;
	case WM_MOVE_MONSTER_PROC:
		MoveMonsterProc();
		g_Kanturu.UserMonsterCountCheck();
		break;
	case WM_EVENT_RUN_PROC:
#if (ENABLE_CUSTOM_MONSTERSPAWNER == 1)
		MonsterSpawnerMng::getInstance()->procRun();
#endif
		g_BloodCastle.Run();
		g_RingAttackEvent.Run();
		g_ChaosCastle.Run();
		g_IllusionTemple.Run();
#if (GS_CASTLE==1)
		g_CastleSiege.Run();
		g_CastleDeepEvent.Run();
		g_CsNPC_Weapon.WeaponAttackProc();
		g_Crywolf.Run();
#endif
#if (GS_CASTLE == 0 || GS_SPEC == 1)
		g_Kanturu.Run();
		g_CsNPC_Weapon.WeaponAttackProc();
#endif
		g_Raklion.Run();
		g_XMasAttackEvent.Run();
		g_BlueEvent.Run();
		g_ImperialGuardian.Run();
		gDoubleGoer.Run();

#if (ENABLETEST_ACHERON == 1)
		g_AcheronGuardianEvent.Run();
#endif

#ifdef VMPROTECT
		if( VMProtectIsDebuggerPresent(true) )
		{
			ExitProcess(0);
		}
#endif
		break;
	case WM_AI_MONSTER_MOVE_PROC: TMonsterAI::MonsterMoveProc();	break;
	case WM_AI_MONSTER_PROC: TMonsterAI::MonsterAIProc();	break;
	case WM_SECOND_MSG_PROCESS:
		{
			for(int n = 0; n < MAX_NUMBER_MAP; n++ )
			{
				MapC[n].WeatherVariationProcess();
			}

			wsGServer.m_SendSec = wsGServer.m_SendSecTmp;
			wsGServer.m_RecvSec = wsGServer.m_RecvSecTmp;
			wsGServer.m_SendSecTmp = 0;
			wsGServer.m_RecvSecTmp = 0;
			DragonEvent->Run();
			AttackEvent->Run();
			gEledoradoEvent.Run();
			g_EventManager.Run();
#if (CUSTOM_OLYMP==1)
			g_CustomOlymp.Run();
#endif
		}
		break;
	case WM_CONNECTMEMBER_RELOAD:
		{
			ConMember.Load(gDirPath.GetNewPath(FILE_WHITELIST));
		}
		break;
	case WM_GS_CLOSE:
		if ( gCloseMsg != 0 )
		{
			gCloseMsgTime--;

			if ( gCloseMsgTime <= 1 )
			{
				if ( gCloseMsgTime == 1 )
				{
					AllSendServerMsg(lMsg.Get(MSGGET(1, 193)));
					LogAddC(2, lMsg.Get(MSGGET(1, 193)));
				}
			}
			else
			{
				if ( (gCloseMsgTime % 10) == 0 )
				{
					char szTemp[256];

					wsprintf( szTemp, lMsg.Get(MSGGET(1, 194)), gCloseMsgTime);
					AllSendServerMsg(szTemp);
					LogAddC(2, szTemp);
				}
			}

			if ( gCloseMsgTime < 0 )
			{
				KillTimer(ghWnd, WM_GS_CLOSE);
				gObjAllLogOut();
				gCloseMsgTime = 0;
				gCloseMsg = 0;
			}
		}
		gObjSecondProc();
#if (GS_CASTLE == 1)
		if(cDBSMng.GetActiveDS() > -1)
		{
			if(g_CastleSiege.GetDataLoadState() == 2)
			{
				g_CastleSiege.DataRequest();
			}

#if (CUSTOM_OLYMP==1)
			if(g_CustomOlymp.GetDataLoadState() == 2 )
			{
				g_CustomOlymp.DataRequest();
			}
			
#endif
		}
					
		g_CastleSiege.SendCastleStateSync();
		g_CastleSiegeSync.AdjustTributeMoney();
		g_Crywolf.CrywolfSecondAct();
#endif
#if (GS_CASTLE == 0 || GS_SPEC == 1)
		//g_CastleSiegeSync.AdjustTributeMoney();
#if(__GENS_SYSTEM__ == 1)
		gGensSystem.UpdateRun();
#endif
#endif
		//g_PeriodItemEx.CheckPeriodData(); --  need to decompile
		//g_CashShopInGame.CheckMileageUpdate(); -- need to decompile
		//g_CashShopInGame.CheckShopServerReconnect(); -- need to decompile
		//g_HacktoolBlockEx.CheckHacktoolUse(); -- need to decompile

		/*if ( DBSockMng::GetActiveDS(&cDBSMng) > -1 && !CArcaBattle::IsDataLoadWinGuild(&g_ArcaBattle) )
          CArcaBattle::GDReqWinGuildInfo(&g_ArcaBattle);
        if ( DBSockMng::GetActiveDS(&cDBSMng) > -1 && !CArcaBattle::IsDataLoadProcState(&g_ArcaBattle) )
          CArcaBattle::GDReqProcState(&g_ArcaBattle);
        if ( DBSockMng::GetActiveDS(&cDBSMng) > -1
          && !CArcaBattle::IsInitABProcMultiCast(&g_ArcaBattle)
          && CArcaBattle::IsArcaBattleServer(&g_ArcaBattle) == 1 )
          CArcaBattle::SetArcaBattleProcMultiCast(&g_ArcaBattle, 1);
        if ( DBSockMng::GetActiveDS(&cDBSMng) > -1
          && !CAcheronGuardianEvent::IsInitAEProcMultiCast(&g_AcheronGuardianEvent)
          && CArcaBattle::IsArcaBattleServer(&g_ArcaBattle) == 1 )
          CAcheronGuardianEvent::SetAcheronEventProcMultiCast(&g_AcheronGuardianEvent, 1);*/
		break;
	case WM_SET_DATE:
		gSetDate();
		WhisperCash.TimeCheckCashDelete();
		break;
	case WM_LOG_DATE_CHANGE:

		cpTimerTempUserManager->ClearOverTimeUserData(g_MaintainUserConnectionSecond);
		/*
		if( g_GensAbusingResetTime > 0 )
		{
			for(int n = OBJ_STARTUSERINDEX; n < OBJMAX; n++)
			{
				if( gObjIsConnected(n) )
					g_GensSystem.AbusingInfoReset(&gObj[n]);
			}
		}
		*/

#if (GS_CASTLE == 1)
		if(LogDateChange() == TRUE)
			g_iCastleItemMixLimit = 1;
#else
		LogDateChange()
#endif
		break;

	default:
		break;
	}

	g_MuTimer.m_QueueTimer1.SyncUnlock();
}
void XMasEvent::XMasEventInvade()
{
	int iMapNumber = 0;
	WORD wType = 0;
	LPOBJ lpObj;
	int iResult;
	int iRegenCount = 0;

	for (int iCount=0;iCount<this->m_iMaxMonsterCount;iCount++)
	{
		if ( this->m_SetBaseInfo[iCount].wType != 0)
		{
			iResult = gObjAddMonster(this->m_SetBaseInfo[iCount].btMapNumber);

			if ( iResult < 0 )
				{
					LogAddTD("[ SANTA EVENT ][ Set Invasion Monster ] Fail - Type:%d Map[%d]-[%d][%d]",
						this->m_SetBaseInfo[iCount].wType,
						this->m_SetBaseInfo[iCount].btMapNumber,
						this->m_SetBaseInfo[iCount].btX,
						this->m_SetBaseInfo[iCount].btY);
				}
			else
				{
					lpObj = &gObj[iResult];

					lpObj->m_PosNum = -1;
					lpObj->X = this->m_SetBaseInfo[iCount].btX;
					lpObj->Y = this->m_SetBaseInfo[iCount].btY;
					lpObj->MapNumber = this->m_SetBaseInfo[iCount].btMapNumber;

/*				if ( this->GetPosition(iCount, lpObj->MapNumber, lpObj->X, lpObj->Y) == FALSE )
				{
					gObjDel(iResult);
					continue;
				}*/

					lpObj->TX = lpObj->X;
					lpObj->TY = lpObj->Y;
					lpObj->m_OldX = lpObj->X;
					lpObj->m_OldY = lpObj->Y;
					lpObj->StartX = lpObj->X;
					lpObj->StartY = lpObj->Y;
					lpObj->m_MoveRange = this->m_SetBaseInfo[iCount].btDistance;
					lpObj->DieRegen = FALSE;

				if ( this->m_SetBaseInfo[iCount].btDir == 0xFF )
				{
						lpObj->Dir = rand()%8;
				}
				else
				{
						lpObj->Dir = this->m_SetBaseInfo[iCount].btDir;
				}

				if ( gObjSetMonster(iResult, this->m_SetBaseInfo[iCount].wType) == FALSE )
				{
						gObjDel(iResult);
						continue;
				}

				if ( gObj[iResult].Type == OBJ_MONSTER )
				{
					this->m_XMasMonster.AddObj(iResult);
					this->m_iAliveMonsterCount++;

					LogAddTD("[ SANTA EVENT ][ SetInvadeMonster ][ACTIVE]");
				}

				iRegenCount++;
			}
		}
	}
	LogAddTD("[XMAS EVENT] START !!!");
	AllSendServerMsg("[XMAS EVENT] Start in Devias HAPPY HUNTING");
	return;
}
void CEledoradoEvent::RegenGoldDercon()
{
	int n=0;
	int MapNumber=-1;
	int Map[3]={0,3,2};
	int SelMap = -1;
	int count = 0;

	this->CheckGoldDercon(MapNumber);	// #error??? MapNumber hasn't been setted

	for (n=0;n<OBJ_MAXMONSTER;n++)
	{
		if ( gObj[n].Class == 79 )	// Gold Dercon
		{
			gObj[n].Live = TRUE;

			if ( SelMap == -1 )	
			{
				MapNumber = Map[rand()%3];
			}
			else
			{
				MapNumber = SelMap;
			}

			gObj[n].MapNumber = MapNumber;

			while ( gMSetBase.GetBoxPosition(MapNumber, 80, 80, 170, 170, gObj[n].X, gObj[n].Y) == 0 )
			{

			}

			gObj[n].Life = gObj[n].MaxLife;
			gObj[n].TX = gObj[n].X;
			gObj[n].TY = gObj[n].Y;
			gObj[n].MTX = gObj[n].X;
			gObj[n].MTY = gObj[n].Y;
			gObj[n].StartX = gObj[n].X;
			gObj[n].StartY = gObj[n].Y;
			gObj[n].m_State = 1;
			gObj[n].PathCount = 0;

			LogAddTD("Make GoldDercon : %d, %d,%d",
				MapNumber, gObj[n].X, gObj[n].Y);

			if ( SelMap == -1 )
			{
				char szTemp[256];
				strcpy(szTemp, " ");

				switch ( MapNumber )
				{
					case 0:
						strcat(szTemp, lMsg.Get(MSGGET(7, 208)));
						AllSendServerMsg("Golden Dragon Invasion Lorencia !!!");
						break;
					case 2:
						strcat(szTemp, lMsg.Get(MSGGET(7, 210)));
						AllSendServerMsg("Golden Dragon Invasion Devias !!!");
						break;
					case 3:
						strcat(szTemp, lMsg.Get(MSGGET(7, 211)));
						AllSendServerMsg("Golden Dragon Invasion Noria!!!");
						break;
				}

				strcat(szTemp, lMsg.Get(MSGGET(4, 134)));
				AllSendServerMsg("Golden Dragon Invasion !!!");
			}

			this->m_BossGoldDerconMapNumber[count] = MapNumber;
			gObj[n].m_BossGoldDerconMapNumber = MapNumber;	// #error change count by MapNumber
			count++;
			SelMap = MapNumber;
		}
	}

	this->CheckGoldDercon(MapNumber);
}
Exemple #24
0
int CGMMng::ManagementProc(LPOBJ lpObj, char* szCmd, int aIndex)
{
	char * szCmdToken;
	char string[256];
	char szId[20];
	char * pId = szId;
	int len = strlen(szCmd);
	int command_number;

	if ( len < 1 || len > 250 )
	{
		return 0;
	}

	memset(szId, 0, sizeof(szId));
	strcpy(string, szCmd);
	szCmdToken = strtok(string, " ");
	command_number = this->GetCmd(szCmdToken);

	strcpy(Message, szCmd);

	if ( stricmp(szCmdToken, "/add0") == 0 )
	{
		int nAddStrength = 100;
		LevelUpPointAdd(0,nAddStrength,aIndex);
		GCSendEffectInfo(aIndex, 17);
	}
	if ( stricmp(szCmdToken, "/add1") == 0 )
	{
		int nAddStrength = 100;
		LevelUpPointAdd(1,nAddStrength,aIndex);
		GCSendEffectInfo(aIndex, 3);
	}
	if ( stricmp(szCmdToken, "/add2") == 0 )
	{
		int nAddStrength = 100;
		LevelUpPointAdd(2,nAddStrength,aIndex);
		GCSendEffectInfo(aIndex, 17);
	}
	if ( stricmp(szCmdToken, "/add3") == 0 )
	{
		int nAddStrength = 100;
		LevelUpPointAdd(3,nAddStrength,aIndex);
		GCSendEffectInfo(aIndex, 17);
	}
	switch ( command_number )
	{
		#if(GS_CASTLE == 1)
		case 331:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 0, pId);
		}
		break;
		case 332:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 1, pId);
		}
		break;
		case 333:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 2, pId);
		}
		break;
		case 334:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 3, pId);
		}
		break;
		case 335:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 4, pId);
		}
		break;
		case 336:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 5, pId);
		}
		break;
		case 337:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 6, pId);
		}
		break;
		case 338:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 7, pId);
		}
		break;
		case 340:
		{
			pId = this->GetTokenString();
			g_CastleSiege.OperateGmCommand(lpObj->m_Index, 8, pId);
		}
		break;
#endif
		case 502:
			{
				MMSG->Msg(lpObj->m_Index,"@@God of MuGlobal is Wolf");
				break;
			}
		case 501:
			{
				int OnlineCount = 0;
				for (int n=OBJ_STARTUSERINDEX;n<OBJMAX;n++)
				{
					if(gObjIsConnected(n))
						OnlineCount++;
				}
				MMSG->Msg(lpObj->m_Index,"[%d] Online Players",OnlineCount);
				break;
			}
		case 500:
			{
				char* szuText = this->GetTokenString();
				if(szuText != NULL)
				{
					int uTick = GetTickCount();
					//if(lpObj->Money < 299999);
					//{
					//	MMSG->Msg(lpObj->m_Index,"@[POST] Eww ti co - bisplatnij sir toka v mi6elovki");
					//	return 0;
					//}
					//{
					//	MMSG->Msg(lpObj->m_Index,"@[POST] Eww ti co - level netu :(");
					//	return 0;
					//}
					if(lpObj->Money < 500000)
					{
						MMSG->Msg(lpObj->m_Index,"@[POST] You need 500k Zen to POST");
						return 0;
					}
					if(lpObj->Level < 50)
					{
						MMSG->Msg(lpObj->m_Index,"@[POST] You need 50 Level to POST");
						return 0;
					}
					else
					{
						char *Content = (char*) Message;
						GetLongParam(Message, Content);
						lpObj->Money -= 500000;
						GCMoneySend(lpObj->m_Index , lpObj->Money);
						wsprintf(szuTemp,"[POST] %s: %s",lpObj->Name,Message);
						MMSG->PMAll(szuTemp);
						return 0;
					}
				}
				else
				{
					MMSG->Msg(lpObj->m_Index,"@[POST] The Correct Syntax is: /post message");
					return 0;
				}
				break;
			}
			case 503:	// MakeSet CMD
			{
								if ( (lpObj->Authority & 2) != 2 && (lpObj->Authority & 0x20) != 0x20 )
				{
					return 0;
				}
				if (!strcmpi(Message, "/MakeSet"))
				{
					MMSG->Msg(aIndex, "Useage: /Make <Name> <Index> <Level> <Option> <Skill> <Luck> <Exc> <Ancient> <Amount> <Dur>");
					return 0;
				}
				//Name Index Level Option Skill Luck Exc Ancient Amount Dur
				char Name[100];
				memset(Name, 0, 100);
				int Index, Level, Option, Luck, Skill, Exc, Ancient, Amount, Dur; 
				char ParamBuff[100];
				memset(ParamBuff, 0, 100);
				GetParam(1, Message, ParamBuff);
				strcpy(Name, ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(2, Message, ParamBuff)) strcpy(ParamBuff, "0");
				Index = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(3, Message, ParamBuff)) strcpy(ParamBuff, "13");
				Level = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(4, Message, ParamBuff)) strcpy(ParamBuff, "4");
				Option = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(5, Message, ParamBuff)) strcpy(ParamBuff, "1");
				Luck = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(6, Message, ParamBuff)) strcpy(ParamBuff, "1");
				Skill = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(7, Message, ParamBuff)) strcpy(ParamBuff, "127");
				Exc = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(8, Message, ParamBuff)) strcpy(ParamBuff, "0");
				Ancient = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(9, Message, ParamBuff)) strcpy(ParamBuff, "1");
				Amount = atoi(ParamBuff);
				memset(ParamBuff, 0, 100);
				if (!GetParam(10, Message, ParamBuff)) strcpy(ParamBuff, "255");
				Dur = atoi(ParamBuff);
				int tIndex = gObjGetIndexByName(Name);
				if (!tIndex) return 0;
				for (int i=0; i<Amount; i++)
				{
					for (int type=7; type<12; type++)
						ItemSerialCreateSend(tIndex, lpObj->MapNumber, lpObj->X, lpObj->Y, type*512 + Index, Level, Dur, Skill, Luck, Option, tIndex, Exc, Ancient);
				}
				break;
			}
		case 218:
			{
				AllSendServerMsg("[MU GLOBAL ADMINISTRATORS]");
				AllSendServerMsg("Sacred & Wolf");
				AllSendServerMsg("www.muglobal.ru");
				break;
			}
		case 217:	//116:
			{
				if ( (lpObj->Authority & 2) != 2 && (lpObj->Authority & 0x20) != 0x20 )
				{
					return 0;
				}

				LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s",
					lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, "FIRECRACK.");
				int x = lpObj->X;
				int y = lpObj->Y;
				PMSG_SERVERCMD pMsg;

				PHeadSubSetB((LPBYTE)&pMsg,0xF3,0x40, sizeof(pMsg));
				pMsg.CmdType = 0;

				for ( int i=0;i<15;i++)
				{
					pMsg.X = x+(rand() % 5)*2 - 4;
					pMsg.Y = y+(rand() % 5)*2 - 4;
					MsgSendV2(lpObj,(UCHAR*)&pMsg, sizeof(pMsg));
					::DataSend(lpObj->m_Index ,(UCHAR*)&pMsg, sizeof(pMsg));
				}
			}
			break;

		case 216:	//115:
			{
				if ( (lpObj->Authority & 2) != 2 && (lpObj->Authority & 0x20) != 0x20 )
				{
					return 0;
				}

				pId = this->GetTokenString();

				if ( pId == NULL )
				{
					return 0;
				}

				LPOBJ lpTargetObj = gObjFind(pId);

				if ( lpTargetObj == NULL )
				{
					return 0;
				}

				LogAddTD("Use GM Command -> [ %s ]	[ %s ]	[ %s ] / Target : [%s][%s] : %s ",
					lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, lpTargetObj->AccountID,
					lpTargetObj->Name, "User Watching");

				char szTemp[256];

				if ( this->WatchTargetIndex == lpTargetObj->m_Index )
				{
					this->WatchTargetIndex = -1;
					
					wsprintf(szTemp, "%s : °¨½ÃÇØÁ¦", lpTargetObj->Name);	// #translation
					GCServerMsgStringSend(szTemp, lpObj->m_Index, 1);
				}
				else
				{
					wsprintf(szTemp, "%s : °¨½Ã½ÃÀÛ", lpTargetObj->Name);	// #translation
					GCServerMsgStringSend(szTemp, lpObj->m_Index, 1);
					this->WatchTargetIndex = lpTargetObj->m_Index;
				}
			}
			break;

		case 215:	//114:
			{
				if ( (lpObj->Authority & 2) != 2 && (lpObj->Authority & 0x20) != 0x20 )
				{
					return 0;
				}

				pId = this->GetTokenString();

				if ( pId == NULL )
				{
					return 0;
				}

				int map;
				int iX;
				int iY;
				LPOBJ lpTargetObj = gObjFind(pId);
				int iIndex;

				if ( lpTargetObj == NULL )
				{
					return 0;
				}

				LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] / Target : [%s][%s] : %s",
					lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, lpTargetObj->AccountID,
					lpTargetObj->Name, "User Tracking");
				map = lpTargetObj->MapNumber;
				iX = lpTargetObj->X;
				iY = lpTargetObj->Y;
				iIndex = lpObj->m_Index;

				if ( iIndex >= 0 )
				{
					gObjTeleport(iIndex, map, iX, iY);
				}
			}
			break;

		case 214:	//113:
			{
				if ( (lpObj->Authority & 2) != 2 )
				{
					return 0;
				}

				LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s",
					lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, 
					"User Stat (connection)");

				int lc151 = 0;
				int lc152 = 400;
				int iTokenNumber = this->GetTokenNumber();

				if ( iTokenNumber > 0 )
				{
					lc151 = iTokenNumber;
				}

				int iTokenNumber2 = this->GetTokenNumber();

				if ( iTokenNumber2 > 0 )
				{
					lc152 = iTokenNumber2;
				}

				gObjSendUserStatistic(lpObj->m_Index, lc151, lc152);
			}
			break;

		case 100:	//100:
			{
				if ( (lpObj->AuthorityCode &4) != 4 )
				{
					return 0;
				}

				pId = this->GetTokenString();

				if ( pId == NULL )
				{
					return 0;
				}

				int iTargetIndex = gObjGetIndex(pId);
				

				if ( iTargetIndex >= 0 )
				{
					LPOBJ lpTargetObj = gObjFind(pId);

					if ( lpTargetObj == NULL )
					{
						return 0;
					}

					LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] / Target : [%s][%s] : %s",
						lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, lpTargetObj->AccountID,
						lpTargetObj->Name, "User Disconnect");
					LogAdd(lMsg.Get(MSGGET(1, 191)), pId);
					CloseClient(iTargetIndex);
				}
			}
			break;

		case 112:	//108:
			{
				if ( (lpObj->AuthorityCode &4) != 4 )
				{
					return 0;
				}

				LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s",
					lpObj->Ip_addr, lpObj->AccountID, lpObj->Name,
					"Guild Disconnect");

				pId = this->GetTokenString();

				if ( pId == NULL )
				{
					return 0;
				}

				_GUILD_INFO_STRUCT * lpGuild = Guild.SearchGuild(pId);
				int iIndex;

				if ( lpGuild != NULL )
				{
					for ( int i=0;i<MAX_USER_GUILD ; i++ )
					{
						if ( lpGuild->Index[i] >= 0 )
						{
							iIndex = lpGuild->Index[i];

							if ( iIndex >= 0 )
							{
								LogAdd(lMsg.Get(MSGGET(1, 191)), pId);
								CloseClient(iIndex);
							}
						}
					}
				}
			}
			break;

		case 101:	//101:
			{
				if ( (lpObj->AuthorityCode &8) == 8 )
				{
					pId = this->GetTokenString();

					if ( pId == NULL )
					{
						return 0;
					}

					int iTokenNumber1 = this->GetTokenNumber();
					int iTokenNumber2 = this->GetTokenNumber();
					int iTokenNumber3 = this->GetTokenNumber();
					int iIndex = gObjGetIndex(pId);
					LPOBJ lpTargetObj;

					if ( iIndex >= 0 )
					{
						lpTargetObj = gObjFind(pId);

						if ( lpTargetObj == NULL )
						{
							return 0;
						}

						LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] / Target : [%s][%s] : %s",
							lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, lpTargetObj->AccountID,
							lpTargetObj->Name, "User SetPosition");

						gObjTeleport(iIndex, iTokenNumber1, iTokenNumber2, iTokenNumber3);
					}
				}
				else
				{
					pId = this->GetTokenString();

					if ( pId != NULL )
					{
						int lc165 = -1;
						int lc166 = 0;
						int lc167 = 0;

						if ( lpObj->Teleport != 0 )
						{
							GCServerMsgStringSend(lMsg.Get(MSGGET(6, 68)), lpObj->m_Index, 1);
							return 0;
						}

						if ( (lpObj->m_IfState.use) != 0 )
						{
							if ( lpObj->m_IfState.type  == 3 )
							{
								lpObj->TargetShopNumber = -1;
								lpObj->m_IfState.type = 0;
								lpObj->m_IfState.use = 0;
							}
						}

						if ( lpObj->m_IfState.use > 0 )
						{
							GCServerMsgStringSend(lMsg.Get(MSGGET(6, 68)), lpObj->m_Index, 1);
							return 0;
						}

						if ( gObj[aIndex].IsInBattleGround != false )
						{
							GCServerMsgStringSend(lMsg.Get(MSGGET(6, 68)), lpObj->m_Index, 1);
							return 0;
						}

						if ( lpObj->m_PK_Level >= 6 )
						{
							GCServerMsgStringSend(lMsg.Get(MSGGET(4, 101)), lpObj->m_Index, 1);
							return 0;
						}

						gMoveCommand.Move(lpObj, pId);
					}
				}
			}
			break;

		case 108:	//104:
			{
				if ( (lpObj->AuthorityCode &8)!= 8 )
				{
					return 0;
				}

				LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s",
					lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, 
					"Guild SetPosition");

				pId = this->GetTokenString();

				if ( pId == NULL )
				{
					return 0;
				}

				int iTokenNumber1 = this->GetTokenNumber();
				int iTokenNumber2 = this->GetTokenNumber();
				int iTokenNumber3 = this->GetTokenNumber();
				_GUILD_INFO_STRUCT* lpGuild = Guild.SearchGuild(pId);
				int iIndex;

				if ( lpGuild != NULL )
				{
					for ( int i=0;i<MAX_USER_GUILD;i++)
					{
						if (lpGuild->Index[i] >= 0 )
						{
							iIndex = lpGuild->Index[i];
							gObjTeleport(iIndex, iTokenNumber1, iTokenNumber2++, iTokenNumber3);
						}
					}
				}
			}
			break;

		case 109:	//105:
			{
				if ( (lpObj->Authority &2)== 2 )
				{
					LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s",
						lpObj->Ip_addr, lpObj->AccountID, lpObj->Name,
						"Start BattleSoccer");

					BattleSoccerGoalStart(0);
				}
			}
			break;

		case 110:	//106:
			{
				if ( (lpObj->Authority &2) == 2 )
				{
					LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s",
						lpObj->Ip_addr, lpObj->AccountID, lpObj->Name,
						"Stop BattleSoccer");

					BattleSoccerGoalEnd(0);
				}
				else
				{
					if ( gObj[aIndex].lpGuild != NULL )
					{
						if (gObj[aIndex].lpGuild->WarType == 1 )
						{
							strcmp(gObj[aIndex].Name, gObj[aIndex].lpGuild->Names[0] );
						}
					}
				}
			}

			break;

		case 111:	//107:
			{
				if ( (lpObj->Authority & 2) == 2 )
				{
					LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s",
						lpObj->Ip_addr, lpObj->AccountID, lpObj->Name, "End GuildWar");

					char * szGuild = this->GetTokenString();

					if ( szGuild != NULL )
					{
						GCManagerGuildWarEnd(szGuild);
					}
				}
				else
				{
					if ( gObj[aIndex].lpGuild != NULL && gObj[aIndex].lpGuild->lpTargetGuildNode != NULL)
					{
						if ( strcmp( gObj[aIndex].Name, gObj[aIndex].lpGuild->Names[0] ) ==  0)
						{
							if ( gObj[aIndex].lpGuild->BattleGroundIndex >= 0 && gObj[aIndex].lpGuild->WarType == 1 )
							{
								::gObjAddMsgSendDelay(&gObj[aIndex], 7, aIndex, 10000, 0);

								char szTemp[100];

								wsprintf(szTemp, lMsg.Get(MSGGET(4, 129)), gObj[aIndex].lpGuild->Names[0] );
								::GCServerMsgStringSendGuild(gObj[aIndex].lpGuild, szTemp, 1);
								::GCServerMsgStringSendGuild(gObj[aIndex].lpGuild->lpTargetGuildNode, szTemp, 1);
							}
						}
					}
				}
			}
			break;

		case 104:	//102:
			{
				if ( (lpObj->AuthorityCode&0x20 ) != 0x20 )
				{
					return FALSE;
				}

				LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "Ban Chatting");

				pId = this->GetTokenString();

				if ( pId == NULL )
				{
					return FALSE;
				}

				int Index = ::gObjGetIndex(pId);

				if ( Index >= 0 )
				{
					gObj[Index].Penalty |= 2;
				}

			}
			break;

		case 106:	//103:
			{
				if ( (lpObj->AuthorityCode & 32 ) != 32 )
				{
					return FALSE;
				}

				LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "Free Ban-Chatting");

				pId = this->GetTokenString();

				if ( pId == NULL )
				{
					return FALSE;
				}

				int Index = ::gObjGetIndex(pId);

				if ( Index >= 0 )
				{
					gObj[Index].Penalty &= ~2;
				}
			}
			break;

		case 200:	//109:
			{
				pId = this->GetTokenString();

				if ( pId != NULL )
				{
					if ( strlen(pId) >= 1 )
					{
						::GCGuildWarRequestResult(pId, aIndex, 0);
					}
				}
			}

			break;

		case 202:	//111:
			{
				if ( (lpObj->Authority & 2 ) == 2 )
				{
					LogAddTD("Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
						lpObj->Name, "Set GuildWar");
		
					pId = this->GetTokenString();

					if ( pId != NULL )
					{
						char * Rival = this->GetTokenString();

						if ( Rival != NULL )
						{
							if ( strlen(pId) >= 1 )
							{
								if ( strlen(Rival) >= 1 )
								{
									::GCManagerGuildWarSet(pId, Rival, 1);
								}
							}
						}
					}
				}
				else
				{
					if ( gEnableBattleSoccer != FALSE )
					{
						pId = this->GetTokenString();

						if ( pId != NULL )
						{
							if ( strlen(pId) >= 1 )
							{
								::GCGuildWarRequestResult(pId, aIndex, 1);
							}
						}
					}
				}
			}

			break;

		case 201:	//110:
			{
				gObjBillRequest(&gObj[aIndex]);
			}
			break;

		case 203:	//112:
			{
				pId = this->GetTokenString();

				if ( pId != NULL )
				{
					BOOL bState;

					if ( strcmp(pId, "on" ) == 0 )
					{
						bState = TRUE;
					}
					else if ( strcmp(pId, "off") == 0 )
					{
						bState = FALSE;
					}

					if ( bState >= FALSE && bState <= TRUE )
					{
						::gObjSetTradeOption(aIndex, bState);
						::gObjSetDuelOption(aIndex, bState);
					}
				}
			}
			break;

		case 320:	//117:
			{
				if ( (lpObj->Authority &2) != 2 )
				{
					return FALSE;
				}

				LogAddTD("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐ»óź¸±â");	// #translation Require Translation
				KUNDUN_GM_LOG.Output("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐ»óź¸±â");	// #translation  Require Translation

				for ( int n=0;n<MAX_VIEWPORT;n++)
				{
					if ( lpObj->VpPlayer[n].state != 0 )
					{
						if ( lpObj->VpPlayer[n].type == OBJ_MONSTER )
						{
							if ( lpObj->VpPlayer[n].number >= 0 )
							{
								LPOBJ lpTarget = &gObj[lpObj->VpPlayer[n].number];

								if ( lpTarget->Class == 275 )
								{
									TNotice pNotice(1);

									pNotice.SendToUser(lpObj->m_Index, "ÄïµÐ HP = %7.0f / %7.0f", lpTarget->Life, lpTarget->MaxLife); //Require Translation
									pNotice.SendToUser(lpObj->m_Index, "ÄïµÐ HP ÃÊ´çȸº¹·® = %d ȸº¹·® = %d ȸº¹½Ã°£ = %d", giKundunRefillHPSec, giKundunRefillHP, giKundunRefillHPTime);	// Require Translation
								}
							}
						}
					}
				}

			}
			break;

		case 321:	//118:
			{
				if ( (lpObj->Authority &2 ) != 2 )
				{
					return FALSE;
				}

				LogAddTD("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHP¼³Á¤");	// Require Translation
				KUNDUN_GM_LOG.Output("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHP¼³Á¤");	// Require Translation

				int iLife = this->GetTokenNumber();

				for ( int n=0;n<MAX_VIEWPORT;n++)
				{
					if ( lpObj->VpPlayer[n].state != FALSE )
					{
						if ( lpObj->VpPlayer[n].type == OBJ_MONSTER )
						{
							if ( lpObj->VpPlayer[n].number >= 0 )
							{
								LPOBJ lpTarget = &gObj[lpObj->VpPlayer[n].number];

								if ( lpTarget->Class == 275 )
								{
									if  ( iLife <= 5000 )
									{
										iLife = 5000 ;
									}

									if ( iLife > lpTarget->MaxLife )
									{
										iLife = lpTarget->MaxLife;
									}

									lpTarget->Life = iLife;
								
									TNotice pNotice(1);

									pNotice.SendToUser(lpObj->m_Index, "ÄïµÐ HP = %7.0f / %7.0f", lpTarget->Life, lpTarget->MaxLife); //Require Translation
								}
							}
						}
					}
				}
			}
			break;

		case 322:	//119:
			{
				if ( (lpObj->Authority &2 ) != 2 )
				{
					return FALSE;
				}

				LogAddTD("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHPȸº¹·®¼³Á¤");	// Require Translation
				KUNDUN_GM_LOG.Output("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHPȸº¹·®¼³Á¤");	// Require Translation

				int RefillHP = this->GetTokenNumber();

				if ( RefillHP <= 0 || RefillHP > 5000000 )
				{
					return 0;
				}

				giKundunRefillHP = RefillHP;

				TNotice pNotice(0);

				pNotice.SendToUser(lpObj->m_Index, "ÄïµÐ HP ÃÊ´çȸº¹·® = %d ȸº¹·® = %d ȸº¹½Ã°£ = %d", giKundunRefillHPSec, giKundunRefillHP, giKundunRefillHPTime);	// Require Translation

			}

			break;

		case 323:	//120:
			{
				if ( (lpObj->Authority &2 ) != 2 )
				{
					return FALSE;
				}

				LogAddTD("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHPÃÊ´çȸº¹·®¼³Á¤");	// Require Translation
				KUNDUN_GM_LOG.Output("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHPÃÊ´çȸº¹·®¼³Á¤");	// Require Translation

				int RefillHPSec = this->GetTokenNumber();

				if ( RefillHPSec <= 0 || RefillHPSec > 10000 )
				{
					return 0;
				}

				giKundunRefillHPSec = RefillHPSec;

				TNotice pNotice(0);

				pNotice.SendToUser(lpObj->m_Index, "ÄïµÐ HP ÃÊ´çȸº¹·® = %d ȸº¹·® = %d ȸº¹½Ã°£ = %d",
					giKundunRefillHPSec, giKundunRefillHP, giKundunRefillHPTime);	// Require Translation

			}

			break;

		case 324:	//121:
			{
				if ( (lpObj->Authority &2 ) != 2 )
				{
					return FALSE;
				}

				LogAddTD("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHPȸº¹½Ã°£¼³Á¤");	// Require Translation
				KUNDUN_GM_LOG.Output("[KUNDUN] Use GM Command -> [ %s ]\t[ %s ]\t[ %s ] : %s", lpObj->Ip_addr, lpObj->AccountID,
					lpObj->Name, "ÄïµÐHPȸº¹½Ã°£¼³Á¤");	// Require Translation

				int RefillHPTime = this->GetTokenNumber();

				if ( RefillHPTime < 0 || RefillHPTime > 60000 )
				{
					return 0;
				}

				giKundunRefillHPTime = RefillHPTime;

				TNotice pNotice(0);

				pNotice.SendToUser(lpObj->m_Index, "ÄïµÐ HP ÃÊ´çȸº¹·® = %d ȸº¹·® = %d ȸº¹½Ã°£ = %d", giKundunRefillHPSec, giKundunRefillHP, giKundunRefillHPTime);	// Require Translation

			}
			break;
		case 369:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 0);
			break;
		case 370:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 1);
			break;
		case 371:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 2);
			break;
		case 372:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 3);
			break;
		case 373:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 4);
			break;
		case 374:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 5);
			break;
		case 375:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 6);
			break;
		case 376:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 7);
			break;
		case 377:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 8);
			break;
		case 378:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 9);
			break;
		case 379:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 10);
			break;
		case 380:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 11);
			break;
		case 381:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 12);
			break;
		case 382:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 13);
			break;
		case 383:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 14);
			break;
		case 384:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 15);
			break;
		case 385:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 16);
			break;
		case 386:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 17);
			break;
		case 387:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 18);
			break;
		case 388:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 19);
			break;
		case 389:
			g_Kanturu.OperateGmCommand(lpObj->m_Index, 20);
			break;
	}
	return 0;
}
void CRingAttackEvent::ProcState_Closed()
{
    int iTICK_MSEC = GetTickCount() - this->m_iTIME_TICK_COUNT;

    if ( iTICK_MSEC >= 1000 )
    {
        this->m_iTIME_MSEC_REMAIN -= iTICK_MSEC;
        this->m_iTIME_TICK_COUNT = GetTickCount();

        if ( this->m_bDoEvent )
        {
            if ( this->m_iTIME_MSEC_REMAIN <= (this->m_iTIME_MIN_OPEN * 60 * 1000 ) &&
                    this->m_iTIME_MSEC_REMAIN > 0 &&
                    (this->m_iTIME_MSEC_REMAIN / 60000 ) != this->m_iTIME_NOTIFY_COUNT )
            {
                this->m_iTIME_NOTIFY_COUNT = this->m_iTIME_MSEC_REMAIN / 60000;

                if ( (this->m_iTIME_NOTIFY_COUNT+1) == 3 )
                {
                    char szTemp[256];
                    wsprintf(szTemp, lMsg.Get(MSGGET(4, 183)));
                    AllSendServerMsg(szTemp);

                    PMSG_ANS_CL_EFFECT pMsg;

                    PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
                    pMsg.wEffectNum = 0;

                    DataSendAll((LPBYTE)&pMsg, pMsg.h.size);

                    LogAddTD("[Ring Event] - Before 3 minutes - Advertise");
                }
            }
        }
    }

    if ( this->m_iTIME_MSEC_REMAIN <= 0 )
    {
        char szTemp[256];
        wsprintf(szTemp, lMsg.Get(MSGGET(4, 184)));
        AllSendServerMsg(szTemp);

        PMSG_ANS_CL_EFFECT pMsg;

        PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
        pMsg.wEffectNum = 1;

        DataSendAll((LPBYTE)&pMsg, pMsg.h.size);

        if ( this->m_bDoEvent )
        {
            this->SetState(2);
        }
        else
        {
            this->SetState(0);
        }

        LogAddTD("[Ring Event] - Event Started");
    }
}
void CRingAttackEvent::ProcState_Playing()
{
    int iTICK_MSEC = GetTickCount() - this->m_iTIME_TICK_COUNT;

    if ( iTICK_MSEC >= 1000 )
    {
        this->m_iTIME_MSEC_REMAIN -= iTICK_MSEC;
        this->m_iTIME_TICK_COUNT = GetTickCount();

        if ( (rand()%10) == 0 )
        {
            this->Move();
        }
    }

    static int s_iTIME_REMAIN = -1;

    if ( ((this->m_iTIME_MSEC_REMAIN / 1000 ) % 30 ) == 0 && ((this->m_iTIME_MSEC_REMAIN / 1000) / 30) != s_iTIME_REMAIN  )
    {
        s_iTIME_REMAIN = this->m_iTIME_MSEC_REMAIN / 1000 / 30;

        for ( int i=0; i<MAX_RINGMONSTER_MAP; i++)
        {
            BOOL bLive = FALSE;

            for ( int n=0; n<OBJ_STARTUSERINDEX; n++)
            {
                if ( gObj[n].Class == 135 )
                {
                    if ( gObj[n].m_bIsInMonsterHerd )
                    {
                        if ( gObj[n].Live && gObj[n].MapNumber == g_RingEventMapNum[i] )
                        {
                            bLive = TRUE;
                        }
                    }
                }
            }

            LogAddTD("[Ring Event] - per 30'S Inform MapNumber:%d, X:%d, Y:%d, Boss Live:%d",
                     g_RingEventMapNum[i], this->m_RingMonsterHerd[i].GetX(), this->m_RingMonsterHerd[i].GetY(), bLive);
        }
    }

    if ( this->m_iTIME_MSEC_REMAIN <= (this->m_iTIME_MONSTER_TO_DEST * 60 * 1000) && this->m_bMonsterToDest == FALSE )
    {

        for ( int i=0; i<MAX_RINGMONSTER_MAP; i++)
        {
            BYTE iRandX;
            BYTE iRandY;
            BYTE ucRAND;

            ucRAND = rand()%4;
            iRandX = g_RingMapDestPosition[i][ucRAND*2];
            iRandY = g_RingMapDestPosition[i][ucRAND*2+1];

            if ( this->m_RingMonsterHerd[i].MoveHerd(iRandX, iRandY) != FALSE )
            {
                LogAddTD("[Ring Event] - Monster Herd Move MapNumber:%d, X:%d, Y:%d",
                         g_RingEventMapNum[i], iRandX, iRandY);
            }
        }

        this->m_bMonsterToDest = TRUE;
    }

    if ( this->m_iTIME_MSEC_REMAIN <= 0 )
    {
        char szTemp[256];
        wsprintf(szTemp, lMsg.Get(MSGGET(4, 185)));
        AllSendServerMsg(szTemp);

        PMSG_ANS_CL_EFFECT pMsg;

        PHeadSetB((LPBYTE)&pMsg, 0x9E, sizeof(pMsg));
        pMsg.wEffectNum = 2;

        DataSendAll((LPBYTE)&pMsg, pMsg.h.size);

        if ( this->m_bDoEvent )
        {
            this->SetState(1);
        }
        else
        {
            this->SetState(0);
        }

        LogAddTD("[Ring Event] - Event Ended");
    }
}