Inventory requester

Inventory framework

当前为 2017-10-21 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/34367/225309/Inventory%20requester.js

  1. // ==UserScript==
  2. // @name Inventory requester
  3. // @version 0.2
  4. // @description Inventory framework
  5. // @author A Meaty Alt
  6. // @match http://fairview.deadfrontier.com/onlinezombiemmo/index.php?page=35
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. function getPlayerValues(params){
  11. return new Promise(function(resolve){
  12. var id = params.match(/userID=(.*?)&/)[1];
  13. var hashedPassword = params.match(/password=(.*?)&/)[1];
  14. $.post("https://fairview.deadfrontier.com/onlinezombiemmo/get_values.php",
  15. "userID="+id+"&password="+hashedPassword,
  16. function(response){
  17. resolve(response);
  18. });
  19. });
  20. }