Paste #18538: Wanderer Sword quest

Date: 2015/07/23 05:46:26 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


WIS:
    type: item
    material: iron_sword
    display name: <blue>Wanderer's sword
    lore:
    - <blue>This sword belongs to Wanderer
    - <blue>Bring it to him.
WandererZombie:
    Type: Assignment
    Interact scripts:
    - 10 ZombieWanderer
WandererWanderer:
    Type: Assignment
    Interact scripts:
    - 10 WardenerWanderer
WardenerWanderer:
    Type: Interact
    Steps:
        1:
            click trigger:
                script:
                - chat "Hi there would you mind to help an old man get his lost things?"
                - wait 2
                - narrate "Say <red>Yes <white>or <red>No."
                - zap step:2
        2:    
            chat trigger:
                Yes:
                    trigger: /Regex:Yes|yes|YES|YEs/
                    script:
                    - chat "Oh thank you so much. I have lost my sword in one cave, there were zombies all around and as i was running i dropped it"
                    - wait 5
                    - chat "It will probably be still there but its possible that one of these zombies has it"
                    - wait 4
                    - chat "Look, I understand if you don't feel like fighting zombies just to find my sword so are you sure you want to?"
                    - wait 4
                    - narrate "Say <red>Yes <white>to accept quest <blue>or <red>No <white>to dismiss quest"
                    - zap step:3
                No:
                    trigger: /Regex:No|no|NO/
                    script:
                    - chat "Oh ok dear thats ok i understand that you have other things to do than help old man"
                    - zap step:1
        3:
            chat trigger:
                Yes:
                    trigger: /Regex:Yes|yes|YEs|YES/
                    script:
                    - chat "Very well then, go to the old cave above the city of Varinthia"
                    - wait 3
                    - chat "Kill the Zombies there, one of them for sure has it"
                    - wait 3
                    - narrate "Go to the cave above city of Varinthia and get Wanderer's sword"
                    - title "title:<red>Sword of Wanderer" "subtitle:Quest accepted" stay:5s
                    - zap step:1 script:ZombieWanderer

                No:
                    trigger: /Regex:No|no|NO/
                    script:
                    - chat "Ok i get it you have other things to do"
                    - wait 3
                    - zap step:1
        4:
            click trigger:
                script:
                - if <player.inventory.contains[i@WIS].qty[1]> {
                    - chat "Oh look at you, you got an old man his lost sword"
                    - wait 3
                    - chat "Here is your reward"
                    - give money qty:100
                    - wait 2
                    - narrate "<green>You received 100 gold from Wanderer"
                    - chat "If you would like to help me again, come tommorow at this time"
                    - wait 3
                    - narrate "Come back to Wanderer to get new quest tommorow (you have to come after 24hours from now)
                    - title "title:<red>Sword of Wanderer" "subtitle:Quest completed" stay:5s
                    - zap step:1
                    } else {
                    - chat "Oh so you want to tell me you cancel it?"
                    - narrate "Say <red>Yes <white>or <red>No"
                    - zap step:5
                }
        5:
            chat trigger:
                Yes:
                    trigger: /Regex:Yes|yes|YEs|YES/
                    script:
                    - chat "Then go and get it"
                    - zap step:4
                No:
                    trigger: /Regex:NO|no|No/
                    script:
                    - chat "Ok then"
                    - title "title:<red>Sword of Wanderer" "subtitle:Quest failed" stay:5s
                    - wait 3
                    - chat "You can return when you change your mind" 
                    - zap step:1
ZombieWanderer:
    Type: Interact
    steps:
        1:
            damage trigger:
                script:
                - give i@WIS qty:1
                - zap step:4 script:WardenerWanderer