やっとPopulationが100になったよ!

MyMiniCityの話ね。
MyMiniCityの話でも可。

追記

初めて3,000位の壁を越えたよ(笑)。

さらに追記

またもや、3,000位以下にorz

2008/04/16 自分用メモ

// ==UserScript==
// @name          MyMiniCity
// @author        mattz
// @namespace     http://d.hatena.ne.jp/mattz/
// @description   
// @include       http://*.myminicity.com/xml
// ==/UserScript==
(
  function(){
    document.addEventListener(
      'load',
      function(){
        var host = document.getElementsByTagName('host')[0].firstChild.nodeValue;
        var ind  = document.getElementsByTagName('unemployment')[0].firstChild.nodeValue;
        var tra  = 100 - document.getElementsByTagName('transport')[0].firstChild.nodeValue;
        var cri  = document.getElementsByTagName('criminality')[0].firstChild.nodeValue;
        var pol  = document.getElementsByTagName('pollution')[0].firstChild.nodeValue;
        var add  = function(){
          var max = '';
          if( ind > 1 || tra > 1 || cri > 1 || pol > 1 ){
            var maxval = 0;
            if( ind >= tra ){
              max = 'ind';
              maxval = ind;
            }else{
              max = 'tra';
              maxval = tra;
            }
            if( maxval < cri ){
              max = 'sec';
              maxval = cri;
            }
            if( maxval < pol ){
              max = 'pol';
              maxval = pol;
            }
          }
          return '/' + max;
        }();
        location.href = 'http://' + host + add;
      },
      false
    );
  }
)();

/xmlをブックマークしとく。