Created
July 1, 2016 16:51
-
-
Save keevitaja/ecd7b2ada98393b99bc75156b8145bfa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const trigger = require('./trigger'); | |
const system = require('./system'); | |
let results = []; | |
trigger.set({ | |
event: 'plugin.start', | |
pattern: 'Listing all areas in range 1 to 210', | |
priority: 1, | |
gag: true | |
}); | |
trigger.on('plugin.start', (matches, stripped, line)=> { | |
results.push(stripped); | |
trigger.set({ | |
event: 'plugin.read', | |
pattern: '', | |
priority: 3, | |
gag: true | |
}); | |
trigger.set({ | |
event: 'plugin.end', | |
pattern: 'means you cannot enter until you are that level or higher', | |
priority: 2, | |
gag: true | |
}); | |
}); | |
trigger.on('plugin.read', (matches, stripped, line)=> { | |
results.push(stripped); | |
}); | |
trigger.on('plugin.end', (matches, stripped, line)=> { | |
results.push(stripped); | |
trigger.destroy('plugin.read'); | |
trigger.destroy('plugin.end'); | |
for (let i in results) { | |
system.show(results[i]); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment