2017-03-01 15:50:14 -05:00
|
|
|
--copy or symbolic link this file to /server/lua_modules/, it will not work in /server/quests/lua_modules/
|
2016-01-02 08:35:45 -08:00
|
|
|
|
2026-04-05 16:36:43 -07:00
|
|
|
local commands_path = "commands/";
|
2018-07-08 02:54:09 -05:00
|
|
|
local commands = { };
|
2015-03-14 16:18:39 -04:00
|
|
|
|
2026-05-28 20:00:09 -04:00
|
|
|
commands["don"] = { 80, require(commands_path .. "don") };
|
|
|
|
|
commands["endurance"] = { 50, require(commands_path .. "endurance") };
|
|
|
|
|
commands["lockouts"] = { 0, require(commands_path .. "lockouts") };
|
|
|
|
|
commands["timeleft"] = { 0, require(commands_path .. "time_left") };
|
|
|
|
|
commands["hotzone"] = { 0, require(commands_path .. "hotzone") };
|
|
|
|
|
commands["hotzones"] = { 0, require(commands_path .. "hotzone") };
|
2015-03-14 16:18:39 -04:00
|
|
|
|
|
|
|
|
function eq.DispatchCommands(e)
|
|
|
|
|
local command = commands[e.command];
|
2018-07-08 02:54:09 -05:00
|
|
|
|
|
|
|
|
for k,v in pairs(e.args) do
|
2023-07-23 01:44:22 -05:00
|
|
|
eq.debug("[command.lua] key " .. k .. ' value ' .. v, 3);
|
2018-07-08 02:54:09 -05:00
|
|
|
end
|
|
|
|
|
|
2015-03-14 16:18:39 -04:00
|
|
|
if(command) then
|
|
|
|
|
local access = command[1];
|
|
|
|
|
if(access > e.self:Admin()) then
|
2023-08-13 17:16:42 -04:00
|
|
|
e.self:Message(MT.Red, "Access level not high enough.");
|
2015-03-14 16:18:39 -04:00
|
|
|
return 1;
|
|
|
|
|
end
|
2019-08-15 22:20:00 -05:00
|
|
|
|
2015-03-14 16:18:39 -04:00
|
|
|
local func = command[2];
|
|
|
|
|
func(e);
|
|
|
|
|
return 1;
|
2019-08-15 22:20:00 -05:00
|
|
|
end
|
2015-03-14 16:18:39 -04:00
|
|
|
return 0;
|
2018-07-11 08:15:56 -04:00
|
|
|
end
|