Inactive [ECON] CookieMonster v1.6 - Money and Items for PvM [1240]

Discussion in 'Inactive/Unsupported Plugins' started by jascotty2, Apr 1, 2011.

  1. Offline

    jascotty2

    CookieMonster! - iConomy Money and Items for PvM
    Version: 1.6.6
    Download(static jar): CookieMonster.jar
    alternate download: CookieMonster_1.6.6.jar
    803-compatible: CookieMonster_1.3.4.jar
    684-compatible: CookieMonster 1.3.2.jar

    CookieMonster is now on BukkitDev


    This is a continuation of Coelho's initial CookieMonster Plugin
    CookieMonster is based off of the inactive iMonster, however uses none of the code from it,
    so it is more lightweight.


    Features:
    configurable item drops and economy reward for each monster
    configurable economy reward for items used to kill monsters
    also supports PvP
    Supports iConomy 4,5,6, BOSEcon 6,7, MultiCurrency, & EssentialsEco
    Ability to change entity drops with drop-rate.
    Ability to add minimum and maximum money drops for randomness
    A kill tracking system to check for spawn camping
    - define a square-radius for area to check, including max. elevation change, # of kills in this area, & timespan before an individual kill is no longer counted
    - anything over that number within the area will disable rewards until the records are old enough to be removed
    - so far, only lasts in server memory, so records are lost on server stop/reload


    doesn't allow to damage a creature/mobspawner if penalty is greater than account balance
    option to only drop items for a direct kill (stops autofarmers)
    option to replace normal drops with custom drops
    option to drop custom drops items globally
    configurable messages (including if there is no reward)
    can distingush charged from normal creepers, and tame/pet wolves from wild wolves
    can disable/enable rewards for defined regions
    - uses WorldEdit for selections


    Commands:
    /cookiemonster (cm) reload reloads settings from configuration file
    /cm region define <id> set a region (once a region is selected in worldedit)
    /cm region list [page] list regions (in current world if as a player)
    /cm region remove <id> to remove regions

    To-Do:
    ? import itemsDB from bettershop to check against config (check if valid items entered as drops)
    permissions? (for rewards & maybe permission to kill without penalty?)
    ?penalties/rewards for killing players in groups?


    Version 1.6.4 - 9/24/11
    • updated for mc 1.8
    • fixed custom drops occuring in disabled regions
    • updated register (fixes iConomy6 errors)
    Version 1.6.3 - 9/5/11
    • fixed a nullpointer error if a config node is missing
    Version 1.6.2 - 9/5/11
    • fixed global tracking errors
    • fixed some missing messsage errors
    • other code cleanup by nickrak
    Version 1.6.1 - 8/30/11
    • Arrow Kills fixed (was changed in bukkit 1060)
    Version 1.6 - 8/19/11
    • added PvP settings :)
      • more settings & messages accompany these additions
    Changelog (open)


    Version 1.5.1 - 8/9/11
    • added economy support via Register
      • now supports iConomy 4,5,6, BOSEcon 6,7, MultiCurrency, EssentialsEco
    • fixed unknown Material name.. not sure if was throwing errors
    Version 1.5.0.1 - 7/21/11
    • fixed worldedit not found error message
    • added ability to have WorldEdit in CookieMonster folder or lib folder if not otherwise installed
    Version 1.5 - 7/20/11
    • added a kill tracking system to check for spawn camping
      • define a square-radius for area to check, including max. elevation change, # of kills in this area, & timespan before an individual kill is no longer counted
      • anything over that number within the area will disable rewards until the records are old enough to be removed
      • so far, only lasts in server memory, so records are lost on server stop/reload
    • fixed anonymous replace/add drops setting
    • (hopefully) fixed a nullpointer exception in region checking
    Version 1.4 - 7/14/11
    • wolves updated for mc 1.6 (although appearent breaks didn't really seem to be broken, anyway...)
      • notibly, entities killed with wolves will reward the owner
    • fixed decimal reward if using older iConomy
    • added option to not clear drops before adding custom drops
    • added ability to disable for defined worlds
    • added regions (selections using worldguard, most code came from worldguard)
      • command to set (once a region is selected in worldedit) - /cm region define <id>
      • can list regions (in current world if as a player) - /cm region list [page]
      • then, to remove regions - /cm region remove <id>
      • default is to disable for these regions
        • on disabled worlds, regions will be enabled areas
      • alternatively, can be set to only be enabled in defined regions
    • "Wolf" has been replaced with "Wild_Wolf"
      • and added "Tame_Wolf" & "Pet_Wolf"
    • added "Charged_Creeper"
    Version 1.3.4 - 5/11/11
    • updated for iConomy 1.5 (1.4 compatiblity maintained :D)
    Version 1.3.3 - 4/27/11
    • Items are checked to be valid before added to drops list
    • updated wolves for 1.5
    Version 1.3.2 - 4/18/11
    • fixed default drops when onlyKillDrop enabled
    • added reload command
    Version 1.3.1 - 4/12/11
    • fixed player not dropping items if onlyKillDrop enabled
    Version 1.3 - 4/11/11
    • mobspawner destroy check fixed
    • BOSeconomy support added
    • added alwaysReplaceDrops option, so your custom drop always occur
    • support for no economy plugin added - so can just replace monster drops
    • configurable rewards for items used
    Version 1.2.1 - 4/8/11
    • custom messages for no reward added
    Version 1.2 - 4/8/11
    • fixed negative reward being added (not subtract)
    • added settings for config:
      • wholeNumberRewards: for rounding decimals to whole numbers
      • onlyKillDrop: entities only drop items if killed by a player
      • disableExpensiveKill: can't harm something that a player can't afford to kill
    Version 1.1 - 4/1/11
    • Configurable Messages
    • configuration file & format changed
    • can now reward/penalize any LivingEntity kill
    • custom drops replace normal drops, instead of adding to them
    • note: if you're getting "NoSuchMethodError: com.jascotty2.Rand.RandomDouble(DD)D", update BetterShop
    • (confusing, i know, but java is caching the older of the two versions of the same file)
    • kill handlers fixed for 600+
    • known fixes from 0.2:
    • no longer messes up the drop amount
    • drops are droped by the killed entity, not in front of the player
    • no more multi-rewards for killing the same entity
    Version 1.0 - 3/31/11

    Initial re-release, now maintained by jascotty2
    compatibility with 612


    -------- Coelho's versions --------
    Version 0.2:
    Fixed tuns of first-release bugs
    Version 0.1:
    Initial release
     
    .яιgнт, Roscoe55, Greylee and 2 others like this.
  2. Offline

    Kevin Forte

    This works great for me on 617, so I'm not sure what everyone is talking about. I have two MAJOR requests though; please implement an integers only option and a percentage chance to find money? :)
     
  3. Offline

    arsjet

    When the enemy is defeated, I 1.41coins, 2.58coins get the money.

    It is possible to remove the decimal numbers?
     
  4. Offline

    jascotty2

    sorry haven't checked here for a while.. never got any notifications that there were new posts :(
    Version 1.2
    fixed negative reward being added (not subtracted)
    added settings for config:
    - wholeNumberRewards: for rounding decimals to whole numbers
    - onlyKillDrop: entities only drop items if killed by a player
    - disableExpensiveKill: can't harm something that a player can't afford to kill

    not sure why you'd want that.. would make money very easy to make
    if you want blocks to have some iConomy worth, try my BetterShop plugin.

    thanks for posting this.. i hadn't noticed :oops: (fixed in 1.2)

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

    Pomme72

    Okay, no problem :)
     
  6. Offline

    arsjet

    wholeNumberRewards: for rounding decimals to whole numbers

    Thank you very much.
     
  7. Offline

    Kemp

    I have set monster spawners to reward 500-1000 but when they are destroyed the player gets nothing.
     
  8. Offline

    ssechaud

    01:05:11 [WARNING] [CookieMonster] missing message setting: norewardCreature
    01:05:11 [WARNING] [CookieMonster] missing message setting: norewardMonster
    Can we have an example of the default config?
     
  9. Offline

    Forecaster

    I'd like the ability to set different rewards for killing different mobs with different weapons.

    Because killing a creeper with a wooden sword is a lot harder than killing it with a diamond sword.

    I would like a player killing something with a wood sword to get more money than someone killing something with a diamond sword since it'd be more difficult and so the reward should be bigger.

    Other than that, awesome plugin! Will keep using!
     
  10. Offline

    jascotty2

    Version 1.3
    mobspawner destroy check fixed
    BOSeconomy support added
    added alwaysReplaceDrops option, so your custom drop always occur
    support for no economy plugin added - so can just replace monster drops
    configurable rewards for items used
     
  11. Offline

    crazydog

    Howdy
    players no longer drop items when they die after updating to version 1.3 of this. disabling the plugin fixes the issue.
    Code:
    settings:
        # general plugin settings
        # if you don't want deciamls ($1.23)
        wholeNumberRewards: false
        # if only direct player kills gives reward
        #   (disables mob farming)
        onlyKillDrop: true
        # if onlyKillDrop: false, should custom drops always occur?
        alwaysReplaceDrops: false
        # if allow hunting with wolves
        # NOTE: does not yet work, as bukkit entity damage event is broken for wolves
        allowWolfHunt: true
        #disable damage if can't afford to kill?
        disableExpensiveKill: true
    
    # any LivingEntity listed here can have it's own rewards
    # can give a range for economy reward ( min-max )
    # itemCoins to give custom ranges for individual items (note: durability not supported for items here)
    # can configure custom drops for each (origional drops are replaced with these, so 0%0 would disable rewards)
    # drops syntax: itemID[:subData][@maxDrop]%Probability[,another drop... ]
    ## 100 Probability means will drop each time
    ## if = 50, only means 50% chance of drop, chance of full drop is random
    rewards:
        Chicken:
        Cow:
        Creeper:
            coins: 20-25
        Ghast:
            coins: 30-35
        Giant:
            # giant zombie, not very likely to encounter
        Monster:
            # this is a fake human, not likely to occur
        Pig:
        PigZombie:
            coins: 25-30
        Sheep:
        Skeleton:
            coins: 10-15
        Slime:
            coins: 5-10
        Spider:
            coins: 15-20
        Squid:
        Zombie:
            coins: 1-5
        Wolf:
            coins: -150--100
        MobSpawner:
            coins: 10-20
    messages:
        # Colors are specified by using "&[colorcode]".
        #     (Never put colors within the angle brackets of a tag)
        #   Color table:
        #       &0 is black
        #       &1 is dark blue
        #       &2 is dark green
        #       &3 is dark sky blue
        #       &4 is red
        #       &5 is magenta
        #       &6 is gold or amber
        #       &7 is light grey
        #       &8 is dark grey
        #       &9 is medium blue
        #       &a is light green
        #       &b is cyan
        #       &c is orange-red
        #       &d is pink
        #       &e is yellow
        #       &f is white
        # (use && for a & symbol)
    
        # rewarded for killing a monster:
        # <amount>  how much credited to account
        # <monster> name of the creature killed
        reward: "&a You are rewarded &f<amount>&a for killing the &f<monster>"
        # <item>    what used to kill it
        itemreward: "&a You are rewarded &f<amount>&a for killing the &f<monster>&a with a &f<item>"
        # penalized for killing a monster (if coin range is negative)
        # <amount>  how much removed from account
        # <monster> name of the creature killed
        penalty: "&c You are penalized &f<amount>&c for killing the &f<monster>"
        # <item>    what used to kill it
        itempenalty: "&c You are penalized &f<amount>&c for killing the &f<monster>&c with a &f<item>"
        # if cannot afford the penalty for killing the entity
        notafford: "&c You cannot afford to kill a &f<monster>"
        itemnotafford: "&c You cannot afford to kill a &f<monster>&c with a &f<item>"
        # if no money rewarded (can be blank for none)
        norewardMonster: "&c there is no reward for killing a &f<monster>"
        norewardCreature:
        # <item>    what used to kill it
        itemnorewardMonster: "&c there is no reward for killing a &f<monster>&c with a &f<item>"
        itemnorewardCreature:
    
     
  12. Offline

    crazymadd44

    i would want this because i love to mine and when you get money for mining its even funner to mine. If money is very easy to make then the value would go down and the price for e.g. gold or diamond would go up making mining even funner. Plus I already have iconomychestshop.
    Thanks.
     
  13. Offline

    jascotty2

    Version 1.3.1
    fixed player not dropping items if onlyKillDrop enabled

    thanks for finding that.. hadn't thought to try killing a player
     
  14. Offline

    crazydog

  15. Offline

    luau

    Hello! Just downloaded the plugin and it's working great! Not sure if this feature is already implemented,but I would love to be able to set the percentage drop rate of coins. For example, a pig will drop 1-5 coins only 20% of the time. Thanks for your time!
     
  16. Offline

    ssechaud

    12:45:58 [WARNING] [CookieMonster] missing message setting: itemreward
    12:45:58 [WARNING] [CookieMonster] missing message setting: itemnorewardCreature
    12:45:58 [WARNING] [CookieMonster] missing message setting: itemnorewardMonster
    12:45:58 [WARNING] [CookieMonster] missing message setting: norewardCreature
    12:45:58 [WARNING] [CookieMonster] missing message setting: notafford
    12:45:58 [WARNING] [CookieMonster] missing message setting: itemnotafford
    12:45:58 [WARNING] [CookieMonster] missing message setting: norewardMonster
    12:45:58 [WARNING] [CookieMonster] missing message setting: itempenalty
     
  17. Offline

    crazydog

    Backup your config and edit the newly created one.
     
  18. Offline

    jascotty2

  19. Offline

    cholo71796

    Hey, I really like this plugin but there's one fatal flaw: monsters killed in monster spawners drop money, making players able to get tons and tons of money illegitimately. Could you provide a fix for monsters created with monster spawners? Or maybe just don't drop money when within X blocks of a monster spawner otherwise? Thanks.
     
  20. Offline

    jascotty2

    @cholo71796
    it is possible, but you're not going to stop players from trying to farm money like that.
    if a player makes a 10x10x4 room (or larger) with a water trough to push out spawned monsters, it's much the same (but without the ready ability to check against mob farming)

    i could instead implement a kill logging system & not allow a player to collect kills from an area if they have a (configurable) number of kills within a certain time period in that area
     
  21. Offline

    cholo71796

    @jascotty2 That's a better solution, but the time and amount of kills should probably be configurable because it's subjective: there's no "true"/"correct" time/amount of kills that is unfair.

    I actually really like that idea, it's a really good solution.
     
  22. Offline

    jascotty2

    then i'll get to working on something like this next opportunity (i think i'll leave out the player name and simply do times & coordinates)
    the only real problem is coming up with an efficient algorithm to check a distribution table for a density within a radius
    ....
    maybe scan the table from the kill coordinate centered in a square?
     
  23. Offline

    Dangazzm

    I feel like a fool but, I cannot let this just simply add money to drops. I don't wanna customize the drops haha just wanna add money to the mix.

    Thanks for the fantastic plugin though.
     
  24. Offline

    crazydog

    Same here. I want the built in minecraft drops, and use this plugin to only add money to them. Is there a way to do that? Or does the plugin need to be changed?
     
  25. Offline

    jascotty2

    if you remove the drops field from the creature nodes, it won't even try to replace the default drops
    (leaving it blank (no quotes) also works)
     
  26. Offline

    crazydog

    Not true! I removed the drop setting for every mob, and they dropped nothing until I added in the drops. Either that, or I killed 20 pigs and got so unlucky I got no pork!
     
  27. Offline

    jascotty2

    @crazydog
    i just ran some testing to confim, but i'm not getting your error (normal drops occur)
    there are some known issues with using the /reload command right now, so if you were doing that, try completely reloading the server
    (i'll work out a fix when i have more time)
     
  28. Offline

    crazydog

    Nope. that is not what I was doing.

    I'll test it again later and post my config.

    Config:
    Code:
    settings:
        # general plugin settings
        # if you don't want deciamls ($1.23)
        wholeNumberRewards: false
        # if only direct player kills gives reward
        #   (disables mob farming)
        onlyKillDrop: true
        # if onlyKillDrop: false, should custom drops always occur?
        alwaysReplaceDrops: false
        # if allow hunting with wolves
        # NOTE: does not yet work, as bukkit entity damage event is broken for wolves
        allowWolfHunt: true
        #disable damage if can't afford to kill?
        disableExpensiveKill: true
    
    # any LivingEntity listed here can have it's own rewards
    # can give a range for economy reward ( min-max )
    # itemCoins to give custom ranges for individual items (note: durability not supported for items here)
    # can configure custom drops for each (origional drops are replaced with these, so 0%0 would disable rewards)
    # drops syntax: itemID[:subData][@maxDrop]%Probability[,another drop... ]
    ## 100 Probability means will drop each time
    ## if = 50, only means 50% chance of drop, chance of full drop is random
    rewards:
        Chicken:
        Cow:
        Creeper:
            coins: 20-25
        Ghast:
            coins: 30-35
        Giant:
            # giant zombie, not very likely to encounter
        Monster:
            # this is a fake human, not likely to occur
        Pig:
        PigZombie:
            coins: 25-30
        Sheep:
        Skeleton:
            coins: 10-15
        Slime:
            coins: 5-10
        Spider:
            coins: 15-20
        Squid:
        Zombie:
            coins: 1-5
        Wolf:
            coins: -150--100
        MobSpawner:
            coins: 10-20
    messages:
        # Colors are specified by using "&[colorcode]".
        #     (Never put colors within the angle brackets of a tag)
        #   Color table:
        #       &0 is black
        #       &1 is dark blue
        #       &2 is dark green
        #       &3 is dark sky blue
        #       &4 is red
        #       &5 is magenta
        #       &6 is gold or amber
        #       &7 is light grey
        #       &8 is dark grey
        #       &9 is medium blue
        #       &a is light green
        #       &b is cyan
        #       &c is orange-red
        #       &d is pink
        #       &e is yellow
        #       &f is white
        # (use && for a & symbol)
    
        # rewarded for killing a monster:
        # <amount>  how much credited to account
        # <monster> name of the creature killed
        reward: "&a You are rewarded &f<amount>&a for killing the &f<monster>"
        # <item>    what used to kill it
        itemreward: "&a You are rewarded &f<amount>&a for killing the &f<monster>&a with a &f<item>"
        # penalized for killing a monster (if coin range is negative)
        # <amount>  how much removed from account
        # <monster> name of the creature killed
        penalty: "&c You are penalized &f<amount>&c for killing the &f<monster>"
        # <item>    what used to kill it
        itempenalty: "&c You are penalized &f<amount>&c for killing the &f<monster>&c with a &f<item>"
        # if cannot afford the penalty for killing the entity
        notafford: "&c You cannot afford to kill a &f<monster>"
        itemnotafford: "&c You cannot afford to kill a &f<monster>&c with a &f<item>"
        # if no money rewarded (can be blank for none)
        norewardMonster: "&c there is no reward for killing a &f<monster>"
        norewardCreature:
        # <item>    what used to kill it
        itemnorewardMonster: "&c there is no reward for killing a &f<monster>&c with a &f<item>"
        itemnorewardCreature:
    
    Testing:
    These all spawned naturally:
    Killed 4 pigs - no drops
    Killed 5 cows - no drops
    Killed 4 chickens - no drops
    Killed 1 skeleton - no drops
    Killed 2 creepers - no drops

    RB 677, Cookie Monster 1.3.1

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

    ssechaud

    Can't we have the default drops in the config, rather than changing them to stuff that usually doesn't drop? It removed bone dropping from skeletons...
     
  30. Offline

    TOAST7312

    Code:
    22:54:22 [INFO] [CookieMonster] Attached to iConomy.
    22:54:22 [WARNING] [CookieMonster] missing message setting: itemreward
    22:54:22 [WARNING] [CookieMonster] missing message setting: itemnorewardCreature
    
    22:54:22 [WARNING] [CookieMonster] missing message setting: itemnorewardMonster
    22:54:22 [WARNING] [CookieMonster] missing message setting: norewardCreature
    22:54:22 [WARNING] [CookieMonster] missing message setting: notafford
    22:54:22 [WARNING] [CookieMonster] missing message setting: itemnotafford
    22:54:22 [WARNING] [CookieMonster] missing message setting: norewardMonster
    22:54:22 [WARNING] [CookieMonster] missing message setting: itempenalty
    22:54:22 [INFO] [CookieMonster]  v1.3.1 loaded successfully.
    22:54:22 [INFO] [CookieMonster]  Developed by: [jascotty2, Coelho]>
    Don't mean to be a bother, but are these missing messages indicative of anything? I haven't changed my config since I installed, and the last time I have cookiemonster it never gave me these 'errors'. Everything seems to be running ok otherwise. Just curious.
     
  31. Offline

    Nima304

    I'm running CB #677, CookieMonster 1.3. I have the same issues as Crazydog, when I configure no drops for mobs in CookieMonster's configuration, nothing drops from those mobs, even though alwaysReplaceDrops is off.
     

Share This Page