Inventory requester

Inventory framework

Bu script direkt olarak kurulamaz. Başka scriptler için bir kütüphanedir ve meta yönergeleri içerir // @require https://update.greasyfork.org/scripts/34367/227140/Inventory%20requester.js

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Inventory requester
// @description  Inventory framework
// @author       A Meaty Alt
// @grant        none
// ==/UserScript==

function getPlayerValues(){
    return new Promise(function(resolve){
        $.post("https://fairview.deadfrontier.com/onlinezombiemmo/get_values.php",
               jQuery.param(buildSecureBody()),
               function(response){
            resolve(response);
        });
    });
}
function getItemCode(i, playerValues){
    var patternType = new RegExp("df_inv"+i+"_type=(.*?)\&");
    return playerValues.match(patternType)[1];
}
function getStorageSize(playerValues){
    return playerValues.match(/df_storage_slots=(.*?)&/)[1];
}

function getPlayerOutpostId(){
    return new Promise((resolve) => {
        getPlayerValues()
        .then((values) => {
            var tradezoneId = values.match(/tradezone=(.*?)&/)[1];
            resolve(tradezoneId);
        });
    });
}