Regenerating Mining Minigame

Discussion in 'Archived: Plugin Requests' started by kiligir, Aug 11, 2012.

  1. Offline

    kiligir

    Plugin category: Fun

    Suggested name: RegeniMine

    What I want: I was playing on a Jail server the other day and really liked mining in a pit that regenerated. It had nothing but soulsand, though. What I'd like is a plugin that would work with WorldEdit's axe of awesome (wand) to define a cuboid region that would regenerate and randomize the region every so often.

    The idea would be to have the region regenerate blocks based on percentages. Say I had a 10x10x10 cube. I could select that cube and go /rm create. It would read from a config that would look something like this:

    Code:
    reset: 1m
    stone: 0.96
    ironore: 0.03
    diamondore: 0.01
    So in that cube, there'd be 96 stone, 3 iron ore, and 1 diamond ore. It would reset every 1 minute, randomizing the configuration of the blocks and warping players out of the area so they didn't die a horrible death.

    I know that WorldEdit can already do the insertion of random ores via a command. I would assume this plugin could use that code, but then again I'm in the request forum so that shows what I know about Java.

    I'd appreciate this greatly, and I think it'd add a fun thing to the game. I would be using other mods to charge access to this area. I suppose the timer would need to be echoed to chat every X seconds and the event would need to start when the player pressed a button or got in the area or something. The button would be easier, as I could just use ButtonWarp to send the player in as well.

    Ideas for commands:

    /rm create
    Would tell the plugin that the WorldEdit-wand-selected cuboid was the one that the plugin should randomize.

    /rm setwarp
    Would set the warp point for the event that kicks you out at the end of the timer.​

    I could think of some others, but I have a really specific idea for how to use this and don't care to edit a config. If interest is high enough, this could be expanded a bit more.

    Ideas for permissions:

    regenimine.use
    Would let you use the commands.​

    When I'd like it by: The sooner the better, but I'm fine for disscussion first. :)

    I was able to do this using WorldEdit, WorldGuard, and the amazing ServerSigns. With all three installed:
    1. Make a large room out of bedrock.
    2. Select the interior of that room up to two or three blocks below the ceiling and use /region define <yourregionhere>.
    3. Set the passthrough flag so they can mine using /region flag <yourregionhere> passthrough allow.
    4. Go to the area you want users to teleport into at and call /region flag <yourregionhere> teleport here.
    5. Define another region somewhere, at least 2x2x2, that's going to house the sign and a spot for you to teleport back to when you're done mining by selecting the region and using /region define <yourotherregionhere>.
    6. Go to the area you want users to teleport back to at and call /region flag <yourotherregionhere> teleport here.
    7. (Maybe not needed) Set the 'use' flag to allow using /region flag <yourotherregionhere> use allow. This lets users actually use the sign, but not modify anything else.
    8. Sign set up is simple. Determine a length you want users to be in the mine and determine the makeup of the cube. My makeup looked like this:
      Code:
      0.1%  Diamond Ore
      0.1%  Emerald Ore (item id 129)
      1%    Gold Ore
      2%    Iron Ore
      2%    Glowstone
      94.8% Stone
    9. I used the names when available, but because of Minecraft's chat character limit, you could use the item id of the block instead. You can find a great list at this link: http://www.minecraftwiki.net/wiki/Data_Values
    10. Depending on your length, you'll have to do the messages a little differently. I did three minutes for my large-ish cube. You'll have to play with it. Look at the sign, and issue this list of commands, remembering to right click the sign after each one:
      Code:
      /svs add [p:worldguard.*] /region select <yourregionhere>
      /svs setprice <your price>
      /svs add [p:worldedit.*] //set 0.1%diamondore,0.1%129,1%goldore,2%ironore,2%glowstone,94.8%stone
      /svs add [p:worldguard.*] /region teleport <yourregionhere>
      /svs add <message> You have three minutes to grab what you can. Happy mining!
      /svs add [d:60] <message> You have two minutes left!
      /svs add [d:120] <message> You have one minute left!
      /svs add [d:170] <message> You have ten seconds left!
      /svs add [d:180] <message> Hope you were lucky, please play again!
      /svs add [p:worldguard.*] [d:180] /region teleport minecubeent
      
    11. Finally, issue the command /svs globalcooldown 180 to set the global cooldown on the sign to three minutes. Obviously you'll need to change the time depending on how long you chose. This keeps other players from regenerating (and suffocating) a mine while a player is inside of it.
    That's it! So, I don't need this plugin after all, but hopefully this post will help some people put this cool feature onto their server (and help me remember how to do it in the future. If there's a better place for a post like this, split it and move it if you want.

    Happy mining!

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

    np98765

    Those three plugins do wonders together. :3 I've had an Admin set up bank vault claiming with those three, too. :)
     
  3. Offline

    Jack423

    I want to make it so that it loops and people dont have to pay to reset the mine?
     

Share This Page