Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Pytanie]NosTale edycja clienta


Remover

Rekomendowane odpowiedzi

Opublikowano

Cześć. Czy jest możliwość edytowania clienta? Tak jak w przypadku mt2 (rozpakowywanie file archiverem). Chciałbym sobie zmienić wygląd interface. Ale:

 

1. Nie wiem które pliki odpowiadają za wygląd interface.

2. Nie wiem jak te pliki rozpakować/edytować.

 

Czy ktoś się na tym zna? :D

Opublikowano

Ściągasz byle jaki język programowania najlepiej visual studio c++ 2013 , robisz nowy empty project i wklejasz ten
kod

Extractor

 

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 System::IO::Stream ^myStream;
				 OpenFileDialog ^openFileDialog1 = gcnew OpenFileDialog;

				 openFileDialog1->InitialDirectory = "C:\\Program Files (x86)\\GameforgeLive\\Games\\ITA_ita\\NosTale\\NostaleData\\";
				 openFileDialog1->Filter = "File NOS|*.NOS";
				 openFileDialog1->FilterIndex = 2;
				 openFileDialog1->RestoreDirectory = true;

				 if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
				 {
					 if ((myStream = openFileDialog1->OpenFile()) != nullptr)
					 {
						 this->f_Name = System::IO::Path::GetFileName(openFileDialog1->FileName);
						 this->f_Path = System::IO::Path::GetDirectoryName(openFileDialog1->FileName);
						 //
						 msclr::interop::marshal_context context;
						 std::string f_Full = context.marshal_as<std::string>(this->f_Path + "\\" + this->f_Name);
						 listBox2->Items->Add(gcnew String(f_Full.c_str()));
						 //
						 FILE *f;
						 if((f = fopen(f_Full.c_str(), "rb")) != NULL)
						 {
							 unsigned int amount, file_num;

							 fread(&amount, 1, 4, f);

							 f_nos *f_Nos = new f_nos[amount];
							 
							 for (int i = 0; i < amount; i++)
							 {
								 fread(&file_num, 1, 4, f);
								 fread(&f_Nos[file_num].name_len, 1, 4, f);
								 f_Nos[file_num].name = (char*) malloc(f_Nos[file_num].name_len + 1);
								 fread(f_Nos[file_num].name, 1, f_Nos[file_num].name_len, f);
								 f_Nos[file_num].name[f_Nos[file_num].name_len] = 0;
								 //
								 listBox1->Items->Add(gcnew String(f_Nos[file_num].name));
								 //
								 fread(&f_Nos[file_num].name_end, 1, 4, f);
								 fread(&f_Nos[file_num].buffer, 1, 4, f);
								 f_Nos[file_num].content = (unsigned char*) malloc(f_Nos[file_num].buffer+1);
								 fread(f_Nos[file_num].content, 1, f_Nos[file_num].buffer, f);
								 f_Nos[file_num].content[f_Nos[file_num].buffer] = 0;
							 }

							 fclose(f);
						 }
						 else
						 {
							 MessageBox::Show("Could not open " + this->f_Name + " /rb");
						 }

						 myStream->Close();
					 }
				 }
			 }

 

 

 

Decrypter

 

int decryptnosfile(unsigned char *cData, unsigned int f_buffer, unsigned char *cOut, unsigned int &nOut)
		{
		 static unsigned char table[] = { 0, 0x20,'-','.','0','1','2','3','4','5','6','7','8','9', 0x0d };

		 unsigned int i, offset, len;

		 unsigned char size, c;

		 len = f_buffer;

		 unsigned char *cBuffer;
		 cBuffer = (unsigned char*)malloc(f_buffer + 1);
		 memcpy(cBuffer, cData, f_buffer);

		 offset = nOut = 0;
 
		 while(offset < len
		 {
		 if(cBuffer[offset] == 0xFFu)
		 {
		 offset++;
		 *(cOut + nOut++) = 0x0d;
		 continue;
		 }

		 size = cBuffer[offset++];

		 i = 0;
		 if ((size & 0x80U) == 0) 
		 {
		 while ((i++ < size) && (offset < len))
		 {
		 *(cOut + nOut++) = (cBuffer[offset++] ^ 0x33U);
		 }
		 }
		 else
		 {
		 size &= 0x7FU;
		 while ((i < size) && (offset < len))
		 {
		 c = cBuffer[offset++];
 
		 *(cOut + nOut++) = (table[(c & 0xF0U) >> 4]);
		 if (table[c & 0x0FU] != 0)
		 *(cOut + nOut++) = table[c & 0x0FU];
 
		 i += 2;
		 }
		 }
		 }

		 free(cBuffer);
		 return offset;
		}

 

 

 

 

 

 

 

 

I debugujesz te 2 programy .

nostaleh.png
Opublikowano

 

Ściągasz byle jaki język programowania najlepiej visual studio c++ 2013 , robisz nowy empty project i wklejasz ten

kod

 

Extractor

 

 

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 System::IO::Stream ^myStream;
				 OpenFileDialog ^openFileDialog1 = gcnew OpenFileDialog;

				 openFileDialog1->InitialDirectory = "C:\\Program Files (x86)\\GameforgeLive\\Games\\ITA_ita\\NosTale\\NostaleData\\";
				 openFileDialog1->Filter = "File NOS|*.NOS";
				 openFileDialog1->FilterIndex = 2;
				 openFileDialog1->RestoreDirectory = true;

				 if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
				 {
					 if ((myStream = openFileDialog1->OpenFile()) != nullptr)
					 {
						 this->f_Name = System::IO::Path::GetFileName(openFileDialog1->FileName);
						 this->f_Path = System::IO::Path::GetDirectoryName(openFileDialog1->FileName);
						 //
						 msclr::interop::marshal_context context;
						 std::string f_Full = context.marshal_as<std::string>(this->f_Path + "\\" + this->f_Name);
						 listBox2->Items->Add(gcnew String(f_Full.c_str()));
						 //
						 FILE *f;
						 if((f = fopen(f_Full.c_str(), "rb")) != NULL)
						 {
							 unsigned int amount, file_num;

							 fread(&amount, 1, 4, f);

							 f_nos *f_Nos = new f_nos[amount];
							 
							 for (int i = 0; i < amount; i++)
							 {
								 fread(&file_num, 1, 4, f);
								 fread(&f_Nos[file_num].name_len, 1, 4, f);
								 f_Nos[file_num].name = (char*) malloc(f_Nos[file_num].name_len + 1);
								 fread(f_Nos[file_num].name, 1, f_Nos[file_num].name_len, f);
								 f_Nos[file_num].name[f_Nos[file_num].name_len] = 0;
								 //
								 listBox1->Items->Add(gcnew String(f_Nos[file_num].name));
								 //
								 fread(&f_Nos[file_num].name_end, 1, 4, f);
								 fread(&f_Nos[file_num].buffer, 1, 4, f);
								 f_Nos[file_num].content = (unsigned char*) malloc(f_Nos[file_num].buffer+1);
								 fread(f_Nos[file_num].content, 1, f_Nos[file_num].buffer, f);
								 f_Nos[file_num].content[f_Nos[file_num].buffer] = 0;
							 }

							 fclose(f);
						 }
						 else
						 {
							 MessageBox::Show("Could not open " + this->f_Name + " /rb");
						 }

						 myStream->Close();
					 }
				 }
			 }

 

 

Decrypter

int decryptnosfile(unsigned char *cData, unsigned int f_buffer, unsigned char *cOut, unsigned int &nOut)
		{
		 static unsigned char table[] = { 0, 0x20,'-','.','0','1','2','3','4','5','6','7','8','9', 0x0d };

		 unsigned int i, offset, len;

		 unsigned char size, c;

		 len = f_buffer;

		 unsigned char *cBuffer;
		 cBuffer = (unsigned char*)malloc(f_buffer + 1);
		 memcpy(cBuffer, cData, f_buffer);

		 offset = nOut = 0;
 
		 while(offset < len
		 {
		 if(cBuffer[offset] == 0xFFu)
		 {
		 offset++;
		 *(cOut + nOut++) = 0x0d;
		 continue;
		 }

		 size = cBuffer[offset++];

		 i = 0;
		 if ((size & 0x80U) == 0) 
		 {
		 while ((i++ < size) && (offset < len))
		 {
		 *(cOut + nOut++) = (cBuffer[offset++] ^ 0x33U);
		 }
		 }
		 else
		 {
		 size &= 0x7FU;
		 while ((i < size) && (offset < len))
		 {
		 c = cBuffer[offset++];
 
		 *(cOut + nOut++) = (table[(c & 0xF0U) >> 4]);
		 if (table[c & 0x0FU] != 0)
		 *(cOut + nOut++) = table[c & 0x0FU];
 
		 i += 2;
		 }
		 }
		 }

		 free(cBuffer);
		 return offset;
		}

 

 

 

 

 

 

 

I debugujesz te 2 programy .

 

 

 

Mam błąd:

C:\cpp\test.cpp|1|error: expected unqualified-id before 'private'|

||=== Build finished: 1 errors, 0 warnings ===|

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...