0) { $cpt = 0; while ($row = mysqli_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 ($merchants_dont_drop_stuff == FALSE))) { $query = "SELECT $items_table.id,$items_table.Name,$items_table.itemtype, $loot_drop_entries_table.chance,$loot_table_entries.probability, $loot_table_entries.lootdrop_id,$loot_table_entries.multiplier FROM $items_table,$loot_table_entries,$loot_drop_entries_table WHERE $loot_table_entries.loottable_id=" . $mymob["loottable_id"] . " AND $loot_table_entries.lootdrop_id=$loot_drop_entries_table.lootdrop_id AND $loot_drop_entries_table.item_id=$items_table.id"; $result = db_mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysqli_error()); if (mysqli_num_rows($result) > 0) { $cpt = 0; while ($row = mysqli_fetch_array($result)) { $loots[$cpt] = $row["Name"]; $loots[$cpt] .= " (" . $dbitypes[$row["itemtype"]] . ")"; $cpt++; } } } $n = max(count($spawns), count($loots)); for ($i = 0; $i < $n; $i++) { if ($i == 0) { print $txt; } else { print ",,,,"; } if ($i < count($spawns)) { print $spawns[$i]; } print ","; if ($i < count($loots)) { print $loots[$i]; } print "\n"; } } ?>