[REQ] Automatic rank-up (money dependent)

Discussion in 'Archived: Plugin Requests' started by KKLD, Jul 7, 2011.

  1. Offline

    KKLD

    Hello Bukkit :)

    I run a server, where people can sell their resources to a shop, and when the have enough money, they can buy new ranks, to get more permissions on the server.

    My server grew bigger, and now it's annoying to rank people up. So if someone have time to make this plugin:

    A configuration file (How many money you need for the rank + rank name)
    Automatic rank-up
    iConomy support
    Groupmanager or Permissions support
    I should also be able to give thieves a fine, and then they will rank down ( depending on their money)

    I hope you understand what I mean :) Otherwise fell free to ask!

    Thanks in advance,

    KKLD
     
  2. Offline

    KKLD

    I'm new to bukkit forums.

    How often is it allowed to bump a thread? :)
     
  3. Offline

    Celeo

    I can take a look at this for you.

    How many ranks do you want?
    Do you know what the names are going to be?
    > If you already know how many and what their names are going to be, this plugin will be very simple. If you want the number of ranks and their names to be configurable, it'll take me a bit longer.
     
    KKLD likes this.
  4. Offline

    KKLD

    Hello Celeo,

    There's currently 9 different ranks (Without Admin/Mod) But I'm regularly adding new ranks to the server, like Event Master, Shop Owner, Shop Assistant. I'm not quite sure about how much longer it'll take, if it should be configurable. If it is configurable, more people could use this plugin :) I prefer the configurable one, so you can always adjust prices.

    When you rank up or down, I would like it to happen like this:

    Rank 0: Price 0
    Rank 1: Price 100
    Rank 2: Price 200
    Rank 3: Price 300

    Celeo has 50 money, he gains 50 money more, and will get a message about that he ranked up.
    Celeo earns 100 money, and ranks up to Rank 2.
    Celeo gets a fine of 200, and will get notified about his rank. He now got 0 money, and is Rank 0

    I hope you know want I mean, and is exactly sure about what I mean :) Otherwise please give me a question.

    Thank you :)
     
  5. Offline

    Celeo

    Sounds good; thanks for clarifying. :)
     
    KKLD likes this.
  6. Offline

    Celeo

    Well, I've run into a bump. iConomy doesn't fire an event when a user gains more money, so I would have to check their amount when they do something else. Either 1) Checking their money on login and logout, 2) Updating everyones' money ranks on a command, or 3) Checking everyones' money on a set, repeating timer.
     
    KKLD likes this.
  7. Offline

    19jojo93

    I think either login/logout or repeating timer would work well.

    Read through this topic and if this was created I would tooootally use it on my server!
     
  8. Offline

    KKLD

    I think that a login/logout would be easiest/best, because it will only create some lag when people join/rejoin, and when people have enough money, they could simple rejoin, instead of waiting, and checking all players.

    Thank you for developing this! I'd greatly appreciate your help.

    Edit: Also, an update command would also be nice to have, not a must.

    I have to go on a long vacation, so I send this link to my semi-admin.

    Thank you so much for developing this :)

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

    Celeo

    I will implement both. :)

    My pleasure. Enjoy your vacation!
     
    KKLD likes this.
  10. Offline

    Celeo

    So I found this plugin in my IDE, unfinished, and I remember that I am working on it for you. :O

    Anyways, I put a lot of work into it today and it is almost finished. If you are back from vacation, I hope that it was nice! This plugin should be done very soon.

    Done:
    • Move from a Rank object to simpler HashMaps
    • Implement saving
    • Implement loading
    Todo:
    • Create method for loading players into the appropriate ranks. ETA: < 30 minutes
     
    KKLD likes this.
  11. Offline

    KKLD

    Thank you so much for your hard work. I'll come home the day after tomorrow.
    As of build 1000 of Craftbukkit, isn't there included an inbuilt permission system? If so, it would work with CB 1000's permission system right? :)
     
  12. Offline

    Celeo

    1. You're welcome.
    2. Yes there is.
    3. I still haven't looked at it in depth, but I will certainly try.
     
    KKLD likes this.
  13. Offline

    Moe041991

    cant wait for this plugin :).

    Is there any chance for a configurable version of this?
    The core of my server is making money. So this would be awesome for me.
     
  14. Offline

    Celeo

    All the ranks (their values and names) are customizable.
     
    KKLD and Moe041991 like this.
  15. Offline

    Moe041991

    @Celeo
    when will you release it? :)
     
  16. Offline

    Celeo

    @Moe041991
    Well, I suppose the smart-mouth answer would be "When it's done," but I don't wish to be rude so I'll say "soon". I find that programming is a lot of abstract thinking and if I have a mental block, like the one I have now, I cannot think in the way that I program, which yields an inability to complete a project.

    AKA I need to sleep more.

    But yes, it should be done very soon. The only thing that I still need to do is write the code for sorting players into their respective ranks. The code is fairly simple but is not working. I prefer errors over plain "not working" because then I have to diagnose every line.
     
    KKLD and Moe041991 like this.
  17. Offline

    KKLD

    I just liked all your comments because you're developing this awesome plugin!
     
  18. Offline

    cholo71796

  19. Offline

    Celeo

  20. Offline

    cholo71796

    I'm not sure what the difference is there. Care to elaborate?
     
  21. Offline

    Celeo

    Sure. The other plugin (as far as I can tell) is used to buy Permission ranks which would grant players access to more features normally blocked by Permission checks. I.e. a player could purchase the right to use commands to change the weather or to spawn items. That plugin uses ranks as a way of delineating permission nodes for players.

    This plugin does not deal with that. Player's ranks (that are based on their iConomy balance) will not effect their gameplay, only their bragging rights.
     
  22. Offline

    cholo71796

    @Celeo
    Sounds like promotion of epeenery. Anyway, iConomy already has a leaderboard.
     
  23. Offline

    Celeo

    *Shrug* I just make the plugins, it is up to others how they wish to use them.

    I finally found and fixed some of the errors that I was getting. Silly programmer was mixing up his HashMaps!

    Anyways, this is a development release of the plugin.

    Commands:
    • /moneyranks or /mr to show your rank
    Configuration:
    • All configuration must be done by the config file currently. Just put the jar into your plugins file and refresh the server and it will generate one.
    • Clear whatever is in the config file and type "ranks: " just like that.
      • To set the ranks, add "[money value],[rank name];[money value],[rank name]"
      • You'll notice that the money value and the rank name are separated by a comma, while separate ranks a separated by a semicolon. Do not add spaces unless the space is inside a rank name (i.e. "super boss").
      • Makes the changes while your server is OFF. I will add a reload command soon.
    A sample configuration would be this:

    ranks: 0,Noob;100,Getting there;200,Someone;500,Like a Boss​

    Download: http://dl.dropbox.com/u/11962432/MoneyRanks.jar
    Version: 0.7

    A full release will be very soon. =)

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

    KKLD

    I was without internet this weekend :(

    Trying it now! Thank you so much.
     
  25. Offline

    KKLD

    I found a bug. When a new player joins, who haven't been granted a rank before, the player does not get the rank? I'm using the newest version of GroupManager.
     

Share This Page