PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] Source 

Newbie Spellweaver
Joined
Dec 28, 2023
Messages
20
Reaction score
62
Hello, everyone.

I'm here to share a source derived from FortressPT which gave rise to Priston Tale EU.
This source is from Season 3, so you'll see some new things here, such as character skills, character info, quests, premium timers, npc, monsters, drop.. in the sql.

What's in the project?
  • Project source (Game and Server)
  • Client files
  • Server files
  • SQL DBs
  • Clan System
You'll need Visual Studio 2022 v143 with sdk version 10.0.22621.0 to be able to compile both projects. And for sql you should use and

Important:
  • You should have at least a little programming experience to work with the source.
  • The list of server commands can be found in the servercommand.cpp in the Server solution and ChatGame.cpp in the Game solution.
  • The client's ip to configure can be found in the Game solution globals.h
  • The server's ip will be configured in the server.ini file in the game-server and login-server folders.
  • The gm is configurable via sql in the db UserDB->UserInfo. Set GameMasterType to 1 and GameMasterLevel to 4, as soon as you log in with the ingame account the server will tell you that the gm is active and the gm's level, in this case level 4.

ATENTION:
  • The server is separated into 2, one is the login server and the other is the game server.
  • the login server handles the account user and everything related to the character, while the game server handles everything related to the game (npc, mobs, drop...)
  • so, whenever you compile the server, you should put the server dll in the login server and game server folders.
  • the game server connects to the login server and then the login server connects to the game server, so you need to follow the startup order: first start the login server and then the game server.

if you need devs or bug fixes for the source, you can contact me on Discord: behind1

Download (Source-code and files *Some bug fixes):


Thanks to the project collaborators:
  • Joao "Prog" Vitor (HiddenUserHere)
  • Mateus "Cackto" Tonon (3dfx)
  • Igor Segalla (Slave)
  • Nivaldo Carvalho (Ices)
  • Teylor (Zaryad)
  • Guilherme Disegna (Thor)
  • Adolpho Pizzolio (HaDDeR)
  • Thiago Fretola (Keshy)
  • Justin (Chaos)
  • Vinicius Rodrigues (vinixD)
  • Danilo Milo
  • Ana Carolina (Cah)
  • Vincent Maraschin (Neog)
  • Sebastian Cavazzoli
  • Federica Saphir (Feddy)
  • Recca
 
Last edited:
Thanks for sharing, I was trying to use the previous files. It's lucky you shared it now.
1734273393426 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums


1734273606224 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums
1734273634820 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums


help me
 
Last edited:
Thank you for sharing. I made the same mistake as the brothers above and am seeking help.
 
hello, saokizayta1, YongHai

look for the SendLoginData function in GameCore.cpp of the Game solution and replace it with this one:

void GameCore::SendLoginData()
{
PacketLoginUser sPacket;
ZeroMemory(&sPacket, sizeof(PacketLoginUser));
sPacket.iLength = sizeof(PacketLoginUser);
sPacket.iHeader = PKTHDR_LoginUser;
sPacket.dwUnk[0] = sPacket.dwUnk[1] = sPacket.dwUnk[2] = 0;
STRINGCOPY(sPacket.szUserID, trim(std::string((char*)0x039033E8)).c_str());
STRINGCOPY(sPacket.szPassword, trim(std::string((char*)0x039032E8)).c_str());

sPacket.uWidthScreen = GetSystemMetrics( SM_CXSCREEN );
sPacket.uHeightScreen = GetSystemMetrics( SM_CYSCREEN );

sPacket.iSystemOS = SYSTEM->GetSystemOS();
sPacket.iVersion = GAME_VERSION;

//Hardware ID
CWMIReader* pcWMIReader = new CWMIReader();
STRINGCOPY(sPacket.szHardwareID, pcWMIReader->GetHardwareID().c_str());

//PC Name
sPacket.szPCName[0] = 0;
DWORD dwSize = 32;
GetComputerNameA( sPacket.szPCName, &dwSize );

// Mac Address
{
UUID uuid;

// Ask OS to create UUID
UuidCreateSequential( &uuid );

// Bytes 2 through 7 inclusive
sprintf_s( sPacket.szMacAddr, 20, "%02X-%02X-%02X-%02X-%02X-%02X",
uuid.Data4[ 2 ], uuid.Data4[ 3 ], uuid.Data4[ 4 ], uuid.Data4[ 5 ], uuid.Data4[ 6 ], uuid.Data4[ 7 ] );
}

//HD Serial
{
char szHD[4];

szHD[0] = 'C';
szHD[1] = ':';
szHD[2] = '\\';
szHD[3] = 0;

GetVolumeInformationA( szHD, NULL, 0, &sPacket.dwSerialHD, NULL, NULL, NULL, 0 );

//Video Name
STRINGCOPY( sPacket.szVideoName, GRAPHICENGINE->GetVideoName().c_str() );
}

SENDPACKETL( &sPacket );
}


After that, you'll have to modify the Server Solution as well.

You need to look for the function: ProcessAccountLogin in accountserver.cpp in the Server solution.

Once this is done, you will look for this reference:
//Set Random Ticket Number

You should leave the scope of the code as in the image below:
1734288644257 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums



Once you've done that, while still in the Server solution, go to the file: packetserver.cpp

and in the AnalyzePacket function, look for this reference: /// Inter server exception

Once you've done that, you'll delete all the code I've selected in the image below:

1734288833099 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums


This will solve the problem.
 
Last edited:
How do I compile the game server to connect to my server? Sorry, im extremely new to this
 
Thank you for your tutorial, I did everything, but when I entered the game, it prompted 'Disconnected from Server' (2)

Game Server prompt [WARN] [PLAYER] WRONG WORLD Auth

I'm really sorry, I only have a little bit of operational ability in compiling, and I don't have the ability to find problems
 
Last edited:
hello, YongHai

look for the package: PKTHDR_WorldLoginAuth in packetserver.cpp and delete what I commented in the attachment.
1734330576824 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums
 
Wonderful ^^

if you need dev or bug fixes for the source, add me on Discord: behind1
 
Last edited:
hello, saokizayta1, YongHai

look for the SendLoginData function in GameCore.cpp of the Game solution and replace it with this one:




After that, you'll have to modify the Server Solution as well.

You need to look for the function: ProcessAccountLogin in accountserver.cpp in the Server solution.

Once this is done, you will look for this reference:
//Set Random Ticket Number

You should leave the scope of the code as in the image below:
View attachment 272962


Once you've done that, while still in the Server solution, go to the file: packetserver.cpp

and in the AnalyzePacket function, look for this reference: /// Inter server exception

Once you've done that, you'll delete all the code I've selected in the image below:

View attachment 272965

This will solve the problem.
1734340033022 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums

I am having this error.
 
1734362668404 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums
1734362739440 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums


I create item by command /getitem then the parameter is very unusual. Different from command /getitemold.

I can't find function to call Pet. in previous versions it will be /mymonster "Monter Name"

What is the function of button K?
 
hello, saokizayta1

Add this function to servercommand.cpp:

C++:
if ( iLen = COMMAND( "/MonCreate", pszBuff ) || COMMAND("/moncreate", pszBuff))
{
    if (GetParameterString(pszBuff, 1, szCommandParam1))
    {
        int iMonsterCount = 1;
        if (GetParameterString(pszBuff, 2, szCommandParam2))
            iMonsterCount += atoi(szCommandParam2);

        for (int i = 0; i < iMonsterCount; i++)
        {
            // randomize the positions, so that one is not born on top of the other
            Point3D sPosition = pcUserData->sPosition;
            sPosition.iX += rand() % (128 << 8);
            sPosition.iZ += rand() % (128 << 8);

            sPosition.iX -= 64 << 8;
            sPosition.iZ -= 64 << 8;

            UNITSERVER->CreateUnitEnemy(szCommandParam1, sPosition.iX, sPosition.iY, sPosition.iZ);
        }
    }
    else
        CHATSERVER->SendChatEx(pcUser, CHATCOLOR_Error, "> Use: /MonCreate <mobName> <amount>");

    return TRUE;
}

How to use?
/moncreate "Hopy" "10"

this command will create 10 Hopy


if you want devs or bug fixes add me on discord: *censored*
 
Last edited by a moderator:
Good day everyone! I just wanted to know how to fix this error as trying to compile the game.exe, any advice? Thank you!
1734400033161 - PTEU Source Code S3 [Updated 03-23-2025 - VS 2022] - RaGEZONE Forums
 
hello, wiickeddude

you need to include the sdk Include directory in the project's include dependencies and include the sdk libs directory in the library dependencies in the project's solution configuration
 
hello, osh2393
you can use the command: /SkipTier <tier_number>

example:
/SkipTier 3

all command lists are in the ChatGame.cpp file in the Game solution and in servercommand.cpp in the Server solution
 
hello, osh2393
you can use the command: /SkipTier <tier_number>

example:
/SkipTier 3

all command lists are in the ChatGame.cpp file in the Game solution and in servercommand.cpp in the Server solution
Thank you for your reply~~
 
Back