Get Player's Loot on Kill

Discussion in 'Archived: Plugin Requests' started by EN7, Jul 11, 2014.

?

Is this a good plugin idea?

  1. Yes

    77.8%
  2. No (give reason in comment please)

    22.2%
  1. Offline

    EN7

    So first of all, you are probably thinking this is just like ANY OTHER loot plugin: kill a player, receive a reward. We've all seen this. But my plugin idea is different: get the killed player's loot straight into your inventory, without drops.


    EDIT: Kills should include pushed off cliff, shot with bow, walked into cactus/lava while escaping <player>, ETC
    Plugin Name: PlayerLootPlus (or similar. I am really not too worried about this)

    Plugin Category: Fun + Mechanics
    Plugin Functions:

    Player A kills Player B. Player A would receive the inventory of Player B, and Player B would not drop items. If there is not enough space in Player A's inventory to receive all of Player B's loot, then some items would be dropped.

    Items can be configured to have a certain priority. There would be two levels of priority, 1 and 2. Which items can be in which level can be configured via FTP and commands. Level 1 would be the undesirables (Ex: seeds, wheat, raw chicken). These are the first to be dropped if there is no space. Level 2 are desirable: they are the last to be dropped. Everything not included in either list is neutral: they come after the Level 1, and before Level 2.

    Let me give an example:

    My Inventory has: 36 slots. Of these, 27 slots are filled. The player I just killed had two Level 1 Items, three neutral items, and ten Level 2 items. First, the Level 1 items would be dropped, leaving 13 items left to fit in 9 spots. Then, the three neutral items are dropped, leaving 10 items left to fit in 9. There are ten Level 2 items, so the plugin randomly chooses one of them to be dropped because they are all the same priority.

    Commands/Permissions:
    /loot set [item name] [priority level] - Adds given item to given priority
    /loot remove [item name] - Removes item from any priority it's in
    /loot add [priority level] - Adds any item held in hand to given priority
    /loot reload - Reloads configuration

    loot.modify - Permission to use /loot set and /loot remove
    loot.add - Permission to use /loot add, by using item in hand
    loot.reload - Permission to reload configuration

    Feel free to ask questions below, if there is any clarification of specification needed! I apologize if these seems a bit complicated, it's really a simple plugin, that's hard to explain.
    Remember: only the items from Player B would be chosen from to be dropped--Player A keeps ALL of their items.

    Thanks for reading, and hope someone can fulfill this!
     
  2. Offline

    EnderTroll68

    Woah this seems like an awesome idea. I am working on it now, will keep you updated
     
  3. Offline

    EN7

    Thanks a lot!
    EDIT: Make sure kills include bows, projectiles, pushed off cliff, walked into cactus/lava while escaping a player, and so on!

    Am I supposed to put [Filled] when a dev says they can take it, or once they are completed with it?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  4. Online

    timtower Administrator Administrator Moderator

    EN7 You call.
     
  5. Offline

    simgar98

    Whenever you get the plugin and it is working!
     
    EN7 likes this.
  6. Offline

    EnderTroll68

    For the remove part, do you want it so that if you have no argument after it, that it removes the item you have in your hand from the list?

    Also, is it fine if you use item ids? It would make it easier to code.
     
  7. Offline

    EN7

    The remove function is good, thanks.
    Item IDs may be easier to code, but 1.7+for Bukkit and Minecraft is heavily reliant on material names , and there is now a major shift from IDs to names, and servers and admins are used to that now. It would also make it easier to see what is in each level from our config file, so it would be appreciated if you code take time to use names.
     
  8. Offline

    EnderTroll68

    Update: I am working on getting it so that it is super user friendly when it comes to getting the name of items. I will post here when I have it done, will be late tonight or tomorrow

    With the way that you want me to store the items (as the material name), it would make things like ink sacks and different dye colors to have the same item priority as lapis, and the same with all the different log and plank types. I am going to continue coding it as if this is what you want, just be aware that this will happen.

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

    ArsenArsen

    Material.getId() works fine wirh @SupressWarning("Deprecated")
     
  10. Offline

    EnderTroll68

    ArsenArsen
    I know it does... I was saying that if I do it the way that the user wants, then if someone has lapis in their inventory, the other player will get ink sacks. I can account for this by estimating that players don't walk around with other dyes in their inventory, so I can make it so that all dyes will turn to lapis, but if this is discovered by players they will get infinite lapis
     
  11. Offline

    ArsenArsen

  12. Offline

    EnderTroll68

    How I would like to store the data is not at all pretty in the files. It will show up as something like this: 351,4,2. That will be read as itemid,itemdata,valueforplugin. I can make it so that you can see all of the information nicely in game, but otherwise you won't be able to use dye in the config at all
     
  13. Offline

    EN7

    Yeah I'm fine with item ids actually.
    Okay, you could do 351:4 for itemid and itemdata, and what is valueforplugin?
     
  14. Offline

    EnderTroll68

    What I would really like to do is use a type of file called a csv, which looks like this:

    351,4,1

    Which would be the item with an id of 351, data of 4, and the value from the plugin of 1
     
  15. Offline

    EN7

    That's good

    Yeah as long as it works, I'm fine with it. I just need the plugin for my server
     
  16. Offline

    EN7

  17. Offline

    EnderTroll68

    Sorry been super busy, just got my friendly name system working, will have it done in less than 2 days EN7
     
  18. Offline

    EN7

    No problem
     
  19. Offline

    Rokinscom

    Have you decided to open this plugin to Public EN7
     
  20. Offline

    ThePluginMaker

    I think this is a really really good plugin idea, I'd love to use it.
    Rokinscom
    This is a community website, they're meant to make it public, they cannot bring plugin making to PMs or Skype.
     
  21. Offline

    Rokinscom

    They have the option to release the idea to the public or not though. Not all plugins have to be public.
     
  22. Offline

    ThePluginMaker

    Rokinscom
    That is true, but what i'm saying is if they're making this exact plugin idea for who ever made the request they're not allowed to discuss it outside of bukkit community nor PMs, so I'm not sure how they would not release it publicly, well usually people just put a download link in the comments, instead of posting it on plugins.bukkit.org
     
  23. Offline

    Rokinscom

  24. Offline

    EN7

    I have the option to make it public? I was under the idea that plugin devs can do whatever they want with the plugin.
    Well I would want the dev to make it public, it's good for servers and helps people out! :)
     
  25. Offline

    EnderTroll68

    I put all plugins I make for the forums in my signature. Sorry this has been taking so long, I have been super busy with packing and traveling etc. Rokinscom EN7
     
  26. Offline

    Rokinscom

  27. Offline

    EN7

    No problem.
     
  28. Offline

    Aronix12

    this would be a nice + thank you endertroll for taking this on! can't wait to see the result!
    also if the id value problem continues can't you work around it and either let it drop like normal if it's wood or dye and so on and so forth? also (sorry if I'm making stupid suggestions I'm not coder guy) would it be possible to link this with the /give command from essentials? so the plugin sweeps the player's inventory and uses /give from the counsel for each item silently? just ideas
     
  29. Offline

    EnderTroll68

  30. Offline

    Aronix12

    nvm...
     

Share This Page