Bank Requester 2

Helper to withdraw/deposit

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/457232/1132441/Bank%20Requester%202.js

// ==UserScript==
// @name         Bank Requester 2
// @version      1.2
// @description  Helper to withdraw/deposit
// @author       puddle
// @include      /fairview.deadfrontier.com/
// @grant        none
// @require      https://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js
// ==/UserScript==

function withdraw(money, params){
    return new Promise(function(resolve){
    var sc = params.match(/sc=(.*?)&/)[1];
    var id = params.match(/userID=(.*?)&/)[1];
    var password = params.match(/password=(.*?)&/)[1];
    $.post("https://fairview.deadfrontier.com/onlinezombiemmo/bank.php",
           "withdraw="+money+"&templateID=undefined&sc=" + sc + "&userID="+id+"&password="+password,
               (response) => resolve(response)
              );
    });
}
function deposit(money, params){
    return new Promise(function(resolve){
        var sc = params.match(/sc=(.*?)&/)[1];
        var id = params.match(/userID=(.*?)&/)[1];
        var password = params.match(/password=(.*?)&/)[1];
        $.post("https://fairview.deadfrontier.com/onlinezombiemmo/bank.php",
               "deposit="+money+"&templateID=undefined&sc=" + sc + "&userID="+id+"&password="+password,
               (response) => resolve(response)
              );
    });
}