Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /****************************************************************************************************
  2. Setting the initial stage of the cheating tool and some quick definitions.
  3. */
  4. const cheats = {};
  5. const cheatState = {
  6. damagemultiplier: 1,
  7. efficiencymultiplier: 1,
  8. afkmultiplier: 1,
  9. cloudz: false,
  10. runescape: false,
  11. godlikes: false,
  12. godlike: {
  13. crit: false,
  14. reach: false,
  15. hp: false,
  16. mp: false,
  17. ability: false,
  18. bosshp: false,
  19. food: false,
  20. hitchance: false,
  21. dmg: false,
  22. buff: false,
  23. },
  24. unlocks: false,
  25. unlock: {
  26. teleports: false,
  27. quickref: false,
  28. tickets: false,
  29. silvpen: false,
  30. goldpen: false,
  31. obolfrag: false,
  32. revive: false,
  33. },
  34. wides: false,
  35. wide: {
  36. mtx: false,
  37. post: false,
  38. guild: false,
  39. task: false,
  40. quest: false,
  41. star: false,
  42. crystal: false,
  43. giant: false,
  44. obol: false,
  45. },
  46. w1s: false,
  47. w1: {
  48. stampcost: false,
  49. anvil: false,
  50. forge: false,
  51. smith: false,
  52. statue: false,
  53. },
  54. cauldrons: false,
  55. cauldron: {
  56. vialrng: false,
  57. vialattempt: false,
  58. bubblecost: false,
  59. vialcost: false,
  60. lvlreq: false,
  61. newbubble: false,
  62. re_speed: false,
  63. liq_rate: false,
  64. },
  65. w3s: false,
  66. w3: {
  67. mobdeath: false,
  68. flagreq: false,
  69. freebuildings: false,
  70. instabuild: false,
  71. booktime: false,
  72. totalflags: false,
  73. buildspd: false,
  74. saltlick: false,
  75. refinery: false,
  76. trapping: false,
  77. book: false,
  78. prayer: false,
  79. shrinehr: false,
  80. globalshrines: false,
  81. worshipspeed: false,
  82. freeworship: false,
  83. },
  84. w4s: false,
  85. w4: {
  86. eggcap: false,
  87. fenceyard: false,
  88. battleslots: false,
  89. petchance: false,
  90. petupgrades: false,
  91. genes: false,
  92. fasteggs: false,
  93. labpx: false,
  94. instameals: false,
  95. instarecipes: false,
  96. luckychef: false,
  97. freekitchens: false,
  98. freeplates: false,
  99. candy: false,
  100. petrng: false,
  101. arena: false,
  102. mainframe: {
  103. enable: false,
  104. 0: 119, // Animal farm: damage bonus (119 is all pets)
  105. 1: 2, // Wired in: uploaded player printer multiplier
  106. 2: 3, // Refinery cycle speed multiplier
  107. 3: 4, // number of alch bubbles to auto upgrade every 24h
  108. 4: 2, // Deathnote/portal kill multiplier
  109. 5: 1, // Shrine world tour activated
  110. 6: 5, // Alchemy liquid capacity multi (-30% speed)
  111. 7: 2, // Stamp bonus multiplier
  112. 8: 1.5, // Spelunker jewel effect multiplier
  113. 9: 210, // Fungi finger pocketer %cash bonus
  114. 10: 2, // Alchemy vial bonus multiplier
  115. 11: 31.5, // Banking fury, %damage multiplier
  116. 12: 1, // enable sigils (this is either 1 or 0)
  117. 13: 50, // % larger connection range
  118. 100: 10, // meal cooking speed multiplier
  119. 101: 0.75, // Animal farm additional damage % per pet
  120. 102: 60, // additional % lab xp
  121. 103: 9, // building slots 1 & 2 get 4.5x build speed
  122. 104: 4.5, // % all stat
  123. 105: 37.5, //additional breeding xp
  124. 106: 3, // kitchens gain a level each day
  125. 107: 3, // number of levels alch bubbles gain each day
  126. 108: 4.5, // % food non consume chance
  127. 109: 45, // % larger connection range for bonuses and jewels
  128. 110: 30, // % extra damage
  129. 111: 42, // % reduced egg incubation
  130. 112: 600, // +base efficiency in all skills
  131. 113: 1.5, //fungi finger pocketer extra cash %
  132. 114: 200, //meal cooking bonus speed %
  133. 115: 45, //pet passive ability speed %
  134. 116: 24, // % additional meal bonus
  135. 117: 1.5 // % additional damage per greened stack
  136. },
  137. //You can set these individually to false to disable them.
  138. chipbonuses: {
  139. enable: false,
  140. "resp": 10, //mob respawn speed bonus
  141. "card1": 1, //double top left card effect (1=yes, 0=no)
  142. "card2": 1, //double bottom right card effect (1=yes, 0=no)
  143. "cryst": 75, //crystal spawn % on kill
  144. "star": 1, //double star sign effects (1=yes, 0=no)
  145. "mkill": 15, //% multikill per tier bonus
  146. "linewidth": 12, //lab line width % bonus
  147. "dmg": 10, //% damage bonus
  148. "move": 30, //mpvement speed bonus,
  149. "acc": 10, //accuracy bonus
  150. "pend": 1, //double pendant bonuses
  151. "key1": 1, //double first keychain bonuses
  152. "troph": 1, //souble trophy bonuses
  153. "def": 10, //bonus defence %
  154. "weappow": 25, //bonus weapon power %
  155. "dr": 60, //bonus drop rarity %
  156. "toteff": 20, //% skilling efficiency bonus
  157. "eff": 250, //base skilling efficiency bonus
  158. "labexp": 30, //% bonus lab xp
  159. "atkspd": 20, //% bonus attack speed
  160. "safk": 15, //skill afk gains bonus %
  161. "fafk": 15, //fight afk gains bonus %
  162. }
  163. },
  164. minigames: false,
  165. minigame: {
  166. mining: false,
  167. catching: false,
  168. fishing: false,
  169. choppin: false,
  170. },
  171. rng: false,
  172. upstones: {
  173. rng: false,
  174. use: false
  175. },
  176. };
  177. // Used to store things like item and card definitions
  178. let dictVals = {};
  179. let setupDone = false;
  180. let fixobj; // An object used to store stuff, for example an un-broken piece of GameAttribute from one character to another
  181. function registerCheat(command, fn) { cheats[command] = fn; }
  182. async function gameReady() {
  183. while (!this["com.stencyl.Engine"] ||
  184. !this["com.stencyl.Engine"].hasOwnProperty("engine") ||
  185. !this["com.stencyl.Engine"].engine.hasOwnProperty("scene") ||
  186. !this["com.stencyl.Engine"].engine.sceneInitialized ||
  187. this["com.stencyl.Engine"].engine.behaviors.behaviors[0].script._CloudLoadComplete !== 1
  188. ) {
  189. console.log("Waiting", this);
  190. await new Promise(resolve => setTimeout(resolve, 1000));
  191. }
  192. await new Promise(resolve => setTimeout(resolve, 1000));
  193. return true;
  194. }
  195. // The main function that executes all cheats
  196. function cheat(action) {
  197. try {
  198. if (!setupDone) return "Cheats not yet initiated, try again in a moment";
  199. const [command, ...params] = action.split(' ');
  200. const foundCheat = cheats[command];
  201. if (foundCheat) {
  202. const result = foundCheat.call(this, params);
  203. return result ?? 'Done.';
  204. } else return `${command} is not a valid option.`;
  205. } catch (error) { return `Error: ${error.stack}`; }
  206. }
  207. /****************************************************************************************************
  208. A proxy setup and all Proxy definitions
  209. */
  210. async function setup() {
  211. if (setupDone) return "Cheat setup complete";
  212. setupDone = true;
  213. await gameReady.call(this);
  214. // setup proxies
  215. setupRngProxy.call(this);
  216. setupCurrenciesOwnedProxy.call(this);
  217. setupArbitraryProxy.call(this);
  218. setupAnvilProxy.call(this);
  219. setupStampCostProxy.call(this);
  220. setupAFKRateProxy.call(this);
  221. setupAlchProxy.call(this);
  222. setupw3StuffProxy.call(this);
  223. setupw4StuffProxy.call(this);
  224. setupOptionsListAccountProxy.call(this);
  225. setupCListProxy.call(this);
  226. setupGameAttrProxy.call(this);
  227. setupQuestProxy.call(this);
  228. setupSmithProxy.call(this);
  229. setupAbilityProxy.call(this);
  230. setupValuesMapProxy.call(this);
  231. setupCloudSaveProxy.call(this);
  232. setupSpaceCandyProxy.call(this);
  233. setupTrappingProxy.call(this);
  234. setupArenaProxy.call(this);
  235. //setupBuffsActiveProxy.call(this);
  236.  
  237. return "Cheat setup complete";
  238. }
  239.  
  240. function setupSpaceCandyProxy() {
  241. const bEngine = this["com.stencyl.Engine"].engine;
  242. const behavior = this["com.stencyl.behavior.Script"];
  243.  
  244. const handler = {
  245. apply: function(originalFn, context, argumentsList) {
  246.  
  247. if (cheatState.w4.candy && argumentsList[0].toString().includes("TIME_CANDY")) {
  248. Reflect.apply(originalFn, context, [function (t) {
  249. originalMap = bEngine.getGameAttribute("CurrentMap");
  250. bEngine.setGameAttribute("CurrentMap", 10);
  251. Reflect.apply(argumentsList[0], context, [t]);
  252. bEngine.setGameAttribute("CurrentMap", originalMap);
  253. }]);
  254. } else {
  255. Reflect.apply(originalFn, context, argumentsList);
  256. }
  257. }
  258. }
  259. const proxy = new Proxy(behavior.prototype.addMouseReleasedListener, handler);
  260.  
  261. behavior.prototype.addMouseReleasedListener = proxy;
  262. }
  263.  
  264. function setupArenaProxy() {
  265. const actorEvents12 = this["scripts.ActorEvents_12"];
  266.  
  267. actorEvents12._customBlock_GetBuffBonuses = new Proxy(actorEvents12._customBlock_GetBuffBonuses, {
  268. apply: function (originalFn, context, argumentsList) {
  269. if ((cheatState.w4s || cheatState.w4.arena) && argumentsList[0] == 370 && argumentsList[1] == 1) return 1;
  270. return Reflect.apply(originalFn, context, argumentsList);
  271. }
  272. });
  273. }
  274.  
  275. function setupRngProxy() {
  276. const behaviour = this["com.stencyl.behavior.Script"];
  277.  
  278. const randomFloatBetween = behaviour.randomFloatBetween;
  279. const handler = {
  280. apply: function (originalFn, context, argumentsList)
  281. {
  282. if (cheatState.rng === "high") return argumentsList[1];
  283. if (cheatState.rng === "low") return argumentsList[0];
  284. return Reflect.apply(originalFn, context, argumentsList);
  285. }
  286. };
  287.  
  288. proxy = new Proxy(randomFloatBetween, handler);
  289.  
  290. behaviour.randomFloatBetween = proxy;
  291. }
  292.  
  293. // Unlock quick references
  294. function setupOptionsListAccountProxy() {
  295. const bEngine = this["com.stencyl.Engine"].engine;
  296. const optionsListAccount = bEngine.getGameAttribute("OptionsListAccount");
  297. const handler = {
  298. get: function(obj, prop) {
  299. if ((cheatState.unlocks || cheatState.unlock.quickref) && Number(prop) === 34) return 0;
  300. if (cheatState.minigames && Number(prop) === 33) return obj[33] || 1;
  301. return Reflect.get(...arguments);
  302. },
  303. set: function(obj, prop, value) {
  304. if (cheatState.minigames && Number(prop) === 33) {
  305. if (obj[33] < value) obj[33] = value;
  306. return true;
  307. } return Reflect.set(...arguments);
  308. }
  309. };
  310. const proxy = new Proxy(optionsListAccount, handler);
  311. bEngine.setGameAttribute("OptionsListAccount", proxy);
  312. }
  313. // Free revival cheat
  314. function setupValuesMapProxy() {
  315. const bEngine = this["com.stencyl.Engine"].engine;
  316. const CurrenciesOwned = bEngine.getGameAttribute("PersonalValuesMap").h;
  317. const handler = {
  318. get: function(obj, prop) {
  319. if ((cheatState.unlocks || cheatState.unlock.revive) && prop === "InstaRevives") return obj.InstaRevives || 10;
  320. return Reflect.get(...arguments);
  321. },
  322. set: function(obj, prop, value) {
  323. if ((cheatState.unlocks || cheatState.unlock.revive) && prop === "InstaRevives"){
  324. if (obj["InstaRevives"] < value) obj["InstaRevives"] = value;
  325. return true;
  326. } return Reflect.set(...arguments);
  327. }
  328. };
  329. const proxy = new Proxy(CurrenciesOwned, handler);
  330. bEngine.getGameAttribute("PersonalValuesMap").h = proxy;
  331. }
  332. // Buffs never run out
  333. function setupBuffsActiveProxy() {
  334. const bEngine = this["com.stencyl.Engine"].engine;
  335. const BuffsActive = bEngine.getGameAttribute("BuffsActive");
  336. const handler = {
  337. get: function(obj, prop) {
  338. if ((cheatState.godlikes || cheatState.godlike.buff) && typeof obj[prop][1] != "undefined") obj[prop][1] = 5; // Trap at 5 seconds left
  339. return Reflect.get(...arguments);
  340. },
  341. set: function(obj, prop, value) {
  342. if ((cheatState.godlikes || cheatState.godlike.buff) && typeof obj[prop][1] != "undefined"){
  343. obj[prop][1] = 5;
  344. return true;
  345. } return Reflect.set(...arguments);
  346. }
  347. };
  348. const proxy = new Proxy(BuffsActive, handler);
  349. bEngine.setGameAttribute("BuffsActive", proxy);
  350. }
  351. // Stop cloud saving, once re-enabled it'll proc a save in 2 seconds.
  352. function setupCloudSaveProxy() {
  353. const bEngine = this["com.stencyl.Engine"].engine;
  354. const CloudSave = bEngine.getGameAttribute("CloudSaveCD");
  355. const handler = {
  356. get: function(obj, prop) {
  357. if (cheatState.cloudz && Number(prop) === 0) return 235;
  358. return Reflect.get(...arguments);
  359. },
  360. set: function(obj, prop, value) {
  361. if (cheatState.cloudz && Number(prop) === 0){
  362. obj[0] = 235;
  363. return true;
  364. } return Reflect.set(...arguments);
  365. }
  366. };
  367. const proxy = new Proxy(CloudSave, handler);
  368. bEngine.setGameAttribute("CloudSaveCD", proxy);
  369.  
  370. }
  371. // Some godlike cheats
  372. function setupGameAttrProxy() {
  373. const bEngine = this["com.stencyl.Engine"].engine;
  374. const gameAttr = bEngine.gameAttributes.h;
  375. const handler = {
  376. get: function(obj, prop) {
  377. if((cheatState.godlikes || cheatState.godlike.hp) && prop === "PlayerHP") return obj.PlayerHP || 1;
  378. if((cheatState.godlikes || cheatState.godlike.mp) && prop === "PlayerMP") return obj.PlayerMP || 1;
  379. if((cheatState.godlikes || cheatState.godlike.bosshp) && prop === "BossHP") return 0;
  380.  
  381. return Reflect.get(...arguments);
  382. },
  383. set: function(obj, prop, value) {
  384. if((cheatState.godlikes || cheatState.godlike.hp) && prop === "PlayerHP"){ if (obj.PlayerHP < value) obj.PlayerHP = value; return true; }
  385. if((cheatState.godlikes || cheatState.godlike.mp) && prop === "PlayerMP"){ if (obj.PlayerMP < value) obj.PlayerMP = value; return true; }
  386. if((cheatState.godlikes || cheatState.godlike.bosshp) && prop === "BossHP"){ if (obj.BossHP < 0) obj.BossHP = 0; return true; }
  387.  
  388.  
  389. return Reflect.set(...arguments);
  390. }
  391. };
  392. const proxy = new Proxy(gameAttr, handler);
  393. bEngine.gameAttributes.h = proxy;
  394. }
  395. // Some more stats, as well as a forge upgrade within this one
  396. function setupArbitraryProxy(){
  397. const ActorEvents12 = this["scripts.ActorEvents_12"];
  398. // 100% crit chance
  399. const CritChance = ActorEvents12._customBlock_CritChance;
  400. const handlerCrit = {
  401. apply: function(originalFn, context, argumentsList) {
  402. if (cheatState.godlike.dmg) return 0; // Disable crits on dmg cap, as it's already capped
  403. if (cheatState.godlikes || cheatState.godlike.crit) return 100;
  404. return Reflect.apply(originalFn, context, argumentsList);
  405. }
  406. };
  407. const proxyCrit = new Proxy(CritChance, handlerCrit);
  408. ActorEvents12._customBlock_CritChance = proxyCrit;
  409. // Reach to 230
  410. const atkReach = ActorEvents12._customBlock_PlayerReach;
  411. const handlerReach = {
  412. apply: function(originalFn, context, argumentsList) {
  413. if (cheatState.godlikes || cheatState.godlike.reach) return 666;
  414. return Reflect.apply(originalFn, context, argumentsList);
  415. }
  416. };
  417. const proxyReach = new Proxy(atkReach, handlerReach);
  418. ActorEvents12._customBlock_PlayerReach = proxyReach;
  419. // Free forge upgrades
  420. const forgeupgr = ActorEvents12._customBlock_ForgeUpdateCosts;
  421. const handlerForge = {
  422. apply: function(originalFn, context, argumentsList) {
  423. if (cheatState.w1s || cheatState.w1.forge) return 0;
  424. return Reflect.apply(originalFn, context, argumentsList);
  425. }
  426. };
  427. const proxyForge = new Proxy(forgeupgr, handlerForge);
  428. ActorEvents12._customBlock_ForgeUpdateCosts = proxyForge;
  429. // Imperfect damage cap on too-OP broken players with overflowing damage
  430. const DamageDealt = ActorEvents12._customBlock_DamageDealed;
  431. const handlerDamage = {
  432. apply: function(originalFn, context, argumentsList) {
  433. const t = argumentsList[0];
  434. if (cheatState.godlike.dmg && t == "Min") return Number.MAX_SAFE_INTEGER;
  435. if (cheatState.godlike.dmg && t == "Max") return Number.MAX_SAFE_INTEGER;
  436. if (cheatState.godlike.dmg && t == "RNG") return Number.MAX_SAFE_INTEGER;
  437. return Reflect.apply(originalFn, context, argumentsList) * (argumentsList[0] == "Max" ? cheatState.damagemultiplier : 1);
  438. }
  439. };
  440. const proxyDamage = new Proxy(DamageDealt, handlerDamage);
  441. ActorEvents12._customBlock_DamageDealed = proxyDamage;
  442.  
  443. // Skill stats
  444. const SkillStats = ActorEvents12._customBlock_SkillStats;
  445. const handlerSkillStats = {
  446. apply: function(originalFn, context, argumentsList) {
  447. const t = argumentsList[0];
  448. if ((cheatState.w3s || cheatState.w3.worshipspeed) && t == "WorshipSpeed") return 5000; // 1000 worship%/h
  449. return Reflect.apply(originalFn, context, argumentsList) * (t.includes("Efficiency") ? cheatState.efficiencymultiplier : 1);
  450. }
  451. };
  452. const proxySkillStats = new Proxy(SkillStats, handlerSkillStats);
  453. ActorEvents12._customBlock_SkillStats = proxySkillStats;
  454. ActorEvents12._customBlock_skillstats2 = new Proxy(ActorEvents12._customBlock_skillstats2, handlerSkillStats);
  455.  
  456. // Some arbitrary stuff
  457. const Arbitrary = ActorEvents12._customBlock_ArbitraryCode;
  458. const handlerArbitrary = {
  459. apply: function(originalFn, context, argumentsList) {
  460. const t = argumentsList[0];
  461. // if (cheatState.w1.statue && t.substring(0, 12) == "StatueExpReq") return 1; // This cheat works, but absolutely destroys your account
  462. if ((cheatState.wides || cheatState.wide.crystal) && t == "CrystalSpawn") return 1; // Crystal mob spawn rate 1
  463. if ((cheatState.wides || cheatState.wide.giant) && t == "GiantMob") return 1; // Giant mob spawn rate 1
  464. if ((cheatState.godlikes || cheatState.godlike.food) && t == "FoodNOTconsume") return 100; // Food never consumed
  465. if ((cheatState.godlikes || cheatState.godlike.hitchance) && t == "HitChancePCT") return 100; // 100% hit chance
  466.  
  467. return Reflect.apply(originalFn, context, argumentsList);
  468. }
  469. };
  470. const proxyArbitrary = new Proxy(Arbitrary, handlerArbitrary);
  471. ActorEvents12._customBlock_ArbitraryCode = proxyArbitrary;
  472.  
  473. const XforThingY = ActorEvents12._customBlock_RunCodeOfTypeXforThingY;
  474. const handlerXforThingY = {
  475. apply: function(originalFn, context, argumentsList) {
  476. const t = argumentsList[0];
  477. if ((cheatState.wides || cheatState.wide.obol) && t == "ObolRerollCostMoney") return 0;
  478. if ((cheatState.wides || cheatState.wide.obol) && t == "ObolRerollCostFrag") return 0;
  479. return Reflect.apply(originalFn, context, argumentsList);
  480. }
  481. };
  482. const proxyXforThingY = new Proxy(XforThingY, handlerXforThingY);
  483. ActorEvents12._customBlock_RunCodeOfTypeXforThingY = proxyXforThingY;
  484. }
  485. // A bunch of currency related cheats
  486. function setupCurrenciesOwnedProxy() {
  487. const bEngine = this["com.stencyl.Engine"].engine;
  488. const currencies = bEngine.getGameAttribute("CurrenciesOwned").h;
  489. const handler = {
  490. get: function(obj, prop) {
  491. if ((cheatState.unlocks || cheatState.unlock.teleports) && prop === 'WorldTeleports') return obj.WorldTeleports || 1;
  492. if ((cheatState.unlocks || cheatState.unlock.tickets) && prop === 'ColosseumTickets') return obj.ColosseumTickets || 1;
  493. if ((cheatState.unlocks || cheatState.unlock.obolfrag) && prop === 'ObolFragments') return obj.ObolFragments || 9001; // It's over nine thousand
  494. if ((cheatState.unlocks || cheatState.unlock.silvpen) && prop === 'SilverPens') return obj.SilverPens || 1;
  495. // Not a safe cheat as golden pens aren't released yet,
  496. // Only for people that use the manual cheat: chng bEngine.getGameAttribute("CurrenciesOwned").h["GoldPens"]=100
  497. //if ((cheatState.unlocks || cheatState.unlock.goldpen) && prop === 'GoldPens') return obj.GoldPens || 1;
  498. return Reflect.get(...arguments);
  499. },
  500. set: function(obj, prop, value) {
  501. if ((cheatState.unlocks || cheatState.unlock.teleports) && prop === 'WorldTeleports') return true; // Do nothing
  502. if ((cheatState.unlocks || cheatState.unlock.tickets) && prop === 'ColosseumTickets') {
  503. if (obj.ColosseumTickets < value) obj.ColosseumTickets = value;
  504. return true;
  505. } if ((cheatState.unlocks || cheatState.unlock.silvpen) && prop === 'SilverPens') {
  506. if(obj.SilverPens < value) obj.SilverPens = value;
  507. return true;
  508. } if ((cheatState.unlocks || cheatState.unlock.GoldPens) && prop === 'GoldPens') {
  509. if(obj.GoldPens < value) obj.GoldPens = value;
  510. return true;
  511. } if ((cheatState.unlocks || cheatState.unlock.obolfrag) && prop === 'ObolFragments') {
  512. if(obj.ObolFragments < value) obj.ObolFragments = value;
  513. return true;
  514. } return Reflect.set(...arguments);
  515. }
  516. };
  517. const proxy = new Proxy(currencies, handler);
  518. bEngine.getGameAttribute("CurrenciesOwned").h = proxy;
  519. }
  520. // Nullify stamp upgrade cost
  521. function setupStampCostProxy() {
  522. const bEngine = this["com.stencyl.Engine"].engine;
  523. const actorEvents124 = this["scripts.ActorEvents_124"];
  524. const stampCostFn = actorEvents124._customBlock_StampCostss;
  525. const handler = {
  526. apply: function(originalFn, context, argumentsList) {
  527. if (cheatState.w1s || cheatState.w1.stampcost) {
  528. const tab = argumentsList[0];
  529. const index = argumentsList[1];
  530. const currentStampLevel = bEngine.getGameAttribute("StampLevel")[tab][index];
  531. const maxStampLevel = bEngine.getGameAttribute("StampLevelMAX")[tab][index];
  532. if (currentStampLevel < maxStampLevel) return ['Money', 0];
  533. return ['PremiumGem', 0];
  534. } return Reflect.apply(originalFn, context, argumentsList);
  535. }
  536. };
  537. const proxy = new Proxy(stampCostFn, handler);
  538. actorEvents124._customBlock_StampCostss = proxy;
  539. }
  540.  
  541. function setupAFKRateProxy() {
  542. const actorEvents124 = this["scripts.ActorEvents_124"];
  543. const afkRate = actorEvents124._customBlock_AFKgainrates;
  544. const handler = {
  545. apply: function(originalFn, context, argumentsList) {
  546. return Reflect.apply(originalFn, context, argumentsList) * cheatState.afkmultiplier;
  547. }
  548. };
  549. const proxy = new Proxy(afkRate, handler);
  550. actorEvents124._customBlock_AFKgainrates = proxy;
  551. }
  552.  
  553. // Nullify anvil upgrade cost and duration
  554. function setupAnvilProxy() {
  555. const ActorEvents189 = this["scripts.ActorEvents_189"];
  556. const _AnvilProduceStats = ActorEvents189._customBlock_AnvilProduceStats;
  557. const handler = {
  558. apply: function(originalFn, context, argumentsList) {
  559. if (cheatState.w1s || cheatState.w1.anvil) {
  560. const t = argumentsList[0];
  561. if (t == "Costs1") return 0;
  562. if (t == "Costs2") return 0;
  563. if (t == "ProductionSpeed") return 1000000;
  564. else return Reflect.apply(originalFn, context, argumentsList);
  565. } return Reflect.apply(originalFn, context, argumentsList);
  566. }
  567. };
  568. const proxy = new Proxy(_AnvilProduceStats, handler);
  569. ActorEvents189._customBlock_AnvilProduceStats = proxy;
  570. }
  571. // Nullify trapping cost
  572. function setupTrappingProxy() {
  573. const bEngine = this["com.stencyl.Engine"].engine;
  574. const ActorEvents189 = this["scripts.ActorEvents_189"];
  575. ActorEvents189._customBlock_1second = new Proxy(ActorEvents189._customBlock_1second, {
  576. apply: function(originalFn, context, argumentsList) {
  577. if(cheatState.w3.trapping) {
  578. let placedTraps = bEngine.getGameAttribute("PlacedTraps");
  579. for (let i in placedTraps) {
  580. if(placedTraps[i][0] !== -1) {
  581. placedTraps[i][2] = placedTraps[i][6];
  582. }
  583. }
  584. const playerDatabase = bEngine.getGameAttribute("PlayerDATABASE").h;
  585. for (let name in playerDatabase) {
  586. for (let i in playerDatabase[name].h.PldTraps) {
  587. playerDatabase[name].h.PldTraps[i][2] = playerDatabase[name].h.PldTraps[i][6];
  588. }
  589. }
  590. }
  591. return Reflect.apply(originalFn, context, argumentsList);
  592. }
  593. });
  594. }
  595. // Ability tweaking cheat
  596. function setupAbilityProxy() {
  597. const CustomMaps = this["scripts.CustomMaps"];
  598. const atkMoveMap = JSON.parse(JSON.stringify(this["scripts.CustomMaps"].atkMoveMap.h));
  599. for(const [key, value] of Object.entries(atkMoveMap)){
  600. value.h["cooldown"] = 0;
  601. value.h["castTime"] = .1;
  602. value.h["manaCost"] = 0;
  603. atkMoveMap[key] = value;
  604. }
  605. const handler = {
  606. get: function(obj, prop) {
  607. if(cheatState.godlikes || cheatState.godlike.ability) return atkMoveMap[prop];
  608. return Reflect.get(...arguments);
  609. }
  610. };
  611. const proxy = new Proxy(CustomMaps.atkMoveMap.h, handler);
  612. CustomMaps.atkMoveMap.h = proxy;
  613. }
  614. // Nullify smithing cost
  615. function setupSmithProxy() {
  616. const bEngine = this["com.stencyl.Engine"].engine;
  617. const sizeref = bEngine.getGameAttribute("CustomLists").h["ItemToCraftEXP"];
  618. const tCustomList = this["scripts.CustomLists"];
  619.  
  620. const NewReqs = []; // This'll be the new Array where we write our stuff to
  621. const size = []; // Time to obtain the Array lengths (e.g. amount of items per smithing tab)
  622. for(const [index, element] of Object.entries(sizeref)) size.push(element.length);
  623. // Yup we're using double square brackets, cause each item could require multiple materials to craft, while we only need to fill in one
  624. for(i=0; i < size.length; i++) NewReqs.push(new Array(size[i]).fill([["Copper", "0"]]));
  625. const handler = {
  626. apply: function(originalFn, context, argumentsList) {
  627. if (cheatState.w1s || cheatState.w1.smith) return NewReqs;
  628. return Reflect.apply(originalFn, context, argumentsList);
  629. }
  630. };
  631. const proxy = new Proxy(tCustomList["ItemToCraftCostTYPE"], handler);
  632. tCustomList["ItemToCraftCostTYPE"] = proxy;
  633. }
  634. // Modification of many functions that return static N-dimensional Arrays
  635. function setupCListProxy() {
  636. const bEngine = this["com.stencyl.Engine"].engine;
  637. const CList = bEngine.getGameAttribute("CustomLists").h;
  638.  
  639. const FuncDict = {
  640. AlchemyVialItemsPCT: new Array(CList.AlchemyVialItemsPCT.length).fill(99), // Vials unlock at rollin 1+
  641. SaltLicks: ChangeND(bEngine,2,"SaltLicks","0",[2]), // Nullify Saltlick upgrade cost
  642. RefineryInfo: ChangeND(bEngine,2,"RefineryInfo","0",[6,7,8,9,10,11]), // Nullify refinery cost
  643. PrayerInfo: ChangeND(bEngine,2, // Nullify Prayer Curses and upgrade cost
  644. ChangeND(bEngine,2,"PrayerInfo","0",[4,6]),
  645. "None._Even_curses_need_time_off_every_now_and_then.",[2]),
  646. MTXinfo: ChangeND(bEngine,4,
  647. ChangeND(bEngine,4,"MTXinfo",0,[3,7]),
  648. function(t) {return Math.max(t, 15);},[5]), // Nullify MTX cost
  649. PostOfficePossibleOrders: ChangeND(bEngine,4,"PostOfficePossibleOrders","0",[1]), // Nullify post office order cost
  650. GuildGPtasks: ChangeND(bEngine,2,"GuildGPtasks","0",[1]), // Nullify guild task requirements
  651. TaskDescriptions: ChangeND(bEngine,3,"TaskDescriptions","0",[5,6,7,8,9,10,11,12,13,14]), // Nullify task requirements
  652. SSignInfoUI: ChangeND(bEngine,2,"SSignInfoUI","0",[4]), // Nullify star sign unlock req
  653. WorshipBASEinfos: ChangeND(bEngine,2,"WorshipBASEinfos", 0,[6]) // Nullify worship cost
  654. };
  655. const handler = {
  656. get: function(obj, prop) {
  657. if ((cheatState.cauldrons || cheatState.cauldron.vialrng) && prop === "AlchemyVialItemsPCT") return FuncDict[prop];
  658. if ((cheatState.w3s || cheatState.w3.saltlick) && prop === "SaltLicks") return FuncDict[prop];
  659. if ((cheatState.w3s || cheatState.w3.refinery) && prop === "RefineryInfo") return FuncDict[prop];
  660. if ((cheatState.w3s || cheatState.w3.prayer) && prop === "PrayerInfo") return FuncDict[prop];
  661. if ((cheatState.wides || cheatState.wide.mtx) && prop === "MTXinfo") return FuncDict[prop];
  662. if ((cheatState.wides || cheatState.wide.post) && prop === "PostOfficePossibleOrders") return FuncDict[prop];
  663. if ((cheatState.wides || cheatState.wide.guild) && prop === "GuildGPtasks") return FuncDict[prop];
  664. if ((cheatState.wides || cheatState.wide.task) && prop === "TaskDescriptions") return FuncDict[prop];
  665. if ((cheatState.wides || cheatState.wide.star) && prop === "SSignInfoUI") return FuncDict[prop];
  666. if ((cheatState.w3s || cheatState.w3.freeworship) && prop === "WorshipBASEinfos") return FuncDict[prop];
  667. return Reflect.get(...arguments);
  668. }
  669. };
  670. const proxy = new Proxy(CList, handler);
  671. bEngine.getGameAttribute("CustomLists").h = proxy;
  672. }
  673. // The proxy that allows us to enable/disable quest item requirement nullifications whenever we like
  674. function setupQuestProxy() {
  675. const dialogueDefs = this["scripts.DialogueDefinitions"];
  676. const dialogueDefsC = JSON.parse(JSON.stringify( this["scripts.DialogueDefinitions"].dialogueDefs.h ));
  677. for(const [key, value] of Object.entries(dialogueDefsC)) // Go over all the quest-giving NPCs
  678. for(i=0; i < value[1].length; i++) // Go over all the addLine elements of that NPC
  679. // Notice that inside each value (e.g. NPC object), the 1st element is where all numeric stuff reside.
  680. // The 0th element holds the textual dialogue, which is not what we're looking for
  681. if(value[1][i].length == 9){ // Both addLine_ItemsAndSpaceRequired and addLine_Custom have nine elements within
  682. // Iterate over an unknown amount of req. values/Arrays
  683. if(value[1][i][2] === value[1][i][8]) // This is addLine_Custom
  684. for(j=0; j < value[1][i][3].length; j++){
  685. dialogueDefsC[key][1][i][3][j][1] = 0;
  686. dialogueDefsC[key][1][i][3][j][3] = 0;
  687. }
  688. else for(j=0; j < value[1][i][3].length; j++) // This is addLine_ItemsAndSpaceRequired
  689. dialogueDefsC[key][1][i][3][j] = 0;
  690. }
  691. const handler = {
  692. get: function(obj, prop) {
  693. if (cheatState.wides || cheatState.wide.quest) return dialogueDefsC[prop];
  694. return Reflect.get(...arguments);
  695. }
  696. };
  697. const proxy = new Proxy(dialogueDefs.dialogueDefs.h, handler);
  698. dialogueDefs.dialogueDefs.h = proxy;
  699. }
  700. // Alchemy cheats
  701. function setupAlchProxy() {
  702. const bEngine = this["com.stencyl.Engine"].engine;
  703. const ActorEvents189 = this["scripts.ActorEvents_189"];
  704. // No vial attempt reduction
  705. const CauldronP2W = bEngine.getGameAttribute("CauldronP2W");
  706. const handlerP2W = {
  707. get: function(obj, prop) {
  708. if ((cheatState.cauldron.vialattempt || cheatState.cauldrons) && obj[5][0] < obj[5][1]) {
  709. obj[5][0] = obj[5][1];
  710. return obj;
  711. } return Reflect.get(...arguments);
  712. }
  713. };
  714. const proxyP2W = new Proxy(CauldronP2W, handlerP2W);
  715. bEngine.setGameAttribute("CauldronP2W", proxyP2W);
  716. // Nullify all cauldron costs and durations (except P2W)
  717. const CauldronStats = ActorEvents189._customBlock_CauldronStats;
  718. const handlerStats = {
  719. apply: function(originalFn, context, argumentsList) {
  720. const t = argumentsList[0];
  721. if ((cheatState.cauldrons || cheatState.cauldron.bubblecost) && t == "CauldronCosts") return 0; // Nullified cauldron cost
  722. if ((cheatState.cauldrons || cheatState.cauldron.vialcost) && t == "VialCosts") return 0; // Nullified vial cost
  723. if ((cheatState.cauldrons || cheatState.cauldron.lvlreq) && t == "CauldronLvsBrewREQ") return 0; // Nullified brew reqs
  724. if ((cheatState.cauldrons || cheatState.cauldron.newbubble) && t == "PctChanceNewBubble") return 1000000; // Big enough new bubble chance
  725. if ((cheatState.cauldrons || cheatState.cauldron.re_speed) && t == "ResearchSpeed") return 10000; // Instant research speed
  726. if ((cheatState.cauldrons || cheatState.cauldron.liq_rate) && t == "LiquidHRrate") return 10000; // Quick liquid
  727. return Reflect.apply(originalFn, context, argumentsList);
  728. }
  729. };
  730. const proxyStats = new Proxy(CauldronStats, handlerStats);
  731. ActorEvents189._customBlock_CauldronStats = proxyStats;
  732. }
  733. // w3 cheats
  734. function setupw3StuffProxy() {
  735. const bEngine = this["com.stencyl.Engine"].engine;
  736. const actorEvents345 = this["scripts.ActorEvents_345"];
  737. // Nullification of all costs inside the workbench
  738. const WorkbenchStuff = actorEvents345._customBlock_WorkbenchStuff;
  739. const handlerWb = {
  740. apply: function(originalFn, context, argumentsList) {
  741. const t = argumentsList[0];
  742. if ((cheatState.w3s || cheatState.w3.flagreq) && t == "FlagReq") return 0; // Nullified flag unlock time
  743. if ((cheatState.w3s || cheatState.w3.freebuildings) && (t == "TowerSaltCost" || t == "TowerMatCost")) return 0; // Tower cost nullification
  744. if ((cheatState.w3s || cheatState.w3.instabuild) && t == "TowerBuildReq") return 0; // Instant build/upgrade
  745. if ((cheatState.w3s || cheatState.w3.booktime) && t == "BookReqTime") return 1; // Book/second, holds shadow ban danger and could one day be replaced
  746. if ((cheatState.w3s || cheatState.w3.totalflags) && t == "TotalFlags") return 10; // Total amnt of placeable flags
  747. if ((cheatState.w3s || cheatState.w3.buildspd) && t == "PlayerBuildSpd") return 1000000; // Buildrate on cogs
  748. if (cheatState.w3.shrinehr && t == "ShrineHrREQ") return 0.5; // Shrine lvl up time reduced to 0.5 hour
  749. // The minimum level talent book from the library is equivalent to the max level
  750. if ((cheatState.w3s || cheatState.w3.book) && t == "minBookLv"){ argumentsList[0] = "maxBookLv"; return Reflect.apply(originalFn, context, argumentsList); }
  751. return Reflect.apply(originalFn, context, argumentsList);
  752. }
  753. };
  754. const proxyWb = new Proxy(WorkbenchStuff, handlerWb);
  755. actorEvents345._customBlock_WorkbenchStuff = proxyWb;
  756. // Worship mobs die on spawn
  757. const _customBlock_2inputsFn = actorEvents345._customBlock_2inputs;
  758. const handlerWs = {
  759. apply: function(originalFn, context, argumentsList) {
  760. if (cheatState.w3.mobdeath || cheatState.w3s)
  761. return "Worshipmobdeathi" == true ? 0 : 0;
  762. return Reflect.apply(originalFn, context, argumentsList);
  763. }
  764. };
  765. const proxyWorship = new Proxy(_customBlock_2inputsFn, handlerWs);
  766. actorEvents345._customBlock_2inputs = proxyWorship;
  767.  
  768. const shrineInfo = bEngine.getGameAttribute("ShrineInfo");
  769. for(const i in shrineInfo) {
  770. if(typeof shrineInfo[i] == 'object') {
  771. shrineInfo[i] = new Proxy(shrineInfo[i], {
  772. get: function (original, j) {
  773. return cheatState.w3.globalshrines && j == 0 ? bEngine.getGameAttribute("CurrentMap") : original[j];
  774. }
  775. });
  776. }
  777. }
  778. }
  779.  
  780. // w4 cheats
  781. function setupw4StuffProxy() {
  782. const actorEvents345 = this["scripts.ActorEvents_345"];
  783. const actorEvents189 = this["scripts.ActorEvents_189"];
  784.  
  785. actorEvents345._customBlock_Breeding = new Proxy(actorEvents345._customBlock_Breeding, {
  786. apply: function(originalFn, context, argumentsList) {
  787. const t = argumentsList[0];
  788. if ((cheatState.w4s || cheatState.w4.eggcap) && t == "TotalEggCapacity") return 13; // 13 eggs
  789. if ((cheatState.w4s || cheatState.w4.fenceyard) && t == "FenceYardSlots") return 27; // 27 fenceyard slots
  790. if ((cheatState.w4s || cheatState.w4.battleslots) && t == "PetBattleSlots") return 6; // 6 battle slots
  791. if ((cheatState.w4s || cheatState.w4.petchance) && t == "TotalBreedChance") return 1; // 100% new pet chance
  792. if ((cheatState.w4s || cheatState.w4.genes) && t == "GeneticCost") return 0; // 0 gene upgrades
  793. if ((cheatState.w4s || cheatState.w4.fasteggs) && t == "TotalTimeForEgg") return 1; // fast eggs
  794. if ((cheatState.w4s || cheatState.w4.petupgrades) && t == "PetUpgCostREAL") return 0; // free pet upgrades
  795. if ((cheatState.w4s || cheatState.w4.petrng) && t == "PetQTYonBreed") {
  796. cheatState.rng = "low";
  797. var power = Reflect.apply(originalFn, context, argumentsList);
  798. cheatState.rng = false;
  799. return Math.round(power * (1 + (Math.random() * 0.1)));
  800. }; // max power pets
  801. return Reflect.apply(originalFn, context, argumentsList);
  802. }
  803. });
  804.  
  805. actorEvents345._customBlock_Labb = new Proxy(actorEvents345._customBlock_Labb, {
  806. apply: function(originalFn, context, argumentsList) {
  807. const t = argumentsList[0];
  808. if ((cheatState.w4s || cheatState.w4.labpx) && (t == "Dist" || t == "BonusLineWidth")) return 1000; // long lab connections
  809. return Reflect.apply(originalFn, context, argumentsList);
  810. }
  811. });
  812.  
  813. actorEvents345._customBlock_CookingR = new Proxy(actorEvents345._customBlock_CookingR, {
  814. apply: function(originalFn, context, argumentsList) {
  815. const t = argumentsList[0];
  816. if ((cheatState.w4s || cheatState.w4.instameals) && t == "CookingReqToCook") return 1; // super fast food
  817. if ((cheatState.w4s || cheatState.w4.instarecipes) && t == "CookingFireREQ") return 1; // super fast recipes
  818. if ((cheatState.w4s || cheatState.w4.luckychef) && t == "CookingNewRecipeOdds") return 4 == argumentsList[1] ? 1 : 5 == argumentsList[1] ? 0 : Reflect.apply(originalFn, context, argumentsList); // always cook a new recipe
  819. if ((cheatState.w4s || cheatState.w4.freekitchens) && (t == "CookingNewKitchenCoinCost" || t == "CookingUpgSpiceCostQty")) return 0; // free kitchens and upgrades
  820. if ((cheatState.w4s || cheatState.w4.freeplates) && t == "CookingMenuMealCosts") return 0; //free dinner table upgrades
  821. return Reflect.apply(originalFn, context, argumentsList);
  822. }
  823. });
  824.  
  825. actorEvents345._customBlock_MainframeBonus = new Proxy(actorEvents345._customBlock_MainframeBonus, {
  826. apply: function (originalFn, context, argumentsList) {
  827. if (cheatState.w4.mainframe.enable && cheatState.w4.mainframe[argumentsList[0]]) {
  828. return cheatState.w4.mainframe[argumentsList[0]];
  829. }
  830. return Reflect.apply(originalFn, context, argumentsList);
  831. }
  832. });
  833.  
  834. actorEvents189._customBlock_chipBonuses = new Proxy(actorEvents189._customBlock_chipBonuses, {
  835. apply: function (originalFn, context, argumentsList) {
  836. if (cheatState.w4.chipbonuses.enable && cheatState.w4.chipbonuses[argumentsList[0]]) {
  837. return cheatState.w4.chipbonuses[argumentsList[0]];
  838. }
  839. return Reflect.apply(originalFn, context, argumentsList);
  840. }
  841. });
  842. }
  843.  
  844. // Minigame cheats
  845. function setupMinigameProxy() {
  846. const bEngine = this["com.stencyl.Engine"].engine;
  847.  
  848. const miningGameOver = bEngine.getGameAttribute("PixelHelperActor")[4].getValue('ActorEvents_229', '_customEvent_MiningGameOver');
  849. const handlerMining = {
  850. apply: function(originalFn, context, argumentsList) {
  851. if (cheatState.minigame.mining) return; // Do nothing when game over
  852. return Reflect.apply(originalFn, context, argumentsList);
  853. }
  854. };
  855. const proxyMining = new Proxy(miningGameOver, handlerMining);
  856. bEngine.getGameAttribute("PixelHelperActor")[4].setValue('ActorEvents_229', '_customEvent_MiningGameOver', proxyMining);
  857.  
  858. const fishingGameOver = bEngine.getGameAttribute("PixelHelperActor")[4].getValue('ActorEvents_229', '_customEvent_FishingGameOver');
  859. const handlerFishing = {
  860. apply: function(originalFn, context, argumentsList) {
  861. if (cheatState.minigame.fishing) return; // Do nothing when game over
  862. return Reflect.apply(originalFn, context, argumentsList);
  863. }
  864. };
  865. const proxyFishing = new Proxy(fishingGameOver, handlerFishing);
  866. bEngine.getGameAttribute("PixelHelperActor")[4].setValue('ActorEvents_229', '_customEvent_FishingGameOver', proxyFishing);
  867. }
  868. // Static fly and hoop positions
  869. function setupCatchingMinigameProxy() {
  870. const bEngine = this["com.stencyl.Engine"].engine;
  871.  
  872. const catchingGameGenInfo = bEngine.getGameAttribute("PixelHelperActor")[4].getValue('ActorEvents_229', '_GenInfo');
  873. const handler = {
  874. get: function(originalObject, property) {
  875. if (cheatState.minigame.catching) {
  876. if (Number(property) === 31) return 70;
  877. if (Number(property) === 33) return [95, 95, 95, 95, 95];
  878. } return Reflect.get(...arguments);
  879. }
  880. };
  881. const proxyCatching = new Proxy(catchingGameGenInfo, handler);
  882. bEngine.getGameAttribute("PixelHelperActor")[4].setValue('ActorEvents_229', '_GenInfo', proxyCatching);
  883. }
  884. // Chopping minigame: Whole bar filled with gold zone
  885. function setupGeneralInfoProxy() {
  886. const bEngine = this["com.stencyl.Engine"].engine;
  887. const generalInfo = bEngine.getGameAttribute("PixelHelperActor")[1].getValue("ActorEvents_116", "_GeneralINFO");
  888. const handler = {
  889. get: function(orignalObject, property) {
  890. if (cheatState.minigame.choppin && Number(property) === 7)
  891. return [100, -1, 0, 2, 0, 220, -1, 0, -1, 0, -1, 0, 0, 220, 0, 0, 1];
  892. return Reflect.get(...arguments);
  893. }
  894. };
  895. const proxyChopping = new Proxy(generalInfo, handler);
  896. bEngine.getGameAttribute("PixelHelperActor")[1].setValue("ActorEvents_116", "_GeneralINFO", proxyChopping);
  897. }
  898.  
  899. /****************************************************************************************************
  900. We'll start things off with the relatively safe cheats.
  901. Though the drop function itself is safe, dropping unreleased items obviously isn't!
  902. */
  903. // Show all available cheats, this one's as safe as it can get xD
  904. registerCheat('cheats', function (params) {
  905. let cheatsAvailable = [];
  906. Object.keys(cheats).forEach(cheat => {
  907. cheatsAvailable.push(cheat);
  908. });
  909. cheatsAvailable.forEach(cheat => {
  910. if (cheatState.hasOwnProperty(cheat) && typeof cheatState[cheat]) {
  911. Object.keys(cheatState[cheat]).forEach(subcheat => {
  912. cheatsAvailable.push(cheat + " " + subcheat);
  913. });
  914. }
  915. })
  916. return cheatsAvailable.join("\n");
  917. });
  918. // The OG-drop function that we all love
  919. registerCheat('drop', function (params) {
  920. const bEngine = this["com.stencyl.Engine"].engine;
  921. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  922. const actorEvents189 = this["scripts.ActorEvents_189"];
  923. const character = bEngine.getGameAttribute("OtherPlayers").h[bEngine.getGameAttribute("UserInfo")[0]];
  924.  
  925. const item = params[0];
  926. const amount = params[1] || 1;
  927. try {
  928. const itemDefinition = itemDefs[item];
  929. if (itemDefinition) {
  930. let x = character.getXCenter()
  931. let y = character.getValue("ActorEvents_20", "_PlayerNode");
  932. if(item.includes("SmithingRecipes")) actorEvents189._customBlock_DropSomething(item, 0, amount, 0, 2, y, 0, x, y);
  933. else actorEvents189._customBlock_DropSomething(item, amount, 0, 0, 2, y, 0, x, y);
  934. return `Dropped ${itemDefinition.h.displayName.replace(/_/g, ' ')}. (x${amount})`;
  935. } else return `No item found for '${item}'`;
  936. } catch (err) { return `Error: ${err}`; }
  937. });
  938. // Spawn any monster you like: Be careful with what you spawn!
  939. registerCheat('spawn', function(params) {
  940. const bEngine = this["com.stencyl.Engine"].engine;
  941. const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
  942. const ActorEvents124 = this["scripts.ActorEvents_124"];
  943. const character = bEngine.getGameAttribute("OtherPlayers").h[bEngine.getGameAttribute("UserInfo")[0]];
  944. const monster = params[0];
  945. const spawnAmnt = params[1] || 1;
  946. try{
  947. const monsterDefinition = monsterDefs[monster];
  948. if(monsterDefinition){
  949. let x = character.getXCenter();
  950. let y = character.getValue("ActorEvents_20", "_PlayerNode");
  951. for(let i=0; i<spawnAmnt; i++) ActorEvents124._customBlock_CreateMonster(monster, y, x);
  952. return `Spawned ${monsterDefinition.h["Name"].replace(/_/g, ' ')} ${spawnAmnt} time(s)`
  953. } else return `No monster found for '${monster}'`;
  954. } catch (err) { return `Error: ${err}`; }
  955. });
  956. // The OG portal unlock command
  957. registerCheat('unlock', function(params) {
  958. const bEngine = this["com.stencyl.Engine"].engine;
  959. if(params[0]){ // Execute sub-commands individually
  960. if (params && params[0] === 'portals') {
  961. bEngine.getGameAttribute("KillsLeft2Advance").map(entry => {
  962. for(i=0; i < entry.length; i++) entry[i] = 0;
  963. return entry; });
  964. return `The portals have been unlocked!`;
  965. }
  966. if (params && params[0] === 'quickref') {
  967. cheatState.unlock.quickref = !cheatState.unlock.quickref;
  968. return `${cheatState.unlock.quickref ? 'Activated' : 'Deactived'} quickref.`
  969. }
  970. if (params && params[0] === 'teleports') {
  971. cheatState.unlock.teleports = !cheatState.unlock.teleports;
  972. return `${cheatState.unlock.teleports ? 'Activated' : 'Deactived'} free teleports.`
  973. }
  974. if (params && params[0] === 'tickets') {
  975. cheatState.unlock.tickets = !cheatState.unlock.tickets;
  976. return `${cheatState.unlock.tickets ? 'Activated' : 'Deactived'} free colosseum tickets.`
  977. }
  978. if (params && params[0] === 'silvpen') {
  979. cheatState.unlock.silvpen = !cheatState.unlock.silvpen;
  980. return `${cheatState.unlock.silvpen ? 'Activated' : 'Deactived'} free silver pens.`
  981. }
  982. if (params && params[0] === 'goldpen') {
  983. cheatState.unlock.goldpen = !cheatState.unlock.goldpen;
  984. return `${cheatState.unlock.goldpen ? 'Activated' : 'Deactived'} free golden pens (if you have at least one xD).`
  985. }
  986. if (params && params[0] === 'obolfrag') {
  987. cheatState.unlock.obolfrag = !cheatState.unlock.obolfrag;
  988. return `${cheatState.unlock.obolfrag ? 'Activated' : 'Deactived'} free obol fragments.`
  989. }
  990. if (params && params[0] === 'revive') {
  991. cheatState.unlock.revive = !cheatState.unlock.revive;
  992. return `${cheatState.unlock.revive ? 'Activated' : 'Deactived'} unlimited revival attempts.`
  993. }
  994. return `Wrong sub-command, use one of these:\nportals, ${Object.keys(cheatState.unlock).join(", ")}`;
  995. } else{ // All Proxy cheats, so everything except portals
  996. if(cheatState.unlocks){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
  997. cheatState.unlock.quickref = false;
  998. cheatState.unlock.teleports = false;
  999. cheatState.unlock.teleports = false;
  1000. cheatState.unlock.silvpen = false;
  1001. cheatState.unlock.goldpen = false;
  1002. cheatState.unlock.obolfrag = false;
  1003. cheatState.unlock.revive = false;
  1004. } cheatState.unlocks = !cheatState.unlocks;
  1005. return `${cheatState.unlocks ? 'Activated' : 'Deactived'} quickref & free teleports, colosseum tickets, silver/gold pens.`;
  1006. }
  1007. });
  1008. // Minigame cheats
  1009. registerCheat('minigame', function (params) {
  1010. if (!params || params.length === 0) {
  1011. cheatState.minigames = !cheatState.minigames;
  1012. return `${cheatState.minigames ? 'Activated' : 'Deactived'} unlimited minigames.`;
  1013. } else {
  1014. // setup needs to be repeated, because currently swapping players would break the setup.
  1015. setupMinigameProxy.call(this);
  1016. setupCatchingMinigameProxy.call(this);
  1017. setupGeneralInfoProxy.call(this);
  1018. if (params && params[0] === 'mining') {
  1019. cheatState.minigame.mining = !cheatState.minigame.mining;
  1020. return `${cheatState.minigame.mining ? 'Activated' : 'Deactived'} minigame mining.`;
  1021. }
  1022. if (params && params[0] === 'fishing') {
  1023. cheatState.minigame.fishing = !cheatState.minigame.fishing;
  1024. return `${cheatState.minigame.fishing ? 'Activated' : 'Deactived'} minigame fishing.`;
  1025. }
  1026. if (params && params[0] === 'catching') {
  1027. cheatState.minigame.catching = !cheatState.minigame.catching;
  1028. return `${cheatState.minigame.catching ? 'Activated' : 'Deactived'} minigame catching.`;
  1029. }
  1030. if (params && params[0] === 'choppin') {
  1031. cheatState.minigame.choppin = !cheatState.minigame.choppin;
  1032. return `${cheatState.minigame.choppin ? 'Activated' : 'Deactived'} minigame choppin.`;
  1033. }
  1034. }
  1035.  
  1036. return `${params ? params[0] : ''} not supported.`;
  1037. });
  1038. /****************************************************************************************************
  1039. The following commands have not been tested properly and/or are definitely dangerous to use
  1040. Use these only if you don't care about shadow ban and/or have the confidence in some...
  1041. Functions such as spawn, godlike and nullify don't directly modify the account info...
  1042. ...and may be safe to use to some degree. (No guarantees!!)
  1043. */
  1044. // Account-wide cheats
  1045. registerCheat('wide', function(params) {
  1046. if(params[0]){
  1047. if (params && params[0] === 'mtx') {
  1048. cheatState.wide.mtx = !cheatState.wide.mtx;
  1049. return `${cheatState.wide.mtx ? 'Activated' : 'Deactived'} mtx shop cost nullification.`;
  1050. }
  1051. if (params && params[0] === 'post') {
  1052. cheatState.wide.post = !cheatState.wide.post;
  1053. return `${cheatState.wide.post ? 'Activated' : 'Deactived'} post office cost nullification.`;
  1054. }
  1055. if (params && params[0] === 'guild') {
  1056. cheatState.wide.guild = !cheatState.wide.guild;
  1057. return `${cheatState.wide.guild ? 'Activated' : 'Deactived'} guild task cost nullification.`;
  1058. }
  1059. if (params && params[0] === 'task') {
  1060. cheatState.wide.task = !cheatState.wide.task;
  1061. return `${cheatState.wide.task ? 'Activated' : 'Deactived'} task cost nullification.`;
  1062. }
  1063. if (params && params[0] === 'quest') {
  1064. cheatState.wide.quest = !cheatState.wide.quest; // Nullifies quest item requirements (doesn't nullify level requirements)
  1065. return `${cheatState.wide.quest ? 'Activated' : 'Deactived'} quest item requirement nullification.`;
  1066. }
  1067. if (params && params[0] === 'star') {
  1068. cheatState.wide.star = !cheatState.wide.star;
  1069. return `${cheatState.wide.star ? 'Activated' : 'Deactived'} star point req. to unlock signs.`;
  1070. }
  1071. if (params && params[0] === 'crystal') {
  1072. cheatState.wide.crystal = !cheatState.wide.crystal;
  1073. return `${cheatState.wide.crystal ? 'Activated' : 'Deactived'} 100% Crystal mob spawn rate.`;
  1074. }
  1075. if (params && params[0] === 'giant') {
  1076. cheatState.wide.giant = !cheatState.wide.giant;
  1077. return `${cheatState.wide.giant ? 'Activated' : 'Deactived'} 100% giant mob spawn rate.`;
  1078. }
  1079. if (params && params[0] === 'obol') {
  1080. cheatState.wide.obol = !cheatState.wide.obol;
  1081. return `${cheatState.wide.obol ? 'Activated' : 'Deactived'} obol reroll cost nullification.`;
  1082. }
  1083. return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.wide).join(", ")}`;
  1084. } else{
  1085. if(cheatState.wides){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
  1086. cheatState.wide.guild = false;
  1087. cheatState.wide.mtx = false;
  1088. cheatState.wide.post = false;
  1089. cheatState.wide.task = false;
  1090. cheatState.wide.quest = false;
  1091. cheatState.wide.star = false;
  1092. cheatState.wide.crystal = false;
  1093. cheatState.wide.giant = false;
  1094. cheatState.wide.obol = false;
  1095. } cheatState.wides = !cheatState.wides;
  1096. return `${cheatState.wides ? 'Activated' : 'Deactived'} account-wide nullifications e.g. mtx, post office, tasks and guild tasks cost.`;
  1097. }
  1098. });
  1099. // All cauldron related cheats
  1100. registerCheat('cauldron', function(params) {
  1101. if(params[0]){
  1102. if (params && params[0] === 'vialrng') {
  1103. cheatState.cauldron.vialrng = !cheatState.cauldron.vialrng;
  1104. return `${cheatState.cauldron.vialrng ? 'Activated' : 'Deactived'} vial unlock upon rolling 1+.`;
  1105. }
  1106. if (params && params[0] === 'vialattempt') {
  1107. cheatState.cauldron.vialattempt = !cheatState.cauldron.vialattempt;
  1108. return `${cheatState.cauldron.vialattempt ? 'Activated' : 'Deactived'} unlimited vial attempts.`;
  1109. }
  1110. if (params && params[0] === 'bubblecost') {
  1111. cheatState.cauldron.bubblecost = !cheatState.cauldron.bubblecost;
  1112. return `${cheatState.cauldron.bubblecost ? 'Activated' : 'Deactived'} bubble cost nullification.`;
  1113. }
  1114. if (params && params[0] === 'vialcost') {
  1115. cheatState.cauldron.vialcost = !cheatState.cauldron.vialcost;
  1116. return `${cheatState.cauldron.vialcost ? 'Activated' : 'Deactived'} vial cost nullification.`;
  1117. }
  1118. if (params && params[0] === 'lvlreq') {
  1119. cheatState.cauldron.lvlreq = !cheatState.cauldron.lvlreq;
  1120. return `${cheatState.cauldron.lvlreq ? 'Activated' : 'Deactived'} lvl requirement nullification.`;
  1121. }
  1122. if (params && params[0] === 'newbubble') {
  1123. cheatState.cauldron.newbubble = !cheatState.cauldron.newbubble;
  1124. return `${cheatState.cauldron.newbubble ? 'Activated' : 'Deactived'} new bubble chance 100%.`;
  1125. }
  1126. if (params && params[0] === 're_speed') {
  1127. cheatState.cauldron.re_speed = !cheatState.cauldron.re_speed;
  1128. return `${cheatState.cauldron.re_speed ? 'Activated' : 'Deactived'} super research speed.`;
  1129. }
  1130. if (params && params[0] === 'liq_rate') {
  1131. cheatState.cauldron.liq_rate = !cheatState.cauldron.liq_rate;
  1132. return `${cheatState.cauldron.liq_rate ? 'Activated' : 'Deactived'} super liquid speed.`;
  1133. }
  1134. return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.cauldron).join(", ")}`;
  1135. } else{ // The full cauldron command that does everything
  1136. if(cheatState.cauldrons){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
  1137. cheatState.cauldron.vialrng = false,
  1138. cheatState.cauldron.vialattempt = false,
  1139. cheatState.cauldron.bubblecost = false;
  1140. cheatState.cauldron.vialcost = false;
  1141. cheatState.cauldron.lvlreq = false;
  1142. cheatState.cauldron.newbubble = false;
  1143. cheatState.cauldron.re_speed = false;
  1144. cheatState.cauldron.liq_rate = false;
  1145. } cheatState.cauldrons = !cheatState.cauldrons;
  1146. return `${cheatState.cauldrons ? 'Activated' : 'Deactived'} all cauldron costs and duration nullifications (except P2W).`;
  1147. }
  1148. });
  1149. // All w1 related Proxy cheats
  1150. registerCheat('w1', function(params) {
  1151. if(params[0]){
  1152. if (params && params[0] === 'anvil') {
  1153. cheatState.w1.anvil = !cheatState.w1.anvil;
  1154. return `${cheatState.w1.anvil ? 'Activated' : 'Deactived'} anvil cost and duration nullification.`;
  1155. }
  1156. if (params && params[0] === 'forge') {
  1157. cheatState.w1.forge = !cheatState.w1.forge;
  1158. return `${cheatState.w1.forge ? 'Activated' : 'Deactived'} forge upgrade cost nullification.`;
  1159. }
  1160. if (params && params[0] === 'stampcost') {
  1161. cheatState.w1.stampcost = !cheatState.w1.stampcost;
  1162. return `${cheatState.w1.stampcost ? 'Activated' : 'Deactived'} stamp cost nullification.`;
  1163. }
  1164. if (params && params[0] === 'smith') {
  1165. cheatState.w1.smith = !cheatState.w1.smith;
  1166. return `${cheatState.w1.smith ? 'Activated' : 'Deactived'} smithing cost nullification (change maps to have the effect apply).`;
  1167. }
  1168. if (params && params[0] === 'statue') {
  1169. cheatState.w1.smith = !cheatState.w1.smith;
  1170. return `${cheatState.w1.smith ? 'Activated' : 'Deactived'} statue upgrade cost to 1. \n(This cheat has been commented out due to account breaking issues)`;
  1171. }
  1172. return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.w1).join(", ")}`;
  1173. } else{
  1174. if(cheatState.w1s){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
  1175. cheatState.w1.anvil = false;
  1176. cheatState.w1.forge = false;
  1177. cheatState.w1.stampcost = false;
  1178. cheatState.w1.smith = false;
  1179. } cheatState.w1s = !cheatState.w1s;
  1180. return `${cheatState.w1s ? 'Activated' : 'Deactived'} stamps, forge and anvil upgrade cost nullification.`;
  1181. }
  1182. });
  1183.  
  1184. // All w3 related Proxy cheats
  1185. registerCheat('w3', function(params) {
  1186. if(params[0]){
  1187. if (params && params[0] === 'mobdeath') {
  1188. cheatState.w3.mobdeath = !cheatState.w3.mobdeath;
  1189. return `${cheatState.w3.mobdeath ? 'Activated' : 'Deactived'} worship mobs insta-death.`;
  1190. }
  1191. if (params && params[0] === 'flagreq') {
  1192. cheatState.w3.flagreq = !cheatState.w3.flagreq;
  1193. return `${cheatState.w3.flagreq ? 'Activated' : 'Deactived'} flag unlock time nullification.`;
  1194. }
  1195. if (params && params[0] === 'freebuildings') {
  1196. cheatState.w3.freebuildings = !cheatState.w3.freebuildings;
  1197. return `${cheatState.w3.freebuildings ? 'Activated' : 'Deactived'} free tower upgrades`;
  1198. }
  1199. if (params && params[0] === 'instabuild') {
  1200. cheatState.w3.instabuild = !cheatState.w3.instabuild;
  1201. return `${cheatState.w3.instabuild ? 'Activated' : 'Deactived'} insta-build of buildings.`;
  1202. }
  1203. if (params && params[0] === 'booktime') {
  1204. cheatState.w3.booktime = !cheatState.w3.booktime;
  1205. return `${cheatState.w3.booktime ? 'Activated' : 'Deactived'} book per second.`;
  1206. }
  1207. if (params && params[0] === 'totalflags') {
  1208. cheatState.w3.totalflags = !cheatState.w3.totalflags;
  1209. return `${cheatState.w3.totalflags ? 'Activated' : 'Deactived'} 10 total flags.`;
  1210. }
  1211. if (params && params[0] === 'buildspd') {
  1212. cheatState.w3.buildspd = !cheatState.w3.buildspd;
  1213. return `${cheatState.w3.buildspd ? 'Activated' : 'Deactived'} super build speed`;
  1214. }
  1215. if (params && params[0] === 'saltlick') {
  1216. cheatState.w3.saltlick = !cheatState.w3.saltlick;
  1217. return `${cheatState.w3.saltlick ? 'Activated' : 'Deactived'} Salt Lick upgrade cost nullification.`;
  1218. }
  1219. if (params && params[0] === 'refinery') {
  1220. cheatState.w3.refinery = !cheatState.w3.refinery;
  1221. return `${cheatState.w3.refinery ? 'Activated' : 'Deactived'} refinery cost nullification.`;
  1222. }
  1223. if (params && params[0] === 'trapping') {
  1224. cheatState.w3.trapping = !cheatState.w3.trapping;
  1225. return `${cheatState.w3.trapping ? 'Activated' : 'Deactived'} trapping duration nullification.`;
  1226. }
  1227. if (params && params[0] === 'book') {
  1228. cheatState.w3.book = !cheatState.w3.book;
  1229. return `${cheatState.w3.book ? 'Activated' : 'Deactived'} always max lvl talent book.`;
  1230. }
  1231. if (params && params[0] === 'prayer') {
  1232. cheatState.w3.prayer = !cheatState.w3.prayer;
  1233. return `${cheatState.w3.prayer ? 'Activated' : 'Deactived'} Prayer curse nullification.`;
  1234. }
  1235. if (params && params[0] === 'shrinehr') {
  1236. cheatState.w3.shrinehr = !cheatState.w3.shrinehr;
  1237. return `${cheatState.w3.shrinehr ? 'Activated' : 'Deactived'} shrine lvl time reduction to 0.5h.`;
  1238. }
  1239. if (params && params[0] === 'worshipspeed') {
  1240. cheatState.w3.worshipspeed = !cheatState.w3.worshipspeed;
  1241. return `${cheatState.w3.worshipspeed ? 'Activated' : 'Deactived'} worship charge superspeed`;
  1242. }
  1243. if (params && params[0] === 'freeworship') {
  1244. cheatState.w3.freeworship = !cheatState.w3.freeworship;
  1245. return `${cheatState.w3.freeworship ? 'Activated' : 'Deactived'} nullification of worship charge cost`;
  1246. }
  1247. if (params && params[0] === 'globalshrines') {
  1248. cheatState.w3.globalshrines = !cheatState.w3.globalshrines;
  1249. return `${cheatState.w3.globalshrines ? 'Activated' : 'Deactived'} global shrines`;
  1250. }
  1251. return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.w3).join(", ")}`;
  1252. } else{ // The full workbench command that does everything
  1253. if(cheatState.w3s){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
  1254. for (const i in Object.keys(cheatState.w3)) cheatState.w3[i] = false;
  1255. } cheatState.w3s = !cheatState.w3s;
  1256. return `${cheatState.w3s ? 'Activated' : 'Deactived'} all workbench nullifications and worship mob insta-death.`;
  1257. }
  1258. });
  1259. // All w4 related Proxy cheats
  1260. registerCheat('w4', function(params) {
  1261. if (params[0]) {
  1262. const descriptionMap = {
  1263. 'battleslots': 'all 6 battle slots',
  1264. 'eggcap': 'all egg slots',
  1265. 'fenceyard': 'all fenceyard slots',
  1266. 'petchance': '100% new pet chance',
  1267. 'genes': '0 gene upgrades',
  1268. 'fasteggs': 'fast incubation',
  1269. 'petupgrades': 'free pet upgrades',
  1270. 'petrng': 'max strength pets (for level and egg, with a tiny bit of randomness)',
  1271. 'labpx': 'long lab connections',
  1272. 'instameals': 'speedy meal cooking',
  1273. 'instarecipes': 'speedy recipe research',
  1274. 'luckychef': 'new recipe guarantee',
  1275. 'freekitchens': 'free kitchens and upgrades',
  1276. 'freeplates': 'free dinner plate upgrades',
  1277. 'candy': 'candy use in space',
  1278. 'arena': 'unlimited arena entries'
  1279. };
  1280. if(params[0] in descriptionMap) {
  1281. cheatState.w4[params[0]] = !cheatState.w4[params[0]];
  1282. return `${cheatState.w4[params[0]] ? 'Activated' : 'Deactived'} ${descriptionMap[params[0]]}`;
  1283. }
  1284. if (params && params[0] === "mainframe") {
  1285. if (params[1] && params[2]) {
  1286. cheatState.w4.mainframe[params[1]] = Number(params[2]);
  1287. return `Set mainframe bonus ${params[1]} equal to ${params[2]}`;
  1288. } else {
  1289. cheatState.w4.mainframe.enable = !cheatState.w4.mainframe.enable;
  1290. return `${cheatState.w4.mainframe.enable ? 'Activated' : 'Deactived'} mainframe bonuses`;
  1291. }
  1292. }
  1293. if (params && params[0] === "chipbonuses") {
  1294. if (params[1] && params[2]) {
  1295. cheatState.w4.chipbonuses[Number(params[1])] = Number(params[2]);
  1296. return `Set chip bonus ${params[1]} equal to ${params[2]}`;
  1297. } else {
  1298. cheatState.w4.chipbonuses.enable = !cheatState.w4.chipbonuses.enable;
  1299. return `${cheatState.w4.chipbonuses.enable ? 'Activated' : 'Deactived'} chip bonuses`;
  1300. }
  1301. }
  1302. if (params && params[0] === 'labchips') {
  1303. let labChips = this["com.stencyl.Engine"].engine.getGameAttribute("Lab")[15];
  1304. for(let i = 0; i <= 21; i++) {
  1305. labChips[i] = 20;
  1306. }
  1307. return `Added 20x all lab chips`;
  1308. }
  1309. return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.w4).join(", ")}`;
  1310. } else{ // The full workbench command that does everything
  1311. if(cheatState.w4s){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
  1312. for (const i in Object.keys(cheatState.w4)) cheatState.w4[i] = false;
  1313. } cheatState.w4s = !cheatState.w4s;
  1314. return `${cheatState.w4s ? 'Activated' : 'Deactived'} all w4 cheats`;
  1315. }
  1316. });
  1317.  
  1318. // Godlike powers
  1319. registerCheat('godlike', function(params) {
  1320. if(params[0]){
  1321. if (params && params[0] === 'hp') {
  1322. cheatState.godlike.hp = !cheatState.godlike.hp;
  1323. return `${cheatState.godlike.hp ? 'Activated' : 'Deactived'} hp deduction nullification.`;
  1324. }
  1325. if (params && params[0] === 'mp') {
  1326. cheatState.godlike.mp = !cheatState.godlike.mp;
  1327. return `${cheatState.godlike.mp ? 'Activated' : 'Deactived'} mp deduction nullification.`;
  1328. }
  1329. if (params && params[0] === 'reach') {
  1330. cheatState.godlike.reach = !cheatState.godlike.reach;
  1331. return `${cheatState.godlike.reach ? 'Activated' : 'Deactived'} reach set to 666.`;
  1332. }
  1333. if (params && params[0] === 'crit') {
  1334. cheatState.godlike.crit = !cheatState.godlike.crit;
  1335. return `${cheatState.godlike.crit ? 'Activated' : 'Deactived'} crit set to 100.`;
  1336. }
  1337. if (params && params[0] === 'ability') {
  1338. cheatState.godlike.ability = !cheatState.godlike.ability;
  1339. return `${cheatState.godlike.ability ? 'Activated' : 'Deactived'} zero ability cooldown, mana cost nullification and cast time 0.1s.`;
  1340. }
  1341. if (params && params[0] === 'bosshp') {
  1342. cheatState.godlike.bosshp = !cheatState.godlike.bosshp;
  1343. return `${cheatState.godlike.bosshp ? 'Activated' : 'Deactived'} Boss HP nullification.`;
  1344. }
  1345. if (params && params[0] === 'food') {
  1346. cheatState.godlike.food = !cheatState.godlike.food;
  1347. return `${cheatState.godlike.food ? 'Activated' : 'Deactived'} food deduction nullification.`;
  1348. }
  1349. if (params && params[0] === 'hitchance') {
  1350. cheatState.godlike.hitchance = !cheatState.godlike.hitchance;
  1351. return `${cheatState.godlike.hitchance ? 'Activated' : 'Deactived'} 100% hit chance.`;
  1352. }
  1353. if (params && params[0] === 'buff') {
  1354. cheatState.godlike.buff = !cheatState.godlike.buff;
  1355. return `${cheatState.godlike.buff ? 'Activated' : 'Deactived'} unlimited buff time: Once disabled it'll run out in 5 seconds. \n(This cheat has been commented out due to crashing upon activating new buffs)`;
  1356. }
  1357. if (params && params[0] === 'dmg') {
  1358. cheatState.godlike.dmg = !cheatState.godlike.dmg;
  1359. return `${cheatState.godlike.dmg ? 'Activated' : 'Deactived'} auto attack capping: Crits are disabled and combat abilities will overflow.`;
  1360. }
  1361. if (params && params[0] === 'speed') { // Not a Proxy cheat, will have to activate individually
  1362. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  1363. for( const [index, element] of Object.entries(itemDefs))
  1364. if(element.h["typeGen"] === "aWeapon") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Speed"] = params[1] || 9;
  1365. return `All weapon speed are up to Turbo. \nThe max speed parameter you can set is 14: Higher will cause a non-attacking bug.`;
  1366. }
  1367. if (params && params[0] === 'card') {
  1368. const bEngine = this["com.stencyl.Engine"].engine;
  1369. const CardStuff = bEngine.getGameAttribute("CustomLists").h["CardStuff"];
  1370. const TargetCards = ["Boss2A", "Boss2B", "poopBig", "OakTree", "Copper"];
  1371. for(const [key1, value1] of Object.entries(CardStuff))
  1372. for(const [key2, value2] of Object.entries(value1))
  1373. if(TargetCards.includes(value2[0])) CardStuff[key1][key2][4] = "10000";
  1374. return `The cards Efaunt, Chaotic Efaunt, Dr Defecaus, Oak Tree and Copper have been altered with insane stats.`;
  1375. }
  1376. return `Wrong sub-command, use one of these:\nfood, speed, card, ${Object.keys(cheatState.godlike).join(", ")}`;
  1377. } else{
  1378. if(cheatState.godlikes){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
  1379. cheatState.godlike.hp = false;
  1380. cheatState.godlike.mp = false;
  1381. cheatState.godlike.reach = false;
  1382. cheatState.godlike.crit = false;
  1383. cheatState.godlike.ability = false;
  1384. cheatState.godlike.bosshp = false;
  1385. cheatState.godlike.food = false;
  1386. cheatState.godlike.hitchance = false;
  1387. cheatState.godlike.buff = false;
  1388. } cheatState.godlikes = !cheatState.godlikes;
  1389. return `${cheatState.godlikes ? 'Activated' : 'Deactived'}: \nNo HP/MP deduction, \n100% crit chance, 666 reach, \nZero ability cooldown, mana usage and 0.1s cast time, \nBoss HP set to zero.`;
  1390. }
  1391. });
  1392. // Quick daily shop and post office reset
  1393. registerCheat('daily', function(params) {
  1394. this["com.stencyl.Engine"].engine.getGameAttribute("TimeAway").h["ShopRestock"]=1
  1395. return `The daily shop restock has been triggered, which somehow also triggers the daily post office reset.`;
  1396. });
  1397. // upgrade stones
  1398. registerCheat('upstones', function(params) {
  1399. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  1400. if(params[0] === 'rng'){ // Should be 100% safe
  1401. for( const [index, element] of Object.entries(itemDefs))
  1402. if(element.h["typeGen"] === "dStone") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Amount"] = 100;
  1403. return `All upgrade stones have 100% success chance.`;
  1404. } else if(params[0] === 'use'){ // Probably risky
  1405. for( const [index, element] of Object.entries(itemDefs))
  1406. if(element.h["typeGen"] === "dStone") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Trigger"] = 0;
  1407. return `Using an upgrade stone doesn't deduct remaining upgrade amount on an item.`;
  1408. } return `Wrong sub-command, correct ones are:\nrng: Upgrade stones have 100% success chance, \nuse: Upgrade stones doesn't deduct remaining upgrade amount on an item.`;
  1409. });
  1410.  
  1411. // Damage multiplier
  1412. ['damagemultiplier', 'damage'].forEach(function(command) {
  1413. registerCheat(command, function (params) {
  1414. cheatState.damagemultiplier = params[0] || 1;
  1415. return `Damage multiplier set to ${cheatState.damagemultiplier}`;
  1416. });
  1417. });
  1418. // Efficiency multiplier
  1419. ['efficiency', 'efficiencymultiplier'].forEach(function (command) {
  1420. registerCheat(command, function (params) {
  1421. cheatState.efficiencymultiplier = params[0] || 1;
  1422. return `Efficiency multiplier set to ${cheatState.efficiencymultiplier}`;
  1423. });
  1424. });
  1425. // AFKRate multiplier
  1426. ['afkmultiplier', 'afk'].forEach(function(command) {
  1427. registerCheat(command, function (params) {
  1428. cheatState.afkmultiplier = params[0] || 1;
  1429. return `AFK % multiplier set to ${cheatState.afkmultiplier}`;
  1430. });
  1431. });
  1432.  
  1433. // Restore non-Proxy changed values
  1434. registerCheat('restore', function(params) {
  1435. if(params[0] === 'save'){
  1436. dictVals.itemDefs = JSON.parse(JSON.stringify(this["scripts.ItemDefinitions"].itemDefs.h));
  1437. dictVals.CardStuff = JSON.parse(JSON.stringify(this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["CardStuff"]));
  1438. return `Saved the current values.`;
  1439. }
  1440. if(params[0] === 'item'){
  1441. this["scripts.ItemDefinitions"].itemDefs.h = dictVals.itemDefs;
  1442. return `Restored original item values.`;
  1443. }
  1444. if(params[0] === 'card'){
  1445. this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["CardStuff"] = dictVals.CardStuff;
  1446. return `Restored original card values`;
  1447. }
  1448. });
  1449.  
  1450. registerCheat('common', function () {
  1451. let rtn = [];
  1452. [
  1453. 'godlike food',
  1454. 'unlock quickref',
  1455. 'unlock teleports',
  1456. 'unlock tickets',
  1457. 'unlock silvpen',
  1458. 'unlock revive',
  1459. 'wide mtx',
  1460. 'wide star',
  1461. 'wide obol',
  1462. 'minigame',
  1463. 'w3 prayer',
  1464. 'w3 freeworship',
  1465. 'w3 book',
  1466. 'w3 globalshrines',
  1467. 'w4 candy',
  1468. 'w4 petrng',
  1469. 'w4 labpx',
  1470. 'w4 arena',
  1471. 'upstones rng',
  1472. 'afk 5',
  1473. 'w4 mainframe',
  1474. 'w4 chipbonuses'
  1475. ].forEach(function (c) {
  1476. rtn.push(cheat.apply(this, [c]));
  1477. }, this);
  1478. return rtn.join('\n');
  1479. });
  1480.  
  1481. // The bulk item function with dictionary item collections
  1482. registerCheat('bulk', function(params) {
  1483. const bEngine = this["com.stencyl.Engine"].engine;
  1484. const itemDefs = this['scripts.ItemDefinitions'].itemDefs.h;
  1485. const actorEvents189 = this["scripts.ActorEvents_189"];
  1486. const character = bEngine.getGameAttribute("OtherPlayers").h[bEngine.getGameAttribute("UserInfo")[0]];
  1487.  
  1488. // Obtaining clusters of items at once (Doesn't return a drop log in the console)
  1489. const items = params[0] || "default";
  1490. const amnt = params[1] || 1;
  1491. try {
  1492. let x = character.getXCenter();
  1493. let y = character.getValue("ActorEvents_20", "_PlayerNode");
  1494. const drop_log = [];
  1495. // Here we'll use the pre-defined function to work out the magic
  1496. if(DictDrops[items]){
  1497. if(items === 'startalents') DictDrops[items].forEach(item => {
  1498. actorEvents189._customBlock_DropSomething("TalentBook1", item, 0, 0, 2, y, 0, x, y);
  1499. drop_log.push(`Dropped talent book with id ${item}`);
  1500. });
  1501. if(items === 'smith'){
  1502. DictDrops[items].forEach(item => { // Drop the regular items
  1503. if(itemDefs[item]){
  1504. actorEvents189._customBlock_DropSomething(item, 1, 0, 0, 2, y, 0, x, y);
  1505. drop_log.push(`Dropped ${itemDefs[item].h.displayName.replace(/_/g, ' ')}. (x${1})`);
  1506. } else drop_log.push(`No item found for '${item}'`);
  1507. });
  1508. //Not really too efficient, must be a better way to deal with this... Since this one's kinda lackluster I'll postphone it for now
  1509. const notreleased = [[23,59,63,70],[24,44,48,65,66,67,79],[20,21,46,59]]; // Array of smithing recipes that aren't out yet
  1510. if(amnt==1) [...Array(84).keys()].forEach(item => { if(notreleased[0].indexOf(item) == -1) actorEvents189._customBlock_DropSomething(`SmithingRecipes1`, 0, item, 0, 2, y, 0, x, y); });
  1511. if(amnt==2) [...Array(80).keys()].forEach(item => { if(notreleased[1].indexOf(item) == -1) actorEvents189._customBlock_DropSomething(`SmithingRecipes2`, 0, item, 0, 2, y, 0, x, y); });
  1512. if(amnt==3) [...Array(60).keys()].forEach(item => { if(notreleased[2].indexOf(item) == -1) actorEvents189._customBlock_DropSomething(`SmithingRecipes3`, 0, item, 0, 2, y, 0, x, y); });
  1513. } else DictDrops[items].forEach(item => {
  1514. if(itemDefs[item]){
  1515. actorEvents189._customBlock_DropSomething(item, amnt, 0, 0, 2, y, 0, x, y);
  1516. drop_log.push(`Dropped ${itemDefs[item].h.displayName.replace(/_/g, ' ')}. (x${amnt})`);
  1517. } else drop_log.push(`No item found for '${item}'`);
  1518. });
  1519. } else drop_log.push(` The sub-command didn't yield any item collection. Existing sub-commands are: \n ${Object.keys(DictDrops).join(", ")}`);
  1520. return drop_log.join("\n");
  1521. } catch (err) { return `Error: ${err}`; }
  1522. });
  1523.  
  1524. /****************************************************************************************************
  1525. Runescape homage cheats: Now we're finally God Gaming xD
  1526. */
  1527. registerCheat('runescape', function() { // Activate ability bar switching when switching weapons
  1528. cheatState.runescape = !cheatState.runescape;
  1529. return `${cheatState.runescape ? 'Activated' : 'Deactived'} ability bar switching.`;
  1530. });
  1531. // Preset BiS weapon + upgrade binding
  1532. registerCheat('bind', function () {
  1533. const bEngine = this["com.stencyl.Engine"].engine;
  1534. const itemDefs = this["scripts.ItemDefinitions"].itemDefs;
  1535. const AttackLoadout = bEngine.getGameAttribute("AttackLoadout");
  1536. bEngine.whenAnyKeyPressedListeners.push((function(e, t) {
  1537. if ( (e.keyCode === 65 || e.keyCode === 83 || e.keyCode === 68 || e.keyCode === 70) && bEngine.getGameAttribute("MenuType") === 6 ) {
  1538. const BiS = {
  1539. 65:["STR", "EquipmentSword3"], // Key A
  1540. 83:["AGI", "EquipmentBows8"], // Key S
  1541. 68:["WIS", "EquipmentWands7"], // Key D
  1542. 70:["LUK", "EquipmentPunching5"] // Key F
  1543. };
  1544. // BiS = Warped Weapon Upgrade Stone: All random stats goes to the style's DPS stat
  1545. const upgrstats = { Weapon_Power:3, Defence:0, Random_Stat:4 } // Edit this line to whatever you like
  1546. const EquipOrd = bEngine.getGameAttribute("EquipmentOrder")[0];
  1547. const EquipMap = bEngine.getGameAttribute("EquipmentMap")[0];
  1548. const upgrslots = itemDefs.h[BiS[e.keyCode][1]].h["Upgrade_Slots_Left"];
  1549. if(BiS[e.keyCode]){ // Only procs if whatever keycode is defined in the dictionary
  1550. EquipOrd[1] = BiS[e.keyCode][1]; // Change equipped weapon
  1551. EquipMap[1].h["Upgrade_Slots_Left"] = upgrslots*-1; // Deduct the amount of slots left
  1552. EquipMap[1].h["Weapon_Power"] = upgrslots*upgrstats["Weapon_Power"];
  1553. EquipMap[1].h["Defence"] = upgrslots*upgrstats["Defence"];
  1554. EquipMap[1].h[BiS[e.keyCode][0]] = upgrslots*upgrstats["Random_Stat"];
  1555. }
  1556. if(cheatState.runescape){ // Let's play Runescape xD
  1557. switch(e.keyCode) {
  1558. case 65: // Melee
  1559. AttackLoadout[0] = [90,91,105,120,106,121];
  1560. AttackLoadout[1] = [94,108,122,107,639,635];
  1561. break;
  1562. case 83: // Ranged
  1563. AttackLoadout[0] = [270,271,285,300,286,301];
  1564. AttackLoadout[1] = [273,288,303,302,639,635];
  1565. break;
  1566. case 68: // Mage
  1567. AttackLoadout[0] = [453,450,451,482,465,467];
  1568. AttackLoadout[1] = [481,480,466,469,639,635];
  1569. break;
  1570. case 70: // Buffbar
  1571. AttackLoadout[0] = [15,30,94,108,288,481];
  1572. AttackLoadout[1] = [302,303,466,469,122,273];
  1573. break;
  1574. default: break;
  1575. }
  1576. }
  1577. }
  1578. })); return `The custom keybinds have been activated! (Has to be re-applied when changing maps)`;
  1579. });
  1580.  
  1581. // This function doesn't kill other players (luckily) but yourself :)
  1582. registerCheat('noob', function(params) {
  1583. const hpval = parseInt(params[0]) || 0;
  1584. this["com.stencyl.Engine"].engine.gameAttributes.h.PlayerHP = hpval;
  1585. return `The amount of health is set to ${params[0]}`;
  1586. });
  1587. // This function definitely looks dangerous as it changes your class, but doesn't reset distributed talents!
  1588. registerCheat('class', function(params) {
  1589. let ClassId = parseInt(params[0]) || -1;
  1590. if(ClassId == -1) return `Class Id has to be a numeric value!`;
  1591. if(ClassId > 50 || ClassId < 0) ClassId = 1; // A small fail-safe
  1592. this["com.stencyl.Engine"].engine.setGameAttribute("CharacterClass", ClassId);
  1593. return `Class id has been changed to ${ClassId}`;
  1594. });
  1595. // Not sure if this function's safe, probably is to most items but I have not personally tested.
  1596. registerCheat('qnty', function(params) {
  1597. const bEngine = this["com.stencyl.Engine"].engine;
  1598. const setqnty = params[1] || 1;
  1599. if(params[0] === "inv"){
  1600. bEngine.getGameAttribute("ItemQuantity")[0] = setqnty;
  1601. return `The item quantity in the first inventory slot has been changed to ${setqnty}`;
  1602. } else if(params[0] === "chest"){
  1603. bEngine.getGameAttribute("ChestQuantity")[0] = setqnty;
  1604. return `The item quantity in the first chest slot has been changed to ${setqnty}`;
  1605. } else return "Unknown sub-command!\nKnown sub-commands are 'inv' and 'chest'.";
  1606. });
  1607. // This function is extremely dangerous, as you're changing the lvl value your exp isn't changing accordingly
  1608. registerCheat('lvl', function(params) {
  1609. const bEngine = this["com.stencyl.Engine"].engine;
  1610. const lvltype = params[0];
  1611. const setlvl = parseInt(params[1]) || -1;
  1612. if(setlvl == -1) return `The lvl value has to be numeric!`; // Yup this is a dummy-proof measurement to prevent account bricking
  1613. // The class and skill lvl code is easily done through dictionary.
  1614. const dictype = {'class':0,'mining':1,'smithing':2,'chopping':3,'fishing':4,'alchemy':5,'catching':6,'trapping':7,'construction':8,'worship':9};
  1615. if(Object.keys(dictype).includes(lvltype)) bEngine.getGameAttribute('Lv0')[dictype[lvltype]] = setlvl;
  1616. else if(lvltype === 'furnace') bEngine.setGameAttribute("FurnaceLevels", [16,setlvl,setlvl,setlvl,setlvl,setlvl]);
  1617. else if(lvltype === 'statue') bEngine.getGameAttribute("StatueLevels").forEach(item => item[0] = setlvl);
  1618. else if(lvltype === 'anvil'){
  1619. const Levels = bEngine.getGameAttribute("AnvilPAstats");
  1620. const lvllist = { exp: 3, spd: 4, cap: 5 };
  1621. for (const i in lvllist) Levels[lvllist[i]] = setlvl;
  1622. bEngine.setGameAttribute("AnvilPAstats", Levels);
  1623. } else if(lvltype === 'talent'){
  1624. const Levels0 = bEngine.getGameAttribute("SkillLevelsMAX");
  1625. const Levels1 = bEngine.getGameAttribute("SkillLevels");
  1626. for(const [index,element] of Object.entries(Levels0)) Levels0[index] = Levels1[index] = setlvl;
  1627. } else if(lvltype === 'stamp'){
  1628. const Levels0 = bEngine.getGameAttribute("StampLevelMAX");
  1629. const Levels1 = bEngine.getGameAttribute("StampLevel");
  1630. for(const [index1,element1] of Object.entries(Levels0)) // A double for loop to nail the job
  1631. for(const [index2,element2] of Object.entries(element1))
  1632. Levels0[index1][index2] = Levels1[index1][index2] = setlvl;
  1633. return `Both current and max of all stamp levels have been set to ${setlvl}`;
  1634. } else if(lvltype === 'shrine'){
  1635. const Levels = bEngine.getGameAttribute("ShrineInfo");
  1636. Levels.forEach(item => { item[3] = setlvl; item[4] = 0; }); // Shrine lvl set and accumulated xp to 0
  1637. } else if(lvltype === 'guild'){
  1638. const Levels = bEngine.getGameAttribute("GuildTasks");
  1639. for(const [index,element] of Object.entries(Levels[0])) Levels[0][index] = setlvl;
  1640. return "This is only for show and does not truly work server-sided. Might even be dangerous, but so is the entire lvl-command.";
  1641. } else return "This lvl type isn't supported.";
  1642. return `${lvltype} has been changed to ${setlvl}.`;
  1643. });
  1644. // Raw changes to cauldron variables
  1645. registerCheat('setalch', function(params) {
  1646. const bEngine = this["com.stencyl.Engine"].engine;
  1647. const alchdict = {"orange":0, "green":1, "purple":2, "yellow":3, "vial":4, "color":5, "liquid":6, "upgrade":8};
  1648. const setlvl = params[1] || 1000;
  1649. if(Object.keys(alchdict).includes(params[0])) {
  1650. const tochange = bEngine.getGameAttribute("CauldronInfo")[alchdict[params[0]]];
  1651. if(params[0] === "upgrade"){
  1652. for(const [index1,element1] of Object.entries(tochange))
  1653. for(const [index2,element2] of Object.entries(element1))
  1654. tochange[index1][index2][1] = setlvl;
  1655. return `All cauldron upgrades set to lvl ${setlvl}`;
  1656. } // No need to else, as there's a return
  1657. for(const [index,element] of Object.entries(tochange)) tochange[index] = setlvl;
  1658. return `All ${params[0]} levels have changed to ${setlvl}.`;
  1659. } else return `Wrong sub-command, use one of these:\n${Object.keys(alchdict).join(", ")}`;
  1660. });
  1661. // A highly dangerous function, only use it on shadow banned test accounts!!
  1662. registerCheat('abilitybar', function(params) {
  1663. const bEngine = this["com.stencyl.Engine"].engine;
  1664. const talentDefs = bEngine.getGameAttribute("CustomLists").h["TalentIconNames"];
  1665. const AttackLoadout = bEngine.getGameAttribute("AttackLoadout");
  1666. // First parameter is the ability bar that ranges from 0 to 9.
  1667. const abilitybar = params[0];
  1668. const abilities = params.slice(1); //
  1669. const Abilities = [];
  1670. if(abilitybar < 10 && abilitybar >= 0){
  1671. for(const [index,element] of Object.entries(abilities)){
  1672. if(index >= 6) return "An ability bar can only hold 6 elements!";
  1673. if(element < talentDefs.length && element >= 0){
  1674. Abilities.push(`Bar ${abilitybar} ability ${index} set to: ${talentDefs[element].replace(/_/g, ' ').toLowerCase()}`)
  1675. AttackLoadout[abilitybar][index] = element;
  1676. } else Abilities.push("Ability falls out of the known id range!");
  1677. }
  1678. bEngine.setGameAttribute("AttackLoadout", AttackLoadout);
  1679. return Abilities.join("\n");
  1680. } else return "The ability bar index ranges from 0 to 9!";
  1681. });
  1682. // All item can by worn by any class
  1683. registerCheat('equipall', function(params) {
  1684. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  1685. for( const [index, element] of Object.entries(itemDefs)){ // Any item with Class attribute is set to ALL, and any with lvlReqToEquip set to 1
  1686. if(element.h["Class"]) this["scripts.ItemDefinitions"].itemDefs.h[index].h["Class"] = "ALL";
  1687. if(element.h["lvReqToEquip"]) this["scripts.ItemDefinitions"].itemDefs.h[index].h["lvReqToEquip"] = 1;
  1688. } return `All items can be worn by any class at any level.`;
  1689. });
  1690.  
  1691. // I still aim to add even more costs to nullify
  1692. registerCheat('nullify', function(params) {
  1693. const changedstuff = []; // Used to concatenate strings about what has been nullified by this command xD
  1694.  
  1695. cheatState.wides = !cheatState.wides;
  1696. changedstuff.push(`${cheatState.wides ? 'Activated' : 'Deactived'} account-wide nullifications e.g. mtx, post office, tasks and guild tasks cost.`);
  1697.  
  1698. cheatState.w1s = !cheatState.w1s;
  1699. changedstuff.push(`${cheatState.w1s ? 'Activated' : 'Deactived'} stamps, forge and anvil upgrade cost nullification.`);
  1700.  
  1701. cheatState.cauldrons = !cheatState.cauldrons;
  1702. changedstuff.push(`${cheatState.cauldrons ? 'Activated' : 'Deactived'} all cauldron costs and durations (except P2W).`);
  1703.  
  1704. cheatState.w3s = !cheatState.w3s;
  1705. changedstuff.push(`${cheatState.w3s ? 'Activated' : 'Deactived'} all workbench nullifications and worship mob insta-death.`);
  1706.  
  1707. return changedstuff.join("\n"); // Tell the user how many things have happened through this singular command xD
  1708. });
  1709. /****************************************************************************************************
  1710. The following functions only aggregate information from the game's data structures.
  1711. As such, these functions are perfectly safe.
  1712. */
  1713. // Search by item, monster or talent name: All in lowercase!
  1714. registerCheat('search', function (params) {
  1715. const queryX = params.slice(1) && params.slice(1).length ? params.slice(1).join(' ').toLowerCase() : undefined;
  1716. const bEngine = this["com.stencyl.Engine"].engine;
  1717. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  1718. const ItemVals = [[],[]]
  1719. const searchVals = [];
  1720. if(queryX){
  1721. if(params[0] === "item"){
  1722. searchVals.push("Id, Item");
  1723. for(const [key, value] of Object.entries(itemDefs)){
  1724. const valName = value.h.displayName.replace(/_/g, ' ').toLowerCase();
  1725. if (valName.includes(queryX)) searchVals.push(`${key} - ${valName}`);
  1726. }
  1727. } else if(params[0] === "monster"){
  1728. searchVals.push("Id, Monster");
  1729. const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
  1730. for (const [key, value] of Object.entries(monsterDefs)) {
  1731. const valName = value.h["Name"].replace(/_/g, ' ').toLowerCase();
  1732. if (valName.includes(queryX)) searchVals.push(`${key} - ${valName}`);
  1733. }
  1734. } else if(params[0] === "talent"){
  1735. searchVals.push("Order, Id, Talent");
  1736. const talentDefs = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["TalentIconNames"];
  1737. const Order = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["TalentOrder"];
  1738. for(let i=0; i < Order.length; i++){
  1739. const valName = talentDefs[Order[i]].replace(/_/g, ' ').toLowerCase();
  1740. if (valName.includes(queryX)) searchVals.push(`${i} - ${Order[i]} - ${valName}`);
  1741. }
  1742. } else if(params[0] === "smith"){
  1743. searchVals.push("Tab, Id, ItemId, ItemName");
  1744. const ItemToCraftNAME = bEngine.getGameAttribute("CustomLists").h["ItemToCraftNAME"];
  1745. for(const [key, value] of Object.entries(itemDefs)){
  1746. const valName = value.h.displayName.replace(/_/g, ' ').toLowerCase();
  1747. if (valName.includes(queryX)) ItemVals.push([key,valName]);
  1748. }
  1749. for(h=0; h < ItemVals.length; h++) for(i=0; i < ItemToCraftNAME.length; i++) for(j=0; j < ItemToCraftNAME[i].length; j++)
  1750. if (ItemVals[h][0] == ItemToCraftNAME[i][j]) searchVals.push(`${i+i}, ${j}, ${ItemVals[h][0]}, ${ItemVals[h][1]}`);
  1751. } else return "Invalid sub-command! Valid ones are:\n item\n monster\n talent\n smith";
  1752. if (searchVals.length > 0) return searchVals.join('\n');
  1753. else return `No info found for '${queryX}'`;
  1754. }
  1755. });
  1756. // Get Game Attributes: Uses a for loop to iterate over the object's key/index and element.
  1757. registerCheat('gga', function(params) {
  1758. const bEngine = this["com.stencyl.Engine"].engine;
  1759. return gg_func(params, 0, bEngine); // Yup the function's down at the bottom
  1760. });
  1761. // Get Game Key
  1762. registerCheat('ggk', function(params) {
  1763. const bEngine = this["com.stencyl.Engine"].engine;
  1764. return gg_func(params, 1, bEngine); // Yup the function's down at the bottom
  1765. });
  1766. /* Evaluate Get Game Attributes: fill in the variable you'd like to see
  1767. > egga this["com.stencyl.Engine"].engine.getGameAttribute("Lv0");
  1768. Under the hood it does:
  1769. > let gga = this["com.stencyl.Engine"].engine.getGameAttribute("Lv0");
  1770. Yeah this function is therefore pretty buggy, don't expect too much out of it xD
  1771. */
  1772. registerCheat('egga', function(params) {
  1773. const foundVals = [];
  1774. const bEngine = this["com.stencyl.Engine"].engine;
  1775. const CList = this["scripts.CustomLists"];
  1776. const Clist = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
  1777. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  1778. const atkMoveMap = this["scripts.CustomMaps"].atkMoveMap.h;
  1779. const abilities = this["com.stencyl.Engine"].engine.getGameAttribute("AttackLoadout");
  1780. try{
  1781. let gga = eval(params[0]);
  1782. let obj_gga = Object.entries(gga);
  1783. if(typeof obj_gga == "string" || obj_gga.length == 0) foundVals.push(`${gga}`);
  1784. else for(const [index,element] of obj_gga) foundVals.push(`${index}, ${element}`);
  1785. return foundVals.join("\n");
  1786. } catch(error){
  1787. // If the gga isn't an Array nor Dictionary.
  1788. if(error instanceof TypeError) return `This TypeError should appear if you gave a non-existing object`;
  1789. return `Error: ${err}`;
  1790. }
  1791. });
  1792. // Evaluate Get Game Key: The code is indeed quite redundant, but yeah... it works
  1793. registerCheat('eggk', function(params) {
  1794. const foundVals = [];
  1795. const bEngine = this["com.stencyl.Engine"].engine;
  1796. const CList = this["scripts.CustomLists"];
  1797. const Clist = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
  1798. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  1799. const atkMoveMap = this["scripts.CustomMaps"].atkMoveMap.h;
  1800. const abilities = this["com.stencyl.Engine"].engine.getGameAttribute("AttackLoadout");
  1801. try{
  1802. let gga = eval(params[0]);
  1803. let obj_gga = Object.entries(gga);
  1804. if(typeof obj_gga == "string" || obj_gga.length == 0) foundVals.push(`Non iterable value: ${gga}`);
  1805. else for(const [index,element] of obj_gga) foundVals.push(`${index}`);
  1806. return foundVals.join("\n");
  1807. } catch(error){
  1808. // If the gga isn't an Array nor Dictionary.
  1809. if(error instanceof TypeError) return `This TypeError should appear if you gave a non-existing object`;
  1810. return `Error: ${err}`;
  1811. }
  1812. });
  1813. // A list creator
  1814. registerCheat('list', function (params) {
  1815. const bEngine = this["com.stencyl.Engine"].engine;
  1816. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  1817. const CList = this["scripts.CustomLists"];
  1818. const Clist = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
  1819. const foundVals = [];
  1820.  
  1821. if(params[0] == "item"){
  1822. foundVals.push("Id, ingameName");
  1823. for(const [key, value] of Object.entries(itemDefs)){
  1824. let valName;
  1825. if(key.startsWith("Cards")) valName = (value.h.desc_line1.replace(/_/g, ' ').toLowerCase() + value.h.desc_line2.replace(/_/g, ' ').toLowerCase()).replace("filler", '');
  1826. else valName = value.h.displayName.replace(/_/g, ' ').toLowerCase();
  1827. foundVals.push(`${key}, ${valName}`);
  1828. }
  1829. } else if(params[0] == "monster"){
  1830. foundVals.push("Id, ingameName, HP, Defence, Damage, EXP");
  1831. const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
  1832. for(const [key, value] of Object.entries(monsterDefs)){
  1833. const valName = value.h["Name"].replace(/_/g, ' ').toLowerCase();
  1834. foundVals.push(`${key}, ${valName}, ${value.h["MonsterHPTotal"]}, ${value.h["Defence"]}, ${value.h["Damages"][0]}, ${value.h["ExpGiven"]}`);
  1835. }
  1836. } else if(params[0] == "card"){
  1837. foundVals.push("Id, Entity, Value, Effect");
  1838. const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
  1839. const CardStuff = bEngine.getGameAttribute("CustomLists").h["CardStuff"];
  1840. for(const [key1, value1] of Object.entries(CardStuff))
  1841. for(const [key2, value2] of Object.entries(value1)){
  1842. if(monsterDefs[value2[0]]) foundVals.push(`${value2[0]}, ${monsterDefs[value2[0]].h["Name"]}, ${value2[4]}, ${value2[3]}`);
  1843. else foundVals.push(`${value2[0]}, Unknown, ${value2[4]}, ${value2[3]}`);
  1844. }
  1845. } else if(params[0] == "class"){
  1846. foundVals.push("Id, ClassName, PromotesTo");
  1847. for(const [index, element] of CList.ClassNames().entries())
  1848. foundVals.push(`${index}, ${element}, [${CList.ClassPromotionChoices()[index]}]`);
  1849. } else if(params[0] == "quest"){
  1850. foundVals.push("Id, QuestName, NPC, QuestlineNo, paramX1");
  1851. for(const [index, element] of CList.SceneNPCquestOrder().entries())
  1852. foundVals.push(`${element}, ${CList.SceneNPCquestInfo()[index].join(", ")}`);
  1853. } else if(params[0] == "map"){
  1854. foundVals.push("Num_Id, Str_Id, MapName, AFK1, AFK2, Transition");
  1855. for(const [index, element] of CList.MapName().entries())
  1856. foundVals.push(`${index}, ${element}, ${CList.MapDispName()[index]}, ${CList.MapAFKtarget()[index]}, ${CList.MapAFKtargetSide()[index]}, [${CList.SceneTransitions()[index]}]`);
  1857. } else if(params[0] == "talent"){
  1858. foundVals.push("Order, Id, Name");
  1859. const Order = bEngine.getGameAttribute("CustomLists").h["TalentOrder"];
  1860. const talentDefs = bEngine.getGameAttribute("CustomLists").h["TalentIconNames"];
  1861. for(i=0; i < Order.length; i++) if(talentDefs[Order[i]] !== "_")
  1862. foundVals.push(`${i}, ${Order[i]}, ${talentDefs[Order[i]]}`);
  1863. } else if(params[0] == "ability"){
  1864. foundVals.push("Order, Id, Name");
  1865. const Order = bEngine.getGameAttribute("CustomLists").h["TalentOrder"];
  1866. const talentDefs = bEngine.getGameAttribute("CustomLists").h["TalentIconNames"];
  1867. const atkMoveMap = this["scripts.CustomMaps"].atkMoveMap.h;
  1868. for(i=0; i < Order.length; i++) if(talentDefs[Order[i]] !== "_")
  1869. if(atkMoveMap[talentDefs[Order[i]]]) // Filter out all non-ability talents
  1870. foundVals.push(`${i}, ${Order[i]}, ${talentDefs[Order[i]]}`);
  1871. } else if(params[0] == "smith"){
  1872. foundVals.push("CraftId, Tab, ItemId, ItemName");
  1873. const ItemToCraftNAME = bEngine.getGameAttribute("CustomLists").h["ItemToCraftNAME"];
  1874. for(i=0; i < ItemToCraftNAME.length; i++) for(j=0; j < ItemToCraftNAME[i].length; j++){
  1875. let itemName = itemDefs[ItemToCraftNAME[i][j]].h.displayName.replace(/_/g, ' ').toLowerCase();
  1876. foundVals.push(`${i+1}, ${j}, ${ItemToCraftNAME[i][j]}, ${itemName}`);
  1877. }
  1878. }
  1879. else if(params[0] = "gga") for(const [key, val] of Object.entries(bEngine.gameAttributes.h)) foundVals.push(key);
  1880. else return "Valid sub-commands are:\n item\n monster\n class\n quest\n map\n talent\n smith";
  1881. if(params[1]) return foundVals.filter(foundVals => foundVals.includes(params[1])).join("\n");
  1882. return foundVals.join("\n"); // Concatenate all lines into one string with new lines
  1883. });
  1884. /****************************************************************************************************
  1885. These following functions enable you to perform extremely risky value manipulations...
  1886. ...and have insanely high chance of destroying your account.
  1887.  
  1888. Only use these when you know what you're doing!!
  1889. */
  1890. // Stop/restart cloud saving
  1891. registerCheat('cloudz', function() {
  1892. cheatState.cloudz = !cheatState.cloudz;
  1893. return `${cheatState.cloudz ? 'Activated' : 'Deactived'} the cloudsave jammer: Your game will not be saved while it's active! \nOnce disabled, your game will proc a cloudsave in 5 seconds. \nProbably doesn't work.`;
  1894. });
  1895. // Wipe stuff
  1896. registerCheat('wipe', function(params) {
  1897. const bEngine = this["com.stencyl.Engine"].engine;
  1898. if(params[0] === "inv"){
  1899. const wipedef = bEngine.getGameAttribute("InventoryOrder");
  1900. for(const [index,element] of Object.entries(wipedef)) wipedef[index] = "Blank";
  1901. return "The inventory has been wiped.";
  1902. } else if(params[0] == "chest"){
  1903. const wipedef = bEngine.getGameAttribute("ChestOrder");
  1904. for(const [index,element] of Object.entries(wipedef)) wipedef[index] = "Blank";
  1905. return "Wipe chest could result in a crash: Should be fine after restart.";
  1906. } else if(params[0] === "forge"){
  1907. for(const [index,element] of Object.entries(bEngine.getGameAttribute("ForgeItemOrder"))){
  1908. bEngine.getGameAttribute("ForgeItemOrder")[index] = "Blank";
  1909. bEngine.getGameAttribute("ForgeItemQuantity")[index] = 0;
  1910. } return "The forge has been wiped. \nIf the game crashes, it should be fine after restart.";
  1911. } else if(params[0] === "ban"){
  1912. bEngine.getGameAttribute("OptionsListAccount")[26] = 0;
  1913. return "The shadowing has been cleared, but it doesn't clear the true flag on your account. \n(note that this is not a true unban)";
  1914. } else return "Unknown sub-command given\nKnown sub-commands are 'inv', 'chest', 'forge' and 'ban'.";
  1915. });
  1916. // Don't use unless needed: This function exists to wipe certain stuff from your already broken account!
  1917. registerCheat('fix_save', function(params) {
  1918. fixobj = this["com.stencyl.Engine"].engine.getGameAttribute(params[0]);
  1919. return "Saved";
  1920. });
  1921. registerCheat('fix_write', function(params) {
  1922. this["com.stencyl.Engine"].engine.setGameAttribute(params[0], fixobj);
  1923. return "Writen";
  1924. });
  1925. // A highly dangerous function that lets you manually change in-game variables, like:
  1926. // > chng bEngine.getGameAttribute("QuestComplete").h["Secretkeeper1"]=1
  1927. registerCheat('chng', function(params) {
  1928. const bEngine = this["com.stencyl.Engine"].engine;
  1929. const CList = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
  1930. try{
  1931. eval(params[0]);
  1932. return `${params[0]}`;
  1933. } catch(error){ return `Error: ${err}`; }
  1934. });
  1935.  
  1936. /****************************************************************************************************
  1937. A huge dictionary made for the bulk function:
  1938. Since we'd hardly access this part of the code, it's fine being all the way down here.
  1939. */
  1940. const DictDrops = {
  1941. // 0) Handy cheat items
  1942. default:["Timecandy6","ExpBalloon3","ResetCompleted","ResetCompletedS","ClassSwap"],
  1943. // 1) All bag boosters
  1944. invbag:["InvBag1","InvBag2","InvBag3","InvBag4","InvBag5","InvBag6","InvBag7","InvBag8",//"InvBag9",
  1945. "InvBag21","InvBag22","InvBag23","InvBag24","InvBag25","InvBag26","InvBag100",
  1946. "InvBag101","InvBag102","InvBag103","InvBag104","InvBag105","InvBag106","InvBag107",//"InvBag101",
  1947. "InvBag109","InvBag110"],
  1948. // 2) All storage chest boosters
  1949. invstorage:["InvStorage1","InvStorage2","InvStorage3","InvStorage4","InvStorage5","InvStorage6","InvStorage7",
  1950. "InvStorage8","InvStorage9","InvStorage10","InvStorage11","InvStorage12","InvStorage13",//"InvStorage14",
  1951. "InvStorage15","InvStorage16","InvStorage17","InvStorage18","InvStorage19","InvStorage20","InvStorage21",
  1952. "InvStorage31","InvStorage32","InvStorage33","InvStorage34","InvStorage35","InvStorage36","InvStorage37",
  1953. "InvStorage38","InvStorage39","InvStorage40","InvStorage41","InvStorage42","InvStorageF"],
  1954. // 3) All item bag capacity boosters
  1955. capbag:["MaxCapBagT2","MaxCapBag1","MaxCapBag2","MaxCapBag3","MaxCapBag4","MaxCapBag5",
  1956. "MaxCapBagMi6","MaxCapBagT1","MaxCapBag7","MaxCapBag9","MaxCapBagT3","MaxCapBagT4",
  1957. "MaxCapBagT5","MaxCapBagT6","MaxCapBag6","MaxCapBag8","MaxCapBag10","MaxCapBagF3",
  1958. "MaxCapBagF4","MaxCapBagF5","MaxCapBagF6","MaxCapBagM1","MaxCapBagM2","MaxCapBagM3",
  1959. "MaxCapBagM4","MaxCapBagM5","MaxCapBagM6","MaxCapBagM7","MaxCapBagFi0","MaxCapBagFi1",
  1960. "MaxCapBagFi2","MaxCapBagFi3","MaxCapBagFi4","MaxCapBagFi5","MaxCapBagFi6","MaxCapBagB0",
  1961. "MaxCapBagB1","MaxCapBagB2","MaxCapBagB3","MaxCapBagB4","MaxCapBagB5","MaxCapBagB6",
  1962. "MaxCapBagTr0","MaxCapBagTr1","MaxCapBagTr2","MaxCapBagTr3","MaxCapBagTr4","MaxCapBagTr5",
  1963. "MaxCapBagS0","MaxCapBagS1","MaxCapBagS2","MaxCapBagS3","MaxCapBagS4","MaxCapBagS5"],
  1964. // 4) All Yugioh cards
  1965. yugioh:["CardsA0","CardsA1","CardsA2","CardsA3","CardsA4","CardsA5","CardsA6","CardsA7","CardsA8",
  1966. "CardsA9","CardsA10","CardsA11","CardsA12","CardsA13","CardsA14","CardsA15","CardsA16",
  1967. "CardsB1","CardsB2","CardsB3","CardsB4","CardsB5","CardsB6","CardsB7","CardsB8",
  1968. "CardsB9","CardsB10","CardsB11","CardsB12","CardsB13","CardsB14",
  1969. "CardsC1","CardsC2","CardsC3","CardsC4","CardsC5","CardsC6","CardsC7","CardsC8",
  1970. "CardsC9","CardsC10","CardsC11","CardsC12","CardsC13","CardsC14","CardsC15","CardsC16",
  1971. "CardsD1","CardsD2","CardsD3","CardsD4","CardsD5","CardsD6","CardsD7","CardsD8","CardsD9","CardsD10",
  1972. "CardsD11","CardsD12","CardsD13","CardsD16","CardsD17","CardsD18","CardsD19","CardsD20","CardsD21",
  1973. "CardsE0","CardsE1","CardsE2","CardsE3","CardsE4","CardsE5","CardsE6","CardsE7","CardsE8",
  1974. "CardsE9","CardsE10","CardsE11","CardsE12","CardsE13","CardsE14","CardsE15",
  1975. "CardsF1","CardsF2","CardsF3","CardsF4","CardsF5","CardsF6","CardsF7","CardsF8","CardsF9","CardsF10","CardsF11",
  1976. "CardsY0","CardsY1","CardsY2","CardsY3","CardsY4","CardsY5","CardsY5","CardsY6",
  1977. "CardsY7","CardsY8","CardsY9","CardsY10","CardsY11","CardsY12","CardsY13",
  1978. "CardsZ0","CardsZ1","CardsZ2","CardsZ3","CardsZ4","CardsZ5","CardsZ6","CardsZ7","CardsZ8","CardsZ9"],
  1979. // 5) All statues
  1980. statues:["EquipmentStatues1","EquipmentStatues2","EquipmentStatues3","EquipmentStatues4","EquipmentStatues5",
  1981. "EquipmentStatues6","EquipmentStatues7","EquipmentStatues8","EquipmentStatues9","EquipmentStatues10",
  1982. "EquipmentStatues11","EquipmentStatues12","EquipmentStatues13","EquipmentStatues14","EquipmentStatues15",
  1983. "EquipmentStatues16","EquipmentStatues17","EquipmentStatues18","EquipmentStatues19"],
  1984. // 6) All stamps (Many stamps aren't released yet)
  1985. stamps:["StampA1","StampA2","StampA3","StampA4","StampA5","StampA6","StampA7","StampA8","StampA9","StampA10",
  1986. "StampA11","StampA12","StampA13","StampA14","StampA15","StampA16","StampA17","StampA18","StampA19",
  1987. "StampA20","StampA21"/*,"StampA22"*/,"StampA23","StampA24"/*,"StampA25"*/,"StampA26","StampA27","StampA28",
  1988. //"StampA29","StampA30","StampA31","StampA32","StampA33","StampA34","StampA35",
  1989. "StampB1","StampB2","StampB3","StampB4","StampB5","StampB6","StampB7","StampB8","StampB9","StampB10",
  1990. "StampB11","StampB12","StampB13","StampB14","StampB15","StampB16","StampB17","StampB18","StampB19",
  1991. "StampB20","StampB21","StampB22","StampB23","StampB24","StampB25","StampB26","StampB27",//"StampB28","StampB29",
  1992. "StampB30","StampB31"/*,"StampB32","StampB33"*/,"StampB34"/*,"StampB35"*/,"StampB36",
  1993. "StampC1","StampC2","StampC3"/*,"StampC4","StampC5"*/,"StampC6","StampC7"/*,"StampC8"*/,"StampC9",//"StampC10","StampC11","StampC12","StampC13",
  1994. "StampC14","StampC15"/*,"StampC16","StampC17","StampC18"*/,"StampC19","StampC20"],
  1995. // 7) All fishing tools
  1996. fishtools:["Line1","Line2","Line3","Line4","Line5","Line6","Line7",
  1997. "Line8","Line9","Line10","Line11","Line12","Line13","Line14",
  1998. "Weight1","Weight2","Weight3","Weight4","Weight5","Weight6","Weight7",
  1999. "Weight8","Weight9","Weight10","Weight11","Weight12","Weight13","Weight14"],
  2000. // 8) All released Star Talent books
  2001. startalents:[
  2002. //"3615100", //Bored To Death (Lvl 100)
  2003. "361650", //Beginner Best Class (Lvl 50)
  2004. //"3617100", //Studious Quester (Lvl 100)
  2005. "3618100", //Quest Chungus (Lvl 100)
  2006. "3619100", //Crystals 4 Dayys (Lvl 100)
  2007. "362050", //Will Of The Eldest (Lvl 50)
  2008. "3621104", //TICK TOCK (Lvl 104)
  2009. "3622100", //STONKS! (Lvl 100)
  2010. "3623100", //Roll Da Dice (Lvl 100)
  2011. "362450", //Attacks on simmer (Lvl 50)
  2012. "3625120", //Toilet Paper Postage (Lvl 120)
  2013. "362640", //Exp Converter (Lvl 40)
  2014. "362750", //Goblet Of Hemoglobin (Lvl 50)
  2015. "3628100", //JUST EXP (Lvl 100)
  2016. "3629100", //Frothy Malk (Lvl 100)
  2017. "363050", //Convert Better Darnit (Lvl 50)
  2018. "3631100", //PULSATION (Lvl 100)
  2019. "3632100", //CARDIOVASCULAR! (Lvl 100)
  2020. //"3633100", //Nothing
  2021. "363450", //Telekinetic Storage (Lvl 50)
  2022. "3635100", //Printer Sampling (Lvl 100)
  2023. "3639100", //Shrine Architect (Lvl 100)
  2024. ],
  2025. // 9) Blacksmith recipes and tabs
  2026. smith:["EquipmentSmithingTabs3","SmithingHammerChisel","SmithingHammerChisel2"],
  2027. // 10) All skilling resources
  2028. skill:["Copper","Iron","Gold","Plat","Dementia","Void","Lustre","Starfire","Dreadlo","Godshard",
  2029. "CopperBar","IronBar","GoldBar","PlatBar","DementiaBar","VoidBar","LustreBar","StarfireBar","DreadloBar","GodshardBar",
  2030. "OakTree","BirchTree","JungleTree","ForestTree","ToiletTree","PalmTree","StumpTree","SaharanFoal","Tree7",
  2031. "Leaf1","Leaf2","Leaf3",
  2032. "Fish1","Fish2","Fish3","Fish4",
  2033. "Bug1","Bug2","Bug3","Bug4","Bug5","Bug6","PureWater",
  2034. "Critter1","Critter2","Critter3","Critter4","Critter5","Critter6","Critter7","Critter8","Critter9",
  2035. "Critter1A","Critter2A","Critter3A","Critter4A","Critter5A","Critter6A","Critter7A","Critter8A","Critter9A",
  2036. "Soul1","Soul2","Soul3","Soul4","Soul5",
  2037. "Soul6","Refinery1","Refinery2","Refinery3","Refinery4","Refinery5","Refinery6",
  2038. "CraftMat1","CraftMat2","CraftMat3"/*,"CraftMat4"*/,"CraftMat5","CraftMat6","CraftMat7","CraftMat8","CraftMat9","CraftMat10"],
  2039. // 11) All monster resources
  2040. monster:["Grasslands1","Grasslands2","Grasslands3","Grasslands4","Jungle1","Jungle2","Jungle3","Forest1","Forest2","Forest3",
  2041. "Sewers1","Sewers1b","Sewers2","Sewers3","TreeInterior1","TreeInterior1b","TreeInterior2","BabaYagaETC",
  2042. "DesertA1","DesertA1b","DesertA2","DesertA3","DesertA3b","DesertB1","DesertB2","DesertB3","DesertB4",
  2043. "DesertC1","DesertC2","DesertC2b","DesertC3","DesertC4","SnowA1","SnowA2","SnowA2a","SnowA3","SnowA4",
  2044. "SnowB1","SnowB2","SnowB2a","SnowB5","SnowB3","SnowB4","SnowC1","SnowC2","SnowC3","SnowC4","SnowC4a",
  2045. "IceMountains2","Hgg","EfauntDrop1","EfauntDrop2"],
  2046. // 12) Most (not all) currencies and gift items
  2047. currency:["Key1","Key2","Key3","SilverPen","PremiumGem",//"DeliveryBox",
  2048. "Quest30","Quest35","Quest36","Quest38","Quest40","Quest42","Quest44","Quest45","Quest49","Quest50"],
  2049. // 13) Best food
  2050. food:["PeanutG","FoodG1","FoodG2","FoodG3","FoodG4","FoodG5","FoodG6","Meatloaf","MidnightCookie",
  2051. "FoodPotOr3","FoodPotRe3","FoodPotGr3","FoodPotMana3","FoodPotYe3"],
  2052. // 14) All trophies
  2053. trophy:["Trophy1","Trophy2","Trophy3"/*,"Trophy4"*/,
  2054. "Trophy5","Trophy6","Trophy7","Trophy8","Trophy9","Trophy10",
  2055. "Trophy11","Trophy12","Trophy13","Trophy14"],
  2056. // 15) All upgrade stones (except lvl 1 and 2 cause 3 exists)
  2057. upstone:["StoneWe","StoneWeb","Stonew3","StoneW6",
  2058. "StoneA1b","StoneA2b","StoneA3b","StoneA3","StoneAe","StoneAeB",
  2059. "StoneHelm1","StoneHelm6","StoneHelm1b",
  2060. "StoneTe","StoneT1e","StoneT1eb","StoneT3",
  2061. "StoneZ2",
  2062. "StonePremSTR","StonePremAGI","StonePremWIS","StonePremLUK"],
  2063. // 16) All premium hats
  2064. phats:["EquipmentHats31","EquipmentHats32","EquipmentHats33","EquipmentHats34","EquipmentHats35",
  2065. "EquipmentHats36","EquipmentHats40","EquipmentHats37","EquipmentHats38","EquipmentHats46",
  2066. "EquipmentHats47","EquipmentHats48","EquipmentHats49","EquipmentHats50","EquipmentHats43",
  2067. "EquipmentHats45","EquipmentHats57","EquipmentHats62"],
  2068. // 17) High level Gear
  2069. gear:["EquipmentHats60","EquipmentShirts28","EquipmentShirts29","EquipmentShirts30","EquipmentPants21",
  2070. "EquipmentShoes22","EquipmentPendant14","EquipmentPendant17","EquipmentRings16","EquipmentRings16",
  2071. "EquipmentRings6","EquipmentRings6","EquipmentTools11","EquipmentTools7","EquipmentToolsHatchet5",
  2072. "EquipmentToolsHatchet7","CatchingNet7","CatchingNet6","FishingRod6","FishingRod7",
  2073. "EquipmentSword3","EquipmentBows8","EquipmentWands7","EquipmentPunching5",
  2074. "EquipmentHats58","EquipmentHats59","TrapBoxSet5","WorshipSkull5"],
  2075. // 18) Cheat equipments (Some unreleased items which will definitely shadow ban you)
  2076. cheat:["EquipmentWeapons2","TestObj16","EquipmentRings8","EquipmentPendant8","EquipmentShoes12","EquipmentPants13","EquipmentShirts8"]
  2077. };
  2078. /****************************************************************************************************
  2079. This function is made to simplify some code, basically a bit of elementary programming.
  2080. The arguments are as followed:
  2081. bEng = Engine input: Not very elegant, but it works for until I have more JavaScript experience.
  2082. dim = Amount of dimensions, can take values 2 to 4 (at 1D there's no reason for such complexity)
  2083. KeyName = The respecitve key inside GameAttribute Customlist that we want to iterate
  2084. repl = The replacement value
  2085. elem = List of Array indices, which elements we want replaced
  2086. */
  2087. function ChangeND(bEng, dim, KeyName, repl, elem){
  2088. let NDArr;
  2089. if(typeof KeyName === "string") // Creates a deep-copy
  2090. NDArr = JSON.parse(JSON.stringify(bEng.getGameAttribute("CustomLists").h[KeyName]));
  2091. else NDArr = KeyName; // Else this KeyName parameter is an object
  2092. if(dim === 4){
  2093. for(const [index1, element1] of Object.entries(NDArr)){
  2094. for(const [index2, element2] of Object.entries(element1)){
  2095. for(const [index3, element3] of Object.entries(element2)){
  2096. for(i in elem) element3[elem[i]] = repl instanceof Function ? repl(element3[elem[i]]) : repl; // Fill every
  2097. NDArr[index1][index2][index3] = element3; // Write back to the 4D Array
  2098. }
  2099. }
  2100. }
  2101. } else if(dim === 3){
  2102. for(const [index1, element1] of Object.entries(NDArr)){
  2103. for(const [index2, element2] of Object.entries(element1)){
  2104. for(i in elem) element2[elem[i]] = repl instanceof Function ? repl(element3[elem[i]]) : repl;
  2105. NDArr[index1][index2] = element2; // Write back to the 3D Array
  2106. }
  2107. }
  2108. } else if(dim === 2){
  2109. for(const [index1, element1] of Object.entries(NDArr)){
  2110. for(i in elem) element1[elem[i]] = repl instanceof Function ? repl(element3[elem[i]]) : repl;
  2111. NDArr[index1] = element1; // Write back to the 2D Array
  2112. }
  2113. } else return NDArr; // Else return the original without modifications
  2114. return NDArr;
  2115. } // This function's even less likely to ever be revisited, so it's nice here
  2116. /****************************************************************************************************
  2117. The help function for gga/ggk
  2118. */
  2119. function gg_func(Params, which, bEngine){
  2120. const foundVals = [];
  2121. try{
  2122. let gga = bEngine.gameAttributes.h;
  2123. let eva_gga; let obj_gga;
  2124. if(Params.length > 0){
  2125. gga = bEngine.getGameAttribute(Params[0]);
  2126. if("h" in Object(gga)) gga = bEngine.getGameAttribute(Params[0]).h; // Some attributes may not have a .h
  2127. }
  2128. switch(Params.length) {
  2129. case 2:
  2130. eva_gga = gga[Params[1]];
  2131. break;
  2132. case 3:
  2133. eva_gga = gga[Params[1]][Params[2]];
  2134. break;
  2135. case 4:
  2136. eva_gga = gga[Params[1]][Params[2]][Params[3]];
  2137. break;
  2138. case 5:
  2139. eva_gga = gga[Params[1]][Params[2]][Params[3]][Params[4]];
  2140. break;
  2141. default: // For every other length goes this
  2142. eva_gga = gga;
  2143. break;
  2144. }
  2145. if("h" in Object(eva_gga)) eva_gga = eva_gga.h;
  2146. let iterate = function (obj, depth) {
  2147. if (typeof obj == "object") {
  2148. if ("h" in obj) obj = obj.h;
  2149. for (let index in obj) {
  2150. if (typeof obj[index] == "object") {
  2151. foundVals.push(" ".repeat(depth) + `${index}:`);
  2152. iterate(obj[index], depth + 1);
  2153. } else {
  2154. if (which == 0) foundVals.push(" ".repeat(depth)+`${index}: ${obj[index]}`); // This one's for gga
  2155. else foundVals.push(" ".repeat(depth)+`${index}`); // This one's for ggk
  2156. }
  2157. }
  2158. } else {
  2159. if(which == 0) foundVals.push(" ".repeat(depth)+`${obj}`);
  2160. else foundVals.push(" ".repeat(depth)+`Non iterable value: ${obj}`);
  2161. }
  2162. }
  2163. iterate(eva_gga, 0);
  2164. if (typeof eva_gga == "object") {
  2165. let keys = [];
  2166. for (k in eva_gga) keys.push(k);
  2167. foundVals.push(`Keys: ${keys.join(", ")}`);
  2168. }
  2169.  
  2170. return foundVals.join("\n");
  2171. } catch(error){
  2172. return `Error: ${error}`;
  2173. }
  2174. }
  2175.  
  2176. window.initCheats = async function() {
  2177. while (true) {
  2178. let context = window.document.querySelector('iframe').contentWindow.__idleon_cheats__;
  2179. if(!context) {
  2180. await new Promise(resolve => setTimeout(resolve, 1000));
  2181. } else {
  2182. await new Promise(resolve => setTimeout(resolve, 3000));
  2183. context = window.document.querySelector('iframe').contentWindow.__idleon_cheats__;
  2184. return setup.call(context);
  2185. }
  2186. }
  2187. };
  2188. window.initCheats();
  2189.  
  2190. /* Credit section:
  2191.  
  2192. iBelg
  2193. User profile: https://fearlessrevolution.com/memberlist.php?mode=viewprofile&u=45315
  2194. Tool release: https://fearlessrevolution.com/viewtopic.php?p=199352#p199352
  2195. > The creator of the console injection, designer of the cheats syntax as well as many cheats
  2196.  
  2197. salmon85
  2198. User profile: https://fearlessrevolution.com/memberlist.php?mode=viewprofile&u=80266
  2199. > Wipe inv, wipe forge and class lvl command
  2200.  
  2201. Creater0822
  2202. User profile: https://fearlessrevolution.com/memberlist.php?mode=viewprofile&u=10529
  2203. Google Drive: https://drive.google.com/drive/folders/1MyEkO0uNEpGx1VctMEKZ5sQiNzuSZv36?usp=sharing
  2204. > For the remaining commands
  2205. */
  2206.  
  2207. /* Help & troubleshoot section:
  2208.  
  2209. How to use:
  2210. > Place iBelg's injecting tool and this script inside the game's root folder and execute the tool (not the game)
  2211. > To close the game, you have to close the NodeJS console.
  2212.  
  2213. The tool closes itself instantly after execution?!?!
  2214. The error shows things like: UnhandledPromiseRejectionWarning: Error: No inspectable targets
  2215. > You probably forgot to have the Steam client launched in the background.
  2216.  
  2217. The game is has been loaded, but the console doesn't load.
  2218. > There could be multiple sessions running.
  2219. > If you rapidly re-start the injected game after closing it, the previous process may not be killed yet.
  2220. */
  2221.  
  2222. /* Depreciated unique cheats:
  2223. // A non-proxy cheat that nullifies boost food consumption and health food cooldown.
  2224. if (params && params[0] === 'food') {
  2225. const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
  2226. for( const [index, element] of Object.entries(itemDefs))
  2227. if(element.h["typeGen"] === "cFood") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Cooldown"] = 0;
  2228. return `Boost food is never consumed and consumption cooldown on health food is nullified.`;
  2229. }
  2230. */