Greasy Fork

Inventory requester

Inventory framework

目前为 2017-10-21 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.icu/scripts/34367/225309/Inventory%20requester.js

// ==UserScript==
// @name         Inventory requester
// @version      0.2
// @description  Inventory framework
// @author       A Meaty Alt
// @match        http://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=35
// @grant        none
// ==/UserScript==

function getPlayerValues(params){
    return new Promise(function(resolve){
        var id = params.match(/userID=(.*?)&/)[1];
        var hashedPassword = params.match(/password=(.*?)&/)[1];
        $.post("https://fairview.deadfrontier.com/onlinezombiemmo/get_values.php",
               "userID="+id+"&password="+hashedPassword,
               function(response){
            resolve(response);
        });
    });
}