とみふらの明るく楽しい日記

日記や俺用メモなどなんでもあり。

モブストライクで自動で出金、回復して粘着攻撃し続けるグリモン書いたぞ

もう便利なスクリプトとか出回ってて需要ないとかかもしれないけど確認するのめんどくさいのでとりあえず晒しておきます。

// ==UserScript==
// @name           autoattack2
// @namespace      http://d.hatena.ne.jp/tomitake_flash/
// @include        http://mfga.jp/*
// ==/UserScript==

(function(){

    amount = 50000; //回復するときに出金する額
    result = document.evaluate('//span[@class="health"]',document,null,7,null);
    health = result.snapshotItem(0).textContent.split('/')[0];
    console.log(health);
    
    result = document.evaluate('//span[@class="cash"]',document,null,7,null);
    currentmoney = result.snapshotItem(0).textContent.substring(1);
    console.log(currentmoney);
    
    currentmoney = currentmoney.replace(",","");
    console.log(currentmoney);

    if(health <= 20){
	if(currentmoney < amount){
	    document.location = "http://mfga.jp/dashboard/withdraw?withdraw=" + amount;
	}
	document.location = "http://mfga.jp/dashboard/heal";
    }

    mnt = 180; //何秒間隔で攻撃するか
    url = "http://mfga.jp/fight/attack/xxxxxxxxxxxxxxxxxxxx"; //攻撃URLを入れる
    setTimeout(function(){document.location = url;},mnt*1000);

})();

健康20以下だったら勝手に出金して回復する。

というかもう時間の無駄なのでモブストやめたい。