-
Notifications
You must be signed in to change notification settings - Fork 760
Announce
Haru edited this page Oct 19, 2016
·
1 revision
- announce "Message",<flag></flag>{,<color></color>};
This command will broadcast a message to all or most players, similar to @kami/@kamib GM commands. The region the broadcast is heard in and the color the message will come up as will be determined by the flags.
Using this command for private messages to players is probably not that good an idea, but it can be used instead in NPCs to "preview" an announce.
The flag values are coded as constants in db/const.txt to make them easier to use:
Flag | Value | Description |
---|---|---|
bc_all | 0 | Broadcast message is sent server-wide. |
bc_map | 1 | Message is sent to everyone in the same map. |
bc_area | 2 | Message is sent to players in the vicinity of the source. |
bc_self | 3 | Message is sent only to current player. |
bc_npc | 8 | Broadcast source is the npc, not the player attached to the script (useful when a player is not attached or the message should be sent to those nearby the npc) |
bc_yellow | 0 | The default is to send broadcasts in yellow color. |
bc_blue | 16 | Alternate broadcast is displayed in blue color. |
The optional parameter, color, allows usage of broadcasts in any custom color. The color parameter is a single number which can be in hexadecimal notation. For example:
//This will display a global announce in yellow. The color format is in RGB (0xRRGGBB). announce &quot;This will be shown to everyone at all in yellow.&quot;,bc_all,0xFFFF00&#59;
announce &quot;This will be shown to everyone at all in yellow.&quot;,0&#59;
//This will be a private message to the player using the NPC that made the announcement announce &quot;This is my message just for you&quot;,bc_blue&#124;bc_self&#59;
//This will be shown on everyone&#39;s screen that is in sight of the NPC. announce &quot;This is my message just for you people here&quot;,bc_area&#59;