Yohoho.io Cheats

Cheats for the popular IO game, Yohoho.IO!

Per 20-10-2019. Zie de nieuwste versie.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

// ==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;
    }
}