-
Active Member
[v7.2] [ENGLISH] [Csavo] LegendaryCountPlugin
Description: Plugin for counting legendary drops, including Ancient and Primal Ancient pieces.
Screenshot:
Read the example as: Out of 13 total legendary drops 2 are Ancient, and 1 is Primal. Ancient drop rate is 15.4%, while Primal drop rate is 7.69%.
Credits to:
Changelog:
Known Issues:
- Some legendary drops are not counted. I don't know the reason.
- Apparently some drops are counted multiple times if you move too far before looting.
Customization:
PHP Code:
Hud.RunOnPlugin<Turbo.Plugins.Csavo.LegendaryCountPlugin>(plugin =>
{
plugin.ShowPercent = false; // will not show Ancient and Primal Ancient drop rate percentage
});
Source:
\plugins\Csavo\LegendaryCountPlugin.cs
Last edited by Csavo; 04-12-2017 at 04:48 AM.
-
Post Thanks / Like - 3 Thanks
-
Member
-
Active Member
lol, maybe remove the public IP from that screenshot?
Also what use for this tracker? Isn't this already in the tracker next to community buttons bottom corner?
-
Contributor
Originally Posted by
everknown
lol, maybe remove the public IP from that screenshot?
its the servers ip
-
Active Member
Originally Posted by
everknown
Also what use for this tracker? Isn't this already in the tracker next to community buttons bottom corner?
I don't use that, and I believe that one does not count Ancients and Primals (separately at least)
-
Member
nvm beta bug I found. looks great!
Last edited by tingtong1; 04-09-2017 at 04:19 PM.
-
Active Member
Csavo, I noticed a bug with the plugin today. When a legendary drops the counter increases. If you leave the area without picking it up and then come back, the counter will increase again.
You don't even need to change the area, just make sure the star is not seen on the minimap and when you return the counter will increase.
Maybe only count picked up legendaries to fix this?
-
Active Member
Thanks for reporting, although I don't think I can fix that. The bug is probably from ILootGeneratedHandler, which is a THUD method. Switching the counter to only show loot that was picked up would result in even less accurate statistics. Many people don't even pick up normal legendaries, just ancients and primals, but they still might want to know the drop stats.
-
Active Member
Originally Posted by
Csavo
Thanks for reporting, although I don't think I can fix that. The bug is probably from ILootGeneratedHandler, which is a THUD method. Switching the counter to only show loot that was picked up would result in even less accurate statistics. Many people don't even pick up normal legendaries, just ancients and primals, but they still might want to know the drop stats.
You can fix that. Use a dictionary for loot that is on the ground and already has been seen once. Once the item location changed to inventory -> remove it from the dictionary.
I won't give any support (or answer requests) via private messaging. Ask your questions about a plugin within its thread!
-
Active Member
OK, ill try to write that later. Thanks for the tip.
-
-
Savvy ? 🐒
Originally Posted by
Csavo
If someone can help how to detect a looted item, please advise me. Until then, I can't release a fix
You have the IItemLocationChangedHandler interface :
Example implementation (not complete you will need to make some research)
PHP Code:
public class YourPlugin : BasePlugin, IInGameTopPainter, IItemLocationChangedHandler
{
// your plugin code +
public void OnItemLocationChanged(IItem item, ItemLocation @from, ItemLocation to)
{
if (@from != ItemLocation.Floor || to != ItemLocation.Inventory) return;
// do what you want with the item you just looted on ground
}
}
-
Active Member
Ah, cool, thanks! I'll look into this
-
Contributor
is OnItemLocationChanged also called for items that i transfer from my stash to my inventory? if it is, you probably also have to check that the item isnt coming from your stash
-
Active Member
Hmmm, I believe this should be OK, but it does not remove the looted item still.. IDK what to do: pastebin