Paste #12213: Untitled Paste

Date: 2014/12/22 01:10:58 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Santa_Quest:
  Type: assignment 
  actions: 
    on assignment: 
    - trigger name:click state:true 
    - trigger name:chat state:true 
  interact scripts: 
  - 10 Santa_quest_start

cchat:
  type: format
  format: "<&c>[<npc.name>] <&f><text>"

Santa_quest_start:
  type: interact
  steps: 
    1: 
      Click trigger: 
        script:
          - narrate format:cchat "Ho! Ho! Ho! Would you like to do a quest for me?"
          - narrate "[Type <&c><&o>Yes <&r>or <&c><&o>No <&r>]"
      Chat trigger:
        1:
          trigger: /Yes/, I will help you.
          Script:
            - narrate "[<&c>Right click to continue<&r>]"
            - random {
              - zap step:2
              - zap step:3
              - zap step:5
              }
        2:
          trigger: /No/, Maybe another time.
          Script:
            - narrate format:cchat "Ok, come back soon!"
    2:
      Click trigger: 
        script:
          - if <player.has_flag[santa_coal_quest_complete]> {
            - zap step:3
            }
          - flag player santa_coal_quest
          - flag santa_coal_quest_count:0
          - narrate format:cchat "I have ran out of coal to give to all the naughty children."
          - narrate format:cchat "Go and mine <&c>64 Coal ore<&r>."
          - narrate format:cchat "You have <&c>20 minutes <&r>to complete the quest."
          - narrate "[<&c>You must use a normal pickaxe to mine the coal<&r>]"
          - wait 20m
          - if !<player.flag[santa_coal_quest_complete]> {
            - narrate format:cchat "You have ran out of time! You can try again in 24 hours"
            - flag player santa_coal_quest:!
            - zap step:3
            }
    3:
      click trigger:
        script:
          - if <player.flag[quest_cooldown]> {
            - narrate "[<&c>You can complete more quests from this NPC in <player.flag[quest_cooldown].expiration.formatted><&r>]"
            } else {
            - flag player santa_coal_quest_complete:!
            - narrate "[<&c>Right click again to interact<&r>]"
            - zap step:1
            }
    4:
      Click trigger: 
        script:
          - if <player.has_flag[santa_glowstone_quest_complete]> {
            - zap step:3
            }
          - flag player santa_glowstone_quest
          - flag santa_glowstone_quest_count:0
          - narrate format:cchat "I need some more glowstone."
          - narrate format:cchat "Go and mine <&c>75 glowstone<&r> from the nether."
          - narrate format:cchat "You have <&c>20 minutes <&r>to complete the quest."
          - narrate "[<&c>You must use a normal pickaxe or a fist to break the glowstone<&r>]"
          - wait 15m
          - if !<player.flag[santa_glowstone_quest_complete]> {
            - narrate format:cchat "You have ran out of time! You can try again in 24 hours"
            - flag player santa_glowstone_quest:!
            - zap step:3
            }
    5:
      Click trigger: 
        script:
          - if <player.has_flag[santa_creeper_quest_complete]> {
            - zap step:3
            }
          - flag player santa_creeper_quest
          - flag santa_creeper_quest_count:0
          - narrate format:cchat "Go out there in the wilderness and kill some creepers."
          - narrate format:cchat "Go and kill <&c>14 Creepers<&r>."
          - narrate format:cchat "You have <&c>30 minutes <&r>to complete the quest."
          - wait 30m
          - if !<player.flag[santa_creeper_quest_complete]> {
            - narrate format:cchat "You have ran out of time! You can try again in 24 hours"
            - flag player santa_creeper_quest:!
            - zap step:3
            }

santa_coal_quest_world:
  Type: World 
  events: 
    on player breaks m@COAL_ORE:
    - if <player.has_flag[santa_coal_quest]> {
      - flag player santa_coal_quest_count:++ 
      - if <player.flag[santa_coal_quest_count]> == 64 {
        - flag player santa_coal_quest:!
        - flag player santa_coal_quest_complete
        - narrate "<&c>[Santa] <&f>Thanks for the coal!"
        - narrate "<&c>[Santa] <&f>Have some of this as a thanks."
        - random {
          - give diamond qty:5
          - give money qty:200
          - give xp qty:500
          - give 89 qty:25
          }
        - narrate "<&c>[Santa] <&f>You can come back tomorrow for more quests. Merry Chistmas!"
        - flag player quest_cooldown duration:24h
        - zap script:Santa_quest_start step:3
        }
      }

santa_coal_quest_world_determine:
  Type: World 
  events: 
    on player breaks m@COAL_ORE:
    - if <player.has_flag[santa_coal_quest]> {
      - determine nothing
      }


santa_glowstone_quest_world:
  Type: World 
  events: 
    on player breaks m@GLOWSTONE:
    - if <player.has_flag[santa_glowstone_quest]> {
      - flag player santa_glowstone_quest_count:++ 
      - if <player.flag[santa_glowstone_quest_count]> == 75 {
        - flag player santa_glowstone_quest:!
        - flag player santa_glowstone_quest_complete
        - narrate "<&c>[Santa] <&f>Thanks for the glowstone!"
        - narrate "<&c>[Santa] <&f>Here is your reward."
        - random {
          - give diamond qty:3
          - give money qty:150
          - give xp qty:600
          - give 89 qty:64
          }
        - narrate "<&c>[Santa] <&f>You can come back tomorrow for more quests. Merry Chistmas!"
        - flag player quest_cooldown duration:24h
        - zap script:Santa_quest_start step:3
        }
      }

santa_glowstone_quest_world_determine:
  Type: World 
  events: 
    on player breaks m@GLOWSTONE:
    - if <player.has_flag[santa_glowstone_quest]> {
      - determine nothing
      }


santa_creeper_quest_world:
  Type: World 
  events: 
    on creeper killed:
    - if <player.has_flag[santa_creeper_quest]> {
      - flag player santa_creeper_quest_count:++ 
      - if <player.flag[santa_creeper_quest_count]> == 14 {
        - flag player santa_creeper_quest:!
        - flag player santa_creeper_quest_complete
        - narrate "<&c>[Santa] <&f>Thanks for that!"
        - narrate "<&c>[Santa] <&f>Have some of this as a thanks."
        - random {
          - give emerald qty:20
          - give money qty:200
          - give xp qty:800
          - give 89 qty:25
          - give 289 qty:20
          }
        - narrate "<&c>[Santa] <&f>You can come back tomorrow for more quests. Merry Chistmas!"
        - flag player quest_cooldown duration:24h
        - zap script:Santa_quest_start step:3
        }
      }

santa_creeper_quest_world_determine:
  Type: World 
  events: 
    on creeper killed:
    - if <player.has_flag[santa_creeper_quest]> {
      - determine cancelled
      }