Jump to content
  • 0

Rare Drop Announce - include map name


Virtue

Question


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

 

Spoiler

Hello rA,

I was trying to include map name in rare drop announce and was able to manage to do it but it causes the issue below:

Spoiler

image.png.85f3ab88225d6698dfdeadbe900a3aba.png

The mapserver crashes after clicking retry, and ignore does let the server continue.

Here's what I did:

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

I was also looking to chance the color but I've tried replacing BC_DEFAULT to 0xFFFFFF just to check, but nothing happens. 

 

 

found the issue. now the color part is the only thing left.

Edited by Virtue
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

Solved the Rare drop announce by increasing char message and using intif_broadcast2 instead of intif_broadcast to change the color.

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