• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.2] Guild Leaders chatchannel

zbizu

Legendary OT User
Joined
Nov 22, 2010
Messages
3,323
Solutions
26
Reaction score
2,690
Location
Poland
original author: @Ninja
original thread: Guild Leaders Channel (9.X and 8.6)

(see link to know what this script does)
no source edits needed

chatchannels.xml:
Code:
<channel id="10" name="Guild Leaders" script="guildleaders.lua" />

guildleaders.lua
Code:
function canJoin(player)
	return player:getGuildLevel() == 3 or player:getGroup():getAccess()
end

function onSpeak(player, type, message)
	local staff = player:getGroup():getAccess()
	local guild = player:getGuild()
	local info = "staff"
	type = TALKTYPE_CHANNEL_Y
	
	if staff then
		if guild then
			info =  info .. "][" .. guild:getName()
		end
		type = TALKTYPE_CHANNEL_O
	else
		info = guild:getName()
	end
	
	sendChannelMessage(10, type, player:getName() .. " [" .. info .. "]: " .. message)
	return false
end
 
original author: @Ninja
original thread: Guild Leaders Channel (9.X and 8.6)

(see link to know what this script does)
no source edits needed

chatchannels.xml:
Code:
<channel id="10" name="Guild Leaders" script="guildleaders.lua" />

guildleaders.lua
Code:
function canJoin(player)
    return player:getGuildLevel() == 3 or player:getGroup():getAccess()
end

function onSpeak(player, type, message)
    local staff = player:getGroup():getAccess()
    local guild = player:getGuild()
    local info = "staff"
    type = TALKTYPE_CHANNEL_Y
   
    if staff then
        if guild then
            info =  info .. "][" .. guild:getName()
        end
        type = TALKTYPE_CHANNEL_O
    else
        info = guild:getName()
    end
   
    sendChannelMessage(10, type, player:getName() .. " [" .. info .. "]: " .. message)
    return false
end

it isn't working for me :/ using tfs 1.2 but it doesn't show the channel (im logged on a non god/gamemaster acc) and I created a guild with the character do I have to change chat.cpp like the in the thread of ninja?
 
it isn't working for me :/ using tfs 1.2 but it doesn't show the channel (im logged on a non god/gamemaster acc) and I created a guild with the character do I have to change chat.cpp like the in the thread of ninja?
change chanel id to 9
 
Back
Top