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

added disable fireworks option

Saegusa лет назад: 9
Родитель
Сommit
6df19b233a
2 измененных файлов с 18 добавлено и 3 удалено
  1. 2 1
      README.md
  2. 16 2
      index.js

+ 2 - 1
README.md

@@ -2,7 +2,7 @@
 
 
   Written for tera-proxy, a free script filled with features dedicated to improve your fps, in the open world and in dungeons.
   Written for tera-proxy, a free script filled with features dedicated to improve your fps, in the open world and in dungeons.
 
 
-  **To support development and me:** I accept any amount of MWA as donations on the EU-Killian server (I have debts to pay off) please PM me on discord Saegusa#3195 thanks.
+  **To support development and me:** I accept any amount of MWA as donations on the EU-Killian server (I have debts to pay off) Saegusa/Saegusa-chan or PM me on discord Saegusa#3195 thanks.
 
 
 ## How to use:
 ## How to use:
 * Setup tera-proxy by meishuu (https://github.com/meishuu/tera-proxy)
 * Setup tera-proxy by meishuu (https://github.com/meishuu/tera-proxy)
@@ -19,6 +19,7 @@
 * **!fps 1:** enable fps state 1 and remove skill particles and projectiles.
 * **!fps 1:** enable fps state 1 and remove skill particles and projectiles.
 * **!fps 2:** enable fps state 2 and remove all skill animations.
 * **!fps 2:** enable fps state 2 and remove all skill animations.
 * **!fps 3:** enable fps state 3 and remove any and all players from your screen.
 * **!fps 3:** enable fps state 3 and remove any and all players from your screen.
+* **!fps fireworks:** toggle fireworks flag (true: fireworks enabled / false: fireworks disabled) to save MASSIVE fps on guild bams and/or trigger Cairu. xd
 * **!fps hide:**
 * **!fps hide:**
     * **usage:** !fps hide [arg1]
     * **usage:** !fps hide [arg1]
     * **valid arguments:** dps, healers, tanks, any username
     * **valid arguments:** dps, healers, tanks, any username

+ 16 - 2
index.js

@@ -31,13 +31,14 @@ module.exports = function FpsUtils(dispatch) {
             tanks: false,
             tanks: false,
             healers: false,
             healers: false,
             dps: false
             dps: false
-        }
+        },
+        fireworks: false
     };
     };
 
 
     const classes = config.classes;
     const classes = config.classes;
 
 
     function getClass(m) {
     function getClass(m) {
-        return (m - 10101) % 100;
+        return (m % 100);
     }
     }
 
 
     function handleCommands(event) {
     function handleCommands(event) {
@@ -126,6 +127,12 @@ module.exports = function FpsUtils(dispatch) {
                 case "save":
                 case "save":
                     saveConfig();
                     saveConfig();
                     break; 
                     break; 
+                // Disable fireworks.
+                case "fireworks":
+                    flags.fireworks = !flags.fireworks;
+                    log('fps-utils toggled fireworks: ' + flags.fireworks);
+                    systemMsg(`toggled fireworks: ${flags.fireworks}`);
+                    break;
                 // Toggle individual classes on and off
                 // Toggle individual classes on and off
                 case "hide":
                 case "hide":
                     if(command.length < 3) {
                     if(command.length < 3) {
@@ -326,6 +333,13 @@ module.exports = function FpsUtils(dispatch) {
         }
         }
     });
     });
 
 
+    dispatch.hook('S_SPAWN_NPC', 3, (event) => {
+        if(flags.fireworks) {
+            if(event.id.toString().includes('4925812093')) return false;
+        }
+            
+    });
+
     dispatch.hook('S_USER_LOCATION', 1, (event) => {
     dispatch.hook('S_USER_LOCATION', 1, (event) => {
         // Update locations of every player in case we need to spawn them.
         // Update locations of every player in case we need to spawn them.
         hiddenPlayers[event.target].x = event.x2;
         hiddenPlayers[event.target].x = event.x2;