forked from TES3MP/CoreScripts
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefaultCrafting.lua
More file actions
163 lines (156 loc) · 6.52 KB
/
defaultCrafting.lua
File metadata and controls
163 lines (156 loc) · 6.52 KB
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
Menus["default crafting origin"] = {
text = color.Orange .. "What would you like to craft?\n" ..
color.Yellow .. "White pillow" .. color.White .. " - 1 per 2 folded cloth\n" ..
color.Yellow .. "Hammock pillow" .. color.White .. " - 15 per 1 bolt of cloth\n" ..
color.Yellow .. "Guarskin drum" .. color.White .. " - 1 per 3 guar hides",
buttons = {
{ caption = "White pillow",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("default crafting pillow white",
{
menuHelper.conditions.requireItem("misc_de_foldedcloth00", 2)
})
}
},
{ caption = "Hammock pillow",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("default crafting pillow hammock",
{
menuHelper.conditions.requireItem({"misc_clothbolt_01", "misc_clothbolt_02", "misc_clothbolt_03"}, 1)
})
}
},
{ caption = "Guarskin drum",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("default crafting drum guarskin",
{
menuHelper.conditions.requireItem("ingred_guar_hide_01", 3)
})
}
},
{ caption = "Exit", destinations = nil }
}
}
Menus["default crafting pillow white"] = {
text = "How many would you like to craft?",
buttons = {
{ caption = "1",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("reward generic singular",
{
menuHelper.conditions.requireItem("misc_de_foldedcloth00", 2)
},
{
menuHelper.effects.removeItem("misc_de_foldedcloth00", 2),
menuHelper.effects.giveItem("misc_uni_pillow_01", 1)
})
}
},
{ caption = "5",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("reward generic plural",
{
menuHelper.conditions.requireItem("misc_de_foldedcloth00", 10)
},
{
menuHelper.effects.removeItem("misc_de_foldedcloth00", 10),
menuHelper.effects.giveItem("misc_uni_pillow_01", 5)
})
}
},
{ caption = "Back", destinations = { menuHelper.destinations.setDefault("default crafting origin") } },
{ caption = "Exit", destinations = nil }
}
}
Menus["default crafting pillow hammock"] = {
text = "How many would you like to craft?",
buttons = {
{ caption = "15",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("reward generic plural",
{
menuHelper.conditions.requireItem({"misc_clothbolt_01", "misc_clothbolt_02", "misc_clothbolt_03"}, 1)
},
{
menuHelper.effects.removeItem({"misc_clothbolt_01", "misc_clothbolt_02", "misc_clothbolt_03"}, 1),
menuHelper.effects.giveItem("Misc_Uni_Pillow_02", 15)
})
}
},
{ caption = "60",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("reward generic plural",
{
menuHelper.conditions.requireItem({"misc_clothbolt_01", "misc_clothbolt_02", "misc_clothbolt_03"}, 4)
},
{
menuHelper.effects.removeItem({"misc_clothbolt_01", "misc_clothbolt_02", "misc_clothbolt_03"}, 4),
menuHelper.effects.giveItem("Misc_Uni_Pillow_02", 60)
})
}
},
{ caption = "Back", destinations = { menuHelper.destinations.setDefault("default crafting origin") } },
{ caption = "Exit", destinations = nil }
}
}
Menus["default crafting drum guarskin"] = {
text = "How many would you like to craft?",
buttons = {
{ caption = "1",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("reward generic singular",
{
menuHelper.conditions.requireItem("ingred_guar_hide_01", 3)
},
{
menuHelper.effects.removeItem("ingred_guar_hide_01", 3),
menuHelper.effects.giveItem("misc_de_drum_02", 1)
})
}
},
{ caption = "5",
destinations = {
menuHelper.destinations.setDefault("lack of materials"),
menuHelper.destinations.setConditional("reward generic plural",
{
menuHelper.conditions.requireItem("ingred_guar_hide_01", 15)
},
{
menuHelper.effects.removeItem("ingred_guar_hide_01", 15),
menuHelper.effects.giveItem("misc_de_drum_02", 5)
})
}
},
{ caption = "Back", destinations = { menuHelper.destinations.setDefault("default crafting origin") } },
{ caption = "Exit", destinations = nil }
}
}
Menus["lack of materials"] = {
text = "You lack the materials required.",
buttons = {
{ caption = "Back", destinations = { menuHelper.destinations.setFromCustomVariable("previousCustomMenu") } },
{ caption = "Ok", destinations = nil }
}
}
Menus["reward generic singular"] = {
text = "Congratulations! The item is now yours",
buttons = {
{ caption = "Craft more", destinations = { menuHelper.destinations.setFromCustomVariable("previousCustomMenu") } },
{ caption = "Exit", destinations = nil }
}
}
Menus["reward generic plural"] = {
text = "Congratulations! The items are now yours",
buttons = {
{ caption = "Craft more", destinations = { menuHelper.destinations.setFromCustomVariable("previousCustomMenu") } },
{ caption = "Exit", destinations = nil }
}
}