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