-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckInput.lua
More file actions
176 lines (158 loc) · 6.08 KB
/
checkInput.lua
File metadata and controls
176 lines (158 loc) · 6.08 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
164
165
166
167
168
169
170
171
172
173
174
175
176
local _midsummer, _midsummerNS = ...
-- Continent Selection Keywords
local easternKingdomValidEntries = {"ek", "eastern kingdoms", "eastern", "east", "1"};
local kalimdorValidEntries = {"kmdr","kalimdor","kali", "2"};
local outlandValidEntries = {"ol", "outland", "out", "3"};
local northrendValidEntries = {"nr", "north", "rend", "northrend", "wotlk", "4"};
local cataclysmValidEntries = {"cata", "catclysm", "cat", "5"};
local pandariaValidEntries = {"pandaria", "pan", "panda", "mop", "6"};
local draenorValidEntries = {"wod", "draenor", "warlords", "warlords of draenor", "7"};
local brokenIslesValidEntries = {"bi", "broken isles", "broken", "isles", "legion", "8"};
-- Conditional Selections
local toggleRemainingValidEntries = {"remaining", "all", "toggle", "switch"}
local honorVsExtinguishValidEntries = {""}
--Input Found Toggle
local inputFound = false;
function _midsummerNS.checkInput(msg)
local checkValue = string.lower(msg)
_midsummerNS.checkInputValue(msg);
end
function _midsummerNS.checkInputValue(msg)
_midsummerNS.checkEasternKingdoms(msg)
_midsummerNS.checkKalimdor(msg)
_midsummerNS.checkOutland(msg)
_midsummerNS.checkNorthrend(msg)
_midsummerNS.checkCataclysm(msg)
_midsummerNS.checkPandaria(msg)
_midsummerNS.checkDraenor(msg)
_midsummerNS.checkBrokenIsles(msg)
if inputFound == false then
_midsummerNS.commandInput(msg)
end
inputFound = false;
end
function _midsummerNS. commandInput(msg)
checkValue = msg;
if checkValue == "missing" then
checkAll = false;
print("Midsummer will now only show locations you haven't visited.")
elseif checkValue == "all" then
checkAll = true;
print("Midsummer will now show all locations that you have and have not visited.")
elseif checkValue == "extinguish" then
extinguish = true;
print ("Now checking Extinguish objectives. You can switch back to Honor objectives with the 'Honor' parameter.")
elseif checkValue == "honor" then
extinguish = false;
print ("Now checking Honor the Flame objectives. You can switch back to Extinguish with the 'Extinguish' paramater.")
elseif checkValue == "show" then
extinguish = false;
MidsummerFrame:Show();
else
_midsummerNS.instructions()
end
end
function _midsummerNS.checkEasternKingdoms(msg)
for k, v in pairs(easternKingdomValidEntries)
do
if easternKingdomValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(ek, ekQuests)
else
_midsummerNS.outputProcess(extinguishEk, extinguishEkQuests)
end
inputFound = true;
end
end
end
function _midsummerNS.checkKalimdor(msg)
for k, v in pairs(kalimdorValidEntries)
do
if kalimdorValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(kmdr, kmdrQuests)
else
_midsummerNS.outputProcess(extinguishKmdr, extinguishKmdrQuests)
end
inputFound = true;
end
end
end
function _midsummerNS.checkOutland(msg)
for k, v in pairs(outlandValidEntries)
do
if outlandValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(outland, outlandQuests)
else
_midsummerNS.outputProcess(extinguishOutland, extinguishOutlandQuests)
end
inputFound = true;
end
end
end
function _midsummerNS.checkNorthrend(msg)
for k, v in pairs(northrendValidEntries)
do
if northrendValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(northrend, northrendQuests)
else
_midsummerNS.outputProcess(extinguishNorthrend, extinguishNorthrendQuests)
end
inputFound = true;
end
end
end
function _midsummerNS.checkCataclysm(msg)
for k, v in pairs(cataclysmValidEntries)
do
if cataclysmValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(cataclysm, cataclysmQuests)
else
_midsummerNS.outputProcess(extinguishCataclysm, extinguishCataclysmQuests)
end
inputFound = true;
end
end
end
function _midsummerNS.checkPandaria(msg)
for k, v in pairs(pandariaValidEntries)
do
if pandariaValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(pandaria, pandariaQuests)
else
_midsummerNS.outputProcess(extinguishPandaria, extinguishPandariaQuests)
end
inputFound = true;
end
end
end
function _midsummerNS.checkDraenor(msg)
for k, v in pairs(draenorValidEntries)
do
if draenorValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(draenor, draenorQuests)
else
_midsummerNS.outputProcess(extinguishDraenor, extinguishDraenorQuests)
end
inputFound = true;
end
end
end
function _midsummerNS.checkBrokenIsles(msg)
for k, v in pairs(brokenIslesValidEntries)
do
if brokenIslesValidEntries[k] == msg then
if extinguish == false then
_midsummerNS.outputProcess(brokenIsles, brokenIslesQuests)
else
_midsummerNS.outputProcess(extinguishBrokenIsles, extinguishBrokenIslesQuests)
end
inputFound = true;
end
end
end