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!

RagII on Windows 10 (Can run up to Windows XP [maybe?])

Experienced Elementalist
Joined
Apr 10, 2011
Messages
207
Reaction score
24
234635641 - RagII on Windows 10 (Can run up to Windows XP [maybe?]) - RaGEZONE Forums

Thanks Endreo22, geralax88, LightRO3, Viserion. :sleep:

Compiling this client on Windows 10 (Originally, I worked on XP in a virtual machine, but it was very slow because it was a virtual machine. And 3D is not supported...) [I bought a computer.]
It works, but I can't connect to the server. (Logout error on every login attempt, whether due to an issue with Packet or other issues...)
I don't know which method to use but upload.
And this client deleted HackShield. (Remove or modify all related libraries and files)
But maybe this has something to do with why I can't log in?

Fixed. See other posts for tutorials.

And, this client runs without ragnarok2.exe.
However, to change the IP, change ragii.cni (modify ragii.ini in the source file, run inicrypt.exe ragii.ini and copy it to the client/System folder)
Or create a shortcut of RagII.exe and insert ServerIP=[Your IP] ServerPort=64000 and run it.

Res folder -> Files used in Saga client[my file]
Data, Help -> Files in the source code


(Pre-compiled client : I do not know when...)


(source code, If you want to compile this you will need : VS2005(C++)[VS higher versions require most of the source code modifications. I haven't tested VS2008.], Win 7(in XP) SDK[!], and Not required DirectX SDK and UT2004? SDK...[in the source code] :) )

Removed codes and packets of hshield, Modified codes of some bug(Graphic issue), Splash[company] video remove[logo.wmv, codes for play logo.wmv]

The program title window says ‘RagII / Edited by Kus’, but to change it, open Ragii.int in the System folder of the source code (Notepad++ or an editor that can read binary. Binary code exists.) Change the Product item and runCrypt.cmd run it. and copy System folder of client)

* Please see the above source code and let me know if there is anything that needs to be corrected.
I only removed Themida and HShield related stuff from the whole source.

* Sorry, bad english... :rolleyes:

* Links updated.
 

Attachments

You must be registered for see attachments list
Last edited:
Experienced Elementalist
Joined
Apr 10, 2011
Messages
207
Reaction score
24
Hmm, still getting the Packet error.

"Saga.Gateway.exe",Information,0,"Sending header token",,,,,,,
Network: Connection accepted from: 192.168.35.168:62519
"Saga.Gateway.exe",Warning,0,"Unsupported packet found with id: 7751",,,,,,,,
Network: Connection closed from: 192.168.35.168:62519

When the client tries to log in, it keeps shutting down.

Need to fix the server?
Or do I have to fix the client?
 
Last edited:
Experienced Elementalist
Joined
Jan 11, 2010
Messages
247
Reaction score
45
Hmm, still getting the Packet error.

"Saga.Gateway.exe",Information,0,"Sending header token",,,,,,,
Network: Connection accepted from: 192.168.35.168:62519
"Saga.Gateway.exe",Warning,0,"Unsupported packet found with id: 7751",,,,,,,,
Network: Connection closed from: 192.168.35.168:62519

When the client tries to log in, it keeps shutting down.

Need to fix the server?
Or do I have to fix the client?

Fix server.
 
Experienced Elementalist
Joined
Jan 11, 2010
Messages
247
Reaction score
45
okay. But I don't know how to fix the server.
I need to find a packet, but I can't figure out how to do it.

The emulator used packet encryption for the client, since the client source code works without packet encryption in the emulator, encryption must be turned off.
I studied the assembly emulator revised

First change key:
**\Shared\Saga.Shared\Cryptography\Crypto.cs

Code:
public static byte[] StaticKey = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
//public static byte[] StaticKey = { 0x40, 0x21, 0xBF, 0xE4, 0xB0, 0xC7, 0xB8, 0xF0, 0xB8, 0xA3, 0xB0, 0xDA, 0xC1, 0xF6, 0x24, 0x00 };

Second change
**\Saga.Gateway\Network\GatewayClient.cs

Code:
private void OnHeader()
        {
            Trace.TraceInformation("Header Recieved from {0}", this.socket.RemoteEndPoint);
            try
            {
                SMSG_IDENTIFY spkt2 = new SMSG_IDENTIFY();
                this.Send((byte[])spkt2);
                /*
                //byte[] tempServerKey = Encryption.GenerateKey();
                //byte[] expandedServerKey = Encryption.GenerateDecExpKey(tempServerKey);
                SMSG_SENDKEY spkt = new SMSG_SENDKEY();
                //spkt.Key = expandedServerKey;
                spkt.Collumns = 4;
                spkt.Rounds = 10;
                spkt.Direction = 2;
                this.Send((byte[])spkt);
                //this.serverKey = tempServerKey;*/
            }
            catch (Exception ex)
            {
                Trace.TraceError("An unhandled exception occured {0}", ex.Message);
                this.Close();
            }
        }

As an example of decrypting packages. Something similar can be done in the Saga Legacy version.
 
Experienced Elementalist
Joined
Apr 10, 2011
Messages
207
Reaction score
24
The emulator used packet encryption for the client, since the client source code works without packet encryption in the emulator, encryption must be turned off.
I studied the assembly emulator revised

First change key:
**\Shared\Saga.Shared\Cryptography\Crypto.cs

Code:
public static byte[] StaticKey = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
//public static byte[] StaticKey = { 0x40, 0x21, 0xBF, 0xE4, 0xB0, 0xC7, 0xB8, 0xF0, 0xB8, 0xA3, 0xB0, 0xDA, 0xC1, 0xF6, 0x24, 0x00 };

Second change
**\Saga.Gateway\Network\GatewayClient.cs

Code:
private void OnHeader()
        {
            Trace.TraceInformation("Header Recieved from {0}", this.socket.RemoteEndPoint);
            try
            {
                SMSG_IDENTIFY spkt2 = new SMSG_IDENTIFY();
                this.Send((byte[])spkt2);
                /*
                //byte[] tempServerKey = Encryption.GenerateKey();
                //byte[] expandedServerKey = Encryption.GenerateDecExpKey(tempServerKey);
                SMSG_SENDKEY spkt = new SMSG_SENDKEY();
                //spkt.Key = expandedServerKey;
                spkt.Collumns = 4;
                spkt.Rounds = 10;
                spkt.Direction = 2;
                this.Send((byte[])spkt);
                //this.serverKey = tempServerKey;*/
            }
            catch (Exception ex)
            {
                Trace.TraceError("An unhandled exception occured {0}", ex.Message);
                this.Close();
            }
        }

As an example of decrypting packages. Something similar can be done in the Saga Legacy version.

good. I changed the server, but it still doesn't work.
What am I supposed to do here?

"Saga.Gateway.exe",Information,0,"Sending header token",,,,,,,
Network: Connection accepted from: 192.168.0.2:51510
"Saga.Gateway.exe",Warning,0,"Unsupported packet found with id: 7751",,,,,,,
Network: Connection closed from: 192.168.0.2:51510
 
Experienced Elementalist
Joined
Jan 11, 2010
Messages
247
Reaction score
45
good. I changed the server, but it still doesn't work.
What am I supposed to do here?

Disable encryption in client source code:

***\src\Launch\Src\Launch.cpp

Code:
/*if (!gs_pHShieldManager->Init())
		{
			gs_pHShieldManager->Clear();
			return 0;
		}

		if (!gs_pHShieldManager->StartService())
		{
			gs_pHShieldManager->Clear();
			return 0;
		}

		if (gs_pHShieldManager->SaveSafeFunc(MainLoop, 1) != 0)
		{
			gs_pHShieldManager->Clear();
			return 0;
		}*/

And
***\src\Engine\Src\HShieldManager.cpp
***\src\Engine\Inc\HShieldManager.h

Disable your solution configuation:

#if defined _RAG2_TESTSERVER || defined _RAG2_SERVICE || defined _DEBUG

Rebuild Engine.dll and RagII.exe



The server also updated the source code, check it, since not everything has been written before that needs to be corrected.

https://github.com/geralex/saga-revised/commit/74434521dee9ed9ebb37160f1ecf6ace6472c745
 
Experienced Elementalist
Joined
Apr 10, 2011
Messages
207
Reaction score
24
Disable encryption in client source code:

***\src\Launch\Src\Launch.cpp

Code:
/*if (!gs_pHShieldManager->Init())
		{
			gs_pHShieldManager->Clear();
			return 0;
		}

		if (!gs_pHShieldManager->StartService())
		{
			gs_pHShieldManager->Clear();
			return 0;
		}

		if (gs_pHShieldManager->SaveSafeFunc(MainLoop, 1) != 0)
		{
			gs_pHShieldManager->Clear();
			return 0;
		}*/

And
***\src\Engine\Src\HShieldManager.cpp
***\src\Engine\Inc\HShieldManager.h

Disable your solution configuation:

#if defined _RAG2_TESTSERVER || defined _RAG2_SERVICE || defined _DEBUG

Rebuild Engine.dll and RagII.exe



The server also updated the source code, check it, since not everything has been written before that needs to be corrected.


***\src\Engine\Src\HShieldManager.cpp
***\src\Engine\Inc\HShieldManager.h

These two files have already been modified.

Launch.cpp was unexpected.
Let's try it.

(Will re-upload if successful.)



Finally someone managed to compile this client. :)

What do you mean by partially compiled? Any libs missing or giving trouble compiling?

This means that obj files or exp files are output when the entire compilation is originally completed, but after the file size is created, it becomes very large, so it is difficult to upload. (The capacity of the file upload site is insufficient.)
So I removed the Output folder and uploaded it. (Partial compilation means this... But I'm sorry for the misunderstanding.) Compilation works very well.
The compressed file uploaded later is the version without removing the Output folder. (Organize the upload site and re-upload)
(* However, these sources do not compile in VS2005 and later versions. I tried to compile in VS2022 version, but an error occurred again. I had to change the source code as a whole, but there was not enough time.)

And, the success of this compilation is not my success, but the success of everyone here.
Without the help of these people, I might not have succeeded...

(Sorry, bad english)
 
Last edited:
Experienced Elementalist
Joined
Apr 10, 2011
Messages
207
Reaction score
24
ClientKick spkt2 = new ClientKick();

An error occurs because this function does not exist.
Where is this?

How do I add it?
 
Experienced Elementalist
Joined
Jan 11, 2010
Messages
247
Reaction score
45
ClientKick spkt2 = new ClientKick();

An error occurs because this function does not exist.
Where is this?

How do I add it?

Fix. There was an attempt to implement a character change. Commit git - check it.

And I fix correct display of locations:

before

Kang Jinsu - RagII on Windows 10 (Can run up to Windows XP [maybe?]) - RaGEZONE Forums


after

Kang Jinsu - RagII on Windows 10 (Can run up to Windows XP [maybe?]) - RaGEZONE Forums


How fix - change client source:

***\src\Core\Inc\UnMath.h

change

Code:
#if ASM && !_DEBUG

to

Code:
#if ASM && _DEBUG

and rebuild..
 
Experienced Elementalist
Joined
Apr 10, 2011
Messages
207
Reaction score
24
Fix. There was an attempt to implement a character change. Commit git - check it.

And I fix correct display of locations:

before

Kang Jinsu - RagII on Windows 10 (Can run up to Windows XP [maybe?]) - RaGEZONE Forums


after

Kang Jinsu - RagII on Windows 10 (Can run up to Windows XP [maybe?]) - RaGEZONE Forums


How fix - change client source:

***\src\Core\Inc\UnMath.h

change

Code:
#if ASM && !_DEBUG

to

Code:
#if ASM && _DEBUG

and rebuild..

Success. Thank you ^_^


Now I just need to fix this...



SkeletalMesh Rag2Weapons.NM_U_WP_N_1001: Serial size mismatch: Got 23808, Expected 23816

History: LoadObject <- (SkeletalMesh Rag2Weapons.NM_U_WP_N_1001 708676==708676/8332201 684868 23816) <- ULinkerLoad::preload <- PreLoadObjects <- UObject::EndAsyncLoad(WHILE) <- UObject::EndAsyncLoad <- UObject::StaticLoadObject <- (Engine.Mesh Rag2Weapons.NM_U_WP_N_1001 NULL) <- ARag2Player::AttachWeapon <- ARag2Player::Weapon_LinkMesh <- FDynamicActor::Render <- FActorSceneNode::Render <- UShadowBitmapMaterial::Get <- FD3D9RenderInterface::SetProjectorMaterial <- FD3D9RenderInterface::SetMaterial <- ATerrainInfo::Render::RenderProjectors <- ATerrainInfo::Render <- RenderLevel <- FLevelSceneNode::Render <- FPlayerSceneNode::Render <- UGameEngine::Draw <- UWindowsViewport::Repaint <- UWindowsClient::Tick <- ClientTick <- UGameEngine::Tick <- UpdateWorld <- MainLoop

Umm...

I think the client's resource files (Res folder) are not compatible.
It seems that the version of HShield is different from the version of the source code.

... It is not. sorry. :$:
 
Last edited:
Experienced Elementalist
Joined
Jan 11, 2010
Messages
247
Reaction score
45
Success. Thank you ^_^


Now I just need to fix this...



SkeletalMesh Rag2Weapons.NM_U_WP_N_1001: Serial size mismatch: Got 23808, Expected 23816

History: LoadObject <- (SkeletalMesh Rag2Weapons.NM_U_WP_N_1001 708676==708676/8332201 684868 23816) <- ULinkerLoad::preload <- PreLoadObjects <- UObject::EndAsyncLoad(WHILE) <- UObject::EndAsyncLoad <- UObject::StaticLoadObject <- (Engine.Mesh Rag2Weapons.NM_U_WP_N_1001 NULL) <- ARag2Player::AttachWeapon <- ARag2Player::Weapon_LinkMesh <- FDynamicActor::Render <- FActorSceneNode::Render <- UShadowBitmapMaterial::Get <- FD3D9RenderInterface::SetProjectorMaterial <- FD3D9RenderInterface::SetMaterial <- ATerrainInfo::Render::RenderProjectors <- ATerrainInfo::Render <- RenderLevel <- FLevelSceneNode::Render <- FPlayerSceneNode::Render <- UGameEngine::Draw <- UWindowsViewport::Repaint <- UWindowsClient::Tick <- ClientTick <- UGameEngine::Tick <- UpdateWorld <- MainLoop

Umm...

Try fix it client source and rebuild:

***\src\Engine\Inc\UnSkeletalMesh.h

Code:
//
// Skeletal mesh.
//

class ENGINE_API USkeletalMesh : public ULodMesh
{

...

	// Set of UModels that correspond to the BoneCollisionBoxes array.
	// These have ULodMesh::DrawScale baked in.
	TArray <UModel*>			BoneCollisionBoxModels; 
	
[B]//ADD THIS CODE::
	FLOAT TestCollisionRadius;
	FLOAT TestCollisionHeight;[/B]

	// Karma version of collision data (taken from reference pose). 
	// Used for PHYS_Karma with skeletal meshes (not PHYS_KarmaRagDoll!)
	// This has the ULodMesh::DrawScale baked in.
	UKMeshProps*				KPhysicsProps;	

#ifdef __PSX2_EE__
	void* PS2Data;
#endif

...

And ***\src\Engine\Src\UnSkeletalMesh.cpp

Code:
// Collision
	if( Ar.Ver() >= 124 )
	{
		Ar << KPhysicsProps;
		Ar << BoneCollisionSpheres;
		Ar << BoneCollisionBoxes;
	}

	if( Ar.Ver() >= 125 )
	{
		Ar << BoneCollisionBoxModels;
	}
	
[B]//ADD HERE CODE!!!
	//Data/Res Version 126
	if( Ar.Ver() >= 131 )
	   {
		   Ar << TestCollisionRadius;
		   Ar << TestCollisionHeight;
	   }[/B]


	unguardobj;
}
 
Last edited:
Experienced Elementalist
Joined
Apr 10, 2011
Messages
207
Reaction score
24
Try fix it client source and rebuild:

***\src\Engine\Inc\UnSkeletalMesh.h

Code:
//
// Skeletal mesh.
//

class ENGINE_API USkeletalMesh : public ULodMesh
{

...

	// Set of UModels that correspond to the BoneCollisionBoxes array.
	// These have ULodMesh::DrawScale baked in.
	TArray <UModel*>			BoneCollisionBoxModels; 
	
[B]//ADD THIS CODE::
	FLOAT TestCollisionRadius;
	FLOAT TestCollisionHeight;[/B]

	// Karma version of collision data (taken from reference pose). 
	// Used for PHYS_Karma with skeletal meshes (not PHYS_KarmaRagDoll!)
	// This has the ULodMesh::DrawScale baked in.
	UKMeshProps*				KPhysicsProps;	

#ifdef __PSX2_EE__
	void* PS2Data;
#endif

...

And ***\src\Engine\Src\UnSkeletalMesh.cpp

Code:
// Collision
	if( Ar.Ver() >= 124 )
	{
		Ar << KPhysicsProps;
		Ar << BoneCollisionSpheres;
		Ar << BoneCollisionBoxes;
	}

	if( Ar.Ver() >= 125 )
	{
		Ar << BoneCollisionBoxModels;
	}
	
[B]//ADD HERE CODE!!!
	//Data/Res Version 126
	if( Ar.Ver() >= 131 )
	   {
		   Ar << TestCollisionRadius;
		   Ar << TestCollisionHeight;
	   }[/B]


	unguardobj;
}

It's been resolved. thank you :):

But there is an error on the server...


MySql.Data.MySqlClient.MySqlException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'rg2db.list_quests.QuestId' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
위치: MySql.Data.MySqlClient.MySqlStream.OpenPacket()
위치: MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
위치: MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
위치: MySql.Data.MySqlClient.MySqlDataReader.NextResult()
위치: MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
위치: MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
위치: Saga.Map.Data.Mysql.MysqlProvider.<GetPersonalAvailableQuestsByRegion>d__f.MoveNext()
위치: CommonFunctions.RefreshPersonalRequests(Character target) 파일 c:\Users\Kustale\Desktop\saga-revised-master\Saga.Map\Utils\Library\CommonFunctions.cs:줄 236
위치: Saga.Map.Client.Client.CM_CHARACTER_MAPLOADED() 파일 c:\Users\Kustale\Desktop\saga-revised-master\Saga.Map\Netwok\Client\Client Misc Movement.cs:줄 50
Release session
Release session
System.ArgumentNullException: 값은 null일 수 없습니다.
매개 변수 이름: obj
위치: System.GC.ReRegisterForFinalize(Object obj)
위치: Saga.Map.Client.Client.Client_OnClose(Object sender, EventArgs e) 파일 c:\Users\Kustale\Desktop\saga-revised-master\Saga.Map\Netwok\Client\Client-Core.cs:줄 101

MySQL problem...
Let's change it.

-- Update --

Success. :):


Uh... Is this unavoidable...? :s:
 
Last edited:
Experienced Elementalist
Joined
Jan 11, 2010
Messages
247
Reaction score
45
It's been resolved. thank you :):

But there is an error on the server...


MySql.Data.MySqlClient.MySqlException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'rg2db.list_quests.QuestId' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
위치: MySql.Data.MySqlClient.MySqlStream.OpenPacket()
위치: MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
위치: MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
위치: MySql.Data.MySqlClient.MySqlDataReader.NextResult()
위치: MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
위치: MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
위치: Saga.Map.Data.Mysql.MysqlProvider.<GetPersonalAvailableQuestsByRegion>d__f.MoveNext()
위치: CommonFunctions.RefreshPersonalRequests(Character target) 파일 c:\Users\Kustale\Desktop\saga-revised-master\Saga.Map\Utils\Library\CommonFunctions.cs:줄 236
위치: Saga.Map.Client.Client.CM_CHARACTER_MAPLOADED() 파일 c:\Users\Kustale\Desktop\saga-revised-master\Saga.Map\Netwok\Client\Client Misc Movement.cs:줄 50
Release session
Release session
System.ArgumentNullException: 값은 null일 수 없습니다.
매개 변수 이름: obj
위치: System.GC.ReRegisterForFinalize(Object obj)
위치: Saga.Map.Client.Client.Client_OnClose(Object sender, EventArgs e) 파일 c:\Users\Kustale\Desktop\saga-revised-master\Saga.Map\Netwok\Client\Client-Core.cs:줄 101



-- Update --

Success. :):


Uh... Is this unavoidable...? :s:

I don't have such a problem. Will have to think about it. Can you upload your Res folder?
 
Back
Top