Paste #28349: NEWBIE WORK FROM THIS

Date: 2016/01/12 14:51:54 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


DiceRollCommand:
    Type: World
    Events:
        On DiceRoll Command:
            - determine passively fulfilled
            - if <player.has_flag[dice_roll_cooldown]> {
                - narrate "You have already rolled the dice! Please wait <player.flag[dice_roll_cooldown].expiration.formatted> before rolling the dice again."
                - queue clear
            }
            - flag player dice_roll_cooldown duration:5m
            - take money quantity:1000
            - narrate "<&a>$1,000 has been deducted from your account."
            - narrate "<&6>Rolling Dice!"
            - run RollDice delay:2s


DiceFireworks:
    Type: Task
    Script:
        - firework <player.location> star primary:yellow fade:white
        - firework <player.location> star primary:red fade:white


RollDice:
    Type: Task
    Script:
        - flag player diceNum:<util.random.int[1].to[50]>
        - choose <player.flag[diceNum]>:
            - case 50:
                - announce "<&2><player.name><&6> just rolled the<&l> GRAND PRIZE: <&2><&l>6x Creeper Eggs!"
                - narrate "<&6>You rolled <&l>GRAND PRIZE! You win!"
                - give i@383,50 <player> qty:6
                - inject DiceFireworks
            - case 49:
                - announce "<&2><player.name><&6> just rolled the<&l> Second Grand Prize: <&2><&l>$50.000!"
                - narrate "<&a>$50,000 has been added to your account."
                - give money quantity:50000
                - inject DiceFireworks
            - case 48:
                - announce "<&2><player.name><&6> just rolled the<&l> Third Grand Prize: <&2><&l>$35.000!"
                - narrate "<&a>$35,000 has been added to your account."
                - give money quantity:35000
                - inject DiceFireworks
            - case 47:
                - Diamond Armor
            - case 46:
                - narrate "<&6>You've rolled 46! You win!"
                - give i@diamond_Sword[display_name=<&8>Lucky<&7><&sq>Dice<&f><&sq>Sword;enchantments=DAMAGE_ALL,5|DURABILITY,3|FIRE_ASPECT,2];lore=It<&sq>s<&sp>only<&sp>a<&sp>gambling<&sp>problem<&sp>if<&sp>you<&sq>re<&sp>losin<&sq>.]
                - give i@bow[display_name=<&8>Lucky<&7><&sq>Dice<&f><&sq>Bow;enchantments=ARROW_DAMAGE,5]
                - give i@diamond_pickaxe[display_name=<&8>Lucky<&7><&sq>Dice<&f><&sq>Pickaxe;enchantments=DIG_SPEED,5|DURABILITY,3|LOOT_BONUS_BLOCKS,3|];lore=It<&sq>s<&sp>only<&sp>a<&sp>gambling<&sp>problem<&sp>if<&sp>you<&sq>re<&sp>losin<&sq>.]
                - give i@diamond_axe[display_name=<&8>Lucky<&7><&sq>Dice<&f><&sq>Axe;enchantments=DIG_SPEED,5|DURABILITY,3|LOOT_BONUS_BLOCKS,3|];lore=It<&sq>s<&sp>only<&sp>a<&sp>gambling<&sp>problem<&sp>if<&sp>you<&sq>re<&sp>losin<&sq>.]
            - case 45:
                - inject RoyalArmor
            - case 44:
                - inject RoyalArmor
            - case 43:
                - inject RoyalArmor
            - case 42:
                - inject SuperGoldenApples
            - case 41:
                - inject SuperGoldenApples
            - case 40:
                - inject SuperGoldenApples
            - case 39:
                - inject GoldenApples
            - case 38:
                - inject GoldenApples
            - case 37:
                - inject GoldenApples
            - case 36:
                - inject GoldenApples
            - case 35:
                - inject GoldenApples
            - case 34:
                - inject GoldenApples
            - case 33:
                - inject GoldenApples
            - case 32:
                - inject GoldenApples
            - case 31:
                - inject GoldenApples
            - case 30:
                - inject Obsidian
            - case 29:
                - inject Obsidian
            - case 28:
                - inject Obsidian
            - case 27:
                - inject Obsidian
            - case 26:
                - inject Diamond
            - case 25:
                - inject Diamond
            - case 24:
                - inject Diamond
            - case 23:
                - inject EnderPearl
            - case 22:
                - inject EnderPearl
            - case 21:
                - inject EnderPearl
            - case 20:
                - inject EnderPearl
            - case 19:
                - inject EnderPearl
            - case 18:
                - inject PotionSet
            - case 17:
                - inject PotionSet
            - case 16:
                - inject PotionSet
            - default:
                - nothing
        - flag player diceNum:!


RoyalArmor:
    type: task
    script:
        - narrate "<&6>You've rolled <player.flag[diceNum]>! You win!"
        - give i@diamond_helmet[display_name=<&8><&lb><&5>Royal Helmet<&8><&rb>;enchantments=PROTECTION_ENVIRONMENTAL,4]
        - give i@diamond_chestplate[display_name=<&8><&lb><&5>Royal Chestplate<&8><&rb>;enchantments=PROTECTION_ENVIRONMENTAL,4]
        - give i@diamond_leggings[display_name=<&8><&lb><&5>Royal Leggings<&8><&rb>;enchantments=PROTECTION_ENVIRONMENTAL,4]
        - give i@diamond_boots[display_name=<&8><&lb><&5>Royal Boots<&8><&rb>;enchantments=PROTECTION_ENVIRONMENTAL,4|PROTECTION_FALL,4]

SuperGoldenApples:
    type: task
    script:
        - 4x Super Golden

GoldenApples:
    type: task
    script:
        - 16x Golden

Obsidian:
    type: task
    script:
        - 16x Obsidian

Diamond:
    type: task
    script:
        - 16x Diamond

EnderPearl:
    type: task
    script:
        - 6x Ender Pearl

PotionSet:
    type: task
    script:
        - Potion Set (3x STR II (4MIN), 3x SPEED II (4MIN), 2x Fire res 8m)