/* + Another fine Dwarven Development's product. + (shamelessly stolen from TOG, or atleast she is the one I know + as being the TM owner ;) + Maxlist: pulls information out of POWER LIST (which is a file + containing a power report) and sorts out the tops in each column and + creates a file MAX POWER in a pretty, postable format. + Usage: /pipe power >> FILE power list a + /cms maxlist + (And you can now /anno max power to send it as an announcement) */ 'execio * diskr power list' parse pull line do while (index(line,'Power')==0) parse pull line end parse pull timestamp parse pull line parse pull line parse pull line do while (left(line,9)^=" ") name=left(line,9); line=right(line,length(line)-9) parse var line sects eff civ mil shell gun pet iron dust food oil pln ship money max_sects=greater(sects,max_sects) max_eff=greater(eff,max_eff) max_civ=greater(civ,max_civ) max_mil=greater(mil,max_mil) max_shell=greater(shell,max_shell) max_gun=greater(gun,max_gun) max_pet=greater(pet,max_pet) max_iron=greater(iron,max_iron) max_dust=greater(dust,max_dust) max_food=greater(food,max_food) max_oil=greater(oil,max_oil) max_pln=greater(pln,max_pln) max_ship=greater(ship,max_ship) max_money=greater(money,max_money) parse pull line end parse pull line queue ' - = - Empire Top Report - = -' queue timestamp queue ' Brought to you by' queue ' Dwarven Technologies' queue ' ' queue 'Sects : 'max_sects queue 'Eff : 'max_eff queue 'Civ : 'max_civ queue 'Mil : 'max_mil queue 'Shells: 'max_shell queue 'Guns : 'max_gun queue 'Petrol: 'max_pet queue 'Iron : 'max_iron queue 'Dust : 'max_dust queue 'Food : 'max_food queue 'Oil : 'max_oil queue 'Planes: 'max_pln queue 'Ships : 'max_ship queue 'Cash : 'max_money 'state max power a' if RC==0 then 'erase max power a' 'execio 'queued()' diskw max power a (FINIS' exit Greater: val1=arg(1);val2=word(arg(2),words(arg(2))) if right(val1,1)==K then val1=left(val1,length(val1)-1)||'000' if right(val2,1)==K then val2=left(val2,length(val2)-1)||'000' if index(val1,'.')^=0 then do val1=delstr(val1,index(val1,'.'),1) val1=left(val1,length(val1)-1) end if index(val2,'.')^=0 then do val2=delstr(val2,index(val2,'.'),1) val2=left(val2,length(val2)-1) end if val1==0 & val2==0 then return ' Nobody 0' if val1=val2 then return arg(2)',' name arg(1) if val1>val2 then return name arg(1) else return arg(2)