Browse Source

Patch 110 & fix.

• sEachSkillResult to `v15`.
• Fixed issue where brawler's Divine Wrath animation completely hidden (causing brawler to teleport and you won't notice when boss was enagaged).
Risenio 5 years ago
parent
commit
a6320cd33b
6 changed files with 57 additions and 49 deletions
  1. 8 8
      README.md
  2. 1 1
      lib/data/userSpawns.json
  3. 38 34
      lib/index.js
  4. 5 5
      manifest.json
  5. 2 0
      module.json
  6. 3 1
      package.json

+ 8 - 8
README.md

@@ -4,10 +4,10 @@
 ## How to use.
   * Put the script folder "fps-utils" into the `mods` folder.
   * Log the game using the proxy.
-  * To get access to the built-in GUI type `/!fps g` into the chat.
+  * Get access to the built-in GUI via typing `/!fps g` into the chat.
 
 ## Capability.
-  * Should work on any proxy. (Tera-Proxy & Tera-Toolbox, *as long as they're up-to-date*)
+  * Should work on any proxy. ([Tera-Proxy](https://github.com/tera-proxy/tera-proxy) & [Tera-Toolbox](https://github.com/tera-toolbox/tera-toolbox), *as long as its up-to-date*)
   * No dependencies.
 
 ## List of commands can be found in [this Wiki](https://github.com/Risenio/fps-utils/wiki/Commands).
@@ -18,17 +18,17 @@
 ## Credits
 Direct Contributers:
   - [Saegusae](https://github.com/Saegusae)         - [Original developer](https://github.com/Saegusae/fps-utils) (No longer maintained).
-  - [Pentagon](https://github.com/codeagon)         - ~~Most current maintained~~ [fork of Fps-utils](https://github.com/codeagon/fps-utils) (No longer maintained).
+  - [Pentagon](https://github.com/codeagon)         - [Fps-utils's fork](https://github.com/codeagon/fps-utils) (No longer maintained).
   - [SerenTera](https://github.com/SerenTera)
   - [Kyoukaya](https://github.com/kyoukaya)
-  - [SaltyMonkey](https://github.com/SaltyMonkey)   - Current Tera-Toolbox (Tera-proxy's fork) developer.
+  - [SaltyMonkey](https://github.com/SaltyMonkey)   - Current [Tera-Toolbox (Tera-proxy's fork)](https://github.com/tera-toolbox/tera-toolbox) developer.
   - [Leyki](https://github.com/Leyki)
 
 ---
 
 In-direct Contributers:
-  - [Kasea](https://github.com/Kaseaa)
-  - [Caali](https://github.com/caali-hackerman)     - Original Tera-Toolbox (Tera-proxy's fork) developer.
+  - [Kasea](https://github.com/Kasea)
+  - [Caali](https://github.com/caali-hackerman)     - Original [Tera-Toolbox (Tera-proxy's fork)](https://github.com/tera-toolbox/tera-toolbox) developer.
   - [Bernkastel](https://github.com/Bernkastel-0)   - Original idea/ZFPS alternative script.
-  - [Pinkie Pie](https://github.com/pinkipi)        - Original idea/~~Current maintained~~ fork of Tera-proxy developer (No longer maintained).
-  - [Meishu](https://github.com/meishuu)            - Original developer of Tera-proxy (No longer maintained).
+  - [Pinkie Pie](https://github.com/pinkipi)        - Original idea/~~Current maintained~~ [Tera-proxy's fork](https://github.com/tera-proxy/tera-proxy) developer (No longer maintained).
+  - [Meishu](https://github.com/meishuu)            - Original developer of [Tera-proxy](https://github.com/meishuu/tera-proxy) (No longer maintained & DMCA'd by EME).

+ 1 - 1
lib/data/userSpawns.json

@@ -1 +1 @@
-{"FireWorks":[60016000,80037000],"MoteIds":[8008,8009,8010,8011,8012,8013,8014,8015,8016,8017,8018,8019,8020,8021,8022,8023],"SmokeBombId":90120,"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],"UserNpcsHzId":1023,"UserNpcs":[12345,1100100,1100101,1023000,1023001,1023002,1023003,1023004,1023005,1023006,1023007,1023008,1023009,1023010,1023011,1023012,1023013,1023014,1023200,1023201,1023202,1023203,1023204,1023205,1023206,1023207,1023208,1023209,1023210,1023211,1023300,1023301,1023302,1023303,1023304,1023305,1023306,1023307,1023308,1023309,1023310,1023311,1023312,1023400,1023401,1023402,1023403,1023404,1023405,1024000,1024001,1024100,1024200,1024300,2100100,2100101,10235001,10235002,10235003,10235004,10235005,10235006,10235007,10235008,10235009,10235010,10235011,10235012,10235013,10235014,10235015,10235016,10235017,10235100,10236001,10236002,10236003,10236004,10236005,10236006,10236007,10236008,10236009,10236010,10236011,10236012,10236013,10236014,10236015,10236100,10237001,10237002,10237003,10237004,10237005,10237006,10237007,10237008,10237009,10237010,10237011,10237012,10237013,10237014,10237015,10237100,10238001,10238002,10238003,10238004,10238005,10238006,10238007,10238008,10238100,10239003,30301001,30301002,30301003,30301004,30301005,30302001,30302002,30302003,30302004,30302005,30302006,30302007,30303001,30303002,30303003,30303004,30303005,30303006,30303007]}
+{"FireWorks":[60016000,80037000],"MoteIds":[8008,8009,8010,8011,8012,8013,8014,8015,8016,8017,8018,8019,8020,8021,8022,8023],"SmokeBombId":{"12":9},"DivineWrathId":{"11":3},"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],"UserNpcsHzId":1023,"UserNpcs":[12345,1100100,1100101,1023000,1023001,1023002,1023003,1023004,1023005,1023006,1023007,1023008,1023009,1023010,1023011,1023012,1023013,1023014,1023200,1023201,1023202,1023203,1023204,1023205,1023206,1023207,1023208,1023209,1023210,1023211,1023300,1023301,1023302,1023303,1023304,1023305,1023306,1023307,1023308,1023309,1023310,1023311,1023312,1023400,1023401,1023402,1023403,1023404,1023405,1024000,1024001,1024100,1024200,1024300,2100100,2100101,10235001,10235002,10235003,10235004,10235005,10235006,10235007,10235008,10235009,10235010,10235011,10235012,10235013,10235014,10235015,10235016,10235017,10235100,10236001,10236002,10236003,10236004,10236005,10236006,10236007,10236008,10236009,10236010,10236011,10236012,10236013,10236014,10236015,10236100,10237001,10237002,10237003,10237004,10237005,10237006,10237007,10237008,10237009,10237010,10237011,10237012,10237013,10237014,10237015,10237100,10238001,10238002,10238003,10238004,10238005,10238006,10238007,10238008,10238100,10239003,30301001,30301002,30301003,30301004,30301005,30302001,30302002,30302003,30302004,30302005,30302006,30302007,30303001,30303002,30303003,30303004,30303005,30303006,30303007]}

+ 38 - 34
lib/index.js

@@ -5,7 +5,8 @@
 const NpcData = require('./data/npcData.json'),
 	SkillData = require('./data/skillString.json'),
 	{ ImportantAbns, BlockedAbns, ReplaceAbnIds, AbnNoEffectInvisibleNpcSpamId } = require('./data/abnormalities.json'),
-	{ UserNpcs, TrapsIds, FireWorks, UserNpcsHzId, SmokeBombId, MoteIds } = require('./data/userSpawns.json'),
+	{ UserNpcs, TrapsIds, FireWorks, UserNpcsHzId, SmokeBombId, DivineWrathId, MoteIds } = require('./data/userSpawns.json'),
+	ImportantProjectiles = { ...SmokeBombId, ...DivineWrathId },
 	{ InvisibleNpcs, SpamAchIds, PClasses, PRoles, HexColors, Alphabet, StarterWeaponIds, InvalidVoiceId, MountToReplaceId, ImportantActionScripts } = require('./data/miscData.json'),
 	{ BnzC, SlvC, GldC, PnkC, HPkC, CPkC, RedC, GrnC, LPrC, PrpC, LBlC, BluC, DBlC, HBlC, GryC, YlwC } = HexColors;
 
@@ -568,7 +569,7 @@ module.exports = function FpsUtils(mod) {
 		if (typeof event.id === 'undefined') event.id = event.actionId
 
 		if (typeof event.skill !== 'undefined') {
-			if (event.skill.id === SmokeBombId || (Cfg.PvpTraps && TrapsIds.includes(event.skill.id))) return undefined;
+			if (ImportantProjectiles[ClassID(event.templateId)] && ImportantProjectiles[ClassID(event.templateId)] === Math.floor(event.skill.id / 1E4) || (Cfg.PvpTraps && TrapsIds.includes(event.skill.id))) return undefined;
 			if ((Cfg.HideBlacklistedProjectiles || Cfg.HideAllProjectiles) && Cfg.ProjectilesBlacklist.includes(event.skill.id)) BProjectiles.add(event.id);
 		}
 
@@ -668,6 +669,31 @@ module.exports = function FpsUtils(mod) {
 		return blocked ? false : undefined;
 	}
 
+	function updatePartySpawns(raid) {
+		if (!Cfg.OnlyParty || !Cfg.RaidAutoChange) return
+
+		if (Cfg.OnlyParty)
+			for (const sUser in SUsers) {
+				if (!PMembers.has(SUsers[sUser].name)) HideSpecificPlayerByName(SUsers[sUser].name);
+				else if (HUsers[SUsers[sUser].gameId]) ShowSpecificPlayerByName(SUsers[sUser].name);
+			}
+
+		if (Cfg.RaidAutoChange && typeof raid !== 'undefined') {
+			if (raid) {
+				if (Cfg.Mode >= 2 || (LastFState === null && Cfg.Mode === 2)) return;
+				LastFState = Cfg.Mode;
+				Cmd.exec("fps state 2");
+			} else {
+				if (LastFState === null || Cfg.Mode !== 2) {
+					LastFState = null;
+					return;
+				}
+				Cmd.exec(`fps state ${LastFState}`);
+				LastFState = null;
+			}
+		}
+	}
+
 	function EqGid(xG) {
 		return (xG === MyGameId);
 	}
@@ -880,44 +906,17 @@ module.exports = function FpsUtils(mod) {
 
 	function sPartyMemberList(event) {
 		event.members.map(value => { PMembers.add(value.name) });
-		if (Cfg.OnlyParty)
-			for (const sUser in SUsers) {
-				if (!PMembers.has(SUsers[sUser].name)) HideSpecificPlayerByName(SUsers[sUser].name);
-				else if (HUsers[SUsers[sUser].gameId]) ShowSpecificPlayerByName(SUsers[sUser].name);
-			}
-		if (Cfg.RaidAutoChange) {
-			if (event.raid) {
-				if (Cfg.Mode >= 2 || (LastFState === null && Cfg.Mode === 2)) return;
-				LastFState = Cfg.Mode;
-				Cmd.exec("fps state 2");
-			} else {
-				if (LastFState === null || Cfg.Mode !== 2) {
-					LastFState = null;
-					return;
-				}
-				Cmd.exec(`fps state ${LastFState}`);
-				LastFState = null;
-			}
-		}
+		updatePartySpawns(event.raid);
 	}
 
 	function sLeavePartyMember(event) {
-		PMembers.delete(event.name)
+		PMembers.delete(event.name);
+		updatePartySpawns();
 	}
 
 	function sLeaveParty() {
-		if (Cfg.OnlyParty)
-			for (const sUser in SUsers)
-				if (PMembers.has(SUsers[sUser].name)) HideSpecificPlayerByName(SUsers[sUser].name);
 		PMembers.clear();
-		if (Cfg.RaidAutoChange) {
-			if (LastFState === null || Cfg.Mode !== 2) {
-				LastFState = null;
-				return;
-			}
-			Cmd.exec(`fps mode ${LastFState}`);
-			LastFState = null;
-		}
+		updatePartySpawns(false);
 	}
 
 	function sSpawnNpc(event) {
@@ -1046,6 +1045,11 @@ module.exports = function FpsUtils(mod) {
 	}
 
 	function sInstanceArrow(event) {
+		if (event.skill.npc) return;
+		if (ProjDebug) {
+			if (EqGid(event.gameId)) log('Projectile-Arrow', 'Spawned', 'from', MyName, event.skill.id);
+			if (SUsers[event.gameId]) log('Projectile-Arrow', 'Spawned', 'from', SUsers[event.gameId].name, event.skill.id);
+		}
 		return ProjectileBCheck(event);
 	}
 
@@ -1224,7 +1228,7 @@ module.exports = function FpsUtils(mod) {
 
 	mod.hook('S_PLAYER_CHANGE_MP', 1, LastHook, sPlayerChangeMp)
 	mod.hook('S_CREATURE_CHANGE_HP', 6, LastHook, sCreatureChangeHp)
-	mod.hook('S_EACH_SKILL_RESULT', 14, LastHook, sEachSkillResult)
+	mod.hook('S_EACH_SKILL_RESULT', mod.majorPatchVersion < 110 ? 14 : 15, LastHook, sEachSkillResult)
 	mod.hook('S_ITEM_EXPLOSION_RESULT', 2, LastHook, sItemExplosionResult)
 	mod.hook('S_SPAWN_DROPITEM', 9, LastHook, sSpawnDropItem)
 	mod.hook('S_FONT_SWAP_INFO', 'raw', LastHookfn, sFontSwapInfo)

+ 5 - 5
manifest.json

@@ -1,15 +1,15 @@
 {
     "files": {
-        "README.md": "0badc4f6743b12946865dcb1f5c2ef77839ab507ab29a273ee6d3087f2624996",
+        "README.md": "f5c50ef82e8ba86477c3f97f92bf5e8b466b6742e84297b72d3f357f02ad26cb",
         "lib/data/abnormalities.json": "54727de2123584eb0ff38ffca5e86601e3faf05e8dc3379c9a0fd6e5ede1ca0c",
         "lib/data/miscData.json": "4f36b0f6c847ddde5a1a35acf944f700f3e47e39ca23e58cbf06233af67ad251",
         "lib/data/npcData.json": "bcd1876e4266f71299a298221b2594e45bf87f143f276a62c60dd8a35b75acd7",
         "lib/data/skillString.json": "90f7cf9e29f0c143ffe4650bebe85c097371507a23c9fd2a0ab6c877d5451e58",
-        "lib/data/userSpawns.json": "50fa11179c14e3d5ff0f92d73f62f968331258e85e534102cde03dd6ad977463",
-        "lib/index.js": "26006a4d5c9efb940063082538993828a66a95156dfc5bad838ba89854730395",
+        "lib/data/userSpawns.json": "e82a593b3e5aa970542d8330dfe690049abad98691e8b90210f46cdc281b17a3",
+        "lib/index.js": "090f1cac356bc4561d1118d859b7320ab989ebc4945460ca362c80b3b2ce9051",
         "lib/setting_migration.js": "1821fbb5ed37672bd9a8daa54f8ab392e35aa6c38b1602c560865b3bf6a7c6a2",
-        "module.json": "c23d04a44a1ccdca2b8fc03f547a9b44fa08527f8ad73bc81c8dec042f9b4dcf",
-        "package.json": "dd0e950e7b5b537ff09d5f7772373d2b1d7a13840868d4b5981e46d8ba25d1b9"
+        "module.json": "1acb2a7c8a79d262c90412eacb5ab0f78c1c571f9d921858e4c9a893e90d5452",
+        "package.json": "c4741e35f2f35ea93f57f4eb5ff6de4cfd551ccc49687a2a809e2edcd74a587f"
     },
     "defs": {
         "C_ADMIN": 1,

+ 2 - 0
module.json

@@ -3,9 +3,11 @@
     "name": "fps-utils",
     "author": "Risenio",
     "homepage": "https://github.com/Risenio/fps-utils/wiki",
+    "supportUrl": "https://github.com/Risenio/fps-utils/issues",
     "readmePath": "./README.md",
     "description": "A free script filled with features dedicated to improve your fps.",
     "contributors": ["Saegusae","codeagon","SerenTera","Kyoukaya","SaltyMonkey","Leyki"],
+    "conflicts": ["hide-players","fps-utils-lite","fps-manager"],
     "version": "19",
     "options": {
         "cliName": "FPS",

+ 3 - 1
package.json

@@ -4,8 +4,10 @@
 	"author": "Risenio",
 	"description": "A free script filled with features dedicated to improve your fps.",
 	"version": "19",
-	"homepage": "https://github.com/Risenio/fps-utils/wiki",
+    "homepage": "https://github.com/Risenio/fps-utils/wiki",
+    "supportUrl": "https://github.com/Risenio/fps-utils/issues",
 	"keywords": ["tera", "fps", "tera-fps", "tera-proxy", "tera-toolbox", "tera-online", "fps-utils", "optimization"],
 	"contributors": ["Saegusae", "codeagon", "SerenTera", "Kyoukaya", "SaltyMonkey", "Leyki"],
+	"conflicts": ["hide-players","fps-utils-lite","fps-manager"],
 	"repository": { "type": "git", "url": "git+https://github.com/Risenio/fps-utils.git" }
 }