Browse Source

Block "That isn't yours." system message

When you or the plugin attempt to loot an item from another player, the game displays a message. This commits blocks this message from appearing.
Alejandro Ojeda 9 years ago
parent
commit
1666eda7bf
1 changed files with 4 additions and 0 deletions
  1. 4 0
      index.js

+ 4 - 0
index.js

@@ -76,6 +76,10 @@ module.exports = function Loot(dispatch) {
         if(event.id.toString() in loot) delete loot[event.id.toString()];    
     });
 
+    dispatch.hook('S_SYSTEM_MESSAGE', 1, (event) => {
+        if(event.message === '@41') return false;  // Block "That isn't yours." system message.
+    });
+
     function tryLootAll() {
         for(let item in loot) {
             if(location)