Page 1 of 1

[PHP + MySQL] Multisell Generator

Posted: Mon Sep 28, 2009 4:40 pm
by RiZe
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

Code: Select all

 # header = Town of Giran - Grocer Selvetia - Quest# maintainEnchantment = truep-20253-5;i-5345-2;i-1000p-20253-1;i-5345 
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.

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
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.

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> 
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

Re: [PHP + MySQL] Multisell Generator

Posted: Tue Sep 29, 2009 10:03 pm
by Devastator
Very nice script, thanks for share.

Re: [PHP + MySQL] Multisell Generator

Posted: Mon Dec 27, 2010 6:51 am
by mrvietdung
<list maintainEnchantment="true">
It can protect the multisell without illegel bypass? Anyone tested, plz give me information. Thanks

Re: [PHP + MySQL] Multisell Generator

Posted: Tue Jan 04, 2011 8:09 pm
by EddyKine
File atached is corrupt plz upload again. thxs

Re: [PHP + MySQL] Multisell Generator

Posted: Sat Jan 08, 2011 11:07 am
by RiZe
mrvietdung wrote:<list maintainEnchantment="true">
It can protect the multisell without illegel bypass? Anyone tested, plz give me information. Thanks
I'll give you an example. You have multisell to change Sealed Avadon Boots for Avadon Boots - Robe and player wants to change the sealed ones for unsealed but he has already enchanted them to +6. Now when the maintainEnchantment is set to false, he will get +0 Avadon Boots - Robe for his +6 Sealed Avadon Boots but when you set the maintainEnchantment to true he will get +6 Avadon Boots - Robe. Is it clear now?
EddyKine wrote:File atached is corrupt plz upload again. thxs
Fortunately I've found the script again and uploaded it. Hopefully it is not some dev version :-)

Re: [PHP + MySQL] Multisell Generator

Posted: Sun Jan 09, 2011 8:47 am
by mrvietdung
Clear for all :D Thanks.