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

    Codisimus

    well ill soon be updated to build #602 then we can see if we still have that issue
     
  3. Offline

    snatch182

    Another thing, I cant add items including ":" like 17:2 (it's birchwood)

    Edit:
    And another, quite big for me, well I made few chests, as expample one of them have sand inside. Iwalk to chest open it and its empty so I close it, make few steps like to left or right and open it again and there it is... the sand, but I cant leave it like that for players caouse not all of them know about that and they will leave loot for other to steal :(

    Edit2:
    Wooh even bigger one, dont know why, but after some loot settings change like "time never" and server restart I can take items multiple time like close, open, close, open etc.

    Now I figuret out something new, if I stay close to chest and open it than there are no items but if I stay far away of it and open than I can take how many I want like I wroted upper... :(

    Help.
     
  4. Offline

    Codisimus

    UPDATE!
    Now works with build #602
     
  5. Offline

    Rabisu

    Using version 0.4 and Craftbukkit build 556 and 'Collective' drops don't seem to work as expected.

    starter.properties file:
    Code:
    #Thu Mar 31 02:09:25 EDT 2011
    NumberOfCollectiveLootItemsRecieved=1
    ResetType=user
    Chests(RestrictedUsers)=-9,65,-58,Player,90'2'9'10,_
    CollectiveLoots=03,1,84,_276,1,2,_278,1,2,_279,1,2,_277,1,2,_310,1,2,_311,1,2,_312,1,2,_313,1,2,_
    ResetTime=0'30'00'00
    IndividualLoots=272,1,100,_274,1,100,_275,1,100,_273,1,100,_298,1,100,_299,1,100,_300,1,100,_301,1,100,_17,16,100,_05,16,100,_280,32,100,_320,1,100,_320,1,100,_320,1,100,_
    
    With these settings, I seem to be getting more than one of the 'Collective' loots as well as all of the individual loots. (The dirt block is a filler for testing) I seem to be getting a Diamond Sword (276) every time.
     
  6. Offline

    Bekz

    >> [556] <<

    might want to update that.
     
  7. Offline

    Codisimus

    Thanks, fixed
     
  8. Offline

    Bekz

    Sure thing, anything I can can do to help. Love the plugin. :D
     
  9. Offline

    Codisimus

    ok you should be getting all of the individual loots, 272,1,100 means that you get 1 of item 272, 100% of the time. all your individual loots are set to 100%. i am testing collective loots right now and will let you know when i figure sumthing out

    I fixed the collective loots, it will be in the update for minecraft 1.4

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

    Rabisu

    Good to know, I'll be sure to try it out again when you get that finished.
     
  11. Offline

    Codisimus

    works with build #612

    EDIT: collectiveloots are also fixed
     
  12. Offline

    Codex Arcanum

    My server informs me:
    19:56:50 [SEVERE] Nag author: '<NoAuthorGiven>' of 'DungeonReward' about the following: onPluginEnable has been replaced with a new signature, (PluginEnableEvent)
     
  13. Offline

    Codisimus

    Lol wrong thread, but update to the newest version
     
  14. Offline

    sexy vampire

    do dose this make gates ?
     
  15. Offline

    Beatkidz

    Could you make this work with the essentials eco API?
     
  16. Offline

    godman

    Love all your plugins, mate! Keep up the good work! :)
     
  17. Offline

    Codisimus

    i dont think essentials eco has an API, i looked b4. If they do i would be glad to support it (many people requested this) please link me to the API if one exists
     
  18. Offline

    Bekz

    Is there a way to make this infinite/user can never loot the chest again? (other than making it like 9000 days)
     
  19. Offline

    Codisimus

    "/loot time never"

    EDIT: It actually should be "/loot time [Name] never"
     
    Bekz likes this.
  20. Offline

    Beatkidz

    i don't know where the API is but i do know one other plug-in that uses it. the "WolfPound" plug-in uses it and the source is there.. i'm not big into code so not sure if that helps at all.
     
  21. Offline

    Codisimus

    ya ill look into it, hopefully i can add this essentials eco support to all my plugins (ill let you kno)
     
  22. Offline

    iCandyz

    i have the permissions thing but idk how to add this to the permissions! all i did was add my name to users, im a newbie at this aahhh dk wut to do >.<
     
  23. Offline

    Codisimus

    it should look sumthing like this
    Code:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - 'phatloots.use'
    Admins:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
                - Default
            permissions:
                - 'phatloots.make'
                - 'phatloots.link'
                - 'phatloots.add'
                - 'phatloots.remove'
                - 'phatloots.unlink'
                - 'phatloots.delete'
                - 'phatloots.admin.list'
                - 'phatloots.admin.reset'
        codisimus:
            group: Admins
            permissions:
     
  24. Offline

    godman

    I have a question. Sorry for not testing this to figure it on my own, but i have little problems with running the server right now, so please tell me.
    If i have 2 chests linked to 1 phatloot, do they have separate reset times?
     
  25. Offline

    Codisimus

    No, unless you mean this, if a user loots chest A at 2:00 and chest B at 2:05 and both are linked to PhatLoot A which has a reset time of 30 minutes, then the users can't loot chest A again till 2:30 and chest B till 2:35.
    If you want to exact same chests to be different reset times then i would suggest copying the PhatLoot in the save folder and make an identical one only changing the name and reset time
     
  26. Offline

    godman

    Sorry, i wasn't clear enough. If user loots chest A at 2:00 will he have to wait 30 minutes before looting chest B? You are saying no?
    I just need the info to give to the players, i'm linking the chests anyway, it's way too hard to have so much different files. I'm setting up the Skylands map with your plugin and just one dungeon has around 35 chests :confused: and there are 4 or 5 of them :confused: not to mention every other one on that map... :)
     
  27. Offline

    Codisimus

    This is correct. They will not have to wait 30 minutes to loot B If a PhatLoot is linked to 35 chests and the reset time is 30 minutes then a user may loot all 35 within 30 minutes. So most dungeons will only require 2 PhatLoots, One that gives really good items (like the "final boss" chest) and another that gives common/semi-rare items (for all other chests in the dungeon) I hope this clears things up. if not im sure you find out when you get a chance to test it out
     
  28. Offline

    godman

    Yes this is great :) And your idea is also great, i was taking an entirely different much harder and stupider approach.. I was making 35 phatloots for all the chests in 1 dungeon and was going to link the 35 from the second to them and so on. The idea was that that would make every chest different, but now when i think about it, i can just put many items with 50% probability and have almost the same variety of chests to keep the players interested :D
    BTW. What if 2 phatloots are linked to 1 chest, what happens then?
     
  29. Offline

    Codisimus

    I tried to make this plugin easy to setup for multiple dungeons/chests

    If 2 phatloots are linked to 1 chest.... I believe it will simply "roll" for both PhatLoots and add any items. there shouldnt be any conflict. The code searches through the entire linked list for linked PhatLoots (it doesn't stop once its found one) so linking 2 PhatLoots to 1 chest should work but ive never tested it out.
     
  30. Offline

    crazydog

    Issue:
    Players with underscores in their names break the plugin:
    There is a guy named _riel_ who used the chest. On startup:
    Code:
    16:11:15 [SEVERE] For input string: "riel" loading PhatLoots v0.5.1 (Is it up to date?)
    java.lang.NumberFormatException: For input string: "riel"
            at java.lang.NumberFormatException.forInputString(Unknown Source)
            at java.lang.Integer.parseInt(Unknown Source)
            at java.lang.Integer.parseInt(Unknown Source)
            at PhatLoots.PhatLoots.setRestrictedUsers(PhatLoots.java:374)
            at PhatLoots.PhatLootsSaveLoad.loadPhatLootsFromFile(PhatLootsSaveLoad.java:68)
            at PhatLoots.PhatLootsMain.onEnable(PhatLootsMain.java:59)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
    Chest property:
    Code:
    #Wed Apr 06 16:10:57 MST 2011
    NumberOfCollectiveLootItemsRecieved=1
    ResetType=user
    Chests(RestrictedUsers)=607,72,-893,_riel_,96'13'1'1,chanelcute,96'12'0'15,Mice249,96'10'8'10,iDazzumHD,96'8'45'52,flyingunderpants,96'8'5'3,ploopy07,95'5'43'10,Crazydog115,95'0'38'27,_
    CollectiveLoots=
    ResetTime=365'0'0'0
    IndividualLoots=298,1,100,_299,1,100,_300,1,100,_301,1,100,_268,1,100,_269,1,100,_270,1,100,_271,1,100,_290,1,100,_345,1,100,_
    
     
  31. Offline

    Codisimus

    hmm i use '_' to indicate the end of a "PhatLoot" Ill change it to another character
     

Share This Page