Comments (1)
Another version:
//Pattern: ^--More--.*$
//Style: script
//Trigger type: regular expression
//Trigger on prompt enabled
//Trigger on newline disabled
//Value:
//use a once fire event on next time any text is sent from the client meaning any valid command was sent to the mud, with data argument for more advanced testing if desired
//store event so it can be manually removed for cleanup
window.moreprompt_event = data => {
clearTimeout(window.moreprompt || 0);
window.moreprompt = 0;
window.moreprompt_event = 0;
}
client.once('parse-command',window.moreprompt_event);
if(!window.moreprompt) // check if already triggerd
window.moreprompt = setTimeout(()=>{
client.sendCommand('\n');
window.moreprompt = 0; //clear here just in case the 2nd trigger fails to fire
client.removeListener('parse-command', window.moreprompt_event); //clear event to prevent clearing early
window.moreprompt_event = 0;
}, 6000);
//store the timeout id to let it be cleared in case manually did a prompt command
from jimud.
Related Issues (20)
- Add confirm on close for editors HOT 2
- Wayland support HOT 3
- Command input: Allow a fixed set height HOT 1
- Status: Add ability to set the monster/party icons HOT 1
- Code editor: Tab drop down menu not updated HOT 1
- Code editor: project/workspace system HOT 1
- Code editor: Sessions
- Display: add highlight support to scroll bar
- Mapper: copy marked path HOT 2
- Mapper: 3d a* pathing or some other one HOT 1
- Linux resize issues
- Context Menus: Add visible parameter
- Code editor: Add monster/object previews
- Datagrid control: value formatting may have old data
- Backup: backup all characters remotely HOT 1
- Immortal tools: Nested directory delete randomly breaks HOT 2
- Client options need to use set/getOption not direct access
- Code editor: Virtual area editor add option to create/remove sub files HOT 1
- Code editor: Virtual area editor, raw map corruption HOT 2
- Chat window command input
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jimud.