Jump to content
  • 0

Change Drop Announce to Map Only


Whathell

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  116
  • Reputation:   4
  • Joined:  01/11/12
  • Last Seen:  

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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   11
  • Joined:  11/17/20
  • Last Seen:  


     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.
            

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   11
  • Joined:  11/17/20
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...