Date: 2016/09/15 12:20:05 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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: /regex:.*What.*/
script:
- chat "Here is is:"
- wait 1
- inventory open d:in@Trading
Trading:
type: inventory
title: Trading
size: 27
slots:
- "[i@trading_slot1] [i@trading_slot2] [i@trading_slot3] [i@trading_slot4] [i@trading_slot5] [i@trading_slot6]"
trading_slot1:
type: item
material: diamond_sword
display name: Chainsaw
lore:
- "£100"
trading_slot2:
type: item
material: iron_sword
display name: Machete
lore:
- "£50"
trading_slot3:
type: item
material: stone_sword
display name: Fireaxe
lore:
- "£20"
trading_slot4:
type: item
material: wooden_sword
display name: Crowbar
lore:
- "£20"
trading_slot5:
type: item
material: bow
display name: Gun
lore:
- "£200"
trading_slot6:
type: item
material: arrow
display name: Bullet
lore:
- "£150"
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.inventory.contains[i@gold_ingot]> {
- take i@gold_ingot: 1
- give trading_slot1:1
}
else {
- chat "What are you trying to do?"
}