#!/usr/bin/php -q <?php require_once "csread.inc"; require_once "wikitable.inc"; $rectype = "ARMO"; $csread = new MWRead(); $wk = new MWTable($rectype); //$csread->set_doprint(); $csread->set_filestoread('all'); $csread->request_data($rectype, CSRead::KEEPOPT_ALL | CSRead::KEEPOPT_ENCH); $cs = $csread->read(); $styles = $cs->get_item_groups($rectype, 'styles'); $ex_styles = $cs->get_item_groups($rectype, 'styles', 'parentonly'); $stats = $wk->get_columns('summable'); $sumdata = array(); foreach ($styles as $style) { $sumdata[$style] = array(); foreach ($stats as $stat) { $sumdata[$style][$stat] = 0; } $set = $cs->get_item_set($rectype, $style); print "{$style}\n"; foreach ($set as $key => $item) { print " {$key} "; if (!is_null($item)) { print $item->edid() . " " . $item->name() . " " . $item->get('skill') . " " . $item->get_index('ENAM'); } print "\n"; } foreach ($set as $key => $item) { if (is_null($item)) {
#!/usr/bin/php -q <?php require_once "csdata.inc"; $rectype = "WEAP"; $csread = new MWRead(); $wk = new MWTable($rectype); //$csread->set_doprint(); $csread->get_data($rectype, CSRead::KEEPOPT_ALL); $cs = $csread->read(); $styles = $cs->get_item_groups($rectype, 'styles'); foreach ($styles as $style) { $set = $cs->get_item_set($rectype, $style); print "{$style}\n"; foreach ($set as $key => $item) { print " {$key} "; if (!is_null($item)) { print $item->edid() . " " . $item->name() . " " . $item->get('skill'); } print "\n"; } // add check whether all items are same armor class... use cuirass for table section, not just set[0] $set = $cs->get_item_set($rectype, $style, 'base'); $wk->set_columns($rectype, 'style_page'); $wk->start_table(); $wk->table_section("{$style} Weapons", $set[0]); foreach ($set as $subset) { $wk->table_row($subset); } $wk->end_table(); print "\n"; foreach ($set as $subset) {