hello guys i found this script on rathena forums. i tried using it but its not working. can some please let me know what is the mistake in this script?
/*==========================================
* @guildmsg
* Send a message to your guild being the guild master [Rokimoki]
*------------------------------------------*/
int atcommand_guildmsg(const int fd, struct map_session_data* sd, const char* command, const char* message) {
struct guild *g;
nullpo_retr(-1, sd);
g = guild_search(sd->status.guild_id);
if (sd->status.guild_id == 0 || g == NULL) {
clif_displaymessage(fd, "You have to belong a guild to use @guildmsg.");
} else if (strcmp(g->master,sd->status.name)) {
clif_displaymessage(fd, "You must be a Guild Master to use @guildmsg.");
} else if (!message || !*message) {
clif_displaymessage(fd, "You have to send a message. @guildmsg <Message>");
} else {
sprintf(atcmd_output, "[Guild Master] %s : %s", sd->status.name, message);
//clif_broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0, GUILD);
clif_broadcast2(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, 0xFF66FF, 0x190, 12, 0, 0, GUILD);
//clif_displaymessage(fd, "Message Sent to Guild Members.");
return 0;
} // End if
return -1;
} // End atcommand
Question
orange
hello guys i found this script on rathena forums. i tried using it but its not working. can some please let me know what is the mistake in this script?
Link to comment
Share on other sites
2 answers 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.