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

    snatch182

    Woops, I got some messy:
    Code:
    14:01:31 [SEVERE] Exception in thread "Thread-9"
    14:01:31 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:01:31 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:01:40 [SEVERE] Exception in thread "Thread-10"
    14:01:40 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:01:40 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:02:04 [SEVERE] Exception in thread "Thread-11"
    14:02:04 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:02:04 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:02:18 [SEVERE] Exception in thread "Thread-12"
    14:02:18 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:02:18 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:02:22 [SEVERE] Exception in thread "Thread-13"
    14:02:22 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:02:22 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:02:25 [SEVERE] Exception in thread "Thread-14"
    14:02:25 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:02:25 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:05:53 [SEVERE] Exception in thread "Thread-15"
    14:05:53 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:05:53 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:06:04 [SEVERE] Exception in thread "Thread-16"
    14:06:04 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:06:04 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:06:16 [SEVERE] Exception in thread "Thread-17"
    14:06:16 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:06:16 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    14:06:20 [SEVERE] Exception in thread "Thread-18"
    14:06:20 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    14:06:20 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    
    Any ideas?
     
  3. Offline

    xlilcasper

    I think this is how it is supposed to work but if it is I would like to suggest a feature change.

    I have two chests that I linked to dtiny. A player loots one and it marks them looting them both. I was thinking I could create loot tables and link many chests to the same drops.

    So my feature suggestion is add in drop tables. Allow us to create a table with say
    /loot table make <name>
    then we could add this table to a chest, so /loot add <table_name> would make it look up to that table. This way I can define tables for my dungeon such as tiny,small, medium, large and just point my chests to those tables. Will save a lot of time.
     
  4. Offline

    snatch182

    Yup but previous version worked fine and this one make those errors from mine previous post and it dont work, I can add items to loot but they dont show in chest to pick... help? :)
     
  5. Offline

    Codisimus

    I am currently working on a large update for this that will make create chests much easier and have several chests linked to one phatloot
     
  6. Offline

    snatch182

    @Codisimus, i made chest the same way as before this newest update and when im looking in it's empty... and in console I get this code when opening chest:

    Code:
    16:30:43 [SEVERE] Exception in thread "Thread-9"
    16:30:43 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 2
    16:30:43 [SEVERE]     at PhatLoots.PhatLoots$1.run(PhatLoots.java:83)
    
    And normal players are still able to put items into this chest...
     
  7. Offline

    Codisimus

    Try downloading it then post your save file, I will look at the code when I get home but I proly will just have you wait till i finish rewriting the entire save format
     
  8. Offline

    snatch182

    Bug is still working, someone can put crap items into chest and others cant get exact items...
     
  9. Offline

    Codisimus

    oh sorry i thought you meant so that you cant destroy it... umm hopefully i have this issue fixed by tonight but no promises
     
  10. Offline

    snatch182

  11. Offline

    Codisimus

    ugh this is giving me quite a bit of trouble but im still working on it, maybe it will be done tomorrow
     
  12. Offline

    snatch182

    Ah and one more thing Im not sure, but is it possible to make it password protected using LWC by random players?
    If yes that should be fixed to, otherwise someone will block it.
     
  13. Offline

    Codisimus

    hmm im not sure how to override lwc, ill contact the maker and see if sumthing like this is possible
     
  14. Offline

    snatch182

    I was using realshop plugin and as I remember there was block to lwc when chest was as shop

    @Codisimus how its goin? Im waiting for lwc nonblock and crap nonput :D please asap :)

    gz.

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

    Codisimus

    well the "crap nonput" isnt possible yet, i will have to make it just delete contents if its full... im sorry this is taking so long but im remaking the save file and everything to make it a lot easier to configure. Also adding the timed reset (finally) and will then add the lwc block. should be up tonight
     
  16. Offline

    snatch182

    Tonight both modifications? " delete contents if its full" and "lwc block" ? wooopii :)
     
  17. Offline

    Codisimus

    not only that but i just finished the automatic reset. and collective loots (in addition to normal loots you can make it so the looter can for example get two items out of diamond sword, diamond pickaxe, diamond wc axe, gold block.) did that make sense? oh well im testing it now
     
  18. Offline

    snatch182

    Im not quite sure, there will be " delete contents if its full" and "lwc block" or not? Otherwise I cant use it because some players will grief it...
     
  19. Offline

    Codisimus

    it will have "delete contents if its full" and as long as i can figure it out it will also have "lwc block"
     
  20. Offline

    snatch182

    Ok so im waiting :D
     
  21. Offline

    Codisimus

    Ok huge update! make sure you read up on the new features... later tonight i will add an explanation on the save files

    Version 0.4
    • 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


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

    snatch182

    Fuck yeah! I will test it tommorow (im from Poland and now it's 1:46 at night) after studies... big thx.

    Gz.
     
  23. Offline

    joedan

    Just wondering, I am admin on my server, I installed Phatloots, set a monetary amount and linked it to a chest. Am using the default timeout period. However when I try and loot the chest, I can continuously obtain the loot I.e. Money every time I open the chest by right clicking.

    Are you able to tell me what phatloots permission I need to remove that controls this so I can test without moving my entire user into another permissions group?

    I know my ordinary users are fine and they can't do this.
     
  24. Offline

    Codisimus

    This must be an error in the code bc I didn't make a permission to allow for looting without waiting. Can you post the save file? (the one with the name of the phatloot loot as the title)
     
  25. Offline

    snatch182

    Wooopey, Im just starting to test it, but can you explain me those settings?:
    config.properties

    DefaultResetType=user - what it make? are there other types?
    AutoLockPhatLootChestsWithLWC=false - false mean that noone can block it with LWC?
    DefaultNumberOfCollectiveLootItemsRecieved=1 - what about that? if I turn it to 0?
    DefaultResetTime=0'0'5'0 - how can I turn reset time off and just reset it manualy by command?

    test.properties

    NumberOfCollectiveLootItemsRecieved=1
    ResetType=user
    Chests(RestrictedUsers)=187,61,61,_
    CollectiveLoots=
    ResetTime=0'0'5'0
    IndividualLoots=35,40,100,

    Same questions for test.properties and how its working with config. properties?

    thx for help.
     
  26. Offline

    Codisimus

    Oh sorry I meant to explain that last night... I will after I get out of class =P
     
  27. Offline

    snatch182

    ok, im waiting :)
     
  28. Offline

    Codisimus

    @snatch182 does this help?
     
  29. Offline

    snatch182

    Yup it helpd but,
    as I see, its impossible to make LWC even if "AutoLockPhatLootChestsWithLWC=false"

    other thing, as I know after server restart all loot reset so players can take items. Is it possible to not reset until admin reset it by command (even if server resets)?
     
  30. Offline

    Codisimus

    are you sure this happens with latest jar? it shouldnt
     
  31. Offline

    snatch182

    Well I downloaded it when I posted this:

     

Share This Page