|
|
@@ -245,9 +245,10 @@ module.exports = function FpsUtils(mod) {
|
|
|
{ text: `<font color="${mod.settings.Mode === 3 ? GrnC : RedC}" size="+18">[Mode 3]</font>`, command: "fps mode 3;fps gui" }, { text: " " },
|
|
|
{ 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 effect]</font>`, command: "fps hit other;fps gui" }, { text: " " },
|
|
|
- { text: `<font color="${mod.settings.Hit_Me ? GrnC : RedC}" size="+18">[Own effect]</font>`, command: "fps hit me;fps gui" }, { text: " " },
|
|
|
- { text: `<font color="${mod.settings.Hit_Damage ? GrnC : RedC}" size="+18">[Damage numbers]</font><br><br>`, command: "fps hit damage;fps gui" },
|
|
|
+ { 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_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: " " },
|
|
|
{ text: `<font color="${mod.settings.HideMySummons ? GrnC : RedC}" size="+17">[Own summons]</font>`, command: "fps summons me;fps gui" }, { text: " " },
|
|
|
@@ -517,17 +518,40 @@ module.exports = function FpsUtils(mod) {
|
|
|
function ModifySkillResult(event) {
|
|
|
let modified = false;
|
|
|
|
|
|
- if (mod.settings.Hit_Me) {
|
|
|
- event.skill = { reserved: 0, npc: false, type: 0, huntingZoneId: 0, id: 0 };
|
|
|
+ if (mod.settings.Hit_Me && (EqGid(event.source) || EqGid(event.owner))) {
|
|
|
+ event.templateId = 10101;
|
|
|
+ event.skill.id = 10100;
|
|
|
+ event.time = 0;
|
|
|
+ event.crit = false;
|
|
|
+
|
|
|
modified = true;
|
|
|
}
|
|
|
|
|
|
- if (mod.settings.Hit_Damage) {
|
|
|
- event.damage = event.type = event.crit = event.noctEffect = event.stackExplode = 0;
|
|
|
+ if (mod.settings.Hit_Other && !EqGid(event.target) && !EqGid(event.source) && !EqGid(event.owner) && (SUsers[event.owner] || SUsers[event.source])) {
|
|
|
+ event.templateId = 10101;
|
|
|
+ event.skill.id = 10100;
|
|
|
+ event.time = 0;
|
|
|
+ event.crit = false;
|
|
|
+
|
|
|
modified = true;
|
|
|
}
|
|
|
|
|
|
- return modified;
|
|
|
+ if (mod.settings.Hit_Damage && (EqGid(event.source) || EqGid(event.owner) || UserSumNPCs.includes(event.templateId) && event.skill.huntingZoneId === 1023)) {
|
|
|
+ event.id = event.damage = event.type = event.noctEffect = event.reaction.id = 0;
|
|
|
+ event.crit = event.stackExplode = event.blocked = false;
|
|
|
+
|
|
|
+ modified = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (mod.settings.Hit_All) {
|
|
|
+ event.id = event.damage = event.type = event.noctEffect = event.reaction.id = 0;
|
|
|
+ event.crit = event.stackExplode = event.blocked = false;
|
|
|
+ event.target = 0;
|
|
|
+
|
|
|
+ modified = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return modified ? true : undefined;
|
|
|
}
|
|
|
|
|
|
function NpcBCheck(event) {
|
|
|
@@ -911,12 +935,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
|
|
|
function sEachSkillResult(event) {
|
|
|
- if ((EqGid(event.source) || EqGid(event.owner)) && ModifySkillResult(event)) return true;
|
|
|
- if (!EqGid(event.target) && mod.settings.Hit_Other && (SUsers[event.owner] || SUsers[event.source])) {
|
|
|
- event.skill = { reserved: 0, npc: false, type: 0, huntingZoneId: 0, id: 0 };
|
|
|
- event.id = event.damage = event.type = event.crit = event.noctEffect = event.crit = event.stackExplode = event.blocked = event.reaction.skill = 0;
|
|
|
- return true;
|
|
|
- }
|
|
|
+ return ModifySkillResult(event);
|
|
|
}
|
|
|
|
|
|
function sSpawnDropItem(event) {
|
|
|
@@ -934,7 +953,7 @@ module.exports = function FpsUtils(mod) {
|
|
|
}
|
|
|
|
|
|
function sFontSwapInfo() {
|
|
|
- if (mod.settings.Hit_Damage) return false;
|
|
|
+ if (mod.settings.Hit_Damage || mod.settings.Hit_All) return false;
|
|
|
}
|
|
|
|
|
|
// ~~~ * Packet Hooks * ~~~ \\
|
|
|
@@ -954,7 +973,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.
|
|
|
+ //mod.hook('S_QUEST_VILLAGER_INFO', 'raw', sQuestVillagerInfo) opcode currently not public, but soon it will be. **someday** qq
|
|
|
mod.hook('S_UPDATE_ACHIEVEMENT_PROGRESS', 'raw', sUpdateAchievementProgress)
|
|
|
mod.hook('S_CURRENT_CHANNEL', 2, sCurrentChannel)
|
|
|
mod.hook('S_ITEM_CUSTOM_STRING', 2, sItemCustomString)
|
|
|
@@ -1222,17 +1241,25 @@ module.exports = function FpsUtils(mod) {
|
|
|
case "hit":
|
|
|
switch (arg) {
|
|
|
case "me":
|
|
|
+ if (mod.settings.Hit_All) return Msg(`<font color="${RedC}">You've to disable hit ALL first</font>.`);
|
|
|
mod.settings.Hit_Me = !mod.settings.Hit_Me;
|
|
|
Msg(`Own hits effect ${mod.settings.Hit_Me ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
|
|
|
break;
|
|
|
case "other":
|
|
|
+ if (mod.settings.Hit_All) return Msg(`<font color="${RedC}">You've to disable hit ALL first</font>.`);
|
|
|
mod.settings.Hit_Other = !mod.settings.Hit_Other;
|
|
|
Msg(`Players hit effect ${mod.settings.Hit_Other ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
|
|
|
break;
|
|
|
case "damage":
|
|
|
+ if (mod.settings.Hit_All) return Msg(`<font color="${RedC}">You've to disable hit ALL first</font>.`);
|
|
|
mod.settings.Hit_Damage = !mod.settings.Hit_Damage;
|
|
|
Msg(`Damage numbers ${mod.settings.Hit_Damage ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
|
|
|
break;
|
|
|
+ case "all":
|
|
|
+ mod.settings.Hit_Me = mod.settings.Hit_Other = mod.settings.Hit_Damage = false;
|
|
|
+ mod.settings.Hit_All = !mod.settings.Hit_All;
|
|
|
+ Msg(`Hit all ${mod.settings.Hit_All ? `<font color="${GrnC}">Hidden</font>` : `<font color="${RedC}">Shown</font>`}.`);
|
|
|
+ break;
|
|
|
default:
|
|
|
Msg(`<font color="${GryC}">Invalid (hit) '${arg}'</font>.`);
|
|
|
break;
|