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!

GunZ 1.5 (Summer of 2011) Source.

Skilled Illusionist
Joined
Jan 1, 2010
Messages
302
Reaction score
5
Don't have MMonitor.h in source @@!
And cannot build match sever @@!
 
Joined
Oct 14, 2010
Messages
470
Reaction score
20
Don't have MMonitor.h in source @@!
And cannot build match sever @@!

i have it! lol just kidding.

first, at the source folder you need to find "Monitor" after that u will find something like MBMatchMonitorXml.h, MBMatchMonitorCommunicator.h etc, delete. Now open your project that you want to build then comment all include of Monitor.vcprj then build it.
 
Skilled Illusionist
Joined
Jan 1, 2010
Messages
302
Reaction score
5
Now open your project that you want to build then comment all include of Monitor.vcprj then build it.
Sorry, i'm noob, can you tell me more about that
I use Phoenix client and Dawson source code release to build runnable, but when i config system.mrs, config.xml i can't see my sever.
My sever was built on release mode and working normaly, it's not local on my computer, and on my computer i using hare and bunny, but like that, cannot see my sever to connect
All xml file loading success full in mlog, no error occurred.
Can anyone tell for why ?
Sorry for my bad English
 
Newbie Spellweaver
Joined
Oct 3, 2010
Messages
7
Reaction score
0
Sorry, i'm noob, can you tell me more about that
I use Phoenix client and Dawson source code release to build runnable, but when i config system.mrs, config.xml i can't see my sever.
My sever was built on release mode and working normaly, it's not local on my computer, and on my computer i using hare and bunny, but like that, cannot see my sever to connect
All xml file loading success full in mlog, no error occurred.
Can anyone tell for why ?
Sorry for my bad English

lol !
google for gunz server 1.5 in vietnam
And how do you do to admin
 
Junior Spellweaver
Joined
Oct 30, 2011
Messages
117
Reaction score
16
when i try play Duel Tournament, show this message in MatchServer
[12/09/11 00:49:35] MMatchServer::OnRequestDuelTournamentChallenge - Can't Join Challenge the Game(PlayerUID - 010)
[12/09/11 00:49:37] MMatchServer::OnRequestDuelTournamentChallenge - Not Join Challenge(PlayerUID - 010)
In game error message:
Your applicationn has failed. Please try again later. If the problem continues, please contact ijji Help Desk.(E140002)
why show this error ?
 
Skilled Illusionist
Joined
Jan 1, 2010
Messages
302
Reaction score
5
I have this problem. I already have 3 Runnable. First runnable i built in Release mode, remove NHN and XTrap, it was read all system file ( All Xml success loading ) and connect my sever, but it not have loading screen, no login map, and can't greate a game in all mode ( I think it cannot read any mrs file in client, althougt it can read system.mrs )
Seccond runnable, i pick up somewhere, is loading all mrs file but the string not show normaly ( Ex : ASD@%@#%#@^#@$#@^%%R^&$ ...etc.. )
i see my sever but cannot access sever !!
Third Runable, It not remove NHN ( Need Handpollforclient and etc... )
and it load all mrs file, include system.mrs but i can't see my sever
Can anyone help me! I Noob in C++ and i can't fix my source code, please help me if you can !
 
The beer?? Its here !!!
Loyal Member
Joined
Jan 9, 2007
Messages
1,621
Reaction score
104
I have this problem. I already have 3 Runnable. First runnable i built in Release mode, remove NHN and XTrap, it was read all system file ( All Xml success loading ) and connect my sever, but it not have loading screen, no login map, and can't greate a game in all mode ( I think it cannot read any mrs file in client, althougt it can read system.mrs )
Seccond runnable, i pick up somewhere, is loading all mrs file but the string not show normaly ( Ex : ASD@%@#%#@^#@$#@^%%R^&$ ...etc.. )
i see my sever but cannot access sever !!
Third Runable, It not remove NHN ( Need Handpollforclient and etc... )
and it load all mrs file, include system.mrs but i can't see my sever
Can anyone help me! I Noob in C++ and i can't fix my source code, please help me if you can !

You also should remove al the NHN stuff.
 
Joined
Jul 9, 2009
Messages
716
Reaction score
324
when i select my character i got this error

MMatchServer::OnAsyncResponse_GetDuelTournamentCharacterInfo - ½ֶַ׀
[12/13/11 18:02:35] Agent Removed (UID:010)
RealCPNet> SessionCreated=3, SessionDestroyed=1
RealCPNet> Begin Destroy
RealCPNet> Destroy Process 1/4
RealCPNet> Destroy Process 2/4
RealCPNet> Destroy Process 3/4
RealCPNet> Destroy Process 4/4
RealCPNet> Destroy End
[12/13/11 18:02:35] Match Server Destoryed

any help ?
 
Skilled Illusionist
Joined
Jan 31, 2010
Messages
313
Reaction score
21
Is it bugged or what? Damn bad source.. (MAIET fault not your Dawson) When i delete the MMonitor.h references it give other errors..
Boring to "fix".
 
Freelance GunZ Developer
Joined
Aug 6, 2009
Messages
676
Reaction score
106
Ryu learn to code? it's as ez as fux mate?

The source is fine... you just don't know how to code @_@.

edit: @ everyone else asking for poop "I need blah, please give me bleh" Stop being so damn greedy.

Thanks quoted for the truth! Source is totally fine works great all tough it just sucks i don't got the freaking time to work on it... I need some vacation ..
 
Joined
Sep 10, 2007
Messages
970
Reaction score
815
Challenge Quests are not included in this source.

Code:
#include "stdafx.h"
#include "ZRuleQuestChallenge.h"
#include "ZMatch.h"
#include "MActorDef.h"
#include "MNewQuestScenario.h"
#include "ZFSMManager.h"
#include "ZActorActionManager.h"
#include "ZActorAction.h"
#include "ZActorWithFSM.h"
#include "ZApplication.h"
#include "ZFSMManager.h"
#include "ZFSMParser.h"
#include "ZFSM.h"

ZRuleQuestChallenge::ZRuleQuestChallenge(ZMatch* pMatch) 
 : ZRule(pMatch)
 , m_pFsmManager(new ZFSMManager)
 , m_pActorDefMgr(new MActorDefManager)
 , m_pActorActionMgr(new ZActorActionManager)
 , m_pScenario(NULL)
 , m_nCurrSector(0)
{
}

ZRuleQuestChallenge::~ZRuleQuestChallenge()
{
	delete m_pFsmManager;
	delete m_pActorDefMgr;
	delete m_pActorActionMgr;
}

bool ZRuleQuestChallenge::LoadScenarioMap(const char* szScenarioName)
{
	MNewQuestScenarioManager* pScenarioMgr = ZApplication::GetStageInterface()->GetChallengeQuestScenario();
	if (!pScenarioMgr) { _ASSERT(0); return false; }
	MNewQuestScenario* pScenario = pScenarioMgr->GetScenario(szScenarioName);
	if (!pScenario) { _ASSERT(0); return false; }

	int numSector = pScenario->GetNumSector();
	for (int i=0; i<numSector; ++i)
	{
		MNewQuestSector* pSector = pScenario->GetSector(i);
		if (!pSector)  { _ASSERT(0); return false; }

		const char* szMapName = pSector->GetMapName();
		_ASSERT(0 != strlen(szMapName));
		ZGetWorldManager()->AddWorld(szMapName);
	}

	return true;
}

int ZRuleQuestChallenge::GetRoundMax()
{
	if (!m_pScenario) {
		_ASSERT(0);
		return 1;
	}

	return m_pScenario->GetNumSector();
}


bool ZRuleQuestChallenge::Init()
{
	//todok quest °ÔÀÓÀ» ÇÒ¶§¸¶´Ù »õ·Î ·ÎµùÇÏ´Â °ÍÀ» °³¼±ÇÏÀÚ.

	// npc action Àбâ
	string strActionFile("system/zactoraction.xml");
#ifndef _DEBUG
	strActionFile += ".mef";
#endif
	if (!m_pActorActionMgr->ReadXml(ZApplication::GetFileSystem(), strActionFile.c_str()))
	{
		mlog("Error while Load %s\n", strActionFile.c_str());
		return false;
	}

	// npc fsm ±â¹Ý AI Àбâ
	string strAIFSMFile("system/aifsm.xml");
#ifndef _DEBUG
	strAIFSMFile += ".mef";
#endif
	vector<ZFSM*> vecFSM;
	ZFSMParser fsmParser;
	if (!fsmParser.ReadXml(ZApplication::GetFileSystem(), strAIFSMFile.c_str(), vecFSM, m_pActorActionMgr))
	{
		mlog("Error while Load %s\n", strAIFSMFile.c_str());
		return false;
	}
	m_pFsmManager->AddFsm(&vecFSM[0], (unsigned int)vecFSM.size());


	// npc ¸ðµ¨ Àбâ
	string strNpcMeshListFile("model/npc2.xml");
#ifndef _DEBUG
	strNpcMeshListFile += ".mef";
#endif	
	if (ZGetNpcMeshMgr()->LoadXmlList(strNpcMeshListFile.c_str()) == -1)
	{
		mlog("Error while Load %s\n", strNpcMeshListFile.c_str());
		return false;
	}

	// npc Á¤ÀÇ Àбâ
	string strNpcDefFile("system/npc2.xml");
#ifndef _DEBUG
	strNpcDefFile += ".mef";
#endif
	if (!m_pActorDefMgr->ReadXml(ZApplication::GetFileSystem(), strNpcDefFile.c_str()))
	{
		mlog("Error while Read %s\n", strNpcDefFile.c_str());
		return false;
	}


	// ÀÌ Äù½ºÆ®ÀÇ ½Ã³ª¸®¿À °´Ã¼ ¾Ë¾ÆµÎ±â
	const char* szScenarioName = ZGetGameClient()->GetMatchStageSetting()->GetMapName();
	
	MNewQuestScenarioManager* pScenarioMgr = ZApplication::GetStageInterface()->GetChallengeQuestScenario();
	if (!pScenarioMgr) { _ASSERT(0); return false; }
	MNewQuestScenario* pScenario = pScenarioMgr->GetScenario(szScenarioName);
	if (!pScenario) { _ASSERT(0); return false; }

	m_pScenario = pScenario;

	m_nCurrSector = 0;

	return true;
}

void ZRuleQuestChallenge::OnUpdate( float fDelta )
{
	if (ZGetGame() == NULL) return;

	//MUID uidChar(ZGetMyUID());
	//static int tempUid = 111;
	//MUID uidNPC(1,tempUid);
	////unsigned char nNPCType, nPositionIndex;

	////pCommand->GetParameter(&uidChar,			0, MPT_UID);
	////pCommand->GetParameter(&uidNPC,				1, MPT_UID);
	////pCommand->GetParameter(&nNPCType,			2, MPT_UCHAR);
	////pCommand->GetParameter(&nPositionIndex,		3, MPT_UCHAR);

	//// ÀÏ´Ü Á×Àº ³ðÀº Á¦°ÅÇÑ´Ù
	//ZNPCObjectMap* pNpcMap = ZGetObjectManager()->GetNPCObjectMap();
	//for (ZNPCObjectMap::iterator it=pNpcMap->begin(); it!=pNpcMap->end(); )
	//{
	//	if (it->second->IsDie())
	//	{
	//		delete it->second;
	//		it = pNpcMap->erase(it);
	//	}
	//	else
	//		++it;
	//}

	//// µ¿½Ã ½ºÆù ¼ö¸¦ Á¦ÇÑÇÑ´Ù
	//if (5 <= pNpcMap->size())
	//	return;

	//tempUid++;
	//uidNPC = MUID(1, tempUid);

	///*
	//MQUEST_NPC NPCType = NPC_GOBLIN_GUNNER;

	////ZMapSpawnType nSpawnType = ZMST_NPC_MELEE;

	//ZMapSpawnManager* pMSM = ZGetGame()->GetMapDesc()->GetSpawnManager();

	//MQuestNPCInfo* pNPCInfo = ZGetQuest()->GetNPCCatalogue()->GetInfo(NPCType);
	////MQuestNPCInfo* pNPCInfo = GetNPCInfo(NPCType);
	//if (pNPCInfo == NULL) return;

	//ZMapSpawnData* pSpawnData = pMSM->GetSpawnData(ZMST_NPC_MELEE, 0);

	//rvector NPCPos = rvector(0,0,0);
	//rvector NPCDir = rvector(1,0,0);

	//if (pSpawnData)
	//{
	//	NPCPos = pSpawnData->m_Pos;
	//	NPCDir = pSpawnData->m_Dir;
	//}*/

	//bool bMyControl = (uidChar == ZGetMyUID());
	//SpawnActor("knifeman", uidNPC, bMyControl);


	//todokkkkk Á×Àº ¿£ÇǾ¾ ¼­¹ö¿¡ ¾Ë¸²
}

void ZRuleQuestChallenge::OnSetRoundState( MMATCH_ROUNDSTATE roundState )
{
	switch(roundState) 
	{
	case MMATCH_ROUNDSTATE_PREPARE: 
		{
		}
		break;
	case MMATCH_ROUNDSTATE_PRE_COUNTDOWN:
		{
		}
		break;
	case MMATCH_ROUNDSTATE_COUNTDOWN : 
		{
		}
		break;
	case MMATCH_ROUNDSTATE_PLAY:
		{
		}
		break;
	case MMATCH_ROUNDSTATE_FINISH:
		{
		}
		break;
	case MMATCH_ROUNDSTATE_EXIT:
		{
		}
		break;
	case MMATCH_ROUNDSTATE_FREE:
		{
		}
		break;
	};
}

float ZRuleQuestChallenge::FilterDelayedCommand( MCommand* pCommand )
{
	switch (pCommand->GetID())
	{
	case MC_NEWQUEST_PEER_NPC_ATTACK_MELEE:	//todok ÀÌÁ¦ »ç¿ëÇÏÁö ¾ÊÀ½
		{
			char szActionName[64];	//todokkkk ¾×¼Ç À̸§À» º¸³»Áö ¸»°í Á¤¼ö°°Àº È¿À²ÀûÀÎ °ªÀ¸·Î ±¸º°ÇÒ¼ö ÀÖ°Ô ÇÏÀÚ
			pCommand->GetParameter(szActionName,	1, MPT_STR, sizeof(szActionName));

			IActorAction* pAction = m_pActorActionMgr->GetAction(szActionName);
			if (!pAction) { _ASSERT(0); break; }

			const ZActorActionMeleeShot* pMeleeShot = pAction->GetMeleeShot();
			return pMeleeShot->GetDelay();
		}
	}

	return 0;
}

bool ZRuleQuestChallenge::OnCommand( MCommand* pCommand )
{
	switch (pCommand->GetID())
	{
	case MC_NEWQUEST_PEER_NPC_ATTACK_MELEE:	//todok ÀÌÁ¦ »ç¿ëÇÏÁö ¾ÊÀ½
		{
			MUID uidNpc;
			char szActionName[64];	//todokkkk ¾×¼Ç À̸§À» º¸³»Áö ¸»°í Á¤¼ö°°Àº È¿À²ÀûÀÎ °ªÀ¸·Î ±¸º°ÇÒ¼ö ÀÖ°Ô ÇÏÀÚ
			pCommand->GetParameter(&uidNpc, 0, MPT_UID);
			pCommand->GetParameter(szActionName,	1, MPT_STR, sizeof(szActionName));

			ZActorBase* pActor = ZGetObjectManager()->GetNPCObject(uidNpc);
			ZActorWithFSM* pActorWithFSM = MDynamicCast(ZActorWithFSM, pActor);
			if (pActorWithFSM)
			{
				pActorWithFSM->OnPeerMeleeShot(szActionName);
			}

			return true;
		}
	case MC_NEWQUEST_NPC_SPAWN:
		{
			MUID uidController;
			MUID uidNpc;
			char szActorDefName[128];
			unsigned char nCustomSpawnTypeIndex, nSpawnIndex;
			pCommand->GetParameter(&uidController,	0, MPT_UID);
			pCommand->GetParameter(&uidNpc,			1, MPT_UID);
			pCommand->GetParameter(szActorDefName,	2, MPT_STR, sizeof(szActorDefName));
			pCommand->GetParameter(&nCustomSpawnTypeIndex,	3, MPT_UCHAR);
			pCommand->GetParameter(&nSpawnIndex,			4, MPT_UCHAR);

			SpawnActor(szActorDefName, uidNpc, nCustomSpawnTypeIndex, nSpawnIndex, ZGetMyUID()==uidController);
			return true;
		}

	case MC_NEWQUEST_NPC_DEAD:
		{
			MUID uidKiller, uidNPC;

			pCommand->GetParameter(&uidKiller,	0, MPT_UID);
			pCommand->GetParameter(&uidNPC,		1, MPT_UID);

			ZActorWithFSM* pActor = (ZActorWithFSM*)ZGetObjectManager()->GetNPCObject(uidNPC);
			if (pActor)
			{
				ZGetObjectManager()->Delete(pActor);

				//todok ¾Æ·¡ ÁÖ¼® ±¸ÇöÇØÁà¾ß ÇÔ
				/*m_GameInfo.IncreaseNPCKilled();

				ZCharacter* pCharacter = (ZCharacter*) ZGetCharacterManager()->Find(uidKiller);
				if (pCharacter)
				{
					ZModule_QuestStatus* pMod = (ZModule_QuestStatus*)pCharacter->GetModule(ZMID_QUESTSTATUS);
					if (pMod)
					{
						pMod->AddKills();
					}
				}*/
			}
			return true;
		}

	case MC_NEWQUEST_MOVE_TO_NEXT_SECTOR:
		{
			MoveToNextSector();
			return true;
		}

	case MC_NEWQUEST_PEER_NPC_BASICINFO:
		{
			MCommandParameter* pParam = pCommand->GetParameter(0);
			if(pParam->GetType()!=MPT_BLOB)
			{
				_ASSERT(0); break;
			}

			ZACTOR_WITHFSM_BASICINFO* pbi= (ZACTOR_WITHFSM_BASICINFO*)pParam->GetPointer();
			ZActorWithFSM* pActor = (ZActorWithFSM*)ZGetObjectManager()->GetNPCObject(pbi->uidNPC);
			if (pActor)
			{
				pActor->OnBasicInfo(pbi);
			}

			return true;
		}
	case MC_NEWQUEST_PEER_NPC_ACTION_EXECUTE:
		{
			MUID uidNpc;
			int nActionIndex;
			pCommand->GetParameter(&uidNpc, 0, MPT_UID);
			pCommand->GetParameter(&nActionIndex, 1, MPT_INT, sizeof(nActionIndex));

			ZActorBase* pActor = ZGetObjectManager()->GetNPCObject(uidNpc);
			ZActorWithFSM* pActorWithFSM = MDynamicCast(ZActorWithFSM, pActor);
			if (pActorWithFSM)
			{
				pActorWithFSM->OnPeerActionExecute(nActionIndex);
			}

			return true;
		}
	}

	return false;
}

void ZRuleQuestChallenge::SpawnActor(const char* szActorDefName, MUID& uid, int nCustomSpawnTypeIndex, int nSpawnIndex, bool bMyControl)
{
	rvector pos(0,0,0);
	rvector dir(1,0,0);

	ZMapSpawnManager* pMSM = ZGetGame()->GetMapDesc()->GetSpawnManager();
	if (pMSM)
	{
		ZMapSpawnData* pSpawnData = pMSM->GetCustomSpawnData(nCustomSpawnTypeIndex, nSpawnIndex);
		if (pSpawnData)
		{
			pos = pSpawnData->m_Pos;
			dir = pSpawnData->m_Dir;
		}
	}

	MActorDef* pActorDef = m_pActorDefMgr->GetDef(szActorDefName);
	if (!pActorDef) 
	{
		mlog("ERROR : cannot found actordef:\'%s\'\n", szActorDefName);
		_ASSERT(0); 
		return; 
	}

	// ¸¸¾à ¸®¼Ò½º ·ÎµùÀ» ¾ÈÇßÀ¸¸é ·Îµå - ÀÌ·²ÀÏÀº Å×½ºÆ®»©°ï ¾ø¾î¾ßÇÑ´Ù.
	RMesh* pNPCMesh = ZGetNpcMeshMgr()->Get(pActorDef->GetName());
	if (pNPCMesh)
	{
		if (!pNPCMesh->m_isMeshLoaded)
		{
			ZGetNpcMeshMgr()->Load(pActorDef->GetName());
			ZGetNpcMeshMgr()->ReloadAllAnimation();
		}
	}

	ZActorWithFSM* pNewActor = new ZActorWithFSM(ZGetGame(), m_pActorActionMgr);
	pNewActor->InitWithActorDef(pActorDef, m_pFsmManager);
	pNewActor->SetUID(uid);
	pNewActor->SetPosition(pos);
	pNewActor->SetDirection(dir);
	pNewActor->SetMyControl(bMyControl);

	ZGetObjectManager()->Add(pNewActor);
	ZGetEffectManager()->AddReBirthEffect(pNewActor->GetPosition());
}

void ZRuleQuestChallenge::MoveToNextSector()
{
	ZCharacter *pMyChar = ZGetGame()->m_pMyCharacter;
	pMyChar->InitStatus();

	// Àü È­¸é¿¡¼­ ³²¾ÆÀÖÀ» ¼ö Àִ ź°ú ÀÌÆåÆ®¸¦ Á¦°Å
	ZGetEffectManager()->Clear();
	ZGetGame()->m_WeaponManager.Clear();

	// »õ·Î¿î ¿ùµå·Î À̵¿!!
	++m_nCurrSector;	//todok ÇöÀç ¼½ÅÍ°¡ ¸¶Áö¸· ¼½ÅͶó¸é? ±¦ÂúÀº°Ç°¡..
	ZGetWorldManager()->SetCurrent(m_nCurrSector);
	//todok ¶ó¿îµå ÇüÅ·Π·êÀ» ±¸ÇöÇ߱⠶§¹®¿¡ ÀÌ ÄÚµå´Â ÀÌÁ¦ ÇÊ¿ä ¾ø´Âµí
	//// À̹ø¿¡ À̵¿ÇÒ Ä³¸¯ÅÍÀÇ À§Ä¡
	//int nPosIndex = ZGetCharacterManager()->GetCharacterIndex(pMyChar->GetUID(), false);
	//if (nPosIndex < 0) nPosIndex=0;
	//ZMapSpawnData* pSpawnData = ZGetWorld()->GetDesc()->GetSpawnManager()->GetSoloData(nPosIndex);
	//// »õ ÁÂÇ¥·Î À̵¿
	//if (pSpawnData!=NULL && pMyChar!=NULL)
	//{
	//	pMyChar->SetPosition(pSpawnData->m_Pos);
	//	pMyChar->SetDirection(pSpawnData->m_Dir);
	//	ZGetEffectManager()->AddReBirthEffect(pSpawnData->m_Pos);
	//}

	//todok quest Àӽ÷ΠÁÖ¼®ÇÔ ±¸ÇöÇØ¾ß ÇÑ´Ù
	//// ¾Æ¹«µµ º¸¿©ÁÖÁö ¾Ê´Â´Ù.
	//for(ZCharacterManager::iterator i = ZGetCharacterManager()->begin();i!=ZGetCharacterManager()->end();i++)
	//{
	//	i->second->SetVisible(false);
	//}

	//// ko¼ö µ¿±âÈ­
	//ZModule_QuestStatus* pMod = (ZModule_QuestStatus*)pMyChar->GetModule(ZMID_QUESTSTATUS);
	//if (pMod)
	//{
	//	int nKills = pMod->GetKills();
	//	ZGetScreenEffectManager()->SetKO(nKills);
	//}
}

;)
 
Back
Top