Jump to content
  • 0

help regarding script


Question

Posted

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

2 answers to this question

Recommended Posts

Posted

hmm.. I tried, nothing wrong..

or try it become

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);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...