Yoga Posted February 10, 2016 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 66 Reputation: 1 Joined: 06/06/12 Last Seen: November 8, 2016 Share Posted February 10, 2016 Hey, anyone know how to make @broadcast only announce on chatbox? with blue colour , like @main and im using eAthena, thanks Quote Link to comment Share on other sites More sharing options...
0 Neffletics Posted February 11, 2016 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 149 Reputation: 24 Joined: 02/11/16 Last Seen: May 16, 2023 Share Posted February 11, 2016 Why not duplicate @main command and apply few modifications? Then change FE000000 to blue. /*=================================== * Main chat [LuzZza] * Usage: @main <on|off|message> *-----------------------------------*/ ACMD_FUNC(main) { if( message[0] ) { if(strcmpi(message, "on") == 0) { if(!sd->state.mainchat) { sd->state.mainchat = 1; clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated. } else { clif_displaymessage(fd, msg_txt(381)); // Main chat already activated. } } else if(strcmpi(message, "off") == 0) { if(sd->state.mainchat) { sd->state.mainchat = 0; clif_displaymessage(fd, msg_txt(382)); // Main chat has been disabled. } else { clif_displaymessage(fd, msg_txt(383)); // Main chat already disabled. } } else { if(!sd->state.mainchat) { sd->state.mainchat = 1; clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated. } if (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) { clif_displaymessage(fd, msg_txt(387)); return -1; } sprintf(atcmd_output, msg_txt(386), sd->status.name, message); // I use 0xFE000000 color for signalizing that this message is // main chat message. 0xFE000000 is invalid color, same using // 0xFF000000 for simple (not colored) GM messages. [LuzZza] intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, 0xFE000000, 0, 0, 0, 0); // Chat logging type 'M' / Main Chat log_chat(LOG_CHAT_MAINCHAT, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message); } } else { if(sd->state.mainchat) clif_displaymessage(fd, msg_txt(384)); // Main chat currently enabled. Usage: @main <on|off>, @main <message>. else clif_displaymessage(fd, msg_txt(385)); // Main chat currently disabled. Usage: @main <on|off>, @main <message>. } return 0; } Quote Link to comment Share on other sites More sharing options...
Question
Yoga
Hey, anyone know how to make @broadcast only announce on chatbox? with blue colour , like @main
and im using eAthena, thanks
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.