Download the tool
GWFreaks.com - The Tools for Guild Wars Freaks
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » GWFreaks Tools » Support » Decoding template codes


Decoding template codesExpand / Collapse
Author
Message
Posted 11/20/2006 6:09:14 AM
Newbie Freak

Newbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie Freak

Group: Forum Members
Last Login: 11/21/2006 12:42:02 PM
Posts: 2, Visits: 5
Hi, was just wondering if you would be willing to share the method you use to decode the template codes into builds. I run a hobby site, mainly for my own coding practise, and would love to know the process by which you decode the new template codes into actual builds. I notice that your tool can both encode and decode the templates.

Also noticed that gwshack you can submit builds by entering the code, which is a feature i would like to have on my site. If you want to look at the site its at http://www.gwbuilds.net/

Ta
Post #1606
Posted 11/20/2006 7:15:56 AM
Junior Freak

Junior FreakJunior FreakJunior FreakJunior FreakJunior FreakJunior FreakJunior FreakJunior Freak

Group: Forum Members
Last Login: 1/2/2009 5:41:35 AM
Posts: 69, Visits: 1,358
The method is fairly simple, just takes a bit of guess and check to get the actual formula that is used by Area Net.

It goes something like this:

Convert the ASCII string that is in the Template File to binary using a conversion formula
Ignore the first 6 entries which will be always '0'
Next 4 are the Primary Class
Next 4 are the Secondary Class

Next 4 is the Number of attributes
Next 4 is the +size of attribute ID's for number of attributes

for the number of attributes
Next 4 + '+size of attribute ID' are the Attribute
Next 4 are the value of the Attribute

Next 4 is the '+size of skill ID's' for number of skills(8)

for the number of skills (8)
Next 8 + '+size of size ID' are the Skill's
Post #1607
Posted 11/20/2006 7:19:50 AM
Junior Freak

Junior FreakJunior FreakJunior FreakJunior FreakJunior FreakJunior FreakJunior FreakJunior Freak

Group: Forum Members
Last Login: 1/2/2009 5:41:35 AM
Posts: 69, Visits: 1,358
The conversion formula is:

char LookupValue(char i)
{
if ( i >= 'A' && i <= 'Z' )
return i-'A';
if ( i >= 'a' && i <= 'z' )
return ('Z'-'A'+1)+i-'a';
if ( i >= '0' && i <= '9' )
return ('Z'-'A'+1)+('z'-'a'+1)+i-'0';
if ( i == '+' )
return 62;
if ( i == '/' )
return 63;
return 0;
}
Post #1608
Posted 11/20/2006 8:05:22 AM
Newbie Freak

Newbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie FreakNewbie Freak

Group: Forum Members
Last Login: 11/21/2006 12:42:02 PM
Posts: 2, Visits: 5
Excellent, thanks for the information and prompt reply, I'll give it a go!
Post #1609
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Zyo, Maligor, Sweet

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 4:50pm

Powered By InstantForum.NET v4.1.1 © 2009
Execution: 0.563. 17 queries. Compression Enabled.