Paste #10146: class system

Date: 2014/09/28 12:48:25 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


archer:
    type: assignment

    interact scripts:
    - 10 setclass

setclass:
    type: interact
    steps:
        1:
            Click Trigger:
                Script:
                - if <player.flag[citizen]> == true {
                  - narrate "<yellow>Hello, Nice to meet you. I see you've Registered with the Mayor!"
                  - zap step:2
                  } else if <player.flag[class]> != null {
                  - narrate "stupid <player.flag[class]>s ..."
                  } else {
                  - narrate "Go away!"
                  }

        2:   
            Click trigger:
                script:
                - narrate "<green>archery trainer<&co> <yellow>Hey, <player.name>. do you want to learn the art of sniping?"
            Chat trigger:
                yes:
                    trigger: "/Yes/ I'd love to!"
                    script:
                    - narrate "<green>archery trainer<&co> <yellow>alright,"
                    - wait 1
                    - narrate "<green>archery trainer<&co> <yellow>I'll teach you how you how to use siper arrows first."
                    - wait 1
                    - narrate "<green>archery trainer<&co> <yellow>go get a bow, and some arrows."
                    - wait 1
                    - narrate "<green>archery trainer<&co> <yellow>make sure to select the first slot of your hotbar!"
                    - wait 1
                    - narrate "<green>archery trainer<&co> <yellow>when you've practiced come back to learn more!"
                    - flag learning: archer
                    - zap step:3
                no:
                    trigger: "/No/ not really..."
                    script:
                    - narrate "<green>archery trainer<&co> <yellow>huh, I reccomend the archer class, though, when you do choose!"
        3:
            Click trigger:
                script:
                - if <player.flag[sniped]> {
                  - narrate "<green>archery trainer<&co> <yellow>good!"
                  - narrate "now go do it with slot 2, you will be suprised..."
                  - zap step:4
                  } else {
                  - narrate "uhh... you havent practiced..."
                  }
        4:
            Click trigger:
                script:
                - if <player.flag[missileprac]> {
                  - narrate "<green>archery trainer<&co> <yellow>good!"
                  - narrate "now go do it with slot 3! (hehehe)"
                  - zap step:5
                  } else {
                  - narrate "uhh... you havent practiced..."
                  }
        5:
            Click trigger:
                script:
                - if <player.flag[missileprac]> {
                  - narrate "<green>archery trainer<&co> <yellow>good!"
                  - narrate "now you have learned to be an archer!"
                  - narrate "come back any time to get a refresher course!"
                  - flag class: archer
                  - zap step:1
                  } else {
                  - narrate "uhh... you havent practiced..."
                  }