hier ist ein script dass ich mir geschrieben habe um die itemproto abzugleichen. Das kannste einfach auf die hp einbinden und wenn diese php aufgerufen wird, wird eine xml erstellt mit allen items.
PHP Code:
<?php
//error_reporting(E_ALL);
//$tmpfname = tempnam ("/tmp", "FOO");
$fh = fopen('item_proto.xml', 'w');
//$fh = fopen($tmpfname, 'w');
fwrite($fh, '<item_proto extended="true" version="1">' . "\r\n");
$c = mysql_connect('deinhost', 'root', 'deinpasswort');
$db = mysql_select_db('player');
$result = mysql_query('SELECT * FROM item_proto ORDER BY vnum ASC');
while ($row = mysql_fetch_object($result)) {
//$value = ($field !== 'name') ? $value = utf8_decode($value) : $value;
$tmp = array();
$tmp['vnum'] = $row->vnum;
$tmp['hashName'] = trim($row->name);
$tmp['name'] = trim($row->locale_name);
$tmp['type'] = $row->type;
$tmp['subtype'] = $row->subtype;
$tmp['weight'] = $row->weight;
$tmp['size'] = $row->size;
$tmp['antiflag'] = $row->antiflag;
$tmp['flag'] = $row->flag;
$tmp['wearflag'] = $row->wearflag;
$tmp['immuneflag'] = floatval($row->immuneflag);
$tmp['gold'] = $row->gold;
$tmp['buy_price'] = $row->shop_buy_price;
$tmp['limittype0'] = $row->limittype0;
$tmp['limitvalue0'] = $row->limitvalue0;
$tmp['limittype1'] = $row->limittype1;
$tmp['limitvalue1'] = $row->limitvalue1;
$tmp['applytype0'] = $row->applytype0;
$tmp['applyvalue0'] = $row->applyvalue0;
$tmp['applytype1'] = $row->applytype1;
$tmp['applyvalue1'] = $row->applyvalue1;
$tmp['applytype2'] = $row->applytype2;
$tmp['applyvalue2'] = $row->applyvalue2;
$tmp['value0'] = $row->value0;
$tmp['value1'] = $row->value1;
$tmp['value2'] = $row->value2;
$tmp['value3'] = $row->value3;
$tmp['value4'] = $row->value4;
$tmp['value5'] = $row->value5;
$tmp['socket0'] = $row->socket0;
$tmp['socket1'] = $row->socket1;
$tmp['socket2'] = $row->socket2;
$tmp['socket3'] = $row->socket3;
$tmp['socket4'] = $row->socket4;
$tmp['socket5'] = $row->socket5;
$tmp['refine_vnum'] = $row->refined_vnum;
$tmp['refine_set'] = $row->refine_set;
$tmp['magic_pct'] = $row->magic_pct;
$tmp['specular'] = $row->specular;
$tmp['socket_pct'] = $row->socket_pct;
$t = array();
foreach ($tmp as $key => $value) {
$t[] = $key . '="' . $value . '"';
}
unset($tmp);
fwrite($fh, "\t\t" . '<Item ' . implode(' ', $t) . ' />' . "\r\n");
unset($tmp);
}
fwrite($fh, '</item_proto>');
fclose($fh);
if (ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
}
readfile('item_proto.xml');
exit;