Paste #59039: Untitled Paste

Date: 2019/10/09 13:54:22 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


bountyquest:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - bountyquest_interact

cchat:
    type: format
    format: "<&e><npc.name> <ยง3>to you<&co> <&e><text>"

bountyquest_interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[npc_engaged]>:
                    - stop
                - if <player.flag[kill_bounty_quest_count]> == 0:
                    - narrate "What are you doing back, come back when hes dead."
                - if <player.has_flag[kill_bounty_quest]>:
                    - stop
                - flag player npc_engaged
                # - engage
                - if <player.flag[kill_bounty_quest_count]> == 1:
                    - narrate format:cchat "Well, deals a deal, Here's your reward, ill let you know when I need your services again"
                    - give emerald quantity:50
                    - flag player kill_bounty_quest_count:!
                    - flag player npc_engaged:!
                    # - disengage
                    - stop
                - narrate format:cchat "Hey there, looking for some cash."
                - wait 5t
                - narrate format:cchat "This man, Crosseyed Carter is held up in a camp just west of here."
                - wait 5t
                - narrate format:cchat "if you kill him, ill reward you nicely"
                - wait 5t
                - narrate "[<&o>Type <&b><&o>Yes<&f><&o> or <&b><&o>No<&f>]"
                - flag player npc_engaged:!
                # - disengage
            chat trigger:
                1:
                    trigger: "/Yes/ I accept the quest"
                    script:
                    - if <player.has_flag[kill_bounty_quest]>:
                        - stop
                    - flag player npc_engaged
                    # - engage
                    - narrate format:cchat "Okay, see you when its done"
                    - wait 5t
                    - narrate "[<&e>Find and Kill Crosseyed Carter]"
                    - flag player kill_bounty_quest
                    - flag player kill_bounty_quest_count:0
                    - flag player npc_engaged:!
                    # - disengage
                2:
                    trigger: "/No/ I don't"
                    script:
                    - if <player.has_flag[kill_bounty_quest]>:
                        - stop
                    - random:
                        - narrate format:cchat "Its not a problem someone else will"
                        - narrate format:cchat "Okay then."
                        - narrate format:cchat "Well, okay then"

bountyquest_bounty_world:
    type: world
    events:
        on player kills npc: Carter
        - if !<player.has_flag[kill_bounty_quest]>:
            - stop
        - flag player kill_bounty_quest_count:++
        - if <player.flag[kill_bounty_quest_count]> == 1:
            - narrate "[Return to the Julio to claim the bounty]"
            - flag player kill_Bounty_quest:!