Skip to content

Instantly share code, notes, and snippets.

@keevitaja
Created July 1, 2016 16:51
Show Gist options
  • Save keevitaja/ecd7b2ada98393b99bc75156b8145bfa to your computer and use it in GitHub Desktop.
Save keevitaja/ecd7b2ada98393b99bc75156b8145bfa to your computer and use it in GitHub Desktop.
"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