[PHP + MySQL] Multisell Generator
Posted: Mon Sep 28, 2009 4:40 pm
Here is the very first version of my Multisell Generator written in PHP and using MySQL. It handles input file with given structure to output XML multisell file.
Here are the input examples
Some description should be fine so. Lines with "#" are used as vars. "header" is the special one, not neccessary, it's just top comment in multisell file (see lower). The second one is more important, "maintainEnchantment" is attribute for <list> but it's optional.
After that, there are next two lines.
5 Production items with ID 20253, 2 Ingredient items with ID 5345 and 1 Ingredient item with ID 1000. Quite simple and now the output.
And here you go. Simple and commented multisell file. Enjoy 
PS. Don't forget to edit Config.php file to fit your database settings. Tested on Windows 7 RC with Apache 2.0 and PHP 5.2.5
EDIT: Ups, little mistake made in last seconds before upload (SQL syntax error). Fixed
Here are the input examples
Code: Select all
# header = Town of Giran - Grocer Selvetia - Quest# maintainEnchantment = truep-20253-5;i-5345-2;i-1000p-20253-1;i-5345
After that, there are next two lines.
Code: Select all
p-20253-5 p = Production (i for Ingredient)20253 = Item ID5 = Item Count (optional, 1 is used in this case)
Code: Select all
p-20253-5;i-5345-2;i-1000
Code: Select all
<?xml version="1.0" encoding="UTF-8"?><!-- Town of Giran - Grocer Selvetia - Quest --><list maintainEnchantment="true"> <!-- 5 Agathion of Love (Event) for 2 Recipe: Inferno Earring(70%) + Book of Aklantoth - Part 3 --> <item id="1"> <ingredient id="5345" count="2"/> <ingredient id="1000" count="1"/> <production id="20253" count="5"/> </item> <!-- Agathion of Love (Event) for Recipe: Inferno Earring(70%) --> <item id="2"> <ingredient id="5345" count="1"/> <production id="20253" count="1"/> </item></list>

PS. Don't forget to edit Config.php file to fit your database settings. Tested on Windows 7 RC with Apache 2.0 and PHP 5.2.5
EDIT: Ups, little mistake made in last seconds before upload (SQL syntax error). Fixed