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

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
Родитель
Сommit
1666eda7bf
1 измененных файлов с 4 добавлено и 0 удалено
  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)