print "</td></tr>"; print "<tr valign='top'><td width='0%'><table><tr><td><table border='0' width='100%' cellpadding='0' cellspacing='0'><tr><td>"; //print "<tr valign='top'><td width='0%'><table><tr><td>"; print "<table border='0' width='0%'><tr valign='top'><td width='100%'>\n"; print "<p><table border='0' width='100%'>"; print "<tr><td nowrap='1'><b>Full name : </b></td><td>" . ReadableNpcName($npc["name"]); if ($npc["lastname"] != "") { print str_replace("_", " ", " (" . $npc["lastname"] . ")"); } print "</td></tr>"; print "<tr><td nowrap='1'><b>Level : </b></td><td width='100%'>" . $npc["level"] . "</td></tr>"; print "<tr><td nowrap='1'><b>Race : </b></td><td>" . $dbiracenames[$npc["race"]] . "</td></tr>"; print "<tr><td nowrap='1'><b>Class : </b></td><td>" . $dbclasses[$npc["class"]]; if ($npc["npc_faction_id"] > 0) { $query = "SELECT {$tbfactionlist}.name,{$tbfactionlist}.id\n\t\t\t\tFROM {$tbfactionlist},{$tbnpcfaction} \n\t\t\t\tWHERE {$tbnpcfaction}.id=" . $npc["npc_faction_id"] . " \n\t\t\t\tAND {$tbnpcfaction}.primaryfaction={$tbfactionlist}.id"; $faction = GetRowByQuery($query); print "<tr><td nowrap='1'><b>Main faction : </b></td><td><a href='faction.php?id=" . $faction["id"] . "'>" . $faction["name"] . "</a></td></tr>"; } if ($npc["findable"] == 1) { print " (findable)"; } print "</td></tr>"; if ($DisplayNPCStats == "TRUE") { print "<tr><td nowrap='1'><b>Health points : </b></td><td>" . $npc["hp"] . "</td></tr>"; print "<tr><td nowrap='1'><b>Damage : </b></td><td>" . $npc["mindmg"] . " to " . $npc["maxdmg"] . "</td></tr>"; } if ($ShowNpcsAttackSpeed == TRUE) { print "<tr><td nowrap='1'><b>Attack speed : </b></td><td>"; if ($npc["attack_speed"] == 0) { print "Normal (100%)"; } else {
$mode = isset($_GET['mode']) ? addslashes($_GET["mode"]) : 'npcs'; if ($name == "") { exit; } $zone = GetRowByQuery("SELECT * FROM {$tbzones} WHERE short_name='{$name}'"); header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename={$name}.csv"); print $zone["long_name"]; print "\nName,Race,Class,Level,Spawn points,Drops\n"; $npcs = preg_split("/:/", $liste); foreach ($npcs as $id) { $txt = ""; $spawns = array(); $loots = array(); $query = "SELECT {$tbnpctypes}.* FROM {$tbnpctypes} WHERE {$tbnpctypes}.id={$id}"; $mymob = GetRowByQuery($query); $txt = str_replace(array('_', '#'), ' ', $mymob["name"]) . ","; $txt .= $dbiracenames[$mymob["race"]] . ","; $txt .= $dbclasses[$mymob["class"]] . ","; $txt .= $mymob["level"] . ","; $query = "SELECT {$tbspawn2}.x,{$tbspawn2}.y,{$tbspawn2}.z,\n {$tbspawngroup}.name as spawngroup,\n {$tbspawngroup}.id as spawngroupID,\n {$tbspawn2}.respawntime\n FROM {$tbspawnentry},{$tbspawn2},{$tbspawngroup}\n WHERE {$tbspawnentry}.npcID={$id}\n AND {$tbspawnentry}.spawngroupID={$tbspawn2}.spawngroupID\n AND {$tbspawn2}.zone='{$name}'\n AND {$tbspawnentry}.spawngroupID={$tbspawngroup}.id"; $result = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error()); if (mysql_num_rows($result) > 0) { $cpt = 0; while ($row = mysql_fetch_array($result)) { $spawns[$cpt] = floor($row["y"]) . " / " . floor($row["x"]) . " / " . floor($row["z"]); $spawns[$cpt] .= " (" . translate_time($row["respawntime"]) . ")"; $cpt++; } } if ($mymob["loottable_id"] > 0 and (!in_array($mymob["class"], $dbmerchants) or $MerchantsDontDropStuff == FALSE)) {