Greasy Fork

Greasy Fork is available in English.

Merge++

Best and only free Farm Merge Valley script

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Merge++
// @namespace    http://tampermonkey.net/
// @version      1.24
// @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/*
// @icon         https://files.catbox.moe/d5dxaj.png
// @discord      https://discord.gg/sKMbMfQU6w
// @license      GPL
// @grant        none
// ==/UserScript==

const ezlvl = false

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)
        } else if(this.responseURL.includes("blueprints/wheat_1") && ezlvl) {
            Object.defineProperty(this, "responseText", {writable: true})
            const wheat = JSON.parse(this.response)
            wheat['components']['mergeable']['expReward'] = 10000
            this.responseText = JSON.stringify(wheat)
        };
    });
    this.realSend(data)
};