1 | <?php
|
---|
2 | //definice konstant
|
---|
3 | $dir_out = 'compile/';
|
---|
4 | $version = '1.1';
|
---|
5 | $wow = 'CZ';
|
---|
6 | $where = "Vote > 3 AND Language = 1 AND complete = 1";
|
---|
7 | $where_sk = "Vote > 3 AND Language = 2 AND complete = 1";
|
---|
8 | $limit = '';
|
---|
9 |
|
---|
10 | $ListFile[0] = array(
|
---|
11 | "File" => "QuestDescription_1.lua",
|
---|
12 | "Header" => $wow."WOW_QuestDescription_count=1;".$wow."WOW_QuestDescription_1={",
|
---|
13 | "Footer" => "};if not ".$wow."WOW_QuestDescription then ".$wow."WOW_QuestDescription=0;end;".$wow."WOW_QuestDescription=".$wow."WOW_QuestDescription",
|
---|
14 | "sql" => "SELECT DISTINCT entry, (
|
---|
15 | SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
|
---|
16 | ORDER BY vote DESC LIMIT 1
|
---|
17 | ) as cz, (
|
---|
18 | SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
19 | ) as en FROM quests as quests_distric
|
---|
20 | WHERE $where_sk $limit",
|
---|
21 | );
|
---|
22 | $ListFile[1] = array(
|
---|
23 | "File" => "QuestObjective_1.lua",
|
---|
24 | "Header" => $wow."WOW_QuestObjective_count=1;".$wow."WOW_QuestObjective_1={",
|
---|
25 | "Footer" => "};if not ".$wow."WOW_QuestObjective then ".$wow."WOW_QuestObjective=0; end; ".$wow."WOW_QuestObjective=".$wow."WOW_QuestObjective",
|
---|
26 | "sql" => "SELECT DISTINCT entry, (
|
---|
27 | SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
|
---|
28 | ORDER BY vote DESC LIMIT 1
|
---|
29 | ) as cz, (
|
---|
30 | SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
31 | ) as en FROM quests as quests_distric
|
---|
32 | WHERE $where_sk $limit",
|
---|
33 | );
|
---|
34 | $ListFile[2] = array(
|
---|
35 | "File" => "QuestReward_1.lua",
|
---|
36 | "Header" => $wow."WOW_QuestReward_count=1;".$wow."WOW_QuestReward_1={",
|
---|
37 | "Footer" => "};if not ".$wow."WOW_QuestReward then ".$wow."WOW_QuestReward=0; end; ".$wow."WOW_QuestReward=".$wow."WOW_QuestReward",
|
---|
38 | "sql" => "SELECT DISTINCT entry, (
|
---|
39 | SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
|
---|
40 | ORDER BY vote DESC LIMIT 1
|
---|
41 | ) as cz, (
|
---|
42 | SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
43 | ) as en FROM quests as quests_distric
|
---|
44 | WHERE $where_sk $limit",
|
---|
45 | );
|
---|
46 | $ListFile[3] = array(
|
---|
47 | "File" => "QuestProgress_1.lua",
|
---|
48 | "Header" => $wow."WOW_QuestProgress_count=1;".$wow."WOW_QuestProgress_1={",
|
---|
49 | "Footer" => "};if not ".$wow."WOW_QuestProgress then ".$wow."WOW_QuestProgress=0; end; ".$wow."WOW_QuestProgress=".$wow."WOW_QuestProgress",
|
---|
50 | "sql" => "SELECT DISTINCT entry, (
|
---|
51 | SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
|
---|
52 | ORDER BY vote DESC LIMIT 1
|
---|
53 | ) as cz, (
|
---|
54 | SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
55 | ) as en FROM quests as quests_distric
|
---|
56 | WHERE $where_sk $limit",
|
---|
57 | );
|
---|
58 | $ListFile[4] = array(
|
---|
59 | "File" => "BookPage_1.lua",
|
---|
60 | "Header" => $wow."WOW_BookPage_count=1;".$wow."WOW_BookPage_1={",
|
---|
61 | "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
|
---|
62 | "sql" => "SELECT DISTINCT entry, (
|
---|
63 | SELECT Text FROM page as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 2 AND complete = 1
|
---|
64 | ORDER BY vote DESC LIMIT 1
|
---|
65 | ) as cz, (
|
---|
66 | SELECT Text FROM page as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
|
---|
67 | ) as en FROM page as page_text_distric
|
---|
68 | WHERE $where_sk $limit",
|
---|
69 | );
|
---|
70 |
|
---|
71 | $sql = '';
|
---|
72 | for ($i=0;$i<8 ;++$i ) {
|
---|
73 | for ($j=0;$j<2 ;++$j ) {
|
---|
74 | $sql = $sql."SELECT DISTINCT entry, (
|
---|
75 | SELECT text".$i."_$j FROM npc as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 2 AND complete = 1
|
---|
76 | ORDER BY vote DESC LIMIT 1
|
---|
77 | ) as cz, (
|
---|
78 | SELECT text".$i."_$j FROM npc as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
|
---|
79 | ) as en FROM npc as npc_text_distric
|
---|
80 | WHERE $where $limit UNION ";
|
---|
81 | }
|
---|
82 | }
|
---|
83 | $sql = substr($sql, 0, strlen($sql)-7);
|
---|
84 | $ListFile[5] = array(
|
---|
85 | "File" => "NPCText_1.lua",
|
---|
86 | "sql" => $sql,
|
---|
87 | "Header" => $wow."WOW_NPCText_count=1;".$wow."WOW_NPCText_1={",
|
---|
88 | "Footer" => "};if not ".$wow."WOW_NPCText then ".$wow."WOW_NPCText=0; end; ".$wow."WOW_NPCText=".$wow."WOW_NPCText",
|
---|
89 | );
|
---|
90 |
|
---|
91 | //české texty ================================================================
|
---|
92 |
|
---|
93 |
|
---|
94 | $ListFile[6] = array(
|
---|
95 | "File" => "QuestDescription_2.lua",
|
---|
96 | "Header" => $wow."WOW_QuestDescription_count=2;".$wow."WOW_QuestDescription_2={",
|
---|
97 | "Footer" => "};if not ".$wow."WOW_QuestDescription then ".$wow."WOW_QuestDescription=0;end;".$wow."WOW_QuestDescription=".$wow."WOW_QuestDescription",
|
---|
98 | "sql" => "SELECT DISTINCT entry, (
|
---|
99 | SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
|
---|
100 | ORDER BY vote DESC LIMIT 1
|
---|
101 | ) as cz, (
|
---|
102 | SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
103 | ) as en FROM quests as quests_distric
|
---|
104 | WHERE $where $limit",
|
---|
105 | );
|
---|
106 | $ListFile[7] = array(
|
---|
107 | "File" => "QuestObjective_2.lua",
|
---|
108 | "Header" => $wow."WOW_QuestObjective_count=2;".$wow."WOW_QuestObjective_2={",
|
---|
109 | "Footer" => "};if not ".$wow."WOW_QuestObjective then ".$wow."WOW_QuestObjective=0; end; ".$wow."WOW_QuestObjective=".$wow."WOW_QuestObjective",
|
---|
110 | "sql" => "SELECT DISTINCT entry, (
|
---|
111 | SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
|
---|
112 | ORDER BY vote DESC LIMIT 1
|
---|
113 | ) as cz, (
|
---|
114 | SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
115 | ) as en FROM quests as quests_distric
|
---|
116 | WHERE $where $limit",
|
---|
117 | );
|
---|
118 | $ListFile[8] = array(
|
---|
119 | "File" => "QuestReward_2.lua",
|
---|
120 | "Header" => $wow."WOW_QuestReward_count=2;".$wow."WOW_QuestReward_2={",
|
---|
121 | "Footer" => "};if not ".$wow."WOW_QuestReward then ".$wow."WOW_QuestReward=0; end; ".$wow."WOW_QuestReward=".$wow."WOW_QuestReward",
|
---|
122 | "sql" => "SELECT DISTINCT entry, (
|
---|
123 | SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
|
---|
124 | ORDER BY vote DESC LIMIT 1
|
---|
125 | ) as cz, (
|
---|
126 | SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
127 | ) as en FROM quests as quests_distric
|
---|
128 | WHERE $where $limit",
|
---|
129 | );
|
---|
130 | $ListFile[9] = array(
|
---|
131 | "File" => "QuestProgress_2.lua",
|
---|
132 | "Header" => $wow."WOW_QuestProgress_count=2;".$wow."WOW_QuestProgress_2={",
|
---|
133 | "Footer" => "};if not ".$wow."WOW_QuestProgress then ".$wow."WOW_QuestProgress=0; end; ".$wow."WOW_QuestProgress=".$wow."WOW_QuestProgress",
|
---|
134 | "sql" => "SELECT DISTINCT entry, (
|
---|
135 | SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
|
---|
136 | ORDER BY vote DESC LIMIT 1
|
---|
137 | ) as cz, (
|
---|
138 | SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
|
---|
139 | ) as en FROM quests as quests_distric
|
---|
140 | WHERE $where $limit",
|
---|
141 | );
|
---|
142 | $ListFile[10] = array(
|
---|
143 | "File" => "BookPage_2.lua",
|
---|
144 | "Header" => $wow."WOW_BookPage_count=2;".$wow."WOW_BookPage_2={",
|
---|
145 | "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
|
---|
146 | "sql" => "SELECT DISTINCT entry, (
|
---|
147 | SELECT Text FROM page as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 1 AND complete = 1
|
---|
148 | ORDER BY vote DESC LIMIT 1
|
---|
149 | ) as cz, (
|
---|
150 | SELECT Text FROM page as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
|
---|
151 | ) as en FROM page as page_text_distric
|
---|
152 | WHERE $where $limit",
|
---|
153 | );
|
---|
154 |
|
---|
155 |
|
---|
156 | $sql = '';
|
---|
157 | for ($i=0;$i<8 ;++$i ) {
|
---|
158 | for ($j=0;$j<2 ;++$j ) {
|
---|
159 | $sql = $sql."SELECT DISTINCT entry, (
|
---|
160 | SELECT text".$i."_$j FROM npc as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 1 AND complete = 1
|
---|
161 | ORDER BY vote DESC LIMIT 1
|
---|
162 | ) as cz, (
|
---|
163 | SELECT text".$i."_$j FROM npc as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
|
---|
164 | ) as en FROM npc as npc_text_distric
|
---|
165 | WHERE $where $limit UNION ";
|
---|
166 | }
|
---|
167 | }
|
---|
168 | $sql = substr($sql, 0, strlen($sql)-7);
|
---|
169 |
|
---|
170 | $ListFile[11] = array(
|
---|
171 | "File" => "NPCText_2.lua",
|
---|
172 | "Header" => $wow."WOW_NPCText_count=2;".$wow."WOW_NPCText_2={",
|
---|
173 | "Footer" => "};if not ".$wow."WOW_NPCText then ".$wow."WOW_NPCText=0; end; ".$wow."WOW_NPCText=".$wow."WOW_NPCText",
|
---|
174 | "sql" => $sql,
|
---|
175 | );
|
---|
176 |
|
---|
177 | $define_images[0] = array(
|
---|
178 | "File" => "quests",
|
---|
179 | "sql" => "quests",
|
---|
180 | "where" => $where,
|
---|
181 | );
|
---|
182 | $define_images[1] = array(
|
---|
183 | "File" => "npc_text",
|
---|
184 | "sql" => "npc_text",
|
---|
185 | "where" => $where,
|
---|
186 | );
|
---|
187 | $define_images[2] = array(
|
---|
188 | "File" => "page_text",
|
---|
189 | "sql" => "page_text",
|
---|
190 | "where" => $where,
|
---|
191 | );
|
---|
192 |
|
---|
193 | $define_images[3] = array(
|
---|
194 | "File" => "quests_sk",
|
---|
195 | "sql" => "quests",
|
---|
196 | "where" => $where_sk,
|
---|
197 | );
|
---|
198 | $define_images[4] = array(
|
---|
199 | "File" => "npc_text_sk",
|
---|
200 | "sql" => "npc_text",
|
---|
201 | "where" => $where_sk,
|
---|
202 | );
|
---|
203 | $define_images[5] = array(
|
---|
204 | "File" => "page_text_sk",
|
---|
205 | "sql" => "page_text",
|
---|
206 | "where" => $where_sk,
|
---|
207 | );
|
---|
208 |
|
---|
209 |
|
---|
210 | $var_g = array(
|
---|
211 | array('good sir','my lady'),
|
---|
212 | array('lord','lady'),
|
---|
213 | array(' lad ',' lass'),
|
---|
214 | array('brother','sister'),
|
---|
215 | array('his','her'),
|
---|
216 | array('he','she'),
|
---|
217 | array('him','her'),
|
---|
218 | array('sir','madam'),
|
---|
219 | array(' men ',' women'),
|
---|
220 | array(' brotha','sista'),
|
---|
221 | array('buddy','lady'),
|
---|
222 | array(' sir ',' madam'),
|
---|
223 | array(' boy','girl'),
|
---|
224 | array(' brothers','sisters'),
|
---|
225 | array('boy','girl'),
|
---|
226 | array(' man','woman'),
|
---|
227 | array(' brother','sister'),
|
---|
228 | array(' men','women'),
|
---|
229 | array(' sir','miss'),
|
---|
230 | array(' fella','lady'),
|
---|
231 | array(' his','her'),
|
---|
232 | array('himself','herself'),
|
---|
233 | array('father','mother'),
|
---|
234 | array(' succubus','infernal'),
|
---|
235 | array('lad','lass'),
|
---|
236 | array(' guy','girl'),
|
---|
237 | array(' brother ',' sister'),
|
---|
238 | array('priest','priestess'),
|
---|
239 | array('laddy','lassy'),
|
---|
240 | array('brothers','sisters'),
|
---|
241 | array('man','lady'),
|
---|
242 | array(' him ',' her'),
|
---|
243 | array(' lad','missy'),
|
---|
244 | array(' boy ',' girl'),
|
---|
245 | array(' him','her'),
|
---|
246 | array('king','queen'),
|
---|
247 | array(' man ',' woman'),
|
---|
248 | array('dad','mon'),
|
---|
249 | array(' mr. ',' ms.'),
|
---|
250 | array(' fellow ',' sister'),
|
---|
251 | array(' lord','lady'),
|
---|
252 | array('mister','missy'),
|
---|
253 | array('her','him'),
|
---|
254 | array(' he','she'),
|
---|
255 | array(' female','male'),
|
---|
256 | array(' his ',' her'),
|
---|
257 | array('kráľa','kráľovnej'),
|
---|
258 | array(' bratře ',' sestro'),
|
---|
259 | array('pomáhal','pomáhala'),
|
---|
260 | array('přiložil','přiložila'),
|
---|
261 | array('mohl','mohla'),
|
---|
262 | array('našel','našla'),
|
---|
263 | array('zabil','zabila'),
|
---|
264 | array('ukázal','ukázala'),
|
---|
265 | array('vedl','vedla'),
|
---|
266 | array('přinesl','přinesla'),
|
---|
267 | array('získal','získala'),
|
---|
268 | array('ochotný','ochotná'),
|
---|
269 | array('byl jsi','byla jsi'),
|
---|
270 | array('dokázal','dokázala'),
|
---|
271 | array('nasbíral','nasbírala'),
|
---|
272 | array('udělal','udělala'),
|
---|
273 | array('počul','počula'),
|
---|
274 | array('hotový','hotová'),
|
---|
275 | array('chlapče','dievča'),
|
---|
276 | array('išiel','išla'),
|
---|
277 | array('našiel','našla'),
|
---|
278 | array('urobil','urobila'),
|
---|
279 | array('postaral','postarala'),
|
---|
280 | array(' pane ',' madam'),
|
---|
281 | array(' boyo ',' girly'),
|
---|
282 | array(' son ',' daughter'),
|
---|
283 | array(' mister ',' miss'),
|
---|
284 | array(' jackson ',' princess'),
|
---|
285 | array(' mister','miss'),
|
---|
286 | array('waiter','waitress'),
|
---|
287 | array('laddie ',' lassie'),
|
---|
288 | array('lad ',' lass'),
|
---|
289 | array('boyo ',' girlie'),
|
---|
290 | array('boy ',' girl'),
|
---|
291 | array(' mon ',' sis'),
|
---|
292 | array(' master','mistress'),
|
---|
293 | array('he\'s ',' she\'s'),
|
---|
294 | array(' guy ',' lady'),
|
---|
295 | array(' sonny','missy'),
|
---|
296 | array(' hero ',' heroine'),
|
---|
297 | array('pal','sugar'),
|
---|
298 | array(' mladíku ',' děvče'),
|
---|
299 | array(' mladíku','děvče'),
|
---|
300 | array('kamaráde','miláčku'),
|
---|
301 | array('mal','mala'),
|
---|
302 | array(' bratr ',' sestra'),
|
---|
303 | );
|
---|
304 |
|
---|
305 |
|
---|
306 | ?>
|
---|