メモ@inudaisho

君見ずや出版 / 興味次第の調べ物置き場

mobsterworld/property

greesemonkey。
ひたすら買いつづけるだけ。

追記:システムがかわったのでこれつかうと大変なことになります。もーやめた。 2009/10/04

  1 // ==UserScript==
  2 // @name            mobsterworld/property
  3 // @namespace       inudaisho
  4 // @description     mob
  5 // @include         http://www.playmobsterworld.com/property
  6 // ==/UserScript==
  7 
  8 var iCash = Number(document.getElementById("cash").innerHTML.substring(1).replace(/,/g,''));
  9 var iValuemart = Math.floor(iCash / 400000);
 10 var iRenthouse = Math.floor((iCash - iValuemart * 400000) / 10000);
 11 var iPistol = Math.floor((iCash - iValuemart * 400000 - iRenthouse * 10000) / 1000);
 12 var iBat = Math.floor((iCash - iValuemart * 4000000 - iRenthouse * 10000 - iPistol * 1000) / 300);
 13 
 14 (function(){
 15         var iTypeId = 4;
 16         var sTarget = "property";
 17         var sType = "property";
 18         if (0 < iValuemart){
 19                 iTypeId = 8;
 20                 iValuemart--;
 21         }else if( 0 < iRenthouse ){
 22                 iTypeId = 4;
 23                 iRenthouse--;
 24         }else if( 0 < iPistol){
 25                 iTypeId = 3;
 26                 sTarget = "items"; sType="item";
 27                 iPistol--;
 28         }else if( 0 < iBat){
 29                 iTypeId = 1;
 30                 sTarget = "items"; sType="item";
 31                 iBat--;
 32         }
 33         GM_xmlhttpRequest({
 34                 url: "http://www.playmobsterworld.com/"+sTarget,
 35                 method:"POST",
 36                 headers:{"Content-Type":"application/x-www-form-urlencoded"},
 37                 data: sType+"_type_id="+iTypeId });
 38         setTimeout(arguments.callee, 1000);
 39 })()
 40 
 41 //property_type_id 4:RentHouse 3%  8:ValueMart 2.5%
 42