[INACTIVE][ECON] CookieMonster! v0.2 - iConomy Money and Items For PvM [459]

Discussion in 'Inactive/Unsupported Plugins' started by Coelho, Mar 1, 2011.

  1. It seems that the money is awarded at the 2nd to last hit, not the last. Not sure if this is a bug or just a limitation to bukkit atm. But i would preferr the player first getting the money when the monster is actually dead, currently you have to hit it 1 more time after getting rewarded in order to kill it.
     
  2. Offline

    jwideman

    This is a bukkit issue and nothing can be done about it until it's fixed in bukkit.
     
  3. Ah, thanks for the quick answer :)
     
  4. Offline

    Systrafoss

  5. Offline

    Coelho

    Your reward accidentaly contains a decimal, this is your problem.
     
  6. Offline

    Nate Wiebe

    This plugin is doing what is advertised, but if the server crashes or gets reset, the money resets. Is this a problem with this plugin, or with iConomy 4.2?
     
  7. Offline

    Coelho

    It's my bad for not saving the accounts when I add money to them, however if you shut the server down normally iConomy will save for you, so this is not fatal.
    Also to have it save have someone send 1 cent to you using /money pay [username] 0.01 Your money will be saved.
     
  8. Offline

    Nate Wiebe

    Is it possible for you to make it save after money is added? or every 5 min? (preferably anytime after money is exchanged)
     
  9. I removed all the decimals I put in after the coin settings.

    Coin_Minimum:1
    Coin_Maximum:2

    Only not geting any coins now, what did I configure wrong?
    Or do I have to wait for a new recomended Bukkit build?

    Same on build 493, no coins.
    And Bukkit, why is not the wiki updated with latest build :-(
    Thats where a norma admin would expect it to be...
     
  10. Offline

    Nate Wiebe

    Another thing, for the drop rates, according to the config file, it should be item:amount: percent , but the result that I'm getting is item: percent:amount. Is this a bug, or a typo?
     
  11. Offline

    Coelho

    Maybe typo, will look into it
    --- merged: Mar 4, 2011 12:36 AM ---
    It is, I just forgot.
     
  12. Offline

    Nate Wiebe

    You just said above that it wasn't. It only saves if you stop the server, if it crashes it doesn't save. I was asking if you could set a timer, or have it save every time you get money.
     
  13. Offline

    Coelho

    I said it is possible, I just did not do it.
     
  14. Offline

    Nate Wiebe

    Ah, I see the misunderstanding. I was requesting it to be done, not actually asking if it was possible to do.
     
  15. hmm, the floating decimal issue is in the default created yml.

    I now deletet the folder and restarted. I only looked at wit notepad. nothing changed and I did not save.
    Basicaly I run with the default settings

    this is what the .jar creates http://pastebin.com/Ev53H4s0
     
  16. Offline

    Nate Wiebe

    Decimal shouldn't be an issue. I think it has something to do with your locale. What is your language/region set to?
     
  17. Sweden and swedish, runing curently on a windows 7 ultimate machine
     
  18. Offline

    Nate Wiebe

    I'm almost positive it is because you use a comma as a decimal point. I am using decimals for this plugin without an issue. If you look at the original error, the crash is because of the string which has a comma for a decimal point.

    One thing to try is to have the max and min numbers as the same number. This may skip the decimal altogether. If that doesn't work, the only alternative is to change your language to one that uses a period as the decimal place. (Such as English)
     
  19. Changing location worked.
    Thats not a good design!

    But my nephews are going to love this!
    Thanks for the help Nate
     
  20. Offline

    sharkale

    thanks a lot.
     
  21. Offline

    Systrafoss

    I made the min en max values the same and now it works. Thanks! Awesome plugin <3
     
  22. Offline

    Deikkan

    Do the mobs drop (X) or (X.XX) amount of coins? The reason I'm saying is I'd much prefer to keep the amount of money people have out of the decimals. If they do drop a decimal amount, could there be an option (which can be enabled) to floor the values to the nearest int, and thus everyone having a nice round amount of coins.
     
  23. Offline

    darkwarriors

    Code:
    2011-03-04 16:01:49 [SEVERE] Could not pass event ENTITY_DAMAGED to CookieMonster
    2011-03-04 16:20:00 [SEVERE] Could not pass event ENTITY_DAMAGED to CookieMonster
    java.lang.NumberFormatException: For input string: "1,13"
            at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
            at java.lang.Double.parseDouble(Double.java:510)
            at com.pi.coelho.CookieMonster.entity.cmRewardHandler.GivePlayerCoinReward(cmRewardHandler.java:27)
            at com.pi.coelho.CookieMonster.entity.cmRewardHandler.GivePlayerReward(cmRewardHandler.java:21)
            at com.pi.coelho.CookieMonster.entity.cmEntityListener.doMonsterDeath(cmEntityListener.java:64)
            at com.pi.coelho.CookieMonster.entity.cmEntityListener.onEntityDamage(cmEntityListener.java:41)
            at org.bukkit.plugin.java.JavaPluginLoader$39.execute(JavaPluginLoader.java:329)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:439)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:752)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    
    how to fix it?

    thre arent decimal in my config file
     
  24. Change regional settings in you OS to United Kingdom or use the same values for max an min is a workaround.
    The code is failing on Scandinavian regional settings.

    Read Natans earlier post.
     
  25. Offline

    darkwarriors

    mine is dedicated server with more then one game.. i cant change regional settings.. what do you mean with "use the same values for max an min is a workaround"
     
  26. As an example, I use 2 on both max and min

    Skeleton:
    Drops: ''
    Coin_Minimum: 2
    Coin_Maximum: 2
     
  27. Offline

    ShadowDrakken

    @Coelho
    in order to fix the number format to work with various regional settings, you need to do an easy type conversion, pseudocode below
    Code:
    try {
      double d = Double.valueOf(CurrencyMin.trim()).doubleValue();
      CurrenyMin = d;
    } catch (NumberFormatException nfe) {
      System.out.println("NumberFormatException: " + nfe.getMessage());
      CurrenyMin = 0;
    }
    by using valueOf().doubleValue() in this way, it should accommodate regional settings that use commas instead of decimal points
     
  28. Offline

    dieprogamer

    Can anyone help me? I have download CraftBukkit today, but no Plugin work! what is my misstake??? I have put all files i get into the plugins file! When I write in the chat /plugins, there are all names of the plugins, but I donĀ“t get money or anyother item then the normal items(wool by the sheep, bones from the skeleton...)
     
  29. Offline

    RomaClanServer

    Is there a way to make sure that people don't use camp spawners? I have seen a plugin with the capability of not letting people kill things that were spawned under a roof. Is this possible with this plugin or will it be?
     

Share This Page