Inactive [RPG] PhatLoots v0.9.1 - Chests with randomly generated money/items [953]

Discussion in 'Inactive/Unsupported Plugins' started by Codisimus, Mar 19, 2011.

  1. Offline

    Codisimus

    This page will no longer be updated. Please follow this project at the Bukkit Dev Page

    PhatLoots - Chests with randomly generated money/items:
    Version: 0.9.1 (7/16/2011)
    Supports iConomy, BOSEconomy, Essentials, Permissions, LWC
    Download Page

    This plugin is a must for dungeons! Players open a linked chest and are rewarded with money (within a designated range) and randomly generated items that are predefined.

    Make a PhatLoot
    /loot make test
    Add some loot values
    /loot add test money 1 25 (looter will get 1-25 coins)
    /loot add test 322 1 10 (looter has 10% chance of getting a golden apple)
    Set a reset time
    /loot time test 1'6'45'30 (looter can loot the chest again after waiting
    1 day, 6 hours, 45 minutes, and 30 seconds.)
    Link a chest
    /loot link test (you must be targeting the chest you wish to link)

    Collective Loots allows you to setup a chest to give a certain amount (1 by default) of 'rare' items. So a chest may give the user a chance to loot a Gold Block (50%), Diamond Sword (30%), or Diamond ChestPlate (20%) yet the user will only get one of these items.

    Features:
    • Chests can give items, money, or both
    • Support for wools/dyes
    • Set different reward values for different chests.
    • Link multiple chests to one PhatLoot (this way you don't have to reenter all the items for every chest)
    • Player must wait a certain amount of time in order to loot the chest again (configurable)
    • Different reset times for each PhatLoot
    • AutoLoot option
    • Easily configure setting, loot values, reset times, and more
    • Make chests global (when looted by one person, everyone must wait to loot it again)
    • or user (each individual must wait the specified time between looting chests)
    • Uses iConomy, BOSEconomy or Essentials to give users money.
    • Uses LWC to auto protect PhatLoot chests (false by default)
    • Permissions to limit players from being rewarded and using commands
    • Included in CraftBukkitUpToDate for easy updating (make sure you come check the changelog if somthing is not working right)
    Save Files and Properties:
    Show Spoiler

    config.properties
    Code:
    #Tue Mar 29 14:04:05 EDT 2011
    // user - when a player loots a chest they must wait the specified time to loot again
    // global - when looted by one person, everyone must wait to loot it again (first person there gets the loot)
    DefaultResetType=user
    
    // if true, when you link a chest it will automatically make it public with LWC (so noone else can claim it)
    AutoLockPhatLootChestsWithLWC=false
    
    // default number of items you get from CollectiveLoots (only applies if CollectiveLoots is not blank)
    DefaultNumberOfCollectiveLootItemsRecieved=1
    
    // amount of time before the chest will reset "Days'Hours'Minutes'Seconds"
    // change to "never" in order for it to never reset
    DefaultResetTime=0'0'5'0
    
    phatloots.save
    Code:
    test1   // a list of all your Phat Loots by name
    test2
    
    test.properties
    Code:
    #Tue Mar 29 16:20:45 EDT 2011
    //the number of items you get from CollectiveLoots (only applies if CollectiveLoots is not blank)
    NumberOfCollectiveLootItemsRecieved=1
    
    // user - when a player loots a chest they must wait the specified time to loot again
    // global - when looted by one person, everyone must wait to loot it
    ResetType=user
    
    // list of linked chests (you should never have to edit this) "x,y,z,NameOfLooter,TimeLooted,_"
    Chests(RestrictedUsers)=-155,65,-93,Codisimus,88'16'13'16,_
    
    // "itemID,NumberOfItems,PercentOfLooting,_" Should add up to 100%
    CollectiveLoots=13,1,75,_14,1,10,_15,1,15,_
    
     // amount of time before the chest will reset "Days'Hours'Minutes'Seconds"
     // change to "never" in order for it to never reset
    ResetTime=0'0'0'20
    
    // "itemID,NumberOfItems,PercentOfLooting,_"
    IndividualLoots=money,0,2,_13,1,100,_14,1,23,_15,1,30,_
    


    Commands:
    • /loot make [Name] - Creates PhatLoot
    • /loot link [Name] - Links target chest with PhatLoot
    • /loot add coll[1-5] [Item] [Amount] [Percent] - Adds collective loot to target chest's PhatLoot
    • /loot add [Item] [Amount] [Percent] - Adds individual loot to target chest's PhatLoot
    • /loot add money [Low] [High] - Adds range of money that can be looted
    • /loot remove coll[1-5] [Item] [Amount] [Percent] - Removes collective loot from PhatLoot
    • /loot remove [Item] [Amount] [Percent] - Removes individual loot from PhatLoot
    • /loot unlink [Name] - Unlinks target chest with PhatLoot
    • /loot info [Name] - Lists info of PhatLoot
    • /loot name - Gives PhatLoot name of target chest
    • /loot reset [Name or all] - Resets PhatLoot restricted list
    • /loot delete [Name] - Deletes PhatLoot and unlinks chests
    • /loot list - Lists all PhatLoots
    Permission Nodes:
    • phatloots.use - Needed for group/player to receive loots
    • phatloots.info
    • phatloots.name
    • phatloots.make
    • phatloots.list
    • phatloots.admin.reset

    Changelog:
    Old Versions, ChangeLog, + Source can be found at Download Page
    Show Spoiler

    Version 0.9.1 (7/16/2011)
    • Added color support for all customizable messages
    • Fixed Collective loots
    Version 0.9 (6/26/2011)
    • Improved OP options
    • Updated Economy support
    • Added AutoLoot option
    • Improved add command
    • Added targeting chests for adding loot
    • Added item name support (rather than item ID)
    • Added saftey check so you can't add invalid loots
    Version 0.8.1 (6/13/2011)
    • Fixed OP permissions
    Version 0.8 (6/12/2011)
    • Cleaned up code/fixed errors
    • Added map support
    Version 0.7.4 (6/4/2011)
    • Cleaned up errors and added error messages
    Version 0.7.3 (6/3/2011)
    • Various fixes and code cleanup
    Version 0.7.2 (6/3/2011)
    • Added Essentials econ support
    Version 0.7.1 (5/4/2011)
    • Updated to iConomy 5
    • Few various fixes
    Version 0.7 (4/29/2011)
    • Fixed save/loss of data errors
    • Added support for wools/dyes
    • Fixed Double Chest errors
    • Added in game command for setting timer restriction
    • Added in game command for setting collective loots
    • Added option of multiple collective loots
    • Added option for setting resetType to Interval
    • Added prevention from looting out of ID-range items
    • Fixed delete command
    Version 0.6 (3/31/2011)
    • Fixed issue with users with "_" in name
    • Improved multiworld support
    • Fixed various bugs
    Version 0.5.1 (3/31/2011)
    • Fixed CollectiveLoots
    • Works with build #612
    Version 0.5 (3/30/2011)
    • Updated to craftbukkit build #602
    Version 0.4 (3/29/2011)
    • Redid save format
    • Added config file
    • Added double chest support
    • Added Collective loots
    • Added Auto protection using LWC (false by default)
    • Added a reset time ("Days'Hours'Minutes'Seconds" or "never") (0'0'5'0 by default)
    • Added global/user restriction (user by default)
    • Added antigrief feature, if chest is full PhatLoots will make room for new loot
    Version 0.3 (3/26/2011)
    • Added block protection for PhatLoot chests
    Version 0.2 (3/19/2011)
    • Fixed unknown command spamming chat
    • Fixed no Economy message spamming
    • added /loot info and /loot name (phatloots.info phateloots.name)
    Version 0.1 (3/18/2011)
    • Initial Release
     
  2. Offline

    Latros

    Is it possible to configure this plugin such that I might do the following?;

    Place a chest within the world with 10 diamonds in it
    Lootable by ONE person
    Once that person loots it, the chest is empty for a predetermined amount of time, in this case 1 hour
    After that 1 hour, 10 diamonds are put back into the chest

    ???

    (A simple, "X amount of X item is put into a specificed chest, once per 1 or 2 hours")
     
  3. Offline

    Codisimus

    yes I just added this feature, it is the reset type "onInterval" which I can explain tomorrow, or perhaps the "global" reset type is what your looking for (look at original post for details)

    Thats wut the timer is for... I'll think about adding teleporting if its still an issue
     
  4. Offline

    Latros

    Perhaps we could talk over ventrilo or in an IRC or something? This will be a feature I'd like to add to Battlecraft, currently the largest PVP server in the world and with a regular ~125 users online... I'd love to have you walk me through how to set this up, and if it can't quite do what we need I would happily pay to have you add it. Though if its already in there, I'll donate if it does just what we need!
     
  5. Offline

    Codisimus

    I'd love to help you but right now I need to get some sleep (2 am and I got class in the morning) Tomorrow though, we can skype (or i can re-download vent) perhaps start a private message with me so we don't fill up this thread
     
  6. Offline

    Kalais

    I'm not using a plugin for the quest therefore there's no timer. It's a puzzle/strategy/mob-based area that has a chest at the end.
     
  7. Offline

    Codisimus

    No, I mean the timer for the loot. the must wait a certain amount of time b4 they can loot more items. (1 day by default)
     
  8. Offline

    Kalais

    Like I said, they tend to stay in that area until they can loot again. If it's easier to add the items as a reward to ButtonWarp that would be even better.
     
  9. Offline

    Codisimus

    I'll figure out which is easier
     
  10. Offline

    Kalais

    Great, this would be very helpful.
     
  11. Offline

    gRey_oNE

    I love your plugins! Really great job, well done! ;)
    So I made tutorials and advertise your plugins in german.
    Maybe you can add a link to them.
    Here is my channel:
    http://www.youtube.com/user/GermanMineTV

    And keep up the great work!
     
  12. Offline

    Flayr

    I have an Idea for you mod.

    The ability for your chests to give Keys!!!!
    Basically when you get your reward you could also get a "Key" which would display a message saying "You got the _____ key" the blank would be whatever you name the key. Then the person who made the loot would assign a door to be opened by that "Key". This would allow for Zelda-like dungeons. If you like the idea please reply.
     
  13. Offline

    Codisimus

    Take a look at my plugin chestlock, with it you can make doors only open with specific keys. Let me kno if that works for you
     
  14. Offline

    LucidLethargy

    I'm having trouble finding the download link for 0.7... I downloaded the jar (which is 0.6) and I also downloaded the zip (which has all versions BUT 0.7)

    ...where might I need to look, or is this merely not up yet?

    Edit: It looks like the new version is simply mislebeled on both the download page, and the plugin message ont he consol... but it's up to date and my saves are no longer being overwritten! woo! Thank you so much for this fix! I am getting a consol error, however I doubt it is anything to be concerned over. Posting just in case it helps:

    Sorry I'm not sure how to make one of those nifty drop down boxes to hide all that ugliness... let me know when you've got it and I can delete it to help the thread look less trashed! :X
     
  15. Offline

    Flayr

    Sorry to say but no :( that is not what i am looking for.

    What I need is the ability to create dungeons for my RPG server and phatloots is perfect for the end of thembut I needed something to make it so you had to get to a certain room and open a chest before you could go into the last room (You know like in Zelda, ever played it?). With chestlock If they know what the item is they can just enter the door right?
     
  16. Offline

    Codisimus

    Sorry that happens sumtimes when trying to upload 5 plugins at 2 am, but I fixed it.
    Ok your save file got screwed up, If you send it to me I'll gladly fix it to make it the right format and then send it back

    yes unless there Is a way to clear that specific item from their inventory when they enter the dungeon. I think that would be much easier to do. Wouldn't you rather have a physical key?

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

    cloned

    First of all, this is a wonderful plugin, I am having a blast with it.
    Currently the chests just add to the loot within the chest. Would it be possible to clear the contents of the chest when it is reset and re-filled with loot?
     
  18. Offline

    Codisimus

    Yes ill be making that an option but you have to watch for two or more users trying to loot at the same time, bc it will overwrite the first loot. (so they would have to share)
     
  19. Offline

    LucidLethargy

  20. Offline

    Codisimus

  21. Offline

    Murda

    Code:
    18:02:15 [SEVERE] Could not pass event PLAYER_INTERACT to PhatLoots
    java.lang.ArrayIndexOutOfBoundsException: 2
            at PhatLoots.PhatLoots.lootIndividual(PhatLoots.java:176)
            at PhatLoots.PhatLoots.getLoot(PhatLoots.java:78)
            at PhatLoots.PhatLootsPlayerListener.onPlayerInteract(PhatLootsPlayerListener.java:331)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:254)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:207)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:519)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Any ideas?
     
  22. Offline

    Flayr

    Thanks anyways, I should probably put a request on the forums for a plugin like this, it just seems like it would be cool for rpg servers not only for dungeons but for like house keys that you can give to your friend. I don't need it necessarily I was just giving you an idea because it seemed to fit with your plugin :).
     
  23. Offline

    LucidLethargy

  24. Offline

    Codisimus

    Try this, https://sites.google.com/site/codysserver/tutorials/myplugins/testplugins/plh.zip?attredirects=0&d=1
    something is wrong about your individual loot string for that PhatLoot. Can you post the .properties here?
     
  25. Offline

    Zach Teel

    Hi there. I've been trying to figure out why I can't seem to make phatloots work for me. I'm not sure what exactly is going on but I will post the .properties for you here. As a little note, I know that one of the money lines is wrong but I'm not sure which one. Thanks in advance.
    Code:
    #Mon May 02 17:47:52 CDT 2011
    Chests(RestrictedUsers)=
    ResetTime=0'0'0'15
    IndividualLoots='money',35,35,~money,30,35,~4,1,100,~
    NumberOfCollectiveLootItemsRecieved=1
    ResetType=user
    Coll5=
    Coll4=
    Coll3=
    Coll2=
    Coll1=
     
  26. Offline

    Codisimus

    the second money line is right and the first one proly causes it to crash.
    replace
    IndividualLoots='money',35,35,~money,30,35,~4,1,100,~
    with
    IndividualLoots=money,30,35,~4,1,100,~
    and it should work for you after linking a chest
     
  27. Offline

    Zach Teel

    Thanks, I'm doing some other testing but I will check it later. Thanks :)
     
  28. Offline

    LucidLethargy

    I think the plugin may not like me, still getting a single error here (almost all the others have been removed, though!):

    Edit: guildchest is the culprit, when I remove that from the save file it works perfectly... I don't see anything wrong with it though - perhaps a bug with one of the items I have added in?/
    Items are as follows: IndividualLoots=298,1,100,~299,1,100,~300,1,100,~301,1,100,~272,1,100,~261,1,100,~262,10,100,~


    Also, I just donated a little something - I'm definitely not in a financial place to do much but I want to encourage all these awesome plugins you make. This one particularly makes my server a LOT more interesting. It's great to be able to save again too, now that you fixed everything and I removed that troubled one! :D
     
  29. Offline

    Codisimus

    you can delete the chests(restrictedusers) field and relink the chests to fix it
     
  30. Offline

    LucidLethargy

    Hmm, so it was all working quite well until this popped up once again (after I added a lot more chests):

    Anyway I don't mean to bother you, so much as I just want to give you the information you may need to improve the plugin.

    Edit: The culprit was a chest I created yesterday on 0.7 called "blacksmithcoal" - the details are as follows:

    #Tue May 03 04:23:07 EDT 2011
    Chests(RestrictedUsers)=~Paradigne,156,71,-206,~
    ResetTime=never
    IndividualLoots=263,6,100,~
    NumberOfCollectiveLootItemsRecieved=1
    ResetType=user
    Coll5=
    Coll4=
    Coll3=
    Coll2=
    Coll1=

    I deleted this from the save file, and everything runs correctly now!
     
  31. Offline

    Codisimus

    Its from my unlink chest function which I fixed but That must've been from b4 the fix. So it shouldn't happen again
     

Share This Page