Paste #28854: Untitled Paste

Date: 2016/01/21 09:44:16 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 "<&a>You have already rolled the dice! Please wait <player.flag[dice_roll_cooldown].expiration.formatted> before rolling the dice again." 
                - queue clear
            } 
            - take money quantity:3500 
            - flag player dice_roll_cooldown duration:12h
            - narrate "<&a>$3,500 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: 
                - narrate "<&6>You rolled between 47! You win a <&8>Lucky <&7>Dice <&6>Armor Set!"
                - give i@diamond_helmet[display_name=<&8>Lucky<&7><&sp>Dice<&f><&sp>Helmet;enchantments=PROTECTION_ENVIRONMENTAL,4|DURABILITY,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_chestplate[display_name=<&8>Lucky<&7><&sp>Dice<&f><&sp>Chestplate;enchantments=PROTECTION_ENVIRONMENTAL,4|DURABILITY,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_leggings[display_name=<&8>Lucky<&7><&sp>Dice<&f><&sp>Leggings;enchantments=PROTECTION_ENVIRONMENTAL,4|DURABILITY,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_boots[display_name=<&8>Lucky<&7><&sp>Dice<&f><&sp>Boots;enchantments=PROTECTION_ENVIRONMENTAL,4|DURABILITY,3|PROTECTION_FALL,4];lore=It<&sq>s<&sp>only<&sp>a<&sp>gambling<&sp>problem<&sp>if<&sp>you<&sq>re<&sp>losin<&sq>.]
            - 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: 
                - inject default

        - 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: 
    - narrate "<&6>You've rolled <player.flag[diceNum]>! You win <&e>4x Super Golden Apples!" 
    - give  i@golden_apple,1[apple_enchanted=true] qty:4

GoldenApples:
    type: task 
    script: 
    - narrate "<&6>You've rolled <player.flag[diceNum]>! You win <&e>32x Golden Apples!"
    - give i@golden_apple qty:32

Obsidian:
    type: task 
    script: 
        - narrate "<&6>You've rolled <player.flag[diceNum]>! You win <&5>16x Obsidian!"  
        - give i@obsidian qty:16

Diamond:
    type: task 
    script: 
        - narrate "<&6>You've rolled <player.flag[diceNum]>! You win <&b>16x Diamonds!"
        - give i@diamond qty:16
EnderPearl:
    type: task 
    script: 
        - narrate "<&6>You've rolled <player.flag[diceNum]>! You win <&5>6x Enderpearls!"
        - give i@ender_pearl qty:6
PotionSet:
    type: task 
    script: 
        - narrate "<&6>You've rolled <player.flag[diceNum]>! You win <&e>A Potion Set!"
        - give i@373,8297 qty:3
        - give i@373,8290 qty:3
        - give i@373,8291 qty:2
default:
    type: task
    script:
        - narrate "<&6>Sorry you didn't win anything this time!"