Files
wsmud/world/cmd/admin/notice.js
2026-05-26 16:41:20 +08:00

32 lines
913 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
this.inherits(COMMAND);
this.command = "notice";
this.allow_busy = true;
this.allow_state = true;
this.allow_die = true;
this.allow_level = 1;
const MESSAGE = WORLD.MESSAGE;
this.enter = function (me, arg) {
var nt = {
content: arg,
time: Date.now()
};
MESSAGE.NOTICES.push(nt);
var item = {
type: "dialog", dialog: "message", message: {
time: nt.time,
content: nt.content,
id: "notice",
name: "系统公告"
}
};
var str = JSON.stringify(item);
WORLD.sendAll(str);
}
this.updatelast = function (me) {
MESSAGE.NOTICES[MESSAGE.NOTICES.length - 1].content = `
古大陆妖族营地在每周快速完成后,仍可以继续手动击杀,直到每周上限。
降低营地1刷新速度10秒其他营地暂时关闭
`;
me.send(MESSAGE.NOTICES[MESSAGE.NOTICES.length - 1].content);
}