Jump to content

Recommended Posts

Posted

Broadcast commands with global sound effect


This is a very simple and little source mod, it consists on the ability to send a sound effect to every player on the server every time you use @brodcast or @localbroadcast or @kami or @kamic or /b

? Attention ?

If you have the Fixed some packets for 2022 clients (#7276) commit on your rAthena, then use broadcastWithSoundEffectLatestRathena.diff, otherwise use the broadcastWithSoundEffectOldRathena.diff 

Apply the diff and put the .wav file on your data folder/grf

Command to diff on terminal: git apply --3way broadcastWithSoundEffectLatestRathena.diff

 

Preview Video: https://cdn.lewd.host/yIVy2fAF.mp4


 

  • Upvote 1
Posted (edited)
2 hours ago, sapitosucio said:

@broadcast with sound effect


This is a very simple and little source mod, it consists on the ability to send a sound effect to every player on the server every time you use @brodcast

Attention: This was made on latest rathena Git Hash: 47c9a36

Apply the diff and put the .wav file on your data folder/grf


 

Nice release !!!

btw , any possible to make this run on not latest git?

Edited by Takuyakii
Posted
15 hours ago, sapitosucio said:

The post wast updated but the file wasn't approvec yet, it is now, redownload it 

testing on client date 20220331 no have sound.

Posted
Just now, sapitosucio said:

Is that your code or mine?

You didn't get any compilation error?

yes, diff patch from you and no have error complie.

  • 2 weeks later...
Posted

hello i try this on my rathena but it didnt work

 

Quote

ACMD_FUNC(broadcast)
{
    struct map_session_data* pl_sd;
    struct s_mapiterator* iter;
    nullpo_retr(-1, sd);

    memset(atcmd_output, '\0', sizeof(atcmd_output));

    if (!message || !*message) {
        clif_displaymessage(fd, msg_txt(sd,1149)); // Please enter a message (usage: @broadcast <message>).
        return -1;
    }

    iter = mapit_getallusers();
    for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
    {
        clif_soundeffectall( &pl_sd->bl, "anuncio.wav", 0, SELF );
    }
    sprintf(atcmd_output, "%s: %s", sd->status.name, message);
    intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT);
    mapit_free(iter);
    return 0;
}

/*==========================================
 * @localbroadcast by [Valaris]
 *------------------------------------------*/
ACMD_FUNC(localbroadcast)
{
    struct map_session_data* pl_sd;
    struct s_mapiterator* iter;
    nullpo_retr(-1, sd);

    memset(atcmd_output, '\0', sizeof(atcmd_output));

    if (!message || !*message) {
        clif_displaymessage(fd, msg_txt(sd,1150)); // Please enter a message (usage: @localbroadcast <message>).
        return -1;
    }

    iter = mapit_getallusers();
    for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
    {
        if (pl_sd->bl.m == sd->bl.m)
            clif_soundeffectall( &pl_sd->bl, "anuncio.wav", 0, SELF );
    }
    sprintf(atcmd_output, "%s: %s", sd->status.name, message);
    clif_broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP);
    mapit_free(iter);
    return 0;
}
 

 

Posted
2 hours ago, GM Winter said:

hello i try this on my rathena but it didnt work

 

 

show the error,
if you're not using latest git use the olddiff.

Posted (edited)
10 hours ago, Takuyakii said:

show the error,
if you're not using latest git use the olddiff.

im using old version and thats the problem i dont have any error in compile also on mapserv i also put the wav inside the data /wav/anuncio.wav  i try to use the latest version but i got error in compiling 

image.thumb.png.f8f9da95fca53a36ae3dc505e623d3ed.png

Edited by GM Winter
Posted
On 10/17/2022 at 6:59 PM, GM Winter said:

im using old version and thats the problem i dont have any error in compile also on mapserv i also put the wav inside the data /wav/anuncio.wav  i try to use the latest version but i got error in compiling 

 

How old is your emulator?

Posted
22 hours ago, sapitosucio said:

How old is your emulator?

hello i already fix it i just changed the  wav file

is there anyway to add this command on @kami or /b thanks

5 hours ago, sapitosucio said:

Added in next version, waiting for approval /gg

nice nice waiting ?

Posted

The old diff works flawlessly! Just quick question. How do we use this to announce script? Thank you!

Oh yeah i discovered a bug using @kami command. The message will be doubled. All kami related. kamia kamib kamic

 

Any follow up with @kami fix? Also the /b. Thaaaaanks!

 

Nevermind. I have fixed it theres no problem with the diff. Mabuhay!

  • 3 weeks later...
Posted
33 minutes ago, Gidz Cross said:

Any follow up with @kami fix? Also the /b. Thaaaaanks!

 

Nevermind. I have fixed it theres no problem with the diff. Mabuhay!

hello how did you apply it on @kami command can you share it sir tia

Posted
1 minute ago, GM Winter said:

hello how did you apply it on @kami command can you share it sir tia

Oh yeah. I just used the old diff. And viola! I might diffed it the wrong way the first time. I rediff it again just today.

  • 1 month later...

Join the conversation

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

Guest
Reply to this topic...

×   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...