Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 20:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



unfinished itemtype editor

Discussion on unfinished itemtype editor within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
unfinished itemtype editor

this is unfinished itemtype editor i was trying to code
there is something wrong with encoding which i don't have time to search and figure it out
size goes from 3-4 mb to 8 mb after decryption
and whenever i decrypt it with other tool i find it fully functional (no idea what the fuck happens)
fix it then it's your's
please bother to lemme know what was wrong with the encoding

here is some codes and find the whole project in attachments
dat crypto class

form1

find the whole project in attachment

currently the editing of items is fully functional , use any other external tool to encrypt / decrypt

and yes i know that isn't the best way to code this shit
Attached Files
File Type: rar ItemType.rar (70.1 KB, 49 views)
go for it is offline  
Old 03/10/2013, 02:43   #2
 
elite*gold: 0
Join Date: Sep 2012
Posts: 51
Received Thanks: 32
Quote:
Originally Posted by go for it View Post
this is unfinished itemtype editor i was trying to code
there is something wrong with encoding which i don't have time to search and figure it out
size goes from 3-4 mb to 8 mb after decryption
and whenever i decrypt it with other tool i find it fully functional (no idea what the **** happens)
fix it then it's your's
please bother to lemme know what was wrong with the encoding
You can take a look at my code, I released just after reading you here:


EDIT: Reviewed a bit of your code. Found an error in "Form1.cs" at line 228:
Code:
DatCrypto dc = new DatCrypto(2537);
It should be:
Code:
DatCrypto dc = new DatCrypto(0x2537);
EDIT2: Why are you using "Encoding.UTF7"? I think that could be the reason why size goes from 3-4 mb to 8 mb after decryption. Try using "Encoding.ASCII"...
urgabel is offline  
Thanks
1 User
Old 03/10/2013, 06:25   #3
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
Quote:
Originally Posted by urgabel View Post
You can take a look at my code, I released just after reading you here:


EDIT: Reviewed a bit of your code. Found an error in "Form1.cs" at line 228:
Code:
DatCrypto dc = new DatCrypto(2537);
It should be:
Code:
DatCrypto dc = new DatCrypto(0x2537);
EDIT2: Why are you using "Encoding.UTF7"? I think that could be the reason why size goes from 3-4 mb to 8 mb after decryption. Try using "Encoding.ASCII"...

well nope the method doesn't really care about sending it in a hex format and i saw how it encrypt and decrypt so it wasn't really error or anything, but yup i knew problem was with encoding but never knew much about encoding and prolly you got it right , will test it when i wake up , if it worked fine ill release it's executable and sure will give you credit
you may also release the exe and give me credit as im kinda busy atm
thanks buddy and if you got bit more of time please pm me or something letting me know bit more about encoding thanks bud
go for it is offline  
Old 03/10/2013, 09:17   #4
 
elite*gold: 0
Join Date: Sep 2012
Posts: 51
Received Thanks: 32
Quote:
Originally Posted by go for it View Post
if you got bit more of time please pm me or something letting me know bit more about encoding thanks bud
When you read or write Strings (or chars), plain ASCII uses 1 byte (8 bits) for every char. With 1 byte you can represent 256 possible chars. First 128 are common (and english uses just that), and last 128 was used in past to represent different languages signs. For example:
- spanish "ñ" "Ñ" or "á" "é"...
- french "ç" "Ç" or "à" "è" ...
- german "ß" "ö" "ü"

Each code from 128 to 255 represents different chars depending on the language, so we need to use the appropriate PageCode to read not plain text; otherwise we will read weird symbols instead of the correct text.

Modern software uses UTF encoding (Universal character set Transformation Format), by using more than 1 byte to represent each character except the common ones (the first 128 from ASCII). There are several implementations of UTF (UTF7, UTF8, UTF16...), each one using different amount of data for each character. UTF8 is the most commonly used.

As our beloved games from TQ does not use UTF, we need to know if the files we want to use are just plain ASCII text (in case of english / international clients) or certain language. I'm playing Heroes of Might and Magic Online, which uses Simplified Chinese encoding; that means some text is readable (english one) and some text (chinese text) needs to be read with the right encoding ("GB18030" = Page Code 54936).

I saw a Conquer ItemType.dat file and found no weird text, all is plain ASCII, but it could depend on the client you use.
To avoid extra effort in programming, I declare 2 encoders as constants, and never use fixed encodings in my code; I use these constants. That way is a lot easier to extend the code usage in case I need to replace the encoding.

Code:
public static Encoding enc = Encoding.GetEncoding(54936);
public static Encoding asciiEnc = Encoding.ASCII;
If I need to read plain text, I use asciiEnc; if I need to read chinese text, I use enc.

I'm not sure what could I tell more, but ask anything you need...

EDIT: I almost forgot something that gave me headaches: In TextBox or Label you can use only plain text. To see another texts you need to use RichTextBox. The debugger in Visual Studio does not show rich text, so I thought for a long time my code was not working well...
urgabel is offline  
Thanks
1 User
Old 03/10/2013, 10:51   #5
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
Quote:
Originally Posted by urgabel View Post
When you read or write Strings (or chars), plain ASCII uses 1 byte (8 bits) for every char. With 1 byte you can represent 256 possible chars. First 128 are common (and english uses just that), and last 128 was used in past to represent different languages signs. For example:
- spanish "ñ" "Ñ" or "á" "é"...
- french "ç" "Ç" or "à" "è" ...
- german "ß" "ö" "ü"
One thing. The first 128 are not common. The first 31's are non-displayable. 32-126 is the regular character set. 127 is DEL.

128+ is extended.
Super Aids is offline  
Thanks
1 User
Old 03/11/2013, 01:32   #6
 
elite*gold: 0
Join Date: Mar 2013
Posts: 4
Received Thanks: 0
Thanks ,
Hithuman is offline  
Old 03/11/2013, 14:28   #7
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
thanks urgabel and bass that was good enough to go
go for it is offline  
Reply


Similar Threads Similar Threads
Itemtype RAW Editor
11/30/2009 - CO2 Exploits, Hacks & Tools - 3 Replies
Itemtype.dat RAW Editor by Bajotumn.com http://www.bajotumn.com/pictures/ItemtypeRAWEdito r-v1.0.0.1-Screenshot.png http://www.bajotumn.com/pictures/ItemtypeRAWEdito r-v1.0.0.1-PopulatedList-Screenshot.png I call it a RAW editor because it gives you a datagrid of values, RAW data for you to edit...have fun, And give credit where credit is due, fuckers. No need to encrypt or decrypt, uses my encryption and decryption class. YOU NEED .NET 2.0 Framework If you don't already have it punch...



All times are GMT +1. The time now is 20:28.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.