Easy peasy
i have one simple PHP script.
<?php
$acis = glob("acis/*xml"); // npc folder acis.
$npcs = array();
function one($string,$one,$two){
$s = @explode($one,$string);
$s = @explode($two,$s[1]);
return @$s[0];
}
if (is_array($acis)) {
foreach($acis as $filename) {
$file = file_get_contents($filename);
$file = explode("<npc",$file);
unset($file[0]);
foreach ($file as &$value) {
$value = "<npc".$value;
$id = one($value,'id="','"');
$type = one($value,'name="type" val="','"');
$level = one($value,'name="level" val="','"');
$aggro = one($value,'aggro="','"');
$npcs[$id] = array("type"=>$type,"level"=>$level,'aggro'=>$aggro);
}
}
}
$file = file_get_contents("npcnames.txt");
$file = explode("\r\n",$file);
$client = array();
foreach($file as $npc) {
$ex = explode(" ",$npc);
$client[$ex[0]] = $ex;
}
// 0 - id
// 1 - name
// 2 - title
// 3 - r
// 4 - g
// 5 - b
// 6 - reserved
foreach($npcs as $id => &$npc){
if($npc['type'] == "Monster"){
$client[$id][2] = $npc['level']." Level";
if($npc['aggro']>0){
$client[$id][3] = "FF";
$client[$id][4] = "FF";
$client[$id][5] = "FF";
}
}
}
// print npcnames.... CTRL+U in browser.
foreach($client as &$val){
echo implode(" ",$val)."\r\n";
}
?>
you can adapt for any pack.