Risenio лет назад: 8
Родитель
Сommit
6172372372
3 измененных файлов с 11 добавлено и 27 удалено
  1. 3 3
      README.md
  2. 6 21
      lib/index.js
  3. 2 3
      manifest.json

+ 3 - 3
README.md

@@ -1,11 +1,11 @@
 # Fps Utils
 # Fps Utils
   Written for tera-proxy, a free script filled with features dedicated to improve your fps, in the open world, in dungeons and in battlegrounds.
   Written for tera-proxy, a free script filled with features dedicated to improve your fps, in the open world, in dungeons and in battlegrounds.
 
 
-## How to use
-  * Put the script folder "fps-utils" into `mods`.
+## How to use.
+  * Put the script folder "fps-utils" into the `mods` folder.
   * Log the game using the proxy.
   * Log the game using the proxy.
 
 
-## Capability
+## Capability.
   * Should work on both (Caali's & Pony's) proxies.
   * Should work on both (Caali's & Pony's) proxies.
   * No dependencies.
   * No dependencies.
 
 

+ 6 - 21
lib/index.js

@@ -3,13 +3,13 @@
 
 
 module.exports = function FpsUtils(mod) {
 module.exports = function FpsUtils(mod) {
 	const NotCP = typeof global.TeraProxy === 'undefined'; //For niceName forced thing and broken settings auto-save For Caali's Proxy users.
 	const NotCP = typeof global.TeraProxy === 'undefined'; //For niceName forced thing and broken settings auto-save For Caali's Proxy users.
-	const NpcData = require("./data/npcData.json"),
-		SkillData = require("./data/skillString.json"),
-		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 = '#00575e', HBlC = '#08B3E5', GryC = '#778899', YlwC = '#C0B94D', OngC = '#FFBE5E';
+	const NpcData = require("./data/npcData.json");
+	const SkillData = require("./data/skillString.json");
+	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 = '#00575e', HBlC = '#08B3E5', GryC = '#778899', YlwC = '#C0B94D', OngC = '#FFBE5E';
 
 
 	const FishingNpcs = { 8: [6011], 12: [1, 2], 23: [201, 202], 34: [8000], 61: [9901], 62: [1017, 1035, 1039, 1040, 1041, 1042, 1900, 1901, 1902, 1903, 9001, 9002, 9003, 9004, 9901], 83: [9901], 207: [9901], 212: [1034], 223: [9901, 9906, 9907, 9915, 9925], 230: [9901], 362: [1201, 1202, 1301, 1302] };
 	const FishingNpcs = { 8: [6011], 12: [1, 2], 23: [201, 202], 34: [8000], 61: [9901], 62: [1017, 1035, 1039, 1040, 1041, 1042, 1900, 1901, 1902, 1903, 9001, 9002, 9003, 9004, 9901], 83: [9901], 207: [9901], 212: [1034], 223: [9901, 9906, 9907, 9915, 9925], 230: [9901], 362: [1201, 1202, 1301, 1302] };
 	const PvPProjs = [30120, 30220, 30320, 90120, 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];
 	const PvPProjs = [30120, 30220, 30320, 90120, 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];
-	const UserSumNPCs = [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,];
+	const UserSumNPCs = [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];
 
 
 	let MyGameId,
 	let MyGameId,
 		MyName,
 		MyName,
@@ -29,16 +29,15 @@ module.exports = function FpsUtils(mod) {
 
 
 	// ~~~ * Gui Parser * ~~~ \\
 	// ~~~ * Gui Parser * ~~~ \\
 
 
-	let Xd;
 	const Xmap = new WeakMap();
 	const Xmap = new WeakMap();
 
 
-	if (!Xmap.has(mod.dispatch || mod)) {
+	if (!Xmap.has(mod.dispatch || mod)) { //TODO; sth for this.
 		Xmap.set(mod.dispatch || mod, {});
 		Xmap.set(mod.dispatch || mod, {});
 
 
 		mod.hook('C_CONFIRM_UPDATE_NOTIFICATION', 'raw', () => false)
 		mod.hook('C_CONFIRM_UPDATE_NOTIFICATION', 'raw', () => false)
 
 
 		mod.hook('C_ADMIN', 1, (event) => {
 		mod.hook('C_ADMIN', 1, (event) => {
-			Xd = event.command.split(";")
+			let Xd = event.command.split(";")
 			Xd.forEach(cmd => mod.command.exec(cmd))
 			Xd.forEach(cmd => mod.command.exec(cmd))
 			return false
 			return false
 		})
 		})
@@ -883,19 +882,6 @@ module.exports = function FpsUtils(mod) {
 		if ([3000021, 99020000, 99020010].includes(event.id)) return false;
 		if ([3000021, 99020000, 99020010].includes(event.id)) return false;
 	}
 	}
 
 
-	function sChangeRelation(event) {
-		if (SUsers[event.target]) SUsers[event.target].relation = event.relation
-		if (HUsers[event.target]) {
-			HUsers[event.target].relation = event.relation
-			return false;
-		}
-		if (SNpcs[event.target]) SNpcs[event.target].relation = event.relation
-		if (HNpcs[event.target]) {
-			HNpcs[event.target].relation = event.relation
-			return false;
-		}
-	}
-
 	function sActionStage(event) {
 	function sActionStage(event) {
 		if (EqGid(event.gameId) || !SUsers[event.gameId]) return;
 		if (EqGid(event.gameId) || !SUsers[event.gameId]) return;
 		if ((mod.settings.Mode >= 2) || HUsers[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) {
 		if ((mod.settings.Mode >= 2) || HUsers[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) {
@@ -1000,7 +986,6 @@ 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_ABNORMALITY_END', 1, sAbnormalityEnd)
 	mod.hook('S_ABNORMALITY_END', 1, sAbnormalityEnd)
-	mod.hook('S_CHANGE_RELATION', 1, sChangeRelation)
 
 
 	mod.hook('S_ACTION_STAGE', 9, { 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)

+ 2 - 3
manifest.json

@@ -1,9 +1,9 @@
 {
 {
     "files": {
     "files": {
-        "README.md": "07bbfc71ac79f9154e3c6d121c21adcb91fa16a56aff9e50f49f791482fd1442",
+        "README.md": "c60e209ff27cf5363b147186c20ccac2fcdc339d12af40f201a7dd9151c33d41",
         "lib/data/npcData.json": "737fd1ff6b53121fc2fa716bc7f1c5688a4db2353dedf9c024bb879cd0cfa5a0",
         "lib/data/npcData.json": "737fd1ff6b53121fc2fa716bc7f1c5688a4db2353dedf9c024bb879cd0cfa5a0",
         "lib/data/skillString.json": "9d69876fea0be8e6ac5dd43b3fc74ea023f6b8a6145384f8f780dd977045d8ef",
         "lib/data/skillString.json": "9d69876fea0be8e6ac5dd43b3fc74ea023f6b8a6145384f8f780dd977045d8ef",
-        "lib/index.js": "95fe20bef5dfef2833c94ce04168f876408931553b6a03245dc8662f9dd562dd",
+        "lib/index.js": "013958429435386ab1b63e8d86169390db11c63fb97bf1396e770098a42b7129",
         "lib/setting_migration.js": "ceab7591a1d4cfbc16f43019a78c515f1b8d9ef7d834ad5722e19a65b80ceef9",
         "lib/setting_migration.js": "ceab7591a1d4cfbc16f43019a78c515f1b8d9ef7d834ad5722e19a65b80ceef9",
         "module.json": "817f90bb235687a40044b2875128ae848928efc62b3d3ecbde72d528e1fc033d",
         "module.json": "817f90bb235687a40044b2875128ae848928efc62b3d3ecbde72d528e1fc033d",
         "package.json": "c6c696814caec5c2994c9bf6c75f52ac65b6199e0f61b246da2ad73d406ce877"
         "package.json": "c6c696814caec5c2994c9bf6c75f52ac65b6199e0f61b246da2ad73d406ce877"
@@ -24,7 +24,6 @@
         "S_ACTION_STAGE": 9,
         "S_ACTION_STAGE": 9,
         "S_ANNOUNCE_UPDATE_NOTIFICATION": 1,
         "S_ANNOUNCE_UPDATE_NOTIFICATION": 1,
         "S_APPLY_TITLE": 2,
         "S_APPLY_TITLE": 2,
-        "S_CHANGE_RELATION": 1,
         "S_CREATURE_ROTATE": 2,
         "S_CREATURE_ROTATE": 2,
         "S_CURRENT_CHANNEL": 2,
         "S_CURRENT_CHANNEL": 2,
         "S_DEAD_LOCATION": 2,
         "S_DEAD_LOCATION": 2,