[INACTIVE][FUN] LavaSurvival v1.0.2 - Survive against the lava! [677]

Discussion in 'Inactive/Unsupported Plugins' started by Clemens, Mar 23, 2011.

  1. Offline

    Clemens

    LavaSurvival: (Tested against Build 677)
    Version: v1.0.2

    LavaSurvival is a plugin that allows the people on a server to play lava survival. It creates an area surrounded with walls, in which lava spawns and "eats" its way through air (can be turned off) and ground. It will spread and multiply until it has taken over everything or until you die or win. There are several game modes to choose from. In these game modes, the players have to run (actually dig) away from the lava while fulfilling another task (such as: surviving over time, reaching a certain destination, collecting things in the ground or pushing other players into the lava).
    LS also supports the Permissions and the iConomy plugin.

    I have stopped with plugin development.
    Feel free to use any of my code ;)


    I'm working on something new and would need your help if you know anything about the Bukkit Creature.setTarget() method: -->Thread

    Note:
    If you want your inventory back, don't forget to use "/ls leave" before you disconnect from the server.

    Hint:
    If your games lag too much, try making the area smaller and turning Air_To_Lava to false...
    Smaller areas don't have to mean less fun ;)

    Features:
    • Create an area in which you can play lava survival
    • Choose between different game modes:
      normal, fastest, strongest, agilest, push, spleef (for descriptions, see below)
    • Choose between different characters (game mode: fastest)
    • If your server is running on a good computer, sit and watch how huge areas slowly turn into lava ^^ (Air_To_Lava=false)
    • Find out who of your friends is the best "lava survivor" (game mode: strongest)
    • Who's the best in evading lava and finding special blocks underground? (game mode: agilest)
    • Who's the best in pushing other people around ^^? (game mode: push)
    • Fun :)

    Download Version 1.0.2

    Github

    Getting started:
    1. Roughly but completely read this thread
    2. Download the .jar and put it in your plugin folder
    3. Add the permission nodes (see below) to your Permissions plugin or just add all the admins to the server OP list
    4. Optional: Look into the LS Properties (see below) and check if its the way you want
    5. Start the server, make an area and get started ;)
    Permissions:
    LavaSurvival supports the Permissions plugin (tested with 2.5.4) and has the following nodes:
    lavasurvival.play - allows players to use the commands: help, join, leave
    lavasurvival.host - allows player to use the commands: check, remove, refresh, start, stop
    lavasurvival.creator - allows player to use the commands: reset, area, area save

    If you don't use the Permissions plugin, all players have lavasurvival.play and the OP's of a server have lavasurvival.host and lavasurvival.creator

    Commands:
    Admin Commands:
    • /ls area [height] [length] - creates the game area, in which the lava will spread
    • /ls area save - saves your area the way it is right now
    • /ls refresh - restores the inner blocks of the area, so you can play again
    • /ls reset - deletes your game area and restores all blocks to the way they were bevor
    • /ls check - checks your area for existing underground lava
    • /ls remove - deletes the underground lava
    • /ls start [game mode] - starts the game according to the mode
    • Optional in normal : /ls go normal <delay time> - with <delay time> in seconds
    • Optional in strongest : /ls go strongest <delay time> - with <delay time> in minutes
    • /ls stop - stops the game and stops the lava from multiplying, it then behaves like normal lava
    Player Commands:
    • /ls join - if a game area exists, a player gets teleported to its lobby and is added to the 'player list' (inventory and previous location are saved)
    • /ls join here - same as normal join, but you don't get teleported to the lobby and can continue doing something
    • /ls leave - leaves the game or the lobby, teleports you to where you were as you joined and restores your inventory
    • /ls leave spawn - same as normal leave, but get teleported to spawn point
    • /ls [char] - in game mode 'fastest' you can choose from different characters
    • /ls help - the help, for more information
    Game modes:
    Normal:
    In game mode 'normal' there is no goal. Lava just spawns and spreads... You can neither win nor loose.

    Fastest:
    In game mode 'fastest' the players have to reach the "golden treasure" and mine as many golden blocks out of it, as there are players in the game. They have to do this, bevor the lava reaches the treasure. The treasure is a layer of golden blocks deep in the ground (Y-Coord. = 10). You can't miss it, if you dig down.
    To make it a little easier, in this game mode, the players can choose from the following characters:
    Waterboy (w), Toolboy (t), Lazuliboy (l), TNTboy (tnt)

    Strongest:
    In game mode 'strongest' you compete against other players. The simple question is: "Who can survive longer?". If you are the last living player, you win. But you can also win together, if either 3 or 2 players just survive long enough. All players get the same items in the same time periods, so all players have the same chance of winning.

    Agilest:
    In game mode 'agilest' all players have to collect 10 golden blocks together. These special golden blocks are found scattered all around the whole area (randomly). Also randomly scattered around the area, are the lava blocks. The goal of this mode is to evade the lava blocks and gather the golden blocks. After playing this mode for a while, you are going to love underground caves ^^. (Hint: Never dig straight downwards, if there is lava under you, you're doomed)

    Push:
    In game mode 'push' the players have to push each other into lava. All players start on a cut off pyramid in the middle of the area. The lava slowly starts raising from the bottom of the pyramid. The goal of every player is to push all other players into the lava, while not touching the lava himself. You have one "stick of hope" in your inventory, which when used, teleports you back to the top of the pyramid.

    Spleef:
    In game mode 'spleef' LS generates a very simple Spleef arena. Players can play a simple version of Spleef. For more general information about the game "Spleef" itself, go here.

    DM and TDM:
    (will take a while...but coming!)
    The modes Deathmatch and Teamdeathmatch are going to be the ultimate combination of my plugins: BigLife, Weapons (coming soon) and LavaSurvival


    LS Properties:
    When LS ist started for the first time, it creates a folder in the plugin directory. In this folder there is the "LavaSurvival.txt" in which all properties area stored. So far, there are 5 settings available:
    • Air_To_Lava -- set to 'true' or 'false' -> regulates whether the lava also "eats" the air or not
    • Difficulty -- set to 'easy', 'normal' or 'hard' -> I think no explaining is necessary
    • Border_TypID -- set to any block id -> this is the Block ID which your area border is made of
    • Spleef_Ground_ID -- set to any block id -> this is the Block ID which your spleef ground is made of
    • Use_iConomy -- set to 'true' or 'false' -> turns iConomy support on or off
    • iConomy_Reward_Winner -- set to any positiv number -> defines how much iConomy-money a player gets when winning
    Good to know:
    • If you delete your servers world directory, because you want a new world, also delete the "dat" directory from LS (it contains data from the old world and is now useless, the plugin will make a new one by itself)
    • In game mode 'agilest' in LS v1.0.2 it is enough to mine the golden blocks, you do not have to pick them up
    • Clemens recommends Difficulty "normal", because it is the only tested difficulty setting
    • You can also use /ls go [game mode] instead of /ls start [game mode]
    • If you win the round in strongest, push or spleef you get +1 point in the scoreboard system (scores.txt) and additional money if iConomy support is on
    • When creating an area, make sure there is enough space (air) under the lobby (the glass thingy). There should be no big tree or anything in the way between the lobby and the ground, otherwise all players could get teleported into the sky, fall and die
    • In all game modes where lava spreads and multiplies, this plugin is hard for the hardware and uses a lot of RAM (especially when you use big areas). The reason for this is, because the lava spread algorithm is almost like a simulation program. There area many things that have to be calculated and checked.
      Less hard for your hardware however are the game modes push and spleef ;)

    Changelog:
    Show Changelog (open)

    Version 1.0.2
    • Fixed (hopefully the last) inventory bug
    • Added possibility to configure iConomy money a player wins in strongest, push or spleef
    Version 1.0.1
    • Started using the GNU versioning system
    • Made the "golden treasure" in fastest a little higher (Y-Coord. = 20)
    • Changed the /ls refresh of spleef and push, so it doesn't lag that much
    Version 1.0
    • Added optional iConomy support
    • Fixed inventory bug
    Version 0.9
    • Added new game mode: "spleef"
    • Added a scoreboard system
    • Fixed many bugs
    Version 0.8
    • Added a optional delay time until the lava starts to spawn in 'normal' and 'strongest'
    • Added new game mode: "push"
    • Bug fix: TNT explosions now don't destroy the area border anymore
    Version 0.7
    • Added new game mode: "agilest"
    • Added simple difficulty settings
    • Added "/ls area save" to save an area the way it is
    • Changed some code for Bukkit build [486]
    Version 0.6
    • Fixed the multiple joining bug
    • Added Permissions plugin support
    • Made lava also spawn from the bottom in game mode 'strongest'
    • Fixed some bugs in 'strongest'
    • Updated ingame Help to v0.5
    Version 0.5
    • Added class "Functions" and moved some code around
    • Fixed some command bugs
    • Added inventory save/load system
    • Added location save/load system
    • Added /ls join here
    • Added /ls leave spawn
    Version 0.4
    • Added color to ingame output text
    • Made it less lagy by changing some scheduler stuff
    • Completed the Help
    • Reduced the number of spawning lava blocks at the beginning
    • Changed the pickaxe type that the Toolboy gets from stone to wood
    • Added a shovel to the start-inventory of 'strongest'
    Version 0.3
    • Initial Release
    ToDo:
    Show ToDo List (open)

    • Clean up the whole code
    • Add game modes: DM and TDM
    • Performance: make plugin less laggy
    • Make video
    • More important stuff? You tell me.
    Bla:
    Show Bla (open)

    This is my first plugin and it isn't finished even a bit. It still needs a lot of work. Please let me know if there are any errors and I will try to fix them. If you have any ideas on how this plugin could get better, or if you have any requests on what I should add or remove, please also let me know...
    Especially inform me about numbers (Are there too less of those? Too many of these? Don't get enough blub in xy seconds? ...). I can't test things with numbers very good and don't have enough friends to simulate a LS game with many players. So tell me if things are balanced or imbalanced.

    Also feel free to use my code, just don't forget to mention me if you publish something ;)

    Thanks to Edward Hand who helped me with an essential problem and to all the people who motivate me and make me keep working on my plugins.

    You want to help support LavaSurvival and help with its development, but don't know how???
    -->Simple:
    Just make a video of you and your friends having fun with LS on youtube and send me the link or tell me about bugs and imbalances you have discovered or buy me a coffee so I can work harder: coffee for Clemens
     
    kahlilnc likes this.
  2. Offline

    Niveau100

    I already play 'push' mode, the first time it goes normally, but when I start a second game, when players type /ls join, there is a lot of errors like this :

    Code:
    19:39:02 [SEVERE] Could not pass event ENTITY_DAMAGE to LavaSurvival
    java.lang.NullPointerException
            at bukkit.Clemens.lavasurvival.LavaEntityListener.onEntityDamage(LavaEntityListener.java:78)
            at org.bukkit.plugin.java.JavaPluginLoader$38.execute(JavaPluginLoader.java:399)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:498)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:720)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    19:39:02 [SEVERE] Could not pass event ENTITY_DAMAGE to LavaSurvival
    java.lang.NullPointerException
            at bukkit.Clemens.lavasurvival.LavaEntityListener.onEntityDamage(LavaEntityListener.java:78)
            at org.bukkit.plugin.java.JavaPluginLoader$38.execute(JavaPluginLoader.java:399)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
            at net.minecraft.server.EntityHuman.a(EntityHuman.java:396)
            at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:147)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:508)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:720)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    >
    
    and 5-10 minutes after, server is crashing. Any help?
     
  3. Offline

    Clemens

    Thank you for telling me about the bug ;)
    I think I fixed it with LS v0.9 ... give it another try.
     
  4. Offline

    Niveau100

    Ok good, seems it work.

    A last thing, sometimes when a player is falling into lava, when going back to the 'glass cage', he burn and die. I don't know if it's lag-related..
    Oh and pardon my english, i'm french.
     
  5. Offline

    returnzork

    My server was trying to play this, but we lose our items after playing. After the game we all type /ls leave and we still do not get our items back.

    Also, please make it so if people win they can be credited money from iConomy.

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

    skillinazn

    We get all our items back when we leave the area o.o.

    By the way, great plugin. Tried to create an arena but it was too large and kinda laggy. Then I attempted to create a larger area and accidently put /ls area 50 1000.

    Curse me and my clumsy fingers.
     
    Clemens likes this.
  7. Offline

    Clemens

    I think I found the bug, thank you very much for reporting ;)
    I'll try to fix it as soon as I can...

    I'm working on it. How much money do you think the player should get for winning a round? 5? 10? 15?

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

    returnzork

    Any of them would work, maybe have a configuration option to be able to change it though.
    Thank you for this awesome plugin!!
     
  9. Offline

    skillinazn

    By default rules I'd say about maybe (if you would want to split it up into sections):
    Normal: 30 (Naturally I feel like this maybe too much, but heck, we all love classics don't we?)
    Fastest: 10-15 per person (Debateable, I only tested this alone so I don't know if you need teamwork to do it but I'm guessing logically yes)
    Agliest: 10-15 per person (See above)
    Push: 30-40 (Takes skill to push people down.)
    Spleef: ??? (Never played before/don't get the concept yet xD)

    Still, like returnzork said this should be just configurable as some servers use hundreds for money or maybe thousands. This is just a basic layout on what should be the winning pot of the game to give an idea for people who would configure it.

    EDIT: BUT THIS HAS TO DEPEND ON THE NUMBER OF PEOPLE. We can't have a 2 ppl lava survival match and let each person get 30 coins per game now can we? The numbers I put up are for matches consisting on 6+ people. If you can it would be great to set configs to how many people should get it, or instead double the initial amount of the pot per person joining.

    Also when you mean Y coordinate=10 do you mean 10 blocks down or even further down? I played a fastest match now and was partially scarred for lava following me.

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

    greatman

    I think a way to fix spleef lag is to set the lava with the stationary one (ID 11). So it won't lag the hell out of the server when we refresh the area.
     
  11. Offline

    Clemens

    Wow ... I woke up earlier this morning and thought "Mhh, should I check what my Plugins is doing?". But my thoughts were: "No, it probably has only like 4 downloads and no new replys from any people", so I didn't. And now I came online and there are 81 downloads (v1.0) and motivated people making suggestions... this makes me happy :)

    You're right, it has to depend on the number of players. But it shouldn't be a problem to do this, I also made the number of golden blocks in "agilest" dependend on area size AND players, so I should be able to do something similiar here.

    With "Y coordinate=10" I mean WAY WAY down... But I will probably make the treasure a little higher soon.

    That with the ID=11 thing won't work, BUT you pointed something out for me and gave me a good idea, on how to fix the refresh lag on spleef and push, thank you very much :)

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

    Niveau100

    Can you make a player got back their inventory when he lose / die in a game instead just going back to the lobby? Because if a player want to re-play without leaving, he can type /ls join and this is 'erasing' his first inventory. It's hard to explain especially I have a poor english. Thank you. :p
     
  13. Offline

    Singapore123

    Since it is 1.0, how about making a video?
     
  14. Offline

    Clemens

    Your English is good enough, I know what you mean ^^
    But there is no need to... since v1.0 /ls join does NOT "erase" the first inventory anymore, this bug has been fixed.
    You can use /ls join now without having to worry anymore, because if you use /ls leave your very FIRST inventory will be reseted ;)

    Yeah, I know ^^ I want have a video too... !!
    But there are 3 things that are keeping me from making one:
    - ignorance of how to make videos (I've never made one before)
    - more important things to do (like fix important bugs)
    - and time (I actually have to learn for an exam)

    But soon or later I will make one... I promise ^^

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

    Singapore123

    Okay, thanks for the reply. And, I can't make a zone.
     
  16. Offline

    RoyAwesome

    Whenever I start the game, we all spawn at the top of the arena fall and die
     
  17. Offline

    PlatinSturm

    wow nice one, some bugs occure thou.

    If i remove the area and leave after wards i dont get my items back.

    I test it for a while and give u a better and longer feedback then.

    Until now i quite like it! Keep up the good work ;)
     
  18. Offline

    Clemens

    There was probably no space (air) under the lobby (the glass thingy)... Make sure there is no big tree or anything in the way between the lobby and the ground, otherwise you get ported into the sky, fall and die.
    Maybe I will try to fix this bug some time in the future...

    Mhh... You mean, when using /ls reset and then /ls leave you don't get your old inventory back?

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

    TheCubeMaster

    Im running 670 and when i type /ls leave it says and internal error occured, I leave and get my items but get this
    16:38:03 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'ls' in plugin LavaSurvival v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:254)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:596)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:559)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:553)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NullPointerException
    at com.Clemens.lavasurvival.Functions.playerInvFromInventoryStash(Functions.java:223)
    at com.Clemens.lavasurvival.Functions.RestorePlayerInventory(Functions.java:216)
    at bukkit.Clemens.lavasurvival.LavaSurvival.onCommand(LavaSurvival.java:505)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
     
  20. Offline

    PlatinSturm

    Yes thats what happens at least on my server, dunno if i made a mistake.

    And a question, how large should a normal playfield be? If i make a 35 block larg playground we get killed in under 30 sec in fastest mode. And if there is water in the ground there is a chance the builded obsidian blocks block the lava and there can sit players for eternity.

    And how hard is the plugin for the hardware? We had some lags playing it, but could be a other plugin too, im not sure about this part ^^.

    But was/is still very funny!
     
  21. Offline

    Clemens

    Thank you for the error report and thanks for posting the console error message right away ;)
    I think I fixed it with LS 1.0.1 ... if it occurs again, let me know!

    It depends on the number of players and on the game mode... if you are 2 people playing fastest or agilest I think an area of 6*8 (/ls area 6 8) should do. But it always depends. My advice: if you notice the area is too big and there is a lot of unused space, make the area smaller. Always try to make it as small as possible ;)
    Ohhhh yes, I know this bug and have tried almost everything to fix it, but so far without success =( Hopefully in the future...
    This plugin is hard for the hardware. Especially when you use big areas, then it uses a lot of RAM. The reason for this is, because the lava spread algorithm is almost like a simulation program. There area many things that have to be calculated and checked. Less hard for your hardware however are the game modes push and spleef ;)

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

    R0bert

    Is there any chance to be able to talk/contact you?

    Do you have any plans to make this a major server mod instead of a mini-mod? I am interested running a LavaSurvival Server, and i would wish to run it on your script, would you maybe be interested scripting for it?

    Anyhow nice little lava survival, i remember when i played LavaSurvival over in Classic, fun but it was not that challenging as you never died.

    Regards
    Robert
     
  23. Offline

    panderiz

    We're at v1 and we still don't have that video >=(
     
    Clemens likes this.
  24. Offline

    Clemens

    I know ^^ But I have to learn for a really important exam right now -.-

    I promise, I'll concentrate on video-making after the exam =)
    I thought, I'll maybe ask my friends and then we'll play all the game modes, while I talk about all the important stuff there is to this plugin...
     
  25. Offline

    panderiz

    You liking my post made me realize there likes here... EWWWWWWW :( People need to stop copying facebook, first eve now mah bukkit! [creeper]

    I'll be waiting on that vidya though :) Just quote one of my posts so I get an alert.
     
  26. Offline

    GeneralBoo92

    running cb677 and the latest version of the plugin. Me and some friends tried the strongest game mode. All was going well but about 1min after the lava started the game ended saying we all won for surviving 20mins. It definentaly wasnt 20mins long
     
  27. Offline

    Clemens

    Ok, thanks ... I'll check it out as soon as possible !
     
  28. Offline

    The PC Tech Guy

    I like this plugin, but it's a bit buggy. For one, I believe it is making glass unbreakable everywhere. I'm not too sure if this is completely true, but I have recently got reports of unbreakable glass.

    Second, when you die, you aren't teleported back to the box, instead you are teleported to where you began (when the game started), resulting in dying twice. After the second death, you are teleported to the spawn point. However, I can get my inventory back with /ls leave, but my users don't know this, and I have to tell them every time. Otherwise, it's a great plugin!

    As for a request, maybe how the lava spreads (such as destroying blocks) can be made configurable? I'd like to set it a bit slower, as it's eating away the blocks a little too fast (and it would help the lag).
     
  29. I like the looks of this mod, but i don't wan't to devote my entire map to this. could you make a side mod that allows you to select a cuboid, and have it so that when a command is toggled, the mod slowly replaces the air with lava bottom to top. This would allow people to make LS in any layout they want (without dedicating an entire map to it). like a staircase moving up away from the lava, or a push pyramid. and when the command is toggled again, the lava goes away. I also think this would reduce lag because the lava does not engulf the entire map, just the selected area.
     
  30. My response:eek::D:):confused:[creeper]
    only one problem that i have truble with:
    you can die in push, or at least i can die
     
  31. Offline

    Clemens

    Thank you very much both for your suggestion/advice ;) I am trying to find a way to improve what you said :)
     

Share This Page