mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
* Drop raids in C++ in favor of Lua global events - Move raids to globalevents, create Lua interface - Move force raid command to talkaction - Create example raid as globalevent - Add Lua interface to execute timed GlobalEvents
25 lines
551 B
Lua
25 lines
551 B
Lua
local talk = TalkAction("/event", "!event")
|
|
|
|
function talk.onSay(player, words, param)
|
|
if not player:getGroup():getAccess() then
|
|
return true
|
|
end
|
|
|
|
if player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER then
|
|
return false
|
|
end
|
|
|
|
logCommand(player, words, param)
|
|
|
|
local returnValue = Game.startEvent(param)
|
|
if returnValue == nil then
|
|
player:sendTextMessage(MESSAGE_INFO_DESCR, "No such event exists.")
|
|
return false
|
|
end
|
|
|
|
player:sendTextMessage(MESSAGE_INFO_DESCR, "Event started.")
|
|
return returnValue
|
|
end
|
|
|
|
talk:separator(" ")
|
|
talk:register()
|