Inactive [FUN/EDIT/RPG] DungeonBuilder v0.9.7 - Player created dungeons [1.2.4-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by Zimp, Jun 23, 2011.

  1. Offline

    Zimp

    Grifhell and Kevinflu like this.
  2. Offline

    gameswereus

    Just got finished adding all the permissions, now for the dungeon creations. When we finish our first dungeon, I shall post a video, as it will be huge, with puzzles, riddles, huge monster battles etc. I really hope you will be supporting custom mobs with Spout :)
     
  3. Offline

    yakasuki

    :D glad to see this plug-ins still chuggin along :D
    this is probably my fav plugin you know XD
     
  4. Offline

    Pinback

    Is it possible ro build one dungeon together? I try to build one with a mate, but i can't enter the region...(even not with admin rights ...)
     
  5. Offline

    Anetar

    I got a problem, when I start in a dungeon and I just quit randomly in the middle, another player can't join the dungeon ... :(
    Another thing, maybe you could add a code in it that will allow players just join the dungeon, except that you need to wait till someone in the dungeon is done, not that they would see each others....
     
  6. Offline

    Zimp

    By randomly quit do you mean you logged out of the game? Or used the /leaveDungeon command?
     
  7. Offline

    Anetar

    just logged off
     
  8. Offline

    bootscreen

    hy,

    a few minutes ago i installed permissionex and now i got this error:
    my permission.yml:
    Code:
    groups:
        default:
            default: true
            rank: '1000'
        User:
            default: false
            permissions:
            - modifyworld.*
            - iConomy.holdings
            - iConomy.help
            - iConomy.payment
            - ChestShop.shop.create
            - ChestShop.shop.buy
            - ChestShop.shop.sell
            - multiverse.access.*
            - multiverse.portal.access.*
            prefix: '&7'
            rank: '1000'
        VIP:
            default: false
            prefix: '&9[VIP]'
            rank: '500'
        Mod:
            default: false
            prefix: '&c[Mod]'
            rank: '100'
        Admin:
            default: false
            permissions:
            - '*'
            rank: '1'
    oh and i use Bukkit 1532, DB 0.8 and PEX 1.17
     
  9. Offline

    Zimp

    I haven't tested against any builds past 1337. It sounds like they may have done something to permissions for the next release. You might want to try editing the plugin.yml file in the jar file and removing the stanza for the '*' permission node.
     
  10. Offline

    bootscreen

    thx, this solves the problem =)
     
  11. Offline

    bjjones13

    My friend enters a dungeon and gets "Off Limits"
    i tryed setting a permission for admin, and teleport, dont know what else to do.
     
  12. Offline

    bootscreen

    is it possible to disable the bedrock cube around the dungeon area?
     
  13. Offline

    Zimp

    @bjjones13

    The proximity check can be disabled through a configuration file setting. Please see the configuration documentation on the BukkitDev page.

    @bootscreen

    All of the dungeon creation commands support an optional argument at the end to specify what block type to use as the shell. You can also use "NONE" for that last argument to not generate a shell around the dungeon.
     
  14. Offline

    bootscreen

  15. Offline

    TremulantEP

    I am using the most up to date version (granted I'm using it with the R2 snapshot for bukkit) and am running into a problem with allowing more than one user to queue up for the dungeon, I used the command /setPartySize Earth 2 and instead of letting two player queue up it still says the expected party size is 2.
    Am I missing something? I'm relatively new to using bukkit, but I've got a fair understanding of how this stuff works.
     
  16. Offline

    Zimp

    /setPartySize Earth 2

    Means that the dungeon "Earth" will only allow parties of size 2 to start or queue for the dungeon and players will have to use the party commands to create the party before they can run the dungeon.

    If you want individual players to queue for the dungeon the party size should be set to 1 at which point the first person can step on the teleporter to run the dungeon and then anyone else that steps on the queue while someone is running the dungeon will be queued up and notified when the dungeon becomes available.
     
    TremulantEP likes this.
  17. Offline

    TremulantEP

    Thank you, was unaware the players had to use a command to make a party, solves my problem. Keep up the nice work!
     
  18. Offline

    gummby8

    BUG: Enchantments do not stay on items in chests when the dungeon reloads.

    Request: if you could reward enchantment EXP as a reward for completing a dungeon.

    BUG "pig-zombie" for a monster type come back with an invalid mob name error for monster spawning

    Request: Is it possible to create an event that detects when the monsters in a room have been defeated? I don't want players just running through a room without fighting the monsters that were spawned.

    Request: is there a way that you could inpliment some sort of boss mob?
    sortof like http://forums.bukkit.org/threads/fu...0-2-have-npc-bots-in-combat-1597.44630/page-2

    Request: Can you add a price to running a dungeon. It already hooks into iconomy to give money as a reward can you add a price as well to enter a dungeon?
     
  19. Offline

    Zerockian

    Hello, i wanted to ask if you could give us a better script example(the prinln() aint cutting it for me)? Something that would change blocks and display a message like in your videos. No need to explain what something does in the script, just need an example :) And a script that would check if there are any monsters left in vacinity (what gummby8 requested)

    Also i noticed theres /setDungeonExitDestination but no /setDungeonStartDestination (should be easy to replace the position set by the initial /publishDungeon). Thanks for your time and have a nice Christmas season :)
     
  20. Offline

    Zimp

    Here is the script I used to create my recent video (http://www.youtube.com/watch?v=KBYYuMOFc7g&feature=player_embedded)

    http://mc.virtuallyabstract.net/scriptex.groovy

    The dungeon itself had two triggers:

    1. When the player zones in we trigger the function "torches"
    2. When the player steps near the chest we trigger the function "destroywall"

    I should also add that the script provided is a Groovy script which takes additional work to get running on your server. If you don't want to take those additional steps you would have to translate the script into a Javascript one.
     
    Zerockian likes this.
  21. Offline

    Zerockian

    That's a huge help :D quick question since im quite the rookie at scripting/programming: how would i use a constant value to set the location? I have the coords of the location (-80,72,190).
     
  22. Offline

    Zimp

    If you mean you want to get a Location object for a known set of coordinates you could either use the Location constructor like:

    Location loc = new Location(player.getWorld(), -80, 72, 190);

    Or you could also take an existing location and make the appropriate calls to setX, setY, and setZ:

    Location loc = player.getLocation().clone();
    loc.setX(-80);
    loc.setY(72);
    loc.setZ(190);
     
  23. Offline

    Zerockian

    Thanks for clearing that up for me, also one last thing im going to bother you with(im sorry, but my knowledge of Groovy is slim to none so im pretty terrible at translating) could you fix this script?It's supposed to make the floor into glowstone with 1-block space in-between each glowstone

    Code:
    import org.bukkit.*;
    import org.bukkit.entity.*;
    import org.bukkit.block.*;
    import org.bukkit.plugin.*;
    import org.bukkit.scheduler.*;
     
    
    function dungeon_start()
    {
    System.out.println("Hi");
    }
    
    function dungeon_exit()
    {
    }
    
    function zon()
    {
        Location loc = player.getLocation();
        //not sure if i should of used private here
        private final BukkitScheduler scheduler = new server.getScheduler();
    
        //Run this in a separate thread to avoid locking up the server.
        //This Thread bit is what confuses me, what am i supposed to do here?
    
        Thread.start{
            int glowy = loc.getY() - 1;
            int glowx = loc.getX();
    
            for(int i = 0; i < 10; i++)
            {
                Location newloc = loc.clone();
                newloc.setY(glowy);
                newloc.setX(glowx - 2*i);
    
                Block b = newloc.getBlock();
    
                //Schedule a task on the main server thread to change the blocks to glowstone.
                SetBlock sb = new SetBlock(b, Material.GLOWSTONE);
                scheduler.scheduleSyncDelayedTask(plugin, sb);
    
                //One second delay between each set of torches
                Thread.currentThread().sleep(1000);
            }
        }
    }
    
    class SetBlock implements Runnable
    {
        private Block b;
        private Material m;
    
        public SetBlock(Block b, Material m)
        {
            this.b = b;
            this.m = m;
        }
    
        public void run()
        {
                b.setType(m)
        }
    }
    
     
  24. Offline

    Zimp

    You need to fix the second line in the function zon() to look like:

    final BukkitScheduler scheduler = server.getScheduler();

    The scheduler object already exists on the server and you don't need to create a 'new' one. Instead you can just grab the existing one by calling "getScheduler" on the server object.

    To answer your question in the code about the thread. In order to write code with sleeps in them you need to spawn it in a separate thread of execution that will run at the same time as the server. If you don't do this you will see strange behavior on the server where it doesn't update the blocks properly until the very end.

    The Thread.start { } convention is a groovy thing that starts a thread using the contents of the closure (the stuff between the {}). In normal java code it would look more like:

    new Thread() { @Override public void run() {
    //do stuff here
    }}.start();

    The reason we use a scheduler to change the blocks is because the server is not thread safe and we need to make sure we do things like changing blocks on the main server thread.

    I should also point out that when working with scripts you do not need to restart the server for changes to take effect (merely reload the dungeon and reset the triggers). Any errors will be displayed in the server output along with a stack trace.

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

    Zerockian

    Code:
    //maybe imports need changing?
    import org.bukkit.*;
    import org.bukkit.entity.*;
    import org.bukkit.block.*;
    import org.bukkit.plugin.*;
    import org.bukkit.scheduler.*;
     
    function dungeon_start()
    {
    }
    
    function dungeon_exit()
    {
    }
    
    function zon()
    {
        Location loc = player.getLocation();
         final BukkitScheduler scheduler = server.getScheduler();
    
        new Thread() { @Override public void run() {
            int glowy = loc.getY() - 1;
            int glowx = loc.getX();
    
            for(int i = 0; i < 10; i++)
            {
                Location newloc = loc.clone();
                newloc.setY(glowy);
                newloc.setX(glowx - 2*i);
    
                Block b = newloc.getBlock();
    
                SetBlock sb = new SetBlock(b, Material.GLOWSTONE);
                scheduler.scheduleSyncDelayedTask(plugin, sb);
    
                Thread.currentThread().sleep(1000);
            }
        }}.start();
    // or this bit here?
    
    class SetBlock implements Runnable
    {
        private Block b;
        private Material m;
    
        public SetBlock(Block b, Material m)
        {
            this.b = b;
            this.m = m;
        }
    
        public void run()
        {
                b.setType(m)
        }
    }
    The error that persists: Caused by: sun.org.mozilla.javascript.internal.EvaluatorException: identifier is a reserved word ((Unknown source)#1). Something to do with me naming something wrong or ??
     
  26. Offline

    Zimp

    The thread part was right the first time, you need to change it back to:

    Thread.start {
    //code here
    }
     
  27. Offline

    Zerockian

    hmm error persists :/im sure there's some really dumb mistake i made that i just can't find xD

    Code:
    import org.bukkit.*;
    import org.bukkit.entity.*;
    import org.bukkit.block.*;
    import org.bukkit.plugin.*;
    import org.bukkit.scheduler.*;
     
    function dungeon_start()
    {
    }
    
    function dungeon_exit()
    {
    }
    
    function zon()
    {
        Location loc = player.getLocation();
         final BukkitScheduler scheduler = server.getScheduler();
    
        Thread.start {
            int glowy = loc.getY() - 1;
            int glowx = loc.getX();
    
            for(int i = 0; i < 10; i++)
            {
                Location newloc = loc.clone();
                newloc.setY(glowy);
                newloc.setX(glowx - 2*i);
    
                Block b = newloc.getBlock();
    
                SetBlock sb = new SetBlock(b, Material.GLOWSTONE);
                scheduler.scheduleSyncDelayedTask(plugin, sb);
    
                Thread.currentThread().sleep(1000);
            }
        }
    
    class SetBlock implements Runnable
    {
        private Block b;
        private Material m;
    
        public SetBlock(Block b, Material m)
        {
            this.b = b;
            this.m = m;
        }
    
        public void run()
        {
    //maybe something here?
              b.setType(m);
        }
    }
    I'm sorry for having you do this error-checking, but i'm just lost with this :/
     
  28. Offline

    Zimp

    The "plugin" variable is not automatically injected into the script in the current version of DungeonBuilder. You will either need to declare it yourself or wait for the next release.

    Declaring it yourself would look something like:

    Plugin plugin = null;
    for(Plugin p : server.getPluginManager().getPlugins())
    {
    if(p.getClass().toString().contains("DungeonBuilder"))
    plugin = p;
    }

    if(plugin == null)
    return;

    scheduler.scheduleSyncDelayedTask(plugin, sb);
     
  29. Offline

    Zerockian

    Code:
    import org.bukkit.*;
    import org.bukkit.entity.*;
    import org.bukkit.block.*;
    import org.bukkit.plugin.*;
    import org.bukkit.scheduler.*;
    
    function dungeon_start()
    {
    }
    
    function dungeon_exit()
    {
    }
    
    function zon()
    {
    
       Location loc = player.getLocation();
       final BukkitScheduler scheduler = server.getScheduler();
    
        Thread.start {
            int glowy = loc.getY() - 1;
            int glowx = loc.getX();
            Plugin plugin = null;
            for(Plugin p : server.getPluginManager().getPlugins())
            {
            if(p.getClass().toString().contains("DungeonBuilder"))
            plugin = p;
            }
    
            if(plugin == null)
            return;
    
            for(int i = 0; i < 10; i++)
            {
                Location newloc = loc.clone();
                newloc.setY(glowy);
                newloc.setX(glowx - 2*i);
    
                Block b = newloc.getBlock();
    
                SetBlock sb = new SetBlock(b, Material.GLOWSTONE);
                scheduler.scheduleSyncDelayedTask(plugin, sb);
                Thread.currentThread().sleep(1000);
            }
        }
        }
    
    class SetBlock implements Runnable
    {
        private Block b;
        private Material m;
    
        public SetBlock(Block b, Material m)
        {
            this.b = b;
            this.m = m;
        }
    
        public void run()
        {
              b.setType(m);
        }
    }
    Still persists :/
     
  30. Offline

    Zimp

    I just noticed your function declarations start with "function" which indicates you are trying to write javascript. If you are trying to write a groovy script then the word "function" needs to be changed back to "void". Please note that you need to download additional files and use a different command to start the server if you want to use groovy scripts.
     
  31. Offline

    Zerockian

    Erm ive been trying to translate it to .js remember? xD Because i've never used Groovy before.
     

Share This Page