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