• 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!

Make a new chat channel, HOW?

ugurdrahs

New Member
Joined
May 6, 2010
Messages
555
Reaction score
2
Location
Netherland
Hi,

how to make a new chat channel?
I want to make a new chat channel named, GUILDLEADERS.
Only leaders of guild can be in it and talk with other guildleaders.


Repp+
 
Last edited:
data/xml/channels.xml

add:

<channel id="10" name="name of channel"/>

data/libs/000-constant.lua

add after:

CHANNEL_GUILD = 0
CHANNEL_PARTY = 1
CHANNEL_RVR = 3
CHANNEL_HELP = 9
CHANNEL_DEFAULT = 0xFFFE
CHANNEL_PRIVATE = 0xFFFF

add: CHANNEL_NAME = 10
 
data/xml/channels.xml

add:

<channel id="10" name="name of channel"/>

data/libs/000-constant.lua

add after:

CHANNEL_GUILD = 0
CHANNEL_PARTY = 1
CHANNEL_RVR = 3
CHANNEL_HELP = 9
CHANNEL_DEFAULT = 0xFFFE
CHANNEL_PRIVATE = 0xFFFF

add: CHANNEL_NAME = 10


but than only guildleaders can talk?
or not?
 
Make a new group, call it Player, give it access 2. Make sure the flags are the same as regular players, all commands the same as regular players.

In groups.xml, write this:
<channel id="X" name="Guild Leaders" access="2"/>
(Change X to something your not using)

In login.lua, make a check, if player is guild leader of a guild, then give him access 2. That way, he will gain access to the Guild Leader chat channel.
 
if the above didn't works with you
try c++ :P
in channels.xml
Code:
<channel id="10" name="Guilds laders"/>
and in chat.cpp
change this
Code:
		if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())))
to this one
Code:
		if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())) || (channelId == 10 && !player->getGuildLevel() == GUILDLEVEL_LEADER))
 
if the above didn't works with you
try c++ :P
in channels.xml
Code:
<channel id="10" name="Guilds laders"/>
and in chat.cpp
change this
Code:
		if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())))
to this one
Code:
		if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())) || (channelId == 10 && !player->getGuildLevel() == GUILDLEVEL_LEADER))

Will this create a channel were only guild leaders will be able to talk to eachother?
 
when you hold ctrl+o
it will check if the player has rank of guild leader
if yes then it will show it in the channel list
 
Did I do anything wrong since it didn't work because I could open this channel and talk with a non-guild character.

Code:
<channel id="7" name="Guild Leaders"/>

Code:
if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())) || (channelId == 7 && !player->getGuildLevel() == GUILDLEVEL_LEADER))
 
you didn't but i did xD
try this one
Code:
		if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())) || (channelId == 10 && !(player->getGuildLevel() == GUILDLEVEL_LEADER)))
 
Nope, Any character is able to talk there. :ninja:

edit: Gonna try the new one. Im sure it doesn't matter if I got channelID 7 instead of 10? :o
 
i just tested it and it works :o
make sure you changed the channel id

Recompiling right now :)

Should we working now, will edit my post if it's working x)

Edit: Worked, the channel doesn't exist for character without any guild. Do you know how to make you a representative of your guild?

Example:

DanneXD (Inmates) [1]: hi
SpiderOt (Arcanium) [1]: hello
 
Last edited:
it works thanks!

Recompiling right now :)

Should we working now, will edit my post if it's working x)

Edit: Worked, the channel doesn't exist for character without any guild. Do you know how to make you a representative of your guild?

Example:

DanneXD (Inmates) [1]: hi
SpiderOt (Arcanium) [1]: hello

Yeah would be nice to!:)

anyone?
 
Last edited by a moderator:
Back
Top