Paste #3771: asdfasfafasf

Date: 2014/04/26 17:50:15 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


ResistanceNeba:
    type: assignment
    interact scripts:
    - 10 NebaInteraction
    actions:
        on assignment:
            - trigger name:click toggle:true
            - trigger name:proximity toggle:true radius:8
            - trigger name:chat toggle:true radius:8
            - lookclose state:true

NebaInteraction:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - ^playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^random 4
                    - chat "<yellow>Don't touch my boat, stranger."
                    - chat "<yellow>This boat isn't much, but it's mine."
                    - narrate "<white>Neba<blue> looks around himself suspiciously."
                    - chat "<yellow>There's a lot of money to be made trading between towns, you know?"
            click trigger:
                script:
                - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.6
                - ^random 4
                - ^chat "<yellow>Get of my boat, stranger!"
                - ^chat "<yellow>I'm busy."
                - ^chat "<yellow>Leave me alone please."
                - ^chat "<yellow>You don't have business with me."
                - wait 1
                - narrate "<red>It seems like this man does not like to hang out with strangers."
        2:
            click trigger:
                script:
                - engage 120s
                - run guarddespawner delay:120
                - flag player SpawnedAhava
                - playsound location:<npc.location> sound:VILLAGER_HAGGLE pitch:0.6
                - ^chat "<yellow>Huh, do I know you?"
                - wait 3
                - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                - ^chat "<yellow>Oh, <white>Yrmes<yellow> sent you?"
                - wait 3
                - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.6
                - ^chat "<yellow>That's great! Do you have my package?"
                - wait 2
                - execute as_npc "npc spawn Ahava"
                - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.8
                - ^chat "<yellow>Wait, someone's coming! It's a guard!"
                - wait 15
                - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.5
                - ^chat npcid:2 "<gold>Are you smuggling goods again, <white>Neba<yellow>?"
                - wait 4
                - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                - ^chat npcid:2 "<gold>And I see you tricked this adventurer into helping you."
                - wait 4
                - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.6
                - ^chat npcid:2 "<gold>Adventurer, hand over the package to me and I will forgive your crimes."
                - wait 4
                - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.8
                - ^chat "<yellow>No, adventurer! Don't give him the package. Kill the guard!"
                - wait 3
                - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                - ^chat "<yellow>The people of <white>Port Shazki<yellow> rely on this medicine."
                - wait 2
                - narrate "<white>Kill the guard <red>or type <white>package<red> to hand over the package."
        3:
            click trigger:
                script:
                - if <player.flag[TalkingToNPC]> {
                    - narrate "<red>Stop clicking, you are already in a conversation!"
                    } else {
                    - ^flag player TalkingToNPC
                    - equip hand:137
                    - narrate "<blue>You hand over the package to <white>Neba<blue>."
                    - wait 1
                    - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.6
                    - ^chat "<yellow>Thank you! I can't believe you would do this for a stranger."
                    - wait 3
                    - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.6
                    - ^chat "<yellow>Friend, you have my gratitude."
                    - wait 3
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^chat "<yellow>The people of <white>Port Shazki<yellow> are in desperate need of this medicine."
                    - wait 2
                    - equip hand:0
                    - narrate "<white>Neba <blue>puts the package away."
                    - wait 2
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^chat "<yellow>Talk to me again and I'll let you in on a secret."
                    - ^flag player TalkingToNPC:!
                    - zap step:4
                    }
        4:
            click trigger:
                script:
                - if <player.flag[TalkingToNPC]> {
                    - narrate "<red>Stop clicking, you are already in a conversation!"
                    } else {
                    - ^flag player TalkingToNPC
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^chat "<yellow>I am actually part of the <white>Varanir Resistance<yellow>."
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^chat "<yellow>The Resistance opposses corrupt guards, but most of all..."
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.6
                    - ^chat "<yellow>...most of all we fight <white>Mayor Frodeur<yellow>. He's as evil as they come."
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.8
                    - ^chat "<yellow>Ever since he rose to power in Varanir, poverty and famine has been getting worse."
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.5
                    - ^chat "<yellow>The cause of this is extremely high taxes and ridicilous laws that benefit nobody but the mayor himself."
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^chat "<yellow>Every night he holds a banquet while the people in this town starve."
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_HAGGLE pitch:0.6
                    - ^chat "<yellow>Now that we are fighting back, they dare call us the criminals?"
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.6
                    - ^chat "<yellow>The man who sent you to me, <white>Yrmes<yellow>, is also a member."
                    - wait 5
                    - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.6
                    - ^chat "<yellow>Speak to him if you wish to join the resistance!"
                    - zap step:5
                    - zap step:5 script:YrmesInteraction
                    - ^flag player TalkingToNPC:!
                    }
        5:
            click trigger:
                script:
                - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.6
                - ^random 2
                - ^chat "<yellow>Thanks again for the help, <white><player.name><yellow>."
                - ^chat "<yellow>This medicine will come to good use in <white>Port Shazki<yellow>."
            proximity trigger:
                entry:
                    script:
                    - ^playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^random 3
                    - chat "<yellow>Hello <white><player.name><yellow>."
                    - chat "<yellow>Hello friend, thanks again for your help."
                    - narrate "<white>Neba<blue> throws you a smile."


guarddespawner:
    type: task
    script:
    - if <player.flag[SpawnedAhava]> {
        - teleport n@Ahava location:295,65,1441,world
        - execute as_server "npc despawn Ahava"
        - disengage npc:Neba
        - flag player SpawnedAhava:!
        - narrate "<red>You waited too long. Talk to Neba to restart the quest."
        }

guarddespawnertwo:
    type: task
    script:
    - teleport n@Ahava location:295,65,1441,world
    - execute as_server "npc despawn Ahava"
    - disengage npc:Neba

guarddespawnerinsurance:
  type: world
  events:

    on player quits:
    - if <player.flag[SpawnedAhava]> {
        - wait 3
        - teleport n@Ahava location:295,65,1441,world
        - execute as_server "npc despawn Ahava"
        - disengage npc:Neba
        - flag player SpawnedAhava:!
        - narrate "<red>Ahava despawned due to player quit or player death."
        }
    on server start:
    - run guarddespawnertwo delay:45