Paste #67381: Untitled Paste

Date: 2020/04/12 19:34:31 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


DailyInv: 
  type: inventory
  inventory: CHEST
  title: "<&2>SedexCraft Daily Rewards"
  size: 54
  definitions:
    bg: black_stained_glass_pane
  slots:
    - "[bg] [bg] [bg] [bg] [info] [bg] [bg] [bg] [bg]" 
    - "[bg] [] [] [] [] [] [] [] [bg]"
    - "[bg] [] [dayone] [daytwo] [daythree] [dayfour] [dayfive] [] [bg]" 
    - "[bg] [] [] [daysix] [dayseven] [monthly] [] [] [bg]"
    - "[bg] [] [] [] [] [] [] [] [bg]"
    - "[bg] [bg] [bg] [bg] [bg] [bg] [bg] [bg] [bg]"

info:
  type: item
  material: flower_banner_pattern[flags=HIDE_POTION_EFFECTS]
  display name: "<&a>Daily Rewards"
  lore:
  - '<&7>Your current day: <&a><player.flag[day]||1>'
  - '<&7>You can claim again in: <&a><player.flag[cooldown].expiration.in_hours.round||0> <&7>hours.'

dayone:
  type: item
  material: iron_nugget
  display name: "<&a>Day One <&7>rewards:"
  lore:
  - ""
  - "<&7>- <&c>1x <&a>Antique"
  - "<&7>- <&c>1x <&a>Medium Token"
  - "<&7>- <&a>100$"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

daytwo:
  type: item
  material: gold_ingot
  display name: "<&a>Day Two <&7>rewards:"
  lore:
  - ""
  - "<&7>- <&c>1x <&a>Uncommon Key"
  - "<&7>- <&c>1x <&a>Lucky Block"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

daythree:
  type: item
  material: iron_ingot
  display name: "<&a>Day Three <&7>rewards:"
  lore:
  - ""
  - "<&7>- <&c>2x <&a>Vote Key"
  - "<&7>- <&c>1x <&a>Token of Insight"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

dayfour:
  type: item
  material: gold_ingot
  display name: "<&a>Day Four <&7>rewards:"
  lore:
  - ""
  - "<&7>- <&c>2x <&a>Common Key"
  - "<&7>- <&c>2x <&a>Medium Token"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

dayfive:
  type: item
  material: iron_block
  display name: "<&a>Day Five <&7>rewards:"
  lore:
  - ""
  - "<&7>- <&c>1x <&a>Exotic Bottle"
  - "<&7>- <&c>10x <&a>Experience Bottle"
  - "<&7>- <&c>$150"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

daysix:
  type: item
  material: gold_block
  display name: "<&a>Day Six <&7>rewards:"
  lore:
  - ""
  - "<&7>- <&c>3x <&a>Exotic Bottle"
  - "<&7>- <&c>3x <&a>Medium Token"
  - "<&7>- <&c>1x <&a>Uncommon Key"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

dayseven:
  type: item
  material: diamond_block
  display name: "<&a>Day Seven <&7>rewards:"
  lore:
  - ""
  - "<&7>- <&c>1x <&a>Large Token"
  - "<&7>- <&c>3x <&a>Uncommon Key"
  - "<&7>- <&a>200$"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

monthly:
  type: item
  material: emerald_block
  display name: "<&a>Monthly Rewards"
  lore:
  - ""
  - "<&7><&a>One of:"
  - " <&7>- Monthly Axe"
  - " <&7>- Monthly Sword"
  - " <&7>- Monthly Pickaxe"
  - " <&7>- Monthly Shield"
  - " <&7>- Relic"
  - " <&7>- Repair Gem"
  - " <&7>- x128 Vote Token"
  - " <&7>- 5x Large Token"
  - " <&7>- $1000"
  - " <&7>- 10x Uncommon Keys"
  - " <&7>- Legendary Item"
  - ""
  - "<&7>Right click to"
  - "<&7>claim your reward."

DailyCommand:
  type: command
  name: daily
  permission: daily.use
  permission message: "<&a>Work in progress."
  description: "Claim your daily reward!"
  usage: /daily
  script:
  - inventory open d:DailyInv

monthlysword:
  type: item
  material: diamond_sword
  display name: "<&e><&l>Monthly Sword"
  enchantments:
  - BANE_OF_ARTHROPODS:4
  - SHARPNESS:4
  - SMITE:6
  - UNBREAKING:5
  lore:
  - '<&7>A monthly reward.'

monthlyaxe:
  type: item
  material: diamond_axe
  display name: "<&e><&l>Monthly axe"
  enchantments:
  - BANE_OF_ARTHROPODS:4
  - SHARPNESS:4
  - SMITE:6
  - UNBREAKING:5
  lore:
  - '<&7>A monthly reward.'

monthlypickaxe:
  type: item
  material: diamond_pickaxe
  display name: "<&e><&l>Monthly Pickaxe"
  enchantments:
  - EFFICIENCY:7
  - UNBREAKING:5
  - SILK_TOUCH:2
  lore:
  - '<&7>A monthly reward.'

monthlyshield:
  type: item
  material: shield
  display name: "<&e><&l>Monthly Shield"
  enchantments:
  - PROTECTION:3
  - UNBREAKING:5
  - THORNS:3
  lore:
  - '<&7>A monthly reward.'

DailyHandler:
  type: world
  debug: false
  events:
    on player clicks dayone in DailyInv:
    - if <player.flag[day]> >= 1:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed this reward!"
      - queue clear
    - if <player.has_flag[cooldown]>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed your reward today!"
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player day:1 d:48h
    - flag player cooldown d:24h
    - flag player monthly:++ d:48h
    - give Antique qty:1
    - give mediumtoken qty:1
    - give money qty:100
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your daily reward."
    on player clicks daytwo in DailyInv:
    - if <player.has_flag[day].not> || <player.flag[day]> == 0:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward, please claim Day One first."
      - queue clear
    - if <player.flag[day]> >= 2:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed this reward!"
      - queue clear
    - if <player.has_flag[cooldown]>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed your reward today!"
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player day:2 d:48h
    - flag player cooldown d:24h
    - flag player monthly:++ d:48h
    - execute as_server "crazycrate give p Uncommon 1 <player.name>"
    - give luckyblock
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your daily reward."
    on player clicks daythree in DailyInv:
    - if <player.has_flag[day].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward, please claim Day One first."
      - queue clear
    - if <player.flag[day]> >= 3:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed this reward!"
      - queue clear
    - if <player.flag[day].is[MORE].to[1].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward yet."
      - queue clear
    - if <player.has_flag[cooldown]>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed your reward today!"
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player day:3 d:48h
    - flag player cooldown d:24h
    - flag player monthly:++ d:48
    - execute as_server "crazycrate give p vote 2 <player.name>"
    - give lootpot
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your daily reward."
    on player clicks dayfour in DailyInv:
    - if <player.has_flag[day].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward, please claim Day One first."
      - queue clear
    - if <player.flag[day]> >= 4:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed this reward!"
      - queue clear
    - if <player.flag[day].is[MORE].to[2].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward yet."
      - queue clear
    - if <player.has_flag[cooldown]>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed your reward today!"
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player day:4 d:48h
    - flag player cooldown d:24h
    - flag player monthly:++ d:48h
    - execute as_server "crazycrate give p common 2 <player.name>"
    - give mediumtoken qty:2
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your daily reward."
    on player clicks dayfive in DailyInv:
    - if <player.has_flag[day].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward, please claim Day One first."
      - queue clear
    - if <player.flag[day]> >= 5:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed this reward!"
      - queue clear
    - if <player.flag[day].is[MORE].to[3].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward yet."
      - queue clear
    - if <player.has_flag[cooldown]>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed your reward today!"
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player day:5 d:48h
    - flag player cooldown d:24h
    - flag player monthly:++ d:48h
    - give exoticbottle qty:1
    - give exp_bottle qty:10
    - give money qty:150
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your daily reward."
    on player clicks daysix in DailyInv:
    - if <player.has_flag[day].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward, please claim Day One first."
      - queue clear
    - if <player.flag[day]> >= 6:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed this reward!"
      - queue clear
    - if <player.flag[day].is[MORE].to[4].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward yet."
      - queue clear
    - if <player.has_flag[cooldown]>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed your reward today!"
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player day:6 d:48h
    - flag player cooldown d:24h
    - flag player monthly:++ d:48h
    - give exoticbottle qty:3
    - give mediumtoken qty:3
    - execute as_server "crazycrate give p uncommon 1 <player.name>"
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your daily reward."
    on player clicks dayseven in DailyInv:
    - if <player.has_flag[day].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward, please claim Day One first."
      - queue clear
    - if <player.flag[day].is[MORE].to[5].not>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim this reward yet."
      - queue clear
    - if <player.has_flag[cooldown]>:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You have already claimed your reward today!"
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player day:0 d:48h
    - flag player cooldown d:24h
    - flag player monthly:++ d:48h
    - give largetoken qty:3
    - give money qty:300
    - execute as_server "crazycrate give p uncommon 3 <player.name>"
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your daily reward."
    on player clicks monthly in DailyInv:
    - if <player.flag[monthly]||0> < 30:
      - inventory close
      - narrate "<&7>[<&a>DailyRewards<&7>] You can't claim a <&a>Monthly <&7>reward yet."
      - narrate "<&7>[<&a>DailyRewards<&7>] You are currently at day <&a><player.flag[monthly]||0><&7>."
      - queue clear
    - determine cancelled passively
    - inventory close
    - flag player monthly:!
    - narrate "<&7>[<&a>DailyRewards<&7>] You have claimed your <&a>Monthly <&a>reward."
    - announce "<&7>[<&a>DailyRewards<&7>] <&a><player.name> <&7>has claimed their <&a>Monthly <&7>reward."
    - random:
      - give monthlysword
      - give monehlyaxe
      - give monthlypickaxe
      - give monthlyshield
      - give relic
      - give repairgem
      - give votetoken qty:128
      - give largetoken qty:5
      - give money qty:1500
      - execute as_server "crazycrates give p Uncommon 10 <player.name>"
      - execute as_server "md give <player.name> -a 1 -t Legendary"
    on player clicks info in DailyInv:
    - determine cancelled 
    on player drags in DailyInv:
    - determine cancelled
    on player clicks in DailyInv:
    - determine cancelled passively