alert.lua

main 1956 lines · 66.9 KB Raw
Alex Alex Commit Client Upload Part 2 19/10/2026 00:06
1mapPanel = modules.game_interface.getMapPanel()
2gameRootPanel = modules.game_interface.gameBottomPanel
3gameLeftPanel = modules.game_interface.getLeftPanel()
4gameTopMenu = modules.client_topmenu.getTopMenu()
5gameRoot = modules.game_interface.getRootPanel()
6
7local DEATH_SCREEN = nil
8local SCENE_BAR_1, SCENE_BAR_2, TELA_FULL, FADE_OUT, SKIP_SCENE = nil, nil, nil, nil, nil
9local ChestID, Pass_1, Pass_2, Pass_3, Pass_4 = 0, 0, 0, 0, 0
10local Nexus_Time = 0
11local WarView = false
12local Index_Time = 0
13local QuestWind = nil
14local AlertWindow = 0
15local speed = 300
16local windAlert = Loot_0
17local DelayLoot = 5000
18local CINEMATIC = false
19local TaskWind, TaskVisible, TaskDelay, TaskWind1 = nil, 0, 5, nil
20local SAQ_GLOBAL_POSITION, SAQ_CHESTID = 0, 0
21local alertPos = {
22 [00] = { -- PC
23 [00] = 070,
24 [01] = 140,
25 [02] = 210,
26 [03] = 280,
27 [04] = 350,
28 [05] = 420,
29 [06] = 490,
30 [07] = 560,
31 [08] = 630,
32 [09] = 700,
33 [10] = 770,
34 };
35 [01] = { -- MOBILE
36 [0] = 40,
37 [1] = 85,
38 [2] = 130,
39 [3] = 175,
40 [4] = 220,
41 [5] = 265,
42 };
43}
44local PASSWORD_CHEST = {
45 [01] = {PASS = 9255, TYPE = "COINS", ITEM = {003000, 00, 00, 00}, STORAGE = {0000, 100}};
46 [02] = {PASS = 1383, TYPE = "COINS", ITEM = {010000, 00, 00, 00}, STORAGE = {0000, 100}};
47 [03] = {PASS = 2431, TYPE = "COINS", ITEM = {025000, 00, 00, 00}, STORAGE = {0000, 100}};
48 [04] = {PASS = 4659, TYPE = "COINS", ITEM = {099000, 00, 00, 00}, STORAGE = {0000, 100}};
49
50 [05] = {PASS = 1736, TYPE = "EQUIP", ITEM = {009006, 09, 01, 00, 01}, STORAGE = {0000, 100}};
51 [06] = {PASS = 9467, TYPE = "EQUIP", ITEM = {007005, 07, 01, 00, 01}, STORAGE = {0000, 100}};
52 [07] = {PASS = 8342, TYPE = "EQUIP", ITEM = {004022, 04, 02, 00, 01}, STORAGE = {0000, 100}};
53 [08] = {PASS = 6621, TYPE = "EQUIP", ITEM = {005038, 05, 03, 00, 01}, STORAGE = {0000, 100}};
54 [09] = {PASS = 9446, TYPE = "EQUIP", ITEM = {003055, 03, 00, 00, 30}, STORAGE = {0000, 100}};
55
56 -- SAQUEADORES
57 [10] = {PASS = 2552, TYPE = "EQUIP", ITEM = {03081, 03, 00, 00, 15}, STORAGE = {00002, 000}};
58 [11] = {PASS = 8349, TYPE = "ITEMS", ITEM = {03240, 03, 00, 00, 15}, STORAGE = {00002, 003}};
59 [12] = {PASS = 6397, TYPE = "ITEMS", ITEM = {03134, 03, 00, 00, 15}, STORAGE = {00002, 003}};
60 [13] = {PASS = 5412, TYPE = "ITEMS", ITEM = {03141, 03, 00, 00, 05}, STORAGE = {00002, 003}};
61 [14] = {PASS = 6141, TYPE = "ITEMS", ITEM = {03007, 03, 00, 00, 20}, STORAGE = {00002, 003}};
62}
63function mask_number(n)
64 local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$')
65 return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right
66end
67function init()
68 connect(g_game, {
69 connect(g_game, 'onTextMessage', onAlertMessage),
70 })
71 connect(g_game, { onGameEnd = offline })
72 WarPlacar = g_ui.displayUI('placar')
73 timerPlacar = WarPlacar:recursiveGetChildById('timer')
74 blueScore = WarPlacar:recursiveGetChildById('blueScore')
75 redScore = WarPlacar:recursiveGetChildById('redScore')
76 WarAlert = g_ui.displayUI('war')
77 playerWarProgress = WarAlert:recursiveGetChildById('playerProgress')
78 TutorView = g_ui.displayUI('tutor')
79 TutorTitle = TutorView:recursiveGetChildById('title')
80 TutorImg = TutorView:recursiveGetChildById('imgDestaque')
81 TutorDesc = TutorView:recursiveGetChildById('desc')
82 TimerView = g_ui.displayUI('timer')
83 Desistir = TimerView:recursiveGetChildById('desistirDG')
84 Timer1 = TimerView:recursiveGetChildById('Time1')
85 Timer2 = TimerView:recursiveGetChildById('Time2')
86 Timer3 = TimerView:recursiveGetChildById('Time3')
87 Timer4 = TimerView:recursiveGetChildById('Time4')
88 Loot_0 = g_ui.displayUI('alert')
89 Loot_1 = g_ui.displayUI('alert')
90 Loot_2 = g_ui.displayUI('alert')
91 Loot_3 = g_ui.displayUI('alert')
92 Loot_4 = g_ui.displayUI('alert')
93 Loot_5 = g_ui.displayUI('alert')
94 Chest = g_ui.displayUI('chest')
95 Loot_0:hide() Loot_1:hide() Loot_2:hide() Loot_3:hide() Loot_4:hide() Loot_5:hide() TutorView:hide() TimerView:hide() Chest:hide() WarAlert:hide()
96 WarPlacar:hide()
97end
98
99local Timer = 0
100local TextTutor = {
101 [00] = { -- PC
102 [00] = {
103 TITLE = "BOAS VINDAS",
104 DESC = "Seja bem vindo ao RD Core.\n\nPara comecar bem sua jornada, pegue sua primeira arma no bau localizado aqui na Base."
105 };
106 [01] = {
107 TITLE = "EQUIPANDO ITEMS",
108 DESC = "Logo abaixo, em seu HUD principal, clique no icone de mochila para abrir o menu do cliente.\n\nO mesmo menu tambem pode ser acessado usando o atalho Ctrl + U."
109 };
110 [02] = {
111 TITLE = "EQUIPANDO ITEMS",
112 DESC = "Clique no slot pretendido para abrir sua backpack. Cada slot possui sua propria backpack individual, podendo ser expandido.\n\nAo abrir a backpack, clique no item para equipar."
113 };
114 [03] = {
115 TITLE = "ACESSANDO MISSOES",
116 DESC = "Abrindo o menu, voce pode navegar por diferentes categorias.\n\nClique no icone de Quest para abrir o seu Quest Log e clique na Quest 'Primeiros Passos'."
117 };
118 [04] = {
119 TITLE = "RASTREANDO MISSOES",
120 DESC = "Ao clicar em uma missao, voce podera ver detalhes sobre ela.\n\nClique em 'Rastrear Missao' para que o objetivo seja marcado em seu mapa."
121 };
122 [05] = {
123 TITLE = "FALANDO COM NPC",
124 DESC = "Voce nao precisa digitar para falar com um NPC.\n\nClique com o botao direito do mouse sobre o NPC para falar com ele."
125 };
126 [06] = {
127 TITLE = "SKILL DE SUPORTE",
128 DESC = "Como habilidade de suporte, voce tem: Velocidade e Cura.\n\nClique sobre elas para usar ou posicione o mouse sobre elas para mais informacoes."
129 };
130 [07] = {
131 TITLE = "REABASTECER",
132 DESC = "O NPC Eryn pode recuperar toda a sua vida. Tambem lhe dara municao se voce tiver menos de 100. Tudo gratuitamente.\n\nFale com ele e clique em 'Reabastecer'."
133 };
134 [08] = {
135 TITLE = "CENTRAL BOX",
136 DESC = "Essas sao as Central Box. Nelas voce pode vender seus itens ou aprimorar seus equipamentos. Voce tambem pode comprar municao e pocoes de cura."
137 };
138 [09] = {
139 TITLE = "USANDO SKILLS",
140 DESC = "Clique sobre a skill para usa-la. Passe o mouse sobre ela para ver em qual Hotkey ela esta equipada.\n\nSe desejar mudar, clique com o botao direito do mouse sobre a skill para trocar a Hotkey."
141 };
142 [10] = {
143 TITLE = "EXPLORANDO O MAPA",
144 DESC = "Pontos de Interrogacao ( ? ) indicam locais de interesse. Clique no icone de 'mundo' localizado na HUD inferior para abrir o mapa.\n\nNovos pontos de interesse sao desbloqueados a medida que avanca de level."
145 };
146 [11] = {
147 TITLE = "TRANSPORTE",
148 DESC = "Para ajudar a se locomover mais rapidamente pelo continente, todo recruta que chega a ilha recebe uma montaria.\n\nPressione Ctrl + R para montar ou use a janela de outfit para selecionar a montaria."
149 };
150 [12] = {
151 TITLE = "SINCRONIZAcaO",
152 DESC = "Descubra novos Nexus e desbloqueie novos locais de caca. Abra seu Mapa para ver os locais ja desbloqueados.\n\nSe for Premium Account, voce pode se teleportar para qualquer Nexus."
153 };
154 [13] = {
155 TITLE = "QUADRO DE ATIVIDADES",
156 DESC = "Em um Quadro de Atividades voce pode iniciar Task, enfrentar Dangerous e outra atividade exclusiva do Nexus que esta. Cada Nexus possui seu proprio Quadro de Atividades com suas proprias tarefas."
157 };
158 [14] = {
159 TITLE = "BLACKLIST",
160 DESC = "Use Pontos ganho em atividades no Quadro de Atividades para enfrentar bosses na Blacklist.\n\nTodo boss possui chance de dropar armas lendarias."
161 };
162 [15] = {
163 TITLE = "PONTOS ONLINE",
164 DESC = "Algumas atividades exigem Pontos Online para participar. A cada 1 hora Online voce obtem x1 Ponto.\n\nVoce tambem pode usar esses pontos no Shop do servidor."
165 };
166 [16] = {
167 TITLE = "ESTaTUAS DE AcaO",
168 DESC = "Este local contem algumas dessas estatuas.\n\nEncontre as Estatuas e clique nelas na ordem correta. A ultima estatua te levara para a sala de recompensas."
169 };
170 [17] = {
171 TITLE = "PENDULUM",
172 DESC = "Encontre estes relogios por toda a area e clique neles na ordem correta.\n\nExiste 13 ao todo e o ultimo te levara para a sala de recompensas."
173 };
174 [18] = {
175 TITLE = "PILARES DE GELO",
176 DESC = "Limpe toda a area primeiro. Apos isso, clique nos pilares de gelo para libera mais monstros.\n\nClique em todos para poder liberar acesso ao Bau de Recompensa."
177 };
178 [19] = {
179 TITLE = "LIMPANDO A aREA",
180 DESC = "Existe 06 locais nesta area. Visite cada um desses locais e elimine todos os monstros nele.\n\nApos isso, clique no Objeto no centro da area para liberar o bau."
181 };
182 [20] = {
183 TITLE = "SKULL MONSTER",
184 DESC = "Encontre e elimine os monstros que possuem uma Skull Branca abaixo de seu nome.\n\nElimine todos para ganhar acesso ao Bau."
185 };
186 [21] = {
187 TITLE = "SEQUeNCIA DE PORTAIS",
188 DESC = "Passe pelos Portais na ordem correta para liberar acesso a proxima Zona."
189 };
190 [22] = {
191 TITLE = "VIG�LIA DA GARGULA",
192 DESC = "Clique nas estatuas para mudar sua direcao.\n\nClique na estatua do Dragao para verificar se a posicao da gargula esta correta."
193 };
194 [23] = {
195 TITLE = "ESTaTUAS DA MEM�RIA",
196 DESC = "Clique na estatua de dragao no centro para iniciar. Decore onde o efeito aparecera e clique nas estatuas de acordo."
197 };
198 [24] = {
199 TITLE = "CAMINHO DE LAVA",
200 DESC = "Clique na estatua do dragao no final do caminho. Cuidado com os ataques vindos dos pilares."
201 };
202 [25] = {
203 TITLE = "PROTETOR DE CRISTAL",
204 DESC = "Existem protetores espalhados por toda a area. Destrua-os para ser teleportado para a sala de recompensa."
205 };
206 [26] = {
207 TITLE = "CRISTAL DO ELEMENTO",
208 DESC = "Cada piramide possui um elemento. Clique e encontre o Crystal correspondente ao elemento transformado. A ordem dos elementos pode ser visto na placa proxima."
209 };
210 [27] = {
211 TITLE = "RITMO PERFEITO",
212 DESC = "Cada instrumento na mesa provoca uma reacao na estatua. Encontre o ritmo perfeito para poder sair desta area."
213 };
214 [28] = {
215 TITLE = "CONDUZINDO",
216 DESC = "Clique na piramide no inicio da area. Conduza a essencia ate a proximo ponto. Redimensione a energia de acordo com a direcao que voce estiver olhando."
217 };
218 [29] = {
219 TITLE = "PILAR DIMENSIONAL",
220 DESC = "Encontre pela area os Dimensional Pillar e os destrua. Fazendo isso, o Boss final aparecera.\n\nVenca-o para ser teleportado para a recompensa."
221 };
222 [30] = {
223 TITLE = "BOMBA ELEMENTAL",
224 DESC = "Clique no anjo e varias explosoes elementais ocorrera. Clique nos pilares ao lado correspondente ao elemento da explosao para se proteger."
225 };
226 [31] = {
227 TITLE = "CHAMA DO DRAGaO",
228 DESC = "Conduzir os dragoes pelo caminho ate as chamas. Os dois dragoes devem encontrar a chama ao mesmo tempo. A direcao que voce olha ao pisar no tile indica a direcao onde o dragao se movimentara."
229 };
230 [32] = {
231 TITLE = "CENTRAL DOS PORTAIS",
232 DESC = "Encontre o portal correto para casa area do mapa. Cada area possui um Boss para eliminar ou um Puzzle para resolver.\n\nObtenha todos os Selos para prosseguir ate a recompensa."
233 };
234 [33] = {
235 TITLE = "ESTaTUA DOS IMORTAIS",
236 DESC = "Clique na estatua para liberar o Boss. Passe por todos os bosses para ganhar acesso ao Bau."
237 };
238 [34] = {
239 TITLE = "DUELO DE KARDS",
240 DESC = "NPCs com este icone indica que ele esta disposto a Duelar com voce. Voce pode encontrar NPCs como esse por toda a area Premium."
241 };
242 [35] = {
243 TITLE = "PENALIDADE DE MORTE",
244 DESC = "Ao morrer, sua EXP sera congelada e nao sera mais possivel ganhar level. Para descongelar, pague a penalidade de EXP exigida.\n\nVoce podera comprar blessing no Shop para zerar sua penalidade."
245 };
246 [36] = {
247 TITLE = "ESTATUAS DA ORDEM",
248 DESC = "Encontre estatuas como essa e clique nelas na ordem correta.\n\nO desafio sera concluido ao clicar em todas as 05 estatuas."
249 };
250 [37] = {
251 TITLE = "ENERGIZANDO",
252 DESC = "Encontre e clique no Basin com fogo. Voce tera 40 segundos para encontrar os cristais que estao no ultimo andar de cada torre.\n\nEnergize os dois cristais e clique novamente no Basin para concluir o desafio."
253 };
254 [38] = {
255 TITLE = "SACRIFICIOS",
256 DESC = "Encontre os pisos especiais nesta area. Voce deve eliminar os monstros somente em cima desse piso para o sacrificio ser aceito.\n\nRepita o processo 05 vezes para concluir o desafio."
257 };
258 [39] = {
259 TITLE = "SIGA EM FRENTE",
260 DESC = "Apenas siga em frente e encontre o caminho para o portal que concluira esse desafio."
261 };
262 [40] = {
263 TITLE = "CASTELO DOS DRAKENS",
264 DESC = "Elimine qualquer especie de Drakens 100 vezes para ganhar acesso ao Boss.\n\nElimine o Boss para concluir o desafio."
265 };
266 [41] = {
267 TITLE = "PORTAL INSTAVEL",
268 DESC = "Drope dos monstros os x3 itens necessarios para passar pelo portal final.\n\nPasse pelo portal para concluir o desafio."
269 };
270 [42] = {
271 TITLE = "LOJA REMOTA",
272 DESC = "O botao de atalho para a loja remota foi adicionado logo abaixo de seu inventario.\n\nClique para abrir uma Central Box em qualquer lugar."
273 };
274 [43] = {
275 TITLE = "NEXUS REMOTO",
276 DESC = "Use o icone que surgiu em sua HUD principal, logo abaixo.\n\nLogo em seguida escolha o Nexus que deseja acessar."
277 };
278 [44] = {
279 TITLE = "SHOP WARZONE",
280 DESC = "Voce sempre ganha PVP Points ao participar de uma Warzone.\n\nUse esses pontos na loja exclusiva disponivel no SHOP do servidor. (MENU > SHOP > WARZONE)."
281 };
282 [45] = {
283 TITLE = "DUELO DE KARDS",
284 DESC = "Uma nova atividade foi desbloqueada. (MENU > ACTIVE > KARDS).\n\nVenca outros NPCs em duelos de Kards e obtenha bonificacao ao vender seus itens em uma Central Box."
285 };
286 [46] = {
287 TITLE = "CONTINUA...",
288 DESC = "As missoes de Jornada terminam aqui. Mas a cada nova expansao do servidor, novas missoes de Jornada sao adicionadas, continuando a hist�ria."
289 };
290 [47] = {
291 TITLE = "SHOP COLISEU",
292 DESC = "Voce obtem chaves sempre que vencer um desafio no coliseu.\n\nUse essas chaves para comprar atributos para equipamentos, disponivel em MENU > ACTIVE > COLISEU."
293 };
294 [48] = {
295 TITLE = "PASSIVAS",
296 DESC = "Clique em um dos 06 slots disponiveis para abrir a janela de passivas."
297 };
298 [49] = {
299 TITLE = "DESBLOQUEANDO PASSIVAS",
300 DESC = "Navegue entre as 04 categorias disponiveis e escolhe uma.\n\nClique no botao Unlock para desbloquear uma passiva e a equipe em seu inventario."
301 };
302 [50] = {
303 TITLE = "UPGRADE DE PASSIVAS",
304 DESC = "Toda passiva possui ate 10 niveis. Clique em Upgrade dentro de uma passiva ja desbloqueada para evoluir.\n\nCada upgrade requer mais pontos para ser desbloqueada."
305 };
306 [51] = {
307 TITLE = "DESCONSTRUIR",
308 DESC = "Com o botao direito do mouse, clique sobre o item que deseja desmontar.\n\nParte dos materiais de upgrade desse item irao para sua backpack."
309 };
310 };
311 [01] = { -- MOBILE
312 [00] = {
313 TITLE = "BOAS VINDAS",
314 DESC = "Seja bem vindo ao RD Core.\n\nDe um toque simples em cima do bau localizado aqui na Base para pegar sua primeira arma."
315 };
316 [01] = {
317 TITLE = "MENU PRINCIPAL",
318 DESC = "No menu a esquerda, clique no icone de mochila para selecionar o menu do cliente e abrir todas as categorias de menu."
319 };
320 [02] = {
321 TITLE = "EQUIPANDO ITEMS",
322 DESC = "Nas categorias, clique no primeiro icone indicando mochila para abrir seu inventario. Selecione seu slot de armas.\n\nAo abrir a backpack, clique no item para equipar."
323 };
324 [03] = {
325 TITLE = "ACESSANDO MISSoES",
326 DESC = "Retorne ao menu de categorias e selecione o icone de quest para abrir seu Quest Log.\n\nSelecione a Quest 'Primeiros Passos'."
327 };
328 [04] = {
329 TITLE = "RASTREANDO MISSoES",
330 DESC = "Ao clicar em uma missao, voce podera ver detalhes sobre ela.\n\nClique em 'Rastrear' para que o objetivo seja marcado em seu mapa."
331 };
332 [05] = {
333 TITLE = "FALANDO COM NPC",
334 DESC = "Para falar com um NPC, de um toque simples sobre ele para abrir a janela de dialogos."
335 };
336 [06] = {
337 TITLE = "SKILL DE SUPORTE",
338 DESC = "Como suporte voce tem: Velocidade e Cura.\nDe um toque simples sobre elas para usar."
339 };
340 [07] = {
341 TITLE = "REABASTECER",
342 DESC = "O NPC Eryn pode recuperar toda a sua vida. Tambem lhe dara municao se voce tiver menos de 100. Tudo gratuitamente.\n\nFale com ele e clique em 'Reabastecer'."
343 };
344 [08] = {
345 TITLE = "CENTRAL BOX",
346 DESC = "Essas sao as Central Box. Nelas voce pode vender seus itens ou aprimorar seus equipamentos. Voce tambem pode comprar municao e pocoes de cura."
347 };
348 [09] = {
349 TITLE = "USANDO SKILLS",
350 DESC = "Voce nao consegue usar skills ou pocoes enquanto se movimenta com o Keypad.\n\nPare se se movimentar brevemente para usar as skills."
351 };
352 [10] = {
353 TITLE = "EXPLORANDO O MAPA",
354 DESC = "Pontos de Interrogacao ( ? ) indicam locais de interesse. Abra o menu de categorias clicando na mochila e clique no icone de Mundo, o ultimo da lista.\nNovos pontos sao desbloqueados ao avanca de level."
355 };
356 [11] = {
357 TITLE = "TRANSPORTE",
358 DESC = "Voce ganhou uma montaria.\n\nToque e segure o dedo em cima de seu personagem para abrir as opcoes. Selecione 'Mount'."
359 };
360 [12] = {
361 TITLE = "SINCRONIZAcaO",
362 DESC = "Descubra novos Nexus e desbloqueie novos locais de caca. Abra seu Mapa para ver os locais ja desbloqueados.\n\nSe for Premium Account, voce pode se teleportar para qualquer Nexus."
363 };
364 [13] = {
365 TITLE = "QUADRO DE ATIVIDADES",
366 DESC = "Em um Quadro de Atividades voce pode iniciar Task, enfrentar Dangerous e outra atividade exclusiva do Nexus que esta. Cada Nexus possui seu pr�prio Quadro de Atividades com suas pr�prias tarefas."
367 };
368 [14] = {
369 TITLE = "BLACKLIST",
370 DESC = "Use Pontos ganho em atividades no Quadro de Atividades para enfrentar bosses na Blacklist.\n\nTodo boss possui chance de dropar armas lendarias."
371 };
372 [15] = {
373 TITLE = "PONTOS ONLINE",
374 DESC = "Algumas atividades exigem Pontos Online para participar. A cada 1 hora Online voce obtem x1 Ponto.\n\nVoce tambem pode usar esses pontos no Shop do servidor."
375 };
376 [16] = {
377 TITLE = "ESTaTUAS DE AcaO",
378 DESC = "Este local contem algumas dessas estatuas.\n\nEncontre as Estatuas e clique nelas na ordem correta. A ultima estatua te levara para a sala de recompensas."
379 };
380 [17] = {
381 TITLE = "PENDULUM",
382 DESC = "Encontre estes rel�gios por toda a area e clique neles na ordem correta.\n\nExiste 13 ao todo e o ultimo te levara para a sala de recompensas."
383 };
384 [18] = {
385 TITLE = "PILARES DE GELO",
386 DESC = "Limpe toda a area primeiro. Ap�s isso, clique nos pilares de gelo para libera mais monstros.\n\nClique em todos para poder liberar acesso ao Bau de Recompensa."
387 };
388 [19] = {
389 TITLE = "LIMPANDO A aREA",
390 DESC = "Existe 06 locais nesta area. Visite cada um desses locais e elimine todos os monstros nele.\n\nAp�s isso, clique no Objeto no centro da area para liberar o bau."
391 };
392 [20] = {
393 TITLE = "SKULL MONSTER",
394 DESC = "Encontre e elimine os monstros que possuem uma Skull Branca abaixo de seu nome.\n\nElimine todos para ganhar acesso ao Bau."
395 };
396 [21] = {
397 TITLE = "SEQUeNCIA DE PORTAIS",
398 DESC = "Passe pelos Portais na ordem correta para liberar acesso a pr�xima Zona."
399 };
400 [22] = {
401 TITLE = "VIG�LIA DA GARGULA",
402 DESC = "Clique nas estatuas para mudar sua direcao.\n\nClique na estatua do Dragao para verificar se a posicao da gargula esta correta."
403 };
404 [23] = {
405 TITLE = "ESTaTUAS DA MEM�RIA",
406 DESC = "Clique na estatua de dragao no centro para iniciar. Decore onde o efeito aparecera e clique nas estatuas de acordo."
407 };
408 [24] = {
409 TITLE = "CAMINHO DE LAVA",
410 DESC = "Clique na estatua do dragao no final do caminho. Cuidado com os ataques vindos dos pilares."
411 };
412 [25] = {
413 TITLE = "PROTETOR DE CRISTAL",
414 DESC = "Existem protetores espalhados por toda a area. Destrua-os para ser teleportado para a sala de recompensa."
415 };
416 [26] = {
417 TITLE = "CRISTAL DO ELEMENTO",
418 DESC = "Cada pir�mide possui um elemento. Clique e encontre o Crystal correspondente ao elemento transformado. A ordem dos elementos pode ser visto na placa pr�xima."
419 };
420 [27] = {
421 TITLE = "RITMO PERFEITO",
422 DESC = "Cada instrumento na mesa provoca uma reacao na estatua. Encontre o ritmo perfeito para poder sair desta area."
423 };
424 [28] = {
425 TITLE = "CONDUZINDO",
426 DESC = "Clique na pir�mide no inicio da area. Conduza a essencia ate a pr�ximo ponto. Redimensione a energia de acordo com a direcao que voce estiver olhando."
427 };
428 [29] = {
429 TITLE = "PILAR DIMENSIONAL",
430 DESC = "Encontre pela area os Dimensional Pillar e os destrua. Fazendo isso, o Boss final aparecera.\n\nVenca-o para ser teleportado para a recompensa."
431 };
432 [30] = {
433 TITLE = "BOMBA ELEMENTAL",
434 DESC = "Clique no anjo e varias explosoes elementais ocorrera. Clique nos pilares ao lado correspondente ao elemento da explosao para se proteger."
435 };
436 [31] = {
437 TITLE = "CHAMA DO DRAGaO",
438 DESC = "Conduzir os dragoes pelo caminho ate as chamas. Os dois dragoes devem encontrar a chama ao mesmo tempo. A direcao que voce olha ao pisar no tile indica a direcao onde o dragao se movimentara."
439 };
440 [32] = {
441 TITLE = "CENTRAL DOS PORTAIS",
442 DESC = "Encontre o portal correto para casa area do mapa. Cada area possui um Boss para eliminar ou um Puzzle para resolver.\n\nObtenha todos os Selos para prosseguir ate a recompensa."
443 };
444 [33] = {
445 TITLE = "ESTaTUA DOS IMORTAIS",
446 DESC = "Clique na estatua para liberar o Boss. Passe por todos os bosses para ganhar acesso ao Bau."
447 };
448 [34] = {
449 TITLE = "DUELO DE KARDS",
450 DESC = "NPCs com este icone indica que ele esta disposto a Duelar com voce. Voce pode encontrar NPCs como esse por toda a area Premiium."
451 };
452 [35] = {
453 TITLE = "PENALIDADE DE MORTE",
454 DESC = "Ao morrer, sua EXP sera congelada e nao sera mais possivel ganhar level. Para descongelar, pague a penalidade de EXP exigida.\n\nVoce podera comprar blessing no Shop para zerar sua penalidade."
455 };
456 [36] = {
457 TITLE = "ESTaTUAS DA ORDEM",
458 DESC = "Encontre estatuas como essa e clique nelas na ordem correta.\n\nO desafio sera concluido ao clicar em todas as 05 estatuas."
459 };
460 [37] = {
461 TITLE = "ENERGIZANDO",
462 DESC = "Encontre e clique no Basin com fogo. Voce tera 40 segundos para encontrar os cristais que estao no ultimo andar de cada torre.\n\nEnergize os dois cristais e clique novamente no Basin para concluir o desafio."
463 };
464 [38] = {
465 TITLE = "SACRIF�CIOS",
466 DESC = "Encontre os pisos especiais nesta area. Voce deve eliminar os monstros somente em cima desse piso para o sacrificio ser aceito.\n\nRepita o processo 05 vezes para concluir o desafio."
467 };
468 [39] = {
469 TITLE = "SIGA EM FRENTE",
470 DESC = "Apenas siga em frente e encontre o caminho para o portal que concluira esse desafio."
471 };
472 [40] = {
473 TITLE = "CASTELO DOS DRAKENS",
474 DESC = "Elimine qualquer especie de Drakens 100 vezes para ganhar acesso ao Boss.\n\nElimine o Boss para concluir o desafio."
475 };
476 [41] = {
477 TITLE = "PORTAL INSTaVEL",
478 DESC = "Drope dos monstros os x3 itens necessarios para passar pelo portal final.\n\nPasse pelo portal para concluir o desafio."
479 };
480 [42] = {
481 TITLE = "LOJA REMOTA",
482 DESC = "O botao de atalho para a loja remota foi adicionado logo abaixo de seu inventario.\n\nClique para abrir uma Central Box em qualquer lugar."
483 };
484 [43] = {
485 TITLE = "NEXUS REMOTO",
486 DESC = "Use o icone que surgiu em sua HUD principal, logo abaixo.\n\nLogo em seguida escolha o Nexus que deseja acessar."
487 };
488 [44] = {
489 TITLE = "SHOP WARZONE",
490 DESC = "Voce sempre ganha PVP Points ao participar de uma Warzone.\n\nUse esses pontos na loja exclusiva disponivel no SHOP do servidor. (MENU > SHOP > WARZONE)."
491 };
492 [45] = {
493 TITLE = "DUELO DE KARDS",
494 DESC = "Uma nova atividade foi desbloqueada. (MENU > ACTIVE > KARDS).\n\nVenca outros NPCs em duelos de Kards e obtenha bonificacao ao vender seus itens em uma Central Box."
495 };
496 [46] = {
497 TITLE = "CONTINUA...",
498 DESC = "As missoes de Jornada terminam aqui. Mas a cada nova expansao do servidor, novas missoes de Jornada sao adicionadas, continuando a hist�ria."
499 };
500 [47] = {
501 TITLE = "SHOP COLISEU",
502 DESC = "Voce obtem chaves sempre que vencer um desafio no coliseu.\n\nUse essas chaves para comprar atributos para equipamentos, disponivel em MENU > ACTIVE > COLISEU."
503 };
504 [48] = {
505 TITLE = "PASSIVAS",
506 DESC = "Clique em um dos 06 slots disponiveis para abrir a janela de passivas."
507 };
508 [49] = {
509 TITLE = "DESBLOQUEANDO PASSIVAS",
510 DESC = "Navegue entre as 04 categorias disponiveis e escolhe uma.\n\nClique no botao Unlock para desbloquear uma passiva e a equipe em seu inventario."
511 };
512 [50] = {
513 TITLE = "UPGRADE DE PASSIVAS",
514 DESC = "Toda passiva possui ate 10 niveis. Clique em Upgrade dentro de uma passiva ja desbloqueada para evoluir.\n\nCada upgrade requer mais pontos para ser desbloqueada."
515 };
516 [51] = {
517 TITLE = "DESCONSTRUIR",
518 DESC = "Com o botao direito do mouse, clique sobre o item que deseja desmontar.\n\nParte dos materiais de upgrade desse item irao para sua backpack."
519 };
520 };
521}
522function onHideTutorView()
523 if Timer > 0 then
524 Timer = Timer - 1
525 scheduleEvent(function()
526 onHideTutorView()
527 end, 1000)
528 else
529 TutorView:hide()
530 end
531end
532function onAlertMessage(mode, text)
533 if not g_game.isOnline() then
534 return
535 end
536 if mode == MessageModes.Failure then
537 if string.find(text, "@ResetDG") then
538 modules.game_database.setDG(00)
539 end
540
541 if string.find(text, "@TutorShow") then
542 local t = string.explode(text, " ")
543 onShowTutor(tonumber(t[02]))
544 end
545
546 if string.find(text, "@QuestBlock") then
547 local t = string.explode(text, " ")
548 if QuestWind ~= nil then
549 QuestWind:destroy()
550 QuestWind = nil
551 end
552
553 QuestWind = g_ui.createWidget('UILabel', rootWidget)
554 QuestWind:setFont('lucida-11px-rounded')
555 QuestWind:setTextOffset('25 03')
556 QuestWind:setImageSource("/images/custom/UI/choose_on")
557 QuestWind:setPhantom(true)
558 QuestWind:setParent(modules.game_interface.getRootPanel())
559 QuestWind:addAnchor(AnchorBottom, 'gameMapPanel', AnchorBottom)
560 QuestWind:addAnchor(AnchorLeft, 'gameMapPanel', AnchorLeft)
561 QuestWind:setMarginBottom(45)
562 if g_app.isMobile() then
563 QuestWind:setMarginLeft(180)
564 else
565 QuestWind:setMarginLeft(10)
566 end
567 QuestWind:setSize({width = 350, height = 20})
568 g_effects.fadeIn(QuestWind, 1000)
569
570 if t[02] == "01" then
571 g_game.talk(g_game.talk("!inventario 25"))
572 QuestWind:setText(tr('Novas Missoes foram desbloqueadas'))
573 modules.game_menu.LoadQuestRealTime()
574 else
575 QuestWind:setText(tr('Voce avancou de Rank na Blacklist'))
576 modules.game_menu.StartTask()
577 end
578
579 scheduleEvent(function()
580 g_effects.fadeOut(QuestWind, 1000)
581 scheduleEvent(function()
582 if QuestWind then
583 QuestWind:destroy()
584 QuestWind = nil
585 end
586 end, 1000)
587 end, 5000)
588 end
589
590 if string.find(text, "@NoTeleport") then
591 local t = string.explode(text, " ")
592 if t[02] == "01" then
593 modules.game_database.setDG(01)
594 else
595 modules.game_database.setDG(00)
596 end
597 end
598
599 if string.find(text, "@DGTime") then
600 local t = string.explode(text, " ")
601 local Player = g_game.getLocalPlayer()
602 if Player:isPartyMember() then
603 if Player:isPartyLeader() then
604 Desistir:show()
605 else
606 Desistir:hide()
607 end
608 else
609 Desistir:show()
610 end
611
612 Nexus_Time = tonumber(t[03])
613 Index_Time = tonumber(t[04])
614 if t[02] == "01" then
615 if not g_app.isMobile() then
616 --local gameScreenAreaMarginTop = math.floor( mapPanel:getHeight() / 2 )
617 TimerView:setParent(gameRoot)
618 --TimerView:addAnchor(AnchorLeft, 'gameMapPanel', AnchorLeft)
619 --TimerView:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
620 TimerView:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
621 TimerView:setMarginTop(90)
622 TimerView:show()
623
624 if t[05] then
625 if t[05] == "01" then
626 modules.game_database.setDG(01)
627 end
628 Desistir:hide()
629 else
630 modules.game_database.setDG(01)
631 end
632 TimerView:show()
633 else
634 MOBILE_GOLD_BAR = modules.client_mobile.onMobileButton(16)
635 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
636 MOBILE_DG_DESIS = modules.client_mobile.onMobileButton(18)
637 MOBILE_GOLD_BAR:hide()
638 MOBILE_DG_TIMER:show()
639 MOBILE_DG_DESIS:show()
640 end
641 else
642 modules.game_database.setDG(00)
643 if not g_app.isMobile() then
644 TimerView:hide()
645 else
646 MOBILE_GOLD_BAR = modules.client_mobile.onMobileButton(16)
647 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
648 MOBILE_DG_DESIS = modules.client_mobile.onMobileButton(18)
649 MOBILE_GOLD_BAR:show()
650 MOBILE_DG_TIMER:hide()
651 MOBILE_DG_DESIS:hide()
652 end
653 end
654 end
655
656 if string.find(text, "@CountTempo") then
657 local t = string.explode(text, " ")
658 Timer1:setImageSource("/images/custom/Time/" ..t[02])
659 Timer2:setImageSource("/images/custom/Time/" ..t[03])
660 Timer3:setImageSource("/images/custom/Time/" ..t[04])
661 Timer4:setImageSource("/images/custom/Time/" ..t[05])
662
663 modules.game_database.setDG(01)
664 Nexus_Time = tonumber(t[06])
665 Index_Time = tonumber(t[07])
666 if not g_app.isMobile() then
667 if not TimerView:isVisible() then
668 --local gameScreenAreaMarginTop = math.floor( mapPanel:getHeight() / 2 )
669 TimerView:setParent(gameRoot)
670 --TimerView:addAnchor(AnchorLeft, 'gameMapPanel', AnchorLeft)
671 --TimerView:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
672 TimerView:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
673 TimerView:setMarginTop(90)
674 TimerView:show()
675 end
676 else
677 MOBILE_GOLD_BAR = modules.client_mobile.onMobileButton(16)
678 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
679 MOBILE_DG_DESIS = modules.client_mobile.onMobileButton(18)
680 MOBILE_DG_TIMER:setText(t[02].. "" ..t[03].. ":" ..t[04].. "" ..t[05])
681 MOBILE_GOLD_BAR:hide()
682 MOBILE_DG_TIMER:show()
683 MOBILE_DG_DESIS:show()
684 end
685 end
686
687 if string.find(text, "@LootMSG") then
688 local t = string.explode(text, " ")
689 local id = tonumber(t[2])
690 local rare = tonumber(t[3])
691 local star = tonumber(t[4])
692 local qnt = tonumber(t[5])
693 local slot = modules.game_database.getItemInfo(id, 02)
694 local posPosition = 0
695 local margin = -1
696 if not g_app.isMobile() then
697 if g_settings.getString('fixeMenu') == "true" then
698 margin = 280
699 end
700 else
701 posPosition = 01
702 margin = 63
703 end
704 if AlertWindow == 0 or AlertWindow < 0 then
705 windAlert = Loot_0
706 windAlert:setMarginTop(alertPos[posPosition][AlertWindow])
707 if AlertWindow < 0 then
708 AlertWindow = 1
709 else
710 AlertWindow = AlertWindow + 1
711 end
712
713 windAlert:setImageSource("/images/custom/UI/loot_" ..rare)
714 local Nome_id = windAlert:recursiveGetChildById('name')
715 local Star_id = windAlert:recursiveGetChildById('star')
716 local Img_id = windAlert:recursiveGetChildById('img')
717 local Qnt_id = windAlert:recursiveGetChildById('qnt')
718 Nome_id:setText(modules.game_database.getItemInfo(id, 01))
719 Qnt_id:setText("x" ..mask_number(qnt))
720 Img_id:setImageSource("/images/custom/Items/" ..id)
721 Star_id:setImageSource("/images/custom/UI/star_" ..star)
722
723 if g_app.isMobile() then
724 windAlert:setSize({width = 80, height = 40})
725 Qnt_id:setMarginTop(-20)
726 Qnt_id:setMarginRight(08)
727 Img_id:setMarginTop(-32)
728 Img_id:setMarginRight(-03)
729 Nome_id:hide()
730 Star_id:hide()
731 end
732 windAlert:setParent(gameRoot)
733 windAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
734 windAlert:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
735 windAlert:setMarginRight(margin)
736
737 windAlert:focus()
738 windAlert:raise()
739 windAlert:show()
740 g_effects.fadeIn(windAlert, speed)
741 local Login1 = scheduleEvent(function()
742 if not g_game.isOnline() then return end
743 hideLoot0()
744 end, DelayLoot)
745 elseif AlertWindow == 1 then
746 windAlert = Loot_1
747 windAlert:setMarginTop(alertPos[posPosition][AlertWindow])
748 if AlertWindow < 0 then
749 AlertWindow = 1
750 else
751 AlertWindow = AlertWindow + 1
752 end
753
754 windAlert:setImageSource("/images/custom/UI/loot_" ..rare)
755 local Nome_id = windAlert:recursiveGetChildById('name')
756 local Star_id = windAlert:recursiveGetChildById('star')
757 local Img_id = windAlert:recursiveGetChildById('img')
758 local Qnt_id = windAlert:recursiveGetChildById('qnt')
759 Nome_id:setText(modules.game_database.getItemInfo(id, 01))
760 Qnt_id:setText("x" ..mask_number(qnt))
761 Img_id:setImageSource("/images/custom/Items/" ..id)
762 Star_id:setImageSource("/images/custom/UI/star_" ..star)
763
764 if g_app.isMobile() then
765 windAlert:setSize({width = 80, height = 40})
766 Qnt_id:setMarginTop(-20)
767 Qnt_id:setMarginRight(08)
768 Img_id:setMarginTop(-32)
769 Img_id:setMarginRight(-03)
770 Nome_id:hide()
771 Star_id:hide()
772 end
773 windAlert:setParent(gameRoot)
774 windAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
775 windAlert:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
776 windAlert:setMarginRight(margin)
777
778 windAlert:focus()
779 windAlert:raise()
780 windAlert:show()
781 g_effects.fadeIn(windAlert, speed)
782 scheduleEvent(function()
783 if not g_game.isOnline() then return end
784 hideLoot1()
785 end, DelayLoot)
786 elseif AlertWindow == 2 then
787 windAlert = Loot_2
788 windAlert:setMarginTop(alertPos[posPosition][AlertWindow])
789 if AlertWindow < 0 then
790 AlertWindow = 1
791 else
792 AlertWindow = AlertWindow + 1
793 end
794
795 windAlert:setImageSource("/images/custom/UI/loot_" ..rare)
796 local Nome_id = windAlert:recursiveGetChildById('name')
797 local Star_id = windAlert:recursiveGetChildById('star')
798 local Img_id = windAlert:recursiveGetChildById('img')
799 local Qnt_id = windAlert:recursiveGetChildById('qnt')
800 Nome_id:setText(modules.game_database.getItemInfo(id, 01))
801 Qnt_id:setText("x" ..mask_number(qnt))
802 Img_id:setImageSource("/images/custom/Items/" ..id)
803 Star_id:setImageSource("/images/custom/UI/star_" ..star)
804
805 if g_app.isMobile() then
806 windAlert:setSize({width = 80, height = 40})
807 Qnt_id:setMarginTop(-20)
808 Qnt_id:setMarginRight(08)
809 Img_id:setMarginTop(-32)
810 Img_id:setMarginRight(-03)
811 Nome_id:hide()
812 Star_id:hide()
813 end
814 windAlert:setParent(gameRoot)
815 windAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
816 windAlert:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
817 windAlert:setMarginRight(margin)
818
819 windAlert:focus()
820 windAlert:raise()
821 windAlert:show()
822 g_effects.fadeIn(windAlert, speed)
823 scheduleEvent(function()
824 if not g_game.isOnline() then return end
825 hideLoot2()
826 end, DelayLoot)
827 elseif AlertWindow == 3 then
828 windAlert = Loot_3
829 windAlert:setMarginTop(alertPos[posPosition][AlertWindow])
830 if AlertWindow < 0 then
831 AlertWindow = 1
832 else
833 AlertWindow = AlertWindow + 1
834 end
835
836 windAlert:setImageSource("/images/custom/UI/loot_" ..rare)
837 local Nome_id = windAlert:recursiveGetChildById('name')
838 local Star_id = windAlert:recursiveGetChildById('star')
839 local Img_id = windAlert:recursiveGetChildById('img')
840 local Qnt_id = windAlert:recursiveGetChildById('qnt')
841 Nome_id:setText(modules.game_database.getItemInfo(id, 01))
842 Qnt_id:setText("x" ..mask_number(qnt))
843 Img_id:setImageSource("/images/custom/Items/" ..id)
844 Star_id:setImageSource("/images/custom/UI/star_" ..star)
845
846 if g_app.isMobile() then
847 windAlert:setSize({width = 80, height = 40})
848 Qnt_id:setMarginTop(-20)
849 Qnt_id:setMarginRight(08)
850 Img_id:setMarginTop(-32)
851 Img_id:setMarginRight(-03)
852 Nome_id:hide()
853 Star_id:hide()
854 end
855 windAlert:setParent(gameRoot)
856 windAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
857 windAlert:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
858 windAlert:setMarginRight(margin)
859
860 windAlert:focus()
861 windAlert:raise()
862 windAlert:show()
863 g_effects.fadeIn(windAlert, speed)
864 scheduleEvent(function()
865 if not g_game.isOnline() then return end
866 hideLoot3()
867 end, DelayLoot)
868 elseif AlertWindow == 4 then
869 windAlert = Loot_4
870 windAlert:setMarginTop(alertPos[posPosition][AlertWindow])
871 if AlertWindow < 0 then
872 AlertWindow = 1
873 else
874 AlertWindow = AlertWindow + 1
875 end
876
877 windAlert:setImageSource("/images/custom/UI/loot_" ..rare)
878 local Nome_id = windAlert:recursiveGetChildById('name')
879 local Star_id = windAlert:recursiveGetChildById('star')
880 local Img_id = windAlert:recursiveGetChildById('img')
881 local Qnt_id = windAlert:recursiveGetChildById('qnt')
882 Nome_id:setText(modules.game_database.getItemInfo(id, 01))
883 Qnt_id:setText("x" ..mask_number(qnt))
884 Img_id:setImageSource("/images/custom/Items/" ..id)
885 Star_id:setImageSource("/images/custom/UI/star_" ..star)
886
887 if g_app.isMobile() then
888 windAlert:setSize({width = 80, height = 40})
889 Qnt_id:setMarginTop(-20)
890 Qnt_id:setMarginRight(08)
891 Img_id:setMarginTop(-32)
892 Img_id:setMarginRight(-03)
893 Nome_id:hide()
894 Star_id:hide()
895 end
896 windAlert:setParent(gameRoot)
897 windAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
898 windAlert:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
899 windAlert:setMarginRight(margin)
900
901 windAlert:focus()
902 windAlert:raise()
903 windAlert:show()
904 g_effects.fadeIn(windAlert, speed)
905 scheduleEvent(function()
906 if not g_game.isOnline() then return end
907 hideLoot4()
908 end, DelayLoot)
909 elseif AlertWindow == 5 then
910 windAlert = Loot_5
911 windAlert:setMarginTop(alertPos[posPosition][AlertWindow])
912 if AlertWindow < 0 then
913 AlertWindow = 1
914 else
915 AlertWindow = AlertWindow + 1
916 end
917
918 windAlert:setImageSource("/images/custom/UI/loot_" ..rare)
919 local Nome_id = windAlert:recursiveGetChildById('name')
920 local Star_id = windAlert:recursiveGetChildById('star')
921 local Img_id = windAlert:recursiveGetChildById('img')
922 local Qnt_id = windAlert:recursiveGetChildById('qnt')
923 Nome_id:setText(modules.game_database.getItemInfo(id, 01))
924 Qnt_id:setText("x" ..mask_number(qnt))
925 Img_id:setImageSource("/images/custom/Items/" ..id)
926 Star_id:setImageSource("/images/custom/UI/star_" ..star)
927
928 if g_app.isMobile() then
929 windAlert:setSize({width = 80, height = 40})
930 Qnt_id:setMarginTop(-20)
931 Qnt_id:setMarginRight(08)
932 Img_id:setMarginTop(-32)
933 Img_id:setMarginRight(-03)
934 Nome_id:hide()
935 Star_id:hide()
936 end
937 windAlert:setParent(gameRoot)
938 windAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
939 windAlert:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
940 windAlert:setMarginRight(margin)
941
942 windAlert:focus()
943 windAlert:raise()
944 windAlert:show()
945 g_effects.fadeIn(windAlert, speed)
946 scheduleEvent(function()
947 if not g_game.isOnline() then return end
948 hideLoot5()
949 end, DelayLoot)
950 end
951 if id == 3001 or id == 3205 then
952 g_game.talk(g_game.talk("!inventario 34 02"))
953 else
954 if slot == 3 or slot == 0 or slot > 10 then
955 slot = 3
956 end
957 g_game.talk(g_game.talk("!inventario 34 01 " ..slot))
958 end
959 end
960
961 if string.find(text, "@PassChest") then
962 local t = string.explode(text, " ")
963
964 Pass_1 = 00
965 Pass_2 = 00
966 Pass_3 = 00
967 Pass_4 = 00
968
969 if tonumber(t[02]) == 01 then
970 ChestID = tonumber(t[03])
971 Status = Chest:recursiveGetChildById('Status')
972 Status:setText("")
973 for X = 01, 04 do
974 Digito = Chest:recursiveGetChildById('Dig_' ..X)
975 Digito:setImageSource("/images/custom/UI/0")
976 end
977
978 if t[04] then
979 SAQ_GLOBAL_POSITION = tonumber(t[04])
980 SAQ_CHESTID = tonumber(t[05])
981 --print("[01] SAQ_GLOBAL_POSITION: " ..SAQ_GLOBAL_POSITION.. " | SAQ_CHESTID: " ..SAQ_CHESTID)
982 end
983 else
984 closer()
985 return
986 end
987
988 onPasswordChest(01)
989 Chest:show()
990 end
991
992 if string.find(text, "@WarzoneStart") then
993 local t = string.explode(text, " ")
994 if g_app.isMobile() then
995 WarAlert:setParent(modules.game_interface.getRootPanel())
996 WarAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
997 WarAlert:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
998 WarAlert:setMarginTop(45)
999 WarAlert:setMarginRight(70)
1000 else
1001 WarAlert:setParent(modules.game_interface.getRootPanel())
1002 WarAlert:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
1003 WarAlert:addAnchor(AnchorLeft, 'gameMapPanel', AnchorLeft)
1004 WarAlert:setMarginTop(330)
1005 WarAlert:setMarginLeft(10)
1006 end
1007
1008 playerWarProgress:setValue(tonumber(t[02]), 0, 60)
1009 if tonumber(t[02]) < 60 then
1010 playerWarProgress:setTooltip(tr('Jogadores na Warzone').. ': ' ..t[02])
1011 playerWarProgress:setBackgroundColor('white')
1012 else
1013 playerWarProgress:setTooltip(tr('Jogadores na Warzone').. ': ' ..t[02].. '\n'.. tr('Capacidade Maxima'))
1014 playerWarProgress:setBackgroundColor('red')
1015 end
1016 WarAlert:show()
1017 if WarView == false then
1018 g_effects.fadeIn(WarAlert, 250)
1019 WarView = true
1020 end
1021 end
1022
1023 if string.find(text, "@ShowPlacar") then
1024 local t = string.explode(text, " ")
1025 if tonumber(t[02]) == 01 then
1026 WarPlacar:setParent(modules.game_interface.getRootPanel())
1027 WarPlacar:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
1028 WarPlacar:setMarginTop(70)
1029
1030 timerPlacar:setText(t[03].. ':' ..t[04])
1031 blueScore:setText(t[05])
1032 redScore:setText(t[06])
1033 if modules.game_menu.getPvPMode() == false then
1034 modules.game_menu.PvPMode()
1035 end
1036 WarPlacar:show()
1037 else
1038 if modules.game_menu.getPvPMode() then
1039 modules.game_menu.PvPMode()
1040 end
1041 WarPlacar:hide()
1042 end
1043 end
1044
1045 if string.find(text, "@EndAlert") then
1046 local t = string.explode(text, " ")
1047 if tonumber(t[02]) == 01 then
1048 closer()
1049 if modules.game_menu.getPvPMode() then
1050 modules.game_menu.PvPMode()
1051 end
1052 else
1053 WarAlert:hide()
1054 end
1055 end
1056
1057 if string.find(text, "@CronOff") then
1058 showCronClient = false
1059 modules.game_menu.PvPMode()
1060 modules.game_database.setDG(00)
1061 if g_app.isMobile() then
1062 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
1063 MOBILE_DG_TIMER:hide()
1064 else
1065 TimerView:hide()
1066 end
1067 end
1068
1069 if string.find(text, "@PVPCronometro") then
1070 local t = string.explode(text, " ")
1071 CRO_TIMER_1 = tonumber(t[02])
1072 CRO_TIMER_2 = tonumber(t[03])
1073 modules.game_menu.PvPMode()
1074 if not g_app.isMobile() then
1075 if not TimerView:isVisible() then
1076 TimerView:setParent(gameRoot)
1077 TimerView:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
1078 TimerView:setMarginTop(90)
1079 TimerView:show()
1080 Desistir:hide()
1081 end
1082 else
1083 MOBILE_GOLD_BAR = modules.client_mobile.onMobileButton(16)
1084 MOBILE_DG_DESIS = modules.client_mobile.onMobileButton(18)
1085 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
1086 MOBILE_GOLD_BAR:hide()
1087 MOBILE_DG_TIMER:show()
1088 MOBILE_DG_DESIS:hide()
1089 end
1090 showCronClient = true
1091 onPVPCronometro()
1092 end
1093
1094 if string.find(text, "@Cinematic") then
1095 local t = string.explode(text, " ")
1096 onCinematicShow(tonumber(t[02]))
1097 end
1098
1099 if string.find(text, "@deadScreen") then
1100 local t = string.explode(text, " ")
1101 if g_app.isMobile() then
1102 return
1103 end
1104 local penalidadeTotal = tonumber(t[02])
1105 local checkBless = tonumber(t[03])
1106 local displaySize = g_window.getDisplaySize()
1107
1108 DEATH_SCREEN = g_ui.createWidget('UIButton', rootWidget)
1109 DEATH_SCREEN:setImageSource("/images/custom/Task/Monster_5")
1110 DEATH_SCREEN:addAnchor(AnchorTop, 'parent', AnchorTop)
1111 DEATH_SCREEN:addAnchor(AnchorBottom, 'parent', AnchorBottom)
1112 DEATH_SCREEN:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1113 DEATH_SCREEN:addAnchor(AnchorRight, 'parent', AnchorRight)
1114 DEATH_SCREEN:setSize({width = 10, height = 60})
1115 DEATH_SCREEN:setMarginTop(-05)
1116 DEATH_SCREEN:setMarginLeft(-05)
1117 DEATH_SCREEN:setMarginRight(-05)
1118 DEATH_SCREEN:setMarginBottom(-05)
1119 DEATH_SCREEN:focus()
1120 DEATH_SCREEN:raise()
1121 g_effects.fadeIn(DEATH_SCREEN, 300)
1122
1123 DEATH_TEXT = g_ui.createWidget('UIButton', DEATH_SCREEN)
1124 DEATH_TEXT:setId("deadImg")
1125 DEATH_TEXT:setImageSource("/images/custom/UI/dead")
1126 DEATH_TEXT:setSize({width = 450, height = 100})
1127 DEATH_TEXT:addAnchor(AnchorTop, 'parent', AnchorTop)
1128 DEATH_TEXT:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1129 DEATH_TEXT:setMarginTop(300)
1130 DEATH_TEXT:setMarginLeft(displaySize.height - 320)
1131 DEATH_TEXT:setPhantom(true)
1132 g_effects.fadeIn(DEATH_TEXT, 500)
1133 scheduleEvent(function()
1134 scheduleEvent(function() DEATH_TEXT:setMarginTop(290) end, 100)
1135 scheduleEvent(function() DEATH_TEXT:setMarginTop(280) end, 120)
1136 scheduleEvent(function() DEATH_TEXT:setMarginTop(270) end, 140)
1137 scheduleEvent(function() DEATH_TEXT:setMarginTop(260) end, 160)
1138 scheduleEvent(function() DEATH_TEXT:setMarginTop(250) end, 180)
1139 scheduleEvent(function() DEATH_TEXT:setMarginTop(240) end, 200)
1140 scheduleEvent(function() DEATH_TEXT:setMarginTop(230) end, 220)
1141 scheduleEvent(function() DEATH_TEXT:setMarginTop(220) end, 240)
1142 scheduleEvent(function() DEATH_TEXT:setMarginTop(210) end, 260)
1143 scheduleEvent(function() DEATH_TEXT:setMarginTop(200) end, 280)
1144 scheduleEvent(function() DEATH_TEXT:setMarginTop(190) end, 300)
1145 scheduleEvent(function()
1146 DEATH_LABEL = g_ui.createWidget('UIButton', DEATH_SCREEN)
1147 DEATH_LABEL:setId("deadPenLabel")
1148 if checkBless == 01 then
1149 DEATH_LABEL:setText(tr('MORREU COM BLESS'))
1150 else
1151 DEATH_LABEL:setText(tr('PENALIDADE'))
1152 end
1153 DEATH_LABEL:setFont('sans-bold-16px')
1154 DEATH_LABEL:setSize({width = 450, height = 25})
1155 DEATH_LABEL:addAnchor(AnchorTop, 'deadImg', AnchorBottom)
1156 DEATH_LABEL:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1157 DEATH_LABEL:setMarginLeft(displaySize.height - 320)
1158 DEATH_LABEL:setMarginTop(40)
1159 DEATH_LABEL:setPhantom(true)
1160 g_effects.fadeIn(DEATH_LABEL, 500)
1161
1162 DEATH_PEN = g_ui.createWidget('UIButton', DEATH_SCREEN)
1163 DEATH_PEN:setText(0)
1164 DEATH_PEN:setFont('lucida-26px-rounded')
1165 DEATH_PEN:setSize({width = 450, height = 20})
1166 DEATH_PEN:addAnchor(AnchorTop, 'deadPenLabel', AnchorBottom)
1167 DEATH_PEN:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1168 DEATH_PEN:setMarginLeft(displaySize.height - 320)
1169 DEATH_PEN:setMarginTop(05)
1170 DEATH_PEN:setPhantom(true)
1171 g_effects.fadeIn(DEATH_PEN, 500)
1172 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 11))) end, 100)
1173 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 10))) end, 150)
1174 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 09))) end, 200)
1175 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 08))) end, 250)
1176 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 07))) end, 300)
1177 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 06))) end, 350)
1178 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 05))) end, 400)
1179 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 04))) end, 450)
1180 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 03))) end, 500)
1181 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal / 02))) end, 550)
1182 scheduleEvent(function() DEATH_PEN:setText(mask_number(math.floor(penalidadeTotal))) end, 600)
1183
1184 scheduleEvent(function()
1185 DEATH_OK_BUTTON = g_ui.createWidget('UIButton', DEATH_SCREEN)
1186 DEATH_OK_BUTTON:setId("okButton")
1187 DEATH_OK_BUTTON:setText(tr('CONTINUAR'))
1188 DEATH_OK_BUTTON:setImageSource("/images/custom/Task/Monster_3")
1189 DEATH_OK_BUTTON:setFont('terminus-10px')
1190 DEATH_OK_BUTTON:setSize({width = 200, height = 35})
1191 DEATH_OK_BUTTON:addAnchor(AnchorTop, 'deadPenLabel', AnchorBottom)
1192 DEATH_OK_BUTTON:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1193 DEATH_OK_BUTTON:setMarginLeft(displaySize.height - 300)
1194 DEATH_OK_BUTTON:setMarginTop(80)
1195 DEATH_OK_BUTTON.onHoverChange = function(widget, hoverState)
1196 if hoverState then
1197 widget:setOpacity(1.0)
1198 else
1199 widget:setOpacity(0.6)
1200 end
1201 end
1202 DEATH_OK_BUTTON.onClick = function()
1203 DEATH_SCREEN:destroy()
1204 DEATH_SCREEN = nil
1205 end
1206 g_effects.fadeIn(DEATH_OK_BUTTON, 500)
1207
1208 local PriceVip = modules.game_menu.onTableShop(08, 04, 03)
1209 local PriceVipPromo = modules.game_menu.onTableShop(09, 04, 03)
1210
1211 DEATH_BLESS_BUTTON = g_ui.createWidget('UIButton', DEATH_SCREEN)
1212 if PriceVipPromo > 00 then
1213 DEATH_BLESS_BUTTON:setText(tr('CONTINUAR COM BLESS').. '\n' ..PriceVipPromo.. 'x Vip Coin')
1214 else
1215 DEATH_BLESS_BUTTON:setText(tr('CONTINUAR COM BLESS').. '\n' ..PriceVip.. 'x Vip Coin')
1216 end
1217 DEATH_BLESS_BUTTON:setImageSource("/images/custom/Task/Monster_4")
1218 DEATH_BLESS_BUTTON:setFont('terminus-10px')
1219 DEATH_BLESS_BUTTON:setSize({width = 200, height = 35})
1220 DEATH_BLESS_BUTTON:addAnchor(AnchorTop, 'deadPenLabel', AnchorBottom)
1221 DEATH_BLESS_BUTTON:addAnchor(AnchorLeft, 'okButton', AnchorRight)
1222 DEATH_BLESS_BUTTON:setMarginLeft(10)
1223 DEATH_BLESS_BUTTON:setMarginTop(80)
1224 DEATH_BLESS_BUTTON.onHoverChange = function(widget, hoverState)
1225 if hoverState then
1226 widget:setOpacity(1.0)
1227 else
1228 widget:setOpacity(0.6)
1229 end
1230 end
1231 DEATH_BLESS_BUTTON.onClick = function()
1232 DEATH_SCREEN:destroy()
1233 DEATH_SCREEN = nil
1234 g_game.talk("!buyshop 3 4 3")
1235 end
1236 g_effects.fadeIn(DEATH_OK_BUTTON, 500)
1237 end, 1500)
1238 end, 500)
1239 end, 1000)
1240 end
1241 end
1242end
1243
1244function onCinematicShow(type)
1245 if type == 00 then -- ENTRADA PADRaO. TELA PRETA LENTA.
1246 FADE_OUT = g_ui.createWidget('UIButton', rootWidget)
1247 FADE_OUT:setImageSource("/images/custom/UI/black_panel")
1248 FADE_OUT:addAnchor(AnchorTop, 'parent', AnchorTop)
1249 FADE_OUT:addAnchor(AnchorBottom, 'parent', AnchorBottom)
1250 FADE_OUT:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1251 FADE_OUT:addAnchor(AnchorRight, 'parent', AnchorRight)
1252 FADE_OUT:setSize({width = 10, height = 60})
1253 FADE_OUT:setMarginTop(-05)
1254 FADE_OUT:setMarginLeft(-05)
1255 FADE_OUT:setMarginRight(-05)
1256 FADE_OUT:setMarginBottom(-05)
1257 FADE_OUT:focus()
1258 FADE_OUT:raise()
1259 g_effects.fadeIn(FADE_OUT, 500)
1260
1261 modules.game_console.disableChat()
1262 modules.game_menu.closedHUD()
1263 modules.game_menu.onHideHub()
1264 modules.game_menu.onCLoseFixeInventario()
1265 modules.game_minimap.onMiniMapaHide()
1266 modules.game_walking.unbindKeys()
1267 modules.game_walking.disableWSAD()
1268 CINEMATIC = true
1269
1270 scheduleEvent(function()
1271 SCENE_BAR_1 = g_ui.createWidget('UIButton', rootWidget)
1272 SCENE_BAR_1:setImageSource("/images/custom/UI/black_Panel")
1273 SCENE_BAR_1:addAnchor(AnchorTop, 'parent', AnchorTop)
1274 SCENE_BAR_1:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1275 SCENE_BAR_1:addAnchor(AnchorRight, 'parent', AnchorRight)
1276 SCENE_BAR_1:setSize({width = 10, height = 60})
1277 SCENE_BAR_1:setMarginTop(-05)
1278 SCENE_BAR_1:setMarginLeft(-05)
1279 SCENE_BAR_1:setMarginRight(-05)
1280
1281 SCENE_BAR_2 = g_ui.createWidget('UIButton', rootWidget)
1282 SCENE_BAR_2:setImageSource("/images/custom/UI/black_Panel")
1283 SCENE_BAR_2:addAnchor(AnchorBottom, 'parent', AnchorBottom)
1284 SCENE_BAR_2:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1285 SCENE_BAR_2:addAnchor(AnchorRight, 'parent', AnchorRight)
1286 SCENE_BAR_2:setSize({width = 10, height = 60})
1287 SCENE_BAR_2:setMarginTop(-05)
1288 SCENE_BAR_2:setMarginLeft(-05)
1289 SCENE_BAR_2:setMarginRight(-05)
1290
1291 modules.game_interface.refreshViewMode()
1292 scheduleEvent(function()
1293 TELA_FULL = g_ui.createWidget('UIButton', rootWidget)
1294 TELA_FULL:setImageSource("/images/custom/UI/whitePanel")
1295 TELA_FULL:addAnchor(AnchorTop, 'parent', AnchorTop)
1296 TELA_FULL:addAnchor(AnchorBottom, 'parent', AnchorBottom)
1297 TELA_FULL:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1298 TELA_FULL:addAnchor(AnchorRight, 'parent', AnchorRight)
1299 TELA_FULL:setSize({width = 10, height = 60})
1300 TELA_FULL:setMarginTop(-05)
1301 TELA_FULL:setMarginLeft(-05)
1302 TELA_FULL:setMarginRight(-05)
1303 TELA_FULL:setMarginBottom(-05)
1304 TELA_FULL:setOpacity('0.3')
1305 TELA_FULL:focus()
1306 TELA_FULL:raise()
1307
1308 scheduleEvent(function()
1309 SKIP_SCENE = g_ui.createWidget('Button', rootWidget)
1310 SKIP_SCENE:addAnchor(AnchorRight, 'parent', AnchorRight)
1311 SKIP_SCENE:addAnchor(AnchorBottom, 'parent', AnchorBottom)
1312 SKIP_SCENE:setMarginBottom(65)
1313 SKIP_SCENE:setMarginRight(10)
1314 SKIP_SCENE:setText('Skip')
1315 SKIP_SCENE:setSize({width = 75, height = 20})
1316 SKIP_SCENE.onClick = function()
1317 g_game.talk(g_game.talk("!inventario 49"))
1318 SKIP_SCENE:destroy()
1319 SKIP_SCENE = nil
1320 end
1321
1322 g_effects.fadeIn(SKIP_SCENE, 500)
1323 end, 2000)
1324
1325 g_effects.fadeOut(FADE_OUT, 500)
1326 end, 500)
1327 end, 500)
1328 return
1329 end
1330 if type == 01 then -- SAIDA PADRaO. TELA PRETA LENTA.
1331 CINEMATIC = false
1332 g_effects.fadeIn(FADE_OUT, 500)
1333 scheduleEvent(function()
1334 g_effects.fadeOut(FADE_OUT, 500)
1335 modules.game_interface.refreshViewMode()
1336 SCENE_BAR_1:destroy()
1337 SCENE_BAR_2:destroy()
1338 TELA_FULL:destroy()
1339 SCENE_BAR_1 = nil
1340 SCENE_BAR_2 = nil
1341 TELA_FULL = nil
1342 scheduleEvent(function()
1343 FADE_OUT:destroy()
1344 FADE_OUT = nil
1345 modules.game_menu.onShowHub()
1346 modules.game_minimap.onMiniMapaShow()
1347 if g_settings.getString('fixeMenu') == "true" then
1348 modules.game_menu.OptionsInventario()
1349 end
1350 modules.game_walking.bindKeys()
1351 modules.game_walking.enableWSAD()
1352 end, 2000)
1353 end, 1000)
1354 return
1355 end
1356end
1357function onGetCinematic()
1358 return CINEMATIC
1359end
1360function onPVPCronometro()
1361 if showCronClient == false then
1362 modules.game_database.setDG(00)
1363 return
1364 end
1365 local M1 = 0 local S1 = 0
1366 local M2 = 0 local S2 = 0
1367
1368 if CRO_TIMER_1 > 0 and CRO_TIMER_2 > 0 then
1369 CRO_TIMER_2 = CRO_TIMER_2 - 1
1370 elseif CRO_TIMER_1 > 0 and CRO_TIMER_2 == 0 then
1371 CRO_TIMER_2 = 59
1372 CRO_TIMER_1 = CRO_TIMER_1 - 1
1373 elseif CRO_TIMER_1 == 0 and CRO_TIMER_2 > 0 then
1374 CRO_TIMER_2 = CRO_TIMER_2 - 1
1375 elseif CRO_TIMER_1 == 0 and CRO_TIMER_2 == 0 then
1376 showCronClient = false
1377 if g_app.isMobile() then
1378 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
1379 MOBILE_DG_TIMER:hide()
1380 else
1381 TimerView:hide()
1382 end
1383 return
1384 end
1385 if string.len(CRO_TIMER_1) == 2 then
1386 M1 = string.sub(CRO_TIMER_1, 1, 1)
1387 M2 = string.sub(CRO_TIMER_1, 2, 2)
1388 else
1389 M1 = 0
1390 M2 = string.sub(CRO_TIMER_1, 1, 1)
1391 end
1392 if string.len(CRO_TIMER_2) == 2 then
1393 S1 = string.sub(CRO_TIMER_2, 1, 1)
1394 S2 = string.sub(CRO_TIMER_2, 2, 2)
1395 else
1396 S1 = 0
1397 S2 = string.sub(CRO_TIMER_2, 1, 1)
1398 end
1399
1400 if M1 == 00 and M2 == 00 and S1 == 00 and S2 == 02 then
1401 showCronClient = false
1402 if g_app.isMobile() then
1403 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
1404 MOBILE_DG_TIMER:hide()
1405 else
1406 TimerView:hide()
1407 end
1408 return
1409 end
1410
1411 Timer1:setImageSource("/images/custom/Time/" ..M1)
1412 Timer2:setImageSource("/images/custom/Time/" ..M2)
1413 Timer3:setImageSource("/images/custom/Time/" ..S1)
1414 Timer4:setImageSource("/images/custom/Time/" ..S2)
1415
1416 if g_app.isMobile() then
1417 MOBILE_DG_TIMER = modules.client_mobile.onMobileButton(17)
1418 MOBILE_DG_TIMER:setText(M1.. "" ..M2.. ":" ..S1.. "" ..S2)
1419 end
1420 scheduleEvent(function() onPVPCronometro() end, 1000)
1421end
1422function onWarzoneWindow(type)
1423 if type == 00 then
1424 if WarAlert:isVisible() then
1425 WarAlert:hide()
1426 end
1427 end
1428 if type == 01 then
1429 if WarView then
1430 WarAlert:show()
1431 g_effects.fadeIn(WarAlert, 250)
1432 end
1433 end
1434end
1435function onParticipeWar()
1436 g_game.talk(g_game.talk("!inventario 39"))
1437 WarAlert:hide()
1438end
1439function onDGDesistir()
1440 local localPlayer = g_game.getLocalPlayer()
1441 if localPlayer:isPartyMember() then
1442 if localPlayer:isPartyLeader() then
1443 local yesChoose = function()
1444 g_game.talk(g_game.talk("!dangerous 1 " ..Nexus_Time.. " " ..Index_Time))
1445 Nexus_Time = 0
1446 Index_Time = 0
1447 exitWindow:destroy()
1448 end
1449 local noChoose = function() exitWindow:destroy() end
1450
1451 exitWindow = displayGeneralBox(tr('Exit'), tr("Todo o grupo saira se continuar.\nDeseja realmente desistir?"),
1452 { { text=tr('Yes'), callback=yesChoose },
1453 { text=tr('No'), callback=noChoose },
1454 anchor=AnchorHorizontalCenter }, yesChoose, noChoose)
1455 end
1456 else
1457 local yesChoose = function()
1458 g_game.talk(g_game.talk("!dangerous 0 " ..Nexus_Time.. " " ..Index_Time))
1459 Nexus_Time = 0
1460 Index_Time = 0
1461 exitWindow:destroy()
1462 end
1463 local noChoose = function() exitWindow:destroy() end
1464
1465 exitWindow = displayGeneralBox(tr('Exit'), tr("Deseja realmente desistir?"),
1466 { { text=tr('Yes'), callback=yesChoose },
1467 { text=tr('No'), callback=noChoose },
1468 anchor=AnchorHorizontalCenter }, yesChoose, noChoose)
1469 end
1470end
1471
1472local HistMsg = {}
1473local SpaceMsg = {
1474 [01] = 80;
1475 [02] = 95;
1476 [03] = 110;
1477 [04] = 125;
1478 [05] = 140;
1479 [06] = 155;
1480 [07] = 170;
1481 [08] = 185;
1482}
1483function onDisplayMsg(text, color)
1484 table.insert(HistMsg, text)
1485 local fontTexto = "lucida-11px-rounded"
1486 if #HistMsg > 01 then
1487 for X = 01, #HistMsg do
1488 local Index = (#HistMsg + 01) - X
1489 local MSG_ID = rootWidget:recursiveGetChildById('MSG_' ..Index)
1490 if MSG_ID then
1491 MSG_ID:setMarginBottom(SpaceMsg[Index])
1492 MSG_ID:setText(HistMsg[X])
1493 MSG_ID:show()
1494 g_effects.fadeIn(MSG_ID, 250)
1495 else
1496 CONSOLE_MSG = g_ui.createWidget('UILabel', rootWidget)
1497 CONSOLE_MSG:setId("MSG_" ..Index)
1498 CONSOLE_MSG:setText(tr(HistMsg[X]))
1499 CONSOLE_MSG:setVisible(false)
1500 CONSOLE_MSG:setFont(fontTexto)
1501 CONSOLE_MSG:setPhantom(true)
1502 CONSOLE_MSG:setParent(modules.game_interface.getRootPanel())
1503 CONSOLE_MSG:addAnchor(AnchorBottom, 'gameMapPanel', AnchorBottom)
1504 CONSOLE_MSG:addAnchor(AnchorLeft, 'gameMapPanel', AnchorLeft)
1505 CONSOLE_MSG:setMarginBottom(SpaceMsg[Index])
1506
1507 if g_app.isMobile() then
1508 CONSOLE_MSG:setMarginLeft(180)
1509 else
1510 CONSOLE_MSG:setMarginLeft(10)
1511 end
1512 CONSOLE_MSG:setSize({width = 650, height = 18})
1513 CONSOLE_MSG:show()
1514 g_effects.fadeIn(CONSOLE_MSG, 250)
1515 end
1516 end
1517 else
1518 CONSOLE_MSG = g_ui.createWidget('UILabel', rootWidget)
1519 CONSOLE_MSG:setId("MSG_1")
1520 CONSOLE_MSG:setText(tr(text))
1521 CONSOLE_MSG:setVisible(false)
1522 CONSOLE_MSG:setFont(fontTexto)
1523 CONSOLE_MSG:setPhantom(true)
1524 CONSOLE_MSG:setParent(modules.game_interface.getRootPanel())
1525 CONSOLE_MSG:addAnchor(AnchorBottom, 'gameMapPanel', AnchorBottom)
1526 CONSOLE_MSG:addAnchor(AnchorLeft, 'gameMapPanel', AnchorLeft)
1527 CONSOLE_MSG:setMarginBottom(SpaceMsg[01])
1528
1529 if g_app.isMobile() then
1530 CONSOLE_MSG:setMarginLeft(180)
1531 else
1532 CONSOLE_MSG:setMarginLeft(10)
1533 end
1534 CONSOLE_MSG:setSize({width = 650, height = 18})
1535 CONSOLE_MSG:show()
1536 g_effects.fadeIn(CONSOLE_MSG, 250)
1537
1538 scheduleEvent(function() onHideDisplayMsg(true) end, 2000)
1539 end
1540end
1541function onHideDisplayMsg(type)
1542 if type then
1543 if #HistMsg > 00 then
1544 local LastMsg = #HistMsg
1545 local MSG_ID = rootWidget:recursiveGetChildById('MSG_' ..LastMsg)
1546 if MSG_ID then
1547 table.remove(HistMsg, LastMsg)
1548 g_effects.fadeOut(MSG_ID, 500)
1549 scheduleEvent(function()
1550 if MSG_ID then
1551 MSG_ID:destroy()
1552 end
1553 end, 500)
1554 end
1555
1556 scheduleEvent(function() onHideDisplayMsg(true) end, 1000)
1557 end
1558 else
1559 for X = 01, #HistMsg do
1560 table.remove(HistMsg, X)
1561 local MSG_ID = rootWidget:recursiveGetChildById('MSG_' ..X)
1562 if MSG_ID then
1563 MSG_ID:destroy()
1564 end
1565 end
1566 end
1567end
1568function onPasswordChest(type)
1569 if type == 01 then
1570 for X = 01, 09 do
1571 Number = Chest:recursiveGetChildById('Number_' ..X)
1572 Number:enable()
1573 local clickNumber = Number
1574 clickNumber.onClick = function()
1575 local DigNumber = X
1576 if Pass_1 < 01 then
1577 Digito = Chest:recursiveGetChildById('Dig_1')
1578 Digito:setImageSource("/images/custom/Time/" ..DigNumber)
1579 Pass_1 = DigNumber
1580 return
1581 end
1582 if Pass_2 < 01 then
1583 Digito = Chest:recursiveGetChildById('Dig_2')
1584 Digito:setImageSource("/images/custom/Time/" ..DigNumber)
1585 Pass_2 = DigNumber
1586 return
1587 end
1588 if Pass_3 < 01 then
1589 Digito = Chest:recursiveGetChildById('Dig_3')
1590 Digito:setImageSource("/images/custom/Time/" ..DigNumber)
1591 Pass_3 = DigNumber
1592 return
1593 end
1594 if Pass_4 < 01 then
1595 Digito = Chest:recursiveGetChildById('Dig_4')
1596 Digito:setImageSource("/images/custom/Time/" ..DigNumber)
1597 Pass_4 = DigNumber
1598
1599 local strPassword = Pass_1.. "" ..Pass_2.. "" ..Pass_3.. "" ..Pass_4
1600 local nubPassword = tonumber(strPassword)
1601
1602 for X = 01, 04 do
1603 Digito = Chest:recursiveGetChildById('Dig_' ..X)
1604 Digito:setImageSource("/images/custom/UI/0")
1605 end
1606 if ChestID > 00 then
1607 if PASSWORD_CHEST[ChestID] then
1608 Number_1 = Chest:recursiveGetChildById('Number_1')
1609 Number_2 = Chest:recursiveGetChildById('Number_2')
1610 Number_3 = Chest:recursiveGetChildById('Number_3')
1611 Number_4 = Chest:recursiveGetChildById('Number_4')
1612 Number_5 = Chest:recursiveGetChildById('Number_5')
1613 Number_6 = Chest:recursiveGetChildById('Number_6')
1614 Number_7 = Chest:recursiveGetChildById('Number_7')
1615 Number_8 = Chest:recursiveGetChildById('Number_8')
1616 Number_9 = Chest:recursiveGetChildById('Number_9')
1617
1618 Number_1:disable()
1619 Number_2:disable()
1620 Number_3:disable()
1621 Number_4:disable()
1622 Number_5:disable()
1623 Number_6:disable()
1624 Number_7:disable()
1625 Number_8:disable()
1626 Number_9:disable()
1627
1628 Status = Chest:recursiveGetChildById('Status')
1629 Status:setText("")
1630 if nubPassword == PASSWORD_CHEST[ChestID].PASS then
1631 local PassCorrect = PASSWORD_CHEST[ChestID].PASS
1632 Status:setText("S U C E S S")
1633 Status:setColor("green")
1634 Status:setMarginLeft(25)
1635 scheduleEvent(function()
1636 closer()
1637 --print("[02] SAQ_GLOBAL_POSITION: " ..SAQ_GLOBAL_POSITION.. " | SAQ_CHESTID: " ..SAQ_CHESTID)
1638 g_game.talk(g_game.talk("!passchest " ..ChestID.. " " ..PassCorrect.. " " ..SAQ_GLOBAL_POSITION.. " " ..SAQ_CHESTID))
1639 end, 1000)
1640 else
1641 Status:setText("F A I L E D")
1642 Status:setColor("red")
1643 Status:setMarginLeft(38)
1644 scheduleEvent(function()
1645 Pass_1 = 00
1646 Pass_2 = 00
1647 Pass_3 = 00
1648 Pass_4 = 00
1649
1650 Status = Chest:recursiveGetChildById('Status')
1651 Status:setText("")
1652 for X = 01, 04 do
1653 Digito = Chest:recursiveGetChildById('Dig_' ..X)
1654 Digito:setImageSource("/images/custom/UI/0")
1655 end
1656 onPasswordChest(01)
1657 end, 1000)
1658 end
1659 else
1660 closer()
1661 end
1662 else
1663 closer()
1664 end
1665
1666 return
1667 end
1668 end
1669 end
1670 Chest:show()
1671 else
1672 closer()
1673 end
1674end
1675function onShowTutor(id)
1676 if TutorView:isVisible() then
1677 TutorView:hide()
1678 Timer = 15
1679 else
1680 Timer = 15
1681 onHideTutorView()
1682 end
1683
1684 TutorView:setParent(gameRoot)
1685 TutorView:addAnchor(AnchorTop, 'gameMapPanel', AnchorTop)
1686 if g_app.isMobile() then
1687 if id == 48 then
1688 return
1689 end
1690 TutorTitle:setText(tr(TextTutor[01][id].TITLE))
1691 TutorDesc:setText(tr(TextTutor[01][id].DESC))
1692 TutorImg:setImageSource("/images/custom/Tutor/Mobile/" ..id)
1693 TutorView:addAnchor(AnchorRight, 'gameMapPanel', AnchorRight)
1694 --TutorView:setSize({width = 200, height = 280})
1695 TutorView:setMarginTop(50)
1696 TutorView:setMarginRight(70)
1697 else
1698 TutorTitle:setText(tr(TextTutor[00][id].TITLE))
1699 TutorDesc:setText(tr(TextTutor[00][id].DESC))
1700 TutorImg:setImageSource("/images/custom/Tutor/" ..id)
1701 TutorView:addAnchor(AnchorLeft, 'gameMapPanel', AnchorLeft)
1702 --TutorView:setSize({width = 223, height = 320})
1703 TutorView:setMarginTop(230)
1704 TutorView:setMarginLeft(200)
1705 end
1706 TutorView:setPhantom(false)
1707 TutorView:show()
1708 g_effects.fadeIn(TutorView, 600)
1709end
1710function hideLoot0()
1711 if Loot_0:isVisible() then
1712 if Loot_1:isVisible() then
1713 if Loot_2:isVisible() then
1714 if Loot_3:isVisible() then
1715 if Loot_4:isVisible() then
1716 if Loot_5:isVisible() then
1717 AlertWindow = 0
1718 else
1719 AlertWindow = 5
1720 end
1721 else
1722 AlertWindow = 4
1723 end
1724 else
1725 AlertWindow = 3
1726 end
1727 else
1728 AlertWindow = 2
1729 end
1730 else
1731 AlertWindow = 1
1732 end
1733 else
1734 AlertWindow = 0
1735 end
1736 scheduleEvent(function()
1737 g_effects.fadeOut(Loot_0, 300)
1738 scheduleEvent(function()
1739 Loot_0:hide()
1740 end, 300)
1741 end, 300)
1742end
1743function hideLoot1()
1744 if Loot_0:isVisible() then
1745 if Loot_1:isVisible() then
1746 if Loot_2:isVisible() then
1747 if Loot_3:isVisible() then
1748 if Loot_4:isVisible() then
1749 if Loot_5:isVisible() then
1750 AlertWindow = 0
1751 else
1752 AlertWindow = 5
1753 end
1754 else
1755 AlertWindow = 4
1756 end
1757 else
1758 AlertWindow = 3
1759 end
1760 else
1761 AlertWindow = 2
1762 end
1763 else
1764 AlertWindow = 1
1765 end
1766 else
1767 AlertWindow = 0
1768 end
1769 scheduleEvent(function()
1770 g_effects.fadeOut(Loot_1, 300)
1771 scheduleEvent(function()
1772 Loot_1:hide()
1773 end, 300)
1774 end, 300)
1775end
1776function hideLoot2()
1777 if Loot_0:isVisible() then
1778 if Loot_1:isVisible() then
1779 if Loot_2:isVisible() then
1780 if Loot_3:isVisible() then
1781 if Loot_4:isVisible() then
1782 if Loot_5:isVisible() then
1783 AlertWindow = 0
1784 else
1785 AlertWindow = 5
1786 end
1787 else
1788 AlertWindow = 4
1789 end
1790 else
1791 AlertWindow = 3
1792 end
1793 else
1794 AlertWindow = 2
1795 end
1796 else
1797 AlertWindow = 1
1798 end
1799 else
1800 AlertWindow = 0
1801 end
1802 scheduleEvent(function()
1803 g_effects.fadeOut(Loot_2, 300)
1804 scheduleEvent(function()
1805 Loot_2:hide()
1806 end, 300)
1807 end, 300)
1808end
1809function hideLoot3()
1810 if Loot_0:isVisible() then
1811 if Loot_1:isVisible() then
1812 if Loot_2:isVisible() then
1813 if Loot_3:isVisible() then
1814 if Loot_4:isVisible() then
1815 if Loot_5:isVisible() then
1816 AlertWindow = 0
1817 else
1818 AlertWindow = 5
1819 end
1820 else
1821 AlertWindow = 4
1822 end
1823 else
1824 AlertWindow = 3
1825 end
1826 else
1827 AlertWindow = 2
1828 end
1829 else
1830 AlertWindow = 1
1831 end
1832 else
1833 AlertWindow = 0
1834 end
1835 scheduleEvent(function()
1836 g_effects.fadeOut(Loot_3, 300)
1837 scheduleEvent(function()
1838 Loot_3:hide()
1839 end, 300)
1840 end, 300)
1841end
1842function hideLoot4()
1843 if Loot_0:isVisible() then
1844 if Loot_1:isVisible() then
1845 if Loot_2:isVisible() then
1846 if Loot_3:isVisible() then
1847 if Loot_4:isVisible() then
1848 if Loot_5:isVisible() then
1849 AlertWindow = 0
1850 else
1851 AlertWindow = 5
1852 end
1853 else
1854 AlertWindow = 4
1855 end
1856 else
1857 AlertWindow = 3
1858 end
1859 else
1860 AlertWindow = 2
1861 end
1862 else
1863 AlertWindow = 1
1864 end
1865 else
1866 AlertWindow = 0
1867 end
1868 scheduleEvent(function()
1869 g_effects.fadeOut(Loot_4, 300)
1870 scheduleEvent(function()
1871 Loot_4:hide()
1872 end, 300)
1873 end, 300)
1874end
1875function hideLoot5()
1876 if Loot_0:isVisible() then
1877 if Loot_1:isVisible() then
1878 if Loot_2:isVisible() then
1879 if Loot_3:isVisible() then
1880 if Loot_4:isVisible() then
1881 if Loot_5:isVisible() then
1882 AlertWindow = 0
1883 else
1884 AlertWindow = 5
1885 end
1886 else
1887 AlertWindow = 4
1888 end
1889 else
1890 AlertWindow = 3
1891 end
1892 else
1893 AlertWindow = 2
1894 end
1895 else
1896 AlertWindow = 1
1897 end
1898 else
1899 AlertWindow = 0
1900 end
1901 scheduleEvent(function()
1902 g_effects.fadeOut(Loot_5, 300)
1903 scheduleEvent(function()
1904 Loot_5:hide()
1905 end, 300)
1906 end, 300)
1907end
1908
1909function closer()
1910 Chest:hide()
1911 TutorView:hide()
1912 WarAlert:hide()
1913 WarPlacar:hide()
1914 WarView = false
1915end
1916function offline()
1917 Chest:hide()
1918 Loot_0:hide()
1919 Loot_1:hide()
1920 Loot_2:hide()
1921 Loot_3:hide()
1922 Loot_4:hide()
1923 Loot_5:hide()
1924 TimerView:hide()
1925 Timer1:setImageSource("/images/custom/Time/0")
1926 Timer2:setImageSource("/images/custom/Time/0")
1927 Timer3:setImageSource("/images/custom/Time/0")
1928 Timer4:setImageSource("/images/custom/Time/0")
1929 WarAlert:hide()
1930 WarPlacar:hide()
1931 WarView = false
1932 --TaskWind:hide()
1933 TaskVisible = 00
1934end
1935function terminate()
1936 disconnect(g_game, {
1937 disconnect(g_game, 'onTextMessage', onAlertMessage),
1938 })
1939 disconnect(g_game, { onGameEnd = offline })
1940 Loot_0:destroy()
1941 Loot_1:destroy()
1942 Loot_2:destroy()
1943 Loot_3:destroy()
1944 Loot_4:destroy()
1945 Loot_5:destroy()
1946 --TaskWind:destroy()
1947 if QuestWind then
1948 QuestWind:destroy()
1949 end
1950 TimerView:destroy()
1951 Chest:destroy()
1952 WarPlacar:destroy()
1953 WarAlert:destroy()
1954 TaskVisible = 00
1955end
1956
Top