Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function test() {
- var action;
- function chat(nick, msg) {
- if (nick === "bla") {
- action = msg;
- }
- }
- addEventListener("chatmsg", chat);
- while (true) {
- switch (action) {
- case "a":
- do something
- break;
- case "b":
- do something else
- break;
- }
- action = "";
- delay(200);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement