Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Fix message and min level for talk in "advertising" and "english chat" (
Browse files Browse the repository at this point in the history
#395)

Same behavior as in global tibia, so the requirement will be at least level 20 or have a premium account. In addition to fixed the message.
  • Loading branch information
travisani committed Jan 26, 2022
1 parent 2a22212 commit c6cc888
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions data/chatchannels/scripts/advertising.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function onSpeak(player, type, message)
return true
end

if player:getLevel() == 1 then
player:sendCancelMessage("You may not speak into channels as long as you are on level 1.")
if player:getLevel() < 20 and not player:isPremium() then
player:sendCancelMessage("You may not speak in this channel unless you have reached level 20 or your account has premium status.")
return false
end

Expand Down
6 changes: 3 additions & 3 deletions data/chatchannels/scripts/english_chat.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function onSpeak(player, type, message)
local playerAccountType = player:getAccountType()
if player:getLevel() == 1 and playerAccountType < ACCOUNT_TYPE_GAMEMASTER then
player:sendCancelMessage("You may not speak into channels as long as you are on level 1.")
if player:getLevel() < 20 and not player:isPremium() then
player:sendCancelMessage("You may not speak in this channel unless you have reached level 20 or your account has premium status.")
return false
end

local playerAccountType = player:getAccountType()
if type == TALKTYPE_CHANNEL_Y then
if playerAccountType >= ACCOUNT_TYPE_GAMEMASTER then
type = TALKTYPE_CHANNEL_O
Expand Down

0 comments on commit c6cc888

Please sign in to comment.