Paste #7614: GuineaTest

Date: 2014/07/29 11:41:22 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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

TutorialGuineaInteraction:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - chat "<yellow>..."
        2:
            proximity trigger:
                entry:
                    script:
                    - if !<player.flag[ProximityChat]> {
                        - ^flag player ProximityChat duration:10
                        - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                        - ^random 4
                        - ^chat "<yellow>Oy, <white><player.name><yellow>! Come here!"
                        - ^chat "<yellow>Come over here, <white><player.name><yellow>."
                        - ^narrate "<white>Guinea<blue> gestures you to come closer."
                        - ^chat "<yellow>Hey deckhand, over here!"
            click trigger:
                script:
                - if <player.flag[TalkingToNPC]> {
                    - narrate "<red>Stop clicking, you are already in a conversation!"
                    } else {
                    - ^flag player TalkingToNPC
                    - ^trigger name:chat toggle:false
                    - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                    - ^chat "<yellow>Ahoy, salty dog! Ye overslept again, didn't ye?"
                    - wait 3
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                    - ^chat "<yellow>Listen up all careful like, matey. Guess what?"
                    - wait 2
                    - ^narrate "<gray>[<red>1<gray>]<white> I don't know, ye manatee buggerin' oaf."
                    - ^narrate "<gray>[<red>2<gray>]<white> Ye finally learned how to tie yer own shoes?"
                    - ^narrate "<gray>[<red>3<gray>]<white> We be out o' rum?"
                    - ^narrate "<gray>[<red>4<gray>]<white> I ain't no mind reader, matey."
                    - ^narrate "<gray>[<red>5<gray>]<white> Just tell me, aye?"
                    - ^narrate "<gray>[<red>6<gray>]<white> We finally found the vault we were after?"
                    - zap step:3
                    - ^flag player TalkingToNPC:!
                    - ^trigger name:chat toggle:true
                    }
        3:
            click trigger:
                script:
                - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                - ^chat "<yellow>Well matey, guess what?"
                - wait 1
                - ^narrate "<gray>[<red>1<gray>]<white> I don't know, ye manatee buggerin' oaf."
                - ^narrate "<gray>[<red>2<gray>]<white> Ye finally learned how to tie yer own shoes?"
                - ^narrate "<gray>[<red>3<gray>]<white> We be out o' rum?"
                - ^narrate "<gray>[<red>4<gray>]<white> I ain't no mind reader, matey."
                - ^narrate "<gray>[<red>5<gray>]<white> Just tell me, aye?"
                - ^narrate "<gray>[<red>6<gray>]<white> We finally found the vault we were after?"
            chat trigger:
                1:
                    trigger: <&lb>/1/<&rb> - I don't know, ye manatee buggerin' oaf.
                    script:
                    - wait 1
                    - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.7
                    - ^chat "<yellow>Oy, don't be no spoilsport matey! Take a guess!"
                2:
                    trigger: <&lb>/2/<&rb> - Ye finally learned how to tie yer own shoes?
                    script:
                    - wait 1
                    - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                    - ^chat "<yellow>Ha! Thou jests! We be pirates matey, we only wear buckled boots. Guess again."
                3:
                    trigger: <&lb>/3/<&rb> - We be out o' rum??
                    script:
                    - wait 1
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.6
                    - ^chat "<yellow>Nay matey. The storage be chock-full o' rum, like maiden's milk from a sweet bossom. Guess again."
                4:
                    trigger: <&lb>/4/<&rb> - I ain't no mind reader, matey.
                    script:
                    - if <player.flag[TalkingToNPC]> {
                        - narrate "<red>Stop clicking, you are already in a conversation!"
                        } else {
                        - ^flag player TalkingToNPC
                        - ^trigger name:chat toggle:false
                        - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                        - ^chat "<yellow>Very well then, deckhand. The vault on 'tis island is the one we be lookin' fer. The <white>Dead Man's Vault<yellow>. Untold treasures!"
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                        - ^chat "<yellow>But booty ain't hard to find. What the captain's interested in be power. This vault promises power."
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                        - ^chat "<yellow>The stories say it comes at a price, though. Ye be bound to lose yer soul if you touch the treasure."
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                        - ^chat "<yellow>But that be a problem fer later, haha! First, we got to get rid o' these pesky natives."
                        - wait 1
                        - equip hand:iron_sword
                        - wait 2
                        - ^chat "<yellow>Take this old sword 'n sever some heads, will ye?"
                        - wait 2
                        - animate n@Guinea animation:ARM_SWING
                        - equip hand:air
                        - narrate "<blue>X hands you a rusty sword."
                        - ^flag player GuineaIslanderCount:0
                        - ^listen kill type:NPC "name:Islander" qty:1 script:GuineaIslanderCheck
                        - wait 3
                        - narrate "<gray>[Quest Updated]<&co> <white>Raid on Tutorial Island"
                        - narrate "<gray>[New Objective]<&co> <white>Kill 10 Islanders"
                        - ^playsound location:<player.location> sound:level_up pitch:1.5
                        - ^flag player TalkingToNPC:!
                        - ^trigger name:chat toggle:true
                        - zap step:4
                        }             
                5:
                    trigger: <&lb>/4/<&rb> - Just tell me, aye?
                    script:
                    - if <player.flag[TalkingToNPC]> {
                        - narrate "<red>Stop clicking, you are already in a conversation!"
                        } else {
                        - ^flag player TalkingToNPC
                        - ^trigger name:chat toggle:false
                        - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                        - ^chat "<yellow>Fine, fine. The vault on 'tis island is the one we be lookin' fer. The <white>Dead Man's Vault<yellow>. Untold treasures!"
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                        - ^chat "<yellow>But booty ain't hard to find. What the captain's interested in be power. This vault promises power."
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                        - ^chat "<yellow>The stories say it comes at a price, though. Ye be bound to lose your soul if you touch the treasure."
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                        - ^chat "<yellow>But that be a problem fer later, haha! First, we got to get rid o' these pesky natives."
                        - wait 1
                        - equip hand:iron_sword
                        - wait 2
                        - ^chat "<yellow>Take this old sword 'n sever some heads, will ye?"
                        - wait 2
                        - animate n@Guinea animation:ARM_SWING
                        - equip hand:air
                        - narrate "<blue>X hands you a rusty sword."
                        - ^flag player GuineaIslanderCount:0
                        - ^listen kill type:NPC "name:Islander" qty:1 script:GuineaIslanderCheck
                        - wait 3
                        - narrate "<gray>[Quest Updated]<&co> <white>Raid on Tutorial Island"
                        - narrate "<gray>[New Objective]<&co> <white>Kill 10 Islanders"
                        - ^playsound location:<player.location> sound:level_up pitch:1.5
                        - ^flag player TalkingToNPC:!
                        - ^trigger name:chat toggle:true
                        - zap step:4
                        }              
                6:
                    trigger: <&lb>/4/<&rb> - We finally found the vault we were after?
                    script:
                    - if <player.flag[TalkingToNPC]> {
                        - narrate "<red>Stop clicking, you are already in a conversation!"
                        } else {
                        - ^flag player TalkingToNPC
                        - ^trigger name:chat toggle:false
                        - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                        - ^chat "<yellow>Right on the money, kid. The vault on 'tis island is the one we be lookin' fer. The <white>Dead Man's Vault<yellow>. Untold treasures!"
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                        - ^chat "<yellow>But booty ain't hard to find. What the captain's interested in be power. This vault promises power."
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                        - ^chat "<yellow>The stories say it comes at a price, though. Ye be bound to lose your soul if you touch the treasure."
                        - wait 3
                        - playsound location:<npc.location> sound:VILLAGER_YES pitch:0.7
                        - ^chat "<yellow>But that be a problem fer later, haha! First, we got to get rid o' these pesky natives."
                        - wait 1
                        - equip hand:iron_sword
                        - wait 2
                        - ^chat "<yellow>Take this old sword 'n sever some heads, will ye?"
                        - wait 2
                        - animate n@Guinea animation:ARM_SWING
                        - equip hand:air
                        - narrate "<blue>X hands you a rusty sword."
                        - ^flag player GuineaIslanderCount:0
                        - ^listen kill type:NPC "name:Islander" qty:1 script:GuineaIslanderCheck
                        - wait 3
                        - narrate "<gray>[Quest Updated]<&co> <white>Raid on Tutorial Island"
                        - narrate "<gray>[New Objective]<&co> <white>Kill 10 Islanders"
                        - ^playsound location:<player.location> sound:level_up pitch:1.5
                        - ^flag player TalkingToNPC:!
                        - ^trigger name:chat toggle:true
                        - 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_NO pitch:0.7
                    - ^chat "<yellow>Oy, matey. You have killed only <white><player.flag[GuineaIslanderCount].asint><yellow> out o' <white>10 <yellow>Islanders so far."
                    - wait 1
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                    - ^chat "<yellow>Come back when you've slaughtered some more."
                    - ^flag player TalkingToNPC:!
                    }
        5:
            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_NO pitch:0.7
                    - ^chat "<yellow>Not bad, fer a deckhand. But ye should kno' that most enemies present a bigger challenge."
                    - wait 3
                    - playsound location:<npc.location> sound:VILLAGER_IDLE pitch:0.7
                    - ^chat "<yellow>Speak to <white>Cap'n Dread<yellow>. He be already at the vault, but he can't seem to open it just yet."
                    - wait 3
                    - playsound location:<npc.location> sound:VILLAGER_NO pitch:0.7
                    - ^chat "<yellow>The vault be located at the other side o' the village, in the mountainside."
                    - wait 3
                    - narrate "<gray>[Quest Updated]<&co> <white>Raid on Tutorial Island"
                    - narrate "<gray>[New Objective]<&co> <white>Speak to Captain Dread"
                    - ^playsound location:<player.location> sound:level_up pitch:1.5
                    - ^flag player TalkingToNPC:!
                    - zap step:6
                    - zap step:2 script:TutorialDreadInteraction
                    }
        6:
            click trigger:
                script:
                -s
                - ^random 4
                - ^chat "<yellow>The cap'n be waiting for ye at the vault."
                - ^chat "<yellow>Ye better hurry to the vault, bucko. <white>Dread<yellow> is waiting."
                - ^chat "<yellow>What are ye waiting fer, scallywag?"
                - ^chat "<yellow>Speak to <white>Dread<yellow> at the other side of the village. He be in need of a wee bit o' assistance."
GuineaIslanderCheck:
    type: task
    script:
    - flag player GuineaIslanderCount:++
    - narrate "<red>You have killed <white><player.flag[GuineaIslanderCount].asint> out of 10 <red>Islanders!"
    - if <player.flag[GuineaIslanderCount].asint> >= 10 run GuineaIslanderReward
      else run GuineaIslanderContinue

GuineaIslanderContinue:
    type: task
    script:
    - listen kill type:NPC "name:Islander" qty:1 script:GuineaIslanderCheck

GuineaIslanderReward:
    type: task
    script:
    - narrate "<red>You have killed enough Islanders. Return to <white>Guinea<red>."
    - zap step:5 script:TutorialGuineaInteraction