Paste #64265: Untitled Paste

Date: 2020/01/16 21:43:59 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


breadclicker:
  type: command
  name: breadclicker
  description: breadclicker
  usage: /breadclicker
  aliases:
  - bc
  script:
  - if <inventory[bcgui<player.uuid>bcguicontents]||null> == null:
      - note <inventory[bcgui]> as:bcgui<player.uuid>bcguicontents
      - wait 1t
      - inventory open d:bcgui<player.uuid>bcguicontents
      - flag player anim:<script[animation1]>
  - else:
    - inventory open d:bcgui<player.uuid>bcguicontents
bcgui:
  type: inventory
  inventory: CHEST
  title: <player.name>'s Bakery
  size: 54
  procedural items:
    - determine <list[].pad_right[42].with[empty]>
  slots:
    - "[noeffect] [] [] [] [] [] [] [] [prestige]"
    - "[] [] [] [] [] [] [] [] []"
    - "[] [] [] [] [breadclick] [] [] [] []"
    - "[] [] [] [] [] [] [] [] []"
    - "[] [] [] [] [] [] [] [] []"
    - "[redpane] [redpane] [redpane] [redpane] [redpane] [redpane] [redpane] [redpane] [redpane]"
areyousure:
  type: inventory
  inventory: CHEST
  title: Reset Confirmation
  size: 9
  slots:
    - "[deny] [deny] [deny] [deny] [nothing] [accept] [accept] [accept] [accept]"
animations:
  type: inventory
  inventory: CHEST
  title: Animations
  size: 9
  slots:
    - "[animationselect1] [nothing] [animationselect2] [nothing] [animationselect3] [nothing] [animationselect4] [nothing] [noanimation]"
deny:
  type: item
  material: red_stained_glass_pane
  display name: <&c><bold>DENY
animationselect1:
  type: item
  material: paper
  display name: <&a><bold>Animation 1
animationselect2:
  type: item
  material: paper
  display name: <&a><bold>Animation 2
animationselect3:
  type: item
  material: paper
  display name: <&a><bold>Animation 3
animationselect4:
  type: item
  material: paper
  display name: <&a><bold>Animation 4
noanimation:
  type: item
  material: barrier
  display name: <&c><bold>No Animation
nothing:
  type: item
  material: black_stained_glass_pane
  display name: '<&r>'
accept:
  type: item
  material: lime_stained_glass_pane
  display name: <&a><bold>CONFIRM
empty:
  type: item
  material: black_stained_glass_pane
  display name: '<&r>'
prestige:
  type: item
  material: nether_star
  display name: <green><bold>Prestige
noeffect:
  type: item
  material: comparator
  display name: <red><bold>Animations
howto:
  type: item
  material: writable_book
  display name: <a>What to Know
redpane:
  type: item
  material: red_stained_glass_pane
  display name: <&o><bold>???
breadclick:
  type: item
  material: bread
  display name: <gold><bold>0<&sp><light_purple><bold>loaves
  lore:
  - "<&r>"
  - "<gray>CPS:<&sp><green>-"
# BREAD HEAD ----> player_head[skull_skin=5384d228-671d-4e0c-aa72-d4331835efb2|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTE5OTdkYTY0MDQzYjI4NDgyMjExNTY0M2E2NTRmZGM0ZThhNzIyNjY2NGI0OGE0ZTFkYmI1NTdiNWMwZmUxNCJ9fX0=]
animationpane:
  type: item
  material: yellow_stained_glass_pane
  display name: '<&r>'
redanimationpane:
  type: item
  material: red_stained_glass_pane
  display name: '<&r>'
orange:
  type: item
  material: orange_stained_glass_pane
  display name: '<&r>'
yellow:
  type: item
  material: yellow_stained_glass_pane
  display name: '<&r>'
lime:
  type: item
  material: lime_stained_glass_pane
  display name: '<&r>'
lightblue:
  type: item
  material: light_blue_stained_glass_pane
  display name: '<&r>'
blue:
  type: item
  material: blue_stained_glass_pane
  display name: '<&r>'
purple:
  type: item
  material: purple_stained_glass_pane
  display name: '<&r>'
magenta:
  type: item
  material: magenta_stained_glass_pane
  display name: '<&r>'
farmer:
  type: item
  material: lime_stained_glass_pane
  display name: '<&d>Farmer'
  lore:
  - '<&7>Cost: <&a>15<&7> loaves'
  - '<&r>'
  - '<&a>Click to buy!'
farmeravailable:
  type: item
  material: player_head[skull_skin=804f22db-09a6-4f59-9431-fc6d8bd67d78|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjhjOTg2Nzk5YmFmZTcxODRhOGFlMjMzZGI2ZDlhYjhlOWI4NDRmYTlkNGRhNjhmYTNkYzk0YWM4ZmU4MjAifX19]
  display name: '<&d>Farmer'
  lore:
  - '<&7>Cost: <&a>15<&7> loaves'
  - '<&7>Qty: <&e><player.flag[farmers]>'
  - '<&7>BPS: <&e><player.flag[farmerbps]>'
  #- '<gold><bold><player.flag[clicks]><&sp><light_purple><bold>loaves'
  - '<&r>'
  - '<&a>Click to buy!'
  - '<&7>Wallet: <&b><player.flag[clicks]> <&7>loaves'
farmernotavailable:
  type: item
  material: player_head[skull_skin=804f22db-09a6-4f59-9431-fc6d8bd67d78|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjhjOTg2Nzk5YmFmZTcxODRhOGFlMjMzZGI2ZDlhYjhlOWI4NDRmYTlkNGRhNjhmYTNkYzk0YWM4ZmU4MjAifX19]
  display name: '<&d>Farmer'
  lore:
  - '<&7>Cost: <&a>15<&7> loaves'
  - '<&7>Qty: <&e><player.flag[farmers]>'
  - '<&7>BPS: <&e><player.flag[farmerbps]>'
  #- '<gold><bold><player.flag[clicks]><&sp><light_purple><bold>loaves'
  - '<&r>'
  - '<&c>Not enough loaves!'
  - '<&7>Wallet: <&b><player.flag[clicks]> <&7>loaves'
#SHOULD I USER BARRIERS OR RED PANES FOR UNIDENTIFIED BUILDINGS?
clicker:
  type: world
  debug: true
  events:
    on player left clicks breadclick in bcgui:
    - determine passively cancelled
    - flag player totalclicks:++.
    - flag player clicks:++
    - playsound <player> sound:ENTITY_CHICKEN_EGG pitch:2
    - inventory adjust d:bcgui<player.uuid>bcguicontents slot:23 display_name:<gold><bold><player.flag[clicks]><&sp><light_purple><bold>loaves
    - if <player.flag[clicks]> == 1:
      - inventory adjust d:bcgui<player.uuid>bcguicontents slot:23 display_name:<gold><bold>1<&sp><light_purple><bold>loaf
    - if <player.flag[clicks]> == 3000:
      - playsound <player> sound:ENTITY_PLAYER_LEVELUP pitch:1o
      - advancement id:new_beginnings icon:bread "title:I love you 3000" "description:Reach 3000 Loaves! R.I.P Loafy Stark *sadface*"
      - advancement id:new_beginnings grant:<player>
    - if <player.flag[anim]||null> != null:
      - run <player.flag[anim]>
    - if <player.flag[totalclicks]> == 15:
      - narrate hi
      - inventory set d:bcgui<player.uuid>bcguicontents slot:46 o:farmer
      - playsound <player> sound:ENTITY_CHICKEN_EGG pitch:1
    - if <player.flag[farmerunlocked]||null> == true:
      - if <player.flag[clicks]> >= 15:
        - inventory set d:bcgui<player.uuid>bcguicontents slot:46 o:farmeravailable
    - run clickspeed
    - if <player.flag[farmerunlocked]||null> == true:
      - if <player.flag[clicks]> < 15:
    #BUY PRICE
        - inventory set d:bcgui<player.uuid>bcguicontents slot:46 o:farmernotavailable
    on player left clicks prestige in bcgui:
    - inventory open d:<inventory[areyousure]>
    on player left clicks accept in areyousure:
    - determine passively cancelled
    - note remove as:bcgui<player.uuid>bcguicontents
    - wait 1t
    - note <inventory[bcgui]> as:bcgui<player.uuid>bcguicontents
    - flag player clicks:!
    - flag player totalclicks:!
    - flag player farmerunlocked:!
    - flag player farmers:!
    - inventory open d:bcgui<player.uuid>bcguicontents
    on player left clicks farmer in bcgui:
    - determine passively cancelled
    - flag player farmerunlocked:true
    - flag player farmers:++
    - flag player clicks:-:15
    #subtract price for farmer
    - playsound <player> sound:BLOCK_NOTE_BLOCK_PLING pitch:1
    - inventory adjust d:bcgui<player.uuid>bcguicontents slot:23 display_name:<gold><bold><player.flag[clicks]><&sp><light_purple><bold>loaves
    #update the breadclicker count
    - if <player.flag[clicks]> < 15:
      - inventory set d:bcgui<player.uuid>bcguicontents slot:46 o:farmernotavailable
    #if not enough loaves, display farmernotavailable
    - if <player.flag[clicks]> >= 15:
      - inventory set d:bcgui<player.uuid>bcguicontents slot:46 o:farmeravailable
    #if enough, display farmeravailable
    on player left clicks farmeravailable in bcgui:
    - determine passively cancelled
    - flag player clicks:-:15
    #BUY PRICE
    - flag player farmers:++
    - playsound <player> sound:BLOCK_NOTE_BLOCK_PLING pitch:2
    - inventory adjust d:bcgui<player.uuid>bcguicontents slot:23 display_name:<gold><bold><player.flag[clicks]><&sp><light_purple><bold>loaves
    - if <player.flag[clicks]> < 15:
    #BUY PRICE
      - inventory set d:bcgui<player.uuid>bcguicontents slot:46 o:farmernotavailable
    - if <player.flag[clicks]> >= 15:
      - inventory set d:bcgui<player.uuid>bcguicontents slot:46 o:farmeravailable
    on shutdown:
      - adjust server save
    on system time hourly:
      - adjust server save
    on player left clicks farmernotavailable in bcgui:
    - determine passively cancelled
    - playsound <player> sound:ENTITY_VILLAGER_NO pitch:1
    on player left clicks deny in areyousure:
    - determine passively cancelled
    - inventory open d:bcgui<player.uuid>bcguicontents
    on player left clicks noeffect in bcgui:
    - determine passively cancelled
    - inventory open d:<inventory[animations]>
    on player left clicks animationselect1 in animations:
    - determine passively cancelled
    - flag player anim:<script[animation1]>
    - inventory open d:bcgui<player.uuid>bcguicontents
    on player left clicks animationselect2 in animations:
    - determine passively cancelled
    - flag player anim:<script[animation2]>
    - inventory open d:bcgui<player.uuid>bcguicontents
    on player left clicks animationselect3 in animations:
    - determine passively cancelled
    - flag player anim:<script[animation3]>
    - inventory open d:bcgui<player.uuid>bcguicontents
    on player left clicks animationselect4 in animations:
    - determine passively cancelled
    - flag player anim:<script[animation4]>
    - inventory open d:bcgui<player.uuid>bcguicontents
    on player left clicks noanimation in animations:
    - determine passively cancelled
    - flag player anim:!
    - inventory open d:bcgui<player.uuid>bcguicontents
    on player clicks in bcgui priority:1000:
    - determine cancelled
    on player clicks in animations priority:1000:
    - determine cancelled
    on player clicks in areyousure priority:1000:
    - determine cancelled
    on player join:
    - narrate <util.date.time.second>
    - if <inventory[bcgui<player.uuid>bcguicontents]||null> != null:
      - wait 1s
      - if <player.flag[clicks]||null> > 1:
        - narrate "<&e>You currently have <&6><&l><player.flag[clicks]><&sp><&d><&l>loaves <&e>and counting in your bakery!"
      - if <player.flag[clicks]||null> == 1:
        - narrate "<&e>You currently have 1 loaf <&e>and counting in your bakery!"
      - if <player.flag[clicks]||null> == null:
        - narrate "<&e>You currently have 0 loaves <&e>and counting in your bakery!"
#farmerbps:
  #type: task
  #debug: true
  #script:
    #- if <player.flag[farmers]||null> >= 1:
    #if the player has 1 or more farmers
      #- flag player farmerbps:<player.flag[farmers].mul[0.1]>
    #the bread per second would be 0.1 times the amount of farmers
      #- flag player clicks:+:<player.flag[farmerbps]>
    #add the farmer's bread per sec to the clicks flag
clickspeed:
  type: task
  debug: false
  script:
  - flag player cps:++
  - if <player.flag[cps]> == 1:
    - wait 1s
    - inventory adjust d:bcgui<player.uuid>bcguicontents slot:23 lore:|<gray>CPS:<&sp><green><player.flag[cps]>
    - flag player cps:!
    - run counter
counter:
  type: task
  debug: false
  script:
  - wait 3s
  - if <player.flag[cps]||null> == null:
    - inventory adjust d:bcgui<player.uuid>bcguicontents slot:23 lore:|<gray>CPS:<&sp><green>-
animation1:
  type: task
  debug: false
  script:
  - foreach 15|13|14|22|31|32|33|24 as:slot:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[slot]> o:animationpane
  - wait 2t
  - foreach 15|13|14|22|31|32|33|24 as:slot:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[slot]> o:empty
animation2:
  type: task
  debug: false
  script:
  - wait 1t
  - foreach 15|13|33|31 as:slot:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[slot]> o:animationpane
  - wait 2t
  - foreach 15|13|33|31 as:slot:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[slot]> o:empty
  - foreach 3|7|39|43 as:slot:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[slot]> o:animationpane
  - wait 2t
  - foreach 3|7|39|43 as:slot:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[slot]> o:empty
animation3:
  type: task
  debug: false
  script:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:32 o:animationpane
    - inventory set d:bcgui<player.uuid>bcguicontents slot:14 o:animationpane
    - inventory set d:bcgui<player.uuid>bcguicontents slot:22 o:animationpane
    - inventory set d:bcgui<player.uuid>bcguicontents slot:24 o:animationpane
    - wait 2t
    - inventory set d:bcgui<player.uuid>bcguicontents slot:32 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:14 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:22 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:24 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:41 o:animationpane
    - inventory set d:bcgui<player.uuid>bcguicontents slot:5 o:animationpane
    - wait 1t
    - inventory set d:bcgui<player.uuid>bcguicontents slot:41 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:5 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:21 o:animationpane
    - inventory set d:bcgui<player.uuid>bcguicontents slot:25 o:animationpane
    - wait 1t
    - inventory set d:bcgui<player.uuid>bcguicontents slot:21 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:25 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:20 o:animationpane
    - inventory set d:bcgui<player.uuid>bcguicontents slot:26 o:animationpane
    - wait 1t
    - inventory set d:bcgui<player.uuid>bcguicontents slot:20 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:26 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:19 o:animationpane
    - inventory set d:bcgui<player.uuid>bcguicontents slot:27 o:animationpane
    - wait 1t
    - inventory set d:bcgui<player.uuid>bcguicontents slot:19 o:empty
    - inventory set d:bcgui<player.uuid>bcguicontents slot:27 o:empty
animation4:
  type: task
  debug: false
  script:
  - wait 1t
  - foreach 13/redanimationpane|14/orange|15/yellow|24/lime|33/lightblue|32/blue|31/magenta|22/purple as:pair:
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[pair].before[/]> o:<[pair].after[/]>
    - wait 1t
    - inventory set d:bcgui<player.uuid>bcguicontents slot:<[pair].before[/]> o:empty