|
@@ -2,30 +2,14 @@
|
|
|
/* global __dirname */
|
|
/* global __dirname */
|
|
|
|
|
|
|
|
String.prototype.clr = function (HexClr) { return `<font color='${HexClr}'>${this}</font>` }
|
|
String.prototype.clr = function (HexClr) { return `<font color='${HexClr}'>${this}</font>` }
|
|
|
-const Gui = require('Gui')
|
|
|
|
|
-let BronzeClr = '#BC8F8F',
|
|
|
|
|
- SilverClr = '#9A9A9A',
|
|
|
|
|
- GoldClr = '#DAA520',
|
|
|
|
|
- PinkClr = '#FFB7C5',
|
|
|
|
|
- HPinkClr = '#FF69B4',
|
|
|
|
|
- CPinkClr = '#ED5D92',
|
|
|
|
|
- RedClr = '#FE6F5E',
|
|
|
|
|
- GreenClr = '#4DE19C',
|
|
|
|
|
- LPurpleClr = '#E0B0FF',
|
|
|
|
|
- PurpleClr = '#9966CC',
|
|
|
|
|
- LBlueClr = '#4DDCE1',
|
|
|
|
|
- BlueClr = '#436EEE',
|
|
|
|
|
- DBlueClr = '#00575e',
|
|
|
|
|
- HBlueClr = '#08B3E5',
|
|
|
|
|
- GrayClr = '#778899',
|
|
|
|
|
- YellowClr = '#DCE14D',
|
|
|
|
|
- OrangeClr = '#FFBE5E';
|
|
|
|
|
|
|
|
|
|
module.exports = function FpsUtils(mod) {
|
|
module.exports = function FpsUtils(mod) {
|
|
|
var notcaaliproxy = mod.proxyAuthor !== 'caali';
|
|
var notcaaliproxy = mod.proxyAuthor !== 'caali';
|
|
|
|
|
|
|
|
- const NpcData = require(`./data/npcData.json`),
|
|
|
|
|
- SkillData = require(`./data/skillString.json`);
|
|
|
|
|
|
|
+ const NpcData = require(`./data/npcData.json`)
|
|
|
|
|
+ const SkillData = require(`./data/skillString.json`)
|
|
|
|
|
+ const BronzeClr = '#BC8F8F', SilverClr = '#9A9A9A', GoldClr = '#DAA520', PinkClr = '#FFB7C5', HPinkClr = '#FF69B4', CPinkClr = '#ED5D92', RedClr = '#FE6F5E', GreenClr = '#4DE19C', LPurpleClr = '#E0B0FF', PurpleClr = '#9966CC', LBlueClr = '#4DDCE1', BlueClr = '#436EEE', DBlueClr = '#00575e', HBlueClr = '#08B3E5', GrayClr = '#778899', YellowClr = '#DCE14D', OrangeClr = '#FFBE5E';
|
|
|
|
|
+ const alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
|
|
|
|
|
|
|
|
let MyGameId,
|
|
let MyGameId,
|
|
|
MyName,
|
|
MyName,
|
|
@@ -37,13 +21,60 @@ module.exports = function FpsUtils(mod) {
|
|
|
PartyMembers = [],
|
|
PartyMembers = [],
|
|
|
HiddenNpcs = {},
|
|
HiddenNpcs = {},
|
|
|
HiddenUsers = {},
|
|
HiddenUsers = {},
|
|
|
- SpawnedPlayers = {},
|
|
|
|
|
- alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''),
|
|
|
|
|
- gui = new Gui(mod);
|
|
|
|
|
|
|
+ SpawnedPlayers = {}
|
|
|
|
|
|
|
|
- if (notcaaliproxy) {
|
|
|
|
|
- const settingsVersion = require('../module').options.settingsVersion
|
|
|
|
|
- mod.settings = require('./setting_migration')(mod.settings._version > settingsVersion ? undefined : mod.settings._version, settingsVersion, mod.settings)
|
|
|
|
|
|
|
+ if (notcaaliproxy) mod.settings = require('./setting_migration')(mod.settings._version, require('../module').options.settingsVersion, mod.settings)
|
|
|
|
|
+
|
|
|
|
|
+ // ~~~ * Gui Parser * ~~~ \\
|
|
|
|
|
+
|
|
|
|
|
+ let Xd,
|
|
|
|
|
+ Xdata = '',
|
|
|
|
|
+ Xdone = false
|
|
|
|
|
+
|
|
|
|
|
+ const Xmap = new WeakMap(); //ok I know what you think...if you got a better way feel free to inform me, thank you.
|
|
|
|
|
+ if (!Xmap.has(mod)) {
|
|
|
|
|
+ Xmap.set(mod, {});
|
|
|
|
|
+
|
|
|
|
|
+ mod.hook('C_CONFIRM_UPDATE_NOTIFICATION', 'raw', () => false)
|
|
|
|
|
+
|
|
|
|
|
+ mod.hook('C_ADMIN', 1, (event) => {
|
|
|
|
|
+ Xd = event.command.split(";")
|
|
|
|
|
+ Xd.forEach(cmd => mod.command.exec(cmd))
|
|
|
|
|
+ return false
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const gui = {
|
|
|
|
|
+ parse(Xarray, Xtitle) {
|
|
|
|
|
+ mod.send('S_ANNOUNCE_UPDATE_NOTIFICATION', 1, {
|
|
|
|
|
+ id: 0,
|
|
|
|
|
+ title: Xtitle,
|
|
|
|
|
+ body: X1(Xarray)
|
|
|
|
|
+ })
|
|
|
|
|
+ Xdata = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function X1(Xarray) {
|
|
|
|
|
+ Xdone = false
|
|
|
|
|
+ for (let i = 0; i < Xarray.length; i++) {
|
|
|
|
|
+ if (!Xdone) {
|
|
|
|
|
+ if (Xarray[i].command) Xshove(`<a href='admincommand:/@${Xarray[i].command}'>${Xarray[i].text}</a>`)
|
|
|
|
|
+ else if (!Xarray[i].command) Xshove(`${Xarray[i].text}`)
|
|
|
|
|
+ else console.log(`--v9-ERROR in Fps-Utils, pls report this as this ain't supposed to happen.`)
|
|
|
|
|
+ } else if (Xdone) break;
|
|
|
|
|
+ else console.log(`---ERROR in Fps-Utils, pls report this as this ain't supposed to happen.`)
|
|
|
|
|
+ }
|
|
|
|
|
+ return Xdata
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function Xshove(stuff) {
|
|
|
|
|
+ if (Xdata.length >= 16000) {
|
|
|
|
|
+ Xdata += `Gui data limit exceeded, some values may be missing.`
|
|
|
|
|
+ Xdone = true
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ Xdata += stuff
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ~~~ * Gui Handler * ~~~ \\
|
|
// ~~~ * Gui Handler * ~~~ \\
|
|
@@ -79,12 +110,12 @@ module.exports = function FpsUtils(mod) {
|
|
|
TmpData.push(
|
|
TmpData.push(
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br><br>`, command: `fps gui` },
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br><br>`, command: `fps gui` },
|
|
|
{ text: `<font color="${YellowClr}" size="+20"><p align="right">[Blacklisted NPCs list]</p></font><br>`, command: `fps gui npclist` },
|
|
{ text: `<font color="${YellowClr}" size="+20"><p align="right">[Blacklisted NPCs list]</p></font><br>`, command: `fps gui npclist` },
|
|
|
- { text: `<font color="${mod.settings.HideBlacklistedNpcs ? GreenClr : RedClr}" size="+20"><p align="right">[Blacklisted NPCs are ${mod.settings.HideBlacklistedNpcs ? 'Blocked' : 'Not-Blocked'}]</p></font><br><br>`, command: `fps npc;fps gui npcMain` },
|
|
|
|
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedNpcs ? GreenClr : RedClr}" size="+20"><p align="right">[Blacklisted NPCs are ${mod.settings.HideBlacklistedNpcs ? 'Hidden' : 'Shown'}]</p></font><br><br>`, command: `fps npc;fps gui npcMain` },
|
|
|
{ text: `<font color="${LBlueClr}" size="+19">Click a letter to view all NPCs starting with that letter:<br><br>` }
|
|
{ text: `<font color="${LBlueClr}" size="+19">Click a letter to view all NPCs starting with that letter:<br><br>` }
|
|
|
)
|
|
)
|
|
|
- for (var i = 0; i < alphabet.length; i++) {
|
|
|
|
|
|
|
+ for (let i = 0; i < alphabet.length; i++) {
|
|
|
TmpData.push(
|
|
TmpData.push(
|
|
|
- { text: `<font color="${BronzeClr}" size="+18">${alphabet[i]}</font>`, command: `fps gui npc ${alphabet[i]}` },
|
|
|
|
|
|
|
+ { text: `<font color="${BronzeClr}" size="+19">${alphabet[i]}</font>`, command: `fps gui npc ${alphabet[i]}` },
|
|
|
{ text: " " }
|
|
{ text: " " }
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
@@ -96,16 +127,14 @@ module.exports = function FpsUtils(mod) {
|
|
|
TmpData = []
|
|
TmpData = []
|
|
|
TmpData.push(
|
|
TmpData.push(
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
|
|
|
+ { text: `<font color="${RedClr}" size="+16">Red</font><font color="${LPurpleClr}" size="+16"> = Shown, <font color="${GreenClr}" size="+16">Green</font><font color="${LPurpleClr}" size="+16"> = Hidden</font></font><br>`, command: `fps gui` },
|
|
|
{ text: `<font color="${PinkClr}" size="+16">(Command </font><font color="${HPinkClr}" size="+16">"fps hide <name>"</font><font color="${PinkClr}" size="+16"> to hide someone that does not appear here)</font><br><br>` },
|
|
{ text: `<font color="${PinkClr}" size="+16">(Command </font><font color="${HPinkClr}" size="+16">"fps hide <name>"</font><font color="${PinkClr}" size="+16"> to hide someone that does not appear here)</font><br><br>` },
|
|
|
- { text: `<font color="${LBlueClr}" size="+19">Click to hide & add to blacklist.</font><br>` }
|
|
|
|
|
|
|
+ { text: `<font color="${LBlueClr}" size="+19">Click on <font color="${RedClr}">Red</font> to hide & add to blacklist. | on <font color="${GreenClr}">Green</font> to show & remove from blacklist</font><br>` }
|
|
|
)
|
|
)
|
|
|
for (let i in SpawnedPlayers) {
|
|
for (let i in SpawnedPlayers) {
|
|
|
- TmpData.push(
|
|
|
|
|
- { text: `<font color="${mod.settings.PlayersBlacklist.includes(SpawnedPlayers[i].name) ? GreenClr : RedClr}" size="+17">${SpawnedPlayers[i].name}</font>`, command: mod.settings.PlayersBlacklist.includes(SpawnedPlayers[i].name) ? `fps show ${SpawnedPlayers[i].name};fps gui show` : `fps hide ${SpawnedPlayers[i].name};fps gui show` },
|
|
|
|
|
- { text: `${JustifySpaces(SpawnedPlayers[i].name.length)}<font color="${mod.settings.PlayersBlacklist.includes(SpawnedPlayers[i].name) ? GreenClr : RedClr}" size="+17">${mod.settings.PlayersBlacklist.includes(SpawnedPlayers[i].name) ? 'is Hidden' : 'is Shown'}.</font><br>` }
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ TmpData.push({ text: `<font color="${mod.settings.PlayersBlacklist.includes(SpawnedPlayers[i].name) ? GreenClr : RedClr}" size="+17">${SpawnedPlayers[i].name}</font>`, command: mod.settings.PlayersBlacklist.includes(SpawnedPlayers[i].name) ? `fps show ${SpawnedPlayers[i].name};fps gui show` : `fps hide ${SpawnedPlayers[i].name};fps gui show` })
|
|
|
}
|
|
}
|
|
|
- gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - Players </font><font color="${RedClr}">(Shown)</font>`)
|
|
|
|
|
|
|
+ gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - Players </font><font color="${RedClr}">(In-distance)</font>`)
|
|
|
TmpData = []
|
|
TmpData = []
|
|
|
break;
|
|
break;
|
|
|
case "hide":
|
|
case "hide":
|
|
@@ -121,7 +150,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "skills":
|
|
case "skills":
|
|
|
gui.parse([
|
|
gui.parse([
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
|
- { text: `<font color="${mod.settings.HideBlacklistedSkills ? GreenClr : RedClr}" size="+22"><p align="right">[Blacklisted skills are ${mod.settings.HideBlacklistedSkills ? 'Blocked' : 'Not-Blocked'}]</p></font><br><br>`, command: `fps skill blacklist;fps gui skills` },
|
|
|
|
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedSkills ? GreenClr : RedClr}" size="+22"><p align="right">[Blacklisted skills are ${mod.settings.HideBlacklistedSkills ? 'Hidden' : 'Shown'}]</p></font><br><br>`, command: `fps skill blacklist;fps gui skills` },
|
|
|
{ text: `<font color="${YellowClr}" size="+20">Tankers:</font>		` },
|
|
{ text: `<font color="${YellowClr}" size="+20">Tankers:</font>		` },
|
|
|
{ text: `<font color="${LBlueClr}" size="+18">(Lancer)</font>`, command: `fps gui class lancer` },
|
|
{ text: `<font color="${LBlueClr}" size="+18">(Lancer)</font>`, command: `fps gui class lancer` },
|
|
|
{ text: " " },
|
|
{ text: " " },
|
|
@@ -219,35 +248,34 @@ module.exports = function FpsUtils(mod) {
|
|
|
gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - Projectiles</font>`)
|
|
gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - Projectiles</font>`)
|
|
|
TmpData = []
|
|
TmpData = []
|
|
|
break;
|
|
break;
|
|
|
- case "help": //TODO; Better formating. Attempt #3 (Noto Sans JP-KR-SC-TC) #wtb html support.
|
|
|
|
|
|
|
+ case "help": //(Noto Sans JP-KR-SC-TC_NL) *hopefully* now it will be read-able by all regions.
|
|
|
gui.parse([
|
|
gui.parse([
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
|
- { text: `<font color="${PinkClr}" size="+17"><p align="right">This page is under development. If you have messed up font check the ReadMe for list of commands, Thank you.</p></font><br>` },
|
|
|
|
|
{ text: `<font size="20">` },
|
|
{ text: `<font size="20">` },
|
|
|
- { text: (`<font color='${HBlueClr}'> Command(s)</font> <font color='${DBlueClr}'>Argument(s)</font> <font color='${HPinkClr}'>Example</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> gui ~ g</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps gui</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> N/A</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps-util</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> 0 ~ 1 ~ 2 ~ 3</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!0 ~ !1 ~ !2 ~ !3</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> mode ~ state</font> <font color='${DBlueClr}'>0 ~ 1 ~ 2 ~ 3</font> <font color='${HPinkClr}'>!fps mode 2</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> hide ~ show</font> <font color='${DBlueClr}'>Player ~ Class ~ Role</font> <font color='${HPinkClr}'>!fps hide mie</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> party</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps party</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> raid</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps raid</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> list</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps list</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'>summons ~ sums</font> <font color='${DBlueClr}'>other ~ me</font> <font color='${HPinkClr}'>!fps sums me</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> skill ~ skills</font> <font color='${DBlueClr}'>blacklist ~ Class arg</font> <font color='${HPinkClr}'>!fps skill blacklist</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> npc ~ npcs</font> <font color='${DBlueClr}'>N/A ~ hide arg</font> <font color='${HPinkClr}'>!fps npc</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> hit</font> <font color='${DBlueClr}'>me ~ other ~ damage</font> <font color='${HPinkClr}'>!fps hit me</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> firework</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps firework</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'>abn ~ abnormal</font> <font color='${DBlueClr}'>all~blacklist arg arg2</font> <font color='${HPinkClr}'>!fps abn blacklist</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> proj</font> <font color='${DBlueClr}'>all~blacklist arg arg2</font> <font color='${HPinkClr}'>!fps proj all</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> guildlogo</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps guildlogo</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'>style ~ costume</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps style</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> gui npcsearch</font> <font color='${DBlueClr}'>arg</font> <font color='${HPinkClr}'>!fps gui npcsearch E</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> npczoom</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps npczoom</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> dropitem</font> <font color='${DBlueClr}'>N/A ~ hide arg</font> <font color='${HPinkClr}'>!fps dropitem</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'>monsterdeathani</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps monsterdeathani</font><br>`) },
|
|
|
|
|
- { text: (`<font color='${HBlueClr}'> screenabns</font> <font color='${DBlueClr}'>N/A ~ hide arg</font> <font color='${HPinkClr}'>!fps screenabns</font><br>`) },
|
|
|
|
|
- { text: "</font>" }
|
|
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> Command(s)</font> <font color='${DBlueClr}'>Argument(s)</font> <font color='${HPinkClr}'>Example</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> gui ~ g</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps gui</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> N/A</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps-util</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> 0 ~ 1 ~ 2 ~ 3</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!0 ~ !1 ~ !2 ~ !3</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> mode ~ state</font> <font color='${DBlueClr}'>0 ~ 1 ~ 2 ~ 3</font> <font color='${HPinkClr}'>!fps mode 2</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> hide ~ show</font> <font color='${DBlueClr}'>Player ~ Class ~ Role</font> <font color='${HPinkClr}'>!fps hide mie</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> party</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps party</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> raid</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps raid</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> list</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps list</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'>summons ~ sums</font> <font color='${DBlueClr}'>other ~ me</font> <font color='${HPinkClr}'>!fps sums me</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> skill ~ skills</font> <font color='${DBlueClr}'>blacklist ~ Class arg</font> <font color='${HPinkClr}'>!fps skill blacklist</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> npc ~ npcs</font> <font color='${DBlueClr}'>N/A ~ hide arg</font> <font color='${HPinkClr}'>!fps npc</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> hit</font> <font color='${DBlueClr}'>me ~ other ~ damage</font> <font color='${HPinkClr}'>!fps hit me</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> firework</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps firework</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'>abn ~ abnormal</font> <font color='${DBlueClr}'>all~blacklist arg arg2</font> <font color='${HPinkClr}'>!fps abn blacklist</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> proj</font> <font color='${DBlueClr}'>all~blacklist arg arg2</font> <font color='${HPinkClr}'>!fps proj all</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> guildlogo</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps guildlogo</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'>style ~ costume</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps style</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> gui npcsearch</font> <font color='${DBlueClr}'>arg</font> <font color='${HPinkClr}'>!fps gui npcsearch E</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> npczoom</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps npczoom</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> dropitem</font> <font color='${DBlueClr}'>N/A ~ hide arg</font> <font color='${HPinkClr}'>!fps dropitem</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'>monsterdeathani</font> <font color='${DBlueClr}'>N/A</font> <font color='${HPinkClr}'>!fps monsterdeathani</font><br>` },
|
|
|
|
|
+ { text: `<font color='${HBlueClr}'> screenabns</font> <font color='${DBlueClr}'>N/A ~ hide arg</font> <font color='${HPinkClr}'>!fps screenabns</font><br>` },
|
|
|
|
|
+ { text: `</font>` }
|
|
|
], `<font color="${LPurpleClr}">[FPS] HELP</font>`)
|
|
], `<font color="${LPurpleClr}">[FPS] HELP</font>`)
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
@@ -325,36 +353,28 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ text: `<font color="${CPinkClr}" size="+17">[Disband]</font><br>`, command: `fps quicklink disband` },
|
|
{ text: `<font color="${CPinkClr}" size="+17">[Disband]</font><br>`, command: `fps quicklink disband` },
|
|
|
{ text: `<font color="${DBlueClr}" size="+21">Extra:</font>	` },
|
|
{ text: `<font color="${DBlueClr}" size="+21">Extra:</font>	` },
|
|
|
{ text: `<font color="${CPinkClr}" size="+17">[Lobby]</font>`, command: `fps quicklink lobby` },
|
|
{ text: `<font color="${CPinkClr}" size="+17">[Lobby]</font>`, command: `fps quicklink lobby` },
|
|
|
- { text: " " },
|
|
|
|
|
- { text: `<font color="${CPinkClr}" size="+17">[Exit]</font><br>`, command: `fps quicklink exit` }
|
|
|
|
|
|
|
+ { text: "		 " },
|
|
|
|
|
+ { text: `<font color="${CPinkClr}" size="+17">[!!Instant Exit!!]</font><br>`, command: `fps quicklink instantexit` }
|
|
|
], `<font color="${LPurpleClr}">[FPS] Options</font> | <font color="${RedClr}" size="+16">Red</font><font color="${LPurpleClr}" size="+16"> = disabled, <font color="${GreenClr}" size="+16">Green</font><font color="${LPurpleClr}" size="+16"> = enabled</font>`)
|
|
], `<font color="${LPurpleClr}">[FPS] Options</font> | <font color="${RedClr}" size="+16">Red</font><font color="${LPurpleClr}" size="+16"> = disabled, <font color="${GreenClr}" size="+16">Green</font><font color="${LPurpleClr}" size="+16"> = enabled</font>`)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ~~~ * Gui Functions * ~~~ \\
|
|
// ~~~ * Gui Functions * ~~~ \\
|
|
|
|
|
|
|
|
- function JustifySpaces(ToJustify) {
|
|
|
|
|
- if (ToJustify <= 3) return '								';
|
|
|
|
|
- else if (ToJustify <= 7) return '							';
|
|
|
|
|
- else if (ToJustify <= 12) return '						';
|
|
|
|
|
- else if (ToJustify <= 15) return '					';
|
|
|
|
|
- else return '				';
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
function SkillsList(value) {
|
|
function SkillsList(value) {
|
|
|
let keys = [],
|
|
let keys = [],
|
|
|
skilldata = [],
|
|
skilldata = [],
|
|
|
skillIds = []
|
|
skillIds = []
|
|
|
skilldata.push(
|
|
skilldata.push(
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
|
- { text: `<font color="${mod.settings.HideBlacklistedSkills ? GreenClr : RedClr}" size="+22"><p align="right">[Blacklisted skills are ${mod.settings.HideBlacklistedSkills ? 'Blocked' : 'Not-Blocked'}]</p></font><br>`, command: `fps skill blacklist;fps gui skills` },
|
|
|
|
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedSkills ? GreenClr : RedClr}" size="+22"><p align="right">[Blacklisted skills are ${mod.settings.HideBlacklistedSkills ? 'Hidden' : 'Shown'}]</p></font><br>`, command: `fps skill blacklist;fps gui skills` },
|
|
|
{ text: `<font color="${LBlueClr}" size="+19">Click skill to blacklist it.</font><br>` }
|
|
{ text: `<font color="${LBlueClr}" size="+19">Click skill to blacklist it.</font><br>` }
|
|
|
)
|
|
)
|
|
|
for (let key in SkillData[value]) {
|
|
for (let key in SkillData[value]) {
|
|
|
keys.push(key);
|
|
keys.push(key);
|
|
|
}
|
|
}
|
|
|
skillIds.push(Object.values(SkillData[value]))
|
|
skillIds.push(Object.values(SkillData[value]))
|
|
|
- for (var i = 0; i < keys.length; i++) {
|
|
|
|
|
|
|
+ for (let i = 0; i < keys.length; i++) {
|
|
|
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()) ? GreenClr : RedClr}" size="+17">[${keys[i]}]</font><br>` })
|
|
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()) ? GreenClr : RedClr}" size="+17">[${keys[i]}]</font><br>` })
|
|
|
}
|
|
}
|
|
|
return skilldata
|
|
return skilldata
|
|
@@ -410,7 +430,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function RemoveEntry(name) {
|
|
function RemoveEntry(name) {
|
|
|
- var what, a = arguments, L = a.length, ax;
|
|
|
|
|
|
|
+ let what, a = arguments, L = a.length, ax;
|
|
|
while (L > 1 && name.length) {
|
|
while (L > 1 && name.length) {
|
|
|
what = a[--L];
|
|
what = a[--L];
|
|
|
while ((ax = name.indexOf(what)) !== -1) { name.splice(ax, 1); }
|
|
while ((ax = name.indexOf(what)) !== -1) { name.splice(ax, 1); }
|
|
@@ -422,7 +442,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
for (let i in HiddenUsers) {
|
|
for (let i in HiddenUsers) {
|
|
|
if (HiddenUsers[i].name.toString().toLowerCase() === name.toLowerCase()) {
|
|
if (HiddenUsers[i].name.toString().toLowerCase() === name.toLowerCase()) {
|
|
|
ModifyAppearance(HiddenUsers[i]);
|
|
ModifyAppearance(HiddenUsers[i]);
|
|
|
- mod.send('S_SPAWN_USER', 13, HiddenUsers[i]);
|
|
|
|
|
|
|
+ mod.send('S_SPAWN_USER', 14, HiddenUsers[i]);
|
|
|
delete HiddenUsers[i];
|
|
delete HiddenUsers[i];
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -441,7 +461,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
function ShowAllPlayers() {
|
|
function ShowAllPlayers() {
|
|
|
for (let i in HiddenUsers) {
|
|
for (let i in HiddenUsers) {
|
|
|
ModifyAppearance(HiddenUsers[i]);
|
|
ModifyAppearance(HiddenUsers[i]);
|
|
|
- mod.send('S_SPAWN_USER', 13, HiddenUsers[i]);
|
|
|
|
|
|
|
+ mod.send('S_SPAWN_USER', 14, HiddenUsers[i]);
|
|
|
delete HiddenUsers[i];
|
|
delete HiddenUsers[i];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -456,16 +476,16 @@ module.exports = function FpsUtils(mod) {
|
|
|
let modified = false;
|
|
let modified = false;
|
|
|
|
|
|
|
|
if (mod.settings.ShowStyle) {
|
|
if (mod.settings.ShowStyle) {
|
|
|
- event.ShowStyle = false;
|
|
|
|
|
- event.weaponEnchant = event.body = event.hand = event.feet = event.underwear = event.head = event.face = event.weapon = 0;
|
|
|
|
|
- event.title = event.underwearDye = event.styleBackDye = event.styleHeadDye = event.styleFaceDye = event.styleBodyDye = event.showFace = event.styleHead = event.styleFace = event.styleBack = event.styleWeapon = event.styleBody = event.styleFootprint = 0;
|
|
|
|
|
|
|
+ event.ShowStyle = event.showFace = false;
|
|
|
|
|
+ event.weaponEnchant = event.body = event.hand = event.feet = event.underwear = event.head = event.face = event.weapon = event.title = event.underwearDye = event.styleBackDye = event.styleHeadDye = event.styleFaceDye = event.styleBodyDye = event.weaponEnchant = event.styleHead = event.styleFace = event.styleBack = event.styleWeapon = event.styleBody = event.styleFootprint = 0;
|
|
|
event.icons = [];
|
|
event.icons = [];
|
|
|
if (event.mount) event.mount = 231;
|
|
if (event.mount) event.mount = 231;
|
|
|
modified = true;
|
|
modified = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (mod.settings.Hideguildlogos) {
|
|
if (mod.settings.Hideguildlogos) {
|
|
|
- event.guildEmblem = '';
|
|
|
|
|
|
|
+ event.guildLogo = '';
|
|
|
|
|
+ event.guildLogoId = 0;
|
|
|
modified = true;
|
|
modified = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -595,7 +615,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
|
|
function sSpawnUser(event) {
|
|
function sSpawnUser(event) {
|
|
|
SpawnedPlayers[event.gameId] = event;
|
|
SpawnedPlayers[event.gameId] = event;
|
|
|
- if (mod.settings.Mode === 3 || mod.settings.PlayersBlacklist.includes(event.name) || mod.settings.ClassesData[ClassID(event.templateId)].isHidden === true || (mod.settings.OnlyParty && !PartyMembers.includes(event.name))) {
|
|
|
|
|
|
|
+ if (mod.settings.Mode === 3 || mod.settings.PlayersBlacklist.includes(event.name) || mod.settings.ClassesData[ClassID(event.templateId)].isHidden || (mod.settings.OnlyParty && !PartyMembers.includes(event.name))) {
|
|
|
HiddenUsers[event.gameId] = event;
|
|
HiddenUsers[event.gameId] = event;
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
@@ -638,16 +658,11 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
|
|
function sUserExternalChange(event) {
|
|
function sUserExternalChange(event) {
|
|
|
if (EqGid(event.gameId)) return;
|
|
if (EqGid(event.gameId)) return;
|
|
|
- if (mod.settings.ShowStyle) {
|
|
|
|
|
- event.ShowStyle = false;
|
|
|
|
|
- event.weaponEnchant = event.body = event.hand = event.feet = event.underwear = event.head = event.face = event.weapon = 0;
|
|
|
|
|
- event.title = event.underwearDye = event.styleBackDye = event.styleHeadDye = event.styleFaceDye = event.styleBodyDye = event.showFace = event.styleHead = event.styleFace = event.styleBack = event.styleWeapon = event.styleBody = event.styleFootprint = 0;
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (mod.settings.ShowStyle) return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function sUnicastTransformData(event) {
|
|
function sUnicastTransformData(event) {
|
|
|
- if (EqGid(event.gameId)) return;
|
|
|
|
|
|
|
+ if (EqGid(event.gameId) || event.gameId == 0) return;
|
|
|
if (mod.settings.ShowStyle) return false;
|
|
if (mod.settings.ShowStyle) return false;
|
|
|
if (mod.settings.Hideguildlogos) {
|
|
if (mod.settings.Hideguildlogos) {
|
|
|
event.guildLogo = '';
|
|
event.guildLogo = '';
|
|
@@ -655,9 +670,14 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /*function sUserChangeFaceCustom(event) {
|
|
|
|
|
+ if (EqGid(event.gameId) || event.gameId == 0) return;
|
|
|
|
|
+ if (mod.settings.ShowStyle) return false;
|
|
|
|
|
+ }*/
|
|
|
|
|
+
|
|
|
function sSpawnNpc(event) {
|
|
function sSpawnNpc(event) {
|
|
|
if (mod.settings.HideBlacklistedNpcs) {
|
|
if (mod.settings.HideBlacklistedNpcs) {
|
|
|
- for (var i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
|
|
|
|
|
|
|
+ for (let i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
|
|
|
if (event.huntingZoneId == mod.settings.NpcsBlacklist[i].zone && event.templateId == mod.settings.NpcsBlacklist[i].templateId) {
|
|
if (event.huntingZoneId == mod.settings.NpcsBlacklist[i].zone && event.templateId == mod.settings.NpcsBlacklist[i].templateId) {
|
|
|
HiddenNpcs[event.gameId] = event;
|
|
HiddenNpcs[event.gameId] = event;
|
|
|
return false;
|
|
return false;
|
|
@@ -665,6 +685,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (event.huntingZoneId === 1023) {
|
|
if (event.huntingZoneId === 1023) {
|
|
|
|
|
+ if (mod.settings.HideFireworks && (event.templateId == 60016000 || event.templateId == 80037000)) return false;
|
|
|
if (EqGid(event.owner)) {
|
|
if (EqGid(event.owner)) {
|
|
|
if (!mod.settings.HideMySummons) return;
|
|
if (!mod.settings.HideMySummons) return;
|
|
|
HiddenNpcs[event.gameId] = event;
|
|
HiddenNpcs[event.gameId] = event;
|
|
@@ -674,7 +695,6 @@ module.exports = function FpsUtils(mod) {
|
|
|
HiddenNpcs[event.gameId] = event;
|
|
HiddenNpcs[event.gameId] = event;
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- if (mod.settings.HideFireworks && event.huntingZoneId === 1023 && (event.templateId === 60016000 || event.templateId === 80037000)) return false;
|
|
|
|
|
if (mod.settings.ShowStyle) {
|
|
if (mod.settings.ShowStyle) {
|
|
|
event.repairable = false;
|
|
event.repairable = false;
|
|
|
return true;
|
|
return true;
|
|
@@ -718,7 +738,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function sAbnormalityFail(event) {
|
|
function sAbnormalityFail(event) {
|
|
|
- if (event.id === 3000021) return false;
|
|
|
|
|
|
|
+ if (event.id == 3000021) return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function sActionStage(event) {
|
|
function sActionStage(event) {
|
|
@@ -734,7 +754,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
if (EqGid(event.gameId)) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mStarted\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${MyName}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
if (EqGid(event.gameId)) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mStarted\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${MyName}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
|
if (SpawnedPlayers[event.gameId]) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mStarted\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${SpawnedPlayers[event.source].name}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
if (SpawnedPlayers[event.gameId]) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mStarted\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${SpawnedPlayers[event.source].name}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
|
}
|
|
}
|
|
|
- if (mod.settings.HideBlacklistedProjectiles && mod.settings.ProjectilesBlacklist.includes(event.skill.id)) return false;
|
|
|
|
|
|
|
+ if ((mod.settings.HideBlacklistedProjectiles || mod.settings.HideAllProjectiles) && mod.settings.ProjectilesBlacklist.includes(event.skill.id)) return false;
|
|
|
if (!EqGid(event.gameId) && SpawnedPlayers[event.gameId] && (HiddenUsers[event.gameId] || mod.settings.Mode > 0 || mod.settings.HideAllProjectiles)) return false;
|
|
if (!EqGid(event.gameId) && SpawnedPlayers[event.gameId] && (HiddenUsers[event.gameId] || mod.settings.Mode > 0 || mod.settings.HideAllProjectiles)) return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -743,7 +763,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
if (EqGid(event.gameId)) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mSpawned\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${MyName}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
if (EqGid(event.gameId)) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mSpawned\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${MyName}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
|
if (SpawnedPlayers[event.gameId]) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mSpawned\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${SpawnedPlayers[event.source].name}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
if (SpawnedPlayers[event.gameId]) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mProjectile \x1b[4mSpawned\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${SpawnedPlayers[event.source].name}'\x1b[0m:\x1b[33m \Skill_ID "\x1b[32m${event.skill.id}\x1b[0m"`);
|
|
|
}
|
|
}
|
|
|
- if (mod.settings.HideBlacklistedProjectiles && mod.settings.ProjectilesBlacklist.includes(event.skill.id)) return false;
|
|
|
|
|
|
|
+ if ((mod.settings.HideBlacklistedProjectiles || mod.settings.HideAllProjectiles) && mod.settings.ProjectilesBlacklist.includes(event.skill.id)) return false;
|
|
|
if (!EqGid(event.gameId) && SpawnedPlayers[event.gameId] && (HiddenUsers[event.gameId] || mod.settings.Mode > 0 || mod.settings.HideAllProjectiles)) return false;
|
|
if (!EqGid(event.gameId) && SpawnedPlayers[event.gameId] && (HiddenUsers[event.gameId] || mod.settings.Mode > 0 || mod.settings.HideAllProjectiles)) return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -753,8 +773,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
if (!EqGid(event.target) && mod.settings.Hit_Other && (SpawnedPlayers[event.owner] || SpawnedPlayers[event.source])) {
|
|
if (!EqGid(event.target) && mod.settings.Hit_Other && (SpawnedPlayers[event.owner] || SpawnedPlayers[event.source])) {
|
|
|
event.skill = { npc: 0, type: 0, id: 0 };
|
|
event.skill = { npc: 0, type: 0, id: 0 };
|
|
|
- event.id = event.damage = event.type = event.noctEffect = event.crit = event.stackExplode = event.blocked = 0;
|
|
|
|
|
- event.reaction.skill = 0;
|
|
|
|
|
|
|
+ event.id = event.damage = event.type = event.noctEffect = event.crit = event.stackExplode = event.blocked = event.reaction.skill = 0;
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -779,7 +798,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
|
|
// ~~~ * Packet Hooks * ~~~ \\
|
|
// ~~~ * Packet Hooks * ~~~ \\
|
|
|
|
|
|
|
|
- mod.hook('S_LOGIN', 10, sLogin)
|
|
|
|
|
|
|
+ mod.hook('S_LOGIN', 12, sLogin)
|
|
|
mod.hook('S_LOAD_TOPO', 'raw', sLoadTopo)
|
|
mod.hook('S_LOAD_TOPO', 'raw', sLoadTopo)
|
|
|
mod.hook('S_LEAVE_PARTY', 'raw', sLeaveParty)
|
|
mod.hook('S_LEAVE_PARTY', 'raw', sLeaveParty)
|
|
|
mod.hook('S_MOUNT_VEHICLE', 2, sMountVehicle)
|
|
mod.hook('S_MOUNT_VEHICLE', 2, sMountVehicle)
|
|
@@ -794,14 +813,15 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.hook('S_APPLY_TITLE', 2, sApplyTitle)
|
|
mod.hook('S_APPLY_TITLE', 2, sApplyTitle)
|
|
|
mod.hook('S_IMAGE_DATA', 'raw', sImageData)
|
|
mod.hook('S_IMAGE_DATA', 'raw', sImageData)
|
|
|
|
|
|
|
|
- mod.hook('S_SPAWN_USER', 13, { order: 9999 }, sSpawnUser)
|
|
|
|
|
- mod.hook('S_SPAWN_USER', 13, { order: 99999, filter: { fake: null } }, sSpawnUserfn)
|
|
|
|
|
|
|
+ mod.hook('S_SPAWN_USER', 14, { order: 9999 }, sSpawnUser)
|
|
|
|
|
+ mod.hook('S_SPAWN_USER', 14, { order: 99999, filter: { fake: null } }, sSpawnUserfn)
|
|
|
mod.hook('S_DESPAWN_USER', 3, { order: 999 }, sDespawnUser)
|
|
mod.hook('S_DESPAWN_USER', 3, { order: 999 }, sDespawnUser)
|
|
|
mod.hook('S_USER_LOCATION', 5, sUserLocation)
|
|
mod.hook('S_USER_LOCATION', 5, sUserLocation)
|
|
|
mod.hook('S_USER_MOVETYPE', 'raw', sUserMoveType)
|
|
mod.hook('S_USER_MOVETYPE', 'raw', sUserMoveType)
|
|
|
mod.hook('S_PARTY_MEMBER_LIST', 7, sPartyMemberList)
|
|
mod.hook('S_PARTY_MEMBER_LIST', 7, sPartyMemberList)
|
|
|
- mod.hook('S_USER_EXTERNAL_CHANGE', 6, { order: 9999 }, sUserExternalChange)
|
|
|
|
|
- mod.hook('S_UNICAST_TRANSFORM_DATA', 3, { order: 99999 }, sUnicastTransformData)
|
|
|
|
|
|
|
+ mod.hook('S_USER_EXTERNAL_CHANGE', 7, { order: 9999 }, sUserExternalChange)
|
|
|
|
|
+ mod.hook('S_UNICAST_TRANSFORM_DATA', 5, { order: 99999 }, sUnicastTransformData)
|
|
|
|
|
+ //mod.hook('S_USER_CHANGE_FACE_CUSTOM', 2, { order: 9999 }, sUserChangeFaceCustom) opcode not public. :v
|
|
|
|
|
|
|
|
mod.hook('S_SPAWN_NPC', 10, sSpawnNpc)
|
|
mod.hook('S_SPAWN_NPC', 10, sSpawnNpc)
|
|
|
mod.hook('S_DESPAWN_NPC', 3, sDespawnNpc)
|
|
mod.hook('S_DESPAWN_NPC', 3, sDespawnNpc)
|
|
@@ -812,7 +832,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.hook('S_ABNORMALITY_REFRESH', 1, { order: 999 }, sAbnormalityRefresh)
|
|
mod.hook('S_ABNORMALITY_REFRESH', 1, { order: 999 }, sAbnormalityRefresh)
|
|
|
mod.hook('S_ABNORMALITY_FAIL', 1, sAbnormalityFail)
|
|
mod.hook('S_ABNORMALITY_FAIL', 1, sAbnormalityFail)
|
|
|
|
|
|
|
|
- mod.hook('S_ACTION_STAGE', 8, { order: 999 }, sActionStage)
|
|
|
|
|
|
|
+ mod.hook('S_ACTION_STAGE', 9, { order: 999 }, sActionStage)
|
|
|
mod.hook('S_SPAWN_PROJECTILE', 5, { order: 999 }, sSpawnProjectile)
|
|
mod.hook('S_SPAWN_PROJECTILE', 5, { order: 999 }, sSpawnProjectile)
|
|
|
mod.hook('S_START_USER_PROJECTILE', 9, { order: 999 }, sStartUserProjectile)
|
|
mod.hook('S_START_USER_PROJECTILE', 9, { order: 999 }, sStartUserProjectile)
|
|
|
mod.hook('S_EACH_SKILL_RESULT', 12, { order: 999 }, sEachSkillResult)
|
|
mod.hook('S_EACH_SKILL_RESULT', 12, { order: 999 }, sEachSkillResult)
|
|
@@ -940,11 +960,9 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
Msg(`Class "${arg}"` + ` Shown`.clr(RedClr) + '.');
|
|
Msg(`Class "${arg}"` + ` Shown`.clr(RedClr) + '.');
|
|
|
- } else if (!mod.settings.ClassesBlacklist.includes(arg) || !mod.settings.RolesBlacklist.includes(arg)) {
|
|
|
|
|
- Msg(`Class/Role "${arg}"` + ` Already shown`.clr(RedClr) + '.');
|
|
|
|
|
- } else if (!mod.settings.PlayersBlacklist.includes(arg)) {
|
|
|
|
|
- Msg(`Player "${arg}"` + ` Already shown`.clr(RedClr) + '.');
|
|
|
|
|
- } else Msg(`Invalid ${arg2}.`.clr(GrayClr));
|
|
|
|
|
|
|
+ } else if (!mod.settings.ClassesBlacklist.includes(arg) || !mod.settings.RolesBlacklist.includes(arg)) Msg(`Class/Role "${arg}"` + ` Already shown`.clr(RedClr) + '.');
|
|
|
|
|
+ else if (!mod.settings.PlayersBlacklist.includes(arg)) Msg(`Player "${arg}"` + ` Already shown`.clr(RedClr) + '.');
|
|
|
|
|
+ else Msg(`Invalid ${arg2}.`.clr(GrayClr));
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case "party":
|
|
case "party":
|
|
@@ -1013,8 +1031,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- } else
|
|
|
|
|
- Msg(`Class ${arg2} not found.`.clr(RedClr));
|
|
|
|
|
|
|
+ } else Msg(`Class ${arg2} not found.`.clr(RedClr));
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
@@ -1026,21 +1043,16 @@ module.exports = function FpsUtils(mod) {
|
|
|
Msg(`Blacklisted NPCs ${mod.settings.HideBlacklistedNpcs ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
Msg(`Blacklisted NPCs ${mod.settings.HideBlacklistedNpcs ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- let found = mod.settings.NpcsBlacklist.some(s => {
|
|
|
|
|
- return s.zone === arg2 && s.templateId === arg3;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ let found = mod.settings.NpcsBlacklist.some(s => s.zone === arg2 && s.templateId === arg3);
|
|
|
if (found) {
|
|
if (found) {
|
|
|
Msg(`NPC HntZone '${arg2}', TmpId '${arg3}'` + ` Removed from the blacklist`.clr(RedClr) + '.')
|
|
Msg(`NPC HntZone '${arg2}', TmpId '${arg3}'` + ` Removed from the blacklist`.clr(RedClr) + '.')
|
|
|
- mod.settings.NpcsBlacklist = mod.settings.NpcsBlacklist.filter(obj => {
|
|
|
|
|
- return obj.zone != arg2 || obj.templateId != arg3;
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ mod.settings.NpcsBlacklist = mod.settings.NpcsBlacklist.filter(obj => obj.zone != arg2 || obj.templateId != arg3);
|
|
|
} else {
|
|
} else {
|
|
|
Msg(`NPC HntZone '${arg2}', TmpId '${arg3}'` + ` Added to the blacklist`.clr(GreenClr) + '.')
|
|
Msg(`NPC HntZone '${arg2}', TmpId '${arg3}'` + ` Added to the blacklist`.clr(GreenClr) + '.')
|
|
|
mod.settings.NpcsBlacklist.push({ zone: arg2, templateId: arg3 })
|
|
mod.settings.NpcsBlacklist.push({ zone: arg2, templateId: arg3 })
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|
|
|
- } else
|
|
|
|
|
- mod.settings.HideBlacklistedNpcs = !mod.settings.HideBlacklistedNpcs;
|
|
|
|
|
|
|
+ } else mod.settings.HideBlacklistedNpcs = !mod.settings.HideBlacklistedNpcs;
|
|
|
Msg(`Blacklisted NPCs ${mod.settings.HideBlacklistedNpcs ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
Msg(`Blacklisted NPCs ${mod.settings.HideBlacklistedNpcs ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
|
break;
|
|
break;
|
|
|
case "hit":
|
|
case "hit":
|
|
@@ -1118,22 +1130,22 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case "guildlogo":
|
|
case "guildlogo":
|
|
|
- if (ChangeOnCd) return Msg(`Try again in 4 seconds.`.clr(PinkClr));
|
|
|
|
|
|
|
+ if (ChangeOnCd) return Msg(`Try again in 3 seconds.`.clr(PinkClr));
|
|
|
mod.settings.Hideguildlogos = !mod.settings.Hideguildlogos;
|
|
mod.settings.Hideguildlogos = !mod.settings.Hideguildlogos;
|
|
|
mod.send('C_SET_VISIBLE_RANGE', 1, { range: 0 });
|
|
mod.send('C_SET_VISIBLE_RANGE', 1, { range: 0 });
|
|
|
setTimeout(() => mod.send('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
setTimeout(() => mod.send('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
|
ChangeOnCd = true;
|
|
ChangeOnCd = true;
|
|
|
- setTimeout(() => ChangeOnCd = false, 4000);
|
|
|
|
|
|
|
+ setTimeout(() => ChangeOnCd = false, 2800);
|
|
|
Msg(`Guild Logos ${mod.settings.Hideguildlogos ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
Msg(`Guild Logos ${mod.settings.Hideguildlogos ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
|
break;
|
|
break;
|
|
|
case "costume":
|
|
case "costume":
|
|
|
case "style":
|
|
case "style":
|
|
|
- if (ChangeOnCd) return Msg(`Try again in 4 seconds.`.clr(PinkClr));
|
|
|
|
|
|
|
+ if (ChangeOnCd) return Msg(`Try again in 3 seconds.`.clr(PinkClr));
|
|
|
mod.settings.ShowStyle = !mod.settings.ShowStyle;
|
|
mod.settings.ShowStyle = !mod.settings.ShowStyle;
|
|
|
mod.send('C_SET_VISIBLE_RANGE', 1, { range: 0 })
|
|
mod.send('C_SET_VISIBLE_RANGE', 1, { range: 0 })
|
|
|
setTimeout(() => mod.send('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
setTimeout(() => mod.send('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
|
ChangeOnCd = true
|
|
ChangeOnCd = true
|
|
|
- setTimeout(() => ChangeOnCd = false, 4000);
|
|
|
|
|
|
|
+ setTimeout(() => ChangeOnCd = false, 2800);
|
|
|
Msg(`Style of NPCs & others ${mod.settings.ShowStyle ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
Msg(`Style of NPCs & others ${mod.settings.ShowStyle ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
|
break;
|
|
break;
|
|
|
case "proj":
|
|
case "proj":
|
|
@@ -1204,8 +1216,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "lobby":
|
|
case "lobby":
|
|
|
mod.send('C_RETURN_TO_LOBBY', 1, {});
|
|
mod.send('C_RETURN_TO_LOBBY', 1, {});
|
|
|
break;
|
|
break;
|
|
|
- case "exit":
|
|
|
|
|
- mod.send('C_EXIT', 1, {});
|
|
|
|
|
|
|
+ case "instantexit":
|
|
|
|
|
+ mod.send('S_EXIT', 3, { category: 0, code: 0 });
|
|
|
break;
|
|
break;
|
|
|
case "drop":
|
|
case "drop":
|
|
|
mod.send('C_LEAVE_PARTY', 1, {});
|
|
mod.send('C_LEAVE_PARTY', 1, {});
|
|
@@ -1236,17 +1248,16 @@ module.exports = function FpsUtils(mod) {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
arg2 = Number(arg2);
|
|
arg2 = Number(arg2);
|
|
|
- let found = mod.settings.DropBlacklist.some(s => { return s === arg2; });
|
|
|
|
|
|
|
+ let found = mod.settings.DropBlacklist.some(s => s === arg2);
|
|
|
if (found) {
|
|
if (found) {
|
|
|
Msg(`Drops id '${arg2}'` + ` Removed from the blacklist`.clr(RedClr) + '.')
|
|
Msg(`Drops id '${arg2}'` + ` Removed from the blacklist`.clr(RedClr) + '.')
|
|
|
- mod.settings.DropBlacklist = mod.settings.DropBlacklist.filter(obj => { return obj != arg2; })
|
|
|
|
|
|
|
+ mod.settings.DropBlacklist = mod.settings.DropBlacklist.filter(obj => obj != arg2)
|
|
|
} else {
|
|
} else {
|
|
|
Msg(`Drops id '${arg2}'` + ` Added to the blacklist`.clr(GreenClr) + '.')
|
|
Msg(`Drops id '${arg2}'` + ` Added to the blacklist`.clr(GreenClr) + '.')
|
|
|
mod.settings.DropBlacklist.push(arg2)
|
|
mod.settings.DropBlacklist.push(arg2)
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|
|
|
- } else
|
|
|
|
|
- mod.settings.HideBlacklistedDrop = !mod.settings.HideBlacklistedDrop;
|
|
|
|
|
|
|
+ } else mod.settings.HideBlacklistedDrop = !mod.settings.HideBlacklistedDrop;
|
|
|
Msg(`Blacklisted Drops ${mod.settings.HideBlacklistedDrop ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
Msg(`Blacklisted Drops ${mod.settings.HideBlacklistedDrop ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
|
break;
|
|
break;
|
|
|
case "monsterdeathani":
|
|
case "monsterdeathani":
|
|
@@ -1262,17 +1273,16 @@ module.exports = function FpsUtils(mod) {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
arg2 = Number(arg2);
|
|
arg2 = Number(arg2);
|
|
|
- let found = mod.settings.OwnAbnormalsBlacklist.some(m => { return m === arg2; });
|
|
|
|
|
|
|
+ let found = mod.settings.OwnAbnormalsBlacklist.some(m => m === arg2);
|
|
|
if (found) {
|
|
if (found) {
|
|
|
Msg(`Abnormal id '${arg2}'` + " Removed from the blacklist".clr(RedClr) + '.')
|
|
Msg(`Abnormal id '${arg2}'` + " Removed from the blacklist".clr(RedClr) + '.')
|
|
|
- mod.settings.OwnAbnormalsBlacklist = mod.settings.OwnAbnormalsBlacklist.filter(obj => { return obj != arg2; })
|
|
|
|
|
|
|
+ mod.settings.OwnAbnormalsBlacklist = mod.settings.OwnAbnormalsBlacklist.filter(obj => obj != arg2);
|
|
|
} else {
|
|
} else {
|
|
|
Msg(`Abnormal id '${arg2}'` + " Added to the blacklist".clr(GreenClr) + ".")
|
|
Msg(`Abnormal id '${arg2}'` + " Added to the blacklist".clr(GreenClr) + ".")
|
|
|
mod.settings.OwnAbnormalsBlacklist.push(arg2)
|
|
mod.settings.OwnAbnormalsBlacklist.push(arg2)
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|
|
|
- } else
|
|
|
|
|
- mod.settings.HideOwnBlacklistedAbns = !mod.settings.HideOwnBlacklistedAbns;
|
|
|
|
|
|
|
+ } else mod.settings.HideOwnBlacklistedAbns = !mod.settings.HideOwnBlacklistedAbns;
|
|
|
Msg(`Blacklisted ScreenAbns ${mod.settings.HideOwnBlacklistedAbns ? 'Hidden'.clr(GreenClr) : 'Shown'.clr(RedClr)}.`);
|
|
Msg(`Blacklisted ScreenAbns ${mod.settings.HideOwnBlacklistedAbns ? 'Hidden'.clr(GreenClr) : 'Shown'.clr(RedClr)}.`);
|
|
|
break;
|
|
break;
|
|
|
case "help":
|
|
case "help":
|