Paste #29909: Untitled Paste

Date: 2016/02/08 07:36:45 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


CustomGUI:
    type: assignment  
    actions:  
        on click:  
        - inventory open d:in@GUIInfo 
GUIInfo:
  type: inventory
  inventory: chest
  title: "<&b><&l>Color Guide 2.0"
  size: 45
  definitions:
    border: i@border_item
    return_button: i@return_button_item
    CreeperQuest: i@creeper_sjull:4
  slots:
    - "[border] [border] [border] [border] [border] [border] [border] [border] [border]" 
    - "[border] [] [CreeperQuest] [] [] [] [] [] [border]" 
    - "[border] [] [] [] [] [] [] [] [border]" 
    - "[border] [] [] [] [] [] [] [] [border]" 
    - "[border] [border] [border] [border] [border] [border] [border] [border] [return_button]" 



GUI_Inventory_World:
  type: world
  events:
    on player clicks in GUIInfo:
    - determine cancelled 

    on player clicks CreeperQuest in GUIINFO:
    - if <player.flag[kill_creeper_quest_cooldown].is_expired.not> { 
      - narrate "<&7><&o>You can repeat this quest in <player.flag[kill_creeper_quest_cooldown].expiration.formatted>" 
      - queue clear 
    } 
    - if <player.flag[kill_creeper_quest_count]||0> >= 5 { 
      - give xp quantity:150
      - narrate "<&2>$1000 has been added to your account."
      - give money qty:1000
      - flag player kill_creeper_quest_count:! 
      - flag player kill_creeper_quest_cooldown duration:24h 
      - queue clear 
    }
    - if <player.flag[kill_creeper_quest_cooldown]||false> { 
      - queue clear 
    } 
    - narrate "<&a>[Kill <&4>5 <&a>Creepers!]" 
    - flag player kill_creeper_quest 
    - flag player kill_creeper_quest_count:0.round 
    - narrate "<&a><player.flag[kill_creeper_quest_count].round||0> Creepers!"
    on player kills creeper: 
    - flag <context.damager.as_player> kill_creeper_quest_count:++
    - narrate "<&a>You have killed <player.flag[kill_creeper_quest_count].round> Creepers!"
    - if <context.damager.as_player.flag[kill_creeper_quest_count]> >= 5 { 
      - narrate "<&b>[Return to the Highlord]" targets:<context.damager.as_player> 
      - flag <context.damager.as_player> kill_creeper_quest:! 
    } 
return_button_item:
    type: item 
    material: i@redstone_torch_on 
    display name: "<&6><&l>Close Menu" 

CreeperQuest:
   type: item
   material: i@creeper_skull:4
   display name: "<&6>Creeper Quest"
   lore: 
   - "<&a>Kill <&c>7 <&7>Creepers!"
   - "<&7>Cooldown: Daily"