Shop Keeper Chat [dtltrader]


Author: Hyruii
Created: 2013-12-18T23:56:17-0500
Edited: 2013-12-18T23:57:57-0500
Denizen Version: 0.9.3
Views: 13
Downloads: 909
Likes: 0


WGET
Description: A short script for dtltrader shop npc. Will improve and update in time.

# Shopkeeper
# Citizens 2 (build #992)
# Denizen 0.9.3 (build #1352)
#
# To assign to an NPC, type:
# /npc assign --set "shopkeeper"
#
# @author Hyruii

"shopkeeper":
  type: assignment

  default constants:

  interact scripts:
  - 10 Enter Shop 

  actions:
    on assignment:
    # These triggers enable interaction with an NPC via chatting, clicking and entering proximity.
    - trigger name:chat toggle:true
    - trigger name:click toggle:true
    - trigger name:proximity toggle:true
    # The NPC will equip a feather.
    - equip feather

"Enter Shop":
  type: interact
  
  steps:
    1:
      proximity trigger:
        entry:
          script:
          - ^run "Shop Keeper Greeting"
        exit:
          script:
          - ^run "Shop Keeper Farewell"
        
    2:
       click trigger:
          script:
          - chat "<yellow>Take a look at our wares!"

    3:         
       chat trigger:
          'Buy':          
            trigger: I want to /buy/ something.
            script:
            - chat "<yellow>Right click on me to buy."

          'Sell':
            trigger: I want to /sell/ something.
            script:
            - chat "<yellow>Right click on me and go to the sell menu to sell."

          'What Did You Say':
            trigger: /REGEX:\w+/
            # This is a catch-all trigger that will repeat what the player said if what they
            # typed didn't match any of the chat triggers above.
            script:
            - chat "<yellow>Sorry <white><player.name><yellow>, but I don<&sq>t get what <&sq><white><context.message><yellow><&sq> means."
 

"Shop Keeper Greeting":
  type: task
  speed: 0

  script:
     - random {
       - chat "<yellow>You look very nice today, <player.name>."
       - chat "<yellow>I hope the guards stop the zombies tonight."
       - chat "<yellow>The price of our tools are very good!"
       - chat "<yellow>Talk to me if you want to buy anything."
       - chat "<yellow>This town is growing very fast!"
       - chat "<yellow>Nice <player.item_in_hand>, wanna sell to me?"
       - chat "<yellow>You look <player.health.formatted>."
       - chat "<yellow>Endermen are so scary..."
       - chat "<yellow>Welcome to my shop!"
       }

"Shop Keeper Farewell":
  type: task
  speed: 0

  script:
     - random {
       - chat "<yellow>Stay safe <player.name>."
       - chat "<yellow>Come back again."
       - chat "<yellow>See you again!"
       - chat "<yellow>Watch out for the Endermen!"
       }
 
 
 
 
###############################################################




Comments
No one has posted a comment! Post one below: