Paste #8327: MUMU

Date: 2014/08/12 22:38:47 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Mumutime:
  type: assignment
  actions:
    on assignment:
    - chat "I'm Mumu"
    - trigger name:click state:true
    - trigger name:proximity state:true radius:4
    - trigger name:chat state:true
    - trigger name:damage state:true
    - zap mumu_interaction 1
  interact scripts:
  - 10 mumu_interaction

mumu_interaction:
  type: interact
  steps:
    1:
      proximity trigger:
        entry:
          script:
          - narrate format:ChatW "You got struck by lightning! Did you feel no pain?!" targets:player
          - wait 2s
          - narrate format:ChatW "You think you have been selected."
          - wait 1.5s
          - narrate format:HelpText "Right-click on people (and animals) to talk to them."
          - zap 2
    2:
      click trigger:
        script:
        - narrate format:ChatW "Here you go."
        - flag player mumu_chat:0
        - give mumu_guidebook
        - zap 3
    3:
      click trigger:
        script:
        - ^if <player.flag[mumu_chat]> == 0 {
          - ^narrate format:ChatW "I am Mumu, knower of everything"
          } else if <player.flag[mumu_chat]> == 1 {
          - ^narrate format:ChatW "This is Cloud City. The center of the world."
          } else if <player.flag[mumu_chat]> == 2 {
          - ^narrate format:ChatW "You can return here at any time by typing /warp spawn."
          } else if <player.flag[mumu_chat]> == 3 {
          - ^narrate format:ChatW "You want to know the secrets of the world? I'm not allowed to say."
          } else if <player.flag[mumu_chat]> == 4 {
          - ^narrate format:ChatW "I'm not really a cow. I just assume this appearance because I think it's funny."
          - ^wait 1.5s
          - ^narrate format:ChatW "Especially because of my name."
          } else if <player.flag[mumu_chat]> == 5 {
          - ^narrate format:ChatW 'Do you need another guidebook? Just say "guide".'
          } else if <player.flag[mumu_chat]> == 6 {
          - ^narrate format:ChatW 'Say "quest" if you forgot what you are supposed to do.'
          }

        - ^flag player mumu_chat:++
        - ^if <player.flag[mumu_chat]> == 5 flag player mumu_chat:0

      damage trigger:
        script:
        - narrate format:ChatW "Please don't pet me."
      chat trigger:
        'guide':
          trigger: "May I have another /guide/book?"
          script:
          - wait 1s
          - narrate format:ChatW "Here you go."
          - give mumu_guidebook
        'hi':
          trigger: "/Hi/."
          script:
          - wait 1s
          - narrate format:ChatW "Hi."
        'quest':
          trigger: "I forgot what my /quest/ is."
          script:
          - narrate format:ChatW "TODO"

init_quest:
  type: world
  events:
    on reload scripts:
    - flag global HelpColor:<&9><&o>
    - wait 1s
    - narrate format:HelpText "Welcome to <&b><&o><&l>Thunder<&c><&o><&l>Quest<global.flag[HelpColor]>!"
    - narrate  format:HelpText "Your adventure is about to begin..."
    - wait 5s
    - strike no_damage <player.location.standing_on>
    - wait 0.5s
    - zap mumu_interaction 1
    - narrate format:ChatW "... Hey!" npc:n@Mumu