-
-
Save cydh/32efb81ee3b83764c8c2dd998e2d66ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=========================== | |
| Channel Commands [Cydh] | | |
=========================== | |
--------------------------------------- | |
*channel_create "<chname>","<alias>"{,"<password>"{<option>{,<delay>{,<color>{,<char_id>}}}}}; | |
Creates public channel with <chname> as the channel name. To protect the | |
channel, use <password> or write "null" to create it without password. | |
Channel name must be started with '#' and cannot be same with map or ally | |
channel names. | |
<alias> will be used to change the channel name when the channel message | |
is displayed. | |
<option> values are: | |
CHAN_OPT_BASE - Default option including CHAN_OPT_ANNOUNCE_SELF|CHAN_OPT_MSG_DELAY|CHAN_OPT_CAN_CHAT|CHAN_OPT_CAN_LEAVE | |
CHAN_OPT_ANNOUNCE_SELF - Show info for player itself if player is joined/left the channel | |
CHAN_OPT_ANNOUNCE_JOIN - Display message when player is joining the channel | |
CHAN_OPT_ANNOUNCE_LEAVE - Display message when player is leaving the channel | |
CHAN_OPT_MSG_DELAY - Enable chat delay for the channel | |
CHAN_OPT_COLOR_OVERRIDE - Player's fontcolor will override channel's color | |
CHAN_OPT_CAN_CHAT - Player can chat in the channel | |
CHAN_OPT_CAN_LEAVE - Player can leave from the channel | |
CHAN_OPT_AUTOJOIN - Logged player will auto join the channel | |
The <delay> is chat delay in milisecond for a single player can chat again | |
in the same channel. | |
Use <color> hex code to set color for this channel, if not defined, default | |
channel color will be used. | |
If <char_id> is defined, the channel will be private channel and the player | |
will be the the channel owner. | |
Returns 1 on success. | |
/** | |
* This example will shows the message on this channel as | |
* [rAthena] Admin : Hello world! | |
* instead of | |
* #rathena Admin : Hello world! | |
**/ | |
channel_create("#rathena","[rAthena]"); | |
channel_create("#vip","[VIP]","vipmemberonly"); | |
--------------------------------------- | |
*channel_setopt "<chname>",<option>,<value>; | |
Set option for the channel. Use 1 in <value> to set it, or 0 to unset. | |
The <option> values are same with 'channel_create'. | |
For CHAN_OPT_MSG_DELAY must followed with delay in milisecond or use 0 | |
to remove the delay at <value>. | |
Returns 1 on success. | |
// Example to set delay | |
channel_setopt("#global",CHAN_OPT_MSG_DELAY,5000); | |
Only for public and private channel. | |
--------------------------------------- | |
*channel_setcolor "<chname>",<color>; | |
To change channel color. | |
<color> is using hex RGB value. | |
Returns 1 on success. | |
--------------------------------------- | |
*channel_setpass "<chname>","<password>"; | |
To set, unset, or change password of a channel. | |
Use "null" to remove the password. | |
Returns 1 on success. | |
Only for public and private channel. | |
--------------------------------------- | |
*channel_setgroup "<chname>",<group_id>{,...,<group_id>}; | |
*channel_setgroup2 "<chname>",<array_of_groups>; | |
Set group restriction for a channel. Only player with matched <group_id> | |
that allowed to to join the channel. | |
By using 0 in the first group channel, the group restriction will be | |
removed from the channel config. | |
'channel_setgroup2' receives input for group list as an array. | |
Returns 0 on failure, and 1 (or n groups count) on success. | |
// Example 1: Remove groups | |
channel_setgroup("#event",0); | |
// Example 2: Multiple values | |
channel_setgroup("#vip",2,5); | |
// Example 3: Using array | |
setarray .@staffs[0],2,3,4,10,99; | |
channel_setgroup("#staff",.@staffs); | |
Only for public and private channel. | |
--------------------------------------- | |
*channel_chat "<chname>","<message>"{,<color>}; | |
Sends message to the channel. | |
Returns 1 on success. | |
// Example if channel doesn't have alias | |
channel_chat(#rathena,"Hello World!"); // #rathena Hello World! | |
// Example if channel has alias | |
channel_chat(#rathena,"Hello World!"); // [rAthena] Hello World! | |
--------------------------------------- | |
*channel_ban "<chname>",<char_id>; | |
Ban player from channel public or private channel. | |
Channel's owner and group with PC_PERM_CHANNEL_ADMIN cannot be banned. | |
Returns 1 on success. | |
--------------------------------------- | |
*channel_unban "<chname>",<char_id>; | |
Unban player from channel public or private channel. | |
Returns 1 on success. | |
--------------------------------------- | |
*channel_kick "<chname>",<char_id>; | |
*channel_kick "<chname>","<char_name>"; | |
Kick player from channel public or private channel. | |
Channel's owner and group with PC_PERM_CHANNEL_ADMIN cannot be kicked. | |
Returns 1 on success. | |
--------------------------------------- | |
*channel_delete "<chname>"; | |
Delete existing public or private channel. Cannot delete ally or local map | |
channel. | |
Returns 0 on success. | |
--------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment