Jump to content
  • 0

Change Drop Announce to Map Only


Question

Posted

Hi! Is there a way to change the rare drop announce to map only instead of global?

I tried changing into this one in pc.cpp but it does not work.

clif_broadcast(&sd->bl, message, strlen(message) + 1, BC_DEFAULT, ALL_SAMEMAP);

 

image.png

2 answers to this question

Recommended Posts

  • 0
Posted


     goto src -> map -> mob.cpp 
Find   //A Rare Drop Global Announce by Lupus
paste the below codes 

     //A Rare Drop Global Announce by Lupus
            if( mvp_sd && drop_rate <= battle_config.rare_drop_announce ) {
                char message[128];
                sprintf (message, msg_txt(NULL,541), mvp_sd->status.name, md->name, it->ename.c_str(), (float)drop_rate/100);
                //MSG: "'%s' won %s's %s (chance: %0.02f%%)"
              clif_broadcast(&sd->bl, message, strlen(message) + 1, BC_DEFAULT, ALL_SAMEMAP);
}

the one your showing is pc.cpp item drop by steal skill.
            

  • 0
Posted (edited)

i think this will make ur server to crash if @killmonster command is used so be careful since clif_broadcast needs to have player attached

ok small update on the codes to prevent mapcrash 

     //A Rare Drop Global Announce by Lupus
            if( mvp_sd && drop_rate <= battle_config.rare_drop_announce ) {
                char message[128];
                sprintf (message, msg_txt(NULL,541), mvp_sd->status.name, md->name, it->ename.c_str(), (float)drop_rate/100);
                //MSG: "'%s' won %s's %s (chance: %0.02f%%)"
                if(&sd->bl == NULL) 
                        continue;
              clif_broadcast(&sd->bl, message, strlen(message) + 1, BC_DEFAULT, ALL_SAMEMAP);
}
Edited by Pride

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