[Request] Super Good Idea for a competition based plugin. (like king of the hill)

Discussion in 'Archived: Plugin Requests' started by Mstabarrie, May 11, 2012.

  1. Offline

    Mstabarrie

    Suggested Name: King

    A bit about me: I own my own server... Just like everyone else who makes plugin requests LOL. I got this idea right before I fell asleep, then stayed awake for hours planning it, to make it easy to understand and such.

    Plugin Summary:
    All players compete to become the "king" determined by who has the most gold in their inventory. The current king will gain all positive potion effects and other configurable bonuses such as hourly cash/item bonuses. Everytime another player rises above another players balance of gold a broadcast will occur saying who has become the new king and who lost king. This will have players competing for the top spot while being careful not to die, losing all of their gold to another player.​

    What I want: A plugin where whoever has the most gold ingot's in their inventory will become the "king." You can also use a command to find out which player has how much gold and which place they are in. This list will only show players who have at least 1 gold ingot.

    When a specific player has the most gold in his inventory he will gain a " power up" where he has all positive potion effects. The player could also gain monetary/item bonuses at configured time intervals. The plugin would also have a broadcast that would occur everytime a new player is "king." A command (could be in the list command) would also identify the duration of time the current king has been king.

    The "checker" is up to you to decide on how it will check the gold ingots in the inventory. I have to ideas of how this could be done. The first way is for the plugin to check every online players inventory every 30 minuets or so for the amount of gold ingots. This would keep in mind the amount the offline players had when they logged off.
    Each check the numbers will be updated to the list of who is in lead and who has how many. In case of a tie the old king will remain in place until someone is found to be leading. The second way I have thought about is to have the plugin take count of every ingot entering or leaving: pick-up/smelt/crafting table/buying/rewarding/chest/dropping/death/given.

    If the king is killed by another player then all of his gold will drop and another king will take his place. If any player is to die not by a player attack then they should keep their gold but lose everything else.

    Note: Ops will automatically be withdrawn from this competition. Players will also maintain their gold upon the /kill command.

    Ideas for commands and permissions:
    /king (shows king and duration)
    /king list (shows how much gold players have)
    king.ban [person can't compete in king competition] (for mods or abusive players)

    When I'd like it by: Anyday. Quality not Speed

    Optional Additions:
    An operation which changes the players title/prefix or adds a title to their prefix that says [KING] and then will return to their previous prefix after being demoted. (I use PEX)

    I want this plugin: I will donate 70 dollars to a version that is completely done to my specifications and I am very satisfied. I will donate 40 dollars if the plugin is done using money instead of cash. I will donate 10 dollars if this is created okay, with some features missing. If you create this plugin for me, I would hire you for my server to do a few smaller plugins for a donation per plugin.

    How this plugin will work for me personally: I would like remove all gold from my world so the only way to get it is by purchasing it or voting for the server. The price would be quite high, and voting would get 1 gold ingot per day. This way people's inv would not be full of gold since it would be so rare. I really like this idea for my server, but if it is way to hard to get a "checking" system working for an inventory, money could suffice instead of gold ingots. I would be fine if you the dev first added a money version first then implemented an item version later.

    Dev's who might be interested: @TnT @ChrizC @codename_B
     
  2. Offline

    gorbb

    I reckon I might be able to take this up, if you like. I'm not too sure about removing all of the gold from the world, that would require a map editor, or a lot of work for a plugin, which may end up in a server crash - or two (or three)

    What I could do though, is just not let players mine gold, maybe give them a couple of iron or something instead when they mine gold. What do you think of that?
     
    Mstabarrie likes this.
  3. Offline

    Mstabarrie

    I appreciate you considering this plugin, but I would prefer it to be almost identical to the specifications, either using money or gold. As for the map editing I am doing that myself and know completely how to do it.
    Thanks :)
    Matt.
     
  4. Offline

    gorbb

    Right, I've had a quick throw together, and I'm testing a few of your ideas at the moment. How would you like it to display the top "king"? Should it be a list of just online players, or all players on the server? Or both? (Excluding the users with the "King.mod" node, of course) :)
     
    Mstabarrie likes this.
  5. Offline

    Mstabarrie



    My origonal idea was for it to list all players in the competiton. Here is maybe like a general idea of what I imagined.
    -------------[King]------------------
    Current King:gorbb
    Time as King:0d4h39s
    Amount of Gold: 6
    -----------[Page 1/2]----------------
    Players Online 2
    gorbb:6 Gold
    mstabarrie:2 Gold
    Thor: 1 Gold
    BroDude: 1 Gold
     
  6. Offline

    gorbb

    Sure, I could try that. Maybe I could put "(online)" in front of the name, or something?
     
    Mstabarrie likes this.
  7. Offline

    Mstabarrie

    Yes the online thing would work! Question though, would you be implementing this as cash or gold? If you are doing it as gold, do you know if a "checker" would work?
     
  8. Offline

    gorbb

    I've implemented it with gold, at the moment. It checks the inventory, and counts the gold ingots that are in there,(Just Gold ingots at the moment, not gold ore, or gold blocks - unless you want them to) and sees who has the most, then will save how many gold bars each player has.
    What I think will happen, is it can check players' inv whenever they are killed by another player, and every 30 minutes, or so.
     
    Mstabarrie likes this.
  9. Offline

    Mstabarrie

    Perfect! And I do not care for any other block types, if you decide to release it publicly (which I imagine you will) you might want to have a config where it can check for differnt id's. Another time to check would be when a player leaves game, so that the checker doesn't have a uncorrect value when players are offline.
     
  10. Offline

    gorbb

    Will do. I'll let you know on any progress I make, and feel free to just reply here if you think of anything else. :)
     
    Mstabarrie likes this.
  11. Offline

    gorbb

    Right. So far, I have the leaderboard working, as well as the checking players' inv on a time limit. (currently 8 seconds, but only for testing, I'll probably have it set to 30 minutes. :)). Currently, only online players are checked, and offline players will be forgotten about on a reload, until I have added a bit of code to make it save the leaderboard.
    I have yet to stop it from dropping Gold when the player dies, but that shouldn't take too long.
    For the leaderboard, I think it'll be easier if there's a separate command for that, like "/king lead" to show page 1, or "/king lead x", where x is any whole positive number.
    I understand from what you have written above that you are using PermissionsEX, please correct me if I'm wrong, I'd assume the latest version, but it shouldn't make too much of a difference.
    Update: Prefix's now work, but I'm not sure if it will keep old prefixes or not.
     
  12. Offline

    Mstabarrie

    -The checker can be set to a really small time limit if you want, but only if it doesn't cause a ridiculous amount of memory usage. 1 minuet or even in the seconds would work, just let me know how much memor it uses.
    -As for the leaderboard, i'm not quite sure what you mean. What I pictured was like the factions power list. It has a list of all the factions and their power. So you could type "/king list 1" for page 1, "king list 2" for page 2, and so on.
    -For the PermissionsEx I am using the latest version. It could either add a title like [King][VIP]mstabarrie: or it could replace the prefix like [King]mstabarrie: and then it would retrurn upon death. So for this it could probably just run the Pex demote than promote command while remebering the old prefix then again demote and promote after losing king. If you could do this.
     
  13. Offline

    gorbb

    Sorry, I didn't explain about the leaderboard properly. Let me give an example, typing "/king lead" would return:
    -----------[Page 1/2]-------------
    gorbb: 7
    mstabarrie: 7
    a_player: 6
    silly_one: 5
    another: 3
    this_one: 3

    "/king lead 2" would return:
    -----------[Page 2/2]-------------
    jim_here: 2
    almert: 2
    icreep: 1


    I probably could promote players, but that seems a bit like a messy work-around. But if it works, then it may be ok, for a short while, until I get the other way to work.
     
  14. Offline

    Mstabarrie

    Yes the king pages look good like that!
    What is the other way you can promote users?
    Also I've been thinking of ways to make the king more awesome, my question: is there an event for a potion breaking where you see the colors pour out? If so I think it might look cool if like the king could jump maybe 2 blocks higher than normal and spin jumping and landing a potion effect would happen so it looks epic. Would this be possible?
     
  15. Offline

    gorbb

    I wouldn't promote them as such, I would add the "[King]" prefix to the prefix that they may already have. I would then delete that part from their prefix when they are no longer King.


    I can give the player a jumping potion effect, but it would seem that they might take some fall damage when they land. As for spin jumping, I don't think I would be able to do that, and I might be able to use the potion effect when they land, but I'll let you know on that.
    It is a nice idea though.
     
  16. Offline

    Mstabarrie

    For the prefix portion, would I be able to set extra permissions when people are king?
    Then for the jumping im not sure what I ment when I said spin jump.. It was probably an auto correct. I just want a potion effect on jump and landing, but is there anyway to take away the damage? Or if the damage is like a heart that doesn't matter to much
     
  17. Offline

    gorbb

    Possibly. If you want something like just a few permission nodes that none of the groups have, I could just add them to the player and take them away again when they loose king.

    If you did want different permissions for the King though, it would probably be easier to use groups and have the player automatically promoted. You could then set a pre-defined prefix, which would be easier, as PEX would actually show up with the prefix.

    The only problem that might occur with promoting and demoting players that gain and loose King status is that, if you have a player in the VIP group, and a player in the Members group, they will end up either gaining, or loosing permissions (unless they can be included in two groups?) and have just the permissions that is assigned to the King group.

    Yeah, the damage is about half a heart, or a heart.. (Of course, more if they jump off something)
    It's probably like that because the potion for extra jumping hasn't been properly added yet, but the code is just there to manipulate. I have a feeling it might disappear once the jumping potion has been added.
    I'm not gunna lie, a spin jump would be a brilliant addition, but I'm not too sure if it's able to be done, though. :)
     
  18. Offline

    Mstabarrie

    I think for now it would just be a few permissions added, maybe like access to a few more warps, I can't quite think of any examples right now, but in the future I feel it would be useful.

    As for removing permissions, I wouldn't immediately use this feature, but maybe since the king is so powerful it might be able to limit his commands or something. But for now it is not needed.

    I am probably a novice at permissions, I really really want to know how to give people two permission groups like [VIP][ARCHER]mstabarrie: but I have no Idea how to add two prefixes with two permission groups, maybe you would know how to do this and possibly tell me how?

    I think that a half or whole heart would not be too bad, so that is okay.

    I'm not sure if you have played Call of Duty and seen people who mod and have major automatic guns. Would it be possible to make this kind of effect so when a bow is fully charged it will automatically fire like 4 arrows per second until you un charge it?
     
  19. Offline

    gorbb

    For the prefix, I would get the original prefix, and add on "[King]" onto it.

    As for two groups, I have not got a clue. I doubt it is possible, but it might be.

    Maybe, I can see how it would be done. (I think :)) I would need to have a look at it though, and find out. If I couldn't, would an enchantment effect do on the item, either a powerful one that is removed, or maybe a weak one that stays. The one that stays would be easier at first, then adding the more powerful one that gets removed later.
     
  20. Offline

    Mstabarrie

    Hopefully this isn't a problem... Since I have multiple groups such as donators and rank, would it still work?

    Would you be able to add fully enchanted gold armour that goes directly into the armour slots and a fully enchanted gold sword, but that has unlimited durablity until the king loses power. Then if possible, it could change back to the old armour the person had, if this is not possible then it would go to protection 2 diamodn armour. If both of those arent possible he could go to gold armour that is very damaged. Just let me know what is possible and not about these. As for the arrow, it could either be a strongly enchanted one or preferbally the one that fires fast.

    I appologize for all of the requests, I just want to make the king very powerful and have a seamless transition (or almost seamless) transition back to normal. This should be the last of my proposed additions to the king. Thanks for your help!
     
  21. Offline

    Mstabarrie

    gorbb How is the plugin coming?
     
  22. Offline

    gorbb

    It's coming on quite well, at the moment. I probably could save the armour slots that the king had, and then revert them.

    I would be finished within the next week, but this next week is full of exams for me, so I would say that it should take me around two weeks to get an initial version up and running, and then after an hour or two of bug testing, I think it would be ready. :) Unless I find a bug, that is.
     
  23. Offline

    Mstabarrie

    Okay wonderful!!

    I dediced to make a list of features I requested so they are all in one place.
    Features:
    • The players armour changes to Fully Enchanted unlimited durability Gold Armour and then reverts back to the armour he had previously after he loses kingmanship
    • The player gets a bow that when fully charged fires arrows fully automatically at a faster then normal pace. The bow is also fully enchanted.
    • The player gets a fully enchanted gold sword with unilmited durabillity.
    • When the player jumps as king they jump approx. 2 blocks higher than normal. When they jump into the air and apon landing a potion splash effect occurs under their feet at ground level to make for a cool jumping effect.
    • When the player is king they have all positive potion effects at their aid.
    • They could gain per-minuet bonus's such as $100 cash every minuet or 1 level of xp every 30 minuets
    • (Possible New Feature) A Gold block break effect following the player? So it looks like they have some kind of gold powder falling off of them.
    • Player is promoted to [King] and possibly in a later version it will be possible to add permissions to the king via PermissionsEx
     
  24. Offline

    Mstabarrie

    gorbb Another progress update?
     
  25. Offline

    gorbb

    It's a little slower than I expected, but what should I expect after not doing it for a week. It may take a little longer to complete than I first thought, but I can now devote most (if not, all) f my time to doing this.
    I don't think I'd be able to make the bow shoot arrows faster, though - and my main concern is, if they did, it may cause higher lag spikes on the server.
     
  26. Offline

    Mr_Unreal

    Mstabarrie pm me an IM contact on you :)
     
  27. Offline

    Mstabarrie

    Mr_Unreal I have Skype, my name is mstabarrie why?
     
  28. Offline

    gorbb

    My progress so far:
    • Armour, bow and sword are done, and fully enchanted. The armour will be reverted back to the original armour when the he loses his reign. Also has unlimited durability.
    • I don't know if I can make the bow fire faster, but I could possibly make the bow fire more arrows at once, how does that sound?
    • The player has a jump potion effect on them, set to let them jump 2 blocks high, and I'm currently working on the splash potion effect when they land.
    • For the bonuses, what exactly were you thinking of having? I have currently got it set only to give the player 100 money (but you will need vault for the economy stuff, at the moment - I'm working on having it as a stand-alone)
      I also have it set to every five minutes, but that would be configurable.
    • I can't figure out if I can make the block break effect follow the player, I've had a try at it, and it would break the block that was there - not useful for protected regions, I'm sure you could imagine.
    • I haven't as of yet promoted the player to the King group, I simply added the "[King]" prefix to the prefix(es) they may already have, and it might be more simple than saving the old group, then promoting and demoting - my reason being that there is only going to be one person in the group at a time, so it would be easier to add the permission node(s) to the player instead of a group.
    Edit: The armour, sword, bow and arrow are not dropped when they die, along with the gold, which gets put aback into their inventory on respawn.
     
  29. Offline

    kezz101

    You should add the option to change there skin to a king one with spout :)
     
  30. Offline

    gorbb

    I personally have no experience with spout, but I might have a look at it, in a later version.
     

Share This Page