|
@@ -30,6 +30,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
|
|
let MyGameId,
|
|
let MyGameId,
|
|
|
MyName,
|
|
MyName,
|
|
|
|
|
+ MyPlayerId,
|
|
|
ChangeOnCd,
|
|
ChangeOnCd,
|
|
|
laststate,
|
|
laststate,
|
|
|
lastrange,
|
|
lastrange,
|
|
@@ -502,6 +503,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
function sLogin(event) {
|
|
function sLogin(event) {
|
|
|
MyGameId = event.gameId;
|
|
MyGameId = event.gameId;
|
|
|
MyName = event.name;
|
|
MyName = event.name;
|
|
|
|
|
+ MyPlayerId = event.playerId;
|
|
|
laststate = undefined;
|
|
laststate = undefined;
|
|
|
if (mod.settings.ProjDebug) {
|
|
if (mod.settings.ProjDebug) {
|
|
|
mod.settings.ProjDebug = false
|
|
mod.settings.ProjDebug = false
|
|
@@ -667,6 +669,14 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function sSpawnNpc(event) {
|
|
function sSpawnNpc(event) {
|
|
|
|
|
+ if (mod.settings.HideBlacklistedNpcs) {
|
|
|
|
|
+ for (var i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
|
|
|
|
|
+ if (event.huntingZoneId == mod.settings.NpcsBlacklist[i].zone && event.templateId == mod.settings.NpcsBlacklist[i].templateId) {
|
|
|
|
|
+ hiddenNpcs[event.gameId] = event;
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (event.huntingZoneId === 1023) {
|
|
if (event.huntingZoneId === 1023) {
|
|
|
if (EqGid(event.owner)) {
|
|
if (EqGid(event.owner)) {
|
|
|
if (!mod.settings.HideMySummons) return;
|
|
if (!mod.settings.HideMySummons) return;
|
|
@@ -677,14 +687,6 @@ module.exports = function FpsUtils(mod) {
|
|
|
hiddenNpcs[event.gameId] = event;
|
|
hiddenNpcs[event.gameId] = event;
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- if (mod.settings.HideBlacklistedNpcs) {
|
|
|
|
|
- for (var i = 0; i < mod.settings.NpcsBlacklist.length; i++) {
|
|
|
|
|
- if (event.huntingZoneId == mod.settings.NpcsBlacklist[i].zone && event.templateId == mod.settings.NpcsBlacklist[i].templateId) {
|
|
|
|
|
- hiddenNpcs[event.gameId] = event;
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
if (mod.settings.HideFireworks && event.huntingZoneId === 1023 && (event.templateId === 60016000 || event.templateId === 80037000)) 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;
|
|
@@ -770,9 +772,12 @@ module.exports = function FpsUtils(mod) {
|
|
|
function sSpawnDropItem(event) {
|
|
function sSpawnDropItem(event) {
|
|
|
if (EqGid(event.source)) return;
|
|
if (EqGid(event.source)) return;
|
|
|
if (mod.settings.HideBlacklistedDrop) {
|
|
if (mod.settings.HideBlacklistedDrop) {
|
|
|
- if (DropBlacklist.includes(event.item)) return false;
|
|
|
|
|
|
|
+ for (let i in event.owners) {
|
|
|
|
|
+ if (event.owners[i].playerId.toString() == MyPlayerId.toString()) return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (mod.settings.DropBlacklist.includes(event.item)) return false;
|
|
|
}
|
|
}
|
|
|
- if (mod.settings.ShowStyle) {
|
|
|
|
|
|
|
+ if (mod.settings.Mode >= 2) {
|
|
|
event.explode = 0;
|
|
event.explode = 0;
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
@@ -833,7 +838,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.command.add('3', () => mod.command.exec('fps mode 3'))
|
|
mod.command.add('3', () => mod.command.exec('fps mode 3'))
|
|
|
|
|
|
|
|
mod.command.add(['fps', 'fps-utils', 'fpsutil', 'fpsutils'], (key, arg, arg2, arg3) => {
|
|
mod.command.add(['fps', 'fps-utils', 'fpsutil', 'fpsutils'], (key, arg, arg2, arg3) => {
|
|
|
- if (notcaaliproxy) mod.saveSettings(); // for some reason settings for caali's proxy weren't saving so we have this here now I guess 🤷
|
|
|
|
|
|
|
+ if (notcaaliproxy) mod.saveSettings();
|
|
|
switch (key) {
|
|
switch (key) {
|
|
|
case "g":
|
|
case "g":
|
|
|
case "gui":
|
|
case "gui":
|
|
@@ -1041,6 +1046,11 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "npcs":
|
|
case "npcs":
|
|
|
case "npc":
|
|
case "npc":
|
|
|
if (arg == 'hide') {
|
|
if (arg == 'hide') {
|
|
|
|
|
+ if (!arg2 || !arg3) {
|
|
|
|
|
+ mod.settings.HideBlacklistedNpcs = !mod.settings.HideBlacklistedNpcs;
|
|
|
|
|
+ Msg(`Blacklisted NPCs ${mod.settings.HideBlacklistedNpcs ? 'Hidden'.clr(GreenClr) : 'Shown'.clr(RedClr)}.`);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
let found = mod.settings.NpcsBlacklist.some((s) => {
|
|
let found = mod.settings.NpcsBlacklist.some((s) => {
|
|
|
return s.zone === arg2 && s.templateId === arg3;
|
|
return s.zone === arg2 && s.templateId === arg3;
|
|
|
});
|
|
});
|
|
@@ -1245,9 +1255,26 @@ module.exports = function FpsUtils(mod) {
|
|
|
Msg(`Npc zoom-ins ${mod.settings.NoZoomingToNpc ? 'Disabled'.clr(GreenClr) : 'ON'.clr(RedClr)}.`);
|
|
Msg(`Npc zoom-ins ${mod.settings.NoZoomingToNpc ? 'Disabled'.clr(GreenClr) : 'ON'.clr(RedClr)}.`);
|
|
|
break
|
|
break
|
|
|
case "dropitem":
|
|
case "dropitem":
|
|
|
- mod.settings.HideBlacklistedDrop = !mod.settings.HideBlacklistedDrop
|
|
|
|
|
- Msg(`Drop blacklist ${mod.settings.HideBlacklistedDrop ? 'Hidden'.clr(GreenClr) : 'Shown'.clr(RedClr)}.`);
|
|
|
|
|
- break
|
|
|
|
|
|
|
+ if (arg == 'hide') {
|
|
|
|
|
+ if (!arg2) {
|
|
|
|
|
+ mod.settings.HideBlacklistedDrop = !mod.settings.HideBlacklistedDrop;
|
|
|
|
|
+ Msg(`Blacklisted Drops ${mod.settings.HideBlacklistedDrop ? 'Hidden'.clr(GreenClr) : 'Shown'.clr(RedClr)}.`);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ arg2 = Number(arg2);
|
|
|
|
|
+ let found = mod.settings.DropBlacklist.some((s) => { return s === arg2; });
|
|
|
|
|
+ if (found) {
|
|
|
|
|
+ Msg(`Drops id '${arg2}'` + ` Removed from the blacklist`.clr(RedClr) + '.')
|
|
|
|
|
+ mod.settings.DropBlacklist = mod.settings.DropBlacklist.filter((obj) => { return obj != arg2; })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ Msg(`Drops id '${arg2}'` + ` Added to the blacklist`.clr(GreenClr) + '.')
|
|
|
|
|
+ mod.settings.DropBlacklist.push(arg2)
|
|
|
|
|
+ }
|
|
|
|
|
+ return
|
|
|
|
|
+ } else
|
|
|
|
|
+ mod.settings.HideBlacklistedDrop = !mod.settings.HideBlacklistedDrop;
|
|
|
|
|
+ Msg(`Blacklisted Drops ${mod.settings.HideBlacklistedDrop ? 'Hidden'.clr(GreenClr) : 'Shown'.clr(RedClr)}.`);
|
|
|
|
|
+ break;
|
|
|
case "help":
|
|
case "help":
|
|
|
mod.command.exec(`fps gui help`)
|
|
mod.command.exec(`fps gui help`)
|
|
|
break
|
|
break
|