|
|
@@ -2,11 +2,9 @@
|
|
|
/* global __dirname */
|
|
|
|
|
|
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 NpcData = require("./data/npcData.json");
|
|
|
- const SkillData = require("./data/skillString.json");
|
|
|
+ const NotCP = typeof global.TeraProxy === 'undefined';
|
|
|
+ const NpcData = require("./data/npc.json"), SkillData = require("./data/skill.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 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];
|
|
|
@@ -31,7 +29,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
|
|
|
const Xmap = new WeakMap();
|
|
|
|
|
|
- if (!Xmap.has(mod.dispatch || mod)) { //TODO; sth for this.
|
|
|
+ if (!Xmap.has(mod.dispatch || mod)) {
|
|
|
Xmap.set(mod.dispatch || mod, {});
|
|
|
|
|
|
mod.hook('C_CONFIRM_UPDATE_NOTIFICATION', 'raw', () => false)
|
|
|
@@ -246,8 +244,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ text: `<font color="${mod.settings.Fishing ? GrnC : RedC}" size="+18">[Fishing]</font><br><br>`, command: "fps fishing;fps gui" },
|
|
|
{ text: `<font color="${YlwC}" size="+21">Hit:</font>` }, { text: "			" },
|
|
|
{ text: `<font color="${mod.settings.Hit_Other ? GrnC : RedC}" size="+18">[Players]</font>`, command: "fps hit other;fps gui" }, { text: " " },
|
|
|
- { text: `<font color="${mod.settings.Hit_Me ? GrnC : RedC}" size="+18">[Own(self)]</font>`, command: "fps hit me;fps gui" }, { text: " " },
|
|
|
- { text: `<font color="${mod.settings.Hit_Damage ? GrnC : RedC}" size="+18">[Damage numbers]</font>`, command: "fps hit damage;fps gui" }, { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.Hit_Me ? GrnC : RedC}" size="+18">[Own]</font>`, command: "fps hit me;fps gui" }, { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.Hit_Damage ? GrnC : RedC}" size="+18">[Dmg/heal numbers]</font>`, command: "fps hit damage;fps gui" }, { text: " " },
|
|
|
{ text: `<font color="${mod.settings.Hit_All ? GrnC : RedC}" size="+18">[ALL]</font><br><br>`, command: "fps hit all;fps gui" },
|
|
|
{ text: `<font color="${YlwC}" size="+21">Hide:</font>` }, { text: "		" },
|
|
|
{ text: `<font color="${mod.settings.HideOthersSummons ? GrnC : RedC}" size="+17">[Players summons]</font>`, command: "fps summons;fps gui" }, { text: " " },
|
|
|
@@ -256,7 +254,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ text: `<font color="${mod.settings.ShowStyle ? GrnC : RedC}" size="+17">[Style]</font>`, command: "fps style;fps gui" }, { text: " " },
|
|
|
{ text: `<font color="${mod.settings.Hideguildlogos ? GrnC : RedC}" size="+17">[Guild Logos]</font>`, command: "fps guildlogo;fps gui" }, { text: " " },
|
|
|
{ text: `<font color="${mod.settings.HideBlacklistedDrop ? GrnC : RedC}" size="+17">[Drops]</font>`, command: "fps dropitem;fps gui" }, { text: " " },
|
|
|
- { text: `<font color="${mod.settings.HideOwnBlacklistedAbns ? GrnC : RedC}" size="+17">[Dizziness]</font><br>`, command: "fps screenabns;fps gui" }, { text: "			" },
|
|
|
+ { text: `<font color="${mod.settings.HideOwnBlacklistedAbns ? GrnC : RedC}" size="+17">[Dizziness]</font>`, command: "fps screenabns;fps gui" }, { text: " " },
|
|
|
+ { text: `<font color="${mod.settings.HideHpMpNumbers ? GrnC : RedC}" size="+17">[HpMp Nums]</font><br>`, command: "fps hpmpnumbers;fps gui" }, { text: "			" },
|
|
|
{ text: `<font color="${mod.settings.HideAllAbnormalities ? GrnC : RedC}" size="+16">[All Abnormals]</font>`, command: "fps abn all;fps gui" }, { text: " " },
|
|
|
{ text: `<font color="${mod.settings.HideBlacklistedAbnormalities ? GrnC : RedC}" size="+16">[Abnormals BList]</font>`, command: "fps abn blacklist;fps gui" }, { text: " " },
|
|
|
{ text: `<font color="${mod.settings.HideAllProjectiles ? GrnC : RedC}" size="+16">[All Projs]</font>`, command: "fps proj all;fps gui" }, { text: " " },
|
|
|
@@ -694,11 +693,11 @@ module.exports = function FpsUtils(mod) {
|
|
|
if ([1, 2, 3, 31, 32, 33].includes(event.animation)) return false;
|
|
|
}
|
|
|
|
|
|
- function sSystemMessage(event) { // TODO; probably delete this, as it's useless.
|
|
|
+ function sSystemMessage(event) {
|
|
|
if (!mod.settings.Fishing) return;
|
|
|
const msg = mod.parseSystemMessage(event.message)
|
|
|
- if (msg.id === 'SMT_KOREAN_RATING_TEENAGER_PROHIBITED') return false;
|
|
|
- if (msg.id === 'SMT_FIELD_EVENT_WORLD_ANNOUNCE') return false;
|
|
|
+ if (msg.id === 'SMT_FIELD_EVENT_WORLD_ANNOUNCE') return false; // Superior guardian spam.
|
|
|
+ if (msg.id === 'SMT_KOREAN_RATING_TEENAGER_PROHIBITED') return false; // You've been playing for X hours spam.
|
|
|
}
|
|
|
|
|
|
function sPartyMatchLink() {
|
|
|
@@ -934,6 +933,22 @@ module.exports = function FpsUtils(mod) {
|
|
|
if (!EqGid(event.gameId) && SUsers[event.gameId] && (HUsers[event.gameId] || mod.settings.Mode > 0 || mod.settings.HideAllProjectiles)) return false;
|
|
|
}
|
|
|
|
|
|
+ function sPlayerChangeMp(event) {
|
|
|
+ if (!mod.settings.HideHpMpNumbers || !EqGid(event.target)) return;
|
|
|
+ if (event.type != 0) {
|
|
|
+ event.type = 0;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function sCreatureChangeHp(event) {
|
|
|
+ if (!mod.settings.HideHpMpNumbers || !EqGid(event.target)) return;
|
|
|
+ if (event.type != 10) {
|
|
|
+ event.type = 10;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
function sEachSkillResult(event) {
|
|
|
return ModifySkillResult(event);
|
|
|
}
|
|
|
@@ -973,7 +988,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.hook('S_SYSTEM_MESSAGE', 1, sSystemMessage)
|
|
|
mod.hook('S_PARTY_MATCH_LINK', 'raw', sPartyMatchLink)
|
|
|
mod.hook('S_VIEW_PARTY_INVITE', 'raw', sViewPartyInvite)
|
|
|
- //mod.hook('S_QUEST_VILLAGER_INFO', 'raw', sQuestVillagerInfo) opcode currently not public, but soon it will be. **someday** qq
|
|
|
+ //mod.hook('S_QUEST_VILLAGER_INFO', 'raw', sQuestVillagerInfo) Currently the opcode for this ain't public, but it will be soon™.
|
|
|
mod.hook('S_UPDATE_ACHIEVEMENT_PROGRESS', 'raw', sUpdateAchievementProgress)
|
|
|
mod.hook('S_CURRENT_CHANNEL', 2, sCurrentChannel)
|
|
|
mod.hook('S_ITEM_CUSTOM_STRING', 2, sItemCustomString)
|
|
|
@@ -1009,6 +1024,8 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.hook('S_ACTION_STAGE', 9, { order: 999 }, sActionStage)
|
|
|
mod.hook('S_SPAWN_PROJECTILE', 5, { order: 999 }, sSpawnProjectile)
|
|
|
mod.hook('S_START_USER_PROJECTILE', 9, { order: 999 }, sStartUserProjectile)
|
|
|
+ mod.hook('S_PLAYER_CHANGE_MP', 1, sPlayerChangeMp)
|
|
|
+ mod.hook('S_CREATURE_CHANGE_HP', 6, sCreatureChangeHp)
|
|
|
mod.hook('S_EACH_SKILL_RESULT', 12, { order: 999 }, sEachSkillResult)
|
|
|
mod.hook('S_SPAWN_DROPITEM', 6, sSpawnDropItem)
|
|
|
mod.hook('S_FONT_SWAP_INFO', 'raw', sFontSwapInfo)
|
|
|
@@ -1475,6 +1492,10 @@ module.exports = function FpsUtils(mod) {
|
|
|
Msg(`Fishing mode is ${mod.settings.Fishing ? `<font color="${GrnC}">Enabled</font>` : `<font color="${RedC}">Disabled</font>`}.`);
|
|
|
mod.settings.Fishing ? HideNpcs('fish') : ShowNpcs('fish');
|
|
|
break;
|
|
|
+ case "hpmpnumbers":
|
|
|
+ mod.settings.HideHpMpNumbers = !mod.settings.HideHpMpNumbers;
|
|
|
+ Msg(`Own HpMp numbers ${mod.settings.HideHpMpNumbers ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`)
|
|
|
+ break;
|
|
|
case "help":
|
|
|
mod.command.exec("fps gui help");
|
|
|
break;
|
|
|
@@ -1483,6 +1504,6 @@ module.exports = function FpsUtils(mod) {
|
|
|
mod.command.exec("fps gui help");
|
|
|
break;
|
|
|
}
|
|
|
- if (!NotCP) mod.saveSettings(); // for some reason settings still.... doesn't save properly on first run for caali's proxy so we have this here now as temp fix I guess. 🤷
|
|
|
+ if (!NotCP) mod.saveSettings();
|
|
|
})
|
|
|
}
|