[INACTIVE][FUN] Fight v1.1.4 - Arena Type Battles [740]

Discussion in 'Inactive/Unsupported Plugins' started by Deminetix, May 5, 2011.

  1. Offline

    Deminetix

    Fight - Arena Type Battles
    version 1.1.4 | Download | Source | Requires Permissions
    Features
    • PVP Arena style!
    • Two Teams (Red and Blue)
    • Customisable classes
    • Easy to set up
    • Almost commandless (one to join, one to watch)
    • Permissions support
    • iConomy(v5+) and item rewards support
    Arena Setup Suggestion



    How to use
    1. Type /Fight and you will automatically be chosen a team (Red or Blue) and teleported to that team lounge.

    2. Punch a sign with the class you want to be, your name will be added to an available slot on the sign and the class items will appear in your inventory.

    3. Punch it again to remove your name (and the items) if you want to choose a different class

    4. Once your team is ready (Everyone has picked a class) punch the Iron Block, when both teams are ready you will be teleported inside the arena, BATTLE BEGINS!

    5. Players that die will be teleported to the spectator area to watch the rest of the fight

    6. When only one team is left standing everyone will be teleported out and the winning team announced! They get bragging rights!
    How to set up
    1. Download and put Fight.jar in your plugins directory

    2. Boot your server to generate the config.yml file in plugins/Fight directory

    3. Edit the config.yml file and add your own custom classes and rewards, here is an example:
      Code:
                classes:
                    Ranger:
                        items: 261,262:64,298,299,300,301
                    Tank:
                         items: 272,310,311,312,313
                     Swordsman:
                         items: 276,306,307,308,309
                     Pyro:
                         items: 259,46:2,298,299,300,301
                 rewards:
                     amount: 0
                     entry-fee: 0
                     items: none
                                                            
      - Items must be written: <itemID>:<amount>
      - If no item amount is specified it will be 1
      - Seperate each item with a comma

    4. Add the permissions for users (fight.user) and admins (fight.admin)
      Permissions is REQUIRED

    5. Boot up your server and set the Waypoints by typing /Fight <command> (see commands below)

    6. Create a sign in each lounge for each class you have added.

      - The top line is the name of the class you have in config.yml - typed exactly (eg "Ranger" or "Tank")

      - The second line is unused so i put "------------" to make the class underlined
      - The bottom two lines are used for putting the players name on it.

    7. Each lounge needs an Iron Block. When it is punched and both teams are ready (chosen classes) the fight will begin.

    8. I recommend using WorldGuard or something to protect your arena from being destroyed.

    9. If you want destructible terrain inside the actual arena, you should use WorldEdit's blueprints commands to save and load the finished blueprint after each fight. I may try to incorporate this into Fight in the future.
    Commands
    • Admin Commands

      /Fight redlounge - Sets the Waypoint for the Red team lounge

      /Fight redspawn - Sets the Waypoint in the arena where Red team starts

      /Fight bluelounge - Sets the Waypoint for the Blue team lounge
      /Fight bluespawn - Sets the Waypoint in the arena where Blue team starts

      /Fight spectator - Sets the Waypoint where spectators go, and where players go when they die in the arena.

      /Fight exit - Sets the Waypoint players will go to when they type /Fight leave

    • User Commands

      /Fight - Automatically picks a team and warps you to that lounge
      /Fight watch - Warps your to the spectator area
      /Fight leave - Leaves the team your on, and the fight
    Permissions
    Very simple permissions structure
    • fight.admin - Allows you to set up the Waypoints
    • fight.user - Allows you to Fight!
    To Do Now
    • Not sure!
    Suggestions
    • Destructible terrain that reloads after a Fight finishes
    • Support multiple Arenas
    • Save and Restore inventory before/after a Fight
    • Leaderboards
    • Lives - So you can seek revenge!
    • Manually choose team (with command /Fight <Blue/Red>) (optional to admin)
    Changelog

    • v1.1.4(12th May 2011)
      When player disconnect/logout/crash player is removed from team properly and you can still fight again!
      Players get health refilled after a fight
      Hopefully a lot of bugs are gone with this build.
    • v1.1.3 (11th May 2011)
      When a player disconnect/logout his name is removed from signs
      You can no longer teleport out of a fight using /home or /spawn or anything else
      Entry fees for iConomy users - in config file under the node rewards.entry-fee is now charged to player who join a team
    • v1.1.2 (9th May 2011)
      Parentheses bug with rewards system - Now correctly configures config file on first run (do not use parenthesis)
    • v1.1.1 (9th May 2011)
      Fixed bug where respawned players permanently go to spectator area
      Added an Exit waypoint - Players go here when they type /Fight Leave
    • v1.1.0 (9th May 2011)
      Added iConomy support and item rewards for the winning team
      Fixed all major bugs, no item cheats, no problems with fights
    • v1.0.2 (7th May 2011)
      You can no longer drop items
      Fixed a bug when players used /Fight before setting waypoints

      Inventory now gets cleared properly when a fight finishes
    • v1.0.1 (7th May 2011)
      Fixed a bug with config file
    • v1.0 (6th May 2011)
      Initial Release
     
    frastie, PinkHell, jjoonn222 and 6 others like this.
  2. Offline

    Deminetix

    This is wierd, the function of /fight checks that your inventory slots all contain no items. I can't see how an empty slot can have any other states unless you use a plugin that for some reason made an "empty" slot an AIR material... Please test this on a fresh vanilla server with no other plugins installed or used (only Permissions with the permission nodes set).

    Please post the servere warnings ASAP so i can have a look at it. Thanks

    I am from Australia so i use Jumba (in Melbourne), i have practically no lag because the servers are only an hour drive away from here.

    I have tested 1.1.0 myself on a vanilla bukkit server using the latest Permissions and it works absolutely fine. Does anyone else actually have this up and running on their servers without problems yet?

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

    beatcomet

    No problems here, but I got some problems with the other plugins used to make it easier.

    Here are some of my new ideas :
    - I'm using sing commands as well as iConomy payment system to charge money from the people to watch the arena fights. It will be awsome if you will add entry fee to arena fights (spectators).
    - And add wager support (people will need to pay some money to register to the arena battles.
    - Round system : optional round support will make it much better, after killing your opponent he will come back and seek for revange in the second round. Adding round support will be awsome and make the arena battles even more intersting.
    - Arena manager : Using iConomy every player in the server will be able to create his own arena. To create an arena the player will need to pay a certain amount of money. The player will set the entry fee and start making money of his arena, BUT! the player will have to use his money for prizes for the winners.
    - Arena championship : Elimination based tournament, by having 8 people signed up, a tournament may start. The winner in evety fight will progress towards the next stage. The winner will get the grand prize and be added to the Leader boards as 1st place winner regardless to his amount of points (until the next championship).
    - Tag team battle : Here is the most unique system you can mage, tag team battles. This is basicly the same as the team battle but there will be only 1 player of each team in the arena. When a player dies he will be replaced buy one of his teammates. the winner team will be the one that will eliminate all the opponent team members.
     
  4. Offline

    Deminetix

    What problems are you having?

    I like your ideas, specifically charging entry to fight - This way the price sum of all players can match the rewards of the winning team

    Another wicked idea would be being able to bet on the winning team!

    I think i should create a way to have signs automatically update with who is on each team and who is still alive etc so that spectators have a better overview
     
  5. Offline

    beatcomet

    The problem is not related to your plugin, it's more of the command signs and bshortcut plugins.
    generally im using signs with command written on, when a player interacts with the sign, the sign will automaticly cause the player to execute the written command. The problem is with the payment command of iConomy, the command is too long and I can't write it on the sign, so I tried using bshortcuts to make the command shorter but the command isn't working when i'm using the sign.
     
  6. Offline

    Deminetix

    I haven't used the command sign plugin but I think it should use keys and save the command elsewhere instead of typing the command on the sign. For example you would type /signcommand new "Eat Some Pie" "/eat pie" and then you create a sign that says Eat Some Pie and it will execute the command "/eat pie"
     
  7. Offline

    Astrum

    hello, this plugin looks great but could you add a Free for all mode?
     
  8. Offline

    Deminetix

    Okay guys i've added a new section under Changelog that shows what is already added for the next release, this way you can see what is definately coming before i release it. I'm not sure what i should work on at the moment, so many ideas!
     
  9. Offline

    beatcomet

    It's not working that way, I figured out how to use it now. Just needed to add \ and then write the command, because this way it will make the player say that command instead of just executing it by the Commandsign false username
     
  10. Offline

    Deminetix

    In the future when i add the ability to create custom arenas then i will allow users to choose what kind of mode the arena runs in (team-based, free-for-all, 1-vs-1)
     
  11. Offline

    beatcomet

    When you got a good plugin ideas will keep coming.
     
  12. Offline

    Deminetix

    My idea was a fictional version of how i (as an admin) would want the command sign plugin to work for my users
     
  13. Offline

    ferretlegs

     
  14. Offline

    beatcomet

    Ohh lol,
    So here are some of my new ideas:

    - Multiple spectator spawn points : Sperctotrs need more room, so adding multiple spectator spawn points will make the fights much more exciting and fun.
    - Base rewards : Every player will get a reward based on the result (win or lose).
    - Relative reward : The winner team and the loser team will get bonus reward according to thier amount of kills.
    - Killing spree : After making a leaderboard, adding winning streak counter will be awsome.
    - Stop the killing : After killing the top player in the winning streak board you will get a reward based on the amounts of kills the leader has before you killed him.
    - World wide tournament : This is the ultimate tournament, the admin will create a fency arena and start the big world wide championship. Player will be invited by the admin (8 Players, no more and no less) and fight in the most exciting battles. The winner will get large amount of money for winning and the title of world champion.
    - Hall of fame : The winner in the WWT will join the hall of fame, as one of the greatest fighters in the server.

    That's it :D
    Thanks for reading and have a good day
     
  15. Offline

    Astrum

    Maybe this could be done by making each arena started by a sign eg:

    [Name of arena]​
    [arena]​
    [type - 1v1,teams,duel etc (maybe make this a sign configuable one)]​
    [rewards type/scheme (manualy configuable in a seperate config file)]​

    Then for all arena signs use name of the arena to specify what arena it is used for,(then add team signs, modes, class set up signs,team spawnpoint signs etc) eg:
    [AstrumsArena]
    [Team1]
    []
    []
    Think this idea is any good?
     
  16. Offline

    GmK

    Just one request: Dont overcomplicate it, else you go down the route you yourself said you didnt want to.

    Try to make most new features totally optional. Keep the very basic simplicity in place: One Arena, two teams.

    Thanks for this plugin!
     
  17. Offline

    ferretlegs

    Ok, have had a chance to quickly test this with another player. Only issues I have noticed so far.
    1. After you have died in a fight, the spawn point seems to always be the spectator spawn regardless of what you have set for spawn. For example on our server, it is set that player spawn point is wherever /home is set. After dying, spawn point is always spectator area - even after fight is finished. /home still works but auto spawn at home does not work. Doing a reload of plugins seems to fix this. I suspect this is a clash of some sort with Essentials plugin which controls /sethome /home and default spawn to home settings.
    2. If you are killed in the fight you actually die and have to press the respawn button, is that what is supposed to happen? I just thought your were teleported to spectator after dying rather than respawning i.e. it is a fictional fight.
    3. Swordsman killed opponent with one hit
     
  18. Offline

    Deminetix

    I will fix this right away, that was a simple mistake i forgot to change in my code

    Yes you are supposed to literally die - Although this might be changed in the future depending on how people perceive it

    I haven't put any thought into the classes, they are just examples of items that might be used for classes - They are by no means balanced at all - If someone is good with math and has time to work out a good balance in a few classes then i could use those as the default templates in my plugin

    Fixed a bug where respawning to spectator area becomes permanent - sorry people, just replace Fight.jar with the new Fight.jar

    Edit: Oh and this also has the extra Waypoint "Exit"

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  19. Hi, can you add lives?
    For example every player had a configurable "Lives" value (ex. 3).

    So the game holds a little longer if they are few players in the fight.
     
  20. Offline

    Deminetix

    A few people have mentioned this - I will definately consider it

    Multiple arenas would be awesome, but the amount of overhaul on my code to do this would be massive - And im not planning on changing from two teams either!

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

    ferretlegs

    Can confirm this has worked for me, how cool that you fixed it on the spot. Only prob I have noticed now is that the reward doesnt seem to be adding to your balance in iconomy after a win. Below is what i have set, I understand this to be $200 but our balances are not increasing.

    rewards:
    amount: '200'
    items: ''

    Have also tested this with your latest build.
     
  22. Offline

    Deminetix

    Try remove the parenthesis around 200 - That should do it

    Edit: I fixed it (for next release) so it doesn't actually put the single parentheses in when it creates the default config file
     
  23. Offline

    ferretlegs

    Ok, have done that and that certainly gave the reward. Only prob now is that after that change the fight seems to get stuck on now. After money awarded and one team is nominated champion, the fight doesnt end properly. If you try to start another it says fight still in progress. There is an error log as below

    2011-05-09 08:12:20 [SEVERE] Could not pass event ENTITY_DEATH to Fight
    java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:504)
    at java.lang.Integer.parseInt(Integer.java:527)
    at me.ashconnell.Fight.Fight.giveRewards(Fight.java:543)
    at me.ashconnell.Fight.FightDeathListener.onEntityDeath(FightDeathListener.java:63)
    at org.bukkit.plugin.java.JavaPluginLoader$45.execute(JavaPluginLoader.java:480)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:121)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:393)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:423)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:149)
    at net.minecraft.server.EntityArrow.p_(EntityArrow.java:172)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1007)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:52)
    at net.minecraft.server.World.playerJoinedWorld(World.java:989)
    at net.minecraft.server.World.cleanUp(World.java:966)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:367)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)

    obviously only seems to happen when rewards are active as this didnt happen before.
     
  24. Offline

    Deminetix

    Yeah sorry its the parentheses again, remove them from items: so that it is blank. I didn't think that they would be a problem but they are - very sorry to have you keep mucking around

    New mini update - its optional - all it does it correctly create the config file so that it does not contain parenthesis. So please do not use parenthesis and remove existing ones! LoL

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

    Hipachi

    I still get the error command [503] and I did add myself to permissions :p
     
  26. Offline

    ferretlegs

    No worries, its all part of the fun. Ok that seemed to fix that error and we have been doing some more testing. Have encountered a few strange glitches though. The main one is that one user added himself to a class but then could not start the fight when punching the iron block. Punching the block just didnt do anything. We also noticed that from then on his name is stuck on the class sign, even after rebooting the server fully. So even when he isnt even in the fight (after a fight /leave) he is still permanently stuck on the class sign. So we can all fight but he cant now.

    Not sure what is happening...
     
  27. Offline

    beatcomet

    Thanks for the update, I'm trying to use it with level craft on , so players will be able show thier strength using the arena.
    Now i'm trying to balance the class system, using new types of item combinations.
     
  28. Offline

    Deminetix

    Hmmm this perplexes me - I cannot find the source of this error, the code is so clean for the signs function. He should still be able to fight on a server restart and you remove the name from the sign.

    The reason it never got removed from the sign was because the plugin believed he was not a part of a team, yet there is no way to put your name on a sign without being in a team... HMMM!!

    That would be awesome with levelcraft!

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

    ferretlegs

    The only thing I can think of is when he was punching the ironblock and it wouldnt start I organised a server restart at that point just to see if that helped. When he disconnected his session he might have still been in the fight. Maybe there needs to be consideration for handling disconnects?? When he comes back online I will test it with him again to see if it was a oneoff.

    By the way, we've already been having crazy fun with this, thought you might want to see the arena we built just for this plugin!!

    2011-05-09_18.42.22.jpg
    2011-05-09_19.41.10.jpg 2011-05-09_18.43.05.jpg 2011-05-09_18.44.37.jpg
     
  30. Offline

    beatcomet

    Awsome arena, I think I will make something like that in my server, and i'm almost finished testing the balances.
    Moved to mcmmo to make it more balanced because levelcraft is not good enough for this plugin
     
  31. Offline

    Deminetix

    Wow that is one very sexy looking arena! Good work to you and your mine-mates

    The way fight works is, the only information that is saved permanently are the waypoints. When the server restarts all information about Fight and it's users (ie; whether they are in a team, picked a class, or a fight is in progress) will be lost.

    If the server crashes or is not stopped using the "stop" command, the clearSigns function won't be called and the players name will be stuck on the sign. Also, when the server starts back up again you are no longer in a team - which might be why nothing happened when he clicked the iron block, did he try /Fight again? It is safe to do so to double check whether it is registering

    Levelcraft looks excellent, although i have only tried McMMO

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

Share This Page