Date: 2016/10/28 20:36:25 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Nokasn:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true radius:5
on chat:
####Choose Gold####
- if <player.has_flag[choosegold]> && <context.message> !matches number {
- wait 1
- narrate "You must enter in a number."
- queue clear
}
- if <player.has_flag[choosegold]> && <player.money> < <context.message.mul_int[75]> {
- wait 1
- narrate "Ironic isn't it, not having enough gold for more gold?"
- flag player choosegold:!
- queue clear
}
- if <player.has_flag[choosegold]> && <player.inventory.can_fit[266].quantity[<context.message>]> == false {
- wait 1
- narrate "How are you planning to transport all of that?"
- flag player choosegold:!
- queue clear
}
- if <player.has_flag[choosegold]> && <player.inventory.can_fit[266].quantity[<context.message>]> == true && <context.message.mul_int[75]> <= <player.money> {
- narrate "Ah gold, an essential components to many engineering pursuits."
- money take quantity:<context.message.mul_int[75]>
- flag player choosegold:!
- give 266 quantity:<context.message>
- narrate "Hope to have the pleasure of your patronage again soon."
- queue clear
}
####Choose Iron####
- if <player.has_flag[chooseiron]> && <context.message> !matches number {
- wait 1
- narrate "You must enter in a number."
- queue clear
}
- if <player.has_flag[chooseiron]> && <player.money> < <context.message.mul_int[25]> {
- wait 1
- narrate "With so little money, perhaps you should concern yourself with food before tools and supplies."
- flag player chooseiron:!
- queue clear
}
- if <player.has_flag[chooseiron]> && <player.inventory.can_fit[265].quantity[<context.message>]> == false {
- wait 1
- narrate "How are you planning to transport all of that?"
- flag player chooseiron:!
- queue clear
}
- if <player.has_flag[chooseiron]> && <player.inventory.can_fit[265].quantity[<context.message>]> == true && <context.message.mul_int[25]> <= <player.money> {
- narrate "Ah iron, an essential components to many engineering pursuits."
- money take quantity:<context.message.mul_int[25]>
- flag player chooseiron:!
- give 265 quantity:<context.message>
- narrate "Hope to have the pleasure of your patronage again soon."
- queue clear
}
on click:
- narrate "Greetings friend. Take a moment and browse my fine wares!"
- wait 1
- inventory open d:in@nokores
noksupplies:
type: inventory
title:
size: 27
slots:
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
nokbuilding:
type: inventory
title:
size: 27
slots:
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
noktools:
type: inventory
title: Tools and Redstone
size: 27
slots:
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
nokores:
type: inventory
title: Ores and Ingots
size: 18
slots:
- "[i@goldchoosei] [i@goldstacki] [i@ironchoosei] [i@ironstacki] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
####Ore items####
goldstacki:
type: item
material: 266
display name: Stack of Gold
lore:
- "A stack of gold ingots"
- "Cost: $4500"
goldchoosei:
type: item
material: 266
display name: Gold Ingots (Choose Amount)
lore:
- "Gold ingots. When clicked you"
- "will be prompted to enter in"
- "the desired amount."
- "Cost: $75 per ingot."
ironstacki:
type: item
material: 265
display name: Stack of Iron
lore:
- "A stack of iron ingots"
- "Cost: $1600"
ironchoosei:
type: item
material: 265
display name: Iron Ingots (Choose Amount)
lore:
- "Iron ingots. When clicked you"
- "will be prompted to enter in"
- "the desired amount."
- "Cost: $25 per ingot."
####################
####Item Handler####
####################
noks_store:
type: world
events:
on player clicks in nokores:
- determine cancelled
on player drags in nokores:
- determine cancelled
on player clicks in nokbuilding:
- determine cancelled
on player drags in nokbuilding:
- determine cancelled
on player clicks in noksupplies:
- determine cancelled
on player drags in noksupplies:
- determine cancelled
on player clicks in noktools:
- determine cancelled
on player drags in noktools:
- determine cancelled
################
####Ore Menu####
################
on player clicks goldstacki in nokores:
- if <player.money> < "4800" {
- inventory close
- narrate "Ironic as it is, one must have gold for gold."
- queue clear
}
- if <player.money> >= "4800" && <player.inventory.can_fit[266].quantity[64]> == false {
- inventory close
- narrate "How do you propose to transport the goods? (Inventory Full)"
- queue clear
}
- if <player.money> >= "4800" && <player.inventory.can_fit[266].quantity[64]> == true {
- money take quantity:4800
- give 266 quantity:64
- narrate "<&o>$4800 has been deducted from your balance."
on player clicks ironstacki in nokores:
- if <player.money> < "1600" {
- inventory close
- narrate "With so little money, perhaps you should concern yourself with food before tools and supplies."
- queue clear
}
- if <player.money> >= "1600" && <player.inventory.can_fit[265].quantity[64]> == false {
- inventory close
- narrate "How do you propose to transport the goods? (Inventory Full)"
- queue clear
}
- if <player.money> >= "1600" && <player.inventory.can_fit[265].quantity[64]> == true {
- money take quantity:2600
- give 266 quantity:64
- narrate "<&o>$1600 has been deducted from your balance."
on player clicks goldchoosei in nokores:
- inventory close
- narrate "How many would you like? (Please type a number in chat)"
- flag player choosegold duration:2m
on player clicks ironchoosei in nokores:
- inventory close
- narrate "How many would you like? (Please type a number in chat)"
- flag player chooseiron duration:2m