Merge++

Best and only free Farm Merge Valley script

Устаревшая версия за 11.09.2024. Перейдите к последней версии.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey, Greasemonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Userscripts.

Чтобы установить этот скрипт, сначала вы должны установить расширение браузера, например Tampermonkey.

Чтобы установить этот скрипт, вы должны установить расширение — менеджер скриптов.

(у меня уже есть менеджер скриптов, дайте мне установить скрипт!)

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

(у меня уже есть менеджер стилей, дайте мне установить скрипт!)

// ==UserScript==
// @name         Merge++
// @namespace    http://tampermonkey.net/
// @version      1.22
// @description  Best and only free Farm Merge Valley script
// @author       vk.com/downcasted
// @match        *://*.discordsays.com/*
// @match        https://farm-merge-valley.game-files.crazygames.com/farm-merge-valley/*
// @match        https://apps-158098743030140.apps.fbsbx.com/br-compress-instant-bundle/br/4318293594945706/8036035279815024/*
// @match        https://www.facebook.com/gaming/play/158098743030140
// @icon         https://files.catbox.moe/d5dxaj.png
// @discord      https://discord.com/invite/R7ntKqK2BX
// @license      GPL
// @grant        none
// ==/UserScript==

console.log("Script loaded, probably!");
XMLHttpRequest.prototype.realSend = XMLHttpRequest.prototype.send
XMLHttpRequest.prototype.send = function(data) {
    this.addEventListener('readystatechange', function() {
        console.log(this.responseURL)
        if (this.responseURL.includes("lucky_merge_config")) { // always lucky merge
            Object.defineProperty(this, "responseText", {writable: true})
            this.responseText = '{"CHANCE":100}';
        } else if(this.responseURL.includes("crate_regeneration_config")) { // infinite crates
            Object.defineProperty(this, "responseText", {writable: true})
            this.responseText = '{"MAX_AMOUNT":100,"AMOUNT_PER_INTERVAL":100,"SPAWN_INTERVAL":1}'
        } else if(this.responseURL.includes("energy_regeneration_config.json")) { // infinite energy
            this.responseText = '{"MAX_AMOUNT":100,"AMOUNT_PER_INTERVAL":100,"SPAWN_INTERVAL":1}'
        } else if(this.responseURL.includes("marketplace_items_config")) { // Free shop
            Object.defineProperty(this, "responseText", {writable: true})
            const shop = JSON.parse(this.response)
            for (const item in shop['items']) {
                let itemrec = shop["items"][item]
                if (itemrec["payment"]["type"] == "iap") { // Makes real money items cost gems
                    itemrec["payment"] = {"type": "inventory", "key": "gems", "amount": 0}
                } else { // Makes everything free
                    itemrec["payment"]["amount"] = 0
                };
                if (itemrec["renewable"]) { // insta free gems / energy /crates
                    itemrec["renewable"]["duration"] = 0
                };
                if (itemrec["id"] == "gems_extra_small") { // Replaces the gem offer under the free one with a crate
                    const rarities = [
                        "bronze",
                        "silver",
                        "gold",
                    ]
                    const crates = []
                    for (let i = 0; i < 3; i++) {
                        crates.push(`reward_crate_${rarities[i]}`)
                        crates.push(`reward_crate_key_${rarities[i]}`)
                        crates.push(`reward_crate_key_${rarities[i]}`)
                    }
                    itemrec["image"] = "bg_marketplace_fb_blackfriday03"
                    itemrec["reward"] = {
                        "type":"object",
                        "data": crates
                    }
                } else if (itemrec["id"] == "crates_001") { // Replace huge gem offer with halloween shit
                    itemrec["image"] = "bg_marketplace_halloween01"
                    itemrec["reward"] = {
                        "type": "object",
                        "data": [
                            "decorative_halloween_blackcat",
                            "decorative_halloween_cauldron",
                            "decorative_halloween_ghosts",
                            "decorative_halloween_grandfatherclock",
                            "decorative_halloween_grave01",
                            "decorative_halloween_grave02",
                            "decorative_halloween_graveyard",
                            "decorative_halloween_hauntedhouse",
                            "decorative_halloween_pumpkinpatchbig",
                            "decorative_halloween_pumpkins01",
                            "decorative_halloween_pumpkins02",
                            "decorative_halloween_pumpkins03",
                            "decorative_halloween_pumpkins04",
                            "decorative_halloween_skeletonbench",
                            "decorative_halloween_skeletoncarousel",
                            "decorative_halloween_skeletonpicnic",
                            "decorative_halloween_skullaltar",
                            "decorative_halloween_treeface",
                            "decorative_halloween_well"
                        ]
                    }
                } else if (itemrec["id"] == "crates_003") {
                    itemrec["image"] = "bg_marketplace_christmas02"
                    itemrec["reward"] = {
                        "type": "object",
                        "data": [
                            "decorative_christmas_candygate",
                            "decorative_christmas_elfmail",
                            "decorative_christmas_elfteddy",
                            "decorative_christmas_elftrain",
                            "decorative_christmas_fireplace",
                            "decorative_christmas_gift01",
                            "decorative_christmas_gift02",
                            "decorative_christmas_gift03",
                            "decorative_christmas_gingerbell",
                            "decorative_christmas_gingerbreadhouse",
                            "decorative_christmas_gingerbreadhousesmall",
                            "decorative_christmas_gingerbreadsnow",
                            "decorative_christmas_nutcracker",
                            "decorative_christmas_santagift",
                            "decorative_christmas_santamail",
                            "decorative_christmas_sleigh",
                            "decorative_christmas_snowcaroling",
                            "decorative_christmas_snowdinner",
                            "decorative_christmas_snowfight",
                            "decorative_christmas_snowgifting",
                            "decorative_christmas_snowglobe",
                            "decorative_christmas_snowjello",
                            "decorative_christmas_snowlantern",
                            "decorative_christmas_snowreindeer",
                            "decorative_christmas_snowtelescope",
                            "decorative_christmas_treebig",
                        ]
                    }
                } else if (itemrec["id"] == "crates_004") {
                    itemrec["reward"] = {
                        "type": "object",
                        "data": [
                            "decorative_barn",
                            "decorative_birdshouse",
                            "decorative_chickencoop",
                            "decorative_doghouse",
                            "decorative_farmhouse",
                            "decorative_feedingtrough",
                            "decorative_flowerpots",
                            "decorative_fountain",
                            "decorative_haywagon",
                            "decorative_lamppost",
                            "decorative_milktank",
                            "decorative_picknicktable",
                            "decorative_shed",
                            "decorative_silo",
                            "decorative_stoneflowerpot",
                            "decorative_toilet",
                            "decorative_watertower",
                            "decorative_well",
                            "decorative_windmill",
                            "flower_1",
                            "flower_2",
                            "flower_3",
                            "flower_5",
                            "flower_4",
                            "flower_6",
                            "flower_7",
                            "flower_8",
                            "flower_9",
                            "flower_10",
                            "greenhouse"
                        ]
                    }
                } else if(itemrec["id"] == "gems_small") {
                    const tools = []
                    for (let i = 0; i < 10; i++) {
                        tools.push(`tool_${i+1}`)
                        tools.push(`tool_${i+1}`)
                        tools.push(`tool_${i+1}`)
                    }
                    itemrec["reward"] = {
                        "type": "object",
                        "data": tools
                    }
                } else if(itemrec["id"] == "gems_large") {
                    const gems = []
                    for (let i = 0; i < 10; i++) {
                        gems.push("ticket")
                    }
                    itemrec["reward"] = {
                        "type": "object",
                        "data": gems
                    }
                } else if(itemrec["id"] == "energy_003") {
                    itemrec["image"] = "bg_marketplace_gems02"
                    itemrec["reward"] = {
                        "type": "inventory",
                        "data": {
                            "key": "gems",
                            "amount": 1000
                        }
                    }
                } else if(itemrec["id"] == "energy_004") {
                    itemrec["reward"]["data"]["amount"] = 100
                } else if(itemrec["id"] == "energy_001") {
                    itemrec["reward"] = {
                        "type": "inventory",
                        "data": {
                            "key": "coins",
                            "amount": 10000
                        }
                    }
                }
            };
            this.responseText = JSON.stringify(shop)
        } else if(this.responseURL.includes("localization")) {
            Object.defineProperty(this, "responseText", {writable: true});
            const local = JSON.parse(this.response);
            local["market_place_popup_header"]["en_US"] = "✦ xin's shop ✦";
            local["crates"]["en_US"] = "Decorations";
            local["marketplace_crates_banner"]["en_US"] = "EVERY HALLOWEEN DECO"
            local["energy"]["en_US"] = "Resources"
            local["marketplace_energy_banner"]["en_US"] = "10000 COINS"
            local["gems"]["en_US"] = "Misc / Chests"
            local["marketplace_gems_banner"]["en_US"] = "10 TICKETS"
            this.responseText = JSON.stringify(local)
        } else if(this.responseURL.includes("blueprints/base_")) {
            Object.defineProperty(this, "responseText", {writable: true})
            const components = JSON.parse(this.response)
            components["components"]["shovelable"] = {};
            this.responseText = JSON.stringify(components)
        };
    });
    this.realSend(data)
};