Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /****************************************************************************************************
- Setting the initial stage of the cheating tool and some quick definitions.
- */
- const cheats = {};
- const cheatState = {
- damageMultiplier: 1,
- efficiencyMultiplier: 1,
- afkMultiplier: 1,
- cloudz: false,
- runescape: false,
- godlikes: false,
- godlike: {
- crit: false,
- reach: false,
- hp: false,
- mp: false,
- ability: false,
- bosshp: false,
- food: false,
- hitchance: false,
- dmg: false,
- buff: false,
- },
- unlocks: false,
- unlock: {
- teleports: false,
- quickref: false,
- tickets: false,
- silvpen: false,
- goldpen: false,
- obolfrag: false,
- revive: false,
- },
- wides: false,
- wide: {
- mtx: false,
- post: false,
- guild: false,
- task: false,
- quest: false,
- star: false,
- crystal: false,
- giant: false,
- obol: false,
- },
- W1s: false,
- W1: {
- stampcost: false,
- anvil: false,
- forge: false,
- smith: false,
- statue: false,
- },
- cauldrons: false,
- cauldron: {
- vialrng: false,
- vialattempt: false,
- bubblecost: false,
- vialcost: false,
- lvlreq: false,
- newbubble: false,
- re_speed: false,
- liq_rate: false,
- },
- W3s: false,
- W3: {
- mobdeath: false,
- flagreq: false,
- saltcost: false,
- matcost: false,
- instabuild: false,
- booktime: false,
- totalflags: false,
- buildspd: false,
- saltlick: false,
- refinery: false,
- trapping: false,
- book: false,
- prayer: false,
- shrinehr: false,
- globalshrines: false,
- worshipspeed: false,
- freeworship: false,
- },
- W4s: false,
- W4: {
- eggcap: false,
- fenceyard: false,
- battleslots: false,
- petchance: false,
- petupgrades: false,
- genes: false,
- fasteggs: false,
- labpx: false,
- instameals: false,
- instarecipes: false,
- luckychef: false,
- freekitchens: false,
- freeplates: false,
- candy: false,
- petrng: false,
- },
- minigames: false,
- minigame: {
- mining: false,
- catching: false,
- fishing: false,
- choppin: false,
- },
- rng: false,
- };
- // Used to store things like item and card definitions
- let dictVals = {};
- let setupDone = false;
- let fixobj; // An object used to store stuff, for example an un-broken piece of GameAttribute from one character to another
- function registerCheat(command, fn) { cheats[command] = fn; }
- function isGameReady() {
- let result = true; // Check for engine
- result = !!this["com.stencyl.Engine"];
- return result;
- }
- // The main function that executes all cheats
- function cheat(action) {
- try {
- if (!isGameReady.call(this)) return 'Game is not ready.';
- if (!setupDone) setup.call(this);
- const [command, ...params] = action.split(' ');
- const foundCheat = cheats[command];
- if (foundCheat) {
- const result = foundCheat.call(this, params);
- return result ?? 'Done.';
- } else return `${command} is not a valid option.`;
- } catch (error) { return `Error: ${error.stack}`; }
- }
- /****************************************************************************************************
- A proxy setup and all Proxy definitions
- */
- function setup() {
- setupDone = true;
- // setup proxies
- setupRngProxy.call(this);
- setupCurrenciesOwnedProxy.call(this);
- setupArbitraryProxy.call(this);
- setupAnvilProxy.call(this);
- setupStampCostProxy.call(this);
- setupAFKRateProxy.call(this);
- setupAlchProxy.call(this);
- setupW3StuffProxy.call(this);
- setupW4StuffProxy.call(this);
- setupOptionsListAccountProxy.call(this);
- setupCListProxy.call(this);
- setupGameAttrProxy.call(this);
- setupQuestProxy.call(this);
- setupSmithProxy.call(this);
- setupAbilityProxy.call(this);
- setupValuesMapProxy.call(this);
- setupCloudSaveProxy.call(this);
- setupSpaceCandyProxy.call(this);
- //setupBuffsActiveProxy.call(this);
- }
- function setupSpaceCandyProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const behavior = this["com.stencyl.behavior.Script"];
- const handler = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.W4.candy && argumentsList[0].toString().includes("TIME_CANDY")) {
- Reflect.apply(originalFn, context, [function (t) {
- originalMap = bEngine.getGameAttribute("CurrentMap");
- bEngine.setGameAttribute("CurrentMap", 10);
- Reflect.apply(argumentsList[0], context, [t]);
- bEngine.setGameAttribute("CurrentMap", originalMap);
- }]);
- } else {
- Reflect.apply(originalFn, context, argumentsList);
- }
- }
- }
- const proxy = new Proxy(behavior.prototype.addMouseReleasedListener, handler);
- behavior.prototype.addMouseReleasedListener = proxy;
- }
- function setupRngProxy() {
- const behaviour = this["com.stencyl.behavior.Script"];
- const randomFloatBetween = behaviour.randomFloatBetween;
- const handler = {
- apply: function (originalFn, context, argumentsList)
- {
- if (cheatState.rng === "high") return argumentsList[1];
- if (cheatState.rng === "low") return argumentsList[0];
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- proxy = new Proxy(randomFloatBetween, handler);
- behaviour.randomFloatBetween = proxy;
- }
- // Unlock quick references
- function setupOptionsListAccountProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const optionsListAccount = bEngine.getGameAttribute("OptionsListAccount");
- const handler = {
- get: function(obj, prop) {
- if ((cheatState.unlocks || cheatState.unlock.quickref) && Number(prop) === 34) return 0;
- if (cheatState.minigames && Number(prop) === 33) return obj[33] || 1;
- return Reflect.get(...arguments);
- },
- set: function(obj, prop, value) {
- if (cheatState.minigames && Number(prop) === 33) {
- if (obj[33] < value) obj[33] = value;
- return true;
- } return Reflect.set(...arguments);
- }
- };
- const proxy = new Proxy(optionsListAccount, handler);
- bEngine.setGameAttribute("OptionsListAccount", proxy);
- }
- // Free revival cheat
- function setupValuesMapProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const CurrenciesOwned = bEngine.getGameAttribute("PersonalValuesMap").h;
- const handler = {
- get: function(obj, prop) {
- if ((cheatState.unlocks || cheatState.unlock.revive) && prop === "InstaRevives") return obj.InstaRevives || 10;
- return Reflect.get(...arguments);
- },
- set: function(obj, prop, value) {
- if ((cheatState.unlocks || cheatState.unlock.revive) && prop === "InstaRevives"){
- if (obj["InstaRevives"] < value) obj["InstaRevives"] = value;
- return true;
- } return Reflect.set(...arguments);
- }
- };
- const proxy = new Proxy(CurrenciesOwned, handler);
- bEngine.getGameAttribute("PersonalValuesMap").h = proxy;
- }
- // Buffs never run out
- function setupBuffsActiveProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const BuffsActive = bEngine.getGameAttribute("BuffsActive");
- const handler = {
- get: function(obj, prop) {
- if ((cheatState.godlikes || cheatState.godlike.buff) && typeof obj[prop][1] != "undefined") obj[prop][1] = 5; // Trap at 5 seconds left
- return Reflect.get(...arguments);
- },
- set: function(obj, prop, value) {
- if ((cheatState.godlikes || cheatState.godlike.buff) && typeof obj[prop][1] != "undefined"){
- obj[prop][1] = 5;
- return true;
- } return Reflect.set(...arguments);
- }
- };
- const proxy = new Proxy(BuffsActive, handler);
- bEngine.setGameAttribute("BuffsActive", proxy);
- }
- // Stop cloud saving, once re-enabled it'll proc a save in 2 seconds.
- function setupCloudSaveProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const CloudSave = bEngine.getGameAttribute("CloudSaveCD");
- const handler = {
- get: function(obj, prop) {
- if (cheatState.cloudz && Number(prop) === 0) return 235;
- return Reflect.get(...arguments);
- },
- set: function(obj, prop, value) {
- if (cheatState.cloudz && Number(prop) === 0){
- obj[0] = 235;
- return true;
- } return Reflect.set(...arguments);
- }
- };
- const proxy = new Proxy(CloudSave, handler);
- bEngine.setGameAttribute("CloudSaveCD", proxy);
- }
- // Some godlike cheats
- function setupGameAttrProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const gameAttr = bEngine.gameAttributes.h;
- const handler = {
- get: function(obj, prop) {
- if((cheatState.godlikes || cheatState.godlike.hp) && prop === "PlayerHP") return obj.PlayerHP || 1;
- if((cheatState.godlikes || cheatState.godlike.mp) && prop === "PlayerMP") return obj.PlayerMP || 1;
- if((cheatState.godlikes || cheatState.godlike.bosshp) && prop === "BossHP") return 0;
- return Reflect.get(...arguments);
- },
- set: function(obj, prop, value) {
- if((cheatState.godlikes || cheatState.godlike.hp) && prop === "PlayerHP"){ if (obj.PlayerHP < value) obj.PlayerHP = value; return true; }
- if((cheatState.godlikes || cheatState.godlike.mp) && prop === "PlayerMP"){ if (obj.PlayerMP < value) obj.PlayerMP = value; return true; }
- if((cheatState.godlikes || cheatState.godlike.bosshp) && prop === "BossHP"){ if (obj.BossHP < 0) obj.BossHP = 0; return true; }
- return Reflect.set(...arguments);
- }
- };
- const proxy = new Proxy(gameAttr, handler);
- bEngine.gameAttributes.h = proxy;
- }
- // Some more stats, as well as a forge upgrade within this one
- function setupArbitraryProxy(){
- const ActorEvents12 = this["scripts.ActorEvents_12"];
- // 100% crit chance
- const CritChance = ActorEvents12._customBlock_CritChance;
- const handlerCrit = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.godlike.dmg) return 0; // Disable crits on dmg cap, as it's already capped
- if (cheatState.godlikes || cheatState.godlike.crit) return 100;
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyCrit = new Proxy(CritChance, handlerCrit);
- ActorEvents12._customBlock_CritChance = proxyCrit;
- // Reach to 230
- const atkReach = ActorEvents12._customBlock_PlayerReach;
- const handlerReach = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.godlikes || cheatState.godlike.reach) return 666;
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyReach = new Proxy(atkReach, handlerReach);
- ActorEvents12._customBlock_PlayerReach = proxyReach;
- // Free forge upgrades
- const forgeupgr = ActorEvents12._customBlock_ForgeUpdateCosts;
- const handlerForge = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.W1s || cheatState.W1.forge) return 0;
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyForge = new Proxy(forgeupgr, handlerForge);
- ActorEvents12._customBlock_ForgeUpdateCosts = proxyForge;
- // Imperfect damage cap on too-OP broken players with overflowing damage
- const DamageDealt = ActorEvents12._customBlock_DamageDealed;
- const handlerDamage = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if (cheatState.godlike.dmg && t == "Min") return Number.MAX_SAFE_INTEGER;
- if (cheatState.godlike.dmg && t == "Max") return Number.MAX_SAFE_INTEGER;
- if (cheatState.godlike.dmg && t == "RNG") return Number.MAX_SAFE_INTEGER;
- return Reflect.apply(originalFn, context, argumentsList) * (argumentsList[0] == "Max" ? cheatState.damageMultiplier : 1);
- }
- };
- const proxyDamage = new Proxy(DamageDealt, handlerDamage);
- ActorEvents12._customBlock_DamageDealed = proxyDamage;
- // Skill stats
- const SkillStats = ActorEvents12._customBlock_SkillStats;
- const handlerSkillStats = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if ((cheatState.W3s || cheatState.W3.worshipspeed) && t == "WorshipSpeed") return 5000; // 1000 worship%/h
- return Reflect.apply(originalFn, context, argumentsList) * (t.includes("Efficiency") ? cheatState.efficiencyMultiplier : 1);
- }
- };
- const proxySkillStats = new Proxy(SkillStats, handlerSkillStats);
- ActorEvents12._customBlock_SkillStats = proxySkillStats;
- ActorEvents12._customBlock_skillstats2 = new Proxy(ActorEvents12._customBlock_skillstats2, handlerSkillStats);
- // Some arbitrary stuff
- const Arbitrary = ActorEvents12._customBlock_ArbitraryCode;
- const handlerArbitrary = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- // if (cheatState.W1.statue && t.substring(0, 12) == "StatueExpReq") return 1; // This cheat works, but absolutely destroys your account
- if ((cheatState.wides || cheatState.wide.crystal) && t == "CrystalSpawn") return 1; // Crystal mob spawn rate 1
- if ((cheatState.wides || cheatState.wide.giant) && t == "GiantMob") return 1; // Giant mob spawn rate 1
- if ((cheatState.godlikes || cheatState.godlike.food) && t == "FoodNOTconsume") return 100; // Food never consumed
- if ((cheatState.godlikes || cheatState.godlike.hitchance) && t == "HitChancePCT") return 100; // 100% hit chance
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyArbitrary = new Proxy(Arbitrary, handlerArbitrary);
- ActorEvents12._customBlock_ArbitraryCode = proxyArbitrary;
- const XforThingY = ActorEvents12._customBlock_RunCodeOfTypeXforThingY;
- const handlerXforThingY = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if ((cheatState.wides || cheatState.wide.obol) && t == "ObolRerollCostMoney") return 0;
- if ((cheatState.wides || cheatState.wide.obol) && t == "ObolRerollCostFrag") return 0;
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyXforThingY = new Proxy(XforThingY, handlerXforThingY);
- ActorEvents12._customBlock_RunCodeOfTypeXforThingY = proxyXforThingY;
- }
- // A bunch of currency related cheats
- function setupCurrenciesOwnedProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const currencies = bEngine.getGameAttribute("CurrenciesOwned").h;
- const handler = {
- get: function(obj, prop) {
- if ((cheatState.unlocks || cheatState.unlock.teleports) && prop === 'WorldTeleports') return obj.WorldTeleports || 1;
- if ((cheatState.unlocks || cheatState.unlock.tickets) && prop === 'ColosseumTickets') return obj.ColosseumTickets || 1;
- if ((cheatState.unlocks || cheatState.unlock.obolfrag) && prop === 'ObolFragments') return obj.ObolFragments || 9001; // It's over nine thousand
- if ((cheatState.unlocks || cheatState.unlock.silvpen) && prop === 'SilverPens') return obj.SilverPens || 1;
- // Not a safe cheat as golden pens aren't released yet,
- // Only for people that use the manual cheat: chng bEngine.getGameAttribute("CurrenciesOwned").h["GoldPens"]=100
- //if ((cheatState.unlocks || cheatState.unlock.goldpen) && prop === 'GoldPens') return obj.GoldPens || 1;
- return Reflect.get(...arguments);
- },
- set: function(obj, prop, value) {
- if ((cheatState.unlocks || cheatState.unlock.teleports) && prop === 'WorldTeleports') return true; // Do nothing
- if ((cheatState.unlocks || cheatState.unlock.tickets) && prop === 'ColosseumTickets') {
- if (obj.ColosseumTickets < value) obj.ColosseumTickets = value;
- return true;
- } if ((cheatState.unlocks || cheatState.unlock.silvpen) && prop === 'SilverPens') {
- if(obj.SilverPens < value) obj.SilverPens = value;
- return true;
- } if ((cheatState.unlocks || cheatState.unlock.GoldPens) && prop === 'GoldPens') {
- if(obj.GoldPens < value) obj.GoldPens = value;
- return true;
- } if ((cheatState.unlocks || cheatState.unlock.obolfrag) && prop === 'ObolFragments') {
- if(obj.ObolFragments < value) obj.ObolFragments = value;
- return true;
- } return Reflect.set(...arguments);
- }
- };
- const proxy = new Proxy(currencies, handler);
- bEngine.getGameAttribute("CurrenciesOwned").h = proxy;
- }
- // Nullify stamp upgrade cost
- function setupStampCostProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const actorEvents124 = this["scripts.ActorEvents_124"];
- const stampCostFn = actorEvents124._customBlock_StampCostss;
- const handler = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.W1s || cheatState.W1.stampcost) {
- const tab = argumentsList[0];
- const index = argumentsList[1];
- const currentStampLevel = bEngine.getGameAttribute("StampLevel")[tab][index];
- const maxStampLevel = bEngine.getGameAttribute("StampLevelMAX")[tab][index];
- if (currentStampLevel < maxStampLevel) return ['Money', 0];
- return ['PremiumGem', 0];
- } return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxy = new Proxy(stampCostFn, handler);
- actorEvents124._customBlock_StampCostss = proxy;
- }
- function setupAFKRateProxy() {
- const actorEvents124 = this["scripts.ActorEvents_124"];
- const afkRate = actorEvents124._customBlock_AFKgainrates;
- const handler = {
- apply: function(originalFn, context, argumentsList) {
- return Reflect.apply(originalFn, context, argumentsList) * cheatState.afkMultiplier;
- }
- };
- const proxy = new Proxy(afkRate, handler);
- actorEvents124._customBlock_AFKgainrates = proxy;
- }
- // Nullify anvil upgrade cost and duration
- function setupAnvilProxy() {
- const ActorEvents189 = this["scripts.ActorEvents_189"];
- const _AnvilProduceStats = ActorEvents189._customBlock_AnvilProduceStats;
- const handler = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.W1s || cheatState.W1.anvil) {
- const t = argumentsList[0];
- if (t == "Costs1") return 0;
- if (t == "Costs2") return 0;
- if (t == "ProductionSpeed") return 1000000;
- else return Reflect.apply(originalFn, context, argumentsList);
- } return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxy = new Proxy(_AnvilProduceStats, handler);
- ActorEvents189._customBlock_AnvilProduceStats = proxy;
- }
- // Ability tweaking cheat
- function setupAbilityProxy() {
- const CustomMaps = this["scripts.CustomMaps"];
- const atkMoveMap = JSON.parse(JSON.stringify(this["scripts.CustomMaps"].atkMoveMap.h));
- for(const [key, value] of Object.entries(atkMoveMap)){
- value.h["cooldown"] = 0;
- value.h["castTime"] = .1;
- value.h["manaCost"] = 0;
- atkMoveMap[key] = value;
- }
- const handler = {
- get: function(obj, prop) {
- if(cheatState.godlikes || cheatState.godlike.ability) return atkMoveMap[prop];
- return Reflect.get(...arguments);
- }
- };
- const proxy = new Proxy(CustomMaps.atkMoveMap.h, handler);
- CustomMaps.atkMoveMap.h = proxy;
- }
- // Nullify smithing cost
- function setupSmithProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const sizeref = bEngine.getGameAttribute("CustomLists").h["ItemToCraftEXP"];
- const tCustomList = this["scripts.CustomLists"];
- const NewReqs = []; // This'll be the new Array where we write our stuff to
- const size = []; // Time to obtain the Array lengths (e.g. amount of items per smithing tab)
- for(const [index, element] of Object.entries(sizeref)) size.push(element.length);
- // Yup we're using double square brackets, cause each item could require multiple materials to craft, while we only need to fill in one
- for(i=0; i < size.length; i++) NewReqs.push(new Array(size[i]).fill([["Copper", "0"]]));
- const handler = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.W1s || cheatState.W1.smith) return NewReqs;
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxy = new Proxy(tCustomList["ItemToCraftCostTYPE"], handler);
- tCustomList["ItemToCraftCostTYPE"] = proxy;
- }
- // Modification of many functions that return static N-dimensional Arrays
- function setupCListProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const CList = bEngine.getGameAttribute("CustomLists").h;
- const FuncDict = {
- AlchemyVialItemsPCT: new Array(CList.AlchemyVialItemsPCT.length).fill(99), // Vials unlock at rollin 1+
- SaltLicks: ChangeND(bEngine,2,"SaltLicks","0",[2]), // Nullify Saltlick upgrade cost
- RefineryInfo: ChangeND(bEngine,2,"RefineryInfo","0",[6,7,8,9,10,11]), // Nullify refinery cost
- TrapBoxInfo: ChangeND(bEngine,3,"TrapBoxInfo","0", [0]), // Nullify trapping time
- PrayerInfo: ChangeND(bEngine,2, // Nullify Prayer Curses and upgrade cost
- ChangeND(bEngine,2,"PrayerInfo","0",[4,6]),
- "None._Even_curses_need_time_off_every_now_and_then.",[2]),
- MTXinfo: ChangeND(bEngine,4,
- ChangeND(bEngine,4,"MTXinfo",0,[3,7]),
- function(t) {return Math.max(t, 15);},[5]), // Nullify MTX cost
- PostOfficePossibleOrders: ChangeND(bEngine,4,"PostOfficePossibleOrders","0",[1]), // Nullify post office order cost
- GuildGPtasks: ChangeND(bEngine,2,"GuildGPtasks","0",[1]), // Nullify guild task requirements
- TaskDescriptions: ChangeND(bEngine,3,"TaskDescriptions","0",[5,6,7,8,9,10,11,12,13,14]), // Nullify task requirements
- SSignInfoUI: ChangeND(bEngine,2,"SSignInfoUI","0",[4]), // Nullify star sign unlock req
- WorshipBASEinfos: ChangeND(bEngine,2,"WorshipBASEinfos", 0,[6]) // Nullify worship cost
- };
- const handler = {
- get: function(obj, prop) {
- if ((cheatState.cauldrons || cheatState.cauldron.vialrng) && prop === "AlchemyVialItemsPCT") return FuncDict[prop];
- if ((cheatState.W3s || cheatState.W3.saltlick) && prop === "SaltLicks") return FuncDict[prop];
- if ((cheatState.W3s || cheatState.W3.refinery) && prop === "RefineryInfo") return FuncDict[prop];
- if ((cheatState.W3s || cheatState.W3.trapping) && prop === "TrapBoxInfo") return FuncDict[prop];
- if ((cheatState.W3s || cheatState.W3.prayer) && prop === "PrayerInfo") return FuncDict[prop];
- if ((cheatState.wides || cheatState.wide.mtx) && prop === "MTXinfo") return FuncDict[prop];
- if ((cheatState.wides || cheatState.wide.post) && prop === "PostOfficePossibleOrders") return FuncDict[prop];
- if ((cheatState.wides || cheatState.wide.guild) && prop === "GuildGPtasks") return FuncDict[prop];
- if ((cheatState.wides || cheatState.wide.task) && prop === "TaskDescriptions") return FuncDict[prop];
- if ((cheatState.wides || cheatState.wide.star) && prop === "SSignInfoUI") return FuncDict[prop];
- if ((cheatState.W3s || cheatState.W3.freeworship) && prop === "WorshipBASEinfos") return FuncDict[prop];
- return Reflect.get(...arguments);
- }
- };
- const proxy = new Proxy(CList, handler);
- bEngine.getGameAttribute("CustomLists").h = proxy;
- }
- // The proxy that allows us to enable/disable quest item requirement nullifications whenever we like
- function setupQuestProxy() {
- const dialogueDefs = this["scripts.DialogueDefinitions"];
- const dialogueDefsC = JSON.parse(JSON.stringify( this["scripts.DialogueDefinitions"].dialogueDefs.h ));
- for(const [key, value] of Object.entries(dialogueDefsC)) // Go over all the quest-giving NPCs
- for(i=0; i < value[1].length; i++) // Go over all the addLine elements of that NPC
- // Notice that inside each value (e.g. NPC object), the 1st element is where all numeric stuff reside.
- // The 0th element holds the textual dialogue, which is not what we're looking for
- if(value[1][i].length == 9){ // Both addLine_ItemsAndSpaceRequired and addLine_Custom have nine elements within
- // Iterate over an unknown amount of req. values/Arrays
- if(value[1][i][2] === value[1][i][8]) // This is addLine_Custom
- for(j=0; j < value[1][i][3].length; j++){
- dialogueDefsC[key][1][i][3][j][1] = 0;
- dialogueDefsC[key][1][i][3][j][3] = 0;
- }
- else for(j=0; j < value[1][i][3].length; j++) // This is addLine_ItemsAndSpaceRequired
- dialogueDefsC[key][1][i][3][j] = 0;
- }
- const handler = {
- get: function(obj, prop) {
- if (cheatState.wides || cheatState.wide.quest) return dialogueDefsC[prop];
- return Reflect.get(...arguments);
- }
- };
- const proxy = new Proxy(dialogueDefs.dialogueDefs.h, handler);
- dialogueDefs.dialogueDefs.h = proxy;
- }
- // Alchemy cheats
- function setupAlchProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const ActorEvents189 = this["scripts.ActorEvents_189"];
- // No vial attempt reduction
- const CauldronP2W = bEngine.getGameAttribute("CauldronP2W");
- const handlerP2W = {
- get: function(obj, prop) {
- if ((cheatState.cauldron.vialattempt || cheatState.cauldrons) && obj[5][0] < obj[5][1]) {
- obj[5][0] = obj[5][1];
- return obj;
- } return Reflect.get(...arguments);
- }
- };
- const proxyP2W = new Proxy(CauldronP2W, handlerP2W);
- bEngine.setGameAttribute("CauldronP2W", proxyP2W);
- // Nullify all cauldron costs and durations (except P2W)
- const CauldronStats = ActorEvents189._customBlock_CauldronStats;
- const handlerStats = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if ((cheatState.cauldrons || cheatState.cauldron.bubblecost) && t == "CauldronCosts") return 0; // Nullified cauldron cost
- if ((cheatState.cauldrons || cheatState.cauldron.vialcost) && t == "VialCosts") return 0; // Nullified vial cost
- if ((cheatState.cauldrons || cheatState.cauldron.lvlreq) && t == "CauldronLvsBrewREQ") return 0; // Nullified brew reqs
- if ((cheatState.cauldrons || cheatState.cauldron.newbubble) && t == "PctChanceNewBubble") return 1000000; // Big enough new bubble chance
- if ((cheatState.cauldrons || cheatState.cauldron.re_speed) && t == "ResearchSpeed") return 10000; // Instant research speed
- if ((cheatState.cauldrons || cheatState.cauldron.liq_rate) && t == "LiquidHRrate") return 10000; // Quick liquid
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyStats = new Proxy(CauldronStats, handlerStats);
- ActorEvents189._customBlock_CauldronStats = proxyStats;
- }
- // W3 cheats
- function setupW3StuffProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const actorEvents345 = this["scripts.ActorEvents_345"];
- // Nullification of all costs inside the workbench
- const WorkbenchStuff = actorEvents345._customBlock_WorkbenchStuff;
- const handlerWb = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if ((cheatState.W3s || cheatState.W3.flagreq) && t == "FlagReq") return 0; // Nullified flag unlock time
- if ((cheatState.W3s || cheatState.W3.saltcost) && t == "TowerSaltCost") return 0; // Partial Tower cost nullification
- if ((cheatState.W3s || cheatState.W3.matcost) && t == "TowerMatCost") return 0; // Partial Tower cost nullification
- if ((cheatState.W3s || cheatState.W3.instabuild) && t == "TowerBuildReq") return 0; // Instant build/upgrade
- if ((cheatState.W3s || cheatState.W3.booktime) && t == "BookReqTime") return 1; // Book/second, holds shadow ban danger and could one day be replaced
- if ((cheatState.W3s || cheatState.W3.totalflags) && t == "TotalFlags") return 10; // Total amnt of placeable flags
- if ((cheatState.W3s || cheatState.W3.buildspd) && t == "PlayerBuildSpd") return 1000000; // Buildrate on cogs
- if (cheatState.W3.shrinehr && t == "ShrineHrREQ") return 0.5; // Shrine lvl up time reduced to 0.5 hour
- // The minimum level talent book from the library is equivalent to the max level
- if ((cheatState.W3s || cheatState.W3.book) && t == "minBookLv"){ argumentsList[0] = "maxBookLv"; return Reflect.apply(originalFn, context, argumentsList); }
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyWb = new Proxy(WorkbenchStuff, handlerWb);
- actorEvents345._customBlock_WorkbenchStuff = proxyWb;
- // Worship mobs die on spawn
- const _customBlock_2inputsFn = actorEvents345._customBlock_2inputs;
- const handlerWs = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.W3.mobdeath || cheatState.W3s)
- return "Worshipmobdeathi" == true ? 0 : 0;
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyWorship = new Proxy(_customBlock_2inputsFn, handlerWs);
- actorEvents345._customBlock_2inputs = proxyWorship;
- const shrineInfo = bEngine.getGameAttribute("ShrineInfo");
- for(const i in shrineInfo) {
- shrineInfo[i] = new Proxy(shrineInfo[i], {
- get: function (original, j) {
- return cheatState.W3.globalshrines && j == 0 ? bEngine.getGameAttribute("CurrentMap") : original[j];
- }
- });
- }
- }
- // W4 cheats
- function setupW4StuffProxy() {
- const actorEvents345 = this["scripts.ActorEvents_345"];
- // Nullification of all costs inside the workbench
- const breeding = actorEvents345._customBlock_Breeding;
- const handlerBreeding = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if ((cheatState.W4s || cheatState.W4.eggcap) && t == "TotalEggCapacity") return 13; // 13 eggs
- if ((cheatState.W4s || cheatState.W4.fenceyard) && t == "FenceYardSlots") return 27; // 27 fenceyard slots
- if ((cheatState.W4s || cheatState.W4.battleslots) && t == "PetBattleSlots") return 6; // 6 battle slots
- if ((cheatState.W4s || cheatState.W4.petchance) && t == "TotalBreedChance") return 1; // 100% new pet chance
- if ((cheatState.W4s || cheatState.W4.genes) && t == "GeneticCost") return 0; // 0 gene upgrades
- if ((cheatState.W4s || cheatState.W4.fasteggs) && t == "TotalTimeForEgg") return 1; // fast eggs
- if ((cheatState.W4s || cheatState.W4.petupgrades) && t == "PetUpgCostREAL") return 0; // free pet upgrades
- if ((cheatState.W4s || cheatState.W4.petrng) && t == "PetQTYonBreed") {
- cheatState.rng = "low";
- var power = Reflect.apply(originalFn, context, argumentsList);
- cheatState.rng = false;
- return Math.round(power * (1 + (Math.random() * 0.1)));
- }; // max power pets
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyBreeding = new Proxy(breeding, handlerBreeding);
- actorEvents345._customBlock_Breeding = proxyBreeding;
- const lab = actorEvents345._customBlock_Labb;
- const handlerLab = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if ((cheatState.W4s || cheatState.W4.labpx) && (t == "Dist" || t == "BonusLineWidth")) return 1000; // long lab connections
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyLab = new Proxy(lab, handlerLab);
- actorEvents345._customBlock_Labb = proxyLab;
- const cooking = actorEvents345._customBlock_CookingR;
- const handlerCooking = {
- apply: function(originalFn, context, argumentsList) {
- const t = argumentsList[0];
- if ((cheatState.W4s || cheatState.W4.instameals) && t == "CookingReqToCook") return 1; // super fast food
- if ((cheatState.W4s || cheatState.W4.instarecipes) && t == "CookingFireREQ") return 1; // super fast recipes
- if ((cheatState.W4s || cheatState.W4.luckychef) && t == "CookingNewRecipeOdds") return 4 == argumentsList[1] ? 1 : 5 == argumentsList[1] ? 0 : Reflect.apply(originalFn, context, argumentsList); // always cook a new recipe
- if ((cheatState.W4s || cheatState.W4.freekitchens) && (t == "CookingNewKitchenCoinCost" || t == "CookingUpgSpiceCostQty")) return 0; // free kitchens and upgrades
- if ((cheatState.W4s || cheatState.W4.freeplates) && t == "CookingMenuMealCosts") return 0; //free dinner table upgrades
- return Reflect.apply(originalFn, context, argumentsList);
- }
- }
- const proxyCooking = new Proxy(cooking, handlerCooking);
- actorEvents345._customBlock_CookingR = proxyCooking;
- }
- // Minigame cheats
- function setupMinigameProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const miningGameOver = bEngine.getGameAttribute("PixelHelperActor")[4].getValue('ActorEvents_229', '_customEvent_MiningGameOver');
- const handlerMining = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.minigame.mining) return; // Do nothing when game over
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyMining = new Proxy(miningGameOver, handlerMining);
- bEngine.getGameAttribute("PixelHelperActor")[4].setValue('ActorEvents_229', '_customEvent_MiningGameOver', proxyMining);
- const fishingGameOver = bEngine.getGameAttribute("PixelHelperActor")[4].getValue('ActorEvents_229', '_customEvent_FishingGameOver');
- const handlerFishing = {
- apply: function(originalFn, context, argumentsList) {
- if (cheatState.minigame.fishing) return; // Do nothing when game over
- return Reflect.apply(originalFn, context, argumentsList);
- }
- };
- const proxyFishing = new Proxy(fishingGameOver, handlerFishing);
- bEngine.getGameAttribute("PixelHelperActor")[4].setValue('ActorEvents_229', '_customEvent_FishingGameOver', proxyFishing);
- }
- // Static fly and hoop positions
- function setupCatchingMinigameProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const catchingGameGenInfo = bEngine.getGameAttribute("PixelHelperActor")[4].getValue('ActorEvents_229', '_GenInfo');
- const handler = {
- get: function(originalObject, property) {
- if (cheatState.minigame.catching) {
- if (Number(property) === 31) return 70;
- if (Number(property) === 33) return [95, 95, 95, 95, 95];
- } return Reflect.get(...arguments);
- }
- };
- const proxyCatching = new Proxy(catchingGameGenInfo, handler);
- bEngine.getGameAttribute("PixelHelperActor")[4].setValue('ActorEvents_229', '_GenInfo', proxyCatching);
- }
- // Chopping minigame: Whole bar filled with gold zone
- function setupGeneralInfoProxy() {
- const bEngine = this["com.stencyl.Engine"].engine;
- const generalInfo = bEngine.getGameAttribute("PixelHelperActor")[1].getValue("ActorEvents_116", "_GeneralINFO");
- const handler = {
- get: function(orignalObject, property) {
- if (cheatState.minigame.choppin && Number(property) === 7)
- return [100, -1, 0, 2, 0, 220, -1, 0, -1, 0, -1, 0, 0, 220, 0, 0, 1];
- return Reflect.get(...arguments);
- }
- };
- const proxyChopping = new Proxy(generalInfo, handler);
- bEngine.getGameAttribute("PixelHelperActor")[1].setValue("ActorEvents_116", "_GeneralINFO", proxyChopping);
- }
- /****************************************************************************************************
- The following few commands are related functions for Creater0822's fork of the injection tool.
- */
- registerCheat('exit', function () { return "exit"; }); // Terminates the game process quicker
- /****************************************************************************************************
- Runescape homage cheats: Now we're finally God Gaming xD
- */
- registerCheat('runescape', function() { // Activate ability bar switching when switching weapons
- cheatState.runescape = !cheatState.runescape;
- return `${cheatState.runescape ? 'Activated' : 'Deactived'} ability bar switching.`;
- });
- // Preset BiS weapon + upgrade binding
- registerCheat('bind', function () {
- const bEngine = this["com.stencyl.Engine"].engine;
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs;
- const AttackLoadout = bEngine.getGameAttribute("AttackLoadout");
- bEngine.whenAnyKeyPressedListeners.push((function(e, t) {
- if ( (e.keyCode === 65 || e.keyCode === 83 || e.keyCode === 68 || e.keyCode === 70) && bEngine.getGameAttribute("MenuType") === 6 ) {
- const BiS = {
- 65:["STR", "EquipmentSword3"], // Key A
- 83:["AGI", "EquipmentBows8"], // Key S
- 68:["WIS", "EquipmentWands7"], // Key D
- 70:["LUK", "EquipmentPunching5"] // Key F
- };
- // BiS = Warped Weapon Upgrade Stone: All random stats goes to the style's DPS stat
- const upgrstats = { Weapon_Power:3, Defence:0, Random_Stat:4 } // Edit this line to whatever you like
- const EquipOrd = bEngine.getGameAttribute("EquipmentOrder")[0];
- const EquipMap = bEngine.getGameAttribute("EquipmentMap")[0];
- const upgrslots = itemDefs.h[BiS[e.keyCode][1]].h["Upgrade_Slots_Left"];
- if(BiS[e.keyCode]){ // Only procs if whatever keycode is defined in the dictionary
- EquipOrd[1] = BiS[e.keyCode][1]; // Change equipped weapon
- EquipMap[1].h["Upgrade_Slots_Left"] = upgrslots*-1; // Deduct the amount of slots left
- EquipMap[1].h["Weapon_Power"] = upgrslots*upgrstats["Weapon_Power"];
- EquipMap[1].h["Defence"] = upgrslots*upgrstats["Defence"];
- EquipMap[1].h[BiS[e.keyCode][0]] = upgrslots*upgrstats["Random_Stat"];
- }
- if(cheatState.runescape){ // Let's play Runescape xD
- switch(e.keyCode) {
- case 65: // Melee
- AttackLoadout[0] = [90,91,105,120,106,121];
- AttackLoadout[1] = [94,108,122,107,639,635];
- break;
- case 83: // Ranged
- AttackLoadout[0] = [270,271,285,300,286,301];
- AttackLoadout[1] = [273,288,303,302,639,635];
- break;
- case 68: // Mage
- AttackLoadout[0] = [453,450,451,482,465,467];
- AttackLoadout[1] = [481,480,466,469,639,635];
- break;
- case 70: // Buffbar
- AttackLoadout[0] = [15,30,94,108,288,481];
- AttackLoadout[1] = [302,303,466,469,122,273];
- break;
- default: break;
- }
- }
- }
- })); return `The custom keybinds have been activated! (Has to be re-applied when changing maps)`;
- });
- /****************************************************************************************************
- We'll start things off with the relatively safe cheats.
- Though the drop function itself is safe, dropping unreleased items obviously isn't!
- */
- // Show all available cheats, this one's as safe as it can get xD
- registerCheat('cheats', function () { return Object.keys(cheats).join('\n'); });
- // Restore non-Proxy changed values
- registerCheat('restore', function(params) {
- if(params[0] === 'save'){
- dictVals.itemDefs = JSON.parse(JSON.stringify(this["scripts.ItemDefinitions"].itemDefs.h));
- dictVals.CardStuff = JSON.parse(JSON.stringify(this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["CardStuff"]));
- return `Saved the current values.`;
- }
- if(params[0] === 'item'){
- this["scripts.ItemDefinitions"].itemDefs.h = dictVals.itemDefs;
- return `Restored original item values.`;
- }
- if(params[0] === 'card'){
- this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["CardStuff"] = dictVals.CardStuff;
- return `Restored original card values`;
- }
- });
- registerCheat('common', function() {
- let rtn = [];
- [
- 'godlike food',
- 'unlock quickref',
- 'unlock teleports',
- 'unlock tickets',
- 'unlock silvpen',
- 'unlock revive',
- 'wide mtx',
- 'wide star',
- 'wide obol',
- 'minigame',
- 'w3 prayer',
- 'w3 freeworship',
- 'w3 book',
- 'w3 globalshrines',
- 'w4 candy',
- 'w4 petrng',
- 'w4 labpx',
- 'upstones rng',
- ].forEach(function (c){
- rtn.push(cheat.apply(this, [c]));
- }, this);
- return rtn.join('\n');
- });
- // Damage multiplier
- registerCheat('damagemultiplier', function (params) {
- cheatState.damageMultiplier = params[0] || 1;
- return `Damage multiplier set to ${cheatState.damageMultiplier}`;
- });
- // Efficiency multiplier
- registerCheat('efficiencymultiplier', function (params) {
- cheatState.efficiencyMultiplier = params[0] || 1;
- return `Efficiency multiplier set to ${cheatState.efficiencyMultiplier}`;
- });
- // AFKRate multiplier
- registerCheat('afkmultiplier', function (params) {
- cheatState.afkMultiplier = params[0] || 1;
- return `AFK % multiplier set to ${cheatState.afkMultiplier}`;
- });
- // The OG-drop function that we all love
- registerCheat('drop', function (params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- const actorEvents189 = this["scripts.ActorEvents_189"];
- const character = bEngine.getGameAttribute("OtherPlayers").h[bEngine.getGameAttribute("UserInfo")[0]];
- const item = params[0];
- const amount = params[1] || 1;
- try {
- const itemDefinition = itemDefs[item];
- if (itemDefinition) {
- let x = character.getXCenter()
- let y = character.getValue("ActorEvents_20", "_PlayerNode");
- if(item.includes("SmithingRecipes")) actorEvents189._customBlock_DropSomething(item, 0, amount, 0, 2, y, 0, x, y);
- else actorEvents189._customBlock_DropSomething(item, amount, 0, 0, 2, y, 0, x, y);
- return `Dropped ${itemDefinition.h.displayName.replace(/_/g, ' ')}. (x${amount})`;
- } else return `No item found for '${item}'`;
- } catch (err) { return `Error: ${err}`; }
- });
- // Spawn any monster you like: Be careful with what you spawn!
- registerCheat('spawn', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
- const ActorEvents124 = this["scripts.ActorEvents_124"];
- const character = bEngine.getGameAttribute("OtherPlayers").h[bEngine.getGameAttribute("UserInfo")[0]];
- const monster = params[0];
- const spawnAmnt = params[1] || 1;
- try{
- const monsterDefinition = monsterDefs[monster];
- if(monsterDefinition){
- let x = character.getXCenter();
- let y = character.getValue("ActorEvents_20", "_PlayerNode");
- for(let i=0; i<spawnAmnt; i++) ActorEvents124._customBlock_CreateMonster(monster, y, x);
- return `Spawned ${monsterDefinition.h["Name"].replace(/_/g, ' ')} ${spawnAmnt} time(s)`
- } else return `No monster found for '${monster}'`;
- } catch (err) { return `Error: ${err}`; }
- });
- // The OG portal unlock command
- registerCheat('unlock', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- if(params[0]){ // Execute sub-commands individually
- if (params && params[0] === 'portals') {
- bEngine.getGameAttribute("KillsLeft2Advance").map(entry => {
- for(i=0; i < entry.length; i++) entry[i] = 0;
- return entry; });
- return `The portals have been unlocked!`;
- }
- if (params && params[0] === 'quickref') {
- cheatState.unlock.quickref = !cheatState.unlock.quickref;
- return `${cheatState.unlock.quickref ? 'Activated' : 'Deactived'} quickref.`
- }
- if (params && params[0] === 'teleports') {
- cheatState.unlock.teleports = !cheatState.unlock.teleports;
- return `${cheatState.unlock.teleports ? 'Activated' : 'Deactived'} free teleports.`
- }
- if (params && params[0] === 'tickets') {
- cheatState.unlock.tickets = !cheatState.unlock.tickets;
- return `${cheatState.unlock.tickets ? 'Activated' : 'Deactived'} free colosseum tickets.`
- }
- if (params && params[0] === 'silvpen') {
- cheatState.unlock.silvpen = !cheatState.unlock.silvpen;
- return `${cheatState.unlock.silvpen ? 'Activated' : 'Deactived'} free silver pens.`
- }
- if (params && params[0] === 'goldpen') {
- cheatState.unlock.goldpen = !cheatState.unlock.goldpen;
- return `${cheatState.unlock.goldpen ? 'Activated' : 'Deactived'} free golden pens (if you have at least one xD).`
- }
- if (params && params[0] === 'obolfrag') {
- cheatState.unlock.obolfrag = !cheatState.unlock.obolfrag;
- return `${cheatState.unlock.obolfrag ? 'Activated' : 'Deactived'} free obol fragments.`
- }
- if (params && params[0] === 'revive') {
- cheatState.unlock.revive = !cheatState.unlock.revive;
- return `${cheatState.unlock.revive ? 'Activated' : 'Deactived'} unlimited revival attempts.`
- }
- return `Wrong sub-command, use one of these:\nportals, ${Object.keys(cheatState.unlock).join(", ")}`;
- } else{ // All Proxy cheats, so everything except portals
- if(cheatState.unlocks){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
- cheatState.unlock.quickref = false;
- cheatState.unlock.teleports = false;
- cheatState.unlock.teleports = false;
- cheatState.unlock.silvpen = false;
- cheatState.unlock.goldpen = false;
- cheatState.unlock.obolfrag = false;
- cheatState.unlock.revive = false;
- } cheatState.unlocks = !cheatState.unlocks;
- return `${cheatState.unlocks ? 'Activated' : 'Deactived'} quickref & free teleports, colosseum tickets, silver/gold pens.`;
- }
- });
- // The bulk item function with dictionary item collections
- registerCheat('bulk', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const itemDefs = this['scripts.ItemDefinitions'].itemDefs.h;
- const actorEvents189 = this["scripts.ActorEvents_189"];
- const character = bEngine.getGameAttribute("OtherPlayers").h[bEngine.getGameAttribute("UserInfo")[0]];
- // Obtaining clusters of items at once (Doesn't return a drop log in the console)
- const items = params[0] || "default";
- const amnt = params[1] || 1;
- try {
- let x = character.getXCenter();
- let y = character.getValue("ActorEvents_20", "_PlayerNode");
- const drop_log = [];
- // Here we'll use the pre-defined function to work out the magic
- if(DictDrops[items]){
- if(items === 'startalents') DictDrops[items].forEach(item => {
- actorEvents189._customBlock_DropSomething("TalentBook1", item, 0, 0, 2, y, 0, x, y);
- drop_log.push(`Dropped talent book with id ${item}`);
- });
- if(items === 'smith'){
- DictDrops[items].forEach(item => { // Drop the regular items
- if(itemDefs[item]){
- actorEvents189._customBlock_DropSomething(item, 1, 0, 0, 2, y, 0, x, y);
- drop_log.push(`Dropped ${itemDefs[item].h.displayName.replace(/_/g, ' ')}. (x${1})`);
- } else drop_log.push(`No item found for '${item}'`);
- });
- //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
- 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
- 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); });
- 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); });
- 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); });
- } else DictDrops[items].forEach(item => {
- if(itemDefs[item]){
- actorEvents189._customBlock_DropSomething(item, amnt, 0, 0, 2, y, 0, x, y);
- drop_log.push(`Dropped ${itemDefs[item].h.displayName.replace(/_/g, ' ')}. (x${amnt})`);
- } else drop_log.push(`No item found for '${item}'`);
- });
- } else drop_log.push(` The sub-command didn't yield any item collection. Existing sub-commands are: \n ${Object.keys(DictDrops).join(", ")}`);
- return drop_log.join("\n");
- } catch (err) { return `Error: ${err}`; }
- });
- // Minigame cheats
- registerCheat('minigame', function (params) {
- if (!params || params.length === 0) {
- cheatState.minigames = !cheatState.minigames;
- return `${cheatState.minigames ? 'Activated' : 'Deactived'} unlimited minigames.`;
- } else {
- // setup needs to be repeated, because currently swapping players would break the setup.
- setupMinigameProxy.call(this);
- setupCatchingMinigameProxy.call(this);
- setupGeneralInfoProxy.call(this);
- if (params && params[0] === 'mining') {
- cheatState.minigame.mining = !cheatState.minigame.mining;
- return `${cheatState.minigame.mining ? 'Activated' : 'Deactived'} minigame mining.`;
- }
- if (params && params[0] === 'fishing') {
- cheatState.minigame.fishing = !cheatState.minigame.fishing;
- return `${cheatState.minigame.fishing ? 'Activated' : 'Deactived'} minigame fishing.`;
- }
- if (params && params[0] === 'catching') {
- cheatState.minigame.catching = !cheatState.minigame.catching;
- return `${cheatState.minigame.catching ? 'Activated' : 'Deactived'} minigame catching.`;
- }
- if (params && params[0] === 'choppin') {
- cheatState.minigame.choppin = !cheatState.minigame.choppin;
- return `${cheatState.minigame.choppin ? 'Activated' : 'Deactived'} minigame choppin.`;
- }
- }
- return `${params ? params[0] : ''} not supported.`;
- });
- /****************************************************************************************************
- The following commands have not been tested properly and/or are definitely dangerous to use
- Use these only if you don't care about shadow ban and/or have the confidence in some...
- Functions such as spawn, godlike and nullify don't directly modify the account info...
- ...and may be safe to use to some degree. (No guarantees!!)
- */
- // All W1 related Proxy cheats
- registerCheat('w1', function(params) {
- if(params[0]){
- if (params && params[0] === 'anvil') {
- cheatState.W1.anvil = !cheatState.W1.anvil;
- return `${cheatState.W1.anvil ? 'Activated' : 'Deactived'} anvil cost and duration nullification.`;
- }
- if (params && params[0] === 'forge') {
- cheatState.W1.forge = !cheatState.W1.forge;
- return `${cheatState.W1.forge ? 'Activated' : 'Deactived'} forge upgrade cost nullification.`;
- }
- if (params && params[0] === 'stampcost') {
- cheatState.W1.stampcost = !cheatState.W1.stampcost;
- return `${cheatState.W1.stampcost ? 'Activated' : 'Deactived'} stamp cost nullification.`;
- }
- if (params && params[0] === 'smith') {
- cheatState.W1.smith = !cheatState.W1.smith;
- return `${cheatState.W1.smith ? 'Activated' : 'Deactived'} smithing cost nullification (change maps to have the effect apply).`;
- }
- if (params && params[0] === 'statue') {
- cheatState.W1.smith = !cheatState.W1.smith;
- return `${cheatState.W1.smith ? 'Activated' : 'Deactived'} statue upgrade cost to 1. \n(This cheat has been commented out due to account breaking issues)`;
- }
- return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.W1).join(", ")}`;
- } else{
- if(cheatState.W1s){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
- cheatState.W1.anvil = false;
- cheatState.W1.forge = false;
- cheatState.W1.stampcost = false;
- cheatState.W1.smith = false;
- } cheatState.W1s = !cheatState.W1s;
- return `${cheatState.W1s ? 'Activated' : 'Deactived'} stamps, forge and anvil upgrade cost nullification.`;
- }
- });
- // Account-wide cheats
- registerCheat('wide', function(params) {
- if(params[0]){
- if (params && params[0] === 'mtx') {
- cheatState.wide.mtx = !cheatState.wide.mtx;
- return `${cheatState.wide.mtx ? 'Activated' : 'Deactived'} mtx shop cost nullification.`;
- }
- if (params && params[0] === 'post') {
- cheatState.wide.post = !cheatState.wide.post;
- return `${cheatState.wide.post ? 'Activated' : 'Deactived'} post office cost nullification.`;
- }
- if (params && params[0] === 'guild') {
- cheatState.wide.guild = !cheatState.wide.guild;
- return `${cheatState.wide.guild ? 'Activated' : 'Deactived'} guild task cost nullification.`;
- }
- if (params && params[0] === 'task') {
- cheatState.wide.task = !cheatState.wide.task;
- return `${cheatState.wide.task ? 'Activated' : 'Deactived'} task cost nullification.`;
- }
- if (params && params[0] === 'quest') {
- cheatState.wide.quest = !cheatState.wide.quest; // Nullifies quest item requirements (doesn't nullify level requirements)
- return `${cheatState.wide.quest ? 'Activated' : 'Deactived'} quest item requirement nullification.`;
- }
- if (params && params[0] === 'star') {
- cheatState.wide.star = !cheatState.wide.star;
- return `${cheatState.wide.star ? 'Activated' : 'Deactived'} star point req. to unlock signs.`;
- }
- if (params && params[0] === 'crystal') {
- cheatState.wide.crystal = !cheatState.wide.crystal;
- return `${cheatState.wide.crystal ? 'Activated' : 'Deactived'} 100% Crystal mob spawn rate.`;
- }
- if (params && params[0] === 'giant') {
- cheatState.wide.giant = !cheatState.wide.giant;
- return `${cheatState.wide.giant ? 'Activated' : 'Deactived'} 100% giant mob spawn rate.`;
- }
- if (params && params[0] === 'obol') {
- cheatState.wide.obol = !cheatState.wide.obol;
- return `${cheatState.wide.obol ? 'Activated' : 'Deactived'} obol reroll cost nullification.`;
- }
- return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.wide).join(", ")}`;
- } else{
- if(cheatState.wides){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
- cheatState.wide.guild = false;
- cheatState.wide.mtx = false;
- cheatState.wide.post = false;
- cheatState.wide.task = false;
- cheatState.wide.quest = false;
- cheatState.wide.star = false;
- cheatState.wide.crystal = false;
- cheatState.wide.giant = false;
- cheatState.wide.obol = false;
- } cheatState.wides = !cheatState.wides;
- return `${cheatState.wides ? 'Activated' : 'Deactived'} account-wide nullifications e.g. mtx, post office, tasks and guild tasks cost.`;
- }
- });
- // All cauldron related cheats
- registerCheat('cauldron', function(params) {
- if(params[0]){
- if (params && params[0] === 'vialrng') {
- cheatState.cauldron.vialrng = !cheatState.cauldron.vialrng;
- return `${cheatState.cauldron.vialrng ? 'Activated' : 'Deactived'} vial unlock upon rolling 1+.`;
- }
- if (params && params[0] === 'vialattempt') {
- cheatState.cauldron.vialattempt = !cheatState.cauldron.vialattempt;
- return `${cheatState.cauldron.vialattempt ? 'Activated' : 'Deactived'} unlimited vial attempts.`;
- }
- if (params && params[0] === 'bubblecost') {
- cheatState.cauldron.bubblecost = !cheatState.cauldron.bubblecost;
- return `${cheatState.cauldron.bubblecost ? 'Activated' : 'Deactived'} bubble cost nullification.`;
- }
- if (params && params[0] === 'vialcost') {
- cheatState.cauldron.vialcost = !cheatState.cauldron.vialcost;
- return `${cheatState.cauldron.vialcost ? 'Activated' : 'Deactived'} vial cost nullification.`;
- }
- if (params && params[0] === 'lvlreq') {
- cheatState.cauldron.lvlreq = !cheatState.cauldron.lvlreq;
- return `${cheatState.cauldron.lvlreq ? 'Activated' : 'Deactived'} lvl requirement nullification.`;
- }
- if (params && params[0] === 'newbubble') {
- cheatState.cauldron.newbubble = !cheatState.cauldron.newbubble;
- return `${cheatState.cauldron.newbubble ? 'Activated' : 'Deactived'} new bubble chance 100%.`;
- }
- if (params && params[0] === 're_speed') {
- cheatState.cauldron.re_speed = !cheatState.cauldron.re_speed;
- return `${cheatState.cauldron.re_speed ? 'Activated' : 'Deactived'} super research speed.`;
- }
- if (params && params[0] === 'liq_rate') {
- cheatState.cauldron.liq_rate = !cheatState.cauldron.liq_rate;
- return `${cheatState.cauldron.liq_rate ? 'Activated' : 'Deactived'} super liquid speed.`;
- }
- return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.cauldron).join(", ")}`;
- } else{ // The full cauldron command that does everything
- if(cheatState.cauldrons){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
- cheatState.cauldron.vialrng = false,
- cheatState.cauldron.vialattempt = false,
- cheatState.cauldron.bubblecost = false;
- cheatState.cauldron.vialcost = false;
- cheatState.cauldron.lvlreq = false;
- cheatState.cauldron.newbubble = false;
- cheatState.cauldron.re_speed = false;
- cheatState.cauldron.liq_rate = false;
- } cheatState.cauldrons = !cheatState.cauldrons;
- return `${cheatState.cauldrons ? 'Activated' : 'Deactived'} all cauldron costs and duration nullifications (except P2W).`;
- }
- });
- // All W3 related Proxy cheats
- registerCheat('w3', function(params) {
- if(params[0]){
- if (params && params[0] === 'mobdeath') {
- cheatState.W3.mobdeath = !cheatState.W3.mobdeath;
- return `${cheatState.W3.mobdeath ? 'Activated' : 'Deactived'} worship mobs insta-death.`;
- }
- if (params && params[0] === 'flagreq') {
- cheatState.W3.flagreq = !cheatState.W3.flagreq;
- return `${cheatState.W3.flagreq ? 'Activated' : 'Deactived'} flag unlock time nullification.`;
- }
- if (params && params[0] === 'saltcost') {
- cheatState.W3.altcost = !cheatState.W3.altcost;
- return `${cheatState.W3.altcost ? 'Activated' : 'Deactived'} salt cost nullification.`;
- }
- if (params && params[0] === 'matcost') {
- cheatState.W3.flagreq = !cheatState.W3.flagreq;
- return `${cheatState.W3.flagreq ? 'Activated' : 'Deactived'} flag unlock time nullification.`;
- }
- if (params && params[0] === 'instabuild') {
- cheatState.W3.instabuild = !cheatState.W3.instabuild;
- return `${cheatState.W3.instabuild ? 'Activated' : 'Deactived'} insta-build of buildings.`;
- }
- if (params && params[0] === 'booktime') {
- cheatState.W3.booktime = !cheatState.W3.booktime;
- return `${cheatState.W3.booktime ? 'Activated' : 'Deactived'} book per second.`;
- }
- if (params && params[0] === 'totalflags') {
- cheatState.W3.totalflags = !cheatState.W3.totalflags;
- return `${cheatState.W3.totalflags ? 'Activated' : 'Deactived'} 10 total flags.`;
- }
- if (params && params[0] === 'buildcogs') {
- cheatState.W3.buildspd = !cheatState.W3.buildspd;
- return `${cheatState.W3.buildspd ? 'Activated' : 'Deactived'} super build speed on cogs.`;
- }
- if (params && params[0] === 'saltlick') {
- cheatState.W3.saltlick = !cheatState.W3.saltlick;
- return `${cheatState.W3.saltlick ? 'Activated' : 'Deactived'} Salt Lick upgrade cost nullification.`;
- }
- if (params && params[0] === 'refinery') {
- cheatState.W3.refinery = !cheatState.W3.refinery;
- return `${cheatState.W3.refinery ? 'Activated' : 'Deactived'} refinery cost nullification.`;
- }
- if (params && params[0] === 'trapping') {
- cheatState.W3.trapping = !cheatState.W3.trapping;
- return `${cheatState.W3.trapping ? 'Activated' : 'Deactived'} trapping duration nullification.`;
- }
- if (params && params[0] === 'book') {
- cheatState.W3.book = !cheatState.W3.book;
- return `${cheatState.W3.book ? 'Activated' : 'Deactived'} always max lvl talent book.`;
- }
- if (params && params[0] === 'prayer') {
- cheatState.W3.prayer = !cheatState.W3.prayer;
- return `${cheatState.W3.prayer ? 'Activated' : 'Deactived'} Prayer curse nullification.`;
- }
- if (params && params[0] === 'shrinehr') {
- cheatState.W3.shrinehr = !cheatState.W3.shrinehr;
- return `${cheatState.W3.shrinehr ? 'Activated' : 'Deactived'} shrine lvl time reduction to 0.5h.`;
- }
- if (params && params[0] === 'worshipspeed') {
- cheatState.W3.worshipspeed = !cheatState.W3.worshipspeed;
- return `${cheatState.W3.worshipspeed ? 'Activated' : 'Deactived'} worship charge superspeed`;
- }
- if (params && params[0] === 'freeworship') {
- cheatState.W3.freeworship = !cheatState.W3.freeworship;
- return `${cheatState.W3.freeworship ? 'Activated' : 'Deactived'} nullification of worship charge cost`;
- }
- if (params && params[0] === 'globalshrines') {
- cheatState.W3.globalshrines = !cheatState.W3.globalshrines;
- return `${cheatState.W3.globalshrines ? 'Activated' : 'Deactived'} global shrines`;
- }
- return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.W3).join(", ")}`;
- } else{ // The full workbench command that does everything
- if(cheatState.W3s){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
- for (const i in Object.keys(cheatState.W3)) cheatState.W3[i] = false;
- } cheatState.W3s = !cheatState.W3s;
- return `${cheatState.W3s ? 'Activated' : 'Deactived'} all workbench nullifications and worship mob insta-death.`;
- }
- });
- // All W4 related Proxy cheats
- registerCheat('w4', function(params) {
- if(params[0]){
- const descriptionMap = {
- 'battleslots': 'all 6 battle slots',
- 'eggcap': 'all egg slots',
- 'fenceyard': 'all fenceyard slots',
- 'petchance': '100% new pet chance',
- 'genes': '0 gene upgrades',
- 'fasteggs': 'fast incubation',
- 'petupgrades': 'free pet upgrades',
- 'petrng': 'max strength pets (for level and egg, with a tiny bit of randomness)',
- 'labpx': 'long lab connections',
- 'instameals': 'speedy meal cooking',
- 'instarecipes': 'speedy recipe research',
- 'luckychef': 'new recipe guarantee',
- 'freekitchens': 'free kitchens and upgrades',
- 'freeplates': 'free dinner plate upgrades',
- 'candy': 'candy use in space',
- };
- if(params[0] in descriptionMap) {
- cheatState.W4[params[0]] = ! cheatState.W4[params[0]];
- return `${cheatState.W4[params[0]] ? 'Activated' : 'Deactived'} ${descriptionMap[params[0]]}`;
- }
- if (params && params[0] === 'labchips') {
- let labChips = this["com.stencyl.Engine"].engine.getGameAttribute("Lab")[15];
- for(let i = 0; i <= 21; i++) {
- labChips[i] = 20;
- }
- return `Added 20x all lab chips`;
- }
- return `Wrong sub-command, use one of these:\n${Object.keys(cheatState.W4).join(", ")}`;
- } else{ // The full workbench command that does everything
- if(cheatState.W4s){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
- for (const i in Object.keys(cheatState.W4)) cheatState.W4[i] = false;
- } cheatState.W4s = !cheatState.W4s;
- return `${cheatState.W4s ? 'Activated' : 'Deactived'} all W4 cheats`;
- }
- });
- // Godlike powers
- registerCheat('godlike', function(params) {
- if(params[0]){
- if (params && params[0] === 'hp') {
- cheatState.godlike.hp = !cheatState.godlike.hp;
- return `${cheatState.godlike.hp ? 'Activated' : 'Deactived'} hp deduction nullification.`;
- }
- if (params && params[0] === 'mp') {
- cheatState.godlike.mp = !cheatState.godlike.mp;
- return `${cheatState.godlike.mp ? 'Activated' : 'Deactived'} mp deduction nullification.`;
- }
- if (params && params[0] === 'reach') {
- cheatState.godlike.reach = !cheatState.godlike.reach;
- return `${cheatState.godlike.reach ? 'Activated' : 'Deactived'} reach set to 666.`;
- }
- if (params && params[0] === 'crit') {
- cheatState.godlike.crit = !cheatState.godlike.crit;
- return `${cheatState.godlike.crit ? 'Activated' : 'Deactived'} crit set to 100.`;
- }
- if (params && params[0] === 'ability') {
- cheatState.godlike.ability = !cheatState.godlike.ability;
- return `${cheatState.godlike.ability ? 'Activated' : 'Deactived'} zero ability cooldown, mana cost nullification and cast time 0.1s.`;
- }
- if (params && params[0] === 'bosshp') {
- cheatState.godlike.bosshp = !cheatState.godlike.bosshp;
- return `${cheatState.godlike.bosshp ? 'Activated' : 'Deactived'} Boss HP nullification.`;
- }
- if (params && params[0] === 'food') {
- cheatState.godlike.food = !cheatState.godlike.food;
- return `${cheatState.godlike.food ? 'Activated' : 'Deactived'} food deduction nullification.`;
- }
- if (params && params[0] === 'hitchance') {
- cheatState.godlike.hitchance = !cheatState.godlike.hitchance;
- return `${cheatState.godlike.hitchance ? 'Activated' : 'Deactived'} 100% hit chance.`;
- }
- if (params && params[0] === 'buff') {
- cheatState.godlike.buff = !cheatState.godlike.buff;
- 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)`;
- }
- if (params && params[0] === 'dmg') {
- cheatState.godlike.dmg = !cheatState.godlike.dmg;
- return `${cheatState.godlike.dmg ? 'Activated' : 'Deactived'} auto attack capping: Crits are disabled and combat abilities will overflow.`;
- }
- if (params && params[0] === 'speed') { // Not a Proxy cheat, will have to activate individually
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- for( const [index, element] of Object.entries(itemDefs))
- if(element.h["typeGen"] === "aWeapon") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Speed"] = params[1] || 9;
- return `All weapon speed are up to Turbo. \nThe max speed parameter you can set is 14: Higher will cause a non-attacking bug.`;
- }
- if (params && params[0] === 'card') {
- const bEngine = this["com.stencyl.Engine"].engine;
- const CardStuff = bEngine.getGameAttribute("CustomLists").h["CardStuff"];
- const TargetCards = ["Boss2A", "Boss2B", "poopBig", "OakTree", "Copper"];
- for(const [key1, value1] of Object.entries(CardStuff))
- for(const [key2, value2] of Object.entries(value1))
- if(TargetCards.includes(value2[0])) CardStuff[key1][key2][4] = "10000";
- return `The cards Efaunt, Chaotic Efaunt, Dr Defecaus, Oak Tree and Copper have been altered with insane stats.`;
- }
- return `Wrong sub-command, use one of these:\nfood, speed, card, ${Object.keys(cheatState.godlike).join(", ")}`;
- } else{
- if(cheatState.godlikes){ // If this was true, then the next line should be 'disable', so set all the individuals to false too
- cheatState.godlike.hp = false;
- cheatState.godlike.mp = false;
- cheatState.godlike.reach = false;
- cheatState.godlike.crit = false;
- cheatState.godlike.ability = false;
- cheatState.godlike.bosshp = false;
- cheatState.godlike.food = false;
- cheatState.godlike.hitchance = false;
- cheatState.godlike.buff = false;
- } cheatState.godlikes = !cheatState.godlikes;
- 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.`;
- }
- });
- // Quick daily shop and post office reset
- registerCheat('daily', function(params) {
- this["com.stencyl.Engine"].engine.getGameAttribute("TimeAway").h["ShopRestock"]=1
- return `The daily shop restock has been triggered, which somehow also triggers the daily post office reset.`;
- });
- // This function doesn't kill other players (luckily) but yourself :)
- registerCheat('noob', function(params) {
- const hpval = parseInt(params[0]) || 0;
- this["com.stencyl.Engine"].engine.gameAttributes.h.PlayerHP = hpval;
- return `The amount of health is set to ${params[0]}`;
- });
- // This function definitely looks dangerous as it changes your class, but doesn't reset distributed talents!
- registerCheat('class', function(params) {
- let ClassId = parseInt(params[0]) || -1;
- if(ClassId == -1) return `Class Id has to be a numeric value!`;
- if(ClassId > 50 || ClassId < 0) ClassId = 1; // A small fail-safe
- this["com.stencyl.Engine"].engine.setGameAttribute("CharacterClass", ClassId);
- return `Class id has been changed to ${ClassId}`;
- });
- // Not sure if this function's safe, probably is to most items but I have not personally tested.
- registerCheat('qnty', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const setqnty = params[1] || 1;
- if(params[0] === "inv"){
- bEngine.getGameAttribute("ItemQuantity")[0] = setqnty;
- return `The item quantity in the first inventory slot has been changed to ${setqnty}`;
- } else if(params[0] === "chest"){
- bEngine.getGameAttribute("ChestQuantity")[0] = setqnty;
- return `The item quantity in the first chest slot has been changed to ${setqnty}`;
- } else return "Unknown sub-command!\nKnown sub-commands are 'inv' and 'chest'.";
- });
- // This function is extremely dangerous, as you're changing the lvl value your exp isn't changing accordingly
- registerCheat('lvl', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const lvltype = params[0];
- const setlvl = parseInt(params[1]) || -1;
- if(setlvl == -1) return `The lvl value has to be numeric!`; // Yup this is a dummy-proof measurement to prevent account bricking
- // The class and skill lvl code is easily done through dictionary.
- const dictype = {'class':0,'mining':1,'smithing':2,'chopping':3,'fishing':4,'alchemy':5,'catching':6,'trapping':7,'construction':8,'worship':9};
- if(Object.keys(dictype).includes(lvltype)) bEngine.getGameAttribute('Lv0')[dictype[lvltype]] = setlvl;
- else if(lvltype === 'furnace') bEngine.setGameAttribute("FurnaceLevels", [16,setlvl,setlvl,setlvl,setlvl,setlvl]);
- else if(lvltype === 'statue') bEngine.getGameAttribute("StatueLevels").forEach(item => item[0] = setlvl);
- else if(lvltype === 'anvil'){
- const Levels = bEngine.getGameAttribute("AnvilPAstats");
- const lvllist = { exp: 3, spd: 4, cap: 5 };
- for (const i in lvllist) Levels[lvllist[i]] = setlvl;
- bEngine.setGameAttribute("AnvilPAstats", Levels);
- } else if(lvltype === 'talent'){
- const Levels0 = bEngine.getGameAttribute("SkillLevelsMAX");
- const Levels1 = bEngine.getGameAttribute("SkillLevels");
- for(const [index,element] of Object.entries(Levels0)) Levels0[index] = Levels1[index] = setlvl;
- } else if(lvltype === 'stamp'){
- const Levels0 = bEngine.getGameAttribute("StampLevelMAX");
- const Levels1 = bEngine.getGameAttribute("StampLevel");
- for(const [index1,element1] of Object.entries(Levels0)) // A double for loop to nail the job
- for(const [index2,element2] of Object.entries(element1))
- Levels0[index1][index2] = Levels1[index1][index2] = setlvl;
- return `Both current and max of all stamp levels have been set to ${setlvl}`;
- } else if(lvltype === 'shrine'){
- const Levels = bEngine.getGameAttribute("ShrineInfo");
- Levels.forEach(item => { item[3] = setlvl; item[4] = 0; }); // Shrine lvl set and accumulated xp to 0
- } else if(lvltype === 'guild'){
- const Levels = bEngine.getGameAttribute("GuildTasks");
- for(const [index,element] of Object.entries(Levels[0])) Levels[0][index] = setlvl;
- return "This is only for show and does not truly work server-sided. Might even be dangerous, but so is the entire lvl-command.";
- } else return "This lvl type isn't supported.";
- return `${lvltype} has been changed to ${setlvl}.`;
- });
- // Raw changes to cauldron variables
- registerCheat('setalch', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const alchdict = {"orange":0, "green":1, "purple":2, "yellow":3, "vial":4, "color":5, "liquid":6, "upgrade":8};
- const setlvl = params[1] || 1000;
- if(Object.keys(alchdict).includes(params[0])) {
- const tochange = bEngine.getGameAttribute("CauldronInfo")[alchdict[params[0]]];
- if(params[0] === "upgrade"){
- for(const [index1,element1] of Object.entries(tochange))
- for(const [index2,element2] of Object.entries(element1))
- tochange[index1][index2][1] = setlvl;
- return `All cauldron upgrades set to lvl ${setlvl}`;
- } // No need to else, as there's a return
- for(const [index,element] of Object.entries(tochange)) tochange[index] = setlvl;
- return `All ${params[0]} levels have changed to ${setlvl}.`;
- } else return `Wrong sub-command, use one of these:\n${Object.keys(alchdict).join(", ")}`;
- });
- // A highly dangerous function, only use it on shadow banned test accounts!!
- registerCheat('abilitybar', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const talentDefs = bEngine.getGameAttribute("CustomLists").h["TalentIconNames"];
- const AttackLoadout = bEngine.getGameAttribute("AttackLoadout");
- // First parameter is the ability bar that ranges from 0 to 9.
- const abilitybar = params[0];
- const abilities = params.slice(1); //
- const Abilities = [];
- if(abilitybar < 10 && abilitybar >= 0){
- for(const [index,element] of Object.entries(abilities)){
- if(index >= 6) return "An ability bar can only hold 6 elements!";
- if(element < talentDefs.length && element >= 0){
- Abilities.push(`Bar ${abilitybar} ability ${index} set to: ${talentDefs[element].replace(/_/g, ' ').toLowerCase()}`)
- AttackLoadout[abilitybar][index] = element;
- } else Abilities.push("Ability falls out of the known id range!");
- }
- bEngine.setGameAttribute("AttackLoadout", AttackLoadout);
- return Abilities.join("\n");
- } else return "The ability bar index ranges from 0 to 9!";
- });
- // All item can by worn by any class
- registerCheat('equipall', function(params) {
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- for( const [index, element] of Object.entries(itemDefs)){ // Any item with Class attribute is set to ALL, and any with lvlReqToEquip set to 1
- if(element.h["Class"]) this["scripts.ItemDefinitions"].itemDefs.h[index].h["Class"] = "ALL";
- if(element.h["lvReqToEquip"]) this["scripts.ItemDefinitions"].itemDefs.h[index].h["lvReqToEquip"] = 1;
- } return `All items can be worn by any class at any level.`;
- });
- // All item can by worn by any class
- registerCheat('upstones', function(params) {
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- if(params[0] === 'rng'){ // Should be 100% safe
- for( const [index, element] of Object.entries(itemDefs))
- if(element.h["typeGen"] === "dStone") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Amount"] = 100;
- return `All upgrade stones have 100% success chance.`;
- } else if(params[0] === 'use'){ // Probably risky
- for( const [index, element] of Object.entries(itemDefs))
- if(element.h["typeGen"] === "dStone") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Trigger"] = 0;
- return `Using an upgrade stone doesn't deduct remaining upgrade amount on an item.`;
- } 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.`;
- });
- // I still aim to add even more costs to nullify
- registerCheat('nullify', function(params) {
- const changedstuff = []; // Used to concatenate strings about what has been nullified by this command xD
- cheatState.wides = !cheatState.wides;
- changedstuff.push(`${cheatState.wides ? 'Activated' : 'Deactived'} account-wide nullifications e.g. mtx, post office, tasks and guild tasks cost.`);
- cheatState.W1s = !cheatState.W1s;
- changedstuff.push(`${cheatState.W1s ? 'Activated' : 'Deactived'} stamps, forge and anvil upgrade cost nullification.`);
- cheatState.cauldrons = !cheatState.cauldrons;
- changedstuff.push(`${cheatState.cauldrons ? 'Activated' : 'Deactived'} all cauldron costs and durations (except P2W).`);
- cheatState.W3s = !cheatState.W3s;
- changedstuff.push(`${cheatState.W3s ? 'Activated' : 'Deactived'} all workbench nullifications and worship mob insta-death.`);
- return changedstuff.join("\n"); // Tell the user how many things have happened through this singular command xD
- });
- /****************************************************************************************************
- The following functions only aggregate information from the game's data structures.
- As such, these functions are perfectly safe.
- */
- // Search by item, monster or talent name: All in lowercase!
- registerCheat('search', function (params) {
- const queryX = params.slice(1) && params.slice(1).length ? params.slice(1).join(' ').toLowerCase() : undefined;
- const bEngine = this["com.stencyl.Engine"].engine;
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- const ItemVals = [[],[]]
- const searchVals = [];
- if(queryX){
- if(params[0] === "item"){
- searchVals.push("Id, Item");
- for(const [key, value] of Object.entries(itemDefs)){
- const valName = value.h.displayName.replace(/_/g, ' ').toLowerCase();
- if (valName.includes(queryX)) searchVals.push(`${key} - ${valName}`);
- }
- } else if(params[0] === "monster"){
- searchVals.push("Id, Monster");
- const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
- for (const [key, value] of Object.entries(monsterDefs)) {
- const valName = value.h["Name"].replace(/_/g, ' ').toLowerCase();
- if (valName.includes(queryX)) searchVals.push(`${key} - ${valName}`);
- }
- } else if(params[0] === "talent"){
- searchVals.push("Order, Id, Talent");
- const talentDefs = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["TalentIconNames"];
- const Order = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h["TalentOrder"];
- for(let i=0; i < Order.length; i++){
- const valName = talentDefs[Order[i]].replace(/_/g, ' ').toLowerCase();
- if (valName.includes(queryX)) searchVals.push(`${i} - ${Order[i]} - ${valName}`);
- }
- } else if(params[0] === "smith"){
- searchVals.push("Tab, Id, ItemId, ItemName");
- const ItemToCraftNAME = bEngine.getGameAttribute("CustomLists").h["ItemToCraftNAME"];
- for(const [key, value] of Object.entries(itemDefs)){
- const valName = value.h.displayName.replace(/_/g, ' ').toLowerCase();
- if (valName.includes(queryX)) ItemVals.push([key,valName]);
- }
- for(h=0; h < ItemVals.length; h++) for(i=0; i < ItemToCraftNAME.length; i++) for(j=0; j < ItemToCraftNAME[i].length; j++)
- if (ItemVals[h][0] == ItemToCraftNAME[i][j]) searchVals.push(`${i+i}, ${j}, ${ItemVals[h][0]}, ${ItemVals[h][1]}`);
- } else return "Invalid sub-command! Valid ones are:\n item\n monster\n talent\n smith";
- if (searchVals.length > 0) return searchVals.join('\n');
- else return `No info found for '${queryX}'`;
- }
- });
- // Get Game Attributes: Uses a for loop to iterate over the object's key/index and element.
- registerCheat('gga', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- return gg_func(params, 0, bEngine); // Yup the function's down at the bottom
- });
- // Get Game Key
- registerCheat('ggk', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- return gg_func(params, 1, bEngine); // Yup the function's down at the bottom
- });
- /* Evaluate Get Game Attributes: fill in the variable you'd like to see
- > egga this["com.stencyl.Engine"].engine.getGameAttribute("Lv0");
- Under the hood it does:
- > let gga = this["com.stencyl.Engine"].engine.getGameAttribute("Lv0");
- Yeah this function is therefore pretty buggy, don't expect too much out of it xD
- */
- registerCheat('egga', function(params) {
- const foundVals = [];
- const bEngine = this["com.stencyl.Engine"].engine;
- const CList = this["scripts.CustomLists"];
- const Clist = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- const atkMoveMap = this["scripts.CustomMaps"].atkMoveMap.h;
- const abilities = this["com.stencyl.Engine"].engine.getGameAttribute("AttackLoadout");
- try{
- let gga = eval(params[0]);
- let obj_gga = Object.entries(gga);
- if(typeof obj_gga == "string" || obj_gga.length == 0) foundVals.push(`${gga}`);
- else for(const [index,element] of obj_gga) foundVals.push(`${index}, ${element}`);
- return foundVals.join("\n");
- } catch(error){
- // If the gga isn't an Array nor Dictionary.
- if(error instanceof TypeError) return `This TypeError should appear if you gave a non-existing object`;
- return `Error: ${err}`;
- }
- });
- // Evaluate Get Game Key: The code is indeed quite redundant, but yeah... it works
- registerCheat('eggk', function(params) {
- const foundVals = [];
- const bEngine = this["com.stencyl.Engine"].engine;
- const CList = this["scripts.CustomLists"];
- const Clist = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- const atkMoveMap = this["scripts.CustomMaps"].atkMoveMap.h;
- const abilities = this["com.stencyl.Engine"].engine.getGameAttribute("AttackLoadout");
- try{
- let gga = eval(params[0]);
- let obj_gga = Object.entries(gga);
- if(typeof obj_gga == "string" || obj_gga.length == 0) foundVals.push(`Non iterable value: ${gga}`);
- else for(const [index,element] of obj_gga) foundVals.push(`${index}`);
- return foundVals.join("\n");
- } catch(error){
- // If the gga isn't an Array nor Dictionary.
- if(error instanceof TypeError) return `This TypeError should appear if you gave a non-existing object`;
- return `Error: ${err}`;
- }
- });
- // A list creator
- registerCheat('list', function (params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- const CList = this["scripts.CustomLists"];
- const Clist = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
- const foundVals = [];
- if(params[0] == "item"){
- foundVals.push("Id, ingameName");
- for(const [key, value] of Object.entries(itemDefs)){
- let valName;
- if(key.startsWith("Cards")) valName = (value.h.desc_line1.replace(/_/g, ' ').toLowerCase() + value.h.desc_line2.replace(/_/g, ' ').toLowerCase()).replace("filler", '');
- else valName = value.h.displayName.replace(/_/g, ' ').toLowerCase();
- foundVals.push(`${key}, ${valName}`);
- }
- } else if(params[0] == "monster"){
- foundVals.push("Id, ingameName, HP, Defence, Damage, EXP");
- const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
- for(const [key, value] of Object.entries(monsterDefs)){
- const valName = value.h["Name"].replace(/_/g, ' ').toLowerCase();
- foundVals.push(`${key}, ${valName}, ${value.h["MonsterHPTotal"]}, ${value.h["Defence"]}, ${value.h["Damages"][0]}, ${value.h["ExpGiven"]}`);
- }
- } else if(params[0] == "card"){
- foundVals.push("Id, Entity, Value, Effect");
- const monsterDefs = this["scripts.MonsterDefinitions"].monsterDefs.h;
- const CardStuff = bEngine.getGameAttribute("CustomLists").h["CardStuff"];
- for(const [key1, value1] of Object.entries(CardStuff))
- for(const [key2, value2] of Object.entries(value1)){
- if(monsterDefs[value2[0]]) foundVals.push(`${value2[0]}, ${monsterDefs[value2[0]].h["Name"]}, ${value2[4]}, ${value2[3]}`);
- else foundVals.push(`${value2[0]}, Unknown, ${value2[4]}, ${value2[3]}`);
- }
- } else if(params[0] == "class"){
- foundVals.push("Id, ClassName, PromotesTo");
- for(const [index, element] of CList.ClassNames().entries())
- foundVals.push(`${index}, ${element}, [${CList.ClassPromotionChoices()[index]}]`);
- } else if(params[0] == "quest"){
- foundVals.push("Id, QuestName, NPC, QuestlineNo, paramX1");
- for(const [index, element] of CList.SceneNPCquestOrder().entries())
- foundVals.push(`${element}, ${CList.SceneNPCquestInfo()[index].join(", ")}`);
- } else if(params[0] == "map"){
- foundVals.push("Num_Id, Str_Id, MapName, AFK1, AFK2, Transition");
- for(const [index, element] of CList.MapName().entries())
- foundVals.push(`${index}, ${element}, ${CList.MapDispName()[index]}, ${CList.MapAFKtarget()[index]}, ${CList.MapAFKtargetSide()[index]}, [${CList.SceneTransitions()[index]}]`);
- } else if(params[0] == "talent"){
- foundVals.push("Order, Id, Name");
- const Order = bEngine.getGameAttribute("CustomLists").h["TalentOrder"];
- const talentDefs = bEngine.getGameAttribute("CustomLists").h["TalentIconNames"];
- for(i=0; i < Order.length; i++) if(talentDefs[Order[i]] !== "_")
- foundVals.push(`${i}, ${Order[i]}, ${talentDefs[Order[i]]}`);
- } else if(params[0] == "ability"){
- foundVals.push("Order, Id, Name");
- const Order = bEngine.getGameAttribute("CustomLists").h["TalentOrder"];
- const talentDefs = bEngine.getGameAttribute("CustomLists").h["TalentIconNames"];
- const atkMoveMap = this["scripts.CustomMaps"].atkMoveMap.h;
- for(i=0; i < Order.length; i++) if(talentDefs[Order[i]] !== "_")
- if(atkMoveMap[talentDefs[Order[i]]]) // Filter out all non-ability talents
- foundVals.push(`${i}, ${Order[i]}, ${talentDefs[Order[i]]}`);
- } else if(params[0] == "smith"){
- foundVals.push("CraftId, Tab, ItemId, ItemName");
- const ItemToCraftNAME = bEngine.getGameAttribute("CustomLists").h["ItemToCraftNAME"];
- for(i=0; i < ItemToCraftNAME.length; i++) for(j=0; j < ItemToCraftNAME[i].length; j++){
- let itemName = itemDefs[ItemToCraftNAME[i][j]].h.displayName.replace(/_/g, ' ').toLowerCase();
- foundVals.push(`${i+1}, ${j}, ${ItemToCraftNAME[i][j]}, ${itemName}`);
- }
- }
- else if(params[0] = "gga") for(const [key, val] of Object.entries(bEngine.gameAttributes.h)) foundVals.push(key);
- else return "Valid sub-commands are:\n item\n monster\n class\n quest\n map\n talent\n smith";
- if(params[1]) return foundVals.filter(foundVals => foundVals.includes(params[1])).join("\n");
- return foundVals.join("\n"); // Concatenate all lines into one string with new lines
- });
- /****************************************************************************************************
- These following functions enable you to perform extremely risky value manipulations...
- ...and have insanely high chance of destroying your account.
- Only use these when you know what you're doing!!
- */
- // Stop/restart cloud saving
- registerCheat('cloudz', function() {
- cheatState.cloudz = !cheatState.cloudz;
- 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.`;
- });
- // Wipe stuff
- registerCheat('wipe', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- if(params[0] === "inv"){
- const wipedef = bEngine.getGameAttribute("InventoryOrder");
- for(const [index,element] of Object.entries(wipedef)) wipedef[index] = "Blank";
- return "The inventory has been wiped.";
- } else if(params[0] == "chest"){
- const wipedef = bEngine.getGameAttribute("ChestOrder");
- for(const [index,element] of Object.entries(wipedef)) wipedef[index] = "Blank";
- return "Wipe chest could result in a crash: Should be fine after restart.";
- } else if(params[0] === "forge"){
- for(const [index,element] of Object.entries(bEngine.getGameAttribute("ForgeItemOrder"))){
- bEngine.getGameAttribute("ForgeItemOrder")[index] = "Blank";
- bEngine.getGameAttribute("ForgeItemQuantity")[index] = 0;
- } return "The forge has been wiped. \nIf the game crashes, it should be fine after restart.";
- } else if(params[0] === "ban"){
- bEngine.getGameAttribute("OptionsListAccount")[26] = 0;
- 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)";
- } else return "Unknown sub-command given\nKnown sub-commands are 'inv', 'chest', 'forge' and 'ban'.";
- });
- // Don't use unless needed: This function exists to wipe certain stuff from your already broken account!
- registerCheat('fix_save', function(params) {
- fixobj = this["com.stencyl.Engine"].engine.getGameAttribute(params[0]);
- return "Saved";
- });
- registerCheat('fix_write', function(params) {
- this["com.stencyl.Engine"].engine.setGameAttribute(params[0], fixobj);
- return "Writen";
- });
- // A highly dangerous function that lets you manually change in-game variables, like:
- // > chng bEngine.getGameAttribute("QuestComplete").h["Secretkeeper1"]=1
- registerCheat('chng', function(params) {
- const bEngine = this["com.stencyl.Engine"].engine;
- const CList = this["com.stencyl.Engine"].engine.getGameAttribute("CustomLists").h;
- try{
- eval(params[0]);
- return `${params[0]}`;
- } catch(error){ return `Error: ${err}`; }
- });
- /****************************************************************************************************
- A huge dictionary made for the bulk function:
- Since we'd hardly access this part of the code, it's fine being all the way down here.
- */
- const DictDrops = {
- // 0) Handy cheat items
- default:["Timecandy6","ExpBalloon3","ResetCompleted","ResetCompletedS","ClassSwap"],
- // 1) All bag boosters
- invbag:["InvBag1","InvBag2","InvBag3","InvBag4","InvBag5","InvBag6","InvBag7","InvBag8",//"InvBag9",
- "InvBag21","InvBag22","InvBag23","InvBag24","InvBag25","InvBag26","InvBag100",
- "InvBag101","InvBag102","InvBag103","InvBag104","InvBag105","InvBag106","InvBag107",//"InvBag101",
- "InvBag109","InvBag110"],
- // 2) All storage chest boosters
- invstorage:["InvStorage1","InvStorage2","InvStorage3","InvStorage4","InvStorage5","InvStorage6","InvStorage7",
- "InvStorage8","InvStorage9","InvStorage10","InvStorage11","InvStorage12","InvStorage13",//"InvStorage14",
- "InvStorage15","InvStorage16","InvStorage17","InvStorage18","InvStorage19","InvStorage20","InvStorage21",
- "InvStorage31","InvStorage32","InvStorage33","InvStorage34","InvStorage35","InvStorage36","InvStorage37",
- "InvStorage38","InvStorage39","InvStorage40","InvStorage41","InvStorage42","InvStorageF"],
- // 3) All item bag capacity boosters
- capbag:["MaxCapBagT2","MaxCapBag1","MaxCapBag2","MaxCapBag3","MaxCapBag4","MaxCapBag5",
- "MaxCapBagMi6","MaxCapBagT1","MaxCapBag7","MaxCapBag9","MaxCapBagT3","MaxCapBagT4",
- "MaxCapBagT5","MaxCapBagT6","MaxCapBag6","MaxCapBag8","MaxCapBag10","MaxCapBagF3",
- "MaxCapBagF4","MaxCapBagF5","MaxCapBagF6","MaxCapBagM1","MaxCapBagM2","MaxCapBagM3",
- "MaxCapBagM4","MaxCapBagM5","MaxCapBagM6","MaxCapBagM7","MaxCapBagFi0","MaxCapBagFi1",
- "MaxCapBagFi2","MaxCapBagFi3","MaxCapBagFi4","MaxCapBagFi5","MaxCapBagFi6","MaxCapBagB0",
- "MaxCapBagB1","MaxCapBagB2","MaxCapBagB3","MaxCapBagB4","MaxCapBagB5","MaxCapBagB6",
- "MaxCapBagTr0","MaxCapBagTr1","MaxCapBagTr2","MaxCapBagTr3","MaxCapBagTr4","MaxCapBagTr5",
- "MaxCapBagS0","MaxCapBagS1","MaxCapBagS2","MaxCapBagS3","MaxCapBagS4","MaxCapBagS5"],
- // 4) All Yugioh cards
- yugioh:["CardsA0","CardsA1","CardsA2","CardsA3","CardsA4","CardsA5","CardsA6","CardsA7","CardsA8",
- "CardsA9","CardsA10","CardsA11","CardsA12","CardsA13","CardsA14","CardsA15","CardsA16",
- "CardsB1","CardsB2","CardsB3","CardsB4","CardsB5","CardsB6","CardsB7","CardsB8",
- "CardsB9","CardsB10","CardsB11","CardsB12","CardsB13","CardsB14",
- "CardsC1","CardsC2","CardsC3","CardsC4","CardsC5","CardsC6","CardsC7","CardsC8",
- "CardsC9","CardsC10","CardsC11","CardsC12","CardsC13","CardsC14","CardsC15","CardsC16",
- "CardsD1","CardsD2","CardsD3","CardsD4","CardsD5","CardsD6","CardsD7","CardsD8","CardsD9","CardsD10",
- "CardsD11","CardsD12","CardsD13","CardsD16","CardsD17","CardsD18","CardsD19","CardsD20","CardsD21",
- "CardsE0","CardsE1","CardsE2","CardsE3","CardsE4","CardsE5","CardsE6","CardsE7","CardsE8",
- "CardsE9","CardsE10","CardsE11","CardsE12","CardsE13","CardsE14","CardsE15",
- "CardsF1","CardsF2","CardsF3","CardsF4","CardsF5","CardsF6","CardsF7","CardsF8","CardsF9","CardsF10","CardsF11",
- "CardsY0","CardsY1","CardsY2","CardsY3","CardsY4","CardsY5","CardsY5","CardsY6",
- "CardsY7","CardsY8","CardsY9","CardsY10","CardsY11","CardsY12","CardsY13",
- "CardsZ0","CardsZ1","CardsZ2","CardsZ3","CardsZ4","CardsZ5","CardsZ6","CardsZ7","CardsZ8","CardsZ9"],
- // 5) All statues
- statues:["EquipmentStatues1","EquipmentStatues2","EquipmentStatues3","EquipmentStatues4","EquipmentStatues5",
- "EquipmentStatues6","EquipmentStatues7","EquipmentStatues8","EquipmentStatues9","EquipmentStatues10",
- "EquipmentStatues11","EquipmentStatues12","EquipmentStatues13","EquipmentStatues14","EquipmentStatues15",
- "EquipmentStatues16","EquipmentStatues17","EquipmentStatues18","EquipmentStatues19"],
- // 6) All stamps (Many stamps aren't released yet)
- stamps:["StampA1","StampA2","StampA3","StampA4","StampA5","StampA6","StampA7","StampA8","StampA9","StampA10",
- "StampA11","StampA12","StampA13","StampA14","StampA15","StampA16","StampA17","StampA18","StampA19",
- "StampA20","StampA21"/*,"StampA22"*/,"StampA23","StampA24"/*,"StampA25"*/,"StampA26","StampA27","StampA28",
- //"StampA29","StampA30","StampA31","StampA32","StampA33","StampA34","StampA35",
- "StampB1","StampB2","StampB3","StampB4","StampB5","StampB6","StampB7","StampB8","StampB9","StampB10",
- "StampB11","StampB12","StampB13","StampB14","StampB15","StampB16","StampB17","StampB18","StampB19",
- "StampB20","StampB21","StampB22","StampB23","StampB24","StampB25","StampB26","StampB27",//"StampB28","StampB29",
- "StampB30","StampB31"/*,"StampB32","StampB33"*/,"StampB34"/*,"StampB35"*/,"StampB36",
- "StampC1","StampC2","StampC3"/*,"StampC4","StampC5"*/,"StampC6","StampC7"/*,"StampC8"*/,"StampC9",//"StampC10","StampC11","StampC12","StampC13",
- "StampC14","StampC15"/*,"StampC16","StampC17","StampC18"*/,"StampC19","StampC20"],
- // 7) All fishing tools
- fishtools:["Line1","Line2","Line3","Line4","Line5","Line6","Line7",
- "Line8","Line9","Line10","Line11","Line12","Line13","Line14",
- "Weight1","Weight2","Weight3","Weight4","Weight5","Weight6","Weight7",
- "Weight8","Weight9","Weight10","Weight11","Weight12","Weight13","Weight14"],
- // 8) All released Star Talent books
- startalents:[
- //"3615100", //Bored To Death (Lvl 100)
- "361650", //Beginner Best Class (Lvl 50)
- //"3617100", //Studious Quester (Lvl 100)
- "3618100", //Quest Chungus (Lvl 100)
- "3619100", //Crystals 4 Dayys (Lvl 100)
- "362050", //Will Of The Eldest (Lvl 50)
- "3621104", //TICK TOCK (Lvl 104)
- "3622100", //STONKS! (Lvl 100)
- "3623100", //Roll Da Dice (Lvl 100)
- "362450", //Attacks on simmer (Lvl 50)
- "3625120", //Toilet Paper Postage (Lvl 120)
- "362640", //Exp Converter (Lvl 40)
- "362750", //Goblet Of Hemoglobin (Lvl 50)
- "3628100", //JUST EXP (Lvl 100)
- "3629100", //Frothy Malk (Lvl 100)
- "363050", //Convert Better Darnit (Lvl 50)
- "3631100", //PULSATION (Lvl 100)
- "3632100", //CARDIOVASCULAR! (Lvl 100)
- //"3633100", //Nothing
- "363450", //Telekinetic Storage (Lvl 50)
- "3635100", //Printer Sampling (Lvl 100)
- "3639100", //Shrine Architect (Lvl 100)
- ],
- // 9) Blacksmith recipes and tabs
- smith:["EquipmentSmithingTabs3","SmithingHammerChisel","SmithingHammerChisel2"],
- // 10) All skilling resources
- skill:["Copper","Iron","Gold","Plat","Dementia","Void","Lustre","Starfire","Dreadlo","Godshard",
- "CopperBar","IronBar","GoldBar","PlatBar","DementiaBar","VoidBar","LustreBar","StarfireBar","DreadloBar","GodshardBar",
- "OakTree","BirchTree","JungleTree","ForestTree","ToiletTree","PalmTree","StumpTree","SaharanFoal","Tree7",
- "Leaf1","Leaf2","Leaf3",
- "Fish1","Fish2","Fish3","Fish4",
- "Bug1","Bug2","Bug3","Bug4","Bug5","Bug6","PureWater",
- "Critter1","Critter2","Critter3","Critter4","Critter5","Critter6","Critter7","Critter8","Critter9",
- "Critter1A","Critter2A","Critter3A","Critter4A","Critter5A","Critter6A","Critter7A","Critter8A","Critter9A",
- "Soul1","Soul2","Soul3","Soul4","Soul5",
- "Soul6","Refinery1","Refinery2","Refinery3","Refinery4","Refinery5","Refinery6",
- "CraftMat1","CraftMat2","CraftMat3"/*,"CraftMat4"*/,"CraftMat5","CraftMat6","CraftMat7","CraftMat8","CraftMat9","CraftMat10"],
- // 11) All monster resources
- monster:["Grasslands1","Grasslands2","Grasslands3","Grasslands4","Jungle1","Jungle2","Jungle3","Forest1","Forest2","Forest3",
- "Sewers1","Sewers1b","Sewers2","Sewers3","TreeInterior1","TreeInterior1b","TreeInterior2","BabaYagaETC",
- "DesertA1","DesertA1b","DesertA2","DesertA3","DesertA3b","DesertB1","DesertB2","DesertB3","DesertB4",
- "DesertC1","DesertC2","DesertC2b","DesertC3","DesertC4","SnowA1","SnowA2","SnowA2a","SnowA3","SnowA4",
- "SnowB1","SnowB2","SnowB2a","SnowB5","SnowB3","SnowB4","SnowC1","SnowC2","SnowC3","SnowC4","SnowC4a",
- "IceMountains2","Hgg","EfauntDrop1","EfauntDrop2"],
- // 12) Most (not all) currencies and gift items
- currency:["Key1","Key2","Key3","SilverPen","PremiumGem",//"DeliveryBox",
- "Quest30","Quest35","Quest36","Quest38","Quest40","Quest42","Quest44","Quest45","Quest49","Quest50"],
- // 13) Best food
- food:["PeanutG","FoodG1","FoodG2","FoodG3","FoodG4","FoodG5","FoodG6","Meatloaf","MidnightCookie",
- "FoodPotOr3","FoodPotRe3","FoodPotGr3","FoodPotMana3","FoodPotYe3"],
- // 14) All trophies
- trophy:["Trophy1","Trophy2","Trophy3"/*,"Trophy4"*/,
- "Trophy5","Trophy6","Trophy7","Trophy8","Trophy9","Trophy10",
- "Trophy11","Trophy12","Trophy13","Trophy14"],
- // 15) All upgrade stones (except lvl 1 and 2 cause 3 exists)
- upstone:["StoneWe","StoneWeb","StoneW3","StoneW6",
- "StoneA1b","StoneA2b","StoneA3b","StoneA3","StoneAe","StoneAeB",
- "StoneHelm1","StoneHelm6","StoneHelm1b",
- "StoneTe","StoneT1e","StoneT1eb","StoneT3",
- "StoneZ2",
- "StonePremSTR","StonePremAGI","StonePremWIS","StonePremLUK"],
- // 16) All premium hats
- phats:["EquipmentHats31","EquipmentHats32","EquipmentHats33","EquipmentHats34","EquipmentHats35",
- "EquipmentHats36","EquipmentHats40","EquipmentHats37","EquipmentHats38","EquipmentHats46",
- "EquipmentHats47","EquipmentHats48","EquipmentHats49","EquipmentHats50","EquipmentHats43",
- "EquipmentHats45","EquipmentHats57","EquipmentHats62"],
- // 17) High level Gear
- gear:["EquipmentHats60","EquipmentShirts28","EquipmentShirts29","EquipmentShirts30","EquipmentPants21",
- "EquipmentShoes22","EquipmentPendant14","EquipmentPendant17","EquipmentRings16","EquipmentRings16",
- "EquipmentRings6","EquipmentRings6","EquipmentTools11","EquipmentTools7","EquipmentToolsHatchet5",
- "EquipmentToolsHatchet7","CatchingNet7","CatchingNet6","FishingRod6","FishingRod7",
- "EquipmentSword3","EquipmentBows8","EquipmentWands7","EquipmentPunching5",
- "EquipmentHats58","EquipmentHats59","TrapBoxSet5","WorshipSkull5"],
- // 18) Cheat equipments (Some unreleased items which will definitely shadow ban you)
- cheat:["EquipmentWeapons2","TestObj16","EquipmentRings8","EquipmentPendant8","EquipmentShoes12","EquipmentPants13","EquipmentShirts8"]
- };
- /****************************************************************************************************
- This function is made to simplify some code, basically a bit of elementary programming.
- The arguments are as followed:
- bEng = Engine input: Not very elegant, but it works for until I have more JavaScript experience.
- dim = Amount of dimensions, can take values 2 to 4 (at 1D there's no reason for such complexity)
- KeyName = The respecitve key inside GameAttribute Customlist that we want to iterate
- repl = The replacement value
- elem = List of Array indices, which elements we want replaced
- */
- function ChangeND(bEng, dim, KeyName, repl, elem){
- let NDArr;
- if(typeof KeyName === "string") // Creates a deep-copy
- NDArr = JSON.parse(JSON.stringify(bEng.getGameAttribute("CustomLists").h[KeyName]));
- else NDArr = KeyName; // Else this KeyName parameter is an object
- if(dim === 4){
- for(const [index1, element1] of Object.entries(NDArr)){
- for(const [index2, element2] of Object.entries(element1)){
- for(const [index3, element3] of Object.entries(element2)){
- for(i in elem) element3[elem[i]] = repl instanceof Function ? repl(element3[elem[i]]) : repl; // Fill every
- NDArr[index1][index2][index3] = element3; // Write back to the 4D Array
- }
- }
- }
- } else if(dim === 3){
- for(const [index1, element1] of Object.entries(NDArr)){
- for(const [index2, element2] of Object.entries(element1)){
- for(i in elem) element2[elem[i]] = repl instanceof Function ? repl(element3[elem[i]]) : repl;
- NDArr[index1][index2] = element2; // Write back to the 3D Array
- }
- }
- } else if(dim === 2){
- for(const [index1, element1] of Object.entries(NDArr)){
- for(i in elem) element1[elem[i]] = repl instanceof Function ? repl(element3[elem[i]]) : repl;
- NDArr[index1] = element1; // Write back to the 2D Array
- }
- } else return NDArr; // Else return the original without modifications
- return NDArr;
- } // This function's even less likely to ever be revisited, so it's nice here
- /****************************************************************************************************
- The help function for gga/ggk
- */
- function gg_func(Params, which, bEngine){
- const foundVals = [];
- try{
- let gga = bEngine.gameAttributes.h;
- let eva_gga; let obj_gga;
- if(Params.length > 0){
- gga = bEngine.getGameAttribute(Params[0]);
- if("h" in gga) gga = bEngine.getGameAttribute(Params[0]).h; // Some attributes may not have a .h
- }
- switch(Params.length) {
- case 2:
- eva_gga = gga[Params[1]];
- break;
- case 3:
- eva_gga = gga[Params[1]][Params[2]];
- break;
- case 4:
- eva_gga = gga[Params[1]][Params[2]][Params[3]];
- break;
- case 5:
- eva_gga = gga[Params[1]][Params[2]][Params[3]][Params[4]];
- break;
- default: // For every other length goes this
- eva_gga = gga;
- break;
- }
- obj_gga = Object.entries(eva_gga);
- if(typeof obj_gga == "string" || obj_gga.length == 0){
- if(which == 0) foundVals.push(`${eva_gga}`);
- else foundVals.push(`Non iterable value: ${eva_gga}`);
- } else for(const [index,element] of obj_gga){
- if(which == 0) foundVals.push(`${index}, ${element}`); // This one's for gga
- else foundVals.push(`${index}`); // This one's for ggk
- }
- return foundVals.join("\n");
- } catch(error){
- if(error instanceof TypeError) return `This TypeError should appear if you gave a non-existing key.`;
- return `Error: ${err}`;
- }
- }
- /* Credit section:
- iBelg
- User profile: https://fearlessrevolution.com/memberlist.php?mode=viewprofile&u=45315
- Tool release: https://fearlessrevolution.com/viewtopic.php?p=199352#p199352
- > The creator of the console injection, designer of the cheats syntax as well as many cheats
- salmon85
- User profile: https://fearlessrevolution.com/memberlist.php?mode=viewprofile&u=80266
- > Wipe inv, wipe forge and class lvl command
- Creater0822
- User profile: https://fearlessrevolution.com/memberlist.php?mode=viewprofile&u=10529
- Google Drive: https://drive.google.com/drive/folders/1MyEkO0uNEpGx1VctMEKZ5sQiNzuSZv36?usp=sharing
- > For the remaining commands
- */
- /* Help & troubleshoot section:
- How to use:
- > Place iBelg's injecting tool and this script inside the game's root folder and execute the tool (not the game)
- > To close the game, you have to close the NodeJS console.
- The tool closes itself instantly after execution?!?!
- The error shows things like: UnhandledPromiseRejectionWarning: Error: No inspectable targets
- > You probably forgot to have the Steam client launched in the background.
- The game is has been loaded, but the console doesn't load.
- > There could be multiple sessions running.
- > If you rapidly re-start the injected game after closing it, the previous process may not be killed yet.
- */
- /* Depreciated unique cheats:
- // A non-proxy cheat that nullifies boost food consumption and health food cooldown.
- if (params && params[0] === 'food') {
- const itemDefs = this["scripts.ItemDefinitions"].itemDefs.h;
- for( const [index, element] of Object.entries(itemDefs))
- if(element.h["typeGen"] === "cFood") this["scripts.ItemDefinitions"].itemDefs.h[index].h["Cooldown"] = 0;
- return `Boost food is never consumed and consumption cooldown on health food is nullified.`;
- }
- */
Add Comment
Please, Sign In to add comment