Yohoho.io Cheats

Cheats for the popular IO game, Yohoho.IO!

目前為 2019-10-20 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Yohoho.io Cheats
// @namespace    http://yohoho.io/
// @version      1.1.1
// @description  Cheats for the popular IO game, Yohoho.IO!
// @author       Steviegt6
// @match        https://yohoho.io/
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @grant        none
// ==/UserScript==

// =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
// Version History:
// -=-=-=-=-
// v1.1.1 patch
// Small bug fixes
// -=-=-=-=-
// v1.1.0 update
// Fixed many bugs.
// -=-=-=-=-
// v1.0.0 release
// Initial release. Buggy.
// -=-=-=-=-
// =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-

// =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
// Guide:
// Press 'O' to set your coins to any value you want!
// Press 'P' to change your character! (Buggy)
// Press 'I' to change your island! 
// Press 'X' to set your XP to any value you want! (Buggy)
// =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-

showCheats();
overrideSkin();


document.title = "*HACKED* YoHoHo.io - pirate battle royale io game";

document.addEventListener('keydown', cheats, false);

function showCheats()
{
    var box = document.getElementById("desktop-controls");
    var controls = document.createElement("div");
    controls.className = "title2";
    controls.id = "hackids";
    var hacks = document.getElementById("hackids");
    var hackselement = document.createElement("div");
    var hackstextnode = document.createTextNode("I - Change your island (Conflicts with XP cheat.)" + " O - Gain a set amount of coins" + " P = Change your character, buggy" + " X = Set XP! (Conflicts with island cheat, buggy.)");
    hackselement.appendChild(hackstextnode);
    var controlstextnode = document.createTextNode("Cheats");
    box.appendChild(controls);
    box.appendChild(hackselement);
}

function cheats(e)
{
    if (e.keyCode =="79") //O - Coins
    {
        var a = prompt("What would you like to set your coin coint to?");
        if(isNaN(a))
        {
            alert("Oops! Something went wrong! Perhaps entering a number next time will solve the issue?")
        }
        else
        {
            localStorage.setItem("coinsOwned", a);
            document.getElementById("homepage-booty").innerHTML = a;
            document.getElementById("skin-popup-booty").innerHTML = a;
        }
    }
    else
    if (e.keyCode =="88") //X - XP
    {
        var x = prompt("What would you like to set your XP to?");
        if(isNaN(a))
        {
            alert("Oops! Something went wrong! Perhaps entering a number next time will solve the issue?")
        }
        else
        {
            localStorage.setItem("playerXP", a);
            document.getElementById("homepage-booty").innerHTML = a;
            document.getElementById("skin-popup-booty").innerHTML = a;
        }
    }
    else if(e.keyCode == "80") //P - Character
    {
        var b = prompt("Which character would you like to become? Please pick a number between 1 and 45!")
        if (isNaN(b))
        {
            alert("Oops! something went wrong! Perhaps enterign a number next time will solve the issue?")
        }
        else if (b < 1 || b > 45)
        {
            alert("Oops! something went wrong! Please choose a number between 1 and 45!")
        }
        else if (b != null || b != undefined || b!= "")
        {
            localStorage.setItem("playerSkin", b);
            alert("Please reload the page the enable the skin you have chosen!")
        }
    }
    else if(e.keyCode == "73") //I - Island
    {
        var c = prompt("Which island would you like to travel to?\n1 = Tortuga\n2 = Beach\n3 = Easter\n4 = Wreck\n5 = Aztec\n6 = Volcano\n7 = Village")
        if(c == 1) ////0,140,700,2100,4400,7600,13500
        {
            localStorage.setItem("playerXP", 0);
            alert("Island set to Tortuga. Please reload.");
        }
        else if(c == 2)
        {
            localStorage.setItem("playerXP", 140);
            alert("Island set to Beach. Please reload.");
        }
        else if(c == 3)
        {
            localStorage.setItem("playerXP", 700);
            alert("Island set to Easter. Please reload.");
        }
        else if(c == 4){
            localStorage.setItem("playerXP", 2100);
            alert("Island set to Wreck. Please reload.");
        }
        else if(c == 5){
            localStorage.setItem("playerXP", 4400);
            alert("Island set to Aztec. Please reload.");
        }
        else if(c == 6){
            localStorage.setItem("playerXP", 7600);
            alert("Island set to Volcano. Please reload.");
        }
        else if(c == 7){
            localStorage.setItem("playerXP", 13500);
            alert("Island set to Volcano. Please reload.");
        }
        else if(c != (1 || 2 || 3 || 4 || 5 || 6 || 7)){
            alert("Oops! Something went wrong! Please enter a number between 1 and 7!");
        }
    }
}

console.log("b");

function overrideSkin()
{
    let ez = document.getElementById("skin-button");
    ez.onclick = function()
    {
        yohoho.chooseSkin();
        let a = parseInt(localStorage.getItem("coinsOwned"));
        document.getElementById("skin-popup-booty").innerHTML = a;
    }
}