Guild Wars Template Parser library for php

This branch is currently under construction, what I hope to achieve is complete replication of the objects that I created in .NET for parsing Guild Wars templates in php.

Usage:

It is very easy to use. Firstly copy the files into your project and add an include reference to ‘common.php;. Next create a new instance of the parser you require. Then call the CreateTemplateCode or ParseTemplateCode methods as required.

// Create an instance of the parser
$parser = new SkillBuildParser();

// Now call the desired methods for parsing the template code
$skillsBuild = $parser->ParseTemplateCode('OwAT043A5JjsR0I3tp/m2mITAA');

// Now you can use the Build object to read the skills from
foreach($skillsBuild->SkillIds as $skillId)
{
    echo sprintf("SkillId: %s", $skillId);
}

Download the source code

2 Comments

  1. David says:

    Are the files coming? I’d find it really useful to see how you’ve handled the bit-parsing :)

  2. Logaan says:

    In fact I have just uploaded the source code. There was an outstanding issue that I never resolved, until now :)

    The php source is likely not very efficient, it is based on the .NET library that I built and I never used it in the end.

Leave a Reply