Paste #30228: Untitled Paste

Date: 2016/02/12 12:23:33 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


CustomQuestGUI: 
    type: assignment   
    actions:   
        on click:        
        - inventory open d:in@QuestGUI 
        - flag server "currentplayeropen:<player>"
        - inject QuestRewards
QuestGUI: 
  type: inventory 
  inventory: chest 
  title: "<&6><&l>Quest Master" 
  size: 63 
  definitions: 
    border: i@border_item 
    return_button: i@return_button 
    CreeperQuest: i@CreeperQuest 
    PlayerQuest: i@Playerquest 
    DailyPlayerQuest: i@DailyPlayerQuest
    SkeletonQuest: i@SkeletonQuest
    BowPlayerQuest: i@BowPlayerQuest
  slots: 
    - "[border] [border] [border] [border] [border] [border] [border] [border] [border]"  
    - "[border] [DailyPlayerQuest] [] [PlayerQuest] [] [BowPlayerQuest] [] [] [border]"  
    - "[border] [] [] [] [] [] [] [] [border]"  
    - "[border] [CreeperQuest] [] [SkeletonQuest] [] [] [] [] [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 QuestGUI: 
    - determine cancelled 

    on player clicks PlayerQuest in QuestGUI: 
    - if <player.flag[kill_player_quest_weekly_cooldown].is_expired.not> {  
      - narrate "<&7><&o>You can repeat this quest in <player.flag[kill_player_quest_weekly_cooldown].expiration.formatted>"  
      - queue clear  
    }  
    - if <player.flag[kill_player_quest_weekly_cooldown]||false> {  
      - queue clear  
    } 
    - flag player Quest_Log_Count:++
    - flag player kill_player_quest_weekly  
    - flag player kill_player_quest_weekly_count:0 
    - narrate "<&6>-=+ Kill <&c>30 <&6>Players +=-" 
    - narrate "<&a><player.flag[kill_player_quest_weekly_count].round||0> players!" 

    on player kills player:  
    - flag <context.damager.as_player> kill_player_quest_weekly_count:++  
    - narrate "<&a>You have killed <player.flag[kill_player_quest_weekly_count].round> players!" 
    - if <context.damager.as_player.flag[kill_player_quest_weekly_count]> >= 30 {  
      - narrate "[<&b>Return to the Quest Master]" targets:<context.damager.as_player>  
      - flag <context.damager.as_player> kill_player_quest_weekly:!  
    }  

    on player clicks DailyPlayerQuest in QuestGUI: 
    - if <player.flag[kill_player_quest_daily_cooldown].is_expired.not> {  
      - narrate "<&7><&o>You can repeat this quest in <player.flag[kill_player_quest_daily_cooldown].expiration.formatted>"  
      - queue clear  
    }  
    - if <player.flag[kill_player_quest_daily_cooldown]||false> {  
      - queue clear  
    } 
    - flag player kill_player_quest_daily  
    - flag player kill_player_quest_daily_count:0 
    - narrate "<&6>-=+ Kill <&c>5 <&6>Players +=-" 
    - narrate "<&a><player.flag[kill_player_quest_daily_count].round||0> players!" 

    on player kills player:  
    - flag <context.damager.as_player> kill_player_quest_daily_count:++  
    - narrate "<&a>You have killed <player.flag[kill_player_quest_daily_count].round> players!" 
    - if <context.damager.as_player.flag[kill_player_quest_daily_count]> >= 5 {  
      - narrate "[<&b>Return to the Quest Master]" targets:<context.damager.as_player>  
      - flag <context.damager.as_player> kill_player_quest_daily:!  
    }  
    on player clicks CreeperQuest in QuestGUI: 
    - 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_cooldown]||false> {  
      - queue clear  
    }  
    - flag player kill_creeper_quest  
    - flag player kill_creeper_quest_count:0.round  
    - narrate "<&6>-=+ Kill <&a>5 <&6>Creepers +=-" 
    - 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 Quest Master]" targets:<context.damager.as_player>  
      - flag <context.damager.as_player> kill_creeper_quest:!  
    }  
    on player clicks return_button IN QuestGUI: 
    - inventory close 

    on player clicks SkeletonQuest in QuestGUI: 
    - if <player.flag[kill_skeleton_quest_cooldown].is_expired.not> {  
      - narrate "<&7><&o>You can repeat this quest in <player.flag[kill_skeleton_quest_cooldown].expiration.formatted>"  
      - queue clear  
    }  
    - if <player.flag[kill_skeleton_quest_cooldown]||false> {  
      - queue clear  
    }  
    - flag player kill_skeleton_quest  
    - flag player kill_skeleton_quest_count:0.round  
    - narrate "<&6>-=+ Kill <&a>10 <&6>SkeletonS +=-" 
    - narrate "<&a><player.flag[kill_skeleton_quest_count].round||0> Skeletons!" 

    on player kills skeleton:  
    - flag <context.damager.as_player> kill_skeleton_quest_count:++ 
    - narrate "<&a>You have killed <player.flag[kill_skeleton_quest_count].round> Skeletons!" 
    - if <context.damager.as_player.flag[kill_skeleton_quest_count]> >= 10 {  
      - narrate "<&b>[Return to the Quest Master]" targets:<context.damager.as_player>  
      - flag <context.damager.as_player> kill_skeleton_quest:!

    on player clicks BowPlayerQuest in QuestGUI: 
    - if <player.flag[kill_player_quest_bow_cooldown].is_expired.not> {  
      - narrate "<&7><&o>You can repeat this quest in <player.flag[kill_player_quest_bow_cooldown].expiration.formatted>"  
      - queue clear  
    }  
    - if <player.flag[kill_player_quest_bow_cooldown]||false> {  
      - queue clear  
    } 
    - flag player kill_player_quest_bow  
    - flag player kill_player_quest_bow_count:0 
    - narrate "<&6>-=+ Kill <&c>5 <&6>Players with a Bow +=-" 
    - narrate "<&a><player.flag[kill_player_quest_bow_count].round||0> players!" 

    on player killed by arrow:  
    - if <context.projectile.shooter> == <Player> {
      - if <context.projectile||none> != none {
        - flag <context.projectile.shooter> kill_player_quest_bow_count:++  
        - narrate "<&a>You have killed <player.flag[kill_player_quest_bow_count].as_money> players!" 
        - if <context.damager.as_player.flag[kill_player_quest_bow_count]> >= 5 {  
        - narrate "[<&b>Return to the Quest Master]" targets:<context.damager.as_player>  
        - flag <context.damager.as_player> kill_player_quest_daily:!
        - queue clear      
    }

border_item: 
    type: item  
    material: i@black_stained_glass_pane  
    display name: <white><&sp>  

return_button: 
    type: item  
    material: i@redstone_torch_on  
    display name: "<&6><&l>Close Menu"  

CreeperQuest: 
   type: item 
   material: i@383,50 
   display name: "<&a><&o>Bomb defused" 
   lore:  
   - "<&a>Kill <&c>5 <&7> <&a>Creepers!" 
   - "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_creeper_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||24 Hours>"

PlayerQuest: 
   type: item 
   material: i@diamond_chestplate[flags=HIDE_ENCHANTS]
   display name: "<&c><&o>Relentless" 
   enchantments:
   - Durability:1
   lore:  
   - "<&a>Kill <&c>30 <&7> <&a>Players!" 
   - "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_player_quest_weekly_cooldown].expiration.formatted.replace[forever].with[0 seconds]||7 Days>"

DailyPlayerQuest: 
   type: item 
   material: i@diamond_chestplate
   display name: "<&c><&o>Bloodthirsty..." 
   lore:  
   - "<&a>Kill <&c>5 <&7> <&a>Players!" 
   - "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_player_quest_daily_cooldown].expiration.formatted.replace[forever].with[0 seconds]||24 Hours>"

SkeletonQuest: 
   type: item 
   material: i@383,51 
   display name: "<&7><&o>Bone-breaker" 
   lore:  
   - "<&a>Kill <&c>10 <&7> <&a>Skeletons!" 
   - "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_skeleton_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||48 Hours>"

BowPlayerQuest: 
   type: item 
   material: i@bow
   display name: "<&c><&o>Sniper" 
   lore:  
   - "<&a>Kill <&c>5 <&7> <&a>Players with a Bow!" 
   - "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_player_quest_bow_cooldown].expiration.formatted.replace[forever].with[0 seconds]||48 Hours>"

QuestRewards: 
    type: task  
    script:
    - if <player.flag[kill_player_quest_bow_count]||0> >= 5 {  
      - narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"  
      - give xp quantity:100 
      - narrate "<&2>$1250 has been added to your account." 
      - give money qty:1250 
      - flag <player> kill_player_quest_bow_count:!
      - flag <player> kill_player_quest_bow:!  
      - flag <player> kill_player_quest_bow_cooldown duration:24h 
      - 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_player_quest_weekly_count]||0> >= 30 {  
      - narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"  
      - give xp quantity:1000 
      - narrate "<&2>$5000 has been added to your account." 
      - give money qty:5000 
      - flag <player> kill_player_quest_weekly_count:!     
      - flag <player> kill_player_quest_weekly:!
      - flag <player> kill_player_quest_weekly_cooldown duration:168h 
      - queue clear  
    }  
    - if <player.flag[kill_skeleton_quest_count]||0> >= 10 {  
      - give xp quantity:120 
      - narrate "<&2>$500 has been added to your account." 
      - give money qty:500 
      - flag player kill_skeleton_quest_count:!  
      - flag player kill_skeleton_quest_cooldown duration:48h  
      - queue clear  
    } 
    - if <player.flag[kill_player_quest_daily_count]||0> >= 5 {  
      - narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"  
      - give xp quantity:100 
      - narrate "<&2>$5000 has been added to your account." 
      - give money qty:1000 
      - flag <player> kill_player_quest_daily_count:!     
      - flag <player> kill_player_quest_daily:!  
      - flag <player> kill_player_quest_daily_cooldown duration:24h 
      - queue clear  
    }