Paste #19718: Untitled Paste

Date: 2015/08/25 18:32:18 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


BeanScript:
    type: assignment
    interact scripts:
      - 10 BeanStart

BeanStart:
  type: interact
  steps: 
    1: 
      click trigger: 
        script: 
          - chat "Ello there <player.name>! I'm <npc.name>!" 
          - if <player.flag[bean_cooldown].is_expired> {
            - wait 1  
            - chat "Anyways, could you help me get something? --> Chat Yes or No" 
            - zap step:2 
          } else {
            - chat "Woah! You still need to wait <player.flag[bean_cooldown].expiration> seconds."
          }
    2: 
      chat trigger: 
        1: 
          trigger: /Yes/, I can help you out, what do you need? 
          script: 
            - chat "I need 10 Bertie Botts Beans! ->clownfish<- If you could find them I'd be glad to reward ya!" 
            - narrate "Go get <npc.name> Bertie Botts Beans!"
            - zap step:3 
        2: 
          trigger: /No/ I do not have time for this! 
          script: 
            - chat "Fine then. I'll find someone else!" 
            - zap step:1 
    3: 
      click trigger: 
        script: 
          - if <player.inventory.contains[349:2]> { 
            - ^TAKE 349:2 QTY:10 
            - chat "Oh great you have them!" 
            - wait 1  
            - chat "Here is your reward!" 
            - GIVE MONEY QTY:350 
            - narrate "<npc.name> has rewarded you with <gold>$350!" 
            - narrate "<blue>You have completed this quest! You must wait 30 seconds to do it again!"
            - flag <player> qbean_cooldown d:30s                  
            - zap step:1 
          } else { 
            - chat "Come back to me when you have the beans!" 
          }