Jump to content
  • 0
Sign in to follow this  
Zero Human

@showdrop

Question

Hey,
can anyone make a plugin/atcommand to announce to the player and his group if found an item with 1% drop chance?
I know it gives the flag as announce, but this is global. I just want to announce to the player and his group.

 

Thanks in Advance.

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Hi.

 

Unfortunately I were not able to create a plugin, because I couldn't hook at all required spots.

But if you want to, you can use this patch: showdrop.patch

Just tell me if something doesn't work as intended or needs modification.

 

 

~Kenpachi

Share this post


Link to post
Share on other sites
  • 0

Yes. Sorry.
If you are solo and you found an item with 1% or below,
announcement will be shown like:
You found a Poring Card [dropchance]


If you are in a Party and someone found an item with 1% or below,

announcement will be shown like:

Playername found a Poring Card [dropchance]

Share this post


Link to post
Share on other sites
  • 0
Quote

 

If you are in a Party and someone found an item with 1% or below,

announcement will be shown like:

Playername found a Poring Card [dropchance]

 

The "someone" is confusing me.

This is how I understand your description:

-> Player A, B and C are in the same party.

-> Player A uses @showdrop.
-> Player A, B or C loots an item with a drop chance of 1% or below.

-> Show message to player A, B and C.

I don't think this is a good idea, since player A affects the gameplay of player B and C even if they don't want it. Even worse: They won't know about @showdrop being enabled until the first drop message is shown.

If I misunderstood your description, please correct me.

 

 

~Kenpachi

Share this post


Link to post
Share on other sites
  • 0
57 minutes ago, Kenpachi said:

This is how I understand your description:

-> Player A, B and C are in the same party.

-> Player A uses @showdrop.
-> Player A, B or C loots an item with a drop chance of 1% or below.

-> Show message to player A, B and C.

Almost right.

-> Player A, B and C are in the same party.

-> Player A uses @showdrop.

-> If player B found an item with 1% drop Chance or below
-> Show message to player A and C ("Player B found a rare item. [Itemname]")
-> Show message to player B ("You have found a rare item [Itemname]")

 

1 hour ago, Kenpachi said:

I don't think this is a good idea, since player A affects the gameplay of player B and C even if they don't want it

I played on a server where this function was available and it never bothered anyone that it was displayed.
But yes, could you insert a check that others will only see it if they have @showdrop set?
You're right, it's good to have it if players don't want it displayed.

Share this post


Link to post
Share on other sites
  • 0

Thanks for your time and work.
Unfortunately something seems to be wrong with the changes.
The character can no longer be moved and the HP/SP bar is empty.

The server shows no error messages when compiling.

2.PNG.6f1f320992d2c477e6c3575c950231ad.PNG1.PNG.8530630599ac4c361efaccbc86452b1d.PNG

 

 

Share this post


Link to post
Share on other sites
  • 0

I guess you applied the changes manually and accidentally broke something.

 

I used a untouched copy of Hercules and applied the patch file with TortoiseGit. -> No issue.
showdrop.thumb.png.1b76c7ac8e9c87ec1021b909a427f7cb.png

 

 

~Kenpachi

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Yeah, it's working fine now. Thank you very much.

I have one wish left for this, can you add that a sound is played when you have @showdrop on and find an item?

 

EDIT: I figured it out myself. 

Edited by Zero Human

Share this post


Link to post
Share on other sites
  • 0

Just in case someone else wants to know how to add the sound...

Add (for the character who obtained the item):

clif->soundeffect(sd, &sd->bl, "sound_file_name.wav", 0);

Below this line:

clif->message(sd->fd, output);

 

Add (for party members):

clif->soundeffect(p_sd, &p_sd->bl, "sound_file_name.wav", 0);

Below this line:

clif->message(p_sd->fd, output);

 

The sound file is read from data\wav folder, must be in the PCM format, and the file name should have a maximum length of 23 characters including the ".wav" extension.

 

 

~Kenpachi

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, Kenpachi said:

Just in case someone else wants to know how to add the sound...

Add (for the character who obtained the item):

clif->soundeffect(sd, &sd->bl, "sound_file_name.wav", 0);

clif->soundeffect(sd, &sd->bl, "sound_file_name.wav", 0);

Below this line:

clif->message(sd->fd, output);

clif->message(sd->fd, output);

 

Add (for party members):

clif->soundeffect(p_sd, &p_sd->bl, "sound_file_name.wav", 0);

clif->soundeffect(p_sd, &p_sd->bl, "sound_file_name.wav", 0);

Below this line:

clif->message(p_sd->fd, output);

clif->message(p_sd->fd, output);

 

The sound file is read from data\wav folder, must be in the PCM format, and the file name should have a maximum length of 23 characters including the ".wav" extension.

 

 

~Kenpachi

 

You're Right. I'm sorry.
I'll think about posting it next time. Just thought I'd let you know you don't have to help.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.