Date: 2020/12/14 22:34:27 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This is a test file for the appraiser for our server economy. It allows players #
# to execute the /worth and /sell functions through assigning a GUI to an NPC. #
appraiser_npc:
type: assignment
actions:
on assignment:
#Enable/disable triggers for following actions.
- trigger name:click state:true
- trigger name:chat state:true
on click:
- narrate "Hey <player.name>, Lets take a look at what you've got to sell."
- wait 2s
- inventory open d:appraiser_inventory
# This section defines the GUI arguments such as size and what goes in each slot, #
# items must be added to the inventory slots below as well so that they are id'd. #
appraiser_inventory:
type: inventory
inventory: chest
title: Mysterious Merchant
size: 27
slots:
- *[] [] [] [] [] [] [] [] []*
- *[] [] [] [] [] [] [] [] [appraiser_inventory_menu_worth_button]*
- *[] [] [] [] [] [] [] [] [appraiser_inventory_menu_sell_all_button]*
# This section defines the items that go in each slot of the above ^^ GUI #
# NOTE: Any added items must be added above as well. #
appraiser_inventory_menu_worth_button:
type: item
material: green_wool
display name: Appraise All
appraiser_inventory_menu_sell_all_button:
type: item
material: red_wool
display name: Sell All
# This section defines the commands that are associated to each button in the GUI. #
appraiser_inventory_handler:
type: world
events:
on player clicks appraiser_inventory_worth_button:
- determine cancelled
- run as_op essentials:worth d:appraiser_inventory
on player clicks appraiser_inventory_menu_sell_all_button:
- determine cancelled
- run as_op essentials:sell d:appraiser_inventory
on player clicks appraiser_inventory_menu_slot_27 in appraiser_inventory:
- run as_op essentials:worth d:appraiser_inventory