[FUN/MECH] Offering v1.4 - Let players create altars that let them do cool stuff [1000]

Discussion in 'Inactive/Unsupported Plugins' started by islendingabok_team, Aug 10, 2011.

?

Is the plugin explanation too confusing?

  1. Yes

    60 vote(s)
    60.6%
  2. No

    39 vote(s)
    39.4%
  1. [FUN/MECH] Offering v1.4 - Let players create altars that let them do cool stuff [1000]

    [gunpowder][fire][diamondblock][fire][gunpowder]

    THIS PLUGIN HAS BEEN MOVED TO BUKKIT DEV:
    http://dev.bukkit.org/server-mods/offering/

    Overview:
    Offering is a plugin that allows players on your server to create single-block altars to which offerings can be presented (clicking on the altar with a certain item in hand) in order to obtain a reward. Rewards could be an instant teleport to certain coordinates or full health restored, although a wide range of rewards are currently possible. In addition, rewards, the material type of altar and offering blocks, and even the mouse button pressed (LEFT or RIGHT) can be customized by server admins by editing the plugin's config.yml file. On top of all of this, it is possible for users to input there own values, or variables, to an altar, such as inputing a set of coordinates to an altar for teleportation and to monitor which users can use which altars via Permissions.

    Video:
    The text description below can be quite confusing. I would only use it for reference and information about advanced uses of the plugin such as customization. For a basic intro, check this video:

    Note: this video was made using the first (and outdated) version of the plugin. More has been added since then.

    How It All Works:
    When a user left-clicks on an altar block with an offering, he or she will get the reward specified for the altar-offering combination in the config.yml file. For example, if the config.yml is set to the default, it will fully restore the health of users who left-click a gold block altar with a clay ball offering. A slightly more complex example is the default teleport offering. When a user left-clicks a golden altar with a slime-ball, he or she will be teleported to coordinates specified by signs placed on the blocks around the altar (the signs must be in the same y-plane as the altar block and adjacent to it). This type of user input is very useful, and can be regulated or replaced with static values by admins who edit the config.yml. Regardless, the syntax for an input sign is the variable name preceded by a dollar sign ($) on the second line, and the value desired by the user on the third line. For each variable in an altar, you need a separate sign. In the case of our example, the variables for the coordinates will be $x, $y, and $z, so there will be three signs. If the user wishes to be teleported to (x: 5, y: 80, z: 432), he or she would write:
    Show Spoiler

    Code:
     
    $x
    5
     
    
    on the first sign, and:
    Code:
     
    $y
    80
     
    
    on another sign, and:
    Code:
     
    $z
    432
     
    
    on a third sign. Although variables are slightly confusing, they are not necessary to this plugin, but just add a much more customizable and practical use to the altars.


    Editing the Config File:
    All of the data describing the types of altars and offerings that can be edited is stored in /plugins/Offering/config.yml. Your config file by default will look something like:
    Code:
    rewards:
        zeus:
            lightning: $x $y $z
        tp:
            tp: $x $y $z
        day:
            time: 0
        cookies:
            give: COOKIE 5
        fullheal:
            heal: 20
    altars:
        GOLD_BLOCK:
            gifts:
                DIAMOND_SWORD:
                    reward: zeus
                CAKE:
                    reward: cookies
                CLAY_BALL:
                    reward: fullheal
                WATCH:
                    amount: 3
                    reward: day
                SLIME_BALL:
                    reward: tp
    decay: true
    click-type: LEFT
    
    Editing above can be quite difficult if you don't understand it. It is perfectly alright to leave it to the default, only change it if you want something custom. You can leave comments below for help with this. Here is a brief explanation of what all the YAML means:
    Show Spoiler

    • Under altars, each item signifies a type of block that can act as an altar (eg. GOLD_BLOCK)
    • Under each type of altar block (like GOLD_BLOCK), there is a category gifts
    • In this gifts category go all the types of inventory items that can be counted as offerings to the altar (eg. SLIME_BALL)
    • Under each type of gift (like SLIME_BALL), there is a field reward, which specifies the type of reward that goes along with the offering at the altar
    • The amount field specifies the number of offerings (eg. SLIME_BALLs) needed
    • Under the rewards list, all the possible rewards (eg. fullheal) are defined (the same rewards referred to in the bullet above)
    • Under each reward (such as fullheal) attributes which represent reward-actions can be found (eg. heal: 20)
    • Each reward-action actually "does" something: admin-defined rewards can use one or more of them with arguments to create the desired reward
    • Each argument in a reward action is separated by a space after the colon (eg. COOKIE 5)
    • Values that are preceded by a dollar sign ($) (eg. $x) represent variables which are to be filled in by signs placed around the altar
    • Click-type specifies whether the left or right mouse should be counted as "clicking" on the altar
    • If decay is set to true, items will go away after being given to the altar

    Below is a list of the supported reward-actions (such as lightning, tp, and heal in the example above):
    Show Spoiler

    1. tp: [x] [y] [z] - teleports the player to the given location
    2. worldtp: [world name] [x] [y] [z] - teleports the player to the given location in the given world
    3. lightning: [x] [y] [z] - creates a lightning bolt that strikes the given location
    4. heal: [amount] - changes the player's health by the amount given
    5. weather: [rain/thunder/clear] - sets the weather to either sun or storm (not thoroughly tested yet)
    6. time: [o-24000] - sets the time to the specified time of day, 0 being sunrise
    7. give: [item name] [amount] - give the player a certain amount of an item
    8. spawnmob: [mob name] - spawns a mob of the specified type on top of the altar


    And here is a list of all the block names:

    Show Spoiler


    STONE
    GRASS
    DIRT
    COBBLESTONE
    WOOD
    SAPLING
    BEDROCK
    WATER
    STATIONARY_WATER
    LAVA
    STATIONARY_LAVA
    SAND
    GRAVEL
    GOLD_ORE
    IRON_ORE
    COAL_ORE
    LOG
    LEAVES
    SPONGE
    GLASS
    LAPIS_ORE
    LAPIS_BLOCK
    DISPENSER
    SANDSTONE
    NOTE_BLOCK
    BED_BLOCK
    POWERED_RAIL
    DETECTOR_RAIL
    PISTON_STICKY_BASE
    WEB
    LONG_GRASS
    DEAD_BUSH
    PISTON_BASE
    PISTON_EXTENSION
    WOOL
    PISTON_MOVING_PIECE
    YELLOW_FLOWER
    RED_ROSE
    BROWN_MUSHROOM
    RED_MUSHROOM
    GOLD_BLOCK
    IRON_BLOCK
    DOUBLE_STEP
    STEP
    BRICK
    TNT
    BOOKSHELF
    MOSSY_COBBLESTONE
    OBSIDIAN
    TORCH
    FIRE
    MOB_SPAWNER
    WOOD_STAIRS
    CHEST
    REDSTONE_WIRE
    DIAMOND_ORE
    DIAMOND_BLOCK
    WORKBENCH
    CROPS
    SOIL
    FURNACE
    BURNING_FURNACE
    SIGN_POST
    WOODEN_DOOR
    LADDER
    RAILS
    COBBLESTONE_STAIRS
    WALL_SIGN
    LEVER
    STONE_PLATE
    IRON_DOOR_BLOCK
    WOOD_PLATE
    REDSTONE_ORE
    GLOWING_REDSTONE_ORE
    REDSTONE_TORCH_OFF
    REDSTONE_TORCH_ON
    STONE_BUTTON
    SNOW
    ICE
    SNOW_BLOCK
    CACTUS
    CLAY
    SUGAR_CANE_BLOCK
    JUKEBOX
    FENCE
    PUMPKIN
    NETHERRACK
    SOUL_SAND
    GLOWSTONE
    PORTAL
    JACK_O_LANTERN
    CAKE_BLOCK
    DIODE_BLOCK_OFF
    DIODE_BLOCK_ON
    LOCKED_CHEST
    TRAP_DOOR
    IRON_SPADE
    IRON_PICKAXE
    IRON_AXE
    FLINT_AND_STEEL
    APPLE
    BOW
    ARROW
    COAL
    DIAMOND
    IRON_INGOT
    GOLD_INGOT
    IRON_SWORD
    WOOD_SWORD
    WOOD_SPADE
    WOOD_PICKAXE
    WOOD_AXE
    STONE_SWORD
    STONE_SPADE
    STONE_PICKAXE
    STONE_AXE
    DIAMOND_SWORD
    DIAMOND_SPADE
    DIAMOND_PICKAXE
    DIAMOND_AXE
    STICK
    BOWL
    MUSHROOM_SOUP
    GOLD_SWORD
    GOLD_SPADE
    GOLD_PICKAXE
    GOLD_AXE
    STRING
    FEATHER
    SULPHUR
    WOOD_HOE
    STONE_HOE
    IRON_HOE
    DIAMOND_HOE
    GOLD_HOE
    SEEDS
    WHEAT
    BREAD
    LEATHER_HELMET
    LEATHER_CHESTPLATE
    LEATHER_LEGGINGS
    LEATHER_BOOTS
    CHAINMAIL_HELMET
    CHAINMAIL_CHESTPLATE
    CHAINMAIL_LEGGINGS
    CHAINMAIL_BOOTS
    IRON_HELMET
    IRON_CHESTPLATE
    IRON_LEGGINGS
    IRON_BOOTS
    DIAMOND_HELMET
    DIAMOND_CHESTPLATE
    DIAMOND_LEGGINGS
    DIAMOND_BOOTS
    GOLD_HELMET
    GOLD_CHESTPLATE
    GOLD_LEGGINGS
    GOLD_BOOTS
    FLINT
    PORK
    GRILLED_PORK
    PAINTING
    GOLDEN_APPLE
    SIGN
    WOOD_DOOR
    BUCKET
    WATER_BUCKET
    LAVA_BUCKET
    MINECART
    SADDLE
    IRON_DOOR
    REDSTONE
    SNOW_BALL
    BOAT
    LEATHER
    MILK_BUCKET
    CLAY_BRICK
    CLAY_BALL
    SUGAR_CANE
    PAPER
    BOOK
    SLIME_BALL
    STORAGE_MINECART
    POWERED_MINECART
    EGG
    COMPASS
    FISHING_ROD
    WATCH
    GLOWSTONE_DUST
    RAW_FISH
    COOKED_FISH
    INK_SACK
    BONE
    SUGAR
    CAKE
    BED
    DIODE
    COOKIE
    MAP
    SHEARS
    GOLD_RECORD
    GREEN_RECORD



    Examples Config Fragments:
    Code:
    rewards:
        teleportToSpawn:
        #teleport a user to spawn
            tp: 0 80 0
            #assuming spawn is at (x:0, y:80, z:0)
    altars:
        IRON_BLOCK:
        #instead of gold
            COOKIE:
            #cookie is the offering
                reward: teleportToSpawn
                #link it up to the reward we made above
    
    More coming in the future. Feel free to post your own examples.

    Permissions Support:
    Without Permissions, anyone can use any altar. This is fine in most cases. However, the both classic Permissions and Permissions EX can be used to specify who can access which altar (SuperPerms is unsupported). The following formula can be used to obtain the Permissions node for a reward [reward]:
    Code:
    Offering.rewards.[reward]
    
    Using this pattern, the Permissions nodes for the default rewards are:
    • Offering.rewards.fullheal
    • Offering.rewards.tp
    • Offering.rewards.zeus
    • etc.
    TODO/Progress:
    The next update:
    • predefined variables like the location of the altar and player name
    • redstonestateset, godmode, and other new reward actions
    • custom messages on a reward
    Future goals:
    • allowing other plugins to create rewards
    • allowing altars to edit Permissions groups
    • built-in Bukkit Permissions support
    If you have either any ideas for improvements to the plugins or suggestions of how I can achieve these goals, please let me know! Either leave a comment below or PM me.

    Also, should the user have to register the altar with a command? This might prevent parts of people's houses from turning into altars. Personally I think it's better without a command, but a few users have expressed interest in adding command registration. Let me know what you think below.

    Changelog:
    • Offering-v1.4 - Updated weather reward action.
    • Offering-v1.3 - More reward actions (spawnmob, worldtp, and improved heal).
    • Offering-v1.2 - Permissions system updated.
    • Offering-v1.1 - Amount specification, decay, and time and give reward actions added.
    • Offering-v1.0-beta - Plugin created. Features include rewards, reward-actions, altars, and offerings.
    Download:
    Click here, then hit "View Raw."

    Source:
    For you developers out there, check out the project on GitHub. If you want to get involved, feel free to PM me. I'm looking for at least one developer who would be willing to help me with this plugin.

    Servers:
    If your server uses the plugin, either PM me or comment below and I will advertise it here.
    • Islendingabok Nation-Based PVP

    Please let me know how you like the plugin, I'd love to get your feedback.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
    Stormbow likes this.
  2. I'm not entirely sure what you're asking.. I suppose I could add a feature like that.
     
  3. Offline

    Blondberd

    Well, something like you right click the alter with nothing in your hand, and it take a set amount of XP from you. The purpose I have in mind is a line of rooms with spawners and you have to fight the mobs to get enough XP to move on and get rewards.
     
  4. Ah, I see. That seems like a good thing to add. I'm sorry I haven't been able to update the plugin recently, but in the next large update, I will definitely include something like this. Thanks for your feedback :).
     

Share This Page