This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
magicka/scripts_examples/mailmenu.lua

25 lines
505 B
Lua
Raw Normal View History

function menu()
-- display menu ansi
bbs_display_ansi("mailmenu");
-- display prompt
local conf_no;
local conf_name;
local area_no;
local area_name;
conf_no, conf_name, area_no, area_name = bbs_cur_mailarea_info();
bbs_write_string(string.format("\r\n\027[0mConf: (%d) %s\r\nArea: (%d) %s\r\n(LUA) TL: %dm > ", conf_no, conf_name, area_no, area_name, bbs_time_left()));
-- read char entered
cmd = bbs_read_char();
-- do stuff if you want
-- return the char entered
return cmd;
end