Paste #54590: Pets

Date: 2019/06/11 06:29:51 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#Simple assignment script for Pets and Citizen by Pogryziony
petshopassistant_assignment:
  type: assignment
  debug: false
  actions:
    on assignment:
      - trigger name:click state:true
      - trigger name:proximity state:true radius:2
    on enter proximity:
      - narrate format:petshopassistantChat "Co chcesz zrobic ze swoim zwierzeciem?"
      - narrate "Kliknij na mnie prawym przyciskiem, aby otworzyc menu."

    on click:
      - inventory open d:in@petshopassistant_Inventory:

petshopassistant_Inventory:
  type: inventory
  title: "<&6>Sklep Zoologiczny"
  size: 27
  slots:
  - "[] [] [] [] [] [] [] [] []"
  - "[] [] [] [i@Pet] [] [i@ChangePet] [] [] []"
  - "[] [] [] [] [] [] [] [] []"
Pet:
  type: item
  material: "383"
  display name: "<&a>Zakup zwierze"
  lore:
  - ""
  - "<&e>Kliknij lewym aby otworzyc sklep"
  - "<&e>Kliknij prawym przyciskiem, aby wyswietlic informacje"

ChangePet:
  type: item
  material: "383"
  display name: "<&a>Wymien zwierze"
  lore:
  - ""
  - "<&e>Kliknij lewym aby otworzyc sklep"
  - "<&e>Kliknij prawym przyciskiem, aby wyswietlic informacje"


petshopassistantChat:
  type: format
  debug: false
  format: <&6>Zoolog:<&f> <text>

petshopassistant_Inventory_Handler:
  type: world
  events:
    on player clicks in petshopassistant_Inventory:
    - determine cancelled
    on player drags in petshopassistant_Inventory:
    - determine cancelled

    on player left clicks Pet in petshopassistant_Inventory:
    - execute as_player "pet shop"
    - inventory close
    on player right clicks Pet in petshopassistant_Inventory:
    - execute as_player "pet"
    - inventory close

    on player left clicks ChangePet in petshopassistant_Inventory:
    - execute as_player "pet change"
    - inventory close
    on player right clicks ChangePet in petshopassistant_Inventory:
    - execute as_player "pet"
    - inventory close