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. @jascotty2

    Running 1060 and I am getting this in the console:

    Code:
    [SEVERE] [CookieMonster] error loading configuration[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]while scanning for the next token[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]found character        '\t' that cannot start any token[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]in "<reader>", line 115, column 1:[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]    ^[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]va:360)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:18[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]3)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]serImpl.java:564)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]:228)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]:230)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]:230)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]2)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]tructor.java:124)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.bukkit.util.config.Configuration.load(Configuration.java:82)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at com.pi.coelho.CookieMonster.CMConfig.load(CMConfig.java:105)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at com.pi.coelho.CookieMonster.CookieMonster.onEnable(CookieMonster.java[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]:69)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia].java:885)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]r.java:278)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:178)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:161[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia])[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:286)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:273)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:149)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]00:42:24 [SEVERE] [CookieMonster] Failed to retrieve configuration from director[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]y.[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]00:42:24 [SEVERE] [CookieMonster] Please back up your current settings and let C[/FONT][/SIZE][/COLOR]
    [COLOR=rgb(20, 20, 20)][SIZE=4][FONT=Georgia]ookieMonster recreate it.
    [/CODE][/FONT][/SIZE][/COLOR]
     
  3. Offline

    Brocodo

    OKe im runnin gon bukkit B1060 so please update! The whole server needs this awesome plugin looka t this:
    Code:
    07:17:19 [SEVERE] Could not load 'plugins\CookieMonster.jar' in folder 'plugins'
    :
    while scanning for the next token
    found character         '\t' that cannot start any token
     in "<reader>", line 115, column 1:
    
        ^
    
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
    va:360)
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:18
    3)
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
    serImpl.java:564)
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :228)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :230)
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
    2)
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:124)
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
            at org.bukkit.util.config.Configuration.load(Configuration.java:82)
            at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:157)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:175)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:213)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:136)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143)
            at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110)
            at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur
    ationManager.java:51)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  4. Offline

    jascotty2

    @SpyDaniel @Brocodo
    sorry about that.. there seems to be one tab on the lines between the rewards & messages sections
    don't know how it got there, but it's easy to remove (or re-download..)
     
  5. Offline

    Inzo

    Can you fix the bow melee not giving plat? Or is that a problem with the MC SMP code itself?
     
  6. Offline

    M4xwellou

    Hey !
    Firts of all, thanks for the plug in, didn't had any problems so far.
    I check into the configuration file but I still have a question:

    Is it possible to have rewards by killing a monster with arrows ?
    'Cause every time i do that i get no rewards. If it's possible i'd like to know how :)

    In advance, thanks a lot !
     
  7. Offline

    bluemoondevil

    How do I configure this plugin to reward no coins if a monster comes from a monster spawner?
     
  8. Offline

    jascotty2

    Version 1.6.1
    • Arrow Kills fixed (was changed in bukkit 1060)

    it's an issue with how i handle the kills.. i use the item in hand, but don't check if was killed with an arrow.. may fix later
    was a bukkit API change, (should be) fixed in this release
    Code:
    MobSpawner:
            drops:
            coins: 0
    
    (or just leave blank)
     
  9. Offline

    Zaros

    Having compatibility issues with PvPRewards if I'm correct...

    02:50:32 [SEVERE] [CookieMonster] Unexpected Error processing Reward
    java.lang.NullPointerException
    at com.pi.coelho.CookieMonster.CMRewardHandler.GivePlayerCoinReward(CMRewardHandler.java:207)
    at com.pi.coelho.CookieMonster.CMRewardHandler.GivePlayerCoinReward(CMRewardHandler.java:27)
    at com.pi.coelho.CookieMonster.CMEntityListener$MonsterAttack.rewardKill(CMEntityListener.java:185)
    at com.pi.coelho.CookieMonster.CMEntityListener.onEntityDeath(CMEntityListener.java:106)
    at org.bukkit.plugin.java.JavaPluginLoader$60.execute(JavaPluginLoader.java:663)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:142)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:391)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:441)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:180)
    at net.minecraft.server.EntityHuman.d(EntityHuman.java:566)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:883)
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    02:51:09 [SEVERE] [CookieMonster] Unexpected Error processing Reward
    java.lang.NullPointerException
    at com.pi.coelho.CookieMonster.CMRewardHandler.GivePlayerCoinReward(CMRewardHandler.java:207)
    at com.pi.coelho.CookieMonster.CMRewardHandler.GivePlayerCoinReward(CMRewardHandler.java:27)
    at com.pi.coelho.CookieMonster.CMEntityListener$MonsterAttack.rewardKill(CMEntityListener.java:185)
    at com.pi.coelho.CookieMonster.CMEntityListener.onEntityDeath(CMEntityListener.java:106)
    at org.bukkit.plugin.java.JavaPluginLoader$60.execute(JavaPluginLoader.java:663)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:142)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:391)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:441)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:180)
    at net.minecraft.server.EntityHuman.d(EntityHuman.java:566)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:883)
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    >
     
  10. Offline

    Nepocrates

    I am getting an error with the enity deaths

    I am running these plugins and I got the all last night (9/5/11) all for 1060 craftbukkit install


    Error message

    My config file is
    Not sure what is happening. So any help will be appreciated as I am a noob to all this bukkit stuff
     
  11. Offline

    jascotty2

    Version 1.6.3
    fixed global tracking errors
    fixed some missing messsage errors
    fixed a nullpointer error if missing a config node
    other code cleanup by nickrak

    @Zaros
    yes, was a pvp problem, when messages were missing from the config.. should be fixed now

    @Nepocrates
    thanks.. i missed that configuration.. should be fixed now :)
     
  12. Offline

    Deklin

    Any way to add endermen(man?) support? or can it already be done w/ an edit to the config file?
     
  13. Offline

    Takel

    I was wondering if I could make a rather ambitious feature request: Treasure classes.

    Just in case, an explanation on what I mean by Treasure Classes. At the moment, Cookie Monster will roll a chance for every item that's listed to drop when you kill a mob. This is fine if you want to do simple drops or unweighed drops, but I would like to do some more intricate drops which uses the concept of item list aliases.

    An example, let's say we have the Cow that currently drops 0-3 leather. Normally you'll allocate it 334@3%30 for a 30% chance it'll drop leather, and an equally likely chance to drop 1-3 leather. Thus, the actual drops will be: 70% nothing; 10% chance for 1; 10% chance for 2; 10% chance for 3.
    If you wanted to weigh the drops so that it's more likely to drop 1 leather, with a decreasing chance to drop 2 and 3 leather, you'll need to work out the probabilities and add in three separate 334@1%xyz drops in its list as the chance that a drop will happen will be rolled for every item in the list. That's messy and gets confusing when you go back and try to rework your drops because they weren't right. You'll also need to do some time consuming probability calculations if you wanted specific or more elaborate weights. This is same situation in why a random(2-12) is not a valid substitute for rolling 2D6 as the possible combinations are not evenly distributed, but are pooled around 7.

    Introduce the concept of a treasure class. A treasure class has a 'pick' value, which is how many times it will pick a random item in its list; and a list of items or other treasure classes and their respective probabilities from 0-1 (or 0-100 depending on what you want to do for clarity). List entries with maximum probability will always be picked once and are not counted for the pick rolls.

    Now for our cow leather example. We can define a global treasure class for the cows, called cowTC. This treasure class picks 1 from the following list: cowTC1, cowTC2, cowTC3 with precise probabilities for each. cowTC1 contains a singular leather drop at 100% chance, TC2 contains 2 and TC3 contains 3. Now we can precisely declare the probability for each event without having to worry about fudging the probability distributions. If we wanted 2 leather to be the norm at 60% chance when leather drops and 1 or 3 are even chance for the rest, we tack on TC1%20, TC2%60, TC3%20. Then if we wanted leather to drop 70% of the time, we just put the probability of the parent cowTC to 70%. Now, when we go back to our config in two month's time, we will read "cowTC has a 70% chance it will trigger. When it does, it'll drop 1 leather 20% of the time, 2 leather 60% of the time and 3 leather 20% of the time. Otherwise, it'll drop nothing.

    As an expansion to that, let's just say we're working on 1.8 drop lists and we want the cows to drop raw beef or leather independent of each other. We can do this by expanding our treasure classes. cowTC will now always drop from the cowLeatherTC and cowBeefTC classes and those two treasure classes has their own chance to drop nothing.
    Of course, instead of declaring new treasure classes for specific quantities, it would be nice to specify a range for the quantity so defining an equal range of 1-3 would be @1-3 while without a range, such as @2 will always drop 2 of that item.

    While this is substantially more complex to set up since we need to define nested treasure classes, it does allow for drop mechanics such as a 1% chance that a particular mob will drop a rare drop. This rare drop would be one of a list of highly valuable 'stuff' with different probabilities for the actual item picked and this rare drop is a bonus to the standard drop list.

    Now, this suggestion is far more complex than the system that is already implemented. In fact, it may require enough work to warrant a separate plug-in in itself but I would like to propose this feature suggestion.
     
  14. Offline

    jascotty2

  15. Offline

    Takel

    Awesome, thanks for considering the idea jascotty2.
     
  16. Offline

    Hayatae

    I'm running the latest iConomy 6 build and CookieMonster_1.6.4 on the latest bukkit 1.8.1 dev build. iConomy appears to be working fine, but when I downloaded and configured CookieMonster, I get the error below on startup. Are you not hooking correctly for iConomy 6? Why is it failing on a check for iConomy 4?

    Also, you should look at making a BukkitDev page for this project. Much better than trying to keep track of everything in a giant forum thread.

    Code:
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
            at com.nijikokun.register_21.payment.methods.iCo4.isCompatible(iCo4.java:61)
            at com.nijikokun.register_21.payment.Methods.createMethod(Methods.java:95)
            at com.nijikokun.register_21.payment.Methods.setMethod(Methods.java:141)
            at com.pi.coelho.CookieMonster.CMEcon.onPluginEnable(CMEcon.java:36)
            at org.bukkit.plugin.java.JavaPluginLoader$45.execute(JavaPluginLoader.java:555)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:899)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.coelho.iConomy.iConomy
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 16 more
     
  17. Offline

    Tankeh

    using 1.8.1 and yesterday dl'd the new cookiemonster. Got this today : 10:58 AM [INFO] No source for CookieMonster_1.6.4.jar ask the Author to add it to dev.bukkit.org
     
  18. Offline

    Camren

    I'm guessing this is just a 1.8.1 error:
    Code:
    [SEVERE] Could not pass event PLUGIN_ENABLE to CookieMonster
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
     at com.nijikokun.register_21.payment.methods.iCo4.isCompatible(iCo4.java:61)
     at com.nijikokun.register_21.payment.Methods.createMethod(Methods.java:95)
     at com.nijikokun.register_21.payment.Methods.setMethod(Methods.java:141)
     at com.pi.coelho.CookieMonster.CMEcon.onPluginEnable(CMEcon.java:36)
     at org.bukkit.plugin.java.JavaPluginLoader$46.execute(JavaPluginLoader.java:562)
     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:927)
     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
     at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    If it is, I hope this gets updated. Great plugin :3

    Btw, this means that your using CraftBukkitUptoDate or some updater. It's trying to pull the source to download, but BukkitDev for this plugin hasn't been setup.
    Anything thats not a SEVERE can generally be figured out by someone with common sense :D

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

    jascotty2

    it's a register iconomy error with iConomy6.. i'll have an update later today
    (sorry for the wait :) )
     
  20. Offline

    Camren

    Ohh, okay. I didn't see the
    Code:
    iCo4.isCompatible
    Thanks so much! Great plugin =D
     
  21. Offline

    jascotty2

    Version 1.6.4
    • updated for mc 1.8
    • fixed custom drops occuring in disabled regions
    • updated register (fixes iConomy6 errors)
    also:
    CookieMonster is now on BukkitDev :)
     
  22. Offline

    Takel

    Hmm, I suspect there may be a little bit of a hiccup with the Register update. Running version 1.6.4 and I am simply not getting any money payments when killing mobs. I'm not even getting the message advising that there has been a kill. The actual drops are being modified (as evident from a personal config stuff up that gave chickens a chance to drop beef of all things) but there's not cash payment.
    No regions, global settings are in effect. Tested with multiple tools to perform the.... testing (bare hands, axes, swords, arrows, pickaxe). All other plug-ins that affect mob spawns/potential drops were disabled for the testing.
     
  23. Offline

    Tankeh

    so I have no common sense for making a 2 second post to try and help someone else? If I thought it was 'severe' I would have asked or commented in some way about it. I didnt. It was a simple heads up. Your post was completely unnecessary and unhelpful.
     
  24. Offline

    jascotty2

    @Takel
    i think that may have been a build error.. i fixed another (non-related) problem, and it started working again..

    Version 1.6.5
    fixed alwaysReplaceDrops sometimes being applied twice
     
  25. Offline

    Takel

    Great, that update's working perfectly fine.
     
  26. Offline

    Jikarosa

    Sorry for my newbie question, but the download includes only the jar-file. Where do i get the config-file for cookiemonster?
     
  27. Offline

    jascotty2

    it's included inside the jar & is automatically extracted (created) on first run
     
  28. Offline

    Camren

    Well I said GENERALLY, and I think I solved the problem. My work here is done.
     
  29. Offline

    Vixolus

    How exactly do you setup each person in the config? Like I don't it to cost money to destroy mob spawners, and I want every hostile mob to drop 50 "moneys".
     
  30. Offline

    Shocks

    I can't seem to get the rewards to actually happen.
     
  31. Offline

    jascotty2

    @Takel @Shocks
    i started having troubles with money drops again, and took a closer look at the 'why' ..
    bukkit seems to have changed how the onPluginEnable works (again), so it caused the plugin to not see an economy plugin registered before it was.
    so:

    Version 1.6.6
    fixed registering enabled economy plugins
     

Share This Page