mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
21 lines
621 B
Lua
21 lines
621 B
Lua
function canJoin(player)
|
|
return player:getAccountType() >= ACCOUNT_TYPE_GAMEMASTER
|
|
end
|
|
|
|
function onSpeak(player, type, message)
|
|
local playerAccountType = player:getAccountType()
|
|
if type == TALKTYPE_CHANNEL_Y then
|
|
if playerAccountType == ACCOUNT_TYPE_GOD then
|
|
type = TALKTYPE_CHANNEL_O
|
|
end
|
|
elseif type == TALKTYPE_CHANNEL_O then
|
|
if playerAccountType ~= ACCOUNT_TYPE_GOD then
|
|
type = TALKTYPE_CHANNEL_Y
|
|
end
|
|
elseif type == TALKTYPE_CHANNEL_R1 then
|
|
if playerAccountType ~= ACCOUNT_TYPE_GOD and not player:hasFlag(PlayerFlag_CanTalkRedChannel) then
|
|
type = TALKTYPE_CHANNEL_Y
|
|
end
|
|
end
|
|
return type
|
|
end
|