HungerGames
#1
A hunger games plugin for Cuberite.

You are able to create multiple different arenas in different worlds. People can join those arenas and battle each other.
The players search for chests where they can find loot. They need it so for survival. Eventualy only one player is left and he'll be the winner.


Setting up an arena
Assuming the server owner/admin already has a map.

1) Create the arena

To create an arena you use "/hg create [ArenaName]".
The coordinates where you stand will be the coordinates for the lobby. When a player joins or dies in an arena he will be teleported there.

2) Setting the bounding box

Then you need to set the bounding box of the arena.
All the chests within this bounding box will be refilled once the arena starts so it is needed. You set it using "/hg bb (point|1,2)".
So basicly point 1 is on one side of the arena and point 2 on the opposite.

3) Adding spawnpoints

Then you have to add spawnpoints. You add them by using "/hg add"
When an arena starts all the players will be sent to a different spawnpoint.

And there you have it. Your own HungerGames arena.


Configuring HungerGames
First open the "Config.cfg" file.

I think the variables CountDownTime, NoDamageTime, PreventMonsterSpawn and PreventAnimalSpawn speak for themselves, but just to be sure:
CountDownTime: The time a player can't move and do anything when an arena starts.
NoDamageTime: The amount of time a player can't take any damage from another player
ArenaStartCountdown: The countdown time an arena has before starting. The arena automaticly starts if all the spawnpoints are full.
PreventMonsterSpawn: If set to true then monsters (zombies, skeletons creepers etc) can't spawn inside the bounding box of an arena.
PreventAnimalSpawn: Same as PreventMonsterSpawn but then for animals (pigs, cows, chicken etc).

The hardest part is configuring the loot what a chest can have, but once you know it it's really easy.
To add an item to the list of available loot you go to ChestContent and add this behind it:


{
	ItemType = ItemID,
	ItemMeta = ItemMeta,
	Chance = Chance,
	Enchantment = "enchantmentname",
},


ItemType: The itemid you want to have for example 267 for a diamond sword.
ItemMeta: The meta you want to give the item.
Enchantment: You don't have to put this in, but if you want an enchantment you simply give the name of the enchantment with an equal symbol and the level. For example: "sharpness=2" If you want multiple enchantments you use a ";" between the enchantments.
Chance: This is important. -- IF this item gets chosen then the server chooses a random number between 1 and the given number and if it's 1 this item gets put in the chest. The problem with this is the more items you have available the less chance this item gets chosen.

Also don't forget the comma. You have to place them at the exact spot as where they are in this example.


Commands

General
  • /hg add - Adds a spawnpoint for the selected arena.
    Permission required: hungergames.add

    /hg create - Creates an new arena.
    Permission required: hungergames.create
    The following parameter combinations are recognized:
    /hg create ArenaName - The name of the arena you would like to create.

    /hg join - Join an arena
    Permission required: hungergames.join
    The following parameter combinations are recognized:
    /hg join ArenaName - The name of the arena.

    /hg leave - Leave an arena
    Permission required: hungergames.leave

    /hg select - Used to select an arena. In the selected arena you can add spawnpoints.
    Permission required: hungergames.select
    The following parameter combinations are recognized:
    /hg select ArenaName - The name of the arena you would like to select.

    /hg setboundingbox - Sets the size of the arena. All the chests inside will be filled.
    Permission required: hungergames.setsize
    The following parameter combinations are recognized:
    /hg setboundingbox 1 - Set point 1
    /hg setboundingbox 2 - Set point 2


Permissions
  • - hungergames.add -
    • Commands affected:
      - /hg add
    - hungergames.create -
    • Commands affected:
      - /hg create
    - hungergames.join -
    • Commands affected:
      - /hg join
    - hungergames.leave -
    • Commands affected:
      - /hg leave
    - hungergames.select -
    • Commands affected:
      - /hg select
    - hungergames.setsize -
    • Commands affected:
      - /hg setboundingbox
Source: Link
Download: Link
Reply
Thanks given by:
#2
Any chance of using the named constants or items.ini strings for the item types? "diamondsword" or E_ITEM_DIAMOND_SWORD is much better than 267.
Reply
Thanks given by:
#3
Done. You can now use a string or the item type.
Reply
Thanks given by:
#4
Thanks! Stuff like this will attract more people to MCServer! Hopefully we can get more people to help with MCServer.
Reply
Thanks given by:
#5
You might want to consider changing how the Chance is used, similar to how the weights for Enchantments or for Prefabs are calculated in MCS. First all the "weights" are summed together, then a random number in range [0, Sum) is chosen. Then each item in the list is iterated and its weight subtracted from the random number. When the subtraction first becomes negative, that item is chosen.
This system is quite easy to grasp and easy to code, too. Say, you have Item1 with weight of 20, and Item2 with weight 1. Quite naturally you would expect that out of 210 generates items, approximately 200 will be Item1 and 10 will be Item2.
I have some mental trouble analyzing your system, how the chances work - if I want that 20:1 ratio, how do I set the chances?
Reply
Thanks given by:
#6
Hey,

As i noticed, you can have items be enchanted, does the enchantment actually do anything ?
As far as i can recall, even if you have protection on armor it does nothing, is this correct ?
Reply
Thanks given by:
#7
No the enchantments don't do anything, but I don't think it should be too hard to implement. I have an idea on how it could be implemented easily. I might post that idea here soon.
Reply
Thanks given by:
#8
You may also want to make this compatible with WorldEdit. In Bukkit, you use WorldEdit and the wand command from it. You then set the positions of where the items in the chests can spawn with the wand.

If you need more detail, just look up a video on YouTube. Look up Hunger Games bukkit plugin. They use the wand in WorldEdit to set the positions of where items can spawn in chests.

EDIT: Also, the last thing to add would be deathmatch. That would be the last important thing to add! As soon as I finish my server, I will make a tutorial on how to make a public server with MCServer! Thanks!
Reply
Thanks given by:
#9
Could u add a Feature, that i can add other player manually per command or world join?
And an observer mode?
Reply
Thanks given by:
#10
(04-21-2014, 08:21 PM)LO1ZB Wrote: Could u add a Feature, that i can add other player manually per command or world join?

Per command should be possible, but when a player joins how can I say in what arena he should join?
Reply
Thanks given by:




Users browsing this thread: 4 Guest(s)