Mobs only drop loot if they are killed by a player wielding a weapon?

Discussion in 'Archived: Plugin Requests' started by Kane, Apr 3, 2011.

  1. Offline

    Kane

    So one thing I'm getting tired of is so many servers and so many people AFK none stop at a mob spawner and drowning or burning or lava or something mobs and collecting the loot.

    Would it be possible to make it so mobs could only drop loot unless killed by a weapon of some sort? Say the last blow must be made by a weapon or no loot appears?

    @Afforess
    @Raphfrk

    Ping my 2 favorite plugin makers. Maybe they be up for the challenge ;)

    Also I be willing to donate $10 to anyone who creates this plugin. But it must be done by someone who knows what they are doing. Don't want something that will end up causing problems because of the codding method. Also someone is known for updating their plugins. To many times in the past I donated to people who stopped their plugins or only did them once a month and still were willing to accept donations :p
     
  2. Offline

    Afforess

    IMO - sounds easy. If I didn't have an exam in the morning, I'd do it right now. Remind me tomorrow. You can have it for free, too. ;)
     
    Kane likes this.
  3. Offline

    Kane

    Hopefully you gone to bed now haha.

    Reminder of this amazing kickass plugin that will rock my server ;)

    So what this plugin will help prevent? Players creating massive creature killing machines with spawners and dark dark dark rooms that captures creatures and drops them or whatever that is called haha...

    It will not stop them from doing this but more show them it is a waste of time.. Though they could still make them where you can hit them through a hole at least it will help stop people mass farming items as much.

    So items will not drop period unless the mob is killed by the player. Not sure if this would be last hit damage or what. As long not something like fire, fall, drowning, lava and such.
     
  4. Offline

    Hakaslak

    Oh, I'd be interested in a system like this as well - would this be publicly available?
     
  5. Offline

    opatut

    Let me give it a quick try. Expect an answer in maybe 20 minutes :D Sure I would make it public. These small services we plugin developers offer are nothing in comparision to what the bukkit team does :D And what would bukkit be without plugins ??

    Download: http://ompldr.org/vODQycg/StopMobDrop.jar

    Just drop it into your plugins/ folder and mobs will only drop items when a player hits them to death (with a weapon or any other item or with the bare hand, and also with bow and arrow) but not on death due to any other cause. I tried it with Zombies, they all burnt in sun and none of the 20 I spawned left a feather. When I hit them they dropped just as normal. If you experience another behaviour please tell me I'll fix it for you.

    Note that animal drops (from pigs, sheep etc.) are not affected by this plugin. If you want these also to work the same, just post here.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  6. Offline

    Afforess

    @opatut

    It seems we both had the same solution in mind. Nice work!
     
  7. Offline

    opatut

  8. Offline

    Kane

    Thanks one issue well not a issue its what I want haha. Farm animals but harder to test since I suck at mob grinders. Is it me or farm animals also don't drop? if im wrong I would like that too. I know you said they suppose to not be effected but they seam like they might anyways hehe.

    ALSO now I think about it damn I wonder if people going cheat by using fists and just afking through a hole haha
     
  9. Offline

    opatut

    Well if they hit the mobs with their fists then why should they not drop items? It wont be an "automatic killing machine" and they deserve to get the items then, right?

    I haven't checked the animals. I supposed "Creature" would mean Mobs, not Animals. But I can be wrong. I will test it later for you and maybe make it configurable :D
     
  10. Offline

    Kane

    Looks like all mobs don't drop unless you beat them down haha. I just have a prick server and it sucks. People already are like not a problem. Will just AFK fist mobs. And then I said well maybe will get that fix and then there like I will just use a block in my hand.

    It sucks when you got players that do everything to cause so many problems. I don't know how hard it would be but I think in the end wood,stone,iron,gold,diamond sword flag in a config file only unless that might be to hard. I mean it sounds like that might be a bitch to program and would not want something to complex that would end up harming the server. aka lag for calculations or something.

    @Afforess how is that anti alt f4/ logout feature coming err the 30sec stay logged in or 15 or whatever I guess we set haha. I guess we still gotta wait for RB to change.
     
  11. Offline

    opatut

    @Kane I think I got you :D Your English is kinda weird to understand for a native German speaker :D So you want that animals AND mobs only drop their stuff if hit with a sword or a bow, say a proper weapon? I can do that easily, and it would not even lag the server.
     
  12. Offline

    Kane

    That is exactly what I would like =)

    And yes sorry about my English. I have very poor grammar heh.

    Also do you have a place I can make a donations =)?
     
  13. Offline

    Kaimane

  14. Offline

    Kane

    I'm using http://forums.bukkit.org/threads/mech-dropbonus-v2-4-loot-table-configuration-tool-617.6026/page-13

    But that is for more bonus stuff.. Does your plugin make it so you don't have to remove drops but add rules to it? Also can it remove drops?

    See if someone had all the normal drops placed in a config then make it so only drops by arrows / weps then that be cool. Id use it too for the bonus drop features like 5% leaf block drop chance on hit of leaves and such.. coco chance on crops.

    But my main focus is weps vs mobs/animals and nothing else drops.
     
  15. Offline

    Kaimane

    I haven't used OtherBlocks much, but mine allows you to completely remove drops and add new.
    For example if you want a Chicken only to drop feathers when it is killed with a sword, you add:

    Chicken:0:2:WOOD_SWORD:FEATHER
    Chicken:0:2:STONE_SWORD:FEATHER
    Chicken:0:2:IRON_SWORD:FEATHER
    Chicken:0:2:GOLD_SWORD:FEATHER
    Chicken:0:2:DIAMOND_SWORD:FEATHER
    Chicken:0:0:ALL:NOTHING

    Chickens usually drop 0-2 Feathers, now this should only happen if killed with a sword of any type. If not killed with a sword. The last line will be used, which drops 0-0 of nothing, which is a bit of overkill, because if you drop 0 times nothing you got nothing of nothing :)
     
  16. Offline

    Kane

    If you do the one of your own. Maybe consider adding a new flag or something. Because I really don't know what all the drops are for each mob unless someone wants to write that up for me <3

    But maybe within the plugin you could have a say All mobs default drops then wood sword and such ;)

     
  17. Offline

    Kaimane

    I can list you the drops (somebody correct me if I'm wrong)
    - Chicken 0-2 FEATHER
    - Pig 0-2 PORK
    - Cow 0-2 LEATHER
    - Sheep (nothing on Death)
    - Wolf - nothing

    Creeper - 0-2 SULPHUR
    Zombie - 0-2 FEATHER
    Spider - 0-2 STRING
    Skeleton - 0-2 ARROW + 0-2 BONE (max 3 items i think)

    Example Skeleton:
    Skeleton:0-3:WOOD_SWORD:ARROW,BONE
     
  18. Offline

    Kane

    Thanks I ended up going to BonusDrop everyone haha. It seams to have what I been using and exactly what I need. Only one complaint about it is that you gotta do drops for each weapon. But besides that perfect and already using it.
     

Share This Page