Paste #22290: RancherQuest

Date: 2015/11/06 05:58:59 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


RancherQuest:
    type: assignment
    interact scripts:
    - 1 RancherMain

RancherMain:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - chat "Hey <player.name>, I could use some help"
                - wait 2
                - chat "I really need a new horse"
                - wait 2
                - chat "Con you help me out?"
            chat trigger:
                1:
                    trigger: /Yes/, I will help you!
                    script:
                    - chat "OK,  I need you to bring me a horse on a lead."
                    - wait 2
                    - chat "Come back to me when you fine one!"
                    - zap step:2
                2:
                    trigger: /No/, I am too busy
                    script:
                    - chat "Oh, come back when you have more time.."
        2:
            click trigger:
                script:
                - if <player.location.find.entities[HORSE].within[5].size> >= 1 {
                  - foreach <player.location.find.entities[HORSE].within[5]> {
                    - if <%value%.get_leash_holder> == <player> {
                      - modifyblock l@-769,64,8,Factions m@fence
                      - narrate "Value in step 2"
                      - narrate %value%
                      - leash %value% holder:l@-769,64,8,Factions
                      - run s@HorseReturn delay:1 def:%value%
                      }                      
                    }
                  } else {
                  - chat "Hurry up <player.name>!"
                  - wait 1
                  - chat "I really need a new horse!"
                  }
        3:
            click trigger:
            script:
            - chat "Thanks again for helpig me out!"
HorseReturn:
    type: task
    script:
    - chat "Great, a new horse!"
    - wait 2
    - animate <npc> animation:ARM_SWING
    - modifyblock l@-769,64,8,Factions m@fence
    - narrate %1%
    - leash %1% holder:l@-769,64,8,Factions
    - wait 1
    - chat "Thanks <player.name>, this will be a great help!"
    - wait 3
    - chat "Take this for helping me out!"
    - give money qty:500
    - zap s@RancherMain step:3