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!

[Release] P4F Game Server Emulator Sources

Play4Free™
Joined
Aug 8, 2007
Messages
469
Reaction score
277
Updated. GG Deleted. Little recode cmdline.

SQL dont slow GS...
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
i have new thing! We can all MsgBox() to cout... its a console application! ; )






hmm i see you dont removed CSAuth ! CSAuth is a part of GG look there !

Code:
#if (CSAUTH_VERSION==2)
	DWORD dwGGErrCode = InitGameguardAuth("", OBJMAXUSER);

	if ( dwGGErrCode != 0 )
	{
		MsgBox("Failed initialization of GameGaurd !!! , Error: %d", dwGGErrCode);
		return;
	}
#endif

Use to orginal command line args from 1.00.90 GS:
Code:
127.0.0.1 55970 127.0.0.1 55960 55901
look on error !

Code:
if (argc > 0 && argc < 8)

its bad thing... if( argc == 7) will be nice ;)
 
Last edited:
Newbie Spellweaver
Joined
Jan 3, 2009
Messages
85
Reaction score
1
only data anD join server needed?
 
Last edited:
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
no. connectserver, exdb and chatserver(but i dont know why?).

gNSerialCheck is checking a serial of a socket/main? - usable ;)


-- in subject of database... we can move files to mysql :)

 
Last edited:
Junior Spellweaver
Joined
Sep 22, 2008
Messages
126
Reaction score
37
no. connectserver, exdb and chatserver(but i dont know why?).

gNSerialCheck is checking a serial of a socket/main? - usable ;)


-- in subject of database... we can move files to mysql :)

bcz its a GAMESERVER EMULATOR, not a muserver emulator.
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
yup but gameserver can have all things in one .exe file if coder is on high level of coding ;D
 
Play4Free™
Joined
Aug 8, 2007
Messages
469
Reaction score
277
o_O its full MuServer Emulator -_- check repository. DataServer and Authorization included.

yup but gameserver can have all things in one .exe file if coder is on high level of coding ;D

No =) if coder have high knowledge they dont do one .exe file. Creating a single file Server is very big architecture mistake
 
Newbie Spellweaver
Joined
Dec 7, 2006
Messages
18
Reaction score
10
killbrum is right... threads not solve the problems. We have already thought about it more than once.
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
hmmm... okey but... when i have a good multiplayer game i can run a game and run the server ingame! server can use a database when i playing and connected players dont have a lags... ; )

Mu Online is simple game and i think you dont need a many apps... you have max. 500 online on the server...




Code:
BOOL CItem::IsItem() // Good
{
	if (this->m_Type < 0)
	{
		return 0;
	}
	else
	{
		return 1;
	}
}

//------------------------------------------------------------

int CItem::IsSetItem() // Good
{
	if (this->m_Type < 0)
	{
		return 0;
	}
	else
	{
		return this->m_SetOption & 3;	// Limit of the SetItem
	}
}

if (this->m_Type < 0) <- here is crash

- smthng wrong here when you kill kundun !




i think about libxml...
Code:
<worlds>
	<world id="0" stream="..\\data\\worlds\\Terrain1.att" />
	<world id="1" stream="..\\data\\worlds\\Terrain2.att" />
	<world id="2" stream="..\\data\\worlds\\Terrain3.att" />
	<world id="3" stream="..\\data\\worlds\\Terrain4.att" />
	<world id="4" stream="..\\data\\worlds\\Terrain5.att" />
	<world id="5" stream="..\\data\\worlds\\Terrain6.att" />
	<world id="6" stream="..\\data\\worlds\\Terrain7.att" />
	<world id="7" stream="..\\data\\worlds\\Terrain8.att" />
	<world id="8" stream="..\\data\\worlds\\Terrain9.att" />
	<world id="9" stream="..\\data\\worlds\\Terrain10.att" />
	<world id="10" stream="..\\data\\worlds\\Terrain11.att" />
	<world id="11" stream="..\\data\\worlds\\Terrain12.att" />
	<world id="12" stream="..\\data\\worlds\\Terrain12.att" />
	<world id="13" stream="..\\data\\worlds\\Terrain12.att" />
	<world id="14" stream="..\\data\\worlds\\Terrain12.att" />
	<world id="15" stream="..\\data\\worlds\\Terrain12.att" />
	<world id="16" stream="..\\data\\worlds\\Terrain12.att" />
	<world id="17" stream="..\\data\\worlds\\Terrain12.att" />
	<world id="18" stream="..\\data\\worlds\\Terrain19.att" />
	<world id="19" stream="..\\data\\worlds\\Terrain19.att" />
	<world id="20" stream="..\\data\\worlds\\Terrain19.att" />
	<world id="21" stream="..\\data\\worlds\\Terrain19.att" />
	<world id="22" stream="..\\data\\worlds\\Terrain19.att" />
	<world id="23" stream="..\\data\\worlds\\Terrain19.att" />
	<world id="24" stream="..\\data\\worlds\\Terrain25.att" />
	<world id="25" stream="..\\data\\worlds\\Terrain25.att" />
	<world id="26" stream="..\\data\\worlds\\Terrain25.att" />
	<world id="27" stream="..\\data\\worlds\\Terrain25.att" />
	<world id="28" stream="..\\data\\worlds\\Terrain25.att" />
	<world id="29" stream="..\\data\\worlds\\Terrain25.att" />
	<world id="30" stream="..\\data\\worlds\\Terrain31.att" />
	<world id="31" stream="..\\data\\worlds\\Terrain32.att" />
	<world id="32" stream="..\\data\\worlds\\Terrain33.att" />
	<world id="33" stream="..\\data\\worlds\\Terrain34.att" />
	<world id="34" stream="..\\data\\worlds\\Terrain35.att" />
	<world id="35" stream="..\\data\\worlds\\Terrain36.att" />
	<world id="36" stream="..\\data\\worlds\\Terrain37.att" />
	<world id="37" stream="..\\data\\worlds\\Terrain38.att" />
	<world id="38" stream="..\\data\\worlds\\Terrain39.att" />
	<world id="39" stream="..\\data\\worlds\\Terrain40.att" />
	<world id="40" stream="..\\data\\worlds\\Terrain41.att" />
	<world id="41" stream="..\\data\\worlds\\Terrain42.att" />
	<world id="42" stream="..\\data\\worlds\\Terrain43.att" />
	<world id="43" stream="..\\data\\worlds\\Terrain44.att" />
	<world id="44" stream="..\\data\\worlds\\Terrain45.att" />
	<world id="45" stream="..\\data\\worlds\\Terrain46.att" />
	<world id="46" stream="..\\data\\worlds\\Terrain47.att" />
	<world id="47" stream="..\\data\\worlds\\Terrain48.att" />
	<world id="48" stream="..\\data\\worlds\\Terrain49.att" />
	<world id="49" stream="..\\data\\worlds\\Terrain50.att" />
</worlds>
 
Last edited:
Play4Free™
Joined
Aug 8, 2007
Messages
469
Reaction score
277
Sorry now i havent much time but i try to update =)

Why you think what GS crash in if (this->m_Type < 0) ??
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
i dont know ;)...
someone tested crywolf event? ;>




My Feather Mix:

Code:
BOOL ThirdWingLevel1ChaosMix(LPOBJ lpObj)
{

    /////////////////////////////////////////////////////////////////////////////
    // Ustalamy poczatkowe wartosci                                            //
    /////////////////////////////////////////////////////////////////////////////

    lpObj->ChaosLock = TRUE;    // Blokujemy Chaos Box

    int WingCount            = 0;
    int ChoasGemCount        = 0;
    int BundleOfSoulCount    = 0;
    int JewelOfCreationCount = 0;
    int SetItemCount         = 0;
    int WingIndex            = -1;
    int iChaosMoney          = 0;
    int iCharmOfLuckCount    = 0;

    /////////////////////////////////////////////////////////////////////////////
    // Pobranie potrzebnej ilosci zen                                          //
    /////////////////////////////////////////////////////////////////////////////


    int nChaosNeedMoney = 1200000;
    int iChaosTaxMoney = (int)((__int64)nChaosNeedMoney * (__int64)g_CastleSiegeSync.GetTaxRateChaos(lpObj->m_Index) / (__int64)100);

    if ( iChaosTaxMoney < 0 )
    {
        iChaosTaxMoney = 0;
    }

    nChaosNeedMoney += iChaosTaxMoney;

    if ( nChaosNeedMoney < 0 )
    {
        nChaosNeedMoney = 0;
    }

    if ( lpObj->Money < nChaosNeedMoney )
    {
        pMsg.Result = CB_NOT_ENOUGH_ZEN;
        
        DataSend(lpObj->m_Index, (BYTE *)&pMsg, pMsg.h.size);
        lpObj->ChaosLock = FALSE;

        return FALSE;
    }

    /////////////////////////////////////////////////////////////////////////////
    // Pobranie zawartości pralki                                              //
    /////////////////////////////////////////////////////////////////////////////

    for ( int n=0;n<CHAOS_BOX_SIZE;n++)
    {
        // sprawdzamy czy pole to na pewno przedmiot
        if ( lpObj->pChaosBox[n].IsItem() == TRUE )
        {

            if ( (lpObj->pChaosBox[n].m_Type >= ITEMGET(12,3) && lpObj->pChaosBox[n].m_Type <= ITEMGET(12,6))) 
            {
                if ( lpObj->pChaosBox[n].m_Level >= 9 && lpObj->pChaosBox[n].m_Option3 >= 1 )
                {
                    WingCount++;
                    WingIndex = n;
                }
            }
            else if ( lpObj->pChaosBox[n].m_Type == ITEMGET(13,30) ) // Cape of lord
            {
                if ( lpObj->pChaosBox[n].m_Level >= 9 && lpObj->pChaosBox[n].m_Option3 >= 1 )
                {
                    WingCount++;
                    WingIndex = n;
                }
            }
            else if ( lpObj->pChaosBox[n].m_Type == ITEMGET(12,15) ) // Chaos
            {
                ChoasGemCount++;
            }
            else if ( lpObj->pChaosBox[n].m_Type == ITEMGET(12,31) ) // Bundle of Soul
            {
                BundleOfSoulCount++;
            }
            else if ( lpObj->pChaosBox[n].m_Type == ITEMGET(14,22) ) // Jewel of Creation
            {
                JewelOfCreationCount++;
            }
            else if ( lpObj->pChaosBox[n].m_Type == ITEMGET(14,53) ) // Charm Of Luck
            {
                iCharmOfLuckCount += (int)lpObj->pChaosBox[n].m_Durability;
            }
            else if ( lpObj->pChaosBox[n].IsExtItem() == FALSE ) //Non Exc Item
            {
                if ( lpObj->pChaosBox[n].m_Level >= 7 && lpObj->pChaosBox[n].m_Option3 >= 1 )
                {
                    if ( gSetItemOption.IsSetItem(lpObj->pChaosBox[n].m_Type) != FALSE ) //Set Item
                    {
                        SetItemCount++;
                        iChaosMoney += lpObj->pChaosBox[n].m_BuyMoney;
                    }
                }
            }
        }
    }

    /////////////////////////////////////////////////////////////////////////////
    // Ustawienie nagłówka błędu                                               //
    /////////////////////////////////////////////////////////////////////////////

    PMSG_CHAOSMIXRESULT pMsg;

    PHeadSetB((LPBYTE)&pMsg.h, 0x86, sizeof(PMSG_CHAOSMIXRESULT));
    pMsg.Result = CB_ERROR;

    /////////////////////////////////////////////////////////////////////////////
    // Test 01                                                                 //
    /////////////////////////////////////////////////////////////////////////////

    if ( WingCount            == 1 && JewelOfCreationCount == 1 && 
         ChoasGemCount        == 1 && BundleOfSoulCount    == 1 &&
         JewelOfCreationCount == 1 && SetItemCount         == 1    )
    {

        if ( Random(0,99) < 100 )
        {

            // Czyscimy Chaos Goblina
            for (int n=0;n<CHAOS_BOX_SIZE;n++)
            {
                lpObj->pChaosBox[n].Clear();
            }

            // Tworzymy przedmiot !!!
            int iItemType    = 13;
            int iItemSubType = 53;

            int iWingNum = ITEMGET(iItemType, iItemSubType);
        
            ::ItemSerialCreateSend(lpObj->m_Index, -1, 0, 0, iWingNum, 0, 0, 0, 0, 0, -1, 0, 0);
            ::gObjInventoryCommit(lpObj->m_Index);
            
            LogAdd("[ThirdWing Mix][Level 01] [%s][%s] CBMix Success %d Money : %d-%d, CharmRate : %d",
            lpObj->AccountID, lpObj->Name, lpObj->ChaosSuccessRate, lpObj->Money, nChaosNeedMoney, iCharmOfLuckCount);

            return TRUE;

        }else{

            lpObj->Money  -= nChaosNeedMoney;
            g_CastleSiegeSync.AddTributeMoney(iChaosTaxMoney);
            GCMoneySend(lpObj->m_Index, lpObj->Money);

            // Czyscimy Chaos Goblina
            for (int n=0;n<CHAOS_BOX_SIZE;n++)
            {
                lpObj->pChaosBox[n].Clear();
            }

            GCUserChaosBoxSend(lpObj, 0);
            DataSend(lpObj->m_Index, (BYTE *)&pMsg, pMsg.h.size);
            
            LogAdd("[ThirdWing Mix][Level 01] [%s][%s] CBMix Fail %d Money : %d-%d, CharmRate : %d",
            lpObj->AccountID, lpObj->Name, lpObj->ChaosSuccessRate, lpObj->Money, nChaosNeedMoney, iCharmOfLuckCount);
    
            lpObj->ChaosLock = FALSE;

            return FALSE;

        }

    }else{

            lpObj->Money  -= nChaosNeedMoney;
            g_CastleSiegeSync.AddTributeMoney(iChaosTaxMoney);
            GCMoneySend(lpObj->m_Index, lpObj->Money);

            lpObj->ChaosLock = FALSE;
            pMsg.Result = CB_INCORRECT_MIX_ITEMS;
            DataSend(lpObj->m_Index, (BYTE *)&pMsg, pMsg.h.size);

            return FALSE;
    }

}
- look here: Random(0,99) < 100 you have change 100 to mix success %







Fix for GM Attack:


find all

Code:
if ( !IsGM(aIndex) || GMAttack )
change to

Code:
//if ( !IsGM(aIndex) || GMAttack )
or remove :)





HOW TO BLOCK AUTOKILL? (SERVER SIDE)
 
Last edited:
Play4Free™
Joined
Aug 8, 2007
Messages
469
Reaction score
277
thx i will check it all.

GMAttack writed by me =) but okey i will create some configs for it.

I cant check it now... server start up? no crashes end etc?
 
Newbie Spellweaver
Joined
Jan 3, 2009
Messages
85
Reaction score
1
remove compile errors.at serialcheck shows error.
 
Back
Top