PhatLoots icon indicating copy to clipboard operation
PhatLoots copied to clipboard

Request Feature (prevent mob loot from being stolen)

Open tara81 opened this issue 9 years ago • 24 comments

Is it possible to have phatloots dropped by monsters only able to be picked up by the player who attacked the monster first? This it to prevent loot stealing. (Loot stealing Option: True/False)

Example: Phatloot - ZombieKing

PlayerA attacks zombieking first. PlayerB attacks zombieking second. ZombieKing dies. Items appear on the ground. Player B attempts to pick up items but they stay on the ground. Player A Can pick up items right away, After 20 seconds, PlayerB can loot items. (Config option to set amount of time)

Config Example:

Loot Stealing Disabled: True # This means that players cannot loot steal. Time before Items are Free for all: 20s #time to loot

tara81 avatar Mar 22 '16 20:03 tara81

I actually had planned on adding this feature but with a slight difference.

Instead of the 1st person to attack getting the loot, it would be whomever caused the most damage to the mob. Would you prefer what you requested of the first attacker getting the loot?

I was going to use the PhatLoot global flag for this setting. If global is set to false then the loot can only be picked up by the killer for the first x amount of seconds. That way you can turn the feature on for specific mobs and leave it off for others. This means that it will follow the default setting in the config which is also used for chest loot. Would this work or do you want a separate config option as you suggested.

Codisimus avatar Mar 22 '16 20:03 Codisimus

Will phatloots be able to tell how much HP a custom monster has ? I still use epicboss, an updated 1.9 version for custom monster health, it hooks into phatloots itself . Honestly I think the first person to hit the monster should get the loot, as stronger players could come along and overtake a newbie's damage. But that is still better then nothing.

On Tue, Mar 22, 2016 at 6:15 PM, Cody Sommer [email protected] wrote:

I actually had planned on adding this feature but with a slight difference.

Instead of the 1st person to attack getting the loot, it would be whomever caused the most damage to the mob. Would you prefer what you requested of the first attacker getting the loot?

I was going to use the PhatLoot global flag for this setting. If global is set to false then the loot can only be picked up by the killer for the first x amount of seconds. That way you can turn the feature on for specific mobs and leave it off for others. This means that it will follow the default setting in the config which is also used for chest loot. Would this work or do you want a separate config option as you suggested.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/Codisimus/PhatLoots/issues/29#issuecomment-200016673

tara81 avatar Mar 23 '16 19:03 tara81

Hey why isn't there a command to /loot give all phatloot ? :palm_tree:

tara81 avatar Mar 24 '16 19:03 tara81

PhatLoots can tell how much HP a mob has as long as it was modified through the Bukkit API.

I just want it to be fair, in my opinion I thought that meant whoever does the most work (most damage) should get the loot. But you make a great case for the first damage being a sort of "dibs" on the loot.

Codisimus avatar Mar 26 '16 14:03 Codisimus

What would a "/loot give all" command do? Maybe this should be moved to a different ticket for discussion.

Codisimus avatar Mar 26 '16 14:03 Codisimus

So I can prevent Players from picking up items but I'm not sure that I can do the same for experience. If we wish to prevent experience stealing, we may have to skip the orbs and give the experience to the player directly.

Codisimus avatar Mar 26 '16 14:03 Codisimus

ah items is good enough for me ! I understand your thoughts as well, maybe you can implement both ways? :D I just feel the first person there should get the loot. I was hoping /loot give all would give all players on the server within the same world the loot. Good for server events requireing everyone to fight a huge zombie with 100000 health ;)

tara81 avatar Mar 26 '16 16:03 tara81

ps. i rather like the orbs. Experience isnt that big a deal for me.

tara81 avatar Mar 26 '16 17:03 tara81

pss. Much love for doing this. For reals.

tara81 avatar Mar 26 '16 17:03 tara81

I created issue #31 for your other request.

Codisimus avatar Mar 26 '16 19:03 Codisimus

I think I would prefer the first player getting the loot for the reasons you said. If I want to use the amount of damage then I can add that as an option later.

Codisimus avatar Mar 26 '16 19:03 Codisimus

I might be able to get experience orbs to work but I won't know until I try it.

Codisimus avatar Mar 26 '16 19:03 Codisimus

I dont care at all exp being protected to the original attacker. It's the loot i care about ;D

tara81 avatar Mar 28 '16 07:03 tara81

So how is this request coming along :D lol

tara81 avatar Apr 04 '16 11:04 tara81

Bad news, turns out there is no way to detect when items are dropped by a mob. Bukkit/Spigot would have to support this before I can complete this request.

Codisimus avatar Apr 09 '16 21:04 Codisimus

While writing up the feature request for the Spigot team I had an idea. I will try it and see if it works.

Codisimus avatar Apr 09 '16 22:04 Codisimus

I created a separate plugin because the scope of this goes beyond the plugin PhatLoots. You can find a dev build of it here for testing purposes. If it suits your needs then I will publicly release it.

Codisimus avatar Apr 09 '16 22:04 Codisimus

WHooo hoo ! Testing it asap !

tara81 avatar Apr 10 '16 00:04 tara81

Almost works .. A few issues :)

Issue#1 : It spams the player like crazy. Players said it caused them a lot of lag. Maybe make it only send the message once per 30 seconds?

Issue#2: It doesn't understand that players who just throw items away shouldn't have an owner. So players who drop their items to trade with others , no longer can pick the item up ;p

Issue#3: Similiar to#2. Items dropped from monster kills are not lootable right away (Example: Skeleton shooting a creeper)

tara81 avatar Apr 10 '16 00:04 tara81

I have updated the link with a new dev build which addresses Issue#1. It can be found here. I am still trying to figure out why the other two issues are occurring. It should only be happening upon death and only if a Player is the 'claimer'.

Codisimus avatar Apr 10 '16 01:04 Codisimus

It's happening to all items in any situation lol.

tara81 avatar Apr 10 '16 05:04 tara81

Also - theres no reload command ;D

Tested the new jar - it appears the ClaimTime: 5 is not being respected when a player breaks a block in mining. (still makes the player wait 30 seconds)

tara81 avatar Apr 10 '16 19:04 tara81

I feel like u are so close to making this possible... Please dont give up :dancer:

tara81 avatar Apr 11 '16 22:04 tara81

I was working on integrating this into PhatLoots. I am having trouble making it an optional feature though. I will work on it more tomorrow.

Codisimus avatar Sep 01 '16 01:09 Codisimus