|
|
@@ -8,7 +8,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
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 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 = '#C0B94D', 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,
|
|
|
@@ -21,7 +21,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
PartyMembers = [],
|
|
|
HiddenNpcs = {},
|
|
|
HiddenUsers = {},
|
|
|
- SpawnedPlayers = {}
|
|
|
+ SpawnedUsers = {}
|
|
|
|
|
|
if (notcaaliproxy) mod.settings = require('./setting_migration')(mod.settings._version, require('../module').options.settingsVersion, mod.settings)
|
|
|
|
|
|
@@ -46,7 +46,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
const gui = {
|
|
|
parse(Xarray, Xtitle) {
|
|
|
- mod.send('S_ANNOUNCE_UPDATE_NOTIFICATION', 1, {
|
|
|
+ mod.toClient('S_ANNOUNCE_UPDATE_NOTIFICATION', 1, {
|
|
|
id: 0,
|
|
|
title: Xtitle,
|
|
|
body: X1(Xarray)
|
|
|
@@ -109,16 +109,19 @@ module.exports = function FpsUtils(mod) {
|
|
|
TmpData.push(
|
|
|
{ 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="${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>` }
|
|
|
)
|
|
|
for (let i = 0; i < alphabet.length; i++) {
|
|
|
TmpData.push(
|
|
|
{ text: `<font color="${BronzeClr}" size="+19">${alphabet[i]}</font>`, command: `fps gui npc ${alphabet[i]}` },
|
|
|
- { text: " " }
|
|
|
+ { text: " " }
|
|
|
)
|
|
|
}
|
|
|
- TmpData.push({ text: `<br><br><font color="${PinkClr}" size="+16">(Command </font><font color="${HPinkClr}" size="+16">"fps gui searchnpc <name>"</font><font color="${PinkClr}" size="+16"> to search for a specific NPC's name, Case sensitive)</font>` })
|
|
|
+ TmpData.push(
|
|
|
+ { text: `<br><br><font color="${PinkClr}" size="+16">(Command </font><font color="${HPinkClr}" size="+16">"fps gui searchnpc <name>"</font><font color="${PinkClr}" size="+16"> to search for a specific NPCs names, Case sensitive)</font>` },
|
|
|
+ { text: `<br><br><font color="${PinkClr}" size="+16">(Command </font><font color="${HPinkClr}" size="+16">"fps gui npc <letters>"</font><font color="${PinkClr}" size="+16"> to search for NPCs names that starts with that 'letters', Case sensitive)</font>` },
|
|
|
+ { text: `<br><br><font color="${PinkClr}" 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. \`fps gui npcsearch "Bay Kamara"\`</font>` }
|
|
|
+ )
|
|
|
gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - NPCs </font><font color="${YellowClr}">(Main)</font>`)
|
|
|
TmpData = []
|
|
|
break;
|
|
|
@@ -130,8 +133,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ 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 on <font color="${RedClr}">Red</font> to hide & add to blacklist.<br>Click on <font color="${GreenClr}">Green</font> to show & remove from blacklist</font><br>` }
|
|
|
)
|
|
|
- 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><br>`, command: mod.settings.PlayersBlacklist.includes(SpawnedPlayers[i].name) ? `fps show ${SpawnedPlayers[i].name};fps gui show` : `fps hide ${SpawnedPlayers[i].name};fps gui show` })
|
|
|
+ for (let i in SpawnedUsers) {
|
|
|
+ TmpData.push({ text: `<font color="${mod.settings.PlayersBlacklist.includes(SpawnedUsers[i].name) ? GreenClr : RedClr}" size="+17">${SpawnedUsers[i].name}</font><br>`, command: mod.settings.PlayersBlacklist.includes(SpawnedUsers[i].name) ? `fps show ${SpawnedUsers[i].name};fps gui show` : `fps hide ${SpawnedUsers[i].name};fps gui show` })
|
|
|
}
|
|
|
gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - Players </font><font color="${RedClr}">(In-distance)</font>`)
|
|
|
TmpData = []
|
|
|
@@ -149,7 +152,6 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "skills":
|
|
|
gui.parse([
|
|
|
{ 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 ? 'Hidden' : 'Shown'}]</p></font><br><br>`, command: `fps skill blacklist;fps gui skills` },
|
|
|
{ text: `<font color="${YellowClr}" size="+20">Tankers:</font>		` },
|
|
|
{ text: `<font color="${LBlueClr}" size="+18">(Lancer)</font>`, command: `fps gui class lancer` },
|
|
|
{ text: " " },
|
|
|
@@ -226,8 +228,6 @@ module.exports = function FpsUtils(mod) {
|
|
|
TmpData.push(
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
|
{ text: `<font color="${mod.settings.AbnDebug ? GreenClr : RedClr}" size="+19"><p align="right">Debug</p></font><br>`, command: `fps abn log;fps gui abn` },
|
|
|
- { text: `<font color="${mod.settings.HideAllAbnormalities ? GreenClr : RedClr}" size="+22">[All Abnormalities are ${mod.settings.HideAllAbnormalities ? 'Hidden' : 'Shown'}]</font><br>`, command: `fps abn all;fps gui abn` },
|
|
|
- { text: `<font color="${mod.settings.HideBlacklistedAbnormalities ? GreenClr : RedClr}" size="+22">[Blacklisted Abnormalities are ${mod.settings.HideBlacklistedAbnormalities ? 'Hidden' : 'Shown'}]</font><br><br>`, command: `fps abn blacklist;fps gui abn` },
|
|
|
{ text: `<font color="${LPurpleClr}" size="+19">Blacklist: </font><font color="${PinkClr}" size="17+">Click to remove from the blacklist.</font><br>` }
|
|
|
)
|
|
|
mod.settings.AbnormalitiesBlacklist.forEach(abnmem => TmpData.push({ text: `<font color="${BronzeClr}" size="+16">${abnmem}<br></font>`, command: `fps abn blacklist remv ${abnmem};fps gui abn` }))
|
|
|
@@ -239,47 +239,45 @@ module.exports = function FpsUtils(mod) {
|
|
|
TmpData.push(
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
|
{ text: `<font color="${mod.settings.ProjDebug ? GreenClr : RedClr}" size="+19"><p align="right">Debug</p></font><br>`, command: `fps proj log;fps gui proj` },
|
|
|
- { text: `<font color="${mod.settings.HideAllProjectiles ? GreenClr : RedClr}" size="+22">[All Projectiles are ${mod.settings.HideAllProjectiles ? 'Hidden' : 'Shown'}]</font><br>`, command: `fps proj all;fps gui proj` },
|
|
|
- { text: `<font color="${mod.settings.HideBlacklistedProjectiles ? GreenClr : RedClr}" size="+22">[Blacklisted Projectiles are ${mod.settings.HideBlacklistedProjectiles ? 'Hidden' : 'Shown'}] </font><br><br>`, command: `fps proj blacklist;fps gui proj` },
|
|
|
{ text: `<font color="${LPurpleClr}" size="+19">Blacklist: </font><font color="${PinkClr}" size="17+">Click to remove from the blacklist.</font><br>` }
|
|
|
)
|
|
|
mod.settings.ProjectilesBlacklist.forEach(projmem => TmpData.push({ text: `<font color="${BronzeClr}" size="+16">${projmem}<br></font>`, command: `fps proj blacklist remv ${projmem};fps gui proj` }))
|
|
|
gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - Projectiles</font>`)
|
|
|
TmpData = []
|
|
|
break;
|
|
|
- case "help": //(Noto Sans JP-KR-SC-TC_NL) *hopefully* now it will be read-able by all regions.
|
|
|
+ case "help":
|
|
|
gui.parse([
|
|
|
{ text: `<font color="${PurpleClr}" size="+24"><p align="right">MAIN MENU</p></font><br>`, command: `fps gui` },
|
|
|
{ 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 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>`)
|
|
|
break;
|
|
|
default:
|
|
|
gui.parse([
|
|
|
- { text: `<font color="${PurpleClr}" size="+24"><p align="right">REFRESH</p></font><br><br>`, command: `fps gui` },
|
|
|
+ { text: `<font color="${PurpleClr}" size="+24"><p align="right">REFRESH</p></font><br>`, command: `fps gui` },
|
|
|
{ text: `<font color="${YellowClr}" size="+21">Modes:</font>		` },
|
|
|
{ text: `<font color="${mod.settings.Mode === 0 ? GreenClr : RedClr}" size="+18">[Mode 0]</font>`, command: `fps mode 0;fps gui` },
|
|
|
{ text: " " },
|
|
|
@@ -289,29 +287,41 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ text: " " },
|
|
|
{ text: `<font color="${mod.settings.Mode === 3 ? GreenClr : RedClr}" size="+18">[Mode 3]</font><br><br>`, command: `fps mode 3;fps gui` },
|
|
|
{ text: `<font color="${YellowClr}" size="+21">Hit:</font>			` },
|
|
|
- { text: `<font color="${mod.settings.Hit_Me ? GreenClr : RedClr}" size="+18">[Own effect]</font>`, command: `fps hit me;fps gui` },
|
|
|
- { text: " " },
|
|
|
{ text: `<font color="${mod.settings.Hit_Other ? GreenClr : RedClr}" size="+18">[Players effect]</font>`, command: `fps hit other;fps gui` },
|
|
|
{ text: " " },
|
|
|
+ { text: `<font color="${mod.settings.Hit_Me ? GreenClr : RedClr}" size="+18">[Own effect]</font>`, command: `fps hit me;fps gui` },
|
|
|
+ { text: " " },
|
|
|
{ text: `<font color="${mod.settings.Hit_Damage ? GreenClr : RedClr}" size="+18">[Damage numbers]</font><br><br>`, command: `fps hit damage;fps gui` },
|
|
|
{ text: `<font color="${YellowClr}" size="+21">Hide:</font>		` },
|
|
|
- { text: `<font color="${mod.settings.HideMySummons ? GreenClr : RedClr}" size="+17">[Own summons]</font>`, command: `fps summons me;fps gui` },
|
|
|
- { text: " " },
|
|
|
{ text: `<font color="${mod.settings.HideOthersSummons ? GreenClr : RedClr}" size="+17">[Players summons]</font>`, command: `fps summons;fps gui` },
|
|
|
{ text: " " },
|
|
|
+ { text: `<font color="${mod.settings.HideMySummons ? GreenClr : RedClr}" size="+17">[Own summons]</font>`, command: `fps summons me;fps gui` },
|
|
|
+ { text: " " },
|
|
|
{ text: `<font color="${mod.settings.HideFireworks ? GreenClr : RedClr}" size="+17">[Fireworks]</font><br>`, command: `fps fireworks;fps gui` },
|
|
|
{ text: `			` },
|
|
|
- { text: `<font color="${mod.settings.OnlyParty ? GreenClr : RedClr}" size="+17">[Everyone but party]</font>`, command: `fps party;fps gui` },
|
|
|
+ { text: `<font color="${mod.settings.ShowStyle ? GreenClr : RedClr}" size="+17">[Style]</font>`, command: `fps style;fps gui` },
|
|
|
{ text: " " },
|
|
|
{ text: `<font color="${mod.settings.Hideguildlogos ? GreenClr : RedClr}" size="+17">[Guild Logos]</font>`, command: `fps guildlogo;fps gui` },
|
|
|
{ text: " " },
|
|
|
- { text: `<font color="${mod.settings.ShowStyle ? GreenClr : RedClr}" size="+17">[Style]</font>`, command: `fps style;fps gui` },
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedDrop ? GreenClr : RedClr}" size="+17">[Drops]</font>`, command: `fps dropitem;fps gui` },
|
|
|
+ { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.HideOwnBlacklistedAbns ? GreenClr : RedClr}" size="+17">[Dizziness]</font><br>`, command: `fps screenabns;fps gui` },
|
|
|
+ { text: `			` },
|
|
|
+ { text: `<font color="${mod.settings.HideAllAbnormalities ? GreenClr : RedClr}" size="+16">[All Abnormals]</font>`, command: `fps abn all;fps gui` },
|
|
|
+ { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedAbnormalities ? GreenClr : RedClr}" size="+16">[Abnormals BList]</font>`, command: `fps abn blacklist;fps gui` },
|
|
|
+ { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.HideAllProjectiles ? GreenClr : RedClr}" size="+16">[All Projs]</font>`, command: `fps proj all;fps gui` },
|
|
|
{ text: " " },
|
|
|
- { text: `<font color="${mod.settings.HideBlacklistedDrop ? GreenClr : RedClr}" size="+17">[Drops]</font><br>`, command: `fps dropitem;fps gui` },
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedProjectiles ? GreenClr : RedClr}" size="+16">[Projs BList]</font><br>`, command: `fps proj blacklist;fps gui` },
|
|
|
{ text: `			` },
|
|
|
- { text: `<font color="${mod.settings.HideMonsterDeathAnimation ? GreenClr : RedClr}" size="+17">[Monsters Death Animation]</font>`, command: `fps monsterdeathani;fps gui` },
|
|
|
+ { text: `<font color="${mod.settings.HideMonsterDeathAnimation ? GreenClr : RedClr}" size="+17">[NPCs Death Ani]</font>`, command: `fps monsterdeathani;fps gui` },
|
|
|
{ text: " " },
|
|
|
- { text: `<font color="${mod.settings.HideOwnBlacklistedAbns ? GreenClr : RedClr}" size="+17">[Screen Abns]</font><br><br>`, command: `fps screenabns;fps gui` },
|
|
|
+ { text: `<font color="${mod.settings.ActionScripts ? GreenClr : RedClr}" size="+17">[NPCs Zoom-in]</font>`, command: `fps npczoom;fps gui` },
|
|
|
+ { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedNpcs ? GreenClr : RedClr}" size="+16">[NPCs BList]</font>`, command: `fps npc;fps gui` },
|
|
|
+ { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.HideBlacklistedSkills ? GreenClr : RedClr}" size="+16">[Skills BList]</font><br><br>`, command: `fps skill blacklist;fps gui` },
|
|
|
{ text: `<font color="${YellowClr}" size="+21">Players:</font>	` },
|
|
|
{ text: `<font color="${LBlueClr}" size="+18">[Hidden list]</font>`, command: `fps gui hide` },
|
|
|
{ text: " " },
|
|
|
@@ -329,8 +339,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ text: " " },
|
|
|
{ text: `<font color="${mod.settings.RaidAutoChange ? GreenClr : RedClr}" size="+17">[Raid auto state]</font>`, command: `fps raid;fps gui` },
|
|
|
{ text: " " },
|
|
|
- { text: `<font color="${mod.settings.ActionScripts ? GreenClr : RedClr}" size="+17">[Npc zoom-ins]</font>`, command: `fps npczoom;fps gui` },
|
|
|
- { text: `<br><br><br><br><br>` },
|
|
|
+ { text: `<font color="${mod.settings.OnlyParty ? GreenClr : RedClr}" size="+17">[Only Party]</font>`, command: `fps party;fps gui` },
|
|
|
+ { text: `<br><br><br><br>` },
|
|
|
{ text: `<font color="${BlueClr}" size="+22">Quick Links:</font><br>` },
|
|
|
{ text: `<font color="${DBlueClr}" size="+21">UI:</font>		` },
|
|
|
{ text: `<font color="${PurpleClr}" size="+17">[Mail]</font>`, command: `fps quicklink parcel` },
|
|
|
@@ -352,12 +362,13 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ text: `<font color="${CPinkClr}" size="+17">[Disband]</font><br>`, command: `fps quicklink disband` },
|
|
|
{ text: `<font color="${DBlueClr}" size="+21">Extra:</font>	` },
|
|
|
{ text: `<font color="${CPinkClr}" size="+17">[Lobby]</font>`, command: `fps quicklink lobby` },
|
|
|
- { text: "				 " },
|
|
|
+ { text: "						 " },
|
|
|
{ text: `<font color="${HPinkClr}" 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>`)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// ~~~ * Gui Functions * ~~~ \\
|
|
|
|
|
|
function SkillsList(value) {
|
|
|
@@ -381,24 +392,9 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function JsonSearch(nameKey, array, arg, title) {
|
|
|
for (let i = 0; i < array.length; i++) {
|
|
|
- if (array[i].Name.startsWith(nameKey) && arg == `starts`) {
|
|
|
- TmpData.push({
|
|
|
- command: `fps npc hide ${array[i].HuntingZoneId} ${array[i].TemplateId};fps gui npc ${nameKey}`, text: `<font color="${mod.settings.NpcsBlacklist.some(() => {
|
|
|
- return mod.settings.NpcsBlacklist.some(arrVal => {
|
|
|
- if (array[i].HuntingZoneId == arrVal.zone && array[i].TemplateId == arrVal.templateId) return true;
|
|
|
- return false;
|
|
|
- })
|
|
|
- }) ? GreenClr : RedClr}" size="+17">${array[i].Name}</font><br>`
|
|
|
- })
|
|
|
- }
|
|
|
- if (array[i].Name.includes(nameKey) && arg == `search`) {
|
|
|
- TmpData.push({ command: `fps npc hide ${array[i].HuntingZoneId} ${array[i].TemplateId};fps gui npc ${nameKey}`, text: `<font color="${BronzeClr}" size="+17">${array[i].Name}</font><br>` })
|
|
|
- }
|
|
|
- if (!isNaN(arg)) {
|
|
|
- if (array[i].nameKey == arg) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+ if (array[i].Name.startsWith(nameKey) && arg == `starts`) TmpData.push({ command: `fps npc hide ${array[i].HuntingZoneId} ${array[i].TemplateId};fps gui npc ${nameKey}`, text: `<font color="${mod.settings.NpcsBlacklist.some(arrVal => array[i].HuntingZoneId == arrVal.zone && array[i].TemplateId == arrVal.templateId) ? GreenClr : RedClr}" size="+17">${array[i].Name} - ${array[i].HuntingZoneId}, ${array[i].TemplateId}</font><br>` })
|
|
|
+ if (array[i].Name.includes(nameKey) && arg == `search`) TmpData.push({ command: `fps npc hide ${array[i].HuntingZoneId} ${array[i].TemplateId};fps gui npcsearch ${nameKey}`, text: `<font color="${mod.settings.NpcsBlacklist.some(arrVal => array[i].HuntingZoneId == arrVal.zone && array[i].TemplateId == arrVal.templateId) ? GreenClr : RedClr}" size="+17">${array[i].Name} - ${array[i].HuntingZoneId}, ${array[i].TemplateId}</font><br>` })
|
|
|
+ if (!isNaN(arg) && array[i].nameKey == arg) return true;
|
|
|
}
|
|
|
gui.parse(TmpData, `<font color="${LPurpleClr}">[FPS] Options - NPCs</font> | ` + title)
|
|
|
TmpData = []
|
|
|
@@ -406,9 +402,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function ClassNameFromID(name) {
|
|
|
for (let Class_data of Object.keys(mod.settings.ClassesData)) {
|
|
|
- if (mod.settings.ClassesData[Class_data].name == name) {
|
|
|
- return Class_data;
|
|
|
- }
|
|
|
+ if (mod.settings.ClassesData[Class_data].name == name) return Class_data;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -419,20 +413,20 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
|
|
|
function HideSpecificPlayer(name) {
|
|
|
- for (let i in SpawnedPlayers) {
|
|
|
- if (SpawnedPlayers[i].name.toString().toLowerCase() === name.toLowerCase()) {
|
|
|
- mod.send('S_DESPAWN_USER', 3, { gameId: SpawnedPlayers[i].gameId, type: 1 });
|
|
|
- HiddenUsers[SpawnedPlayers[i].gameId] = SpawnedPlayers[i];
|
|
|
+ for (let i in SpawnedUsers) {
|
|
|
+ if (SpawnedUsers[i].name.toString().toLowerCase() === name.toLowerCase()) {
|
|
|
+ mod.toClient('S_DESPAWN_USER', 3, { gameId: SpawnedUsers[i].gameId, type: 1 });
|
|
|
+ HiddenUsers[SpawnedUsers[i].gameId] = SpawnedUsers[i];
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function RemoveEntry(name) {
|
|
|
- let what, a = arguments, L = a.length, ax;
|
|
|
- while (L > 1 && name.length) {
|
|
|
- what = a[--L];
|
|
|
- while ((ax = name.indexOf(what)) !== -1) { name.splice(ax, 1); }
|
|
|
+ function RemoveEntity(name) {
|
|
|
+ let what, A = arguments, Al = A.length, Ax;
|
|
|
+ while (Al > 1 && name.length) {
|
|
|
+ what = A[--Al];
|
|
|
+ while ((Ax = name.indexOf(what)) !== -1) name.splice(Ax, 1);
|
|
|
}
|
|
|
return name;
|
|
|
}
|
|
|
@@ -441,7 +435,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
for (let i in HiddenUsers) {
|
|
|
if (HiddenUsers[i].name.toString().toLowerCase() === name.toLowerCase()) {
|
|
|
ModifyAppearance(HiddenUsers[i]);
|
|
|
- mod.send('S_SPAWN_USER', 14, HiddenUsers[i]);
|
|
|
+ mod.toClient('S_SPAWN_USER', 14, HiddenUsers[i]);
|
|
|
delete HiddenUsers[i];
|
|
|
return;
|
|
|
}
|
|
|
@@ -450,9 +444,9 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function HideAllPlayers() {
|
|
|
if (!mod.settings.OnlyParty) {
|
|
|
- for (let i in SpawnedPlayers) {
|
|
|
- mod.send('S_DESPAWN_USER', 3, { gameId: SpawnedPlayers[i].gameId, type: 1 });
|
|
|
- HiddenUsers[SpawnedPlayers[i].gameId] = SpawnedPlayers[i];
|
|
|
+ for (let i in SpawnedUsers) {
|
|
|
+ mod.toClient('S_DESPAWN_USER', 3, { gameId: SpawnedUsers[i].gameId, type: 1 });
|
|
|
+ HiddenUsers[SpawnedUsers[i].gameId] = SpawnedUsers[i];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -460,7 +454,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
function ShowAllPlayers() {
|
|
|
for (let i in HiddenUsers) {
|
|
|
ModifyAppearance(HiddenUsers[i]);
|
|
|
- mod.send('S_SPAWN_USER', 14, HiddenUsers[i]);
|
|
|
+ mod.toClient('S_SPAWN_USER', 14, HiddenUsers[i]);
|
|
|
delete HiddenUsers[i];
|
|
|
}
|
|
|
}
|
|
|
@@ -495,12 +489,12 @@ module.exports = function FpsUtils(mod) {
|
|
|
let modified = false;
|
|
|
|
|
|
if (mod.settings.Hit_Me) {
|
|
|
- event.skill = { npc: 0, type: 0, id: 0 };
|
|
|
+ event.skill = { reserved: 0, npc: false, type: 0, huntingZoneId: 0, id: 0 };
|
|
|
modified = true;
|
|
|
}
|
|
|
|
|
|
if (mod.settings.Hit_Damage) {
|
|
|
- event.damage = event.type = event.noctEffect = event.stackExplode = 0;
|
|
|
+ event.damage = event.type = event.crit = event.noctEffect = event.stackExplode = 0;
|
|
|
modified = true;
|
|
|
}
|
|
|
|
|
|
@@ -511,8 +505,12 @@ module.exports = function FpsUtils(mod) {
|
|
|
return (m % 100)
|
|
|
}
|
|
|
|
|
|
+ function log(Name, type, from, target, id) {
|
|
|
+ console.log(`[\x1b[37m${new Date().toJSON().slice(11, 23)}\x1b[39m] \x1b[91m->\x1b[39m \x1b[36m${Name}\x1b[39m \x1b[35m${type}\x1b[39m \x1b[97m${from}\x1b[39m \x1b[32m'${target}'\x1b[39m: \x1b[94m\ID\x1b[39m "\x1b[31m${id}\x1b[39m\x1b[49m\x1b[0m"`);
|
|
|
+ }
|
|
|
+
|
|
|
function UpdateLoc(event) {
|
|
|
- mod.send('S_USER_LOCATION', 5, { gameId: event.gameId, loc: event.loc, dest: event.loc, w: event.w, speed: 300, type: 7 });
|
|
|
+ mod.toClient('S_USER_LOCATION', 5, { gameId: event.gameId, loc: event.loc, dest: event.loc, w: event.w, speed: 300, type: 7 });
|
|
|
}
|
|
|
|
|
|
// ~~~* Hook functions * ~~~ \\
|
|
|
@@ -533,7 +531,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
|
|
|
function sLoadTopo() {
|
|
|
- SpawnedPlayers = {};
|
|
|
+ SpawnedUsers = {};
|
|
|
HiddenUsers = {};
|
|
|
HiddenNpcs = {};
|
|
|
if (mod.settings.ProjDebug) {
|
|
|
@@ -549,7 +547,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
function sLeaveParty() {
|
|
|
PartyMembers = []
|
|
|
if (mod.settings.RaidAutoChange) {
|
|
|
- if (mod.settings.Mode !== 2 || !LastState) return;
|
|
|
+ if (!LastState || mod.settings.Mode !== 2) return;
|
|
|
mod.command.exec(`fps mode ${LastState}`)
|
|
|
LastState = null;
|
|
|
}
|
|
|
@@ -557,7 +555,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function sMountVehicle(event) {
|
|
|
if (EqGid(event.gameId)) return;
|
|
|
- SpawnedPlayers[event.gameId].mount = event.id
|
|
|
+ SpawnedUsers[event.gameId].mount = event.id
|
|
|
if (HiddenUsers[event.gameId]) HiddenUsers[event.gameId].mount = event.id;
|
|
|
if (mod.settings.ShowStyle) {
|
|
|
event.id = 231
|
|
|
@@ -567,7 +565,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function sUnmountVehicle(event) {
|
|
|
if (EqGid(event.gameId)) return;
|
|
|
- SpawnedPlayers[event.gameId].mount = 0
|
|
|
+ SpawnedUsers[event.gameId].mount = 0
|
|
|
if (HiddenUsers[event.gameId]) HiddenUsers[event.gameId].mount = 0;
|
|
|
}
|
|
|
|
|
|
@@ -613,7 +611,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
|
|
|
function sSpawnUser(event) {
|
|
|
- SpawnedPlayers[event.gameId] = event;
|
|
|
+ SpawnedUsers[event.gameId] = event;
|
|
|
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;
|
|
|
return false;
|
|
|
@@ -627,11 +625,11 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function sDespawnUser(event) {
|
|
|
delete HiddenUsers[event.gameId];
|
|
|
- delete SpawnedPlayers[event.gameId];
|
|
|
+ delete SpawnedUsers[event.gameId];
|
|
|
}
|
|
|
|
|
|
function sUserLocation(event) {
|
|
|
- if (SpawnedPlayers[event.gameId]) SpawnedPlayers[event.gameId].loc = event.dest;
|
|
|
+ if (SpawnedUsers[event.gameId]) SpawnedUsers[event.gameId].loc = event.dest;
|
|
|
if (HiddenUsers[event.gameId]) {
|
|
|
HiddenUsers[event.gameId].loc = event.dest;
|
|
|
return false;
|
|
|
@@ -644,11 +642,11 @@ module.exports = function FpsUtils(mod) {
|
|
|
event.members.map(value => PartyMembers.push(value.name))
|
|
|
if (mod.settings.RaidAutoChange) {
|
|
|
if (event.members.length >= 18) {
|
|
|
- if (mod.settings.Mode === 3 || (mod.settings.Mode === 2 && LastState)) return;
|
|
|
+ if (mod.settings.Mode === 3 || (LastState && mod.settings.Mode === 2)) return;
|
|
|
LastState = mod.settings.Mode
|
|
|
mod.command.exec(`fps mode 2`)
|
|
|
} else {
|
|
|
- if (mod.settings.Mode !== 2 || !LastState) return;
|
|
|
+ if (!LastState || mod.settings.Mode !== 2) return;
|
|
|
mod.command.exec(`fps mode ${LastState}`)
|
|
|
LastState = null;
|
|
|
}
|
|
|
@@ -661,7 +659,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
|
|
|
function sUnicastTransformData(event) {
|
|
|
- if (EqGid(event.gameId) || event.gameId == 0) return;
|
|
|
+ if (event.gameId == 0 || EqGid(event.gameId)) return;
|
|
|
if (mod.settings.ShowStyle) return false;
|
|
|
if (mod.settings.Hideguildlogos) {
|
|
|
event.guildLogo = '';
|
|
|
@@ -669,11 +667,6 @@ 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) {
|
|
|
if (mod.settings.HideBlacklistedNpcs) {
|
|
|
for (let i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
|
|
|
@@ -684,7 +677,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
}
|
|
|
if (event.huntingZoneId === 1023) {
|
|
|
- if (mod.settings.HideFireworks && (event.templateId == 60016000 || event.templateId == 80037000)) return false;
|
|
|
+ if (mod.settings.HideFireworks && (event.templateId === 60016000 || event.templateId === 80037000)) return false;
|
|
|
if (EqGid(event.owner)) {
|
|
|
if (!mod.settings.HideMySummons) return;
|
|
|
HiddenNpcs[event.gameId] = event;
|
|
|
@@ -717,10 +710,10 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function sAbnormalityBegin(event) {
|
|
|
if (mod.settings.AbnDebug) {
|
|
|
- if (EqGid(event.target)) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mAbnormality \x1b[4mStarted\x1b[0m \x1b[44mon\x1b[0m \x1b[37m'${MyName}'\x1b[0m:\x1b[33m \ID "\x1b[32m${event.id}\x1b[0m"`);
|
|
|
- if (EqGid(event.source)) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mAbnormality \x1b[4mStarted\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${MyName}'\x1b[0m:\x1b[33m \ID "\x1b[32m${event.id}\x1b[0m"`);
|
|
|
- if (SpawnedPlayers[event.target]) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mAbnormality \x1b[4mStarted\x1b[0m \x1b[44mon\x1b[0m \x1b[37m'${SpawnedPlayers[event.target].name}'\x1b[0m:\x1b[33m \ID "\x1b[32m${event.id}\x1b[0m"`);
|
|
|
- if (SpawnedPlayers[event.source]) console.log(`\x1b[2m[${new Date().toTimeString().slice(0, 8)}]\x1b[0m \x1b[31m->\x1b[0m \x1b[36mAbnormality \x1b[4mStarted\x1b[0m \x1b[45mfrom\x1b[0m \x1b[37m'${SpawnedPlayers[event.source].name}'\x1b[0m:\x1b[33m \ID "\x1b[32m${event.id}\x1b[0m"`);
|
|
|
+ if (EqGid(event.target)) log('Abnormality', 'Applied', 'on', MyName, event.id)
|
|
|
+ if (EqGid(event.source)) log('Abnormality', 'Started', 'from', MyName, event.id)
|
|
|
+ if (SpawnedUsers[event.target]) log('Abnormality', 'Applied', 'on', SpawnedUsers[event.target].name, event.id)
|
|
|
+ if (SpawnedUsers[event.source]) log('Abnormality', 'Started', 'from', SpawnedUsers[event.source].name, event.id)
|
|
|
}
|
|
|
if (EqGid(event.target)) {
|
|
|
if (mod.settings.HideOwnBlacklistedAbns && mod.settings.OwnAbnormalsBlacklist.includes(event.id)) return false;
|
|
|
@@ -728,20 +721,20 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
if (HiddenUsers[event.target]) return false;
|
|
|
if (mod.settings.HideBlacklistedAbnormalities && mod.settings.AbnormalitiesBlacklist.includes(event.id)) return false;
|
|
|
- if (mod.settings.HideAllAbnormalities && (SpawnedPlayers[event.target] || SpawnedPlayers[event.source] || mod.settings.AbnormalitiesBlacklist.includes(event.id))) return false;
|
|
|
+ if (mod.settings.HideAllAbnormalities && (SpawnedUsers[event.target] || SpawnedUsers[event.source] || mod.settings.AbnormalitiesBlacklist.includes(event.id))) return false;
|
|
|
}
|
|
|
|
|
|
function sAbnormalityRefresh(event) {
|
|
|
if (HiddenUsers[event.target]) return false;
|
|
|
- if ((mod.settings.HideBlacklistedAbnormalities || mod.settings.HideAllAbnormalities) && (SpawnedPlayers[[10306, 10316, 12001, 12003, 12120, 12130].includes(event.target)] || SpawnedPlayers[[10306, 10316, 12001, 12003, 12120, 12130].includes(event.source)])) return false;
|
|
|
+ if ((mod.settings.HideBlacklistedAbnormalities || mod.settings.HideAllAbnormalities) && (SpawnedUsers[[10306, 10316, 12001, 12003, 12120, 12130].includes(event.target)] || SpawnedUsers[[10306, 10316, 12001, 12003, 12120, 12130].includes(event.source)])) return false;
|
|
|
}
|
|
|
|
|
|
function sAbnormalityFail(event) {
|
|
|
- if (event.id == 3000021) return false;
|
|
|
+ if ([3000021, 99020000].includes(event.id)) return false;
|
|
|
}
|
|
|
|
|
|
function sActionStage(event) {
|
|
|
- if (EqGid(event.gameId) || !SpawnedPlayers[event.gameId]) return;
|
|
|
+ if (EqGid(event.gameId) || !SpawnedUsers[event.gameId]) return;
|
|
|
if ((mod.settings.Mode >= 2) || HiddenUsers[event.gameId] || (mod.settings.HideBlacklistedSkills && mod.settings.ClassesData[ClassID(event.templateId)].CD_SkillsBlacklist.includes(Math.floor(event.skill.id / 10000).toString())) || mod.settings.ClassesData[ClassID(event.templateId)].CD_HideBlacklistedSkills) {
|
|
|
UpdateLoc(event);
|
|
|
return false;
|
|
|
@@ -750,29 +743,27 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
function sStartUserProjectile(event) {
|
|
|
if (mod.settings.ProjDebug) {
|
|
|
- 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 (EqGid(event.gameId)) log('Projectile', 'Started', 'from', MyName, event.skill.id)
|
|
|
+ if (SpawnedUsers[event.gameId]) log('Projectile', 'Started', 'from', SpawnedUsers[event.source].name, event.skill.id)
|
|
|
}
|
|
|
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) && SpawnedUsers[event.gameId] && (HiddenUsers[event.gameId] || mod.settings.Mode > 0 || mod.settings.HideAllProjectiles)) return false;
|
|
|
}
|
|
|
|
|
|
function sSpawnProjectile(event) {
|
|
|
if (mod.settings.ProjDebug) {
|
|
|
- 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 (EqGid(event.gameId)) log('Projectile', 'Spawned', 'from', MyName, event.skill.id)
|
|
|
+ if (SpawnedUsers[event.gameId]) log('Projectile', 'Started', 'from', SpawnedUsers[event.source].name, event.skill.id)
|
|
|
}
|
|
|
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) && SpawnedUsers[event.gameId] && (HiddenUsers[event.gameId] || mod.settings.Mode > 0 || mod.settings.HideAllProjectiles)) return false;
|
|
|
}
|
|
|
|
|
|
function sEachSkillResult(event) {
|
|
|
- if (EqGid(event.source) || EqGid(event.owner)) {
|
|
|
- if (ModifySkillResult(event)) return true;
|
|
|
- }
|
|
|
- if (!EqGid(event.target) && mod.settings.Hit_Other && (SpawnedPlayers[event.owner] || SpawnedPlayers[event.source])) {
|
|
|
- event.skill = { npc: 0, type: 0, id: 0 };
|
|
|
- event.id = event.damage = event.type = event.noctEffect = event.crit = event.stackExplode = event.blocked = event.reaction.skill = 0;
|
|
|
+ if ((EqGid(event.source) || EqGid(event.owner)) && ModifySkillResult(event)) return true;
|
|
|
+ if (!EqGid(event.target) && mod.settings.Hit_Other && (SpawnedUsers[event.owner] || SpawnedUsers[event.source])) {
|
|
|
+ event.skill = { reserved: 0, npc: false, type: 0, huntingZoneId: 0, id: 0 };
|
|
|
+ event.id = event.damage = event.type = event.crit = event.noctEffect = event.crit = event.stackExplode = event.blocked = event.reaction.skill = 0;
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
@@ -820,7 +811,6 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.hook('S_PARTY_MEMBER_LIST', 7, sPartyMemberList)
|
|
|
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_DESPAWN_NPC', 3, sDespawnNpc)
|
|
|
@@ -863,11 +853,13 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "3":
|
|
|
mod.command.exec('fps mode 3');
|
|
|
break;
|
|
|
+ case "mod":
|
|
|
case "mode":
|
|
|
case "state":
|
|
|
switch (arg) {
|
|
|
case "0":
|
|
|
case "off":
|
|
|
+ case "zero":
|
|
|
if (mod.settings.Mode === 3) ShowAllPlayers();
|
|
|
mod.settings.Mode = 0;
|
|
|
mod.settings.HideAllAbnormalities = false;
|
|
|
@@ -911,10 +903,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
break;
|
|
|
case "hide":
|
|
|
if (typeof arg === "string" && arg !== null) {
|
|
|
- if (mod.settings.PlayersBlacklist.includes(arg)) {
|
|
|
- Msg(`Player "${arg}"` + ` Already hidden`.clr(RedClr) + '.');
|
|
|
- return;
|
|
|
- } else
|
|
|
+ if (mod.settings.PlayersBlacklist.includes(arg)) return Msg(`Player "${arg}"` + ` Already hidden`.clr(RedClr) + '.');
|
|
|
+ else
|
|
|
if ((mod.settings.ClassesNames.includes(arg) && !mod.settings.ClassesBlacklist.includes(arg)) || (mod.settings.RolesNames.includes(arg) && !mod.settings.RolesBlacklist.includes(arg))) {
|
|
|
for (let i in mod.settings.ClassesData) {
|
|
|
if ((mod.settings.ClassesData[i].name === arg || mod.settings.ClassesData[i].role.includes(arg)) && mod.settings.ClassesData[i].isHidden !== true) {
|
|
|
@@ -922,17 +912,14 @@ module.exports = function FpsUtils(mod) {
|
|
|
if (mod.settings.ClassesData[i].name === arg) mod.settings.ClassesBlacklist.push(arg);
|
|
|
if (mod.settings.ClassesData[i].role.includes(arg)) mod.settings.RolesBlacklist.push(arg);
|
|
|
let classtohide = mod.settings.ClassesData[i].model;
|
|
|
- for (let i in SpawnedPlayers) {
|
|
|
- if (ClassID(SpawnedPlayers[i].templateId) === classtohide) HideSpecificPlayer(SpawnedPlayers[i].name);
|
|
|
+ for (let i in SpawnedUsers) {
|
|
|
+ if (ClassID(SpawnedUsers[i].templateId) === classtohide) HideSpecificPlayer(SpawnedUsers[i].name);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
Msg(`Class/Role ${arg}` + ` Hidden`.clr(GreenClr) + '.');
|
|
|
return;
|
|
|
- } else if (mod.settings.ClassesBlacklist.includes(arg) || mod.settings.RolesBlacklist.includes(arg)) {
|
|
|
- Msg(`Class/Role "${arg}"` + ` Already hidden`.clr(RedClr) + '.');
|
|
|
- return;
|
|
|
- }
|
|
|
+ } else if (mod.settings.ClassesBlacklist.includes(arg) || mod.settings.RolesBlacklist.includes(arg)) return Msg(`Class/Role "${arg}"` + ` Already hidden`.clr(RedClr) + '.');
|
|
|
Msg(`Player "${arg}"` + ` Hidden`.clr(GreenClr) + '.');
|
|
|
mod.settings.PlayersBlacklist.push(arg);
|
|
|
HideSpecificPlayer(arg);
|
|
|
@@ -942,15 +929,15 @@ module.exports = function FpsUtils(mod) {
|
|
|
if (typeof arg === "string" && arg !== null) {
|
|
|
if (mod.settings.PlayersBlacklist.includes(arg)) {
|
|
|
ShowSpecificPlayer(arg);
|
|
|
- RemoveEntry(mod.settings.PlayersBlacklist, arg);
|
|
|
+ RemoveEntity(mod.settings.PlayersBlacklist, arg);
|
|
|
Msg(`Player "${arg}"` + ` Shown`.clr(RedClr) + '.');
|
|
|
return;
|
|
|
}
|
|
|
if ((mod.settings.ClassesNames.includes(arg) && mod.settings.ClassesBlacklist.includes(arg)) || (mod.settings.RolesBlacklist.includes(arg) && mod.settings.RolesNames.includes(arg))) {
|
|
|
for (let i in mod.settings.ClassesData) {
|
|
|
if (mod.settings.ClassesData[i].name === arg || mod.settings.ClassesData[i].role.includes(arg)) {
|
|
|
- if (mod.settings.ClassesData[i].name === arg) RemoveEntry(mod.settings.ClassesBlacklist, arg);
|
|
|
- if (mod.settings.ClassesData[i].role.includes(arg)) RemoveEntry(mod.settings.RolesBlacklist, arg);
|
|
|
+ if (mod.settings.ClassesData[i].name === arg) RemoveEntity(mod.settings.ClassesBlacklist, arg);
|
|
|
+ if (mod.settings.ClassesData[i].role.includes(arg)) RemoveEntity(mod.settings.RolesBlacklist, arg);
|
|
|
mod.settings.ClassesData[i].isHidden = false;
|
|
|
let classToShow = mod.settings.ClassesData[i].model;
|
|
|
for (let i in HiddenUsers) {
|
|
|
@@ -968,10 +955,10 @@ module.exports = function FpsUtils(mod) {
|
|
|
if (mod.settings.Mode === 3) return Msg(`You've to disable mode 3 first.`.clr(RedClr));
|
|
|
mod.settings.OnlyParty = !mod.settings.OnlyParty
|
|
|
if (mod.settings.OnlyParty) {
|
|
|
- for (let i in SpawnedPlayers) {
|
|
|
- if (!PartyMembers.includes(SpawnedPlayers[i].name)) {
|
|
|
- mod.send('S_DESPAWN_USER', 3, { gameId: SpawnedPlayers[i].gameId, type: 1 })
|
|
|
- HiddenUsers[SpawnedPlayers[i].gameId] = SpawnedPlayers[i];
|
|
|
+ for (let i in SpawnedUsers) {
|
|
|
+ if (!PartyMembers.includes(SpawnedUsers[i].name)) {
|
|
|
+ mod.toClient('S_DESPAWN_USER', 3, { gameId: SpawnedUsers[i].gameId, type: 1 })
|
|
|
+ HiddenUsers[SpawnedUsers[i].gameId] = SpawnedUsers[i];
|
|
|
}
|
|
|
}
|
|
|
} else ShowAllPlayers();
|
|
|
@@ -1099,15 +1086,11 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.settings.AbnormalitiesBlacklist.push(arg3)
|
|
|
Msg(`Blacklisted Abnormalities` + ` added "${arg3}"`.clr(GreenClr) + '.')
|
|
|
return;
|
|
|
- } else if (arg2 == 'remv') {
|
|
|
- Msg(`Blacklisted Abnormalities` + ` can't remove "${arg3}" as it's not there`.clr(GrayClr) + '.')
|
|
|
- return;
|
|
|
- }
|
|
|
+ } else if (arg2 == 'remv') return Msg(`Blacklisted Abnormalities` + ` can't remove "${arg3}" as it's not there`.clr(GrayClr) + '.');
|
|
|
+
|
|
|
} else if (mod.settings.AbnormalitiesBlacklist.includes(arg3)) {
|
|
|
- if (arg2 == 'add') {
|
|
|
- Msg(`Blacklisted Abnormalities` + ` can't add "${arg3}" as it's already there`.clr(GrayClr) + '.')
|
|
|
- return;
|
|
|
- } else if (arg2 == 'remv') {
|
|
|
+ if (arg2 == 'add') return Msg(`Blacklisted Abnormalities` + ` can't add "${arg3}" as it's already there`.clr(GrayClr) + '.');
|
|
|
+ else if (arg2 == 'remv') {
|
|
|
let index = mod.settings.AbnormalitiesBlacklist.indexOf(arg3)
|
|
|
if (index !== -1) {
|
|
|
mod.settings.AbnormalitiesBlacklist.splice(index, 1)
|
|
|
@@ -1121,7 +1104,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "log":
|
|
|
case "debug":
|
|
|
mod.settings.AbnDebug = !mod.settings.AbnDebug;
|
|
|
- Msg(`Abnormalities debug ${mod.settings.AbnDebug ? "started".clr(GreenClr) : "stopped".clr(RedClr)}, check your console for details.`);
|
|
|
+ mod.settings.AbnDebug ? Msg(`Abnormalities debug ${"started".clr(GreenClr)}, check your proxy console for details.`) : Msg(`Abnormalities debug ${"stopped".clr(RedClr)}.`);
|
|
|
break;
|
|
|
default:
|
|
|
Msg(`Invalid (abnormalities) "${arg}".`.clr(GrayClr));
|
|
|
@@ -1131,8 +1114,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "guildlogo":
|
|
|
if (ChangeOnCd) return Msg(`Try again in 3 seconds.`.clr(PinkClr));
|
|
|
mod.settings.Hideguildlogos = !mod.settings.Hideguildlogos;
|
|
|
- mod.send('C_SET_VISIBLE_RANGE', 1, { range: 0 });
|
|
|
- setTimeout(() => mod.send('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
|
+ mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: 0 });
|
|
|
+ setTimeout(() => mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
|
ChangeOnCd = true;
|
|
|
setTimeout(() => ChangeOnCd = false, 2800);
|
|
|
Msg(`Guild Logos ${mod.settings.Hideguildlogos ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
|
@@ -1141,8 +1124,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "style":
|
|
|
if (ChangeOnCd) return Msg(`Try again in 3 seconds.`.clr(PinkClr));
|
|
|
mod.settings.ShowStyle = !mod.settings.ShowStyle;
|
|
|
- mod.send('C_SET_VISIBLE_RANGE', 1, { range: 0 })
|
|
|
- setTimeout(() => mod.send('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
|
+ mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: 0 })
|
|
|
+ setTimeout(() => mod.toServer('C_SET_VISIBLE_RANGE', 1, { range: LastVrange }), 1500);
|
|
|
ChangeOnCd = true
|
|
|
setTimeout(() => ChangeOnCd = false, 2800);
|
|
|
Msg(`Style of NPCs & others ${mod.settings.ShowStyle ? "Hidden".clr(GreenClr) : "Shown".clr(RedClr)}.`);
|
|
|
@@ -1166,15 +1149,10 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.settings.ProjectilesBlacklist.push(arg3)
|
|
|
Msg(`Blacklisted projectile` + ` added "${arg3}"`.clr(GreenClr) + '.')
|
|
|
return;
|
|
|
- } else if (arg2 == 'remv') {
|
|
|
- Msg(`Blacklisted projectile` + ` can't remove "${arg3}" as it's not there`.clr(GrayClr) + '.')
|
|
|
- return;
|
|
|
- }
|
|
|
+ } else if (arg2 == 'remv') return Msg(`Blacklisted projectile` + ` can't remove "${arg3}" as it's not there`.clr(GrayClr) + '.');
|
|
|
} else if (mod.settings.ProjectilesBlacklist.includes(arg3)) {
|
|
|
- if (arg2 == 'add') {
|
|
|
- Msg(`Blacklisted projectile` + ` can't add "${arg3}" as it's already there`.clr(GrayClr) + '.')
|
|
|
- return;
|
|
|
- } else if (arg2 == 'remv') {
|
|
|
+ if (arg2 == 'add') return Msg(`Blacklisted projectile` + ` can't add "${arg3}" as it's already there`.clr(GrayClr) + '.');
|
|
|
+ else if (arg2 == 'remv') {
|
|
|
let index = mod.settings.ProjectilesBlacklist.indexOf(arg3)
|
|
|
if (index !== -1) {
|
|
|
mod.settings.ProjectilesBlacklist.splice(index, 1)
|
|
|
@@ -1188,7 +1166,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "log":
|
|
|
case "debug":
|
|
|
mod.settings.ProjDebug = !mod.settings.ProjDebug
|
|
|
- Msg(`Projectile debug ${mod.settings.ProjDebug ? "started".clr(GreenClr) : "stopped".clr(RedClr)}, check your console for details.`)
|
|
|
+ mod.settings.ProjDebug ? Msg(`Projectile debug ${"started".clr(GreenClr)}, check your proxy console for details.`) : Msg(`Projectile debug ${"stopped".clr(RedClr)}.`);
|
|
|
break;
|
|
|
default:
|
|
|
Msg(`Invalid (projectile) "${arg}".`.clr(GrayClr));
|
|
|
@@ -1198,37 +1176,37 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "quicklink":
|
|
|
switch (arg) {
|
|
|
case "parcel":
|
|
|
- mod.send('C_REQUEST_CONTRACT', 1, { type: 8 });
|
|
|
+ mod.toServer('C_REQUEST_CONTRACT', 1, { type: 8 });
|
|
|
break;
|
|
|
case "talents":
|
|
|
- mod.send('C_REQUEST_CONTRACT', 1, { type: 77 });
|
|
|
+ mod.toServer('C_REQUEST_CONTRACT', 1, { type: 77 });
|
|
|
break;
|
|
|
case "broker":
|
|
|
- mod.send('S_NPC_MENU_SELECT', 1, { type: 28 });
|
|
|
+ mod.toClient('S_NPC_MENU_SELECT', 1, { type: 28 });
|
|
|
break;
|
|
|
case "dressingroom":
|
|
|
- mod.send('C_REQUEST_CONTRACT', 1, { type: 76 });
|
|
|
+ mod.toServer('C_REQUEST_CONTRACT', 1, { type: 76 });
|
|
|
break;
|
|
|
case "hatrestyle":
|
|
|
- mod.send('C_REQUEST_CONTRACT', 1, { type: 90 });
|
|
|
+ mod.toServer('C_REQUEST_CONTRACT', 1, { type: 90 });
|
|
|
break;
|
|
|
case "lobby":
|
|
|
- mod.send('C_RETURN_TO_LOBBY', 1, {});
|
|
|
+ mod.toServer('C_RETURN_TO_LOBBY', 1, {});
|
|
|
break;
|
|
|
case "instantexit":
|
|
|
- mod.send('S_EXIT', 3, { category: 0, code: 0 });
|
|
|
+ mod.toClient('S_EXIT', 3, { category: 0, code: 0 });
|
|
|
break;
|
|
|
case "drop":
|
|
|
- mod.send('C_LEAVE_PARTY', 1, {});
|
|
|
+ mod.toServer('C_LEAVE_PARTY', 1, {});
|
|
|
break;
|
|
|
case "disband":
|
|
|
- mod.send('C_DISMISS_PARTY', 1, {});
|
|
|
+ mod.toServer('C_DISMISS_PARTY', 1, {});
|
|
|
break;
|
|
|
case "reset":
|
|
|
- mod.send('C_RESET_ALL_DUNGEON', 1, {});
|
|
|
+ mod.toServer('C_RESET_ALL_DUNGEON', 1, {});
|
|
|
break;
|
|
|
case "searchengine":
|
|
|
- mod.send('S_SHOW_AWESOMIUMWEB_SHOP', 1, { link: 'https://duckduckgo.com/' });
|
|
|
+ mod.toClient('S_SHOW_AWESOMIUMWEB_SHOP', 1, { link: 'https://duckduckgo.com/' });
|
|
|
break;
|
|
|
default:
|
|
|
Msg(`Invalid (quicklink) "${arg}".`.clr(GrayClr));
|