События Lua

События - функции, вызывающиеся автоматически при определённых условиях. Все аргументы и возвращаемые значения событий MoonLoader опциональны.

Версия Lua
v.015 main()
v.022 onExitScript(bool quitGame)
v.015 onQuitGame()
v.015 onScriptLoad(scriptinfo s)
v.022 onScriptTerminate(scriptinfo s, bool quitGame)
v.015 onSystemInitialized()
v.015 onScriptMessage(string msg, scriptinfo s)
v.015 onSystemMessage(string msg, int type, scriptinfo s)
v.015 [bool process=true], [int id], [bitstream bitStream] = onReceivePacket(int id, bitstream bitStream)
v.015 [bool process=true], [int id], [bitstream bitStream] = onReceiveRpc(int id, bitstream bitStream)
v.015 [bool process=true], [int id], [bitstream bitStream], [int priority], [int reliability], [int orderingChannel] = onSendPacket(int id, bitstream bitStream, int priority, int reliability, int orderingChannel)
v.015 [bool process=true], [int id], [bitstream bitStream], [int priority], [int reliability], [int orderingChannel], [bool shiftTs] = onSendRpc(int id, bitstream bitStream, int priority, int reliability, int orderingChannel, bool shiftTs)
v.022 onWindowMessage(uint msg, uint wparam, int lparam)