index.js 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697
  1. 'use strict'
  2. /* global __dirname */
  3. // ~~~ * Data * ~~~ \\
  4. const NotCP = typeof global.TeraProxy === "undefined" || typeof global.TeraProxy.UILanguage === "undefined";
  5. const NpcData = require("./data/npcData.json"), SkillData = require("./data/skillString.json");
  6. const Last_Hook = { order: 100010 }, Last_Hookfn = { order: 100010, filter: { fake: null, silenced: false, modified: null } };
  7. const BnzC = '#BC8F8F', SlvC = '#9A9A9A', GldC = '#DAA520', PnkC = '#FFB7C5', HPkC = '#FF69B4', CPKC = '#ED5D92', RedC = '#FE6F5E', GrnC = '#4DE19C', LPrC = '#E0B0FF', PrpC = '#9966CC', LBlC = '#4DDCE1', BluC = '#436EEE', DBlC = '#5BC0BE', HBlC = '#08B3E5', GryC = '#778899', YlwC = '#C0B94D';
  8. const InvisibleNpcs = { 8: [6011], 12: [1], 23: [201, 202], 34: [8000], 61: [9901], 62: [9001, 9002, 9003, 9004, 9901], 83: [9901], 207: [9901], 223: [9901], 230: [9901] };
  9. const TrapsIds = [30120, 30220, 30320, 90220, 90320, 90420, 90520, 90620, 90720, 90820, 90920, 100120, 100220, 100320, 100420, 100520, 120220, 120320, 120420, 120520, 120620, 120720, 120820, 120920, 150120, 150220, 150320, 150420, 150520, 150620, 150720, 170120, 170220, 170320, 170420, 170520, 170620, 170720, 170820, 170920, 230120, 230220, 230320, 250120, 250220, 250320, 250420, 250520, 250620, 250720, 250820, 250920, 251020];
  10. const UserNPCs = [12345, 1100100, 1100101, 1023000, 1023001, 1023002, 1023003, 1023004, 1023005, 1023006, 1023007, 1023008, 1023009, 1023010, 1023011, 1023012, 1023013, 1023014, 1023200, 1023201, 1023202, 1023203, 1023204, 1023205, 1023206, 1023207, 1023208, 1023209, 1023210, 1023211, 1023300, 1023301, 1023302, 1023303, 1023304, 1023305, 1023306, 1023307, 1023308, 1023309, 1023310, 1023311, 1023312, 1023400, 1023401, 1023402, 1023403, 1023404, 1023405, 1024000, 1024001, 1024100, 1024200, 1024300, 2100100, 2100101, 10235001, 10235002, 10235003, 10235004, 10235005, 10235006, 10235007, 10235008, 10235009, 10235010, 10235011, 10235012, 10235013, 10235014, 10235015, 10235016, 10235017, 10235100, 10236001, 10236002, 10236003, 10236004, 10236005, 10236006, 10236007, 10236008, 10236009, 10236010, 10236011, 10236012, 10236013, 10236014, 10236015, 10236100, 10237001, 10237002, 10237003, 10237004, 10237005, 10237006, 10237007, 10237008, 10237009, 10237010, 10237011, 10237012, 10237013, 10237014, 10237015, 10237100, 10238001, 10238002, 10238003, 10238004, 10238005, 10238006, 10238007, 10238008, 10238100, 10239003, 30301001, 30301002, 30301003, 30301004, 30301005, 30302001, 30302002, 30302003, 30302004, 30302005, 30302006, 30302007, 30303001, 30303002, 30303003, 30303004, 30303005, 30303006, 30303007];
  11. const SpamAchIds = [6, 14, 15, 17, 18, 51, 377, 391, 466, 467, 468, 469, 470, 471, 472, 473, 476, 611, 1002, 1003, 1004, 1005, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1408, 1420, 1744, 1745, 1769, 1770, 1771, 1942, 1943, 1952, 1992, 2032, 2033, 2036, 2037, 2038, 2057, 2062, 2071, 2078, 2081, 2082, 2083, 2084, 2088, 2089, 2095, 6005, 9817, 20605, 20607, 20608, 28723, 28724, 28725, 28726, 28727, 28728, 28729, 28730, 28731, 28732, 28733, 28734, 28735, 28736, 510005, 510012, 510019, 510026, 510027, 510033, 510034, 510035, 510036, 510037, 510038, 510039, 510040, 510041, 520029, 520030, 520032, 520033, 520034, 520035, 520048, 520049, 520050, 520051, 525000, 525001, 525002, 525003, 525004, 525005, 525006, 525007, 525008, 525009, 525010, 525011, 525012, 525013, 525014, 525015, 525016, 525017, 525018, 525019, 525020, 525021, 525022, 525023, 525024, 525025, 5010000];
  12. const ImportantAbns = [90440009, 90442106, 90442110, 90442111, 90442112, 90442113, 90442114, 90442400, 90442401, 90442402, 90442403, 90442404, 90442405, 90442406, 90442407, 90442408, 90442502, 78200123, 78200126, 78200130, 78200131, 78200161, 78200162, 78200203, 78200204, 78200205, 78200209, 78200234, 78200235, 78200236];
  13. const BlockedAbns = [201, 202, 902, 903, 908, 910, 911, 912, 913, 916, 917, 920, 921, 922, 1130, 1131, 1133, 1461, 1462, 1490, 1491, 1495, 1510, 1511, 1512, 1610, 1630, 1800, 2040, 2041, 2042, 2057, 2058, 2059, 2060, 2066, 2067, 2068, 2081, 2755, 2756, 2757, 2758, 2759, 2760, 2761, 4401, 4600, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4950, 5060, 6005, 6006, 6007, 6009, 6016, 10400, 10401, 10402, 10403, 10404, 10405, 10501, 10502, 10503, 10504, 10505, 10506, 10510, 10511, 10512, 10513, 10514, 10515, 10516, 10520, 10521, 10522, 10523, 10524, 10525, 10600, 10601, 10602, 10603, 10604, 10605, 10606, 10610, 10611, 10612, 10613, 10614, 10615, 10616, 10620, 10621, 10622, 10623, 10624, 10625, 10625, 10700, 10701, 10702, 10703, 10704, 10705, 10706, 10710, 10711, 10712, 10713, 10714, 10715, 10716, 10720, 10721, 10722, 10723, 10724, 10725, 10800, 10801, 10802, 10803, 10804, 10805, 10806, 12230, 12240, 27050, 40175, 40176, 48732, 48733, 48734, 48735, 48736, 48737, 48738, 48739, 60005, 60018, 60026, 70214, 70221, 70222, 70223, 70224, 70225, 70226, 70227, 70228, 70231, 70232, 70233, 70234, 70235, 70241, 70242, 70243, 70244, 70245, 70251, 70252, 70253, 70254, 70255, 70256, 70261, 70262, 70263, 70264, 70271, 70272, 70273, 70274, 70275, 70281, 70282, 70283, 70284, 70285, 70286, 70287, 70288, 70289, 70290, 70300, 70301, 70302, 70303, 70304, 70305, 70310, 70311, 70312, 70313, 70314, 70315, 70321, 70322, 70323, 70324, 70325, 70330, 70331, 70332, 70333, 70334, 70335, 70336, 70337, 70338, 70341, 70342, 70343, 70344, 70345, 70346, 70347, 70348, 70351, 70352, 70353, 70354, 70355, 70356, 70357, 70358, 70359, 70360, 70361, 70362, 70363, 70364, 70365, 70366, 70367, 70368, 70369, 70370, 70462, 88611, 88612, 100200, 100201, 100202, 100203, 100294, 100295, 100296, 100297, 100298, 100299, 100800, 100801, 101801, 101900, 102600, 103100, 103102, 103104, 103130, 103131, 200200, 200201, 200202, 200230, 200231, 200232, 200500, 200900, 200901, 200930, 200931, 201200, 201300, 201301, 201302, 201303, 201304, 201305, 201700, 201807, 201808, 201811, 201812, 201830, 201831, 300300, 300301, 400100, 400101, 400102, 400103, 400104, 400105, 401705, 401706, 401710, 401711, 401721, 401722, 401723, 401724, 401727, 401728, 457017, 457052, 476615, 476616, 476617, 476618, 500200, 500500, 500600, 500601, 500602, 500700, 500701, 500702, 500703, 500704, 500705, 500706, 500707, 500720, 500721, 500722, 500723, 500724, 500725, 500726, 500727, 501000, 501001, 501002, 501003, 501004, 501005, 501006, 501020, 501021, 501022, 501023, 501024, 501025, 501026, 501400, 501402, 600900, 600901, 600902, 600903, 600904, 600905, 600906, 600907, 600908, 600920, 600921, 600922, 600923, 600924, 600925, 600926, 600927, 600928, 601450, 620000, 620001, 621000, 622001, 622002, 700200, 700201, 700202, 700203, 700230, 700231, 700232, 700233, 700300, 700400, 700401, 700402, 700403, 700404, 700405, 700406, 700407, 700408, 700409, 700600, 700601, 700602, 700603, 700630, 700631, 700700, 700701, 700730, 700731, 701001, 701002, 701003, 701004, 701005, 701006, 701007, 701008, 701009, 701010, 701011, 701012, 701511, 701540, 701541, 701542, 701543, 701544, 701545, 701546, 701547, 701548, 701549, 701550, 701551, 701560, 701561, 701562, 701563, 701564, 701565, 701566, 701567, 701568, 701569, 701570, 701571, 701604, 701605, 701606, 701607, 701800, 701801, 701802, 701803, 701804, 701805, 701806, 701807, 701808, 701820, 701821, 701822, 701823, 701824, 701825, 701826, 701827, 701828, 701900, 702000, 702001, 702002, 702003, 702005, 702012, 757002, 757003, 757004, 757005, 757006, 757007, 757008, 757009, 757016, 757017, 757018, 757029, 757031, 757032, 757033, 757049, 757052, 757054, 760009, 760015, 760031, 760032, 776021, 776022, 776023, 776024, 776025, 776026, 776028, 776029, 800100, 800101, 800102, 800103, 800104, 800105, 800106, 800107, 800108, 800300, 800301, 800302, 800303, 800304, 801000, 801001, 801100, 801101, 801400, 801401, 806020, 806021, 806022, 806023, 806028, 830004, 905434, 905932, 999996, 4510004, 4510005, 4510006, 4510007, 4510008, 4510009, 4510010, 4510011, 4510012, 4510013, 4510014, 4510015, 5000000, 5000003, 5020003, 5020006, 5020007, 5020008, 5020010, 5020011, 5030004, 5030005, 5690001, 7691000, 7691007, 9691000, 9691007, 9691011, 9943049, 10152050, 10152096, 10154030, 10154054, 10155550, 14400002, 14400003, 44300066, 44300073, 44300078, 44300079, 47630300, 47650400, 47660100, 47660200, 47660300, 47660400, 47660500, 47660600, 47660700, 47660800, 47660900, 47662300, 47662800, 47680400, 74300078, 74300081, 75000016, 76600024, 77600017, 77702400, 77703433, 77703437, 78200379, 78200383, 80401500, 81121101, 81121102, 81121103, 81121104, 81121105, 81121201, 81121202, 81121203, 81121204, 81121205, 90341010, 90442101, 91600019, 93503301, 93503302, 93503303, 93503401, 93503402, 98200379, 98200383, 98850027, 98850030, 98850035, 98850036, 99000900, 99000910, 99000920, 99000930, 99000940, 99000950, 99000960, 99000970, 99001000, 99001010, 99001020, 99001030, 99001040, 99001050, 99001060, 99001070, 99001200, 99001210, 99001220, 99001230, 99001240, 99001250, 99001260, 99001270, 99001300, 99001301, 99001302, 99001303, 99001310, 99001320, 99001330, 99001340, 99001350, 99001360, 99001370, 99001400, 99001410, 99001420, 99001430, 99001440, 99001450, 99001460, 99001470, 99001700, 99001710, 99001720, 99001730, 99001740, 99001750, 99001760, 99001770, 99002300, 99002310, 99002320, 99002330, 99002340, 99002350, 99002360, 99002370, 99003200, 99003400, 99003500, 99003600, 99003700, 99020000, 99020010, 99020020, 99070011, 99070021, 99070023, 99070025, 99070027, 99070028, 99070029, 99070030, 99070031, 99070032, 999001001, 999001002, 999001003, 999001004, 999001005, 999001006, 999001007, 999001008, 999001011, 999001018, 999001019, 999001020, 999001021, 999009820, 999010000];
  14. const GameJobs = ["warrior", "lancer", "slayer", "berserker", "sorcerer", "archer", "priest", "mystic", "reaper", "gunner", "brawler", "ninja", "valkyrie"], GameRoles = ["dps", "healer", "tank", "ranged"];
  15. module.exports = function FpsUtils(mod) {
  16. // ~~~ * Variables * ~~~ \\
  17. let MyGameId,
  18. MyName,
  19. SwitchCd,
  20. AllowedAchUps,
  21. LastState,
  22. LastGState,
  23. LastVrange,
  24. ProjDebug,
  25. AbnDebug,
  26. TmpData = [],
  27. PMembers = [],
  28. SUsers = {},
  29. HUsers = {},
  30. SNpcs = {},
  31. HNpcs = {},
  32. SPets = {},
  33. HPets = {},
  34. HSeedBoxes = {};
  35. // ~~~ * Gui Parser * ~~~ \\
  36. const Xmap = new WeakMap();
  37. if (!Xmap.has(mod.dispatch || mod)) {
  38. Xmap.set(mod.dispatch || mod, {});
  39. mod.hook('C_CONFIRM_UPDATE_NOTIFICATION', 'raw', Last_Hook, () => false)
  40. mod.hook('C_ADMIN', 1, Last_Hookfn, (event) => {
  41. const Xd = event.command.split(";")
  42. Xd.forEach(cmd => mod.command.exec(cmd))
  43. return false
  44. })
  45. }
  46. const gui = {
  47. parse(Xarray, Xtitle) {
  48. let Xdata = '';
  49. for (let i = 0; i < Xarray.length; i++) {
  50. if (Xdata.length >= 16000) {
  51. Xdata += `Gui data limit exceeded, some values may be missing.`;
  52. break;
  53. }
  54. if (Xarray[i].command) Xdata += `<a href="admincommand:/@${Xarray[i].command}">${Xarray[i].text}</a>`;
  55. else if (!Xarray[i].command) Xdata += `${Xarray[i].text}`;
  56. else continue;
  57. }
  58. mod.toClient('S_ANNOUNCE_UPDATE_NOTIFICATION', 1, {
  59. id: 0,
  60. title: Xtitle,
  61. body: Xdata
  62. })
  63. }
  64. }
  65. // ~~~ * Gui Handler * ~~~ \\
  66. function GuiHandler(page, arg) {
  67. switch (page) {
  68. case "searchnpc": case "npcsearch":
  69. NpcJsonSearch("search", arg);
  70. break;
  71. case "npc":
  72. NpcJsonSearch("starts", arg);
  73. break;
  74. case "npclist":
  75. TmpData = []
  76. TmpData.push(
  77. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br><br>`, command: "fps gui" },
  78. { text: `<font color="${YlwC}" size="+20"><p align="right">[Main NPC page]</p></font><br>`, command: "fps gui npcmain" },
  79. { text: `<font color="${LBlC}" size="+19">Click a NPC ID to remove it from the blacklist:</font><br>` }
  80. )
  81. for (let i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
  82. TmpData.push({ text: `<font color="${BnzC}" size="+17">${mod.settings.NpcsBlacklist[i].zone}, ${mod.settings.NpcsBlacklist[i].templateId}</font><br>`, command: `fps npc hide ${mod.settings.NpcsBlacklist[i].zone} ${mod.settings.NpcsBlacklist[i].templateId};fps gui npclist` })
  83. }
  84. gui.parse(TmpData, `<font color="${LPrC}">[FPS] Options - NPCs </font><font color="${GrnC}">(Blacklist)</font>`)
  85. TmpData = []
  86. break;
  87. case "npcmain":
  88. TmpData = []
  89. TmpData.push(
  90. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br><br>`, command: "fps gui" },
  91. { text: `<font color="${YlwC}" size="+20"><p align="right">[Blacklisted NPCs list]</p></font><br>`, command: "fps gui npclist" },
  92. { text: `<font color="${LBlC}" size="+19">Click a letter to view all NPCs starting with that letter:<br><br>` }
  93. )
  94. for (let i = 25, alphabet = ["Z", "Y", "X", "W", "V", "U", "T", "S", "R", "Q", "P", "O", "N", "M", "L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A"]; i > -1; i--) {
  95. TmpData.push({ text: `<font color="${BluC}" size="+19">${alphabet[i]}</font>`, command: `fps gui npc ${alphabet[i]}` }, { text: "&nbsp;&nbsp;" })
  96. }
  97. TmpData.push(
  98. { text: `<br><br><font color="${PnkC}" size="+16">(Command </font><font color="${HPkC}" size="+16">"fps gui searchnpc &#60;name&#62;"</font><font color="${PnkC}" size="+16"> to search for a specific NPCs names, Case sensitive)</font>` },
  99. { text: `<br><br><font color="${PnkC}" size="+16">(Command </font><font color="${HPkC}" size="+16">"fps gui npc &#60;letters&#62;"</font><font color="${PnkC}" size="+16"> to search for NPCs names that starts with that 'letters', Case sensitive)</font>` },
  100. { text: `<br><br><font color="${PnkC}" size="+16">If you want to search for npc with space between it's name, you've to add the whole name inside quotations, e.g. <font color="${HPkC}" size="+16">fps gui npcsearch "Bay Kamara"\`</font></font>` }
  101. )
  102. gui.parse(TmpData, `<font color="${LPrC}">[FPS] Options - NPCs </font><font color="${YlwC}">(Main)</font>`)
  103. TmpData = []
  104. break;
  105. case "show":
  106. TmpData = []
  107. TmpData.push(
  108. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: "fps gui" },
  109. { text: `<font color="${RedC}" size="+16">Red</font><font color="${LPrC}" size="+16"> = Shown, <font color="${GrnC}" size="+16">Green</font><font color="${LPrC}" size="+16"> = Hidden</font></font><br>` },
  110. { text: `<font color="${PnkC}" size="+16">(Command </font><font color="${HPkC}" size="+16">"fps hide &#60;name&#62;"</font><font color="${PnkC}" size="+16"> to hide someone that does not appear here)</font><br><br>` },
  111. { text: `<font color="${LBlC}" size="+19">Click on <font color="${RedC}">Red</font> to hide & add to blacklist.<br>Click on <font color="${GrnC}">Green</font> to show & remove from blacklist</font><br>` }
  112. )
  113. for (let i in SUsers) {
  114. TmpData.push({ text: `<font color="${mod.settings.PlayersBlacklist.indexOf(SUsers[i].name.toLowerCase()) !== -1 ? GrnC : RedC}" size="+17">${SUsers[i].name}</font><br>`, command: mod.settings.PlayersBlacklist.indexOf(SUsers[i].name.toLowerCase()) !== -1 ? `fps show ${SUsers[i].name};fps gui show` : `fps hide ${SUsers[i].name};fps gui show` })
  115. }
  116. gui.parse(TmpData, `<font color="${LPrC}">[FPS] Options - Players </font><font color="${RedC}">(In-distance)</font>`)
  117. TmpData = []
  118. break;
  119. case "hide":
  120. TmpData = []
  121. TmpData.push(
  122. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br><br>`, command: "fps gui" },
  123. { text: `<font color="${LBlC}" size="+19">Click to show & remove from blacklist.</font><br>` }
  124. )
  125. mod.settings.PlayersBlacklist.forEach(mem => TmpData.push({ text: `<font color="${BnzC}" size="+17">${mem}</font><br>`, command: `fps show ${mem};fps gui hide` }))
  126. gui.parse(TmpData, `<font color="${LPrC}">[FPS] Options - Players </font><font color="${GrnC}">(Hidden)</font>`)
  127. TmpData = []
  128. break;
  129. case "skills":
  130. gui.parse([
  131. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: "fps gui" },
  132. { text: `<font color="${YlwC}" size="+20">Tankers:</font>` }, { text: "&#09;&#09;" },
  133. { text: `<font color="${LBlC}" size="+18">&#40;Lancer&#41;</font>`, command: "fps gui class lancer" }, { text: "&nbsp;&nbsp;" },
  134. { text: `<font color="${LBlC}" size="+18">&#40;Brawler&#41;</font><br><br>`, command: "fps gui class brawler" },
  135. { text: `<font color="${YlwC}" size="+20">Healers:</font>` }, { text: "&#09;&#09;" },
  136. { text: `<font color="${LBlC}" size="+18">&#40;Priest&#41;</font>`, command: "fps gui class priest" }, { text: "&nbsp;&nbsp;" },
  137. { text: `<font color="${LBlC}" size="+18">&#40;Mystic&#41;</font><br><br>`, command: "fps gui class mystic" },
  138. { text: `<font color="${YlwC}" size="+20">Dpsers(melee):</font>` }, { text: "&#09;" },
  139. { text: `<font color="${LBlC}" size="+18">&#40;Warrior&#41;</font>`, command: "fps gui class warrior" }, { text: "&nbsp;&nbsp;" },
  140. { text: `<font color="${LBlC}" size="+18">&#40;Slayer&#41;</font>`, command: "fps gui class slayer" }, { text: "&nbsp;&nbsp;" },
  141. { text: `<font color="${LBlC}" size="+18">&#40;Berserker&#41;</font>`, command: "fps gui class berserker" }, { text: "&nbsp;&nbsp;" },
  142. { text: `<font color="${LBlC}" size="+18">&#40;Ninja&#41;</font>`, command: "fps gui class ninja" }, { text: "&nbsp;&nbsp;" },
  143. { text: `<font color="${LBlC}" size="+18">&#40;Valkyrie&#41;</font>`, command: "fps gui class valkyrie" }, { text: "&nbsp;&nbsp;" },
  144. { text: `<font color="${LBlC}" size="+18">&#40;Reaper&#41;</font><br><br>`, command: "fps gui class reaper" },
  145. { text: `<font color="${YlwC}" size="+20">Dpsers(ranged):</font>` }, { text: "&#09;" },
  146. { text: `<font color="${LBlC}" size="+18">&#40;Sorcerer&#41;</font>`, command: "fps gui class sorcerer" }, { text: "&nbsp;&nbsp;" },
  147. { text: `<font color="${LBlC}" size="+18">&#40;Archer&#41;</font>`, command: "fps gui class archer" }, { text: "&nbsp;&nbsp;" },
  148. { text: `<font color="${LBlC}" size="+18">&#40;Gunner&#41;</font>`, command: "fps gui class gunner" }
  149. ], `<font color="${LPrC}">[FPS] Options - Skills </font><font color="${YlwC}">(Choose class)</font>`)
  150. break;
  151. case "class":
  152. gui.parse(SkillJsonSearch(arg), `<font color="${LPrC}">[FPS] Options - Skill list for '${arg}'</font>`)
  153. break;
  154. case "role":
  155. gui.parse([
  156. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br><br>`, command: "fps gui" },
  157. { text: `<font color="${YlwC}" size="+20">By Roles:</font>` }, { text: "&#09;" },
  158. { text: `<font color="${mod.settings.RolesBlacklist.includes('tank') ? GrnC : RedC}" size="+18">[Tankers]</font>`, command: `fps ${mod.settings.RolesBlacklist.includes('tank') ? "show" : "hide"} tank;fps gui role` }, { text: "&nbsp;&nbsp;" },
  159. { text: `<font color="${mod.settings.RolesBlacklist.includes('healer') ? GrnC : RedC}" size="+18">[Healers]</font>`, command: `fps ${mod.settings.RolesBlacklist.includes('healer') ? "show" : "hide"} healer;fps gui role` }, { text: "&nbsp;&nbsp;" },
  160. { text: `<font color="${mod.settings.RolesBlacklist.includes('dps') ? GrnC : RedC}" size="+18" >[Dps-All]</font>`, command: `fps ${mod.settings.RolesBlacklist.includes('dps') ? "show" : "hide"} dps;fps gui role` }, { text: "&nbsp;&nbsp;" },
  161. { text: `<font color="${mod.settings.RolesBlacklist.includes('ranged') ? GrnC : RedC}" size="+18">[Dps-Ranged]</font><br><br><br><br>`, command: `fps ${mod.settings.RolesBlacklist.includes('ranged') ? "show" : "hide"} ranged;fps gui role` },
  162. { text: `<font color="${DBlC}" size="+22">By Classes</font><br><br>` },
  163. { text: `<font color="${YlwC}" size="+20">Tankers:</font>` }, { text: "&#09;&#09;" },
  164. { text: `<font color="${mod.settings.ClassesBlacklist.includes('lancer') ? GrnC : RedC}" size="+18">[Lancer]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('lancer') ? "show" : "hide"} lancer;fps gui role` }, { text: "&nbsp;&nbsp;" },
  165. { text: `<font color="${mod.settings.ClassesBlacklist.includes('brawler') ? GrnC : RedC}" size="+18">[Brawler]</font><br><br>`, command: `fps ${mod.settings.ClassesBlacklist.includes('brawler') ? "show" : "hide"} brawler;fps gui role` },
  166. { text: `<font color="${YlwC}" size="+20">Healers:</font>` }, { text: "&#09;&#09;" },
  167. { text: `<font color="${mod.settings.ClassesBlacklist.includes('priest') ? GrnC : RedC}" size="+18">[Priest]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('priest') ? "show" : "hide"} priest;fps gui role` }, { text: "&nbsp;&nbsp;" },
  168. { text: `<font color="${mod.settings.ClassesBlacklist.includes('mystic') ? GrnC : RedC}" size="+18">[Mystic]</font><br><br>`, command: `fps ${mod.settings.ClassesBlacklist.includes('mystic') ? "show" : "hide"} mystic;fps gui role` },
  169. { text: `<font color="${YlwC}" size="+20">Dpsers(melee):</font>` }, { text: "&#09;" },
  170. { text: `<font color="${mod.settings.ClassesBlacklist.includes('warrior') ? GrnC : RedC}" size="+18">[Warrior]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('warrior') ? "show" : "hide"} warrior;fps gui role` }, { text: "&nbsp;&nbsp;" },
  171. { text: `<font color="${mod.settings.ClassesBlacklist.includes('slayer') ? GrnC : RedC}" size="+18">[Slayer]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('slayer') ? "show" : "hide"} slayer;fps gui role` }, { text: "&nbsp;&nbsp;" },
  172. { text: `<font color="${mod.settings.ClassesBlacklist.includes('berserker') ? GrnC : RedC}" size="+18">[Berserker]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('berserker') ? "show" : "hide"} berserker;fps gui role` }, { text: "&nbsp;&nbsp;" },
  173. { text: `<font color="${mod.settings.ClassesBlacklist.includes('ninja') ? GrnC : RedC}" size="+18">[Ninja]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('ninja') ? "show" : "hide"} ninja;fps gui role` }, { text: "&nbsp;&nbsp;" },
  174. { text: `<font color="${mod.settings.ClassesBlacklist.includes('valkyrie') ? GrnC : RedC}" size="+18">[Valkyrie]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('valkyrie') ? "show" : "hide"} valkyrie;fps gui role` }, { text: "&nbsp;&nbsp;" },
  175. { text: `<font color="${mod.settings.ClassesBlacklist.includes('reaper') ? GrnC : RedC}" size="+18">[Reaper]</font><br><br>`, command: `fps ${mod.settings.ClassesBlacklist.includes('reaper') ? "show" : "hide"} reaper;fps gui role` },
  176. { text: `<font color="${YlwC}" size="+20">Dpsers(ranged):</font>` }, { text: "&#09;" },
  177. { text: `<font color="${mod.settings.ClassesBlacklist.includes('sorcerer') ? GrnC : RedC}" size="+18">[Sorcerer]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('sorcerer') ? "show" : "hide"} sorcerer;fps gui role` }, { text: "&nbsp;&nbsp;" },
  178. { text: `<font color="${mod.settings.ClassesBlacklist.includes('archer') ? GrnC : RedC}" size="+18">[Archer]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('archer') ? "show" : "hide"} archer;fps gui role` }, { text: "&nbsp;&nbsp;" },
  179. { text: `<font color="${mod.settings.ClassesBlacklist.includes('gunner') ? GrnC : RedC}" size="+18">[Gunner]</font>`, command: `fps ${mod.settings.ClassesBlacklist.includes('gunner') ? "show" : "hide"} gunner;fps gui role` }
  180. ], `<font color="${LPrC}">[FPS] Options - Roles/Classes</font>`)
  181. break;
  182. case "abn":
  183. TmpData = []
  184. TmpData.push(
  185. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: "fps gui" },
  186. { text: `<font color="${AbnDebug ? GrnC : RedC}" size="+19"><p align="right">Debug</p></font><br>`, command: "fps abn log;fps gui abn" },
  187. { text: `<font color="${LPrC}" size="+19">Blacklist: </font><font color="${PnkC}" size="17+">Click to remove from the blacklist.</font><br>` }
  188. )
  189. mod.settings.AbnormalitiesBlacklist.forEach(abnmem => TmpData.push({ text: `<font color="${BnzC}" size="+16">${abnmem}<br></font>`, command: `fps abn blacklist remv ${abnmem};fps gui abn` }))
  190. gui.parse(TmpData, `<font color="${LPrC}">[FPS] Options - Abnormalities</font>`)
  191. TmpData = []
  192. break;
  193. case "proj":
  194. TmpData = []
  195. TmpData.push(
  196. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: "fps gui" },
  197. { text: `<font color="${ProjDebug ? GrnC : RedC}" size="+19"><p align="right">Debug</p></font><br>`, command: "fps proj log;fps gui proj" },
  198. { text: `<font color="${LPrC}" size="+19">Blacklist: </font><font color="${PnkC}" size="17+">Click to remove from the blacklist.</font><br>` }
  199. )
  200. mod.settings.ProjectilesBlacklist.forEach(projmem => TmpData.push({ text: `<font color="${BnzC}" size="+16">${projmem}<br></font>`, command: `fps proj blacklist remv ${projmem};fps gui proj` }))
  201. gui.parse(TmpData, `<font color="${LPrC}">[FPS] Options - Projectiles</font>`)
  202. TmpData = []
  203. break;
  204. case "help":
  205. gui.parse([
  206. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: "fps gui" },
  207. { text: `<font size="20"><font color="${LBlC}">Command</font> <font color="${SlvC}">Arg(s)</font> <font color="${CPKC}">Example</font><br>` },
  208. { text: `<font color="${HBlC}">gui ^ g</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps gui</font><br>` },
  209. { text: `<font color="${HBlC}"> N/A</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps-util</font><br>` },
  210. { text: `<font color="${HBlC}">0 ^ 1 ^ 2 ^ 3</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!0 ^ !1 ^ !2 ^ !3</font><br>` },
  211. { text: `<font color="${HBlC}">mode</font> <font color="${DBlC}">0 ^ 1 ^ 2 ^ 3</font> <font color="${HPkC}">!fps mode 2</font><br>` },
  212. { text: `<font color="${HBlC}">hide^show</font> <font color="${DBlC}">Player^Class^Role</font> <font color="${HPkC}">!fps hide mie</font><br>` },
  213. { text: `<font color="${HBlC}">party</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps party</font><br>` },
  214. { text: `<font color="${HBlC}">raid</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps raid</font><br>` },
  215. { text: `<font color="${HBlC}">list</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps list</font><br>` },
  216. { text: `<font color="${HBlC}">sums</font> <font color="${DBlC}">other ^ me</font> <font color="${HPkC}">!fps sums me</font><br>` },
  217. { text: `<font color="${HBlC}">skill</font> <font color="${DBlC}">blacklist</font> <font color="${HPkC}">!fps skill blacklist</font><br>` },
  218. { text: `<font color="${HBlC}">npc</font> <font color="${DBlC}">N/A ^ hide</font> <font color="${HPkC}">!fps npc</font><br>` },
  219. { text: `<font color="${HBlC}">hit</font> <font color="${DBlC}">me^other^damage</font> <font color="${HPkC}">!fps hit me</font><br>` },
  220. { text: `<font color="${HBlC}">firework</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps firework</font><br>` },
  221. { text: `<font color="${HBlC}">abn</font> <font color="${DBlC}">all ^ blacklist</font> <font color="${HPkC}">!fps abn blacklist</font><br>` },
  222. { text: `<font color="${HBlC}">proj</font> <font color="${DBlC}">all ^ blacklist</font> <font color="${HPkC}">!fps proj all</font><br>` },
  223. { text: `<font color="${HBlC}">guildlogo</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps guildlogo</font><br>` },
  224. { text: `<font color="${HBlC}">style</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps style</font><br>` },
  225. { text: `<font color="${HBlC}">gui npcsearch</font> <font color="${DBlC}">"target"</font> <font color="${HPkC}">!fps gui npcsearch E</font><br>` },
  226. { text: `<font color="${HBlC}">npczoom</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps npczoom</font><br>` },
  227. { text: `<font color="${HBlC}">dropitem</font> <font color="${DBlC}">N/A ^ hide</font> <font color="${HPkC}">!fps dropitem</font><br>` },
  228. { text: `<font color="${HBlC}">monsterdeathani</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps monsterdeathani</font><br>` },
  229. { text: `<font color="${HBlC}">screenabns</font> <font color="${DBlC}">N/A ^ hide</font> <font color="${HPkC}">!fps screenabns</font><br>` },
  230. { text: `<font color="${HBlC}">hpnumbers</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps hpnumbers</font><br>` },
  231. { text: `<font color="${HBlC}">mpnumbers</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps mpnumbers</font><br>` },
  232. { text: `<font color="${HBlC}">pet</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps raid</font><br>` },
  233. { text: `<font color="${HBlC}">guardian</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps guardian</font><br>` },
  234. { text: `<font color="${HBlC}">muteothers</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps muteothers</font><br>` },
  235. { text: `<font color="${HBlC}">stream</font> <font color="${DBlC}">N/A</font> <font color="${HPkC}">!fps stream</font></font><br>` },
  236. ], `<font color="${LPrC}">[FPS] HELP</font>`)
  237. break;
  238. default:
  239. gui.parse([
  240. { text: `<font color="${PrpC}" size="+15"><p align="right">REFRESH</p></font><br>`, command: "fps gui" },
  241. { text: `<font color="${YlwC}" size="+20">Modes:</font>` }, { text: "&#09;&#09;" },
  242. { text: `<font color="${mod.settings.Mode === 0 ? GrnC : RedC}" size="+18">[Mode 0]</font>`, command: "fps mode 0;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  243. { text: `<font color="${mod.settings.Mode === 1 ? GrnC : RedC}" size="+18">[Mode 1]</font>`, command: "fps mode 1;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  244. { text: `<font color="${mod.settings.Mode === 2 ? GrnC : RedC}" size="+18">[Mode 2]</font>`, command: "fps mode 2;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  245. { text: `<font color="${mod.settings.Mode === 3 ? GrnC : RedC}" size="+18">[Mode 3]</font><br><br>`, command: "fps mode 3;fps gui" },
  246. { text: `<font color="${YlwC}" size="+20">Hit:</font>` }, { text: "&#09;&#09;&#09;" },
  247. { text: `<font color="${mod.settings.Hit_Other ? GrnC : RedC}" size="+18">[Players]</font>`, command: "fps hit other;fps gui" }, { text: "&nbsp;&nbsp;" },
  248. { text: `<font color="${mod.settings.Hit_Me ? GrnC : RedC}" size="+18">[Own]</font>`, command: "fps hit me;fps gui" }, { text: "&nbsp;&nbsp;" },
  249. { text: `<font color="${mod.settings.Hit_Damage ? GrnC : RedC}" size="+18">[Dmg/heal numbers]</font>`, command: "fps hit damage;fps gui" }, { text: "&nbsp;&nbsp;" },
  250. { text: `<font color="${mod.settings.Hit_All ? GrnC : RedC}" size="+18">[ALL]</font><br><br>`, command: "fps hit all;fps gui" },
  251. { text: `<font color="${YlwC}" size="+20">Hide:</font>` }, { text: "&#09;&#09;" },
  252. { text: `<font color="${LBlC}" size="+18">[Classes/Roles]</font>`, command: "fps gui role" }, { text: "&nbsp;&nbsp;&nbsp;" },
  253. { text: `<font color="${mod.settings.ShowStyle ? GrnC : RedC}" size="+18">[Style]</font>`, command: "fps style;fps gui" }, { text: "&nbsp;&nbsp;" },
  254. { text: `<font color="${mod.settings.Hideguildlogos ? GrnC : RedC}" size="+18">[Guild Logos]</font>`, command: "fps guildlogo;fps gui" }, { text: "&nbsp;&nbsp;" },
  255. { text: `<font color="${mod.settings.HideFireworks ? GrnC : RedC}" size="+18">[Firework]</font>`, command: "fps fireworks;fps gui" }, { text: "&nbsp;&nbsp;" },
  256. { text: `<font color="${mod.settings.HideServantBalloons ? GrnC : RedC}" size="+18">[Pets Popup]</font><br><br>`, command: "fps petspopup;fps gui" },
  257. { text: `<font color="${YlwC}" size="+20">Self(own):</font>` }, { text: "&#09;" },
  258. { text: `<font color="${mod.settings.HideHpNumbers ? GrnC : RedC}" size="+18">[HP Nums]</font>`, command: "fps hpnumbers;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  259. { text: `<font color="${mod.settings.HideMpNumbers ? GrnC : RedC}" size="+18">[MP Nums]</font>`, command: "fps mpnumbers;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  260. { text: `<font color="${mod.settings.HideMySummons ? GrnC : RedC}" size="+18">[Own summons]</font>`, command: "fps summons me;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  261. { text: `<font color="${mod.settings.HideMyServants ? GrnC : RedC}" size="+18">[Pets]</font>`, command: "fps pet me;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  262. { text: `<font color="${mod.settings.HideOwnBlacklistedAbns ? GrnC : RedC}" size="+18">[Blur/dizzy]</font><br>`, command: "fps screenabns;fps gui" },
  263. { text: `<font color="${YlwC}" size="+20">Players:</font>` }, { text: "&#09;&#09;" },
  264. { text: `<font color="${LBlC}" size="+18">[Spawned list]</font>`, command: "fps gui show" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  265. { text: `<font color="${LBlC}" size="+18">[Hidden list]</font>`, command: "fps gui hide" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  266. { text: `<font color="${mod.settings.HideOthersSummons ? GrnC : RedC}" size="+18">[Players summons]</font>`, command: "fps summons;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  267. { text: `<font color="${mod.settings.HideOthersServants ? GrnC : RedC}" size="+18">[Pets]</font><br>`, command: "fps pet;fps gui" },
  268. { text: `<font color="${YlwC}" size="+20">NPCs:</font>` }, { text: "&#09;&#09;" },
  269. { text: `<font color="${LBlC}" size="+18">[Menu]</font>`, command: "fps gui npcmain" }, { text: "&nbsp;&nbsp;" },
  270. { text: `<font color="${mod.settings.HideMonsterDeathAnimation ? GrnC : RedC}" size="+18">[Hide Death Ani]</font>`, command: "fps monsterdeathani;fps gui" }, { text: "&nbsp;&nbsp;" },
  271. { text: `<font color="${mod.settings.ActionScripts ? GrnC : RedC}" size="+18">[Zoom-ins]</font>`, command: "fps npczoom;fps gui" }, { text: "&nbsp;&nbsp;" },
  272. { text: `<font color="${mod.settings.HideBlacklistedNpcs ? GrnC : RedC}" size="+18">[Hide Blacklisted]</font><br><br>`, command: "fps npc;fps gui" },
  273. { text: `<font color="${YlwC}" size="+20">Skills:</font>` }, { text: "&#09;&#09;" },
  274. { text: `<font color="${LBlC}" size="+18">[Hide individually]</font>`, command: "fps gui skills" }, { text: "&nbsp;&nbsp;&nbsp;" },
  275. { text: `<font color="${mod.settings.HideBlacklistedSkills ? GrnC : RedC}" size="+18">[Hide Blacklisted]</font><br>`, command: "fps skill blacklist;fps gui" },
  276. { text: `<font color="${YlwC}" size="+20">Abnormal:</font>` }, { text: "&#09;" },
  277. { text: `<font color="${mod.settings.HideAllAbnormalities ? GrnC : RedC}" size="+18">[Hide ALL]</font>`, command: "fps abn all;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  278. { text: `<font color="${mod.settings.HideBlacklistedAbnormalities ? GrnC : RedC}" size="+18">[Hide Blacklisted]</font>`, command: "fps abn blacklist;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  279. { text: `<font color="${LBlC}" size="+18">[Black List]</font><br>`, command: "fps gui abn" },
  280. { text: `<font color="${YlwC}" size="+20">Projectile:</font>` }, { text: "&#09;" },
  281. { text: `<font color="${mod.settings.HideAllProjectiles ? GrnC : RedC}" size="+18">[Hide ALL]</font>`, command: "fps proj all;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  282. { text: `<font color="${mod.settings.HideBlacklistedProjectiles ? GrnC : RedC}" size="+18">[Hide Blacklisted]</font>`, command: "fps proj blacklist;fps gui" }, { text: "&nbsp;&nbsp;&nbsp;" },
  283. { text: `<font color="${LBlC}" size="+18">[Black List]</font><br><br>`, command: "fps gui proj" },
  284. { text: `<font color="${YlwC}" size="+20">Misc.</font>` }, { text: "&#09;&#09;" },
  285. { text: `<font color="${mod.settings.RaidAutoChange ? GrnC : RedC}" size="+18">[Raid auto state]</font>`, command: "fps raid;fps gui" }, { text: "&nbsp;&nbsp;" },
  286. { text: `<font color="${mod.settings.OnlyParty ? GrnC : RedC}" size="+18">[Only Party]</font>`, command: "fps party;fps gui" }, { text: "&nbsp;&nbsp;" },
  287. { text: `<font color="${mod.settings.HideBlacklistedDrop ? GrnC : RedC}" size="+18">[Drops BList]</font>`, command: "fps dropitem;fps gui" }, { text: "&nbsp;&nbsp;" },
  288. { text: `<font color="${mod.settings.PvpTraps ? GrnC : RedC}" size="+17">[Show Traps]</font><br>`, command: "fps pvptraps;fps gui" }, { text: "&#09;&#09;&#09;" },
  289. { text: `<font color="${mod.settings.GuardianAutoChange ? GrnC : RedC}" size="+17">[Guardian auto state]</font>`, command: "fps guardian;fps gui" }, { text: "&nbsp;&nbsp;" },
  290. { text: `<font color="${mod.settings.MuteOthersVoice ? GrnC : RedC}" size="+17">[Mute others voice]</font>`, command: "fps muteothers;fps gui" }, { text: "&nbsp;&nbsp;" },
  291. { text: `<font color="${mod.settings.StreamMode ? GrnC : RedC}" size="+17">[Stream]</font><br><br>`, command: "fps stream;fps gui" },
  292. { text: `<font color="${BluC}" size="+22">Quick Links:</font><br>` },
  293. { text: `<font color="${YlwC}" size="+20">UI:</font>` }, { text: "&#09;&#09;" },
  294. { text: `<font color="${PrpC}" size="+17">[Mail]</font>`, command: "fps quicklink parcel" }, { text: "&nbsp;&nbsp;&nbsp;" },
  295. { text: `<font color="${PrpC}" size="+17">[Broker]</font>`, command: "fps quicklink broker" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  296. { text: `<font color="${PrpC}" size="+17">[Talent]</font>`, command: "fps quicklink talents" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  297. { text: `<font color="${PrpC}" size="+17">[Dress]</font>`, command: "fps quicklink dressingroom" }, { text: "&nbsp;&nbsp;&nbsp;" },
  298. { text: `<font color="${PrpC}" size="+17">[Hat Style]</font><br>`, command: "fps quicklink hatrestyle" },
  299. { text: `<font color="${YlwC}" size="+20">Party:</font>` }, { text: "&#09;" },
  300. { text: `<font color="${CPKC}" size="+18">[Reset]</font>`, command: "fps quicklink reset" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  301. { text: `<font color="${CPKC}" size="+18">[Leave]</font>`, command: "fps quicklink drop" }, { text: "&nbsp;&nbsp;&nbsp;&nbsp;" },
  302. { text: `<font color="${CPKC}" size="+18">[Disband]</font><br>`, command: "fps quicklink disband" },
  303. { text: `<font color="${YlwC}" size="+20">System:</font>` }, { text: "&#09;" },
  304. { text: `<font color="${CPKC}" size="+18">[Character Selection]</font>`, command: "fps quicklink lobby" }, { text: "&#09;&#09;&#09;&#09;&#09;" },
  305. { text: `<font color="${CPKC}" size="+18">[!! Instant Exit !!]</font><br>`, command: "fps quicklink instantexit" }
  306. ], `<font color="${LPrC}">[FPS] Options</font> | <font color="${RedC}" size="+16">Red</font><font color="${LPrC}" size="+16"> = disabled, <font color="${GrnC}" size="+16">Green</font><font color="${LPrC}" size="+16"> = enabled</font>`)
  307. }
  308. }
  309. // ~~~ * Gui Functions * ~~~ \\
  310. function SkillJsonSearch(value) {
  311. let keys = [],
  312. skilldata = [],
  313. skillIds = [];
  314. skilldata.push(
  315. { text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: "fps gui" },
  316. { text: `<font color="${mod.settings.HideBlacklistedSkills ? GrnC : RedC}" size="+22"><p align="right">[Blacklisted skills are ${mod.settings.HideBlacklistedSkills ? 'Hidden' : 'Shown'}]</p></font><br>`, command: "fps skill blacklist;fps gui skills" },
  317. { text: `<font color="${LBlC}" size="+19">Click skill to blacklist it.</font><br>` }
  318. )
  319. for (let key in SkillData[value]) {
  320. keys.push(key);
  321. }
  322. skillIds.push(Object.values(SkillData[value]))
  323. for (let i = 0; i < keys.length; i++) {
  324. skilldata.push({ command: `fps skill class ${value} ${skillIds[0][i]};fps gui class ${value}`, text: `<font color="${mod.settings.ClassesData[ClassNameFromID(value)].CD_SkillsBlacklist.includes(skillIds[0][i].toString()) ? GrnC : RedC}" size="+17">[${keys[i]}]</font><br>` });
  325. }
  326. return skilldata;
  327. }
  328. function NpcJsonSearch(type, arg) {
  329. const NpcDataLength = NpcData.length;
  330. TmpData = []
  331. TmpData.push({ text: `<font color="${PrpC}" size="+24"><p align="right">MAIN MENU</p></font><br><br>`, command: "fps gui" })
  332. switch (type) {
  333. case 'starts':
  334. for (let i = 0; i < NpcDataLength; i++) if (NpcData[i].Nm.startsWith(arg)) TmpData.push({ command: `fps npc hide ${NpcData[i].Hz} ${NpcData[i].Ti};fps gui npc ${arg}`, text: `<font color="${mod.settings.NpcsBlacklist.some(arrVal => NpcData[i].Hz == arrVal.zone && NpcData[i].Ti == arrVal.templateId) ? GrnC : RedC}" size="+17">${NpcData[i].Nm}</font><br>` });
  335. break;
  336. case 'search':
  337. for (let i = 0; i < NpcDataLength; i++) if (NpcData[i].Nm.includes(arg)) TmpData.push({ command: `fps npc hide ${NpcData[i].Hz} ${NpcData[i].Ti};fps gui npcsearch ${arg}`, text: `<font color="${mod.settings.NpcsBlacklist.some(arrVal => NpcData[i].Hz == arrVal.zone && NpcData[i].Ti == arrVal.templateId) ? GrnC : RedC}" size="+17">${NpcData[i].Nm} </font><br>` });
  338. break;
  339. }
  340. gui.parse(TmpData, `<font color="${LPrC}">[FPS] Options - NPCs</font> | <font color="${LBlC}" size="+16">Search results for '${arg}'</font>.`)
  341. TmpData = []
  342. }
  343. function ClassNameFromID(name) {
  344. for (const Class_data of Object.keys(mod.settings.ClassesData)) if (mod.settings.ClassesData[Class_data].name == name) return Class_data;
  345. }
  346. // ~~~ * Command Functions * ~~~ \\
  347. function Msg(msg) {
  348. if (mod.settings.StreamMode) return;
  349. if (NotCP) mod.command.message(`<font color="${LPrC}">[FPS] ${msg}</font>`);
  350. else mod.command.message(`<font color="${LPrC}">${msg}</font>`);
  351. }
  352. function RemoveEntity(name) {
  353. let what, A = arguments, Al = A.length, Ax;
  354. while (Al > 1 && name.length) {
  355. what = A[--Al];
  356. while ((Ax = name.indexOf(what)) !== -1) name.splice(Ax, 1);
  357. }
  358. return name;
  359. }
  360. function HideSpecificPlayerByName(name) {
  361. for (let i in SUsers) {
  362. if (SUsers[i].name.toString().toLowerCase() === name.toLowerCase()) {
  363. mod.toClient('S_DESPAWN_USER', 3, { gameId: SUsers[i].gameId, type: 1 });
  364. HUsers[SUsers[i].gameId] = SUsers[i];
  365. break;
  366. }
  367. }
  368. }
  369. function HideSpecificNpc(hz, ti) {
  370. for (let i in SNpcs) {
  371. if (SNpcs[i].huntingZoneId === hz && SNpcs[i].templateId === ti) {
  372. mod.toClient('S_DESPAWN_NPC', 3, { gameId: SNpcs[i].gameId, loc: SNpcs[i].loc, type: 1, unk: 0 })
  373. HNpcs[SNpcs[i].gameId] = SNpcs[i];
  374. HNpcs[SNpcs[i].gameId].spawnType = 1;
  375. HNpcs[SNpcs[i].gameId].spawnScript = 0;
  376. break;
  377. }
  378. }
  379. }
  380. function ShowSpecificPlayerByName(name) {
  381. for (let i in HUsers) {
  382. if (HUsers[i].name.toString().toLowerCase() === name.toLowerCase()) {
  383. ModifyUserAppearance(HUsers[i]);
  384. mod.toClient('S_SPAWN_USER', 15, HUsers[i]);
  385. delete HUsers[i];
  386. break;
  387. }
  388. }
  389. }
  390. function ShowSpecificNpc(hz, ti) {
  391. for (let i in HNpcs) {
  392. if (HNpcs[i].huntingZoneId === hz && HNpcs[i].templateId === ti) {
  393. mod.toClient('S_SPAWN_NPC', 11, HNpcs[i]);
  394. delete HNpcs[i];
  395. break;
  396. }
  397. }
  398. }
  399. function HideAllPlayers() {
  400. if (!mod.settings.OnlyParty) {
  401. for (let i in SUsers) {
  402. mod.toClient('S_DESPAWN_USER', 3, { gameId: SUsers[i].gameId, type: 1 });
  403. HUsers[SUsers[i].gameId] = SUsers[i];
  404. HUsers[SUsers[i].gameId].spawnFx = 1;
  405. }
  406. }
  407. }
  408. function HideNpcs(type, whose) {
  409. switch (type) {
  410. case 'own':
  411. for (let k in SNpcs) {
  412. if (EqGid(SNpcs[k].owner) && UserNPCs.includes(SNpcs[k].templateId) && SNpcs[k].huntingZoneId === 1023) {
  413. mod.toClient('S_DESPAWN_NPC', 3, { gameId: SNpcs[k].gameId, loc: SNpcs[k].loc, type: 1, unk: 0 });
  414. HNpcs[SNpcs[k].gameId] = SNpcs[k];
  415. }
  416. }
  417. break;
  418. case 'others':
  419. for (let k in SNpcs) {
  420. if (!EqGid(SNpcs[k].owner) && UserNPCs.includes(SNpcs[k].templateId) && SNpcs[k].huntingZoneId === 1023) {
  421. mod.toClient('S_DESPAWN_NPC', 3, { gameId: SNpcs[k].gameId, loc: SNpcs[k].loc, type: 1, unk: 0 });
  422. HNpcs[SNpcs[k].gameId] = SNpcs[k];
  423. }
  424. }
  425. break;
  426. case 'bl':
  427. for (let k in SNpcs) {
  428. for (let i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
  429. if (SNpcs[k].huntingZoneId == mod.settings.NpcsBlacklist[i].zone && SNpcs[k].templateId == mod.settings.NpcsBlacklist[i].templateId) {
  430. mod.toClient('S_DESPAWN_NPC', 3, { gameId: SNpcs[k].gameId, loc: SNpcs[k].loc, type: 1, unk: 0 });
  431. HNpcs[SNpcs[k].gameId] = SNpcs[k];
  432. }
  433. }
  434. }
  435. break;
  436. case 'pet':
  437. switch (whose) {
  438. case 'own':
  439. for (let p in SPets) {
  440. if (!EqGid(SPets[p].ownerId)) continue
  441. mod.toClient('S_REQUEST_DESPAWN_SERVANT', 1, { gameId: SPets[p].gameId, despawnType: 1 })
  442. HPets[SPets[p].gameId] = SPets[p]
  443. }
  444. break;
  445. case 'others':
  446. for (let p in SPets) {
  447. if (EqGid(SPets[p].ownerId)) continue
  448. mod.toClient('S_REQUEST_DESPAWN_SERVANT', 1, { gameId: SPets[p].gameId, despawnType: 1 })
  449. HPets[SPets[p].gameId] = SPets[p]
  450. }
  451. break;
  452. default: break;
  453. }
  454. break;
  455. default: break;
  456. }
  457. }
  458. function ShowNpcs(type, whose) {
  459. switch (type) {
  460. case 'own':
  461. for (let v in HNpcs) {
  462. if (EqGid(HNpcs[v].owner) && UserNPCs.includes(HNpcs[v].templateId) && HNpcs[v].huntingZoneId === 1023) {
  463. mod.toClient('S_SPAWN_NPC', 11, HNpcs[v]);
  464. delete HNpcs[v];
  465. }
  466. }
  467. break;
  468. case 'others':
  469. for (let v in HNpcs) {
  470. if (!EqGid(HNpcs[v].owner) && UserNPCs.includes(HNpcs[v].templateId) && HNpcs[v].huntingZoneId === 1023) {
  471. mod.toClient('S_SPAWN_NPC', 11, HNpcs[v]);
  472. delete HNpcs[v];
  473. }
  474. }
  475. break;
  476. case 'bl':
  477. for (let v in HNpcs) {
  478. for (let i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
  479. if (HNpcs[v].huntingZoneId == mod.settings.NpcsBlacklist[i].zone && HNpcs[v].templateId == mod.settings.NpcsBlacklist[i].templateId) {
  480. mod.toClient('S_SPAWN_NPC', 11, HNpcs[v]);
  481. delete HNpcs[v];
  482. }
  483. }
  484. }
  485. break;
  486. case 'pet':
  487. switch (whose) {
  488. case 'own':
  489. for (let p in HPets) {
  490. if (!EqGid(HPets[p].ownerId)) continue
  491. mod.toClient('S_REQUEST_SPAWN_SERVANT', 4, HPets[p])
  492. delete HPets[p]
  493. }
  494. break;
  495. case 'others':
  496. for (let p in HPets) {
  497. if (EqGid(HPets[p].ownerId)) continue
  498. mod.toClient('S_REQUEST_SPAWN_SERVANT', 4, HPets[p])
  499. delete HPets[p]
  500. }
  501. break;
  502. default: break;
  503. }
  504. break;
  505. default: break;
  506. }
  507. }
  508. function ShowAllPlayers() {
  509. for (let i in HUsers) {
  510. ModifyUserAppearance(HUsers[i]);
  511. mod.toClient('S_SPAWN_USER', 15, HUsers[i]);
  512. delete HUsers[i];
  513. }
  514. }
  515. // ~~~ * Functions * ~~~ \\
  516. function ModifyUserAppearance(event) {
  517. let modified = false;
  518. if (mod.settings.ShowStyle) {
  519. event.weapon = [10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 80396, 55005, 82005, 58171, 59053][event.templateId % 100 - 1];
  520. event.body = event.hand = event.feet = event.underwear = event.head = event.face = 0;
  521. if (event.mount) event.mount = 16;
  522. event.title = 0;
  523. event.weaponDye = event.bodyDye = event.handDye = event.feetDye = event.weaponEnchant = 0;
  524. event.showFace = false;
  525. event.styleHead = event.styleFace = event.styleBack = event.styleWeapon = event.styleBody = 0;
  526. event.underwearDye = event.styleBackDye = event.styleHeadDye = event.styleFaceDye = 0;
  527. event.showStyle = false;
  528. event.styleFootprint = event.styleHeadScale = event.styleFaceScale = event.styleBackScale = 0;
  529. event.usedStyleHeadTransform = false;
  530. event.styleBodyDye = 0;
  531. event.icons = [];
  532. modified = true;
  533. }
  534. if (mod.settings.Hideguildlogos) {
  535. event.guildLogo = '';
  536. event.guildLogoId = 0;
  537. modified = true;
  538. }
  539. if (mod.settings.MuteOthersVoice) {
  540. event.appearance.voice = 249;
  541. modified = true;
  542. }
  543. return modified ? true : undefined;
  544. }
  545. function ModifyAbnormalities(event, end) {
  546. if (ImportantAbns.indexOf(event.id) !== -1) return undefined;
  547. if ([90442103, 90442107].indexOf(event.id) !== -1) {
  548. event.id = 47702000;
  549. return true;
  550. }
  551. if (!end) {
  552. if (EqGid(event.target)) {
  553. if (mod.settings.HideOwnBlacklistedAbns && mod.settings.OwnAbnormalsBlacklist.indexOf(event.id) !== -1) return false;
  554. return undefined;
  555. }
  556. if (HUsers[event.target] || HNpcs[event.target] || event.id === 9943049) return false;
  557. if (mod.settings.HideBlacklistedAbnormalities && (mod.settings.AbnormalitiesBlacklist.indexOf(event.id) !== -1 || BlockedAbns.indexOf(event.id) !== -1)) return false;
  558. if (mod.settings.HideAllAbnormalities && (SUsers[event.target] || mod.settings.AbnormalitiesBlacklist.indexOf(event.id) !== -1 || BlockedAbns.indexOf(event.id) !== -1)) return false;
  559. }
  560. }
  561. function ActionHCheck(event, end) {
  562. let hidden = false;
  563. if (EqGid(event.gameId) || !SUsers[event.gameId]) return undefined;
  564. if (mod.settings.Mode >= 2 || HUsers[event.gameId] || mod.settings.ClassesData[ClassID(event.templateId)].CD_HideBlacklistedSkills) hidden = true;
  565. if (mod.settings.HideBlacklistedSkills && mod.settings.ClassesData[ClassID(event.templateId)].CD_SkillsBlacklist.includes(Math.floor(event.skill.id / 10000).toString())) hidden = true;
  566. if (hidden) UpdateUserLoc(event);
  567. if (HNpcs[event.gameId]) {
  568. HNpcs[event.gameId].loc = event.loc;
  569. hidden = true;
  570. }
  571. return !end && hidden ? false : undefined;
  572. }
  573. function ProjectileBCheck(event) {
  574. let blocked = false;
  575. if ((mod.settings.Mode !== 3 && event.skill.id === 90120) || (mod.settings.PvpTraps && TrapsIds.includes(event.skill.id))) return undefined;
  576. if ((mod.settings.HideBlacklistedProjectiles || mod.settings.HideAllProjectiles) && mod.settings.ProjectilesBlacklist.includes(event.skill.id)) blocked = true;
  577. if (!EqGid(event.gameId) && SUsers[event.gameId] && (HUsers[event.gameId] || mod.settings.Mode >= 2 || mod.settings.HideAllProjectiles)) blocked = true;
  578. return blocked ? false : undefined;
  579. }
  580. function ModifySkillResult(event) {
  581. let modified = false;
  582. if (mod.settings.Hit_Me && (EqGid(event.source) || EqGid(event.owner))) {
  583. event.templateId = 0;
  584. event.skill.id = 0;
  585. event.time = event.type = event.noctEffect = 0;
  586. event.crit = event.stackExplode = event.superArmor = false;
  587. event.superArmorId = event.hitCylinderId = 0;
  588. modified = true;
  589. }
  590. if (mod.settings.Hit_Other && !EqGid(event.target) && !EqGid(event.source) && !EqGid(event.owner) && (SUsers[event.owner] || SUsers[event.source])) {
  591. event.templateId = 0;
  592. event.skill.id = 0;
  593. event.time = event.type = event.noctEffect = 0;
  594. event.crit = event.stackExplode = event.superArmor = false;
  595. event.superArmorId = event.hitCylinderId = 0;
  596. modified = true;
  597. }
  598. if (mod.settings.Hit_Damage && (EqGid(event.source) || EqGid(event.owner) || EqGid(event.target) || UserNPCs.includes(event.templateId) && event.skill.huntingZoneId === 1023)) {
  599. event.value = 0n;
  600. modified = true;
  601. }
  602. if (mod.settings.Hit_All) {
  603. event.templateId = 0;
  604. event.skill.id = 0;
  605. event.time = event.type = event.noctEffect = 0;
  606. event.value = 0n;
  607. event.crit = event.stackExplode = event.superArmor = false;
  608. event.superArmorId = event.hitCylinderId = 0;
  609. modified = true;
  610. }
  611. return modified ? true : undefined;
  612. }
  613. const UserBCheck = user => { for (const player of mod.settings.PlayersBlacklist) if (player.toLowerCase() === user.toLowerCase()) return true }
  614. function NpcBCheck(event) {
  615. let blocked = false;
  616. if (mod.settings.HideBlacklistedNpcs) {
  617. for (let i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
  618. if (event.huntingZoneId == mod.settings.NpcsBlacklist[i].zone && event.templateId == mod.settings.NpcsBlacklist[i].templateId) {
  619. HNpcs[event.gameId] = event;
  620. HNpcs[event.gameId].spawnType = 1;
  621. HNpcs[event.gameId].spawnScript = 0;
  622. blocked = true;
  623. break;
  624. }
  625. }
  626. }
  627. if (InvisibleNpcs[event.huntingZoneId] && InvisibleNpcs[event.huntingZoneId].includes(event.templateId)) {
  628. HNpcs[event.gameId] = event;
  629. blocked = true;
  630. }
  631. if (mod.settings.HideFireworks && event.huntingZoneId === 1023 && [60016000, 80037000].includes(event.templateId)) {
  632. HNpcs[event.gameId] = event;
  633. blocked = true;
  634. }
  635. if (UserNPCs.includes(event.templateId) && event.huntingZoneId === 1023) {
  636. if (EqGid(event.owner) && mod.settings.HideMySummons) {
  637. HNpcs[event.gameId] = event;
  638. HNpcs[event.gameId].spawnType = 1;
  639. HNpcs[event.gameId].spawnScript = 0;
  640. blocked = true;
  641. } else if (!EqGid(event.owner) && mod.settings.HideOthersSummons) {
  642. HNpcs[event.gameId] = event;
  643. HNpcs[event.gameId].spawnType = 1;
  644. HNpcs[event.gameId].spawnScript = 0;
  645. blocked = true;
  646. }
  647. }
  648. return blocked ? false : undefined;
  649. }
  650. function EqGid(xg) {
  651. return (xg === MyGameId);
  652. }
  653. function ClassID(m) {
  654. return (m % 100);
  655. }
  656. function log(name, type, from, target, id) {
  657. 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"`);
  658. }
  659. function UpdateUserLoc(event) {
  660. mod.toClient('S_USER_LOCATION', 5, { gameId: event.gameId, loc: event.loc, w: event.w, speed: 300, dest: event.loc, type: 7 });
  661. }
  662. // ~~~ * Hook Functions * ~~~ \\
  663. function sLogin(event) {
  664. LastState = event.name === MyName ? LastState : null;
  665. LastGState = null;
  666. MyGameId = event.gameId;
  667. MyName = event.name;
  668. ProjDebug = false;
  669. AbnDebug = false;
  670. if (mod.settings.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.");
  671. }
  672. function sLoadTopo() {
  673. SUsers = {};
  674. SNpcs = {};
  675. HUsers = {};
  676. HNpcs = {};
  677. AllowedAchUps = 2;
  678. if (ProjDebug) {
  679. ProjDebug = false
  680. Msg(`<font color="${HPkC}">Auto Disabled</font> projectile debug, to reduce the unneeded spam.`);
  681. }
  682. if (AbnDebug) {
  683. AbnDebug = false
  684. Msg(`<font color="${HPkC}">Auto Disabled</font> abnormalities debug, to reduce the unneeded spam.`);
  685. }
  686. }
  687. function sLeaveParty() {
  688. PMembers = []
  689. //if (mod.settings.OnlyParty) mod.command.exec('fps party')
  690. if (mod.settings.RaidAutoChange) {
  691. if (LastState === null || mod.settings.Mode !== 2) {
  692. LastState = null;
  693. return;
  694. }
  695. mod.command.exec(`fps mode ${LastState}`);
  696. LastState = null;
  697. }
  698. }
  699. function sMountVehicle(event) {
  700. if (EqGid(event.gameId)) return;
  701. SUsers[event.gameId].mount = event.id;
  702. if (HUsers[event.gameId]) HUsers[event.gameId].mount = event.id;
  703. if (mod.settings.ShowStyle) {
  704. event.id = 16;
  705. return true;
  706. }
  707. }
  708. function sUnmountVehicle(event) {
  709. if (EqGid(event.gameId)) return;
  710. SUsers[event.gameId].mount = 0;
  711. if (HUsers[event.gameId]) HUsers[event.gameId].mount = 0;
  712. }
  713. function cSetVisibleRange(event) {
  714. LastVrange = event.range
  715. }
  716. function sStartCooltimeItem(event) {
  717. if (event.cooldown === 0) return false;
  718. }
  719. function sStartActionScript(event) {
  720. if ([40000, 40001, 40002, 426002].includes(event.script)) return;
  721. if (mod.settings.ActionScripts) return false;
  722. }
  723. function sLoadingScreenControlInfo() {
  724. if (mod.settings.Mode >= 2) return false;
  725. }
  726. function sUpdateAchievementProgress(event) {
  727. if (AllowedAchUps) {
  728. AllowedAchUps--;
  729. return;
  730. }
  731. for (const Achieve of event.achievements) if (SpamAchIds.indexOf(Achieve.id) > -1 || !Achieve.requirements.length) return false;
  732. }
  733. function sItemCustomString(event) {
  734. if (event.customStrings.length === 0) return false;
  735. }
  736. function sSocial(event) {
  737. if (EqGid(event.target)) return;
  738. if (HUsers[event.target] || HNpcs[event.target]) return false;
  739. }
  740. function sGuildName(event) {
  741. if (mod.settings.Hideguildlogos) {
  742. event.guildLogo = '';
  743. return true;
  744. }
  745. }
  746. function sApplyTitle(event) {
  747. if (EqGid(event.gameId)) return;
  748. if (mod.settings.ShowStyle) return false;
  749. }
  750. function sImageData() {
  751. if (mod.settings.Hideguildlogos) return false;
  752. }
  753. function sSpawnUser(event) {
  754. SUsers[event.gameId] = event;
  755. SUsers[event.gameId].spawnFx = 1;
  756. if (mod.settings.Mode === 3 || UserBCheck(event.name) || mod.settings.ClassesData[ClassID(event.templateId)].isHidden || (mod.settings.OnlyParty && !PMembers.includes(event.name))) {
  757. HUsers[event.gameId] = event;
  758. HUsers[event.gameId].spawnFx = 1;
  759. return false;
  760. }
  761. return ModifyUserAppearance(event);
  762. }
  763. function sSpawnUserfn(event) {
  764. return ModifyUserAppearance(event);
  765. }
  766. function sDespawnUser(event) {
  767. delete HUsers[event.gameId];
  768. delete SUsers[event.gameId];
  769. }
  770. function sUserLocation(event) {
  771. if (SUsers[event.gameId]) {
  772. SUsers[event.gameId].loc = event.dest;
  773. SUsers[event.gameId].w = event.w;
  774. }
  775. if (HUsers[event.gameId]) {
  776. HUsers[event.gameId].loc = event.dest;
  777. HUsers[event.gameId].w = event.w;
  778. return false;
  779. }
  780. }
  781. function sUserStatus(event) {
  782. if (SUsers[event.gameId]) SUsers[event.gameId].status = event.status;
  783. if (HUsers[event.gameId]) {
  784. HUsers[event.gameId].status = event.status;
  785. return false;
  786. }
  787. }
  788. function sDeadLocation(event) {
  789. if (SUsers[event.gameId]) SUsers[event.gameId].loc = event.loc;
  790. if (HUsers[event.gameId]) HUsers[event.gameId].loc = event.loc;
  791. }
  792. function sUserMovetype(event) {
  793. if (SUsers[event.gameId]) SUsers[event.gameId].w = event.w
  794. if (HUsers[event.gameId]) {
  795. HUsers[event.gameId].w = event.w
  796. return false
  797. }
  798. }
  799. function sPartyMemberList(event) {
  800. event.members.map(value => PMembers.push(value.name))
  801. if (mod.settings.RaidAutoChange) {
  802. if (event.members.length >= 18) {
  803. if (mod.settings.Mode >= 2 || (LastState === null && mod.settings.Mode === 2)) return;
  804. LastState = mod.settings.Mode;
  805. mod.command.exec("fps state 2");
  806. } else {
  807. if (LastState === null || mod.settings.Mode !== 2) {
  808. LastState = null;
  809. return;
  810. }
  811. mod.command.exec(`fps state ${LastState}`);
  812. LastState = null;
  813. }
  814. }
  815. }
  816. function sUserAppearanceChange(event) {
  817. if (EqGid(event.id)) return;
  818. if (mod.settings.ShowStyle) return false;
  819. }
  820. function sUserExternalChange(event) {
  821. if (EqGid(event.gameId)) return;
  822. if (mod.settings.ShowStyle) return false;
  823. }
  824. function sUnicastTransformData(event) {
  825. if (EqGid(event.gameId) || !event.gameId) return;
  826. if (mod.settings.ShowStyle) return false;
  827. if (mod.settings.Hideguildlogos) {
  828. event.guildLogo = '';
  829. return true;
  830. }
  831. }
  832. function sSpawnNpc(event) {
  833. SNpcs[event.gameId] = event;
  834. SNpcs[event.gameId].spawnType = 1;
  835. SNpcs[event.gameId].spawnScript = 0;
  836. return NpcBCheck(event);
  837. }
  838. function sDespawnNpc(event) {
  839. delete HNpcs[event.gameId];
  840. delete SNpcs[event.gameId];
  841. if (!mod.settings.HideMonsterDeathAnimation || event.type !== 5) return;
  842. event.type = 1;
  843. return true;
  844. }
  845. function sNpcLocation(event) {
  846. if (SNpcs[event.gameId]) {
  847. SNpcs[event.gameId].loc = event.dest;
  848. SNpcs[event.gameId].w = event.w;
  849. }
  850. if (HNpcs[event.gameId]) {
  851. HNpcs[event.gameId].loc = event.dest;
  852. HNpcs[event.gameId].w = event.w;
  853. return false;
  854. }
  855. }
  856. function sCreatureLife(event) {
  857. if (SNpcs[event.gameId]) {
  858. SNpcs[event.gameId].loc = event.loc;
  859. SNpcs[event.gameId].alive = event.alive;
  860. }
  861. if (HNpcs[event.gameId]) {
  862. SNpcs[event.gameId].loc = event.loc;
  863. HNpcs[event.gameId].alive = event.alive;
  864. }
  865. }
  866. function sCreatureRotate(event) {
  867. if (SNpcs[event.gameId]) SNpcs[event.gameId].w = event.w;
  868. if (HNpcs[event.gameId]) {
  869. HNpcs[event.gameId].w = event.w;
  870. return false;
  871. }
  872. }
  873. function sFearMoveStage(event) {
  874. if ((!EqGid(event.gameId) && mod.settings.Mode === 3) || HUsers[event.gameId] || HNpcs[event.gameId]) return false;
  875. }
  876. function sFearMoveEnd(event) {
  877. if ((!EqGid(event.gameId) && mod.settings.Mode === 3) || HUsers[event.gameId] || HNpcs[event.gameId]) return false;
  878. }
  879. function sRequestSpawnServant(event) {
  880. SPets[event.gameId] = event;
  881. if (EqGid(event.ownerId) && mod.settings.HideMyServants) {
  882. HPets[event.gameId] = event;
  883. return false;
  884. } else if (!EqGid(event.ownerId) && mod.settings.HideOthersServants) {
  885. HPets[event.gameId] = event;
  886. return false;
  887. }
  888. }
  889. function sRequestDespawnServant(event) {
  890. delete HPets[event.gameId];
  891. delete SPets[event.gameId];
  892. }
  893. function sQuestBalloon(event) {
  894. if (!SPets[event.source]) return;
  895. if (mod.settings.HideServantBalloons) return false;
  896. }
  897. function sAbnormalityBegin(event) {
  898. if (AbnDebug) {
  899. if (EqGid(event.target)) log('Abnormality', 'Applied', 'on', MyName, event.id);
  900. if (EqGid(event.source)) log('Abnormality', 'Started', 'from', MyName, event.id);
  901. if (SUsers[event.target]) log('Abnormality', 'Applied', 'on', SUsers[event.target].name, event.id);
  902. if (SUsers[event.source]) log('Abnormality', 'Started', 'from', SUsers[event.source].name, event.id);
  903. }
  904. return ModifyAbnormalities(event);
  905. }
  906. function sAbnormalityRefresh(event) {
  907. return ModifyAbnormalities(event);
  908. }
  909. function sAbnormalityEnd(event) {
  910. return ModifyAbnormalities(event, true);
  911. }
  912. function sActionStage(event) {
  913. return ActionHCheck(event);
  914. }
  915. function sActionEnd(event) {
  916. return ActionHCheck(event, true);
  917. }
  918. function sStartUserProjectile(event) {
  919. if (ProjDebug) {
  920. if (EqGid(event.gameId)) log('Projectile', 'Started', 'from', MyName, event.skill.id);
  921. if (SUsers[event.gameId]) log('Projectile', 'Started', 'from', SUsers[event.gameId].name, event.skill.id);
  922. }
  923. return ProjectileBCheck(event);
  924. }
  925. function sSpawnProjectile(event) {
  926. if (event.skill.npc) return;
  927. if (ProjDebug) {
  928. if (EqGid(event.gameId)) log('Projectile', 'Spawned', 'from', MyName, event.skill.id);
  929. if (SUsers[event.gameId]) log('Projectile', 'Spawned', 'from', SUsers[event.gameId].name, event.skill.id);
  930. }
  931. return ProjectileBCheck(event);
  932. }
  933. function sPlayerChangeMp(event) {
  934. if (!mod.settings.HideMpNumbers || !EqGid(event.target)) return;
  935. if (event.type !== 0) {
  936. event.type = 0;
  937. return true;
  938. }
  939. }
  940. function sCreatureChangeHp(event) {
  941. if (!mod.settings.HideHpNumbers || !EqGid(event.target)) return;
  942. if (event.type !== 10) {
  943. event.type = 10;
  944. return true;
  945. }
  946. }
  947. function sEachSkillResult(event) {
  948. return ModifySkillResult(event);
  949. }
  950. function sItemExplosionResult(event) {
  951. if (mod.settings.Mode >= 2 || (EqGid(event.gameId) && mod.settings.Hit_Me) || (!EqGid(event.gameId) && mod.settings.Hit_Other) || mod.settings.Hit_All || HUsers[event.gameId]) {
  952. for (const gameId of event.items) {
  953. if (SUsers[event.gameId] && mod.settings.HideBlacklistedDrop && mod.settings.DropBlacklist.some(item => [8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015, 8016, 8017, 8018, 8019, 8020, 8021, 8022, 8023].indexOf(item) !== -1)) continue;
  954. mod.toClient('S_DESPAWN_DROPITEM', 4, { gameId });
  955. }
  956. return false
  957. }
  958. }
  959. function sSpawnDropItem(event) {
  960. if (EqGid(event.source)) return;
  961. if (mod.settings.HideBlacklistedDrop && mod.settings.DropBlacklist.indexOf(event.item) !== -1) return false;
  962. if (mod.settings.Mode >= 2) {
  963. event.explode = 0;
  964. return true;
  965. }
  966. }
  967. function sFontSwapInfo() {
  968. if (mod.settings.Hit_Damage || mod.settings.Hit_All) return false;
  969. }
  970. function sSpawnEventSeed(event) {
  971. if (HUsers[NotCP ? event.gameId : event.owner]) {
  972. HSeedBoxes[NotCP ? event.target : event.gameId] = event;
  973. return false;
  974. }
  975. }
  976. function sUpdateEventSeedState(event) {
  977. if (HSeedBoxes[event.gameId]) return false;
  978. }
  979. function sResultEventSeed(event) {
  980. if (HSeedBoxes[NotCP ? event.cid : event.gameId]) return false;
  981. }
  982. function sDespawnEventSeed(event) {
  983. if (HSeedBoxes[event.gameId]) {
  984. delete HSeedBoxes[event.gameId];
  985. return false;
  986. }
  987. }
  988. function sFieldEventOnEnter() {
  989. if (mod.settings.GuardianAutoChange) {
  990. if ((LastGState !== null && mod.settings.Mode === 2) || mod.settings.Mode >= 2) return;
  991. LastGState = mod.settings.Mode;
  992. mod.command.exec("fps state 2")
  993. }
  994. }
  995. function sFieldEventOnLeave() {
  996. if (mod.settings.GuardianAutoChange) {
  997. if (LastGState === null || mod.settings.Mode !== 2) {
  998. LastGState = null;
  999. return;
  1000. }
  1001. mod.command.exec(`fps state ${LastGState}`);
  1002. LastGState = null;
  1003. }
  1004. }
  1005. // ~~~ * Packet Hooks * ~~~ \\
  1006. mod.hook('S_LOGIN', 14, sLogin)
  1007. mod.hook('S_LOAD_TOPO', 'raw', sLoadTopo)
  1008. mod.hook('S_LEAVE_PARTY', 'raw', sLeaveParty)
  1009. mod.hook('S_MOUNT_VEHICLE', 2, Last_Hook, sMountVehicle)
  1010. mod.hook('S_UNMOUNT_VEHICLE', 2, Last_Hook, sUnmountVehicle)
  1011. mod.hook('C_SET_VISIBLE_RANGE', 1, cSetVisibleRange)
  1012. mod.hook('S_START_COOLTIME_ITEM', 1, Last_Hook, sStartCooltimeItem)
  1013. mod.hook('S_START_ACTION_SCRIPT', 3, Last_Hook, sStartActionScript)
  1014. mod.hook('S_LOADING_SCREEN_CONTROL_INFO', 'raw', Last_Hook, sLoadingScreenControlInfo)
  1015. mod.hook('S_UPDATE_ACHIEVEMENT_PROGRESS', 1, Last_Hookfn, sUpdateAchievementProgress)
  1016. mod.hook('S_ITEM_CUSTOM_STRING', 2, Last_Hook, sItemCustomString)
  1017. mod.hook('S_SOCIAL', 1, Last_Hook, sSocial)
  1018. mod.hook('S_GUILD_NAME', 2, Last_Hook, sGuildName)
  1019. mod.hook('S_APPLY_TITLE', 3, Last_Hook, sApplyTitle)
  1020. mod.hook('S_IMAGE_DATA', 'raw', Last_Hook, sImageData)
  1021. mod.hook('S_SPAWN_USER', 15, Last_Hook, sSpawnUser)
  1022. mod.hook('S_SPAWN_USER', 15, Last_Hookfn, sSpawnUserfn)
  1023. mod.hook('S_DESPAWN_USER', 3, sDespawnUser)
  1024. mod.hook('S_USER_LOCATION', 5, Last_Hook, sUserLocation)
  1025. mod.hook('S_USER_STATUS', 3, Last_Hook, sUserStatus)
  1026. mod.hook('S_DEAD_LOCATION', 2, sDeadLocation)
  1027. mod.hook('S_USER_MOVETYPE', 1, Last_Hook, sUserMovetype)
  1028. mod.hook('S_PARTY_MEMBER_LIST', 7, sPartyMemberList)
  1029. mod.hook('S_USER_APPEARANCE_CHANGE', 1, Last_Hook, sUserAppearanceChange)
  1030. mod.hook('S_USER_EXTERNAL_CHANGE', 7, Last_Hook, sUserExternalChange)
  1031. mod.hook('S_UNICAST_TRANSFORM_DATA', 6, Last_Hook, sUnicastTransformData)
  1032. mod.hook('S_SPAWN_NPC', 11, Last_Hook, sSpawnNpc)
  1033. mod.hook('S_DESPAWN_NPC', 3, Last_Hook, sDespawnNpc)
  1034. mod.hook('S_NPC_LOCATION', 3, Last_Hook, sNpcLocation)
  1035. mod.hook('S_CREATURE_LIFE', 3, sCreatureLife)
  1036. mod.hook('S_CREATURE_ROTATE', 2, Last_Hook, sCreatureRotate)
  1037. mod.hook('S_FEARMOVE_STAGE', 2, Last_Hook, sFearMoveStage)
  1038. mod.hook('S_FEARMOVE_END', 2, Last_Hook, sFearMoveEnd)
  1039. mod.hook('S_REQUEST_SPAWN_SERVANT', 4, Last_Hook, sRequestSpawnServant)
  1040. mod.hook('S_REQUEST_DESPAWN_SERVANT', 1, Last_Hook, sRequestDespawnServant)
  1041. mod.hook('S_QUEST_BALLOON', 1, Last_Hook, sQuestBalloon)
  1042. mod.hook('S_ABNORMALITY_BEGIN', 3, Last_Hook, sAbnormalityBegin)
  1043. mod.hook('S_ABNORMALITY_REFRESH', 1, Last_Hook, sAbnormalityRefresh)
  1044. mod.hook('S_ABNORMALITY_END', 1, Last_Hook, sAbnormalityEnd)
  1045. mod.hook('S_ACTION_STAGE', 9, Last_Hook, sActionStage)
  1046. mod.hook('S_ACTION_END', 5, Last_Hook, sActionEnd)
  1047. mod.hook('S_SPAWN_PROJECTILE', 5, Last_Hook, sSpawnProjectile)
  1048. mod.hook('S_START_USER_PROJECTILE', 9, Last_Hook, sStartUserProjectile)
  1049. mod.hook('S_PLAYER_CHANGE_MP', 1, Last_Hook, sPlayerChangeMp)
  1050. mod.hook('S_CREATURE_CHANGE_HP', 6, Last_Hook, sCreatureChangeHp)
  1051. mod.hook('S_ITEM_EXPLOSION_RESULT', 2, Last_Hook, sItemExplosionResult)
  1052. mod.hook('S_EACH_SKILL_RESULT', 14, Last_Hook, sEachSkillResult)
  1053. mod.hook('S_SPAWN_DROPITEM', 8, Last_Hook, sSpawnDropItem)
  1054. mod.hook('S_FONT_SWAP_INFO', 'raw', Last_Hookfn, sFontSwapInfo)
  1055. mod.hook('S_SPAWN_EVENT_SEED', NotCP ? 1 : 2, Last_Hookfn, sSpawnEventSeed)
  1056. mod.hook('S_UPDATE_EVENT_SEED_STATE', 3, Last_Hookfn, sUpdateEventSeedState)
  1057. mod.hook('S_RESULT_EVENT_SEED', NotCP ? 1 : 2, Last_Hookfn, sResultEventSeed)
  1058. mod.hook('S_DESPAWN_EVENT_SEED', 1, Last_Hookfn, sDespawnEventSeed)
  1059. mod.hook('S_FIELD_EVENT_ON_ENTER', 'raw', sFieldEventOnEnter)
  1060. mod.hook('S_FIELD_EVENT_ON_LEAVE', 'raw', sFieldEventOnLeave)
  1061. // ~~~ * Commands * ~~~ \\
  1062. mod.command.add('0', () => mod.command.exec('fps mode 0'))
  1063. mod.command.add('1', () => mod.command.exec('fps mode 1'))
  1064. mod.command.add('2', () => mod.command.exec('fps mode 2'))
  1065. mod.command.add('3', () => mod.command.exec('fps mode 3'))
  1066. mod.command.add(['fps', '!fps', 'fps-utils', '!fps-utils'], (key, arg, arg2, arg3) => {
  1067. key = key ? key.toLowerCase() : key;
  1068. arg = arg ? arg.toLowerCase() : arg;
  1069. arg2 = arg2 ? arg2.toLowerCase() : arg2;
  1070. arg3 = arg3 ? arg3.toLowerCase() : arg3;
  1071. switch (key) {
  1072. case "b":
  1073. mod.command.exec('fps skills blacklist');
  1074. break;
  1075. case "g": case "gui":
  1076. GuiHandler(arg, arg2);
  1077. break;
  1078. case "0":
  1079. mod.command.exec('fps mode 0');
  1080. break;
  1081. case "1":
  1082. mod.command.exec('fps mode 1');
  1083. break;
  1084. case "2":
  1085. mod.command.exec('fps mode 2')
  1086. break;
  1087. case "3":
  1088. mod.command.exec('fps mode 3');
  1089. break;
  1090. case "mod": case "mode": case "state":
  1091. switch (arg) {
  1092. case "0": case "off": case "zero":
  1093. if (mod.settings.Mode === 3) ShowAllPlayers();
  1094. mod.settings.Mode = 0;
  1095. mod.settings.HideAllAbnormalities = false;
  1096. mod.settings.HideAllProjectiles = false;
  1097. if (!mod.settings.Hit_All) mod.settings.Hit_Other = false;
  1098. Msg(`<font color="${RedC}">Mode 0</font>.`);
  1099. break;
  1100. case "1": case "one":
  1101. if (mod.settings.Mode === 3) ShowAllPlayers();
  1102. mod.settings.Mode = 1;
  1103. mod.settings.HideAllAbnormalities = false;
  1104. mod.settings.HideAllProjectiles = true;
  1105. if (!mod.settings.Hit_All) mod.settings.Hit_Other = true;
  1106. Msg(`<font color="${BnzC}">Mode 1</font>.`);
  1107. break;
  1108. case "2": case "two":
  1109. if (mod.settings.Mode === 3) ShowAllPlayers();
  1110. mod.settings.Mode = 2;
  1111. mod.settings.HideAllAbnormalities = true;
  1112. mod.settings.HideAllProjectiles = true;
  1113. if (!mod.settings.Hit_All) mod.settings.Hit_Other = true;
  1114. Msg(`<font color="${SlvC}">Mode 2</font>.`);
  1115. break;
  1116. case "3": case "three":
  1117. HideAllPlayers();
  1118. mod.settings.Mode = 3;
  1119. mod.settings.HideAllAbnormalities = true;
  1120. mod.settings.HideAllProjectiles = true;
  1121. if (!mod.settings.Hit_All) mod.settings.Hit_Other = true;
  1122. mod.settings.OnlyParty = false;
  1123. Msg(`<font color="${GldC}">Mode 3</font>.`);
  1124. break;
  1125. default:
  1126. Msg(`<font color="${GryC}">Invalid" ${arg}"</font>.`);
  1127. Msg(`Modes: "<font color="${PnkC}">[0, 1, 2, 3]</font>.`);
  1128. break;
  1129. }
  1130. break;
  1131. case "hide":
  1132. if (typeof arg === "string" && arg !== null) {
  1133. if (mod.settings.PlayersBlacklist.includes(arg)) return Msg(`Player '${arg}' <font color="${RedC}">Already hidden</font>.`);
  1134. else
  1135. if ((GameJobs.includes(arg) && !mod.settings.ClassesBlacklist.includes(arg)) || (GameRoles.includes(arg) && !mod.settings.RolesBlacklist.includes(arg))) {
  1136. for (let i in mod.settings.ClassesData) {
  1137. if ((mod.settings.ClassesData[i].name === arg || mod.settings.ClassesData[i].role.includes(arg)) && mod.settings.ClassesData[i].isHidden !== true) {
  1138. mod.settings.ClassesData[i].isHidden = true;
  1139. if (mod.settings.ClassesData[i].name === arg) mod.settings.ClassesBlacklist.push(arg);
  1140. if (mod.settings.ClassesData[i].role.includes(arg)) mod.settings.RolesBlacklist.push(arg);
  1141. let classtohide = mod.settings.ClassesData[i].model;
  1142. for (let i in SUsers) { if (ClassID(SUsers[i].templateId) === classtohide) HideSpecificPlayerByName(SUsers[i].name); }
  1143. }
  1144. }
  1145. Msg(`Class/Role ${arg} <font color="${GrnC}">Hidden</font>.`);
  1146. return;
  1147. } else if (mod.settings.ClassesBlacklist.includes(arg) || mod.settings.RolesBlacklist.includes(arg)) return Msg(`Class/Role '${arg}' <font color="${RedC}">Already hidden</font>.`);
  1148. Msg(`Player '${arg}' <font color="${GrnC}">Hidden</font>.`);
  1149. mod.settings.PlayersBlacklist.push(arg);
  1150. HideSpecificPlayerByName(arg);
  1151. } else Msg(`<font color="${GryC}">Invalid ${arg2}</font>.`);
  1152. break;
  1153. case "show":
  1154. if (typeof arg === "string" && arg !== null) {
  1155. if (mod.settings.PlayersBlacklist.includes(arg)) {
  1156. ShowSpecificPlayerByName(arg);
  1157. RemoveEntity(mod.settings.PlayersBlacklist, arg);
  1158. Msg(`Player '${arg}' <font color="${RedC}">Shown</font>.`);
  1159. return;
  1160. }
  1161. if ((GameJobs.includes(arg) && mod.settings.ClassesBlacklist.includes(arg)) || (mod.settings.RolesBlacklist.includes(arg) && GameRoles.includes(arg))) {
  1162. for (let i in mod.settings.ClassesData) {
  1163. if (mod.settings.ClassesData[i].name === arg || mod.settings.ClassesData[i].role.includes(arg)) {
  1164. if (mod.settings.ClassesData[i].name === arg) RemoveEntity(mod.settings.ClassesBlacklist, arg);
  1165. if (mod.settings.ClassesData[i].role.includes(arg)) RemoveEntity(mod.settings.RolesBlacklist, arg);
  1166. mod.settings.ClassesData[i].isHidden = false;
  1167. let classToShow = mod.settings.ClassesData[i].model;
  1168. for (let i in HUsers) {
  1169. if (ClassID(HUsers[i].templateId) === classToShow) ShowSpecificPlayerByName(HUsers[i].name);
  1170. }
  1171. }
  1172. }
  1173. Msg(`Class '${arg}' <font color="${RedC}">Shown</font>.`);
  1174. } else if (!mod.settings.ClassesBlacklist.includes(arg) || !mod.settings.RolesBlacklist.includes(arg)) Msg(`Class/Role '${arg}' <font color="${RedC}">Already shown</font>.`);
  1175. else if (!mod.settings.PlayersBlacklist.includes(arg)) Msg(`Player '${arg}' <font color="${RedC}">Already shown</font>.`);
  1176. else Msg(`<font color="${GryC}">Invalid ${arg2}</font>.`);
  1177. }
  1178. break;
  1179. case "party":
  1180. if (mod.settings.Mode === 3) return Msg(`<font color="${RedC}">You've to disable mode 3 first</font>.`);
  1181. //if(!PMembers.length) return Msg(`<font color="${GryC}">You must be in party in-order to enable this</font>.`)
  1182. mod.settings.OnlyParty = !mod.settings.OnlyParty;
  1183. if (mod.settings.OnlyParty) {
  1184. for (let i in SUsers) {
  1185. if (!PMembers.includes(SUsers[i].name)) {
  1186. mod.toClient('S_DESPAWN_USER', 3, { gameId: SUsers[i].gameId, type: 1 })
  1187. HUsers[SUsers[i].gameId] = SUsers[i];
  1188. }
  1189. }
  1190. } else ShowAllPlayers();
  1191. Msg(`Everyone but party ${mod.settings.OnlyParty ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1192. break;
  1193. case "raid":
  1194. mod.settings.RaidAutoChange = !mod.settings.RaidAutoChange;
  1195. Msg(`Raid auto-state ${mod.settings.RaidAutoChange ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);
  1196. if (!mod.settings.GuardianAutoChange) LastState = null;
  1197. break;
  1198. case "guardian":
  1199. mod.settings.GuardianAutoChange = !mod.settings.GuardianAutoChange;
  1200. Msg(`Guardian auto-state ${mod.settings.GuardianAutoChange ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);
  1201. if (!mod.settings.GuardianAutoChange) LastGState = null;
  1202. break;
  1203. case "pvptraps":
  1204. mod.settings.PvpTraps = !mod.settings.PvpTraps;
  1205. Msg(`Pvp Traps are ${mod.settings.PvpTraps ? `<font color="${GrnC}">Shown<font color="${PnkC}">(not affected by hide all projectiles)</font></font>` : `<font color="${RedC}">Normal<font color="${PnkC}">(affected by hide all projectiles)</font></font>`}.`);
  1206. break;
  1207. case "list":
  1208. Msg(`<font color="${PnkC}">Hidden players: ${mod.settings.PlayersBlacklist.length ? mod.settings.PlayersBlacklist : 0}</font>.`);
  1209. Msg(`<font color="${PnkC}">Hidden classes: ${mod.settings.ClassesBlacklist.length ? mod.settings.ClassesBlacklist : 0}</font>.`);
  1210. Msg(`<font color="${PnkC}">Hidden roles: ${mod.settings.RolesBlacklist.length ? mod.settings.RolesBlacklist : 0}</font>.`);
  1211. break;
  1212. case "summons": case "sums":
  1213. switch (arg) {
  1214. case "me":
  1215. mod.settings.HideMySummons = !mod.settings.HideMySummons;
  1216. mod.settings.HideMySummons ? HideNpcs('own') : ShowNpcs('own');
  1217. Msg(`Own summoned NPCs are ${mod.settings.HideMySummons ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1218. break;
  1219. default:
  1220. mod.settings.HideOthersSummons = !mod.settings.HideOthersSummons;
  1221. mod.settings.HideOthersSummons ? HideNpcs('others') : ShowNpcs('others');
  1222. Msg(`Others summoned NPCs are ${mod.settings.HideOthersSummons ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1223. break;
  1224. }
  1225. break;
  1226. case "skills": case "skill":
  1227. switch (arg) {
  1228. case "blacklist":
  1229. mod.settings.HideBlacklistedSkills = !mod.settings.HideBlacklistedSkills;
  1230. Msg(`Blacklisted skills ${mod.settings.HideBlacklistedSkills ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1231. break;
  1232. case "class":
  1233. if (GameJobs.includes(arg2)) {
  1234. for (let i in mod.settings.ClassesData) {
  1235. if (mod.settings.ClassesData[i].name === arg2) {
  1236. if (arg3 != null && !isNaN(arg3) && arg3 < 50) {
  1237. if (mod.settings.ClassesData[i].CD_SkillsBlacklist.includes(arg3)) {
  1238. let index = mod.settings.ClassesData[i].CD_SkillsBlacklist.indexOf(arg3);
  1239. if (index !== -1) {
  1240. mod.settings.ClassesData[i].CD_SkillsBlacklist.splice(index, 1);
  1241. Msg(`Skill ID '${arg3}' <font color="${RedC}">Shown</font> for class '${arg2}'.`);
  1242. }
  1243. return;
  1244. } else {
  1245. mod.settings.ClassesData[i].CD_SkillsBlacklist.push(arg3);
  1246. Msg(`Skill ID '${arg3}' <font color="${GrnC}">Hidden</font> for class '${arg2}'.`);
  1247. return;
  1248. }
  1249. } else {
  1250. mod.settings.ClassesData[i].CD_HideBlacklistedSkills = !mod.settings.ClassesData[i].CD_HideBlacklistedSkills;
  1251. Msg(`Skills for '${arg2}' class ${mod.settings.ClassesData[i].CD_HideBlacklistedSkills ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1252. return;
  1253. }
  1254. }
  1255. }
  1256. } else Msg(`<font color="${RedC}">Class ${arg2} not found</font>.`);
  1257. break;
  1258. }
  1259. break;
  1260. case "npcs": case "npc":
  1261. if (arg === 'hide') {
  1262. if (!arg2 || !arg3) {
  1263. mod.settings.HideBlacklistedNpcs = !mod.settings.HideBlacklistedNpcs;
  1264. Msg(`Blacklisted NPCs ${mod.settings.HideBlacklistedNpcs ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1265. break;
  1266. }
  1267. const found = mod.settings.NpcsBlacklist.some(s => s.zone === arg2 && s.templateId === arg3);
  1268. if (found) {
  1269. if (mod.settings.HideBlacklistedNpcs) ShowSpecificNpc(Number(arg2), Number(arg3));
  1270. Msg(`NPC HntZone '${arg2}', TmpId '${arg3}' <font color="${RedC}">Removed from the blacklist</font>.`);
  1271. mod.settings.NpcsBlacklist = mod.settings.NpcsBlacklist.filter(obj => obj.zone != arg2 || obj.templateId != arg3);
  1272. } else {
  1273. if (mod.settings.HideBlacklistedNpcs) HideSpecificNpc(Number(arg2), Number(arg3));
  1274. Msg(`NPC HntZone '${arg2}', TmpId '${arg3}' <font color="${GrnC}">Added to the blacklist</font>.`);
  1275. mod.settings.NpcsBlacklist.push({ zone: arg2, templateId: arg3 });
  1276. }
  1277. return;
  1278. } else {
  1279. mod.settings.HideBlacklistedNpcs = !mod.settings.HideBlacklistedNpcs;
  1280. mod.settings.HideBlacklistedNpcs ? HideNpcs('bl') : ShowNpcs('bl');
  1281. Msg(`Blacklisted NPCs ${mod.settings.HideBlacklistedNpcs ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1282. }
  1283. break;
  1284. case "hit":
  1285. switch (arg) {
  1286. case "me":
  1287. if (mod.settings.Hit_All) return Msg(`<font color="${RedC}">You've to disable hit ALL first</font>.`);
  1288. mod.settings.Hit_Me = !mod.settings.Hit_Me;
  1289. Msg(`Own hits effect ${mod.settings.Hit_Me ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1290. break;
  1291. case "other":
  1292. if (mod.settings.Hit_All) return Msg(`<font color="${RedC}">You've to disable hit ALL first</font>.`);
  1293. mod.settings.Hit_Other = !mod.settings.Hit_Other;
  1294. Msg(`Players hit effect ${mod.settings.Hit_Other ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1295. break;
  1296. case "damage":
  1297. if (mod.settings.Hit_All) return Msg(`<font color="${RedC}">You've to disable hit ALL first</font>.`);
  1298. mod.settings.Hit_Damage = !mod.settings.Hit_Damage;
  1299. Msg(`Damage numbers ${mod.settings.Hit_Damage ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1300. break;
  1301. case "all":
  1302. mod.settings.Hit_Me = mod.settings.Hit_Other = mod.settings.Hit_Damage = false;
  1303. mod.settings.Hit_All = !mod.settings.Hit_All;
  1304. Msg(`Hit all ${mod.settings.Hit_All ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1305. break;
  1306. default:
  1307. Msg(`<font color="${GryC}">Invalid &#40;hit&#41; '${arg}'</font>.`);
  1308. break;
  1309. }
  1310. break;
  1311. case "fireworks": case "firework":
  1312. mod.settings.HideFireworks = !mod.settings.HideFireworks;
  1313. Msg(`Fireworks ${mod.settings.HideFireworks ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1314. break;
  1315. case "abn": case "effects": case "abnormal": case "abnormalities":
  1316. switch (arg) {
  1317. case "all":
  1318. mod.settings.HideAllAbnormalities = !mod.settings.HideAllAbnormalities;
  1319. Msg(`All Abnormalities ${mod.settings.HideAllAbnormalities ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1320. break;
  1321. case "blacklist":
  1322. if (!arg2 || !arg3) {
  1323. mod.settings.HideBlacklistedAbnormalities = !mod.settings.HideBlacklistedAbnormalities;
  1324. Msg(`Blacklisted Abnormalities ${mod.settings.HideBlacklistedAbnormalities ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1325. break;
  1326. } else if (arg2 && arg3) {
  1327. arg3 = Number(arg3);
  1328. if (!mod.settings.AbnormalitiesBlacklist.includes(arg3)) {
  1329. if (arg2 === 'add') {
  1330. mod.settings.AbnormalitiesBlacklist.push(arg3);
  1331. Msg(`Blacklisted Abnormalities <font color="${GrnC}">added '${arg3}'</font>.`);
  1332. return;
  1333. } else if (arg2 === 'remv') return Msg(`Blacklisted Abnormalities <font color="${RedC}">can't remove '${arg3}' as it's not there</font>.`);
  1334. } else if (mod.settings.AbnormalitiesBlacklist.includes(arg3)) {
  1335. if (arg2 === 'add') return Msg(`Blacklisted Abnormalities <font color="${RedC}">can't add '${arg3}' as it's already there</font>.`);
  1336. else if (arg2 === 'remv') {
  1337. let index = mod.settings.AbnormalitiesBlacklist.indexOf(arg3);
  1338. if (index !== -1) {
  1339. mod.settings.AbnormalitiesBlacklist.splice(index, 1);
  1340. Msg(`Blacklisted Abnormalities <font color="${RedC}">removed '${arg3}'</font>.`);
  1341. return;
  1342. }
  1343. }
  1344. } else return Msg(`<font color="${GryC}">Invalid &#40;abnormalities Blacklist&#41; '${arg}'</font>.`);
  1345. }
  1346. break;
  1347. case "log":
  1348. case "debug":
  1349. AbnDebug = !AbnDebug;
  1350. if (AbnDebug) Msg(`Abnormalities debug <font color="${GrnC}">started</font>, check your proxy console for details.`)
  1351. else Msg(`Abnormalities debug <font color="${RedC}">stopped</font>.`);
  1352. break;
  1353. default:
  1354. Msg(`<font color="${GryC}">Invalid &#40;abnormalities&#41; '${arg}'</font>.`);
  1355. break;
  1356. }
  1357. break;
  1358. case "guildlogo":
  1359. if (SwitchCd) return Msg(`<font color="${PnkC}">Try again in 3 seconds</font>.`);
  1360. mod.settings.Hideguildlogos = !mod.settings.Hideguildlogos;
  1361. mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: 0 });
  1362. setTimeout(() => mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
  1363. SwitchCd = true;
  1364. setTimeout(() => SwitchCd = false, 2800);
  1365. Msg(`Guild Logos ${mod.settings.Hideguildlogos ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1366. break;
  1367. case "costume": case "style":
  1368. if (SwitchCd) return Msg(`<font color="${PnkC}">Try again in 3 seconds</font>.`);
  1369. mod.settings.ShowStyle = !mod.settings.ShowStyle;
  1370. mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: 0 });
  1371. setTimeout(() => mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
  1372. SwitchCd = true;
  1373. setTimeout(() => SwitchCd = false, 2800);
  1374. Msg(`Style of NPCs & others ${mod.settings.ShowStyle ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1375. break;
  1376. case "proj": case "projectile":
  1377. switch (arg) {
  1378. case "all":
  1379. mod.settings.HideAllProjectiles = !mod.settings.HideAllProjectiles;
  1380. Msg(`Projectiles ${mod.settings.HideAllProjectiles ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1381. break;
  1382. case "blacklist":
  1383. if (!arg2 || !arg3) {
  1384. mod.settings.HideBlacklistedProjectiles = !mod.settings.HideBlacklistedProjectiles;
  1385. Msg(`Blacklisted projectile ${mod.settings.HideBlacklistedProjectiles ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1386. break;
  1387. } else if (arg2 && arg3) {
  1388. arg3 = Number(arg3);
  1389. if (!mod.settings.ProjectilesBlacklist.includes(arg3)) {
  1390. if (arg2 === 'add') {
  1391. mod.settings.ProjectilesBlacklist.push(arg3);
  1392. Msg(`Blacklisted projectile <font color="${GrnC}">added '${arg3}'</font>.`);
  1393. return;
  1394. } else if (arg2 === 'remv') return Msg(`Blacklisted projectile <font color="${RedC}">can't remove '${arg3}' as it's not there</font>.`);
  1395. } else if (mod.settings.ProjectilesBlacklist.includes(arg3)) {
  1396. if (arg2 === 'add') return Msg(`Blacklisted projectile <font color="${RedC}">can't add '${arg3}' as it's already there</font>.`);
  1397. else if (arg2 === 'remv') {
  1398. let index = mod.settings.ProjectilesBlacklist.indexOf(arg3);
  1399. if (index !== -1) {
  1400. mod.settings.ProjectilesBlacklist.splice(index, 1);
  1401. Msg(`Blacklisted projectile <font color="${RedC}">removed '${arg3}'</font>.`);
  1402. return;
  1403. }
  1404. }
  1405. } else return Msg(`<font color="${GryC}">Invalid &#40;projectile Blacklist&#41; '${arg}'</font>.`);
  1406. }
  1407. break;
  1408. case "log": case "debug":
  1409. ProjDebug = !ProjDebug;
  1410. if (ProjDebug) Msg(`Projectile debug <font color="${GrnC}">started</font>, check your proxy console for details.`);
  1411. else Msg(`Projectile debug <font color="${RedC}">stopped</font>.`);
  1412. break;
  1413. default:
  1414. Msg(`<font color="${GryC}">Invalid &#40;projectile&#41; '${arg}'</font>.`);
  1415. break;
  1416. }
  1417. break;
  1418. case "quicklink":
  1419. switch (arg) {
  1420. case "mail": case "parcel":
  1421. mod.toServer('C_REQUEST_CONTRACT', 1, { type: 8 });
  1422. break;
  1423. case "talent": case "talents":
  1424. mod.toServer('C_REQUEST_CONTRACT', 1, { type: 78 });
  1425. break;
  1426. case "broker":
  1427. mod.toClient('S_NPC_MENU_SELECT', 1, { type: 28 });
  1428. break;
  1429. case "dress": case "dressingroom":
  1430. mod.toServer('C_REQUEST_CONTRACT', 1, { type: 77 });
  1431. break;
  1432. case "hat": case "hatrestyle":
  1433. mod.toServer('C_REQUEST_CONTRACT', 1, { type: 91 });
  1434. break;
  1435. case "lobby":
  1436. mod.toServer('C_RETURN_TO_LOBBY', 1);
  1437. break;
  1438. case "exit": case "instantexit":
  1439. mod.toClient('S_EXIT', 3, { category: 0, code: 0 });
  1440. break;
  1441. case "drop":
  1442. mod.toServer('C_LEAVE_PARTY', 1);
  1443. break;
  1444. case "disband":
  1445. mod.toServer('C_DISMISS_PARTY', 1);
  1446. break;
  1447. case "reset":
  1448. mod.toServer('C_RESET_ALL_DUNGEON', 1);
  1449. break;
  1450. default:
  1451. Msg(`<font color="${GryC}">Invalid &#40;quicklink&#41; '${arg}'</font>.`);
  1452. break;
  1453. }
  1454. break;
  1455. case "npczoom":
  1456. mod.settings.ActionScripts = !mod.settings.ActionScripts;
  1457. Msg(`Npc zoom-ins ${mod.settings.ActionScripts ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1458. break;
  1459. case "dropitem":
  1460. if (arg === 'hide') {
  1461. if (!arg2) {
  1462. mod.settings.HideBlacklistedDrop = !mod.settings.HideBlacklistedDrop;
  1463. Msg(`Blacklisted Drops ${mod.settings.HideBlacklistedDrop ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1464. break;
  1465. }
  1466. arg2 = Number(arg2);
  1467. const found1 = mod.settings.DropBlacklist.some(s => s === arg2);
  1468. if (found1) {
  1469. Msg(`Drops id '${arg2}' <font color="${RedC}">Removed from the blacklist</font>.`);
  1470. mod.settings.DropBlacklist = mod.settings.DropBlacklist.filter(obj => obj != arg2);
  1471. } else {
  1472. Msg(`Drops id '${arg2}' <font color="${GrnC}">Added to the blacklist</font>.`);
  1473. mod.settings.DropBlacklist.push(arg2);
  1474. }
  1475. return;
  1476. } else mod.settings.HideBlacklistedDrop = !mod.settings.HideBlacklistedDrop;
  1477. Msg(`Blacklisted Drops ${mod.settings.HideBlacklistedDrop ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1478. break;
  1479. case "monsterdeathani": case "monstersdeathani":
  1480. mod.settings.HideMonsterDeathAnimation = !mod.settings.HideMonsterDeathAnimation;
  1481. Msg(`Monsters Death Animation is ${mod.settings.HideMonsterDeathAnimation ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1482. break;
  1483. case "screenabns":
  1484. if (arg === 'hide') {
  1485. if (!arg2) {
  1486. mod.settings.HideOwnBlacklistedAbns = !mod.settings.HideOwnBlacklistedAbns;
  1487. Msg(`Blacklisted ScreenAbns ${mod.settings.OwnAbnormalsBlacklist ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1488. break;
  1489. }
  1490. arg2 = Number(arg2);
  1491. const found2 = mod.settings.OwnAbnormalsBlacklist.some(m => m === arg2);
  1492. if (found2) {
  1493. Msg(`Abnormal id '${arg2}' <font color="${RedC}">Removed from the blacklist</font>.`);
  1494. mod.settings.OwnAbnormalsBlacklist = mod.settings.OwnAbnormalsBlacklist.filter(obj => obj != arg2);
  1495. } else {
  1496. Msg(`Abnormal id '${arg2}' <font color="${GrnC}">Added to the blacklist</font>.`);
  1497. mod.settings.OwnAbnormalsBlacklist.push(arg2);
  1498. }
  1499. return;
  1500. } else mod.settings.HideOwnBlacklistedAbns = !mod.settings.HideOwnBlacklistedAbns;
  1501. Msg(`Blacklisted ScreenAbns ${mod.settings.HideOwnBlacklistedAbns ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1502. break;
  1503. case "pet": case "pets": case "servant": case "servants":
  1504. switch (arg) {
  1505. case "me":
  1506. mod.settings.HideMyServants = !mod.settings.HideMyServants;
  1507. mod.settings.HideMyServants ? HideNpcs('pet', 'own') : ShowNpcs('pet', 'own');
  1508. Msg(`Own Servants are ${mod.settings.HideMyServants ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1509. break;
  1510. default:
  1511. mod.settings.HideOthersServants = !mod.settings.HideOthersServants;
  1512. mod.settings.HideOthersServants ? HideNpcs('pet', 'others') : ShowNpcs('pet', 'others');
  1513. Msg(`Others summoned Servants are ${mod.settings.HideOthersServants ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1514. break;
  1515. }
  1516. break;
  1517. case "hpnumbers":
  1518. mod.settings.HideHpNumbers = !mod.settings.HideHpNumbers;
  1519. Msg(`Own Hp numbers ${mod.settings.HideHpNumbers ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1520. break;
  1521. case "mpnumbers":
  1522. mod.settings.HideMpNumbers = !mod.settings.HideMpNumbers;
  1523. Msg(`Own Mp numbers ${mod.settings.HideMpNumbers ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
  1524. break;
  1525. case "muteothers":
  1526. mod.settings.MuteOthersVoice = !mod.settings.MuteOthersVoice;
  1527. Msg(`Mute others voice is ${mod.settings.MuteOthersVoice ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);
  1528. break;
  1529. case "petspopup":
  1530. mod.settings.HideServantBalloons = !mod.settings.HideServantBalloons;
  1531. Msg(`Hide Pets Popup chat balloons is ${mod.settings.HideServantBalloons ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);
  1532. break;
  1533. case "stream":
  1534. mod.settings.StreamMode = !mod.settings.StreamMode;
  1535. Msg(`Stream mode is ${mod.settings.StreamMode ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);
  1536. if (mod.settings.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.");
  1537. else console.log("\x1b[94mINFO\x1b[34m [FPS-UTILS]\x1b[39m - Steam Mode has been disabled.");
  1538. break;
  1539. case "help": case "h":
  1540. mod.command.exec("fps gui help");
  1541. break;
  1542. default:
  1543. Msg(`<font color="${RedC}">Unknown command, check command list</font>.`);
  1544. mod.command.exec("fps gui help");
  1545. break;
  1546. }
  1547. if (!NotCP && typeof mod.settings.ClassesData["12"] === 'undefined') mod.saveSettings();
  1548. })
  1549. }