Jump to content
  • Create New...
  • 0

Converter sql to xml (item proto)



Do someone have a converter for item proto sql to xml?

I only found an old converter for the hen script, but I'm using the new database structure.

Old script:

<h2>ItemProto.sql to ItemProto.xml Converter By DexterSK</h2>
    $query = mysql_query("SELECT * FROM player.item_proto ORDER BY vnum ASC") or die(mysql_error());
    $apo = "'";

    $fh = fopen('dump/'.$_POST['meno_i'].'', 'w');
    $zapis1 = fwrite($fh, '<item_proto extended="true" version="1">'."\r\n");
    while($fetch = mysql_fetch_assoc($query))
    $zapis2 = fwrite($fh, '  <Item vnum="'.$fetch['vnum'].'" name="'.$apo.''.$fetch['name'].''.$apo.'" gb2312name="'.$fetch['locale_name'].'" type="'.$fetch['type'].'" subtype="'.$fetch['subtype'].'" weight="'.$fetch['weight'].'" size="'.$fetch['size'].'" antiflag="'.$fetch['antiflag'].'" flag="'.$fetch['flag'].'" wearflag="'.$fetch['wearflag'].'" immuneflag="'.$fetch['immuneflag'].'" gold="'.$fetch['gold'].'" buy_price="'.$fetch['shop_buy_price'].'" limittype0="'.$fetch['limittype0'].'" limitvalue0="'.$fetch['limitvalue0'].'" limittype1="'.$fetch['limittype1'].'" limitvalue1="'.$fetch['limitvalue1'].'" applytype0="'.$fetch['applytype0'].'" applyvalue0="'.$fetch['applyvalue0'].'" applytype1="'.$fetch['applytype1'].'" applyvalue1="'.$fetch['applytype1'].'" applytype2="'.$fetch['applytype2'].'" applyvalue2="'.$fetch['applyvalue2'].'" value0="'.$fetch['value0'].'" value1="'.$fetch['value1'].'" value2="'.$fetch['value2'].'" value3="'.$fetch['value3'].'" value4="'.$fetch['value4'].'" value5="'.$fetch['value5'].'" socket0="'.$fetch['socket0'].'" socket1="'.$fetch['socket1'].'" socket2="'.$fetch['socket2'].'" socket3="'.$fetch['socket3'].'" socket4="'.$fetch['socket4'].'" socket5="'.$fetch['socket5'].'" refine_vnum="'.$fetch['refined_vnum'].'" refine_set="'.$fetch['refine_set'].'" magic_pct="'.$fetch['magic_pct'].'" specular="'.$fetch['specular'].'" socket_pct="'.$fetch['socket_pct'].'" />'."\r\n");
    $zapis3 = fwrite($fh, '</item_proto>');

    if($zapis1 AND $zapis2 AND $zapis3)
  echo'<p>You dont have permision for this area!</p>';
<form action="" method="post">
Name of XML:
<input type="text" name="meno_i" size="40" value="item_proto_dump.xml" />
<td width="90">
<td width="150">
<input type="submit" name="odoslat" value="Convert" />


Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.