'use strict' // ~~~ * Data * ~~~ \\ const NpcData = require('./data/npcData.json'), SkillData = require('./data/skillString.json'), { ImportantAbns, BlockedAbns, ReplaceAbnIds, AbnNoEffectInvisibleNpcSpamId } = require('./data/abnormalities.json'), { UserNpcs, TrapsIds, FireWorks, UserNpcsHzId, SmokeBombId, DivineWrathId, MoteIds } = require('./data/userSpawns.json'), ImportantProjectiles = { ...SmokeBombId, ...DivineWrathId }, { InvisibleNpcs, SpamAchIds, PClasses, PRoles, HexColors, Alphabet, StarterWeaponIds, InvalidVoiceId, MountToReplaceId, ImportantActionScripts } = require('./data/miscData.json'), { BnzC, SlvC, GldC, PnkC, HPkC, CPkC, RedC, GrnC, LPrC, PrpC, LBlC, BluC, DBlC, HBlC, GryC, YlwC } = HexColors; const LastHook = { order: 100010 }, LastHookfn = { order: 100010, filter: { fake: null, silenced: false, modified: null } }; module.exports = function FpsUtils(mod) { // ~~~ * Constants * ~~~ \\ const Cfg = mod.settings, Cmd = mod.command, NotCP = typeof mod.compileProto !== 'undefined'; // ~~~ * Variables * ~~~ \\ let MyName = '', MyGameId = -1n, AllowedAchUps = 0, LastVrange = 0, LastFState = null, LastGState = null, SwitchCd = false, ProjDebug = false, AbnDebug = false, TmpData = [], PMembers = new Set(), BProjectiles = new Set(), SUsers = {}, HUsers = {}, SNpcs = {}, HNpcs = {}, SPets = {}, HPets = {}, HSeedBoxes = new Set(); // ~~~ * Gui Parser * ~~~ \\ const Xmap = new WeakMap(); if (!Xmap.has(mod.dispatch || mod)) { Xmap.set(mod.dispatch || mod, {}); mod.hook('C_CONFIRM_UPDATE_NOTIFICATION', 'raw', LastHook, () => false); mod.hook('C_ADMIN', 1, LastHookfn, (event) => { const commands = event.command.split(";"); for (const cmd of commands) try { Cmd.exec(cmd); } catch (err) { continue; } return false; }); } const gui = { parse(Xarray, title, body = '') { for (const data of Xarray) { if (body.length >= 16E3) { body += 'Gui data limit exceeded, some values may be missing.'; break; } if (data.command) body += `${data.text}`; else if (!data.command) body += `${data.text}`; else continue; } mod.toClient('S_ANNOUNCE_UPDATE_NOTIFICATION', 1, { id: 0, title, body }); } }; // ~~~ * Gui Handler * ~~~ \\ function GuiHandler(page, arg) { switch (page) { case "searchnpc": case "npcsearch": NpcJsonSearch("search", arg); break; case "npc": NpcJsonSearch("starts", arg); break; case "npclist": TmpData.push( { text: `

MAIN MENU



`, command: "fps gui" }, { text: `

[Main NPC page]


`, command: "fps gui npcmain" }, { text: `Click a NPC ID to remove it from the blacklist:
` } ); for (const blNpc of Cfg.NpcsBlacklist) TmpData.push({ text: `${blNpc.zone}, ${blNpc.templateId}
`, command: `fps npc hide ${blNpc.zone} ${blNpc.templateId};fps gui npclist` }); gui.parse(TmpData, `[FPS] Options - NPCs (Blacklist)`); break; case "npcmain": TmpData.push( { text: `

MAIN MENU



`, command: "fps gui" }, { text: `

[Blacklisted NPCs list]


`, command: "fps gui npclist" }, { text: `Click a letter to view all NPCs starting with that letter:

` } ); for (const i of Alphabet.split('')) TmpData.push({ text: `${i}`, command: `fps gui npc ${i}` }, { text: "  " }); TmpData.push( { text: `

(Command "fps gui searchnpc <name>" to search for a specific NPCs names, Case sensitive)` }, { text: `

(Command "fps gui npc <letters>" to search for NPCs names that starts with that 'letters', Case sensitive)` }, { text: `

If you want to search for npc with space between it's name, you've to add the whole name inside quotations, e.g. fps gui npcsearch "Bay Kamara"\`` } ); gui.parse(TmpData, `[FPS] Options - NPCs (Main)`); break; case "show": TmpData.push( { text: `

MAIN MENU


`, command: "fps gui" }, { text: `

[Refresh]


`, command: "fps gui show" }, { text: `Red = Shown, Green = Hidden
` }, { text: `(Command "fps hide <name>" to hide someone that does not appear here)

` }, { text: `Click on Red to hide & add to blacklist.
Click on Green to show & remove from blacklist

` } ); for (const sUser in SUsers) TmpData.push({ text: `${SUsers[sUser].name}
`, command: Cfg.PlayersBlacklist.indexOf(SUsers[sUser].name.toLowerCase()) !== -1 ? `fps show ${SUsers[sUser].name};fps gui show` : `fps hide ${SUsers[sUser].name};fps gui show` }); gui.parse(TmpData, `[FPS] Options - Players (In-distance)`); break; case "hide": TmpData.push( { text: `

MAIN MENU



`, command: "fps gui" }, { text: `Click to show & remove from blacklist.
` } ); Cfg.PlayersBlacklist.forEach(el => TmpData.push({ text: `${el}
`, command: `fps show ${el};fps gui hide` })); gui.parse(TmpData, `[FPS] Options - Players (Hidden)`); break; case "skills": gui.parse([ { text: `

MAIN MENU


`, command: "fps gui" }, { text: `Tankers:` }, { text: " " }, { text: `(Lancer)`, command: "fps gui class lancer" }, { text: "  " }, { text: `(Brawler)

`, command: "fps gui class brawler" }, { text: `Healers:` }, { text: " " }, { text: `(Priest)`, command: "fps gui class priest" }, { text: "  " }, { text: `(Mystic)

`, command: "fps gui class mystic" }, { text: `Dpsers(melee):` }, { text: " " }, { text: `(Warrior)`, command: "fps gui class warrior" }, { text: "  " }, { text: `(Slayer)`, command: "fps gui class slayer" }, { text: "  " }, { text: `(Berserker)`, command: "fps gui class berserker" }, { text: "  " }, { text: `(Ninja)`, command: "fps gui class ninja" }, { text: "  " }, { text: `(Valkyrie)`, command: "fps gui class valkyrie" }, { text: "  " }, { text: `(Reaper)

`, command: "fps gui class reaper" }, { text: `Dpsers(ranged):` }, { text: " " }, { text: `(Sorcerer)`, command: "fps gui class sorcerer" }, { text: "  " }, { text: `(Archer)`, command: "fps gui class archer" }, { text: "  " }, { text: `(Gunner)`, command: "fps gui class gunner" } ], `[FPS] Options - Skills (Choose class)`); break; case "class": gui.parse(SkillJsonSearch(arg), `[FPS] Options - Skill list for '${arg}'`); break; case "role": gui.parse([ { text: `

MAIN MENU



`, command: "fps gui" }, { text: `By Roles:` }, { text: " " }, { text: `[Tankers]`, command: `fps ${Cfg.RolesBlacklist.includes('tank') ? "show" : "hide"} tank;fps gui role` }, { text: "  " }, { text: `[Healers]`, command: `fps ${Cfg.RolesBlacklist.includes('healer') ? "show" : "hide"} healer;fps gui role` }, { text: "  " }, { text: `[Dps-All]`, command: `fps ${Cfg.RolesBlacklist.includes('dps') ? "show" : "hide"} dps;fps gui role` }, { text: "  " }, { text: `[Dps-Ranged]



`, command: `fps ${Cfg.RolesBlacklist.includes('ranged') ? "show" : "hide"} ranged;fps gui role` }, { text: `By Classes

` }, { text: `Tankers:` }, { text: " " }, { text: `[Lancer]`, command: `fps ${Cfg.ClassesBlacklist.includes('lancer') ? "show" : "hide"} lancer;fps gui role` }, { text: "  " }, { text: `[Brawler]

`, command: `fps ${Cfg.ClassesBlacklist.includes('brawler') ? "show" : "hide"} brawler;fps gui role` }, { text: `Healers:` }, { text: " " }, { text: `[Priest]`, command: `fps ${Cfg.ClassesBlacklist.includes('priest') ? "show" : "hide"} priest;fps gui role` }, { text: "  " }, { text: `[Mystic]

`, command: `fps ${Cfg.ClassesBlacklist.includes('mystic') ? "show" : "hide"} mystic;fps gui role` }, { text: `Dpsers(melee):` }, { text: " " }, { text: `[Warrior]`, command: `fps ${Cfg.ClassesBlacklist.includes('warrior') ? "show" : "hide"} warrior;fps gui role` }, { text: "  " }, { text: `[Slayer]`, command: `fps ${Cfg.ClassesBlacklist.includes('slayer') ? "show" : "hide"} slayer;fps gui role` }, { text: "  " }, { text: `[Berserker]`, command: `fps ${Cfg.ClassesBlacklist.includes('berserker') ? "show" : "hide"} berserker;fps gui role` }, { text: "  " }, { text: `[Ninja]`, command: `fps ${Cfg.ClassesBlacklist.includes('ninja') ? "show" : "hide"} ninja;fps gui role` }, { text: "  " }, { text: `[Valkyrie]`, command: `fps ${Cfg.ClassesBlacklist.includes('valkyrie') ? "show" : "hide"} valkyrie;fps gui role` }, { text: "  " }, { text: `[Reaper]

`, command: `fps ${Cfg.ClassesBlacklist.includes('reaper') ? "show" : "hide"} reaper;fps gui role` }, { text: `Dpsers(ranged):` }, { text: " " }, { text: `[Sorcerer]`, command: `fps ${Cfg.ClassesBlacklist.includes('sorcerer') ? "show" : "hide"} sorcerer;fps gui role` }, { text: "  " }, { text: `[Archer]`, command: `fps ${Cfg.ClassesBlacklist.includes('archer') ? "show" : "hide"} archer;fps gui role` }, { text: "  " }, { text: `[Gunner]`, command: `fps ${Cfg.ClassesBlacklist.includes('gunner') ? "show" : "hide"} gunner;fps gui role` } ], `[FPS] Options - Roles/Classes`); break; case "abn": TmpData.push( { text: `

MAIN MENU


`, command: "fps gui" }, { text: `

Debug


`, command: "fps abn log;fps gui abn" }, { text: `Blacklist: Click to remove from the blacklist.
` } ); Cfg.AbnormalitiesBlacklist.forEach(el => TmpData.push({ text: `${el}
`, command: `fps abn blacklist remv ${el};fps gui abn` })); gui.parse(TmpData, `[FPS] Options - Abnormalities`); break; case "proj": TmpData.push( { text: `

MAIN MENU


`, command: "fps gui" }, { text: `

Debug


`, command: "fps proj log;fps gui proj" }, { text: `Blacklist: Click to remove from the blacklist.
` } ); Cfg.ProjectilesBlacklist.forEach(el => TmpData.push({ text: `${el}
`, command: `fps proj blacklist remv ${el};fps gui proj` })); gui.parse(TmpData, `[FPS] Options - Projectiles`); break; case "help": gui.parse([ { text: `

MAIN MENU


`, command: "fps gui" }, { text: `Command Arg(s) Example
` }, { text: `gui ^ g N/A !fps gui
` }, { text: ` N/A N/A !fps-util
` }, { text: `0 ^ 1 ^ 2 ^ 3 N/A !0 ^ !1 ^ !2 ^ !3
` }, { text: `mode 0 ^ 1 ^ 2 ^ 3 !fps mode 2
` }, { text: `hide^show Player^Class^Role !fps hide mie
` }, { text: `party N/A !fps party
` }, { text: `raid N/A !fps raid
` }, { text: `list N/A !fps list
` }, { text: `sums other ^ me !fps sums me
` }, { text: `skill blacklist !fps skill blacklist
` }, { text: `npc N/A ^ hide !fps npc
` }, { text: `hit me^other^damage !fps hit me
` }, { text: `firework N/A !fps firework
` }, { text: `abn all ^ blacklist !fps abn blacklist
` }, { text: `proj all ^ blacklist !fps proj all
` }, { text: `guildlogo N/A !fps guildlogo
` }, { text: `style N/A !fps style
` }, { text: `gui npcsearch "target" !fps gui npcsearch E
` }, { text: `npczoom N/A !fps npczoom
` }, { text: `dropitem N/A ^ hide !fps dropitem
` }, { text: `monsterdeathani N/A !fps monsterdeathani
` }, { text: `screenabns N/A ^ hide !fps screenabns
` }, { text: `hpnumbers N/A !fps hpnumbers
` }, { text: `mpnumbers N/A !fps mpnumbers
` }, { text: `pet N/A !fps raid
` }, { text: `guardian N/A !fps guardian
` }, { text: `muteothers N/A !fps muteothers
` }, { text: `stream N/A !fps stream

` }, ], `[FPS] HELP`); break; default: gui.parse([ { text: `

REFRESH


`, command: "fps gui" }, { text: `Modes:` }, { text: " " }, { text: `[Mode 0]`, command: "fps mode 0;fps gui" }, { text: "    " }, { text: `[Mode 1]`, command: "fps mode 1;fps gui" }, { text: "    " }, { text: `[Mode 2]`, command: "fps mode 2;fps gui" }, { text: "    " }, { text: `[Mode 3]

`, command: "fps mode 3;fps gui" }, { text: `Hit:` }, { text: " " }, { text: `[Players]`, command: "fps hit other;fps gui" }, { text: "  " }, { text: `[Own]`, command: "fps hit me;fps gui" }, { text: "  " }, { text: `[Dmg/heal numbers]`, command: "fps hit damage;fps gui" }, { text: "  " }, { text: `[ALL]

`, command: "fps hit all;fps gui" }, { text: `Hide:` }, { text: " " }, { text: `[Classes/Roles]`, command: "fps gui role" }, { text: "   " }, { text: `[Style]`, command: "fps style;fps gui" }, { text: "  " }, { text: `[Guild Logos]`, command: "fps guildlogo;fps gui" }, { text: "  " }, { text: `[Firework]`, command: "fps fireworks;fps gui" }, { text: "  " }, { text: `[Pets Popup]

`, command: "fps petspopup;fps gui" }, { text: `Self(own):` }, { text: " " }, { text: `[HP Nums]`, command: "fps hpnumbers;fps gui" }, { text: "   " }, { text: `[MP Nums]`, command: "fps mpnumbers;fps gui" }, { text: "   " }, { text: `[Own summons]`, command: "fps summons me;fps gui" }, { text: "   " }, { text: `[Pets]`, command: "fps pet me;fps gui" }, { text: "   " }, { text: `[Blur/dizzy]
`, command: "fps screenabns;fps gui" }, { text: `Players:` }, { text: " " }, { text: `[Spawned list]`, command: "fps gui show" }, { text: "    " }, { text: `[Hidden list]`, command: "fps gui hide" }, { text: "    " }, { text: `[Players summons]`, command: "fps summons;fps gui" }, { text: "   " }, { text: `[Pets]
`, command: "fps pet;fps gui" }, { text: `NPCs:` }, { text: " " }, { text: `[Menu]`, command: "fps gui npcmain" }, { text: "  " }, { text: `[Hide Death Ani]`, command: "fps monsterdeathani;fps gui" }, { text: "  " }, { text: `[Zoom-ins]`, command: "fps npczoom;fps gui" }, { text: "  " }, { text: `[Hide Blacklisted]

`, command: "fps npc;fps gui" }, { text: `Skills:` }, { text: " " }, { text: `[Hide individually]`, command: "fps gui skills" }, { text: "   " }, { text: `[Hide Blacklisted]
`, command: "fps skill blacklist;fps gui" }, { text: `Abnormal:` }, { text: " " }, { text: `[Hide ALL]`, command: "fps abn all;fps gui" }, { text: "   " }, { text: `[Hide Blacklisted]`, command: "fps abn blacklist;fps gui" }, { text: "   " }, { text: `[Black List]
`, command: "fps gui abn" }, { text: `Projectile:` }, { text: " " }, { text: `[Hide ALL]`, command: "fps proj all;fps gui" }, { text: "   " }, { text: `[Hide Blacklisted]`, command: "fps proj blacklist;fps gui" }, { text: "   " }, { text: `[Black List]

`, command: "fps gui proj" }, { text: `Misc.` }, { text: " " }, { text: `[Raid auto state]`, command: "fps raid;fps gui" }, { text: "  " }, { text: `[Only Party]`, command: "fps party;fps gui" }, { text: "  " }, { text: `[Drops BList]`, command: "fps dropitem;fps gui" }, { text: "  " }, { text: `[Show Traps]
`, command: "fps pvptraps;fps gui" }, { text: " " }, { text: `[Guardian auto state]`, command: "fps guardian;fps gui" }, { text: "  " }, { text: `[Mute others voice]`, command: "fps muteothers;fps gui" }, { text: "  " }, { text: `[Stream]

`, command: "fps stream;fps gui" }, { text: `Quick Links:
` }, { text: `UI:` }, { text: " " }, { text: `[Mail]`, command: "fps quicklink parcel" }, { text: "   " }, { text: `[Broker]`, command: "fps quicklink broker" }, { text: "    " }, { text: `[Talent]`, command: "fps quicklink talents" }, { text: "    " }, { text: `[Dress]`, command: "fps quicklink dressingroom" }, { text: "   " }, { text: `[Hat Style]
`, command: "fps quicklink hatrestyle" }, { text: `Party:` }, { text: " " }, { text: `[Reset]`, command: "fps quicklink reset" }, { text: "    " }, { text: `[Leave]`, command: "fps quicklink drop" }, { text: "    " }, { text: `[Disband]
`, command: "fps quicklink disband" }, { text: `System:` }, { text: " " }, { text: `[Character Selection]`, command: "fps quicklink lobby" }, { text: " " }, { text: `[! Instant Exit !]
`, command: "fps quicklink instantexit" } ], `[FPS] Options | Red = disabled, Green = enabled`); break; } TmpData = []; } // ~~~ * Gui Functions * ~~~ \\ function SkillJsonSearch(value) { let keys = [], skilldata = [], skillIds = []; skilldata.push( { text: `

MAIN MENU


`, command: "fps gui" }, { text: `

[Blacklisted skills are ${Cfg.HideBlacklistedSkills ? 'Hidden' : 'Shown'}]


`, command: `fps skill blacklist;fps gui class ${value}` }, { text: `Click skill to blacklist it.
` } ); for (const key in SkillData[value]) keys.push(key); skillIds.push(Object.values(SkillData[value])); for (let i = 0; i < keys.length; i++) skilldata.push({ command: `fps skill class ${value} ${skillIds[0][i]};fps gui class ${value}`, text: `[${keys[i]}]
` }); return skilldata; } function NpcJsonSearch(type, arg) { TmpData.push({ text: `

MAIN MENU



`, command: "fps gui" }); for (const data of NpcData) if (type === 'starts' && data.Nm.startsWith(arg) || type === 'search' && data.Nm.includes(arg)) TmpData.push({ command: `fps npc hide ${data.Hz} ${data.Ti};fps gui ${type === 'starts' ? 'npc' : 'npcsearch'} ${arg}`, text: `${data.Nm}
` }); gui.parse(TmpData, `[FPS] Options - NPCs | Search results for '${arg}'.`); TmpData = []; } function ClassNameFromID(name) { for (const cData of Object.keys(Cfg.ClassesData)) if (Cfg.ClassesData[cData].name === name) return cData; } // ~~~ * Command Functions * ~~~ \\ function Msg(msg) { if (Cfg.StreamMode) return; Cmd.message(`${NotCP ? '[FPS] ' : ''}${msg}`); } function RemoveEntity(arr, elem) { if (elem.length) for (const [index, value] of arr.entries()) if (value.toLowerCase() === elem.toLowerCase()) arr.splice(index, 1); return arr; } function ScaleUpEntity(gameId, scale) { mod.toClient('S_ABNORMALITY_SCALE_UP', 2, { gameId, scale, duration: 0 }); } function HideSpecificPlayerByName(name) { for (const sUser in SUsers) { if (SUsers[sUser].name.toString().toLowerCase() === name.toLowerCase()) { mod.toClient('S_DESPAWN_USER', 3, { gameId: SUsers[sUser].gameId, type: 1 }); HUsers[SUsers[sUser].gameId] = SUsers[sUser]; break; } } } function HideSpecificNpcByHzTi(hz, ti) { for (const sNpc in SNpcs) { if (SNpcs[sNpc].huntingZoneId === hz && SNpcs[sNpc].templateId === ti) { mod.toClient('S_DESPAWN_NPC', 3, { gameId: SNpcs[sNpc].gameId, loc: SNpcs[sNpc].loc, type: 1, unk: 0 }); HNpcs[SNpcs[sNpc].gameId] = SNpcs[sNpc]; HNpcs[SNpcs[sNpc].gameId].spawnType = 1; HNpcs[SNpcs[sNpc].gameId].spawnScript = 0; break; } } } function HideSpecificNpcByGid(gameId) { mod.toClient('S_DESPAWN_NPC', 3, { gameId, loc: SNpcs[gameId].loc, type: 1, unk: 0 }); HNpcs[gameId] = SNpcs[gameId]; HNpcs[gameId].spawnType = 1; HNpcs[gameId].spawnScript = 0; } function HideNpcs(type, whose) { switch (type) { case 'own': case 'others': for (const sNpc in SNpcs) if ((type === 'own' && EqGid(SNpcs[sNpc].owner) || type === 'others' && !EqGid(SNpcs[sNpc].owner)) && UserNpcs.includes(SNpcs[sNpc].templateId) && SNpcs[sNpc].huntingZoneId === UserNpcsHzId) HideSpecificNpcByGid(SNpcs[sNpc].gameId); break; case 'bl': for (const sNpc in SNpcs) for (const blNpc of Cfg.NpcsBlacklist) if (SNpcs[sNpc].huntingZoneId === Number(blNpc.zone) && SNpcs[sNpc].templateId === Number(blNpc.templateId)) HideSpecificNpcByGid(SNpcs[sNpc].gameId); break; case 'pet': for (const sPet in SPets) { if (EqGid(SPets[sPet].ownerId) && whose === 'own') { UpdateNpcLoc(SPets[sPet], -1E2); ScaleUpEntity(SPets[sPet].gameId, 1E-3); } if (!EqGid(SPets[sPet].ownerId) && whose === 'others') mod.toClient('S_REQUEST_DESPAWN_SERVANT', 1, { gameId: SPets[sPet].gameId, despawnType: 1 }); HPets[SPets[sPet].gameId] = SPets[sPet]; } break; default: break; } } function HideAllPlayers() { if (Cfg.OnlyParty) return undefined; for (const sUser in SUsers) { mod.toClient('S_DESPAWN_USER', 3, { gameId: SUsers[sUser].gameId, type: 1 }); HUsers[SUsers[sUser].gameId] = SUsers[sUser]; HUsers[SUsers[sUser].gameId].spawnFx = 1; } } function ShowSpecificPlayerByName(name) { for (const hUser in HUsers) { if (HUsers[hUser].name.toString().toLowerCase() === name.toLowerCase()) { ModifyUserAppearance(HUsers[hUser]); mod.toClient('S_SPAWN_USER', 17, HUsers[hUser]); delete HUsers[hUser]; break; } } } function ShowSpecificNpcByHzTi(hz, ti) { for (const hNpc in HNpcs) { if (HNpcs[hNpc].huntingZoneId === hz && HNpcs[hNpc].templateId === ti) { mod.toClient('S_SPAWN_NPC', 12, HNpcs[hNpc]); delete HNpcs[hNpc]; break; } } } function ShowSpecificNpcByGid(gameId) { mod.toClient('S_SPAWN_NPC', 12, HNpcs[gameId]); delete HNpcs[gameId]; } function ShowNpcs(type, whose) { switch (type) { case 'own': case 'others': for (const hNpc in HNpcs) if (type === 'own' && EqGid(HNpcs[hNpc].owner || type === 'others' && !EqGid(HNpcs[hNpc].owner)) && UserNpcs.includes(HNpcs[hNpc].templateId) && HNpcs[hNpc].huntingZoneId === UserNpcsHzId) ShowSpecificNpcByGid(HNpcs[hNpc].gameId); break; case 'bl': for (const hNpc in HNpcs) for (const blNpc of Cfg.NpcsBlacklist) if (HNpcs[hNpc].huntingZoneId === Number(blNpc.zone) && HNpcs[hNpc].templateId === Number(blNpc.templateId)) ShowSpecificNpcByGid(HNpcs[hNpc].gameId); break; case 'pet': for (const hPet in HPets) { if (EqGid(HPets[hPet].ownerId) && whose === 'own') { UpdateNpcLoc(HPets[hPet]); ScaleUpEntity(HPets[hPet].gameId, 1); } else if (!EqGid(HPets[hPet].ownerId) && whose === 'others') mod.toClient('S_REQUEST_SPAWN_SERVANT', 4, HPets[hPet]); delete HPets[hPet]; } break; default: break; } } function ShowAllPlayers() { for (const hUser in HUsers) { ModifyUserAppearance(HUsers[hUser]); mod.toClient('S_SPAWN_USER', 17, HUsers[hUser]); delete HUsers[hUser]; } } // ~~~ * Core Functions * ~~~ \\ function ModifyUserAppearance(event) { let modified = undefined; if (Cfg.ShowStyle) { event.weapon = StarterWeaponIds[event.templateId % 1E2 - 1]; event.body = event.hand = event.feet = event.underwear = event.head = event.face = 0; if (event.mount) event.mount = MountToReplaceId; event.title = 0; event.weaponDye = event.bodyDye = event.handDye = event.feetDye = event.weaponEnchant = 0; event.showFace = false; event.styleHead = event.styleFace = event.styleBack = event.styleWeapon = event.styleBody = 0; event.underwearDye = event.styleBackDye = event.styleHeadDye = event.styleFaceDye = 0; event.showStyle = false; event.styleFootprint = event.styleHeadScale = event.styleFaceScale = event.styleBackScale = 0; event.usedStyleHeadTransform = false; event.styleBodyDye = 0; event.icons = []; modified = true; } if (Cfg.Hideguildlogos) { event.guildLogo = ''; event.guildLogoId = 0; modified = true; } if (Cfg.MuteOthersVoice) { event.appearance.voice = InvalidVoiceId; modified = true; } return modified; } function ModifyAbnormalities(event, end) { if (ImportantAbns.indexOf(event.id) !== -1) return undefined; if (ReplaceAbnIds[event.id]) { event.id = ReplaceAbnIds[event.id]; return true; } if (!end) { if (typeof event.target === 'undefined') event.target = event.gameId if (EqGid(event.target)) { if (Cfg.HideOwnBlacklistedAbns && Cfg.OwnAbnormalsBlacklist.indexOf(event.id) !== -1) return false; return undefined; } if (HUsers[event.target] || HNpcs[event.target] || event.id === AbnNoEffectInvisibleNpcSpamId) return false; if (Cfg.HideBlacklistedAbnormalities && (Cfg.AbnormalitiesBlacklist.indexOf(event.id) !== -1 || BlockedAbns.indexOf(event.id) !== -1)) return false; if (Cfg.HideAllAbnormalities && (SUsers[event.target] || Cfg.AbnormalitiesBlacklist.indexOf(event.id) !== -1 || BlockedAbns.indexOf(event.id) !== -1)) return false; } } function ActionHCheck(event, end) { let hidden = false; if (EqGid(event.gameId) || !SUsers[event.gameId]) return undefined; if (Cfg.Mode >= 2 || HUsers[event.gameId] || Cfg.ClassesData[ClassID(event.templateId)].CD_HideBlacklistedSkills) hidden = true; if (Cfg.HideBlacklistedSkills && Cfg.ClassesData[ClassID(event.templateId)].CD_SkillsBlacklist.includes(Math.floor(event.skill.id / 1E4).toString())) hidden = true; if (hidden) UpdateUserLoc(event); if (HNpcs[event.gameId]) { HNpcs[event.gameId].loc = event.loc; hidden = true; } if (BProjectiles.has(event.id) && (Cfg.Mode >= 2 || Cfg.HideAllProjectiles)) hidden = true; return !end && hidden ? false : undefined; } function ProjectileBCheck(event) { if (typeof event.id === 'undefined') event.id = event.actionId if (typeof event.skill !== 'undefined') { if (ImportantProjectiles[ClassID(event.templateId)] && ImportantProjectiles[ClassID(event.templateId)] === Math.floor(event.skill.id / 1E4) || (Cfg.PvpTraps && TrapsIds.includes(event.skill.id))) return undefined; if ((Cfg.HideBlacklistedProjectiles || Cfg.HideAllProjectiles) && Cfg.ProjectilesBlacklist.includes(event.skill.id)) BProjectiles.add(event.id); } if (typeof event.gameId !== 'undefined') if (!EqGid(event.gameId) && SUsers[event.gameId] && (HUsers[event.gameId] || Cfg.Mode >= 2 || Cfg.HideAllProjectiles)) BProjectiles.add(event.id); return BProjectiles.has(event.id) ? false : undefined; } function ModifySkillResult(event) { let returnValue = undefined; if (Cfg.Hit_Me && (EqGid(event.source) || EqGid(event.owner))) { event.templateId = 0; event.skill.id = 0; event.time = event.type = event.noctEffect = 0; event.crit = event.stackExplode = event.superArmor = false; event.superArmorId = event.hitCylinderId = 0; returnValue = true; } if (Cfg.Hit_Other && !EqGid(event.target) && !EqGid(event.source) && !EqGid(event.owner) && (SUsers[event.owner] || SUsers[event.source])) { event.templateId = 0; event.skill.id = 0; event.time = event.type = event.noctEffect = 0; event.crit = event.stackExplode = event.superArmor = false; event.superArmorId = event.hitCylinderId = 0; returnValue = true; } if (Cfg.Hit_Damage && (EqGid(event.source) || EqGid(event.owner) || EqGid(event.target) || UserNpcs.includes(event.templateId) && event.skill.huntingZoneId === UserNpcsHzId)) { event.value = 0n; returnValue = true; } if (Cfg.Hit_All) { event.templateId = 0; event.skill.id = 0; event.time = event.type = event.noctEffect = 0; event.value = 0n; event.crit = event.stackExplode = event.superArmor = false; event.superArmorId = event.hitCylinderId = 0; returnValue = true; } if (BProjectiles.has(event.id) && (Cfg.Mode >= 2 || Cfg.HideAllProjectiles)) returnValue = false; return returnValue; } const UserBCheck = user => { for (const plBlist of Cfg.PlayersBlacklist) if (plBlist.toLowerCase() === user.toLowerCase()) return true; }; function NpcBCheck(event) { let blocked = false; if (Cfg.HideBlacklistedNpcs) { for (const blNpc of Cfg.NpcsBlacklist) { if (event.huntingZoneId === Number(blNpc.zone) && event.templateId === Number(blNpc.templateId)) { HNpcs[event.gameId] = event; HNpcs[event.gameId].spawnType = 1; HNpcs[event.gameId].spawnScript = 0; blocked = true; break; } } } if (InvisibleNpcs[event.huntingZoneId] && InvisibleNpcs[event.huntingZoneId].includes(event.templateId)) { HNpcs[event.gameId] = event; blocked = true; } if (Cfg.HideFireworks && event.huntingZoneId === UserNpcsHzId && FireWorks.includes(event.templateId)) { HNpcs[event.gameId] = event; blocked = true; } if (UserNpcs.includes(event.templateId) && event.huntingZoneId === UserNpcsHzId) { if (EqGid(event.owner) && Cfg.HideMySummons) { HNpcs[event.gameId] = event; HNpcs[event.gameId].spawnType = 1; HNpcs[event.gameId].spawnScript = 0; blocked = true; } else if (!EqGid(event.owner) && Cfg.HideOthersSummons) { HNpcs[event.gameId] = event; HNpcs[event.gameId].spawnType = 1; HNpcs[event.gameId].spawnScript = 0; blocked = true; } } return blocked ? false : undefined; } function updatePartySpawns(raid) { if (!Cfg.OnlyParty || !Cfg.RaidAutoChange) return if (Cfg.OnlyParty) for (const sUser in SUsers) { if (!PMembers.has(SUsers[sUser].name)) HideSpecificPlayerByName(SUsers[sUser].name); else if (HUsers[SUsers[sUser].gameId]) ShowSpecificPlayerByName(SUsers[sUser].name); } if (Cfg.RaidAutoChange && typeof raid !== 'undefined') { if (raid) { if (Cfg.Mode >= 2 || (LastFState === null && Cfg.Mode === 2)) return; LastFState = Cfg.Mode; Cmd.exec("fps state 2"); } else { if (LastFState === null || Cfg.Mode !== 2) { LastFState = null; return; } Cmd.exec(`fps state ${LastFState}`); LastFState = null; } } } function EqGid(xG) { return (xG === MyGameId); } function ClassID(m) { return (m % 1E2); } function log(name, type, from, target, id) { console.log(`[\x1b[37m${new Date().toJSON().slice(11)}\x1b[39m] \x1b[91m->\x1b[39m \x1b[36m${name}\x1b[39m \x1b[35m${type}\x1b[39m \x1b[97m${from}\x1b[39m \x1b[32m'${target}'\x1b[39m: \x1b[94m\ID\x1b[39m "\x1b[31m${id}\x1b[39m\x1b[49m\x1b[0m"`); } function UpdateUserLoc(event) { mod.toClient('S_USER_LOCATION', 6, { gameId: event.gameId, loc: event.loc, w: event.w, speed: 3E2, dest: event.loc, type: 7 }); } function UpdateNpcLoc(event, zMod = 0) { mod.toClient('S_NPC_LOCATION', 3, { gameId: event.gameId, loc: { x: event.loc.x, y: event.loc.y, z: event.loc.z + zMod }, w: event.w, speed: 3E2, dest: { x: event.loc.x, y: event.loc.y, z: event.loc.z + zMod }, type: 7 }); } // ~~~ * Hook Functions * ~~~ \\ function sLogin(event) { LastFState = event.name === MyName ? LastFState : null; LastGState = null; MyGameId = event.gameId; MyName = event.name; ProjDebug = false; AbnDebug = false; PMembers.clear(); BProjectiles.clear(); HSeedBoxes.clear(); if (Cfg.StreamMode) console.log("\x1b[94mINFO\x1b[34m [FPS-UTILS]\x1b[39m - Steam Mode is enabled, No messages will be sent in-game messages until its disabled."); } function sLoadTopo() { SUsers = {}; SNpcs = {}; HUsers = {}; HNpcs = {}; AllowedAchUps = 2; if (ProjDebug) { ProjDebug = false; Msg(`Auto Disabled projectile debug, to reduce the unneeded spam.`); } if (AbnDebug) { AbnDebug = false; Msg(`Auto Disabled abnormalities debug, to reduce the unneeded spam.`); } } function sMountVehicle(event) { if (EqGid(event.gameId)) return; SUsers[event.gameId].mount = event.id; if (HUsers[event.gameId]) HUsers[event.gameId].mount = event.id; if (Cfg.ShowStyle) { event.id = MountToReplaceId; return true; } } function sUnmountVehicle(event) { if (EqGid(event.gameId)) return; SUsers[event.gameId].mount = 0; if (HUsers[event.gameId]) HUsers[event.gameId].mount = 0; } function cSetVisibleRange(event) { LastVrange = event.range; } function sStartCooltimeItem(event) { if (event.cooldown === 0) return false; } function sStartActionScript(event) { if (ImportantActionScripts.includes(event.script)) return; if (Cfg.ActionScripts) return false; } function sLoadingScreenControlInfo() { if (Cfg.Mode >= 2) return false; } function sUpdateAchievementProgress(event) { if (AllowedAchUps) { AllowedAchUps--; return; } for (const Achieve of event.achievements) if (SpamAchIds.indexOf(Achieve.id) !== -1 || !Achieve.requirements.length) return false; } function sItemCustomString(event) { if (event.customStrings.length === 0) return false; } function sSocial(event) { if (EqGid(event.target)) return; if (HUsers[event.target] || HNpcs[event.target]) return false; } function sGuildName(event) { if (Cfg.Hideguildlogos) { event.guildLogo = ''; return true; } } function sApplyTitle(event) { if (EqGid(event.gameId)) return; if (Cfg.ShowStyle) return false; } function sImageData() { if (Cfg.Hideguildlogos) return false; } function sSpawnUser(event) { SUsers[event.gameId] = event; SUsers[event.gameId].spawnFx = 1; if (Cfg.Mode === 3 || UserBCheck(event.name) || Cfg.ClassesData[ClassID(event.templateId)].isHidden || (Cfg.OnlyParty && !PMembers.has(event.name))) { HUsers[event.gameId] = event; HUsers[event.gameId].spawnFx = 1; return false; } return ModifyUserAppearance(event); } function sSpawnUserfn(event) { return ModifyUserAppearance(event); } function sDespawnUser(event) { delete HUsers[event.gameId]; delete SUsers[event.gameId]; } function sUserLocation(event) { if (SUsers[event.gameId]) { SUsers[event.gameId].loc = event.dest; SUsers[event.gameId].w = event.w; } if (HUsers[event.gameId]) { HUsers[event.gameId].loc = event.dest; HUsers[event.gameId].w = event.w; return false; } } function sUserStatus(event) { if (SUsers[event.gameId]) SUsers[event.gameId].status = event.status; if (HUsers[event.gameId]) { HUsers[event.gameId].status = event.status; return false; } } function sDeadLocation(event) { if (SUsers[event.gameId]) SUsers[event.gameId].loc = event.loc; if (HUsers[event.gameId]) HUsers[event.gameId].loc = event.loc; } function sUserMovetype(event) { if (SUsers[event.gameId]) SUsers[event.gameId].w = event.w; if (HUsers[event.gameId]) { HUsers[event.gameId].w = event.w; return false; } } function sUserAppearanceChange(event) { if (EqGid(event.id)) return; if (Cfg.ShowStyle) return false; } function sUserChangeFaceCustom(event) { if (EqGid(event.gameId)) return; if (Cfg.MuteOthersVoice) { event.appearance.voice = InvalidVoiceId; return true; } } function sUserExternalChange(event) { if (EqGid(event.gameId)) return; if (Cfg.ShowStyle) return false; } function sUnicastTransformData(event) { if (EqGid(event.gameId) || !event.gameId) return; if (Cfg.ShowStyle) return false; let modified = undefined; if (Cfg.Hideguildlogos) { event.guildLogo = ''; modified = true; } if (Cfg.MuteOthersVoice) { event.appearance.voice = InvalidVoiceId; modified = true; } return modified; } function sPartyMemberList(event) { event.members.map(value => { PMembers.add(value.name) }); updatePartySpawns(event.raid); } function sLeavePartyMember(event) { PMembers.delete(event.name); updatePartySpawns(); } function sLeaveParty() { PMembers.clear(); updatePartySpawns(false); } function sSpawnNpc(event) { SNpcs[event.gameId] = event; SNpcs[event.gameId].spawnType = 1; SNpcs[event.gameId].spawnScript = 0; return NpcBCheck(event); } function sDespawnNpc(event) { delete HNpcs[event.gameId]; delete SNpcs[event.gameId]; if (!Cfg.HideMonsterDeathAnimation || event.type !== 5) return; event.type = 1; return true; } function sNpcLocation(event) { if (SNpcs[event.gameId]) { SNpcs[event.gameId].loc = event.dest; SNpcs[event.gameId].w = event.w; } if (SPets[event.gameId]) { SPets[event.gameId].loc = event.dest; SPets[event.gameId].w = event.w; } if (HPets[event.gameId]) { HPets[event.gameId].loc = event.dest; HPets[event.gameId].w = event.w; return false; } if (HNpcs[event.gameId]) { HNpcs[event.gameId].loc = event.dest; HNpcs[event.gameId].w = event.w; return false; } } function sCreatureLife(event) { if (SNpcs[event.gameId]) { SNpcs[event.gameId].loc = event.loc; SNpcs[event.gameId].alive = event.alive; } if (HNpcs[event.gameId]) { SNpcs[event.gameId].loc = event.loc; HNpcs[event.gameId].alive = event.alive; } } function sCreatureRotate(event) { if (SNpcs[event.gameId]) SNpcs[event.gameId].w = event.w; if (HNpcs[event.gameId]) { HNpcs[event.gameId].w = event.w; return false; } } function sFearMoveStage(event) { if ((!EqGid(event.gameId) && Cfg.Mode === 3) || HUsers[event.gameId] || HNpcs[event.gameId]) return false; } function sFearMoveEnd(event) { if ((!EqGid(event.gameId) && Cfg.Mode === 3) || HUsers[event.gameId] || HNpcs[event.gameId]) return false; } function sRequestSpawnServant(event) { SPets[event.gameId] = event; if (EqGid(event.ownerId) && Cfg.HideMyServants) { HPets[event.gameId] = event; process.nextTick(() => { UpdateNpcLoc(event, -1E2); ScaleUpEntity(event.gameId, 1E-3); }); } else if (!EqGid(event.ownerId) && Cfg.HideOthersServants) { HPets[event.gameId] = event; return false; } } function sRequestDespawnServant(event) { delete HPets[event.gameId]; delete SPets[event.gameId]; } function sQuestBalloon(event) { if (!SPets[event.source]) return; if (Cfg.HideServantBalloons) return false; } function sAbnormalityBegin(event) { if (AbnDebug) { if (EqGid(event.target)) log('Abnormality', 'Applied', 'on', MyName, event.id); if (EqGid(event.source)) log('Abnormality', 'Started', 'from', MyName, event.id); if (SUsers[event.target]) log('Abnormality', 'Applied', 'on', SUsers[event.target].name, event.id); if (SUsers[event.source]) log('Abnormality', 'Started', 'from', SUsers[event.source].name, event.id); } return ModifyAbnormalities(event); } function sAbnormalityRefresh(event) { return ModifyAbnormalities(event); } function sAbnormalityResist(event) { return ModifyAbnormalities(event); } function sAbnormalityDamageAbsorb(event) { return ModifyAbnormalities(event); } function sAbnormalityFail(event) { return ModifyAbnormalities(event); } function sAbnormalityEnd(event) { return ModifyAbnormalities(event, true); } function sActionStage(event) { return ActionHCheck(event); } function sActionEnd(event) { return ActionHCheck(event, true); } function sInstanceArrow(event) { if (event.skill.npc) return; if (ProjDebug) { if (EqGid(event.gameId)) log('Projectile-Arrow', 'Spawned', 'from', MyName, event.skill.id); if (SUsers[event.gameId]) log('Projectile-Arrow', 'Spawned', 'from', SUsers[event.gameId].name, event.skill.id); } return ProjectileBCheck(event); } function sSpawnProjectile(event) { if (event.skill.npc) return; if (ProjDebug) { if (EqGid(event.gameId)) log('Projectile', 'Spawned', 'from', MyName, event.skill.id); if (SUsers[event.gameId]) log('Projectile', 'Spawned', 'from', SUsers[event.gameId].name, event.skill.id); } return ProjectileBCheck(event); } function sStartUserProjectile(event) { if (ProjDebug) { if (EqGid(event.gameId)) log('Projectile', 'Started', 'from', MyName, event.skill.id); if (SUsers[event.gameId]) log('Projectile', 'Started', 'from', SUsers[event.gameId].name, event.skill.id); } return ProjectileBCheck(event); } /*function sChangeDestposProjectile(event) { return ProjectileBCheck(event); }*/ function sEndUserProjectile(event) { BProjectiles.delete(event.id); } function sDespawnProjectile(event) { BProjectiles.delete(event.id); } function sPlayerChangeMp(event) { if (!Cfg.HideMpNumbers || !EqGid(event.target)) return; if (event.type !== 0) { event.type = 0; return true; } } function sCreatureChangeHp(event) { if (!Cfg.HideHpNumbers || !EqGid(event.target)) return; if (event.type !== 10) { event.type = 10; return true; } } function sEachSkillResult(event) { return ModifySkillResult(event); } function sItemExplosionResult(event) { if (Cfg.Mode >= 2 || (EqGid(event.gameId) && Cfg.Hit_Me) || (!EqGid(event.gameId) && Cfg.Hit_Other) || Cfg.Hit_All || HUsers[event.gameId]) { for (const gameId of event.items) { if (SUsers[event.gameId] && Cfg.HideBlacklistedDrop && Cfg.DropBlacklist.some(item => MoteIds.indexOf(item) !== -1)) continue; mod.toClient('S_DESPAWN_DROPITEM', 4, { gameId }); } return false; } } function sSpawnDropItem(event) { if (EqGid(event.source)) return; if (Cfg.HideBlacklistedDrop && Cfg.DropBlacklist.indexOf(event.item) !== -1) return false; if (Cfg.Mode >= 2) { event.explode = 0; return true; } } function sFontSwapInfo() { if (Cfg.Hit_Damage || Cfg.Hit_All) return false; } function sSpawnEventSeed(event) { if (HUsers[event.owner] || Cfg.Mode >= 2) { HSeedBoxes.add(event.gameId); return false; } } function sUpdateEventSeedState(event) { if (HSeedBoxes.has(event.gameId)) return false; } function sResultEventSeed(event) { if (HSeedBoxes.has(event.gameId)) return false; } function sDespawnEventSeed(event) { HSeedBoxes.delete(event.gameId); } function sFieldEventOnEnter() { if (Cfg.GuardianAutoChange) { if ((LastGState !== null && Cfg.Mode === 2) || Cfg.Mode >= 2) return; LastGState = Cfg.Mode; Cmd.exec("fps state 2"); } } function sFieldEventOnLeave() { if (Cfg.GuardianAutoChange) { if (LastGState === null || Cfg.Mode !== 2) { LastGState = null; return; } Cmd.exec(`fps state ${LastGState}`); LastGState = null; } } // ~~~ * Packet Hooks * ~~~ \\ mod.hook('S_LOGIN', 14, sLogin) mod.hook('S_LOAD_TOPO', 'raw', sLoadTopo) mod.hook('S_MOUNT_VEHICLE', 2, LastHook, sMountVehicle) mod.hook('S_UNMOUNT_VEHICLE', 2, LastHook, sUnmountVehicle) mod.hook('C_SET_VISIBLE_RANGE', 1, cSetVisibleRange) mod.hook('S_START_COOLTIME_ITEM', 1, LastHook, sStartCooltimeItem) mod.hook('S_START_ACTION_SCRIPT', 3, LastHook, sStartActionScript) mod.hook('S_LOADING_SCREEN_CONTROL_INFO', 'raw', LastHook, sLoadingScreenControlInfo) mod.hook('S_UPDATE_ACHIEVEMENT_PROGRESS', 1, LastHookfn, sUpdateAchievementProgress) mod.hook('S_ITEM_CUSTOM_STRING', 2, LastHook, sItemCustomString) mod.hook('S_SOCIAL', 1, LastHook, sSocial) mod.hook('S_GUILD_NAME', 2, LastHook, sGuildName) mod.hook('S_APPLY_TITLE', 3, LastHook, sApplyTitle) mod.hook('S_IMAGE_DATA', 'raw', LastHook, sImageData) mod.hook('S_SPAWN_USER', 17, LastHook, sSpawnUser) mod.hook('S_SPAWN_USER', 17, LastHookfn, sSpawnUserfn) mod.hook('S_DESPAWN_USER', 3, sDespawnUser) mod.hook('S_USER_LOCATION', 6, LastHook, sUserLocation) mod.hook('S_USER_STATUS', 4, LastHook, sUserStatus) mod.hook('S_DEAD_LOCATION', 2, sDeadLocation) mod.hook('S_USER_MOVETYPE', 1, LastHook, sUserMovetype) mod.hook('S_USER_APPEARANCE_CHANGE', 1, LastHook, sUserAppearanceChange) mod.hook('S_USER_CHANGE_FACE_CUSTOM', 2, LastHook, sUserChangeFaceCustom) mod.hook('S_USER_EXTERNAL_CHANGE', 7, LastHook, sUserExternalChange) mod.hook('S_UNICAST_TRANSFORM_DATA', 6, LastHook, sUnicastTransformData) mod.hook('S_PARTY_MEMBER_LIST', 9, sPartyMemberList) mod.hook('S_LEAVE_PARTY_MEMBER', 2, sLeavePartyMember) mod.hook('S_LEAVE_PARTY', 'raw', sLeaveParty) mod.hook('S_SPAWN_NPC', 12, LastHook, sSpawnNpc) mod.hook('S_DESPAWN_NPC', 3, LastHook, sDespawnNpc) mod.hook('S_NPC_LOCATION', 3, LastHook, sNpcLocation) mod.hook('S_CREATURE_LIFE', 3, sCreatureLife) mod.hook('S_CREATURE_ROTATE', 2, LastHook, sCreatureRotate) mod.hook('S_FEARMOVE_STAGE', 2, LastHook, sFearMoveStage) mod.hook('S_FEARMOVE_END', 2, LastHook, sFearMoveEnd) mod.hook('S_REQUEST_SPAWN_SERVANT', 4, LastHook, sRequestSpawnServant) mod.hook('S_REQUEST_DESPAWN_SERVANT', 1, sRequestDespawnServant) mod.hook('S_QUEST_BALLOON', 1, LastHook, sQuestBalloon) mod.hook('S_ABNORMALITY_BEGIN', 5, LastHookfn, sAbnormalityBegin) mod.hook('S_ABNORMALITY_REFRESH', 2, LastHookfn, sAbnormalityRefresh) mod.hook('S_ABNORMALITY_RESIST', 1, LastHookfn, sAbnormalityResist) mod.hook('S_ABNORMALITY_DAMAGE_ABSORB', 1, LastHookfn, sAbnormalityDamageAbsorb) mod.hook('S_ABNORMALITY_FAIL', 2, LastHookfn, sAbnormalityFail) mod.hook('S_ABNORMALITY_END', 1, LastHookfn, sAbnormalityEnd) mod.hook('S_ACTION_STAGE', 9, LastHook, sActionStage) mod.hook('S_ACTION_END', 5, LastHook, sActionEnd) mod.hook('S_INSTANCE_ARROW', 4, LastHook, sInstanceArrow) mod.hook('S_SPAWN_PROJECTILE', 6, LastHook, sSpawnProjectile) mod.hook('S_START_USER_PROJECTILE', 9, LastHook, sStartUserProjectile) //mod.hook('S_CHANGE_DESTPOS_PROJECTILE', 1, LastHook, sChangeDestposProjectile) //! Awaiting public def !\\ mod.hook('S_END_USER_PROJECTILE', 4, sEndUserProjectile) mod.hook('S_DESPAWN_PROJECTILE', 2, sDespawnProjectile) mod.hook('S_PLAYER_CHANGE_MP', 1, LastHook, sPlayerChangeMp) mod.hook('S_CREATURE_CHANGE_HP', 6, LastHook, sCreatureChangeHp) mod.hook('S_EACH_SKILL_RESULT', mod.majorPatchVersion < 110 ? 14 : 15, LastHook, sEachSkillResult) mod.hook('S_ITEM_EXPLOSION_RESULT', 2, LastHook, sItemExplosionResult) mod.hook('S_SPAWN_DROPITEM', 9, LastHook, sSpawnDropItem) mod.hook('S_FONT_SWAP_INFO', 'raw', LastHookfn, sFontSwapInfo) mod.hook('S_SPAWN_EVENT_SEED', 2, LastHook, sSpawnEventSeed) mod.hook('S_UPDATE_EVENT_SEED_STATE', 4, LastHook, sUpdateEventSeedState) mod.hook('S_RESULT_EVENT_SEED', 2, LastHook, sResultEventSeed) mod.hook('S_DESPAWN_EVENT_SEED', 1, sDespawnEventSeed) mod.hook('S_FIELD_EVENT_ON_ENTER', 'raw', sFieldEventOnEnter) mod.hook('S_FIELD_EVENT_ON_LEAVE', 'raw', sFieldEventOnLeave) // ~~~ * Commands * ~~~ \\ Cmd.add('0', () => Cmd.exec('fps mode 0')); Cmd.add('1', () => Cmd.exec('fps mode 1')); Cmd.add('2', () => Cmd.exec('fps mode 2')); Cmd.add('3', () => Cmd.exec('fps mode 3')); Cmd.add(['fps', '!fps', 'fps-utils', '!fps-utils'], (key, arg, arg2, arg3) => { key = key ? key.toLowerCase() : key; arg = arg ? arg.toLowerCase() : arg; arg2 = arg2 ? arg2.toLowerCase() : arg2; arg3 = arg3 ? arg3.toLowerCase() : arg3; switch (key) { case "b": Cmd.exec('fps skills blacklist'); break; case "p": Cmd.exec('fps party'); break; case "g": case "gui": GuiHandler(arg, arg2); break; case "0": Cmd.exec('fps mode 0'); break; case "1": Cmd.exec('fps mode 1'); break; case "2": Cmd.exec('fps mode 2'); break; case "3": Cmd.exec('fps mode 3'); break; case "m": case "mod": case "mode": case "state": switch (arg) { case "0": case "off": case "zero": if (Cfg.Mode === 3) ShowAllPlayers(); Cfg.Mode = 0; Cfg.HideAllAbnormalities = false; Cfg.HideAllProjectiles = false; if (!Cfg.Hit_All) Cfg.Hit_Other = false; Msg(`Mode 0.`); break; case "1": case "one": if (Cfg.Mode === 3) ShowAllPlayers(); Cfg.Mode = 1; Cfg.HideAllAbnormalities = false; Cfg.HideAllProjectiles = true; if (!Cfg.Hit_All) Cfg.Hit_Other = true; Msg(`Mode 1.`); break; case "2": case "two": if (Cfg.Mode === 3) ShowAllPlayers(); Cfg.Mode = 2; Cfg.HideAllAbnormalities = true; Cfg.HideAllProjectiles = true; if (!Cfg.Hit_All) Cfg.Hit_Other = true; Msg(`Mode 2.`); break; case "3": case "three": HideAllPlayers(); Cfg.Mode = 3; Cfg.HideAllAbnormalities = true; Cfg.HideAllProjectiles = true; if (!Cfg.Hit_All) Cfg.Hit_Other = true; Cfg.OnlyParty = false; Msg(`Mode 3.`); break; default: Msg(`Invalid arg: '${arg}'.`); Msg(`Modes: "[0, 1, 2, 3].`); break; } break; case "hide": if (typeof arg === "string" && arg !== null) { if (Cfg.PlayersBlacklist.includes(arg)) return Msg(`Player '${arg}' Already hidden.`); else if ((PClasses.includes(arg) && !Cfg.ClassesBlacklist.includes(arg)) || (PRoles.includes(arg) && !Cfg.RolesBlacklist.includes(arg))) { for (const cData in Cfg.ClassesData) { if ((Cfg.ClassesData[cData].name === arg || Cfg.ClassesData[cData].role.includes(arg)) && !Cfg.ClassesData[cData].isHidden) { Cfg.ClassesData[cData].isHidden = true; if (Cfg.ClassesData[cData].name === arg) Cfg.ClassesBlacklist.push(arg); if (Cfg.ClassesData[cData].role.includes(arg)) Cfg.RolesBlacklist.push(arg); let classtohide = Cfg.ClassesData[cData].model; for (const sUser in SUsers) if (ClassID(SUsers[sUser].templateId) === classtohide) HideSpecificPlayerByName(SUsers[sUser].name); } } Msg(`Class/Role ${arg} Hidden.`); return; } else if (Cfg.ClassesBlacklist.includes(arg) || Cfg.RolesBlacklist.includes(arg)) return Msg(`Class/Role '${arg}' Already hidden.`); Msg(`Player '${arg}' Hidden.`); Cfg.PlayersBlacklist.push(arg); HideSpecificPlayerByName(arg); } else Msg(`Invalid arg: '${arg2}'.`); break; case "show": if (typeof arg === "string" && arg !== null) { if (Cfg.PlayersBlacklist.includes(arg)) { ShowSpecificPlayerByName(arg); RemoveEntity(Cfg.PlayersBlacklist, arg); Msg(`Player '${arg}' Shown.`); return; } if ((PClasses.includes(arg) && Cfg.ClassesBlacklist.includes(arg)) || (Cfg.RolesBlacklist.includes(arg) && PRoles.includes(arg))) { for (const cData in Cfg.ClassesData) { if (Cfg.ClassesData[cData].name === arg || Cfg.ClassesData[cData].role.includes(arg)) { if (Cfg.ClassesData[cData].name === arg) RemoveEntity(Cfg.ClassesBlacklist, arg); if (Cfg.ClassesData[cData].role.includes(arg)) RemoveEntity(Cfg.RolesBlacklist, arg); Cfg.ClassesData[cData].isHidden = false; let classToShow = Cfg.ClassesData[cData].model; for (const hUser in HUsers) if (ClassID(HUsers[hUser].templateId) === classToShow) ShowSpecificPlayerByName(HUsers[hUser].name); } } Msg(`Class '${arg}' Shown.`); } else if (!Cfg.ClassesBlacklist.includes(arg) || !Cfg.RolesBlacklist.includes(arg)) Msg(`Class/Role '${arg}' Already shown.`); else if (!Cfg.PlayersBlacklist.includes(arg)) Msg(`Player '${arg}' Already shown.`); else Msg(`Invalid arg: '${arg2}'.`); } break; case "party": if (Cfg.Mode === 3) return Msg(`You've to disable mode 3 first.`); //if(!PMembers.size) return Msg(`You must be in party in-order to enable this.`); Cfg.OnlyParty = !Cfg.OnlyParty; if (Cfg.OnlyParty) { for (const sUser in SUsers) { if (!PMembers.has(SUsers[sUser].name)) HideSpecificPlayerByName(SUsers[sUser].name); else if (HUsers[SUsers[sUser].gameId]) ShowSpecificPlayerByName(SUsers[sUser].name); } } else ShowAllPlayers(); Msg(`Everyone but party ${Cfg.OnlyParty ? `Hidden` : `Shown`}.`); break; case "raid": Cfg.RaidAutoChange = !Cfg.RaidAutoChange; Msg(`Raid auto-state ${Cfg.RaidAutoChange ? `Enabled` : `Disabled`}.`); if (!Cfg.GuardianAutoChange) LastFState = null; break; case "guardian": Cfg.GuardianAutoChange = !Cfg.GuardianAutoChange; Msg(`Guardian auto-state ${Cfg.GuardianAutoChange ? `Enabled` : `Disabled`}.`); if (!Cfg.GuardianAutoChange) LastGState = null; break; case "pvptraps": Cfg.PvpTraps = !Cfg.PvpTraps; Msg(`Pvp Traps are ${Cfg.PvpTraps ? `Shown(not affected by hide all projectiles)` : `Normal(affected by hide all projectiles)`}.`); break; case "list": Msg(`Hidden players: ${Cfg.PlayersBlacklist.length ? Cfg.PlayersBlacklist.join(', ') : 0}.`); Msg(`Hidden classes: ${Cfg.ClassesBlacklist.length ? Cfg.ClassesBlacklist.join(', ') : 0}.`); Msg(`Hidden roles: ${Cfg.RolesBlacklist.length ? Cfg.RolesBlacklist.join(', ') : 0}.`); break; case "summons": case "sums": switch (arg) { case "me": case "own": Cfg.HideMySummons = !Cfg.HideMySummons; Cfg.HideMySummons ? HideNpcs('own') : ShowNpcs('own'); Msg(`Own summoned NPCs are ${Cfg.HideMySummons ? `Hidden` : `Shown`}.`); break; default: Cfg.HideOthersSummons = !Cfg.HideOthersSummons; Cfg.HideOthersSummons ? HideNpcs('others') : ShowNpcs('others'); Msg(`Others summoned NPCs are ${Cfg.HideOthersSummons ? `Hidden` : `Shown`}.`); break; } break; case "skills": case "skill": switch (arg) { case "blacklist": Cfg.HideBlacklistedSkills = !Cfg.HideBlacklistedSkills; Msg(`Blacklisted skills ${Cfg.HideBlacklistedSkills ? `Hidden` : `Shown`}.`); break; case "class": if (PClasses.includes(arg2)) { for (const cData in Cfg.ClassesData) { if (Cfg.ClassesData[cData].name === arg2) { if (arg3 && !isNaN(arg3) && arg3 < 50) { if (Cfg.ClassesData[cData].CD_SkillsBlacklist.includes(arg3)) { let index = Cfg.ClassesData[cData].CD_SkillsBlacklist.indexOf(arg3); if (index !== -1) { Cfg.ClassesData[cData].CD_SkillsBlacklist.splice(index, 1); Msg(`Skill ID '${arg3}' Shown for class '${arg2}'.`); } return; } else { Cfg.ClassesData[cData].CD_SkillsBlacklist.push(arg3); Msg(`Skill ID '${arg3}' Hidden for class '${arg2}'.`); return; } } else { Cfg.ClassesData[cData].CD_HideBlacklistedSkills = !Cfg.ClassesData[cData].CD_HideBlacklistedSkills; Msg(`Skills for '${arg2}' class ${Cfg.ClassesData[cData].CD_HideBlacklistedSkills ? `Hidden` : `Shown`}.`); return; } } } } else Msg(`Class ${arg2} not found.`); break; } break; case "npcs": case "npc": if (arg === 'hide') { if (!arg2 || !arg3) { Cfg.HideBlacklistedNpcs = !Cfg.HideBlacklistedNpcs; Msg(`Blacklisted NPCs ${Cfg.HideBlacklistedNpcs ? `Hidden` : `Shown`}.`); break; } const found = Cfg.NpcsBlacklist.some(s => s.zone === arg2 && s.templateId === arg3); if (found) { if (Cfg.HideBlacklistedNpcs) ShowSpecificNpcByHzTi(Number(arg2), Number(arg3)); Msg(`NPC HntZone '${arg2}', TmpId '${arg3}' Removed from the blacklist.`); Cfg.NpcsBlacklist = Cfg.NpcsBlacklist.filter(obj => obj.zone !== arg2 || obj.templateId !== arg3); } else { if (Cfg.HideBlacklistedNpcs) HideSpecificNpcByHzTi(Number(arg2), Number(arg3)); Msg(`NPC HntZone '${arg2}', TmpId '${arg3}' Added to the blacklist.`); Cfg.NpcsBlacklist.push({ zone: arg2, templateId: arg3 }); } return; } else { Cfg.HideBlacklistedNpcs = !Cfg.HideBlacklistedNpcs; Cfg.HideBlacklistedNpcs ? HideNpcs('bl') : ShowNpcs('bl'); Msg(`Blacklisted NPCs ${Cfg.HideBlacklistedNpcs ? `Hidden` : `Shown`}.`); } break; case "hit": switch (arg) { case "me": if (Cfg.Hit_All) return Msg(`You've to disable hit ALL first.`); Cfg.Hit_Me = !Cfg.Hit_Me; Msg(`Own hits effect ${Cfg.Hit_Me ? `Hidden` : `Shown`}.`); break; case "other": if (Cfg.Hit_All) return Msg(`You've to disable hit ALL first.`); Cfg.Hit_Other = !Cfg.Hit_Other; Msg(`Players hit effect ${Cfg.Hit_Other ? `Hidden` : `Shown`}.`); break; case "damage": if (Cfg.Hit_All) return Msg(`You've to disable hit ALL first.`); Cfg.Hit_Damage = !Cfg.Hit_Damage; Msg(`Damage numbers ${Cfg.Hit_Damage ? `Hidden` : `Shown`}.`); break; case "all": Cfg.Hit_Me = Cfg.Hit_Other = Cfg.Hit_Damage = false; Cfg.Hit_All = !Cfg.Hit_All; Msg(`Hit all ${Cfg.Hit_All ? `Hidden` : `Shown`}.`); break; default: Msg(`Invalid hit arg: '${arg}'.`); break; } break; case "fireworks": case "firework": Cfg.HideFireworks = !Cfg.HideFireworks; Msg(`Fireworks ${Cfg.HideFireworks ? `Hidden` : `Shown`}.`); break; case "abn": case "effects": case "abnormal": case "abnormalities": switch (arg) { case "all": Cfg.HideAllAbnormalities = !Cfg.HideAllAbnormalities; Msg(`All Abnormalities ${Cfg.HideAllAbnormalities ? `Hidden` : `Shown`}.`); break; case "blacklist": if (!arg2 || !arg3) { Cfg.HideBlacklistedAbnormalities = !Cfg.HideBlacklistedAbnormalities; Msg(`Blacklisted Abnormalities ${Cfg.HideBlacklistedAbnormalities ? `Hidden` : `Shown`}.`); break; } else if (arg2 && arg3) { arg3 = Number(arg3); if (!Cfg.AbnormalitiesBlacklist.includes(arg3)) { if (arg2 === 'add') { Cfg.AbnormalitiesBlacklist.push(arg3); Msg(`Blacklisted Abnormalities added '${arg3}'.`); return; } else if (arg2 === 'remv') return Msg(`Blacklisted Abnormalities can't remove '${arg3}' as it's not there.`); } else if (Cfg.AbnormalitiesBlacklist.includes(arg3)) { if (arg2 === 'add') return Msg(`Blacklisted Abnormalities can't add '${arg3}' as it's already there.`); else if (arg2 === 'remv') { let index = Cfg.AbnormalitiesBlacklist.indexOf(arg3); if (index !== -1) { Cfg.AbnormalitiesBlacklist.splice(index, 1); Msg(`Blacklisted Abnormalities removed '${arg3}'.`); return; } } } else return Msg(`Invalid abnormalities Blacklist arg: '${arg}'.`); } break; case "log": case "debug": AbnDebug = !AbnDebug; if (AbnDebug) Msg(`Abnormalities debug started, check your proxy console for details.`) else Msg(`Abnormalities debug stopped.`); break; default: Msg(`Invalid abnormalities arg: '${arg}'.`); break; } break; case "guildlogo": if (SwitchCd) return Msg(`Try again in 3 seconds.`); Cfg.Hideguildlogos = !Cfg.Hideguildlogos; mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: 0 }); mod.setTimeout(() => mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 15E2); SwitchCd = true; mod.setTimeout(() => SwitchCd = false, 28E2); Msg(`Guild Logos ${Cfg.Hideguildlogos ? `Hidden` : `Shown`}.`); break; case "costume": case "style": if (SwitchCd) return Msg(`Try again in 3 seconds.`); Cfg.ShowStyle = !Cfg.ShowStyle; mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: 0 }); mod.setTimeout(() => mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 15E2); SwitchCd = true; mod.setTimeout(() => SwitchCd = false, 28E2); Msg(`Style of NPCs & others ${Cfg.ShowStyle ? `Hidden` : `Shown`}.`); break; case "proj": case "projectile": switch (arg) { case "all": Cfg.HideAllProjectiles = !Cfg.HideAllProjectiles; Msg(`Projectiles ${Cfg.HideAllProjectiles ? `Hidden` : `Shown`}.`); break; case "blacklist": if (!arg2 || !arg3) { Cfg.HideBlacklistedProjectiles = !Cfg.HideBlacklistedProjectiles; Msg(`Blacklisted projectile ${Cfg.HideBlacklistedProjectiles ? `Hidden` : `Shown`}.`); break; } else if (arg2 && arg3) { arg3 = Number(arg3); if (!Cfg.ProjectilesBlacklist.includes(arg3)) { if (arg2 === 'add') { Cfg.ProjectilesBlacklist.push(arg3); Msg(`Blacklisted projectile added '${arg3}'.`); return; } else if (arg2 === 'remv') return Msg(`Blacklisted projectile can't remove '${arg3}' as it's not there.`); } else if (Cfg.ProjectilesBlacklist.includes(arg3)) { if (arg2 === 'add') return Msg(`Blacklisted projectile can't add '${arg3}' as it's already there.`); else if (arg2 === 'remv') { let index = Cfg.ProjectilesBlacklist.indexOf(arg3); if (index !== -1) { Cfg.ProjectilesBlacklist.splice(index, 1); Msg(`Blacklisted projectile removed '${arg3}'.`); return; } } } else return Msg(`Invalid projectile Blacklist arg: '${arg}'.`); } break; case "log": case "debug": ProjDebug = !ProjDebug; if (ProjDebug) Msg(`Projectile debug started, check your proxy console for details.`); else Msg(`Projectile debug stopped.`); break; default: Msg(`Invalid projectile arg: '${arg}'.`); break; } break; case "quicklink": switch (arg) { case "mail": case "parcel": mod.toServer('C_REQUEST_CONTRACT', 1, { type: 8 }); break; case "talent": case "talents": mod.toServer('C_REQUEST_CONTRACT', 1, { type: 78 }); break; case "broker": mod.toClient('S_NPC_MENU_SELECT', 1, { type: 28 }); break; case "dress": case "dressingroom": mod.toServer('C_REQUEST_CONTRACT', 1, { type: 77 }); break; case "hat": case "hatrestyle": mod.toServer('C_REQUEST_CONTRACT', 1, { type: 91 }); break; case "lobby": mod.toServer('C_RETURN_TO_LOBBY', 1); break; case "exit": case "instantexit": mod.toClient('S_EXIT', 3, { category: 0, code: 0 }); break; case "drop": mod.toServer('C_LEAVE_PARTY', 1); break; case "disband": mod.toServer('C_DISMISS_PARTY', 1); break; case "reset": mod.toServer('C_RESET_ALL_DUNGEON', 1); break; default: Msg(`Invalid quicklink '${arg}'.`); break; } break; case "npczoom": Cfg.ActionScripts = !Cfg.ActionScripts; Msg(`Npc zoom-ins ${Cfg.ActionScripts ? `Hidden` : `Shown`}.`); break; case "dropitem": case "drops": if (arg === 'hide') { if (!arg2) { Cfg.HideBlacklistedDrop = !Cfg.HideBlacklistedDrop; Msg(`Blacklisted Drops ${Cfg.HideBlacklistedDrop ? `Hidden` : `Shown`}.`); break; } arg2 = Number(arg2); const found1 = Cfg.DropBlacklist.some(s => s === arg2); if (found1) { Msg(`Drops id '${arg2}' Removed from the blacklist.`); Cfg.DropBlacklist = Cfg.DropBlacklist.filter(obj => obj !== Number(arg2)); } else { Msg(`Drops id '${arg2}' Added to the blacklist.`); Cfg.DropBlacklist.push(arg2); } return; } else Cfg.HideBlacklistedDrop = !Cfg.HideBlacklistedDrop; Msg(`Blacklisted Drops ${Cfg.HideBlacklistedDrop ? `Hidden` : `Shown`}.`); break; case "monsterdeathani": case "monstersdeathani": Cfg.HideMonsterDeathAnimation = !Cfg.HideMonsterDeathAnimation; Msg(`Monsters Death Animation is ${Cfg.HideMonsterDeathAnimation ? `Hidden` : `Shown`}.`); break; case "screenabns": case "blur": if (arg === 'hide') { if (!arg2) { Cfg.HideOwnBlacklistedAbns = !Cfg.HideOwnBlacklistedAbns; Msg(`Blacklisted ScreenAbns ${Cfg.OwnAbnormalsBlacklist ? `Hidden` : `Shown`}.`); break; } arg2 = Number(arg2); const found2 = Cfg.OwnAbnormalsBlacklist.some(m => m === arg2); if (found2) { Msg(`Abnormal id '${arg2}' Removed from the blacklist.`); Cfg.OwnAbnormalsBlacklist = Cfg.OwnAbnormalsBlacklist.filter(obj => obj !== Number(arg2)); } else { Msg(`Abnormal id '${arg2}' Added to the blacklist.`); Cfg.OwnAbnormalsBlacklist.push(arg2); } return; } else Cfg.HideOwnBlacklistedAbns = !Cfg.HideOwnBlacklistedAbns; Msg(`Blacklisted ScreenAbns ${Cfg.HideOwnBlacklistedAbns ? `Hidden` : `Shown`}.`); break; case "pet": case "pets": case "servant": case "servants": switch (arg) { case "me": Cfg.HideMyServants = !Cfg.HideMyServants; Cfg.HideMyServants ? HideNpcs('pet', 'own') : ShowNpcs('pet', 'own'); Msg(`Own Servants are ${Cfg.HideMyServants ? `Hidden` : `Shown`}.`); break; default: Cfg.HideOthersServants = !Cfg.HideOthersServants; Cfg.HideOthersServants ? HideNpcs('pet', 'others') : ShowNpcs('pet', 'others'); Msg(`Others summoned Servants are ${Cfg.HideOthersServants ? `Hidden` : `Shown`}.`); break; } break; case "hpnumbers": Cfg.HideHpNumbers = !Cfg.HideHpNumbers; Msg(`Own Hp numbers ${Cfg.HideHpNumbers ? `Hidden` : `Shown`}.`); break; case "mpnumbers": Cfg.HideMpNumbers = !Cfg.HideMpNumbers; Msg(`Own Mp numbers ${Cfg.HideMpNumbers ? `Hidden` : `Shown`}.`); break; case "muteothers": Cfg.MuteOthersVoice = !Cfg.MuteOthersVoice; Msg(`Mute others voice is ${Cfg.MuteOthersVoice ? `Enabled` : `Disabled`}.`); break; case "petspopup": Cfg.HideServantBalloons = !Cfg.HideServantBalloons; Msg(`Hide Pets Popup chat balloons is ${Cfg.HideServantBalloons ? `Enabled` : `Disabled`}.`); break; case "stream": Cfg.StreamMode = !Cfg.StreamMode; Msg(`Stream mode is ${Cfg.StreamMode ? `Enabled` : `Disabled`}.`); if (Cfg.StreamMode) console.log("\x1b[94mINFO\x1b[34m [FPS-UTILS]\x1b[39m - Steam Mode has been enabled, No messages will be sent in-game messages until its disabled."); else console.log("\x1b[94mINFO\x1b[34m [FPS-UTILS]\x1b[39m - Steam Mode has been disabled."); break; case "help": case "h": Cmd.exec("fps gui help"); break; default: //Msg(`Unknown command, check command list.`); //Cmd.exec("fps gui help"); Cmd.exec("fps gui"); break; } if (!NotCP && typeof Cfg.ClassesData["12"] === 'undefined') mod.saveSettings(); }) }