Ja sowas gibt es schon einfach auf eure hp ziehen und ausführen
PHP Code:
<?php error_reporting(0);
//Item_proto2XMLConverter by musicinstructor
$db_ip = "XXX";
$db_login = "XXX";
$db_pw = "XXX";
echo "<title>Metin2 Item-To-XML Converter - IP: ".$db_ip." time: ".strftime("%b %d, %G - %R %Z")."</title>";
$con = mysql_connect($db_ip, $db_login, $db_pw);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
if (isset($_GET["name"])){$result_items = mysql_query('SELECT * FROM player.item_proto WHERE locale_name LIKE "%'.$_GET["name"].'%" ORDER BY vnum', $con);}
else {$result_items = mysql_query('SELECT * FROM player.item_proto ORDER BY vnum', $con);}
if (mysql_num_rows($result_items) == 0) {exit("No Matches!");}
echo "<textarea type='text' name='xml_code' wrap='off' class='textbox' style='width: 100%; height: 99%;'>";
while($row = mysql_fetch_array($result_items))
{
$hongkongname = $row['name'];
while(substr($hongkongname, -1, 1) == " "){
$hongkongname = substr($hongkongname, 0, -1);
}
$name = $row['locale_name'];
while(substr($name, -1, 1) == " "){
$name = substr($name, 0, -1);
}
$xml = ' <Item vnum="'.$row['vnum'].'" name="\''.$hongkongname.'\'" gb2312name="'.$name.'" type="'.$row['type'].'" subtype="'.$row['subtype'].'" weight="'.$row['weight'].'" size="'.$row['size'].'" antiflag="'.$row['antiflag'].'" flag="'.$row['flag'].'" wearflag="'.$row['wearflag'].'" immuneflag="'.$row['immuneflag'].'" gold="'.$row['gold'].'" buy_price="'.$row['shop_buy_price'].'" limittype0="'.$row['limittype0'].'" limitvalue0="'.$row['limitvalue0'].'" limittype1="'.$row['limittype1'].'" limitvalue1="'.$row['limitvalue1'].'" applytype0="'.$row['applytype0'].'" applyvalue0="'.$row['applyvalue0'].'" applytype1="'.$row['applytype1'].'" applyvalue1="'.$row['applyvalue1'].'" applytype2="'.$row['applytype2'].'" applyvalue2="'.$row['applyvalue2'].'" value0="'.$row['value0'].'" value1="'.$row['value1'].'" value2="'.$row['value2'].'" value3="'.$row['value3'].'" value4="'.$row['value4'].'" value5="'.$row['value5'].'" socket0="'.$row['socket0'].'" socket1="'.$row['socket1'].'" socket2="'.$row['socket2'].'" socket3="'.$row['socket3'].'" socket4="'.$row['socket4'].'" socket5="'.$row['socket5'].'" refine_vnum="'.$row['refined_vnum'].'" refine_set="'.$row['refine_set'].'" magic_pct="'.$row['magic_pct'].'" specular="'.$row['specular'].'" socket_pct="'.$row['socket_pct'].'" />';
$xml = htmlspecialchars($xml);
echo $xml;
echo "\n";
}
echo "</textarea>";
mysql_close($con);
?>