Yohoho.io Cheats

Cheats for the popular IO game, Yohoho.IO! Press 'p' to change your pet. 'l' to change the pet's level, 'x' to change your xp, 'i' to change your island, 'c' to change your character, and 'o' to change your coins.

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

  1. // ==UserScript==
  2. // @name Yohoho.io Cheats
  3. // @namespace http://yohoho.io/
  4. // @version 1.2.1
  5. // @description Cheats for the popular IO game, Yohoho.IO! Press 'p' to change your pet. 'l' to change the pet's level, 'x' to change your xp, 'i' to change your island, 'c' to change your character, and 'o' to change your coins.
  6. // @author Steviegt6
  7. // @match https://yohoho.io/
  8. // @match http://yohoho.io/
  9. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. // =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
  14. // Contact Info:
  15. // Steviegt6#9616 (discord)
  16. // Steviegt6 (github)
  17. // https://steviegt6/github.io/ (website)
  18. // https://discordapp.com/invite/tYzEbqX (discord server)
  19. // =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
  20.  
  21. // =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
  22. // Version History:
  23. // -=-=-=-=-
  24. // v1.2.1 comments
  25. // Added comments in code for easier-to-understand source code.
  26. // -=-=-=-=-
  27. // v1.2.0 update
  28. // Added 'P' command (pet)
  29. // Added 'L' command (pet level)
  30. // Setting your coins now automatically reloads
  31. // Setting your XP not automatically reloads
  32. // -=-=-=-=-
  33. // -=-=-=-=-
  34. // v1.1.5 patch
  35. // XP patch 2.0
  36. // -=-=-=-=-
  37. // v1.1.4 patch
  38. // XP patch
  39. // -=-=-=-=-
  40. // v1.1.3 patch
  41. // Patch
  42. // -=-=-=-=-
  43. // v1.1.2 qol/patch
  44. // Small qol tweaks
  45. // Fixed skin selection bugs
  46. // You're allowed to view the skisn menu again
  47. // -=-=-=-=-
  48. // v1.1.1 patch
  49. // Small bug fixes
  50. // -=-=-=-=-
  51. // v1.1.0 update
  52. // Fixed many bugs.
  53. // -=-=-=-=-
  54. // v1.0.0 release
  55. // Initial release. Buggy.
  56. // -=-=-=-=-
  57. // =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
  58.  
  59. // =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
  60. // Guide:
  61. // Press 'O' to set your coins to any value you want!
  62. // Press 'P' to change your pet!
  63. // Press 'C' to change your character!
  64. // Press 'I' to change your island!
  65. // Press 'X' to set your XP to any value you want!
  66. // Press 'L' to set your pet's level!
  67. // =-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+-=-=-=-=-=-=-=-=-=-=-
  68.  
  69. showCheats(); //Cheat function to display controls
  70.  
  71. document.title = "*HACKED* YoHoHo.io - pirate battle royale io game"; //Changes title name
  72.  
  73. document.addEventListener('keydown', cheats, false); //Checks for when you press a key
  74.  
  75. function showCheats() //Show cheats in side control area
  76. {
  77. var box = document.getElementById("desktop-controls"); //Control box
  78. var controls = document.createElement("div"); //New div
  79. controls.className = "title2"; //Class name
  80. controls.id = "hackids"; //ID
  81. var hacks = document.getElementById("hackids"); //ID name
  82. var hackselement = document.createElement("div"); //New div
  83. 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.)"); //Control text
  84. hackselement.appendChild(hackstextnode); //text node stuff
  85. var controlstextnode = document.createTextNode("Cheats"); //text node
  86. box.appendChild(controls); //append child
  87. box.appendChild(hackselement); //append child
  88. }
  89.  
  90. function cheats(e) //keydown function cheats blah blah blah
  91. {
  92. if (e.keyCode =="79") //O - Coins
  93. {
  94. var a = prompt("What would you like to set your coin coint to?"); //prompt
  95. if(isNaN(a)) //if not a number
  96. {
  97. alert("Oops! Something went wrong! Perhaps entering a number next time will solve the issue?")
  98. }
  99. else
  100. {
  101. localStorage.setItem("coinsOwned", a); //change coing count
  102. document.getElementById("homepage-booty").innerHTML = a; //changes coin count
  103. document.getElementById("skin-popup-booty").innerHTML = a; //changes coin count
  104. alert("Gold set! Reloading...") //reload message
  105. location.reload() //reloads
  106. }
  107. }
  108. else if (e.keyCode == "88") //X - XP
  109. {
  110. var x = prompt("What would you like to set your XP to?"); //prompt
  111. if(isNaN(x)) //if not a number
  112. {
  113. alert("Oops! Something went wrong! Perhaps entering a number next time will solve the issue?") //error message
  114. }
  115. else if (x >= 13500) //if equal to or greater that 13,500
  116. {
  117. localStorage.setItem("playerXP", 13500); //sets to 13,500
  118. alert("XP set! Reloading...") //reload message
  119. location.reload() //reloads
  120. }
  121. else if (x <= 0) //if less than or equal to 0
  122. {
  123. localStorage.setItem("playerXP", 0); //sets to 0
  124. alert("XP set! Reloading...")
  125. location.reload()
  126. }
  127. else
  128. {
  129. localStorage.setItem("playerXP", x); //etc.
  130. alert("XP set! Reloading...") //etc.
  131. location.reload() //etc.
  132. }
  133. }
  134. else if(e.keyCode == "67") //C - Character
  135. {
  136. var b = prompt("Which character would you like to become? Please pick a number between 1 and 35!") //prompt
  137. if (isNaN(b)) //if not a number
  138. {
  139. alert("Oops! something went wrong! Perhaps entering a number next time will solve the issue?") //error message
  140. }
  141. else if (b < 1 || b > 35) //if less than 1 or greatre than 35
  142. {
  143. alert("Oops! something went wrong! Please choose a number between 1 and 35!") //error message
  144. }
  145. else
  146. {
  147. localStorage.setItem("playerSkin", b); //sets skin
  148. alert("Skin selected! Reloading...") //etc.
  149. location.reload() //etc.
  150. }
  151. }
  152. else if(e.keyCode == "80") //P - Pet
  153. {
  154. var p = prompt("Which character would you like to become? Please pick a number between 1 and 7!") //etc.
  155. if (isNaN(p)) //etc.
  156. {
  157. alert("Oops! something went wrong! Perhaps entering a number next time will solve the issue?") //etc.
  158. }
  159. else if (p < 1 || p > 7) //if less than 1 or greater than 7
  160. {
  161. alert("Oops! something went wrong! Please choose a number between 1 and 7!") //etc.
  162. }
  163. else
  164. {
  165. localStorage.setItem("playerPet", p); //etc.
  166. alert("Pet selected! Reloading...") //etc.
  167. location.reload() //etc.
  168. }
  169. }
  170. else if(e.keyCode == "76") //L - Pet Level
  171. {
  172. var l = prompt("What level would you like your pet to be? Please pick a number between 1 and 14!") //etc.
  173. if (isNaN(l)) //etc.
  174. {
  175. alert("Oops! something went wrong! Perhaps entering a number next time will solve the issue?") //etc.
  176. }
  177. else if (l < 1 || l > 14) //if less than 1 or greater than 14
  178. {
  179. alert("Oops! something went wrong! Please choose a number between 1 and 14!") //etc.
  180. }
  181. else
  182. {
  183. localStorage.setItem("playerPetLevel", l); //etc.
  184. alert("Pet level selected! Reloading...") //etc.
  185. location.reload() //etc.
  186. }
  187. }
  188. else if(e.keyCode == "73") //I - Island
  189. {
  190. 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") //prompt (\n means like break)
  191. if(c == 1) //is exactly equal to one //0,140,700,2100,4400,7600,13500
  192. {
  193. localStorage.setItem("playerXP", 0);
  194. alert("Island set to Tortuga. Reloading...");
  195. location.reload()
  196. }
  197. else if(c == 2)
  198. {
  199. localStorage.setItem("playerXP", 140);
  200. alert("Island set to Beach. Reloading...");
  201. location.reload()
  202. }
  203. else if(c == 3)
  204. {
  205. localStorage.setItem("playerXP", 700);
  206. alert("Island set to Easter. Reloading...");
  207. location.reload()
  208. }
  209. else if(c == 4){
  210. localStorage.setItem("playerXP", 2100);
  211. alert("Island set to Wreck. Reloading...");
  212. location.reload()
  213. }
  214. else if(c == 5){
  215. localStorage.setItem("playerXP", 4400);
  216. alert("Island set to Aztec. Reloading...");
  217. location.reload()
  218. }
  219. else if(c == 6){
  220. localStorage.setItem("playerXP", 7600);
  221. alert("Island set to Volcano. Reloading...");
  222. location.reload()
  223. }
  224. else if(c == 7){
  225. localStorage.setItem("playerXP", 13500);
  226. alert("Island set to Volcano. Reloading...");
  227. location.reload()
  228. }
  229. else if(c != (1 || 2 || 3 || 4 || 5 || 6 || 7)){
  230. alert("Oops! Something went wrong! Please enter a number between 1 and 7!");
  231. location.reload()
  232. }
  233. }
  234. }