#!/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 "csread.inc"; $csread = new MWRead(); //$csread->set_doprint(); $csread->set_filestoread('all'); $csread->request_data('CLOT'); $csread->request_data('ENCH'); $csread->request_data('SPEL'); $csread->request_data('MGEF'); $cs = $csread->read(); //$spells = $cs->list_items_by_type('SPEL'); $spells = array($cs->get_ordid('warywrd ability'), $cs->get_ordid('akaviri danger-sense'), $cs->get_ordid('fay ability'), $cs->get_ordid('elfborn ability'), $cs->get_ordid('wombburn'), $cs->get_ordid('magicka mult bonus_5'), $cs->get_ordid('magicka mult bonus_15')); foreach ($spells as $spell) { $item = $cs->get_item($spell); if (!is_object($item)) { continue; } print "'" . $item->get('name') . "' (" . $item->get('edid') . ")\n"; print $item->get('magic_desc') . "\n"; } $item = $cs->get_item('mantle of woe'); print "'" . $item->get('name') . "' (" . $item->get('edid') . ")\n"; print $item->get('magic_desc') . "\n";