Date: 2016/09/12 05:46:07 UTC-07: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
55
Trade:
type: assignment
actions:
on assignment:
- trigger name:click state:true
interact scripts:
- 1 Trade_Interact
Trade_Interact:
type: interact
steps:
1:
chat trigger:
1:
trigger: /Hello/ /Sup/ /Hey/ /Hi/
script:
- chat "Hello, my name is <npc.name>. How can I help?"
2:
trigger: /I would like to see what you have/ /What do you have?/ /Whats in stock?/ /Whats for sale?/ /What have you got for sale?/ /What have you got?/
script:
- chat "Here is is:"
- wait 1
- inventory open d:in@Trading
Trading:
type: inventory
title: Trading
size: 27
slots:
- "[i@trading_slot1] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
trading_slot1:
type: item
material: diamond_sword
display name: Trading Item
trading_handler:
type: world
events:
on player clicks in Trading:
- determine cancelled
on player drags in Trading:
- determine cancelled
on player clicks trading_slot1 in Trading:
- if player has item@emerald:
- if true {
- take item@emerald: 1
- give item@diamond_sword: 1
}
else {
- chat "What are you trying to do?"
}