1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-10 16:07:45 +00:00
kawari/resources/scripts/Init.lua
thedax ca90d8b787
Move the login message from Lua scripts into the config file. (#100)
-Provide a new API function: getLoginMessage which will fetch it from the config file.
2025-07-04 11:42:52 -04:00

26 lines
937 B
Lua

BASE_DIR = "resources/scripts/"
dofile(BASE_DIR.."commands/Commands.lua")
dofile(BASE_DIR.."actions/Actions.lua")
dofile(BASE_DIR.."events/Events.lua")
dofile(BASE_DIR.."items/Items.lua")
dofile(BASE_DIR.."Global.lua")
-- Lua error handlers, and other server events like player login
function onBeginLogin(player)
-- send a welcome message
player:send_message(getLoginMessage())
end
function onCommandRequiredRankInsufficientError(player)
player:send_message("You do not have permission to run this command.")
end
function onCommandRequiredRankMissingError(additional_information, player)
local error_msg = "Your script does not define the required_rank variable. Please define it in your script for it to run."
printf(player, "%s\nAdditional information: %s", error_msg, additional_information)
end
function onUnknownCommandError(command_name, player)
printf(player, "Unknown command %s", command_name)
end