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

    CoffeeOD

    Just wanted to post that this will be perfect to our server! Sorry if I didnt understand, but when player loots chests will items be deleted from chest until /loot reset or server restart? If so, is it anyhow possible that items would be restored to the chest automatic after player loots, so another player can loot chest without admins having to reset loot or restart server?

    I would love to do setup that allows players loot certain chest only once, after first looting it would prevent players from opening same chest again even after server restart. Since some players likes to be in party for dungeons, it would be nice if all players could loot chest which brings me to "items would be restored to the chest automatic" point.

    Thanks for planning this plugin!
     
  3. Offline

    Codisimus

    what happens is when a player right clicks the chest it gives them the money and then adds any items looted to the chest inventory. It is then up to the player to take these items out, when the next player come it will add more items (old items will stay in there) that way if two ppl click it around the same time it doesn't simply overwrite the first one. most of the other features you mentioned will be available once i implement a config file.
     
  4. Offline

    Funkfoose

    Now this is looking great, your a plugin machine. I've got random healing shrines here and there over my world (MMORPG Themed) so adding chests into these places with percentages for items is great. And linked to master phatloot is a excellent idea.
    Can you add a delay before users can go into the chest again? like a couple day/night cycles.
    For example, user stumbles across random healing shrine place, (free healing) but I'd like to use the plugin to have a chest for maybe bread or something, obviously you don't want users repeating using the chest, but I'd like them to be able to return for more goodies, after a set time (configurable?)

    Anyway bud, keep up the rocking work. I'll let you know how this goes after I've tested it out.
     
  5. Offline

    Codex Arcanum

    Waiting for the tutorial, I'm kind of lost. Also, /loot delete gives the message "Phat Loot ____ made!"

    Does this plugin require both iConomy AND BOSEconomy like it says in the requirements? ...and what does this mean? Errors happen every time I open a Phat Loot Chest...
    Show Spoiler

    13:33:32 [SEVERE] Exception in thread "Thread-31"
    13:33:32 [SEVERE] java.lang.NumberFormatException: For input string: "20]"
    13:33:32 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:33:32 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:33:32 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:33:32 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:33:36 [SEVERE] Exception in thread "Thread-33"
    13:33:36 [SEVERE] java.lang.NumberFormatException: For input string: "20]"
    13:33:36 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:33:36 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:33:36 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:33:36 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:34:35 [SEVERE] Exception in thread "Thread-37"
    13:34:35 [SEVERE] java.lang.NumberFormatException: For input string: "20]"
    13:34:35 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:34:35 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:34:35 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:34:35 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:37:19 [SEVERE] Exception in thread "Thread-42"
    13:37:19 [SEVERE] java.lang.NumberFormatException: For input string: "20]"
    13:37:19 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:37:19 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:37:19 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:37:19 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:37:54 [SEVERE] Exception in thread "Thread-45"
    13:37:54 [SEVERE] java.lang.NumberFormatException: For input string: "20]"
    13:37:54 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:37:54 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:37:54 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:37:54 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:40:19 [SEVERE] Exception in thread "Thread-55"
    13:40:19 [SEVERE] java.lang.NumberFormatException: For input string: "100]"
    13:40:19 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:40:19 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:40:19 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:40:19 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:40:21 [SEVERE] Exception in thread "Thread-57"
    13:40:21 [SEVERE] java.lang.NumberFormatException: For input string: "100]"
    13:40:21 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:40:21 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:40:21 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:40:21 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:40:31 [SEVERE] Exception in thread "Thread-59"
    13:40:31 [SEVERE] java.lang.NumberFormatException: For input string: "100]"
    13:40:31 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:40:31 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:40:31 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:40:31 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:41:08 [SEVERE] Exception in thread "Thread-65"
    13:41:08 [SEVERE] java.lang.NumberFormatException: For input string: "100]"
    13:41:08 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:41:08 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:41:08 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:41:08 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:44:33 [SEVERE] Exception in thread "Thread-76"
    13:44:33 [SEVERE] java.lang.NumberFormatException: For input string: "100]"
    13:44:33 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:44:33 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:44:33 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:44:33 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:44:33 [SEVERE] Exception in thread "Thread-77"
    13:44:33 [SEVERE] java.lang.NumberFormatException: For input string: "100]"
    13:44:33 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:44:33 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:44:33 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:44:33 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:48:41 [SEVERE] Exception in thread "Thread-90"
    13:48:41 [SEVERE] java.lang.NumberFormatException: For input string: "25]"
    13:48:41 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:48:41 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:48:41 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:48:41 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)
    13:48:41 [SEVERE] Exception in thread "Thread-91"
    13:48:41 [SEVERE] java.lang.NumberFormatException: For input string: "25]"
    13:48:41 [SEVERE] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    13:48:41 [SEVERE] at java.lang.Integer.parseInt(Integer.java:458)
    13:48:41 [SEVERE] at java.lang.Integer.parseInt(Integer.java:499)
    13:48:41 [SEVERE] at PhatLoots.PhatLoots$1.run(PhatLoots.java:92)


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

    dak393

    Ummm It doesn't have a required section it has a supports section booth iconomy and BOSEconomy are economy plugins you should only be running one. I don't have an answer for the error. But if you run it with say iconomy and permissions on build #556 you should be fine. Post how it goes and make sure to include more information if you still have the error.
     
  7. Offline

    Codisimus

    This is an error in the output message (which will be fixed in the next update) the Phat Loot is actually deleted despite it saying it was made.
    I understand your confusion and no you can have either iConomy, BOSEconomy, or neither (if you have both it will use iConomy. and your error is bc there is ']' at the end of your numbers when you type the command it should be formated as follows
    /loot add test money,25,50
    or
    /loot add test 264,1,20
    its looks like you typed sumthing like
    /loot add test 264,1,20]
    I will make a tutorial tonight to explain things better
     
  8. Offline

    riuthamus

    I can help you out with video tutorials as well... honestly i want to support this as much as it is supporting BOSEcon. The more people we get using that the better, its by far a better system (IMO biased!)
     
  9. Offline

    Codisimus

    just got to thinking, this checks to see if you already looted the Phat Loot, not if you already looted the chest. which means that multiple chests linked to one Phat Loot will not work very well. I will fix this in the next update.

    that would be great. I am off of spring break now and hope I can still work on plugins a lot but not having to make the tutorials would save me sum time

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

    riuthamus

    well... give me a list of features you want to show off, and ill make the videos you need!
     
  11. Offline

    Codisimus

    ill think about it, would you be able to show editing the save file and stuff like that too? (shouldnt have to shut down the server, you could actually just use a sample file) I need to fix the error i mentioned above first but proly just creating two different Phat Loots and link 4 different chests (2 chests to SmallLoot 1 chest to LargeLoot and 1 chest to both.
     
  12. Offline

    riuthamus

    I can show whatever you want, im a video guy! :p look at my riuthamus channel.
     
    Jungle_Law likes this.
  13. Offline

    Codisimus

    haha ya I noticed. My DungeonReward could use an updated tutorial as well.
     
  14. Offline

    Funkfoose

    Hey I tried setting up just a single chest with a money reward 5 - 50, linked the chest successfully, I can check it with /loot info and its listed in /loot list. However, when ever I right-click it get this error and no moneys.
    Code:
    2011-03-21 20:37:47 [SEVERE] Exception in thread "Thread-134"
    2011-03-21 20:37:47 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 1
    2011-03-21 20:37:47 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:76)
    2011-03-21 20:37:51 [SEVERE] Exception in thread "Thread-143"
    2011-03-21 20:37:51 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 1
    2011-03-21 20:37:51 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:76)
    Pretty sure thats the same error twice. Oh and I'm using permissions.
    Is it just something I've missed?
     
  15. Offline

    Codisimus

    umm post your save file so i can make sure its formatted right and ill take a look at my code to make sure it will work with only money and no items. Also are you using iConomy or BOSEconomy?
     
  16. Offline

    dak393

    Hey so I was talking to a friend on my server and he brought up a good point, If at some point you make it so that chests reset on their own (that would be awesome) What would prevent a player from sitting at the dungeon reward chest? -.-; Would it be possible to teleport the player away or setup a restart button that when pressed allows the player to loot the chest again? Just looking for some way of allowing multiple loots automatically while still preventing camping.
     
  17. Offline

    Funkfoose

    Code:
    Hide1;money!;
    112:72:110;
    
    I'm using iConomy
     
  18. Offline

    Codisimus

    When I implement this they will reset after certain amount of time (like a day or a week)

    Should be
    Code:
    Hide1;money,5,50!;
    112:72:110;
    
    5 being the low end and 50 being the high end.
    Did you type "/loot add Hide1 money,5,50" or just "/loot add Hide1 money" you can fix it in the file or just use "/loot remove Hide1 money" and then add the correct one.
     
  19. Offline

    Funkfoose

    Pretty sure I typed my values correctly, working fine now, cheers bud.
     
  20. Offline

    Evan Melvin

    Great plugin. Would be nice to be able to set a max amount of items you can get from a specific chest though.
     
  21. Offline

    Codisimus

    Do you mean for if you keep looting the chest or for each individual loot? You can set the stack size but besides that you may get one of each item or none depending on your percentages.
     
  22. Offline

    dak393

    just hoping that down the line you can implement per player resets on switches (buttons mainly)
     
  23. Offline

    Evan Melvin

    I mean the amount of items that can be generated at once. Say if a want a loot table with 6 items in it, but I only want 2 types of item to be put into a chest at a time, instead of possibly having each item pop up in the chest due to rng.
     
  24. Offline

    Codisimus

    I discovered a way to do this but one more question, do you want the same item to be able to pop up twice? or out of 6 possible items you get 3 unique items. I will proly implement this into the save file instead of the config file (that way a chest could be setup to spawn 1 rare item (gold, diamond, or goldenapple) and any amount of other common items. any other features of this b4 I start coding it?
     
  25. Offline

    Evan Melvin

    It really wouldn't matter to me, however I guess it would be nice to add that option.

    Another way to do it would be to set the loot percentages and make them total 100, and then set the amount of loot you get from the chest, i.e.

    wooden sword 5%
    leather helmet 15%
    leather chest 5%
    leather pants 10%
    leather boots 15%
    5 arrows 25%
    bow 5%
    2 string 10%
    2 flint 9%
    iron sword 1%

    and then have it roll X (set by the user) times to determine the amount of items added to the chest. The results might not be worth the effort though.
     
  26. Offline

    dak393

    Multiple sections like you said maybe with a chance to drop (1-100) and then all the possible drops: 1 diamond, 1 diamond and 3 gold, 1 iron, nothing. then you could set up another slot (common drop) and put all the drops.
     
  27. Offline

    Codisimus

    That is kinda wut I'm planning on doing. But part of the chest can be setup this way and the rest can be setup how it is now.
    Yup this is exactly wut i was thinking.
     
  28. Offline

    dak393

    Great :D looking forward to more of your excellent work. One thing to add to your todo list would be an easy in game way of setting up loot chests, say you define a chest as a phatloot chest, then place items in the chest and type /loot <chestname> drop <dropname> so that whatever was in the chest gets set as drop1 (example name) just something to think about for the future ^^
     
  29. Offline

    Codisimus

    How would this determine the percentges?
     
  30. Offline

    dak393

    add a number 1-100 at the end (of the command) to change it from default 100, only other problem would be adding air/nothing to the chest
     

Share This Page