Просмотр исходного кода

New feature.

Added ability to mute other players voices during the casting of skills.
Settings version 18. :partly_sunny:
Risenio лет назад: 6
Родитель
Сommit
34aa81e6a0
5 измененных файлов с 28 добавлено и 10 удалено
  1. 15 2
      lib/index.js
  2. 6 1
      lib/setting_migration.js
  3. 4 4
      manifest.json
  4. 2 2
      module.json
  5. 1 1
      package.json

+ 15 - 2
lib/index.js

@@ -5,7 +5,7 @@
 
 const NotCP = typeof global.TeraProxy === "undefined" || typeof global.TeraProxy.UILanguage === "undefined";
 const NpcData = require("./data/npcData.json"), SkillData = require("./data/skillString.json");
-const Last_Hook = { order: 100010 }, Last_Hookfn = { order: 100010, filter: { fake: null } };
+const Last_Hook = { order: 100010 }, Last_Hookfn = { order: 100010, filter: { fake: null, silenced: false, modified: null } };
 const BnzC = '#BC8F8F', SlvC = '#9A9A9A', GldC = '#DAA520', PnkC = '#FFB7C5', HPkC = '#FF69B4', CPKC = '#ED5D92', RedC = '#FE6F5E', GrnC = '#4DE19C', LPrC = '#E0B0FF', PrpC = '#9966CC', LBlC = '#4DDCE1', BluC = '#436EEE', DBlC = '#5BC0BE', HBlC = '#08B3E5', GryC = '#778899', YlwC = '#C0B94D';
 const InvisibleNpcs = { 8: [6011], 12: [1], 23: [201, 202], 34: [8000], 61: [9901], 62: [9001, 9002, 9003, 9004, 9901], 83: [9901], 207: [9901], 223: [9901], 230: [9901] };
 const TrapsIds = [30120, 30220, 30320, 90220, 90320, 90420, 90520, 90620, 90720, 90820, 90920, 100120, 100220, 100320, 100420, 100520, 120220, 120320, 120420, 120520, 120620, 120720, 120820, 120920, 150120, 150220, 150320, 150420, 150520, 150620, 150720, 170120, 170220, 170320, 170420, 170520, 170620, 170720, 170820, 170920, 230120, 230220, 230320, 250120, 250220, 250320, 250420, 250520, 250620, 250720, 250820, 250920, 251020];
@@ -243,6 +243,7 @@ module.exports = function FpsUtils(mod) {
 					{ text: `<font color="${HBlC}">mpnumbers</font>            <font color="${DBlC}">N/A</font>                    <font color="${HPkC}">!fps mpnumbers</font><br>` },
 					{ text: `<font color="${HBlC}">pet</font>                          <font color="${DBlC}">N/A</font>                     <font color="${HPkC}">!fps raid</font><br>` },
 					{ text: `<font color="${HBlC}">guardian</font>                <font color="${DBlC}">N/A</font>                      <font color="${HPkC}">!fps guardian</font><br>` },
+					{ text: `<font color="${HBlC}">muteothers</font>            <font color="${DBlC}">N/A</font>                      <font color="${HPkC}">!fps muteothers</font><br>` },
 					{ text: `<font color="${HBlC}">stream</font>                   <font color="${DBlC}">N/A</font>                      <font color="${HPkC}">!fps stream</font></font><br>` },
 				], `<font color="${LPrC}">[FPS] HELP</font>`)
 				break;
@@ -297,6 +298,7 @@ module.exports = function FpsUtils(mod) {
 					{ text: `<font color="${mod.settings.HideBlacklistedDrop ? GrnC : RedC}" size="+18">[Drops BList]</font>`, command: "fps dropitem;fps gui" }, { text: "&nbsp;&nbsp;" },
 					{ text: `<font color="${mod.settings.PvpTraps ? GrnC : RedC}" size="+17">[Show Traps]</font><br>`, command: "fps pvptraps;fps gui" }, { text: "&#09;&#09;&#09;" },
 					{ text: `<font color="${mod.settings.GuardianAutoChange ? GrnC : RedC}" size="+17">[Guardian auto state]</font>`, command: "fps guardian;fps gui" }, { text: "&nbsp;&nbsp;" },
+					{ text: `<font color="${mod.settings.MuteOthersVoice ? GrnC : RedC}" size="+17">[Mute others voice]</font>`, command: "fps muteothers;fps gui" }, { text: "&nbsp;&nbsp;" },
 					{ text: `<font color="${mod.settings.StreamMode ? GrnC : RedC}" size="+17">[Stream]</font><br><br>`, command: "fps stream;fps gui" },
 					{ text: `<font color="${BluC}" size="+22">Quick Links:</font><br>` },
 					{ text: `<font color="${YlwC}" size="+20">UI:</font>` }, { text: "&#09;&#09;" },
@@ -563,6 +565,13 @@ module.exports = function FpsUtils(mod) {
 		if (mod.settings.Hideguildlogos) {
 			event.guildLogo = '';
 			event.guildLogoId = 0;
+
+			modified = true;
+		}
+
+		if (mod.settings.MuteOthersVoice) {
+			event.appearance.voice = 249;
+
 			modified = true;
 		}
 
@@ -791,7 +800,7 @@ module.exports = function FpsUtils(mod) {
 	}
 
 	function sStartActionScript(event) {
-		if ([40000, 40001, 40002].includes(event.script)) return;
+		if ([40000, 40001, 40002, 426002].includes(event.script)) return;
 		if (mod.settings.ActionScripts) return false;
 	}
 
@@ -1606,6 +1615,10 @@ module.exports = function FpsUtils(mod) {
 				mod.settings.HideMpNumbers = !mod.settings.HideMpNumbers;
 				Msg(`Own Mp numbers ${mod.settings.HideMpNumbers ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
 				break;
+			case "muteothers":
+				mod.settings.MuteOthersVoice = !mod.settings.MuteOthersVoice;
+				Msg(`Mute others voice is ${mod.settings.MuteOthersVoice ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);
+				break;
 			case "stream":
 				mod.settings.StreamMode = !mod.settings.StreamMode;
 				Msg(`Stream mode is ${mod.settings.StreamMode ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);

+ 6 - 1
lib/setting_migration.js

@@ -1,7 +1,7 @@
 'use strict'
 
 const DefaultSettings = {
-	_version: 17,
+	_version: 18,
 	Mode: 0,
 	StreamMode: false,
 	OnlyParty: false,
@@ -23,6 +23,7 @@ const DefaultSettings = {
 	HideOthersSummons: false,
 	HideMyServants: false,
 	HideOthersServants: false,
+	MuteOthersVoice: false,
 	HideAllAbnormalities: false,
 	HideAllProjectiles: false,
 	HideOwnBlacklistedAbns: false,
@@ -140,6 +141,10 @@ function MigrateSettings(from_ver, to_ver, settings) {
 				settings.StreamMode = DefaultSettings.StreamMode;
 				settings.GuardianAutoChange = DefaultSettings.GuardianAutoChange;
 				break;
+			case 18:
+				settings._version = 18;
+				settings.MuteOthersVoice = DefaultSettings.MuteOthersVoice;
+				break;
 			default:
 				console.log(`\x1b[94mINFO\x1b[34m [FPS-UTILS]\x1b[39m - Your \x1b[31 ["config.json" (caali's Toolbox) OR "settings/fps-utils.json" (pinkie's Proxy)]\x1b[39m seems to be outdated.\x1b[32m Re-created new one.\x1b[39m\x1b[0m`);
 				Object.keys(settings).forEach(key => delete settings[key]);

+ 4 - 4
manifest.json

@@ -3,10 +3,10 @@
         "README.md": "7eae31e8066dad35209a4833ce708b0aeb8bca60deb8574ff84b99792ddfe862",
         "lib/data/npcData.json": "dad0fe8bf2942a36c9a33b324e43fdda9bcc3b411541d31ae9d01be5169bdfb7",
         "lib/data/skillString.json": "9d69876fea0be8e6ac5dd43b3fc74ea023f6b8a6145384f8f780dd977045d8ef",
-        "lib/index.js": "7583f1a0ef7bbdd9b4c1e2cbfb69640271909d344c72e53b24cbbb26611b6f8b",
-        "lib/setting_migration.js": "9f0816758b88300afd97ca8aaa8cfc0dadedcdda17713d6e709772a9c0dddcea",
-        "module.json": "2e105877c06e04aee1225aff0fff699d74cd1c250a975ea0c50f40f8772ea8b9",
-        "package.json": "a8aa5a079bc568096b2037f2777f9b01e97ba08ba62a515b7d6908f4bc6e1b51"
+        "lib/index.js": "7bd9d97fc0321e0dfdaa32fd7791850826e995219ce14965a0b7dbc81d9a5965",
+        "lib/setting_migration.js": "1d917a6bcf967316a2f8ce21e853eca68ae5f07bd000f17ee4b799bac7ab01ca",
+        "module.json": "dd28251d203a38582cbbe31d1f904436865e05149465359c0fde8f8db45a829b",
+        "package.json": "19c3f3629a7f9b3b30825da28331dbed10478c600a72cf2b9f5a46d674edbfa9"
     },
     "defs": {
         "C_ADMIN": 1,

+ 2 - 2
module.json

@@ -5,11 +5,11 @@
     "homepage": "https://github.com/Risenio/fps-utils/wiki",
     "description": "A free script filled with features dedicated to improve your fps.",
     "contributors": ["codeagon","Saegusae","SerenTera","Kyoukaya","SaltyMonkey","Leyki"],
-    "version": "17",
+    "version": "18",
     "options": {
         "niceName": "FPS",
         "guiName": "Fps Utils",
-        "settingsVersion": 17,
+        "settingsVersion": 18,
         "settingsFile": "config.json",
         "settingsMigrator": "./lib/setting_migration.js"
     },

+ 1 - 1
package.json

@@ -3,7 +3,7 @@
 	"name": "fps-utils",
 	"author": "Risenio",
 	"description": "A free script filled with features dedicated to improve your fps.",
-	"version": "17",
+	"version": "18",
 	"homepage": "https://github.com/Risenio/fps-utils/wiki",
 	"keywords": [ "fps", "tera", "tera-proxy", "tera-fps", "fps-utils", "optimization" ],
     "contributors": ["codeagon", "Saegusae", "SerenTera", "Kyoukaya", "SaltyMonkey", "Leyki"],