notice.lua

main 2067 lines · 84.8 KB Raw
Alex Alex Commit Client Upload Part 2 19/10/2026 00:06
1HOTKEY = 'Ctrl+Z'
2ANEXAR_MESSAGE = false
3MSG_TYPE = 01
4CAIXA_MSG_ID = 01
5MESSAGE_BOX = 123
6local QUADRO_NOTICIAS = {
7 [01] = {
8 TITULO = {
9 ["pt"] = "UPDATE 1.4.14",
10 ["en"] = "UPDATE 1.4.14",
11 },
12 LEITURA = 00,
13 DESC = {
14
15 ["en"] = "Added daily challenges system, depot extension and more.",
16 },
17 TEXT = {
18 ["pt"] = {
19 [[
20
21
22
23 > Adicionado sistema de reiniciar task usando Nexus Remoto.
24
25 _____________________________________________________
26
27
28
29
30
31
32
33 > Cada desafio tem duas recompensas. Uma delas, os Pontos de Desafio.
34
35
36
37
38
39
40 EXTENSOR DE TASK
41
42
43
44
45
46
47 DESCONSTRUTOR
48
49
50
51
52
53
54
55
56 _____________________________________________________
57
58
59
60
61
62
63
64
65 > Corrigido um problema com a Task de Blood Beast.
66 > Corrigido um problema de acionamento de Hotkeys mesmo com chat aberto.
67
68 > Corrigido um problema com os efeitos de alguns Kards na hora do Duelo.
69
70 > Corrigido uma falha na DG "Toca Dimensional" ao participar com um grupo.
71
72 > Valores em PVP Points de produtos do SHOP > WARZONE foram alterados.
73
74
75 ]],
76 },
77 ["en"] = {
78 [[
79
80 > Added Daily Challenges system.
81 > Depot's maximum capacity has been expanded to 100.
82 > Added system restart task using Nexus Remote.
83
84 _____________________________________________________
85
86 DAILY CHALLENGES
87
88 > In the Central and Premium Base Panels were added to open Daily Challenges.
89 > Every day, 10 daily challenges are chosen at random.
90 > You can complete all but only 1 at a time.
91 > After completing a challenge, you can restart it as many times as you can.
92 > Each challenge has two rewards. One of them, Challenge Points.
93
94 > Challenge Points are used exclusively in the Shop on the Challenges Panel.
95 > Challenge Points cannot be traded or exchanged.
96 > The Challenge Shop has exclusive items and some temporary ones.
97 > You earn Challenge Points by completing daily challenges.
98
99 TASK EXTENDER
100
101 > When purchasing a Task Extender, all your new Tasks will be multiplied.
102 > You must kill twice as many monsters to complete the Task.
103 > When finishing a Task, you will earn double gold and Task Points.
104 > Whenever you finish a Task, you lose a charge of the extender, until it finally ends.
105
106 DECONSTRUCTOR
107
108 > By purchasing the deconstructor, you will be able to dismantle any possible item for upgrade and get some of those items back.
109 > Find the item in your backpack and right-click on it.
110 > Click on Deconstruct to open a new window with the result of the deconstruction.
111 > Make sure your backpack has enough space to hold the items.
112 > Confirm to finish the deconstruction.
113 > When using, you lose charge until it finally runs out.
114
115 _____________________________________________________
116
117 FIXED BUGS AND CHANGES
118
119 > Shotgun critical damage is now applied to surrounding enemies.
120 > Changed the level of the access door to Tarantulas from level 35 to level 30.
121 > The level to enter Warzone has been changed from 50 to 10.
122 > Fixed item divergence issues when upgrading.
123 > Fixed crashes in "Defense Lessons - I" mission.
124 > Fixed an issue with Blood Beast's Task.
125 > Fixed a problem with Hotkeys triggering even with open chat.
126 > Unlocked the purchase of backpack extensions in the Shop.
127 > Fixed an issue with the effects of some Kards at Duel time.
128 > Removed the lock on items obtained from the Cursed Tree.
129 > Fixed a crash in DG "Dimensional Burrow" when participating with a party.
130 > Potions purchased directly from the Shop will now give 100 unds.
131 > Values in PVP Points of SHOP > WARZONE products have been changed.
132 > When dying inside the Warzone, you will have 10 seconds to return to the arena or you will be automatically teleported.
133
134 ]],
135 },
136 },
137 },
138 [02] = {
139 TITULO = {
140 ["pt"] = "UPDATE 1.4.13",
141 ["en"] = "UPDATE 1.4.13",
142 },
143 LEITURA = 00,
144 DESC = {
145
146 ["en"] = "Improved bot detection system, added Message Board and PVP rooms.",
147 },
148 TEXT = {
149 ["pt"] = {
150 [[
151
152
153 > Adicionado sistema de Painel de Mensagem.
154 > Adicionado salas PVP para confrontos em diversas modalidades.
155
156 _____________________________________________________
157
158 PAINEL DE MENSAGENS
159
160
161
162
163
164
165 _____________________________________________________
166
167 MELHORIAS NO REPORT
168
169
170
171
172
173 _____________________________________________________
174
175 SALAS PVP
176
177
178
179
180
181
182 _____________________________________________________
183
184
185
186
187
188 SEGUNDA:
189
190
191
192
193 > O loot varia entre os itens de upgrade da arma equipada.
194 > Dessa forma, o loot da criatura muda de pessoa para pessoa.
195
196
197
198
199
200
201 QUARTA:
202
203
204
205 QUINTA:
206
207
208
209
210
211
212 SEXTA:
213
214
215
216
217 > Esses produtos entraram em descontos durante todo o dia.
218
219 DOMINGO:
220
221
222
223
224 _____________________________________________________
225
226
227
228
229
230
231
232
233
234
235 _____________________________________________________
236
237
238
239 > Diversos bugs no mapa foram resolvidos.
240 > Atributo [ Pegadas ao Vento ] agora funciona com 70% ou mais de vida.
241 > Passivas com requisito 90% agora funciona com 70% ou mais de vida.
242 > Corrigido alguns bugs de click no cliente.
243
244 > Corrigido um bug envolvendo o acesso a Hunt dos Quaras.
245
246
247 > Habilitado novamente o sistema de ultimas mortes no site.
248 > Corrigido um erro onde era possivel lurar Lizards para o Nexus de Bonebrook.
249
250 > Corrigido um bug ao morrer enfrentando um Boss da Blacklist.
251
252 > Corrigido o bug onde as armas param de disparar por alguns segundos.
253 > Diminuido os requisitos de itens para dar Upgrade em armas e equipamentos.
254
255
256 ]],
257 },
258 ["en"] = {
259 [[
260
261 > Added some improvements to the bot detection system.
262 > Added Message Panel system.
263 > Added PVP rooms for clashes in various modes.
264 > Added daily events.
265 _____________________________________________________
266
267 MESSAGE PANEL
268
269 > Now server updates and news can be followed here by the Dashboard.
270 > To open the Panel you must press Ctrl + Z.
271 > In "Latest Server News" you can see the changerlog of the latest updates.
272 > In the "Message Box" button, you can send or receive messages from other players.
273 > Through messages, you can send or receive up to 4x items.
274 _____________________________________________________
275
276 IMPROVEMENTS IN THE REPORT
277
278 > You can report bugs through messages.
279 > In "Latest Server News", click on the "Open Ticket" button.
280 > You can report bugs, ask questions or mention a suggestion to be evaluated by the Staff.
281 > When your report is replied to, your Message Box will be updated with the reply.
282 _____________________________________________________
283
284 PVP ROOMS
285
286 > To participate, go to MENU > ACTIVE > PVP ROOMS.
287 > PVP rooms are not scheduled events. You can start a PVP challenge whenever you want.
288 > To start a PVP event, the number of players for the event need to be met.
289 > The rewards of victors in PVP events are always PVP points.
290 > Rewards are based on the duration of the event. The longer it takes, the more PVP Points you earn.
291 _____________________________________________________
292
293 DAILY EVENTS
294
295 > These are scheduled events that take place every day of the week.
296
297 MONDAY:
298 > Every 1 hour, there will be monster invasions in 3 random areas of the map.
299 > These monsters must be killed before the next wave starts (every 1 hour).
300 > The differential of this event is the creature's loot.
301 > The loot is varied and changes according to the weapon used to eliminate it.
302 > Loot varies between equipped weapon upgrade items.
303 > That way, the creature's loot changes from person to person.
304
305 THIRD:
306 > Passives are separated into 4 colors: red, blue, green and yellow.
307 > At random, one of these colors will be drawn.
308 > All day, Passives of these colors will have their effects improved.
309
310 FOURTH:
311 > Every 1 hour, 1 Boss will be summoned on the map.
312 > When you eliminate the Boss, you get a random buff available in the Shop.
313
314 THURSDAY:
315 > All day all players earn a sale bonus.
316 > This bonus is only valid for selling items in the Central Box.
317 > The % of the bonus is determined by the number of players online at the time of sale.
318 > Half of the online players will determine the bonus amount.
319 > 100 players online, 50% bonus. 50 players online, 25% bonus.
320
321 FRIDAY:
322 > All PVP Points rewards from PVP Rooms are doubled.
323
324 SATURDAY:
325 > Some Shop products are randomly drawn.
326 > These products were discounted throughout the day.
327
328 SUNDAY:
329 > Some group activities will have improved rewards:
330 > Finishing Task in a group will give 1x additional Task Points.
331 > Killing a Blacklist Boss in a group will give 1x additional EXP.
332 > Opening the final Dangerous chest in a group will give 10% increased drop chance.
333 _____________________________________________________
334
335 WARZONE REFORMULATION
336
337 > Unlike in the past, Warzone will only start at a single time: 08:05 at night.
338 > In addition to getting a reward in PVP Points, the winning team in Warzone will, from that moment on, get a 05% bonus XP bonus for winning.
339 > This EXP bonus is cumulative. If the next day you get a new victory in Warzone, you will add +05% EXP bonus, getting 10% and so on.
340 > The EXP bonus will work throughout the day, until the next Warzone.
341 > If you miss a Warzone or simply don't participate at the scheduled time, you'll lose all the XP bonus you've earned so far. Your bonus will be reset to 0. You will have to win a Warzone again to get the bonus again.
342 > On Sunday, at 00:00hrs SS, any and all bonuses from any player will be reset and the bonuses must be earned again during the next week.
343
344 _____________________________________________________
345
346 BUG FIXES / CHANGES
347
348 > Various map bugs have been fixed.
349 > Attribute [ Footprints in the Wind ] now works at 70% or more health.
350 > Passives with 90% requirement now work at 70% or higher health.
351 > Fixed some client click bugs.
352 > Fixed a bug when buying ammo where it didn't recognize your maximum ammo.
353 > Fixed a bug involving access to Hunt dos Quaras.
354 > When dying, the client only shows his penalty if you died without bless.
355 > Dying makes you lose any active Skulls.
356 > Re-enabled the last kills system on the site.
357 > Fixed a bug where it was possible to lure Lizards to Bonebrook's Nexus.
358 > Now the monster count in Task is given to everyone who damages the monster.
359 > Fixed a bug when dying facing a Blacklist Boss.
360 > Fixed the location of the Draken Quest quest.
361 > Fixed bug where weapons stop firing for a few seconds.
362 > Decreased item requirements to upgrade weapons and equipment.
363 > Changed details of the quest "Defense Lessons - I".
364
365 ]],
366 },
367 },
368 },
369 [03] = {
370 TITULO = {
371 ["pt"] = "UPDATE 1.4.12",
372 ["en"] = "UPDATE 1.4.12",
373 },
374 LEITURA = 00,
375 DESC = {
376
377 ["en"] = "Death system modification and internal improvements to fix crash failures.",
378 },
379 TEXT = {
380 ["pt"] = {
381 [[
382
383 > Adicionado algumas melhorias internas.
384 > Removido a lista de morte temporariamente.
385
386
387
388
389 ]],
390 },
391 ["en"] = {
392 [[
393
394 > Added some internal improvements.
395 > Removed the kill list temporarily.
396 > Added Reset Status promotion in Shop.
397 > Added login/logout protections.
398 > Added a screensaver on death.
399
400 ]],
401 },
402 },
403 },
404 [04] = {
405 TITULO = {
406 ["pt"] = "MELHORIAS NO SERVIDOR",
407 ["en"] = "SERVER IMPROVEMENTS",
408 },
409 LEITURA = 00,
410 DESC = {
411
412 ["en"] = "Improvements in the drop of gold coins, in the chances of getting weapons in the Blacklist and other small changes.",
413 },
414 TEXT = {
415 ["pt"] = {
416 [[
417
418
419
420
421
422 > Agora o loot de bosses pode ser melhorado com o uso de Amuletos ou atributos que melhoram o drope.
423
424
425
426
427 ]],
428 },
429 ["en"] = {
430 [[
431
432 Server Update.
433 > All gold coins loot - especially from mid/high level monsters - have been increased, approaching the existing Global standard.
434 > Changed the unique special loot of blacklist bosses.
435 > Now each Boss will have its fixed weapon drop %. The higher the Rank, the lower the %.
436 > Boss loot can now be improved with the use of Amulets or stats that improve the drop.
437 > Added a weapon drop aid. This aid is activated when the player spends X amount of points on the Boss.
438 > The drop aid has a limit of up to 80%.
439 > Drop assist resets as soon as you drop a weapon.
440
441 ]],
442 },
443 },
444 },
445 [05] = {
446 TITULO = {
447 ["pt"] = "UPDATE 1.4.11",
448 ["en"] = "UPDATE 1.4.11",
449 },
450 LEITURA = 00,
451 DESC = {
452
453 ["en"] = "Review of values ??related to ammo and healing potions.",
454 },
455 TEXT = {
456 ["pt"] = {
457 [[
458
459
460
461
462 ]],
463 },
464 ["en"] = {
465 [[
466
467 > Revised the values of all ammunition.
468 > Revised the values of all healing potions.
469
470 ]],
471 },
472 },
473 },
474 [06] = {
475 TITULO = {
476 ["pt"] = "UPDATE 1.4.10",
477 ["en"] = "UPDATE 1.4.10",
478 },
479 LEITURA = 00,
480 DESC = {
481
482 ["en"] = "Level review in different modalities and several bugs fixed.",
483 },
484 TEXT = {
485 ["pt"] = {
486 [[
487
488
489 Ninho
490
491
492
493
494
495 Power Box (Aumento valor de gold):
496 > Box #01: Nv. 20+
497 > Box #02: Nv. 55+
498 > Box #03: Nv. 90+
499 > Box #04: Nv. 145+
500 > Box #05: Nv. 180+
501
502 Machine Sort (Aumento valor de gold):
503 > Machine #01: Nv. 40+ | 10.000 | 10 White Task
504 > Machine #02: Nv. 85+ | 40.000 | 20 White Task
505 > Machine #03: Nv. 130+ | 70.000 | 30 White Task
506 > Machine #04: Nv. 180+ | 100.000 | 20 Yellow Task
507 > Machine #05: Nv. 225+ | 155.000 | 30 Yellow Task
508 > Machine #06: Nv. 285+ | 200.000 | 25 Blue Task
509 > Machine #07: Nv. 320+ | 250.000 | 35 Blue Task
510
511
512
513
514
515
516
517 Maestria:
518 > Aprender: Nv. 80+ | 50.000
519 > Maestria #1: Nv. 150+ | 100.000
520 > Maestria #2: Nv. 200+ | 250.000
521 > Maestria #3: Nv. 250+ | 350.000
522 > Maestria #4: Nv. 300+ | 500.000
523
524 Especialista:
525 > Aprender: Nv. 150 | 200.000
526 > Esp. #01: Nv. 200 | 350.000
527 > Esp. #02: Nv. 250 | 500.000
528 > Esp. #03: Nv. 300 | 700.000
529 > Esp. #04: Nv. 350 | 900.000
530 > Esp. #05: Nv. 400 | 2.000.000
531
532 > Locais de Hunt do Especialista: Nv. 400+ | 50.000
533
534
535
536
537 > Corrigido algumas jogadas e bugs do sistema de Duelo de Kards.
538 > Adicionado alguns delay de clique no cliente.
539
540 > Alterado valores de alguns itens no Shop.
541 > Removido a Task dos Massive Earth Elemental.
542
543 > Corrigido problemas no teleport nos desafios de Especialista.
544 > Corrigido um erro nos baus dos saqueadores.
545 > Corrigido um bug na hora de dar as recompensas em Task Points no Coliseu.
546 > Alterado recompensas finais do Coliseu.
547
548 > Alterado os valores dos atributos do Coliseu Shop.
549
550 > Pisos especiais foram adicionados na arena do Coliseu.
551 > Corrigido um bug no filtro do Market.
552 > Corrigido bug visual na aba de status ao usar as passivas de defesa e esquiva.
553 > Alterado o dano dos atributos Bomb em equipamentos.
554
555 > Alterado os valores de algumas Passivas.
556 > Ajustado defesa e esquiva dos jogadores em PVP.
557
558 > Corrigido alguns erros no mapa.
559
560
561
562 ]],
563 },
564 ["en"] = {
565 [[
566
567 > Reactivated the level restrictions in several activities:
568 Nest
569 > Easy: Lv. 10+
570 > Medium: Lv. 40+
571 > Hard: Lv. 75+
572 > Impossible: Lv. 100+
573
574 Power Box (Increase gold value):
575 > Box #01: Lv. 20+
576 > Box #02: Lv. 55+
577 > Box #03: Lv. 90+
578 > Box #04: Lv. 145+
579 > Box #05: Lv. 180+
580
581 Machine Sort (Increase gold value):
582 > Machine #01: Lv. 40+ | 10,000 | 10 White Task
583 > Machine #02: Lv. 85+ | 40,000 | 20 White Task
584 > Machine #03: Lv. 130+ | 70,000 | 30 White Task
585 > Machine #04: Lv. 180+ | 100,000 | 20 Yellow Task
586 > Machine #05: Lv. 225+ | 155,000 | 30 Yellow Task
587 > Machine #06: Lv. 285+ | 200,000 | 25 Blue Task
588 > Machine #07: Lv. 320+ | 250,000 | 35 Blue Task
589
590 Cursed Tree:
591 > Easy: Lv. 30+
592 > Medium: Lv. 70+
593 > Hard: Lv. 125+
594 > Impossible: Lv. 185+
595
596 Mastery:
597 > Learn: Lv. 80+ | 50,000
598 > Mastery #1: Lv. 150+ | 100,000
599 > Mastery #2: Lv. 200+ | 250,000
600 > Mastery #3: Lv. 250+ | 350,000
601 > Mastery #4: Lv. 300+ | 500,000
602
603 Specialist:
604 > Learn: Lv. 150 | 200,000
605 > esp. #01: Lv. 200 | 350,000
606 > esp. #02: Lv. 250 | 500,000
607 > esp. #03: Lv. 300 | 700,000
608 > esp. #04: Lv. 350 | 900,000
609 > esp. #05: Lv. 400 | 2,000,000
610
611 > Specialist Hunt Locations: Lv. 400+ | 50,000
612
613 > Other modifications:
614
615 > Dangerous now show the % chance of getting a rarity gear when clicking on the reward chest. This % also goes up for each time you finish it.
616 > Fixed some moves and bugs in the Kards Duel system.
617 > Added some client click delay.
618 > Changed the Task Points requirements in the Gold level Blacklist and above.
619 > Changed values of some items in the Shop.
620 > Removed the Massive Earth Elemental Task.
621 > Fixed a visual bug at the Expert level.
622 > Fixed teleport issues in Specialist challenges.
623 > Fixed a bug in looter chests.
624 > Fixed a bug when giving the rewards in Task Points in the Colosseum.
625 > Changed Colosseum final rewards.
626 > Changed the strength of Colosseum 1v1 Duel Bosses.
627 > Changed the values of the Coliseu Shop attributes.
628 > Now the attributes obtained in the Coliseum Shop are no longer locked.
629 > Special floors have been added to the Colosseum arena.
630 > Fixed a bug in the Market filter.
631 > Fixed visual bug in status tab when using defense and dodge passives.
632 > Changed the damage of Bomb attributes on equipment.
633 > A new Haunted Treeling area in the Nexus of Sodon.
634 > Changed the values of some Passives.
635 > Adjusted player defense and dodging in PVP.
636 > Fixed a bug where Blood Crab Task did not count.
637 > Fixed some errors on the map.
638 > It is now possible to close an on-screen tutorial window just by clicking on any part of it.
639 > Replaced the War Golems for Hydras in the Dangerous Crystal Palace in Huampali.
640
641 ]],
642 },
643 },
644 },
645 [07] = {
646 TITULO = {
647 ["pt"] = "",
648 ["en"] = "",
649 },
650 LEITURA = 00,
651 DESC = {
652 ["pt"] = "",
653 ["en"] = "",
654 },
655 TEXT = {
656 ["pt"] = {
657 [[
658
659
660 ]],
661 },
662 ["en"] = {
663 [[
664
665
666 ]],
667 },
668 },
669 },
670 [08] = {
671 TITULO = {
672 ["pt"] = "",
673 ["en"] = "",
674 },
675 LEITURA = 00,
676 DESC = {
677 ["pt"] = "",
678 ["en"] = "",
679 },
680 TEXT = {
681 ["pt"] = {
682 [[
683
684
685 ]],
686 },
687 ["en"] = {
688 [[
689
690
691 ]],
692 },
693 },
694 },
695 [09] = {
696 TITULO = {
697 ["pt"] = "",
698 ["en"] = "",
699 },
700 LEITURA = 00,
701 DESC = {
702 ["pt"] = "",
703 ["en"] = "",
704 },
705 TEXT = {
706 ["pt"] = {
707 [[
708
709
710 ]],
711 },
712 ["en"] = {
713 [[
714
715
716 ]],
717 },
718 },
719 },
720 [10] = {
721 TITULO = {
722 ["pt"] = "",
723 ["en"] = "",
724 },
725 LEITURA = 00,
726 DESC = {
727 ["pt"] = "",
728 ["en"] = "",
729 },
730 TEXT = {
731 ["pt"] = {
732 [[
733
734
735 ]],
736 },
737 ["en"] = {
738 [[
739
740
741 ]],
742 },
743 },
744 },
745}
746local CAIXA_MENSAGEM = {
747 [00] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
748
749 [01] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
750 [02] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
751 [03] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
752 [04] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
753 [05] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
754 [06] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
755 [07] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
756 [08] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
757 [09] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
758 [10] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
759 [11] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
760 [12] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
761 [13] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
762 [14] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
763 [15] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
764 [16] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
765 [17] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
766 [18] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
767 [19] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
768 [20] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
769 [21] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
770 [22] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
771 [23] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
772 [24] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
773 [25] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
774 [26] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
775 [27] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
776 [28] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
777 [29] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
778 [30] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
779 [31] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
780 [32] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
781 [33] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
782 [34] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
783 [35] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
784 [36] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
785 [37] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
786 [38] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
787 [39] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
788 [40] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
789 [41] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
790 [42] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
791 [43] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
792 [44] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
793 [45] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
794 [46] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
795 [47] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
796 [48] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
797 [49] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
798 [50] = {ID = 00, TYPE = 00, PLAYER_ID = 00, NAME = "", TARGET_ID = 00, TARGET_NAME = "", TITLE = "", MESSAGEM = "", RESPOSTA = "", BOX_1 = "", BOX_2 = "", BOX_3 = "", BOX_4 = "", GOLD = 00, VIP = 00, LIDA = 00, BOX_CHECK = 00, DEL_MSG = 00, DEL_RESP = 00},
799
800}
801
802function init()
803 connect(g_game, {
804 connect(g_game, 'onTextMessage', onNoticePanel),
805 })
806 connect(g_game, { onGameEnd = offline })
807 ProtocolGame.registerExtendedOpcode(MESSAGE_BOX, function(protocol, opcode, buffer) end)
808 noticePanel = g_ui.displayUI('notice')
809 loadPanel = noticePanel:recursiveGetChildById('loadPanel')
810 sendMessageWindow = noticePanel:recursiveGetChildById('sendMessageWindow')
811 messageItemPanel = noticePanel:recursiveGetChildById('messageItemPanel')
812 mainMessage = noticePanel:recursiveGetChildById('mainMessage')
813 mainSeparador = noticePanel:recursiveGetChildById('mainSeparador')
814 mainBox_1 = noticePanel:recursiveGetChildById('mainBox_1')
815 mainBox_2 = noticePanel:recursiveGetChildById('mainBox_2')
816 mainBox_3 = noticePanel:recursiveGetChildById('mainBox_3')
817 mainBox_4 = noticePanel:recursiveGetChildById('mainBox_4')
818 mainAnexoButton = noticePanel:recursiveGetChildById('mainAnexoButton')
819
820 respostaMessage = noticePanel:recursiveGetChildById('respostaMessage')
821 respostaSeparador = noticePanel:recursiveGetChildById('respostaSeparador')
822 respostaBox_1 = noticePanel:recursiveGetChildById('respostaBox_1')
823 respostaBox_2 = noticePanel:recursiveGetChildById('respostaBox_2')
824 respostaBox_3 = noticePanel:recursiveGetChildById('respostaBox_3')
825 respostaBox_4 = noticePanel:recursiveGetChildById('respostaBox_4')
826 delMessage = noticePanel:recursiveGetChildById('delMessage')
827 messageWindow = noticePanel:recursiveGetChildById('messageWindow')
828 playerLabel = noticePanel:recursiveGetChildById('playerLabel')
829 titleText = noticePanel:recursiveGetChildById('titleText')
830 destinatarioLabel = noticePanel:recursiveGetChildById('destinatarioLabel')
831 messageText = noticePanel:recursiveGetChildById('messageText')
832 goldText = noticePanel:recursiveGetChildById('goldText')
833 vipText = noticePanel:recursiveGetChildById('vipText')
834 box_1 = noticePanel:recursiveGetChildById('box_1')
835 box_2 = noticePanel:recursiveGetChildById('box_2')
836 box_3 = noticePanel:recursiveGetChildById('box_3')
837 box_4 = noticePanel:recursiveGetChildById('box_4')
838
839 typeCombo = noticePanel:recursiveGetChildById('typeCombo')
840 typeCombo.onOptionChange = onChangeMsgType
841 noticeWindow = noticePanel:recursiveGetChildById('noticeWindow')
842 noticeLabel = noticePanel:recursiveGetChildById('noticeLabel')
843 noticeItemPanel = noticePanel:recursiveGetChildById('noticeItemPanel')
844 lastNoticeButton = noticePanel:recursiveGetChildById('lastNoticeButton')
845 mensagemBoxButton = noticePanel:recursiveGetChildById('mensagemBoxButton')
846 escreverMessage = noticePanel:recursiveGetChildById('escreverMessage')
847
848 g_keyboard.bindKeyDown(HOTKEY, show, modules.game_interface.getRootPanel())
849 noticePanel:hide()
850end
851function onNoticePanel(mode, text)
852 if not g_game.isOnline() then
853 return
854 end
855 if mode == MessageModes.Failure then
856 if string.find(text, "@Notice") then
857 local t = string.explode(text, "|")
858 if tonumber(t[02]) == 00 then
859 local ID = tonumber(t[03])
860 if tonumber(t[03]) == 01 then
861 for X = 01, #CAIXA_MENSAGEM do
862 CAIXA_MENSAGEM[X].ID = 00
863 CAIXA_MENSAGEM[X].TYPE = 00
864 CAIXA_MENSAGEM[X].PLAYER_ID = 00
865 CAIXA_MENSAGEM[X].NAME = ""
866 CAIXA_MENSAGEM[X].TARGET_ID = 00
867 CAIXA_MENSAGEM[X].TARGET_NAME = ""
868 CAIXA_MENSAGEM[X].TITLE = ""
869 CAIXA_MENSAGEM[X].MESSAGEM = ""
870 CAIXA_MENSAGEM[X].RESPOSTA = ""
871 CAIXA_MENSAGEM[X].BOX_1 = ""
872 CAIXA_MENSAGEM[X].BOX_2 = ""
873 CAIXA_MENSAGEM[X].BOX_3 = ""
874 CAIXA_MENSAGEM[X].BOX_4 = ""
875 CAIXA_MENSAGEM[X].GOLD = 00
876 CAIXA_MENSAGEM[X].VIP = 00
877 CAIXA_MENSAGEM[X].LIDA = 00
878 CAIXA_MENSAGEM[X].BOX_CHECK = 00
879 CAIXA_MENSAGEM[X].DEL_MSG = 00
880 CAIXA_MENSAGEM[X].DEL_RESP = 00
881 end
882
883 CAIXA_MSG_ID = 01
884 end
885
886 CAIXA_MENSAGEM[CAIXA_MSG_ID].ID = tonumber(t[04])
887 CAIXA_MENSAGEM[CAIXA_MSG_ID].TYPE = tonumber(t[05])
888 CAIXA_MENSAGEM[CAIXA_MSG_ID].PLAYER_ID = tonumber(t[06])
889 CAIXA_MENSAGEM[CAIXA_MSG_ID].NAME = t[07]
890 CAIXA_MENSAGEM[CAIXA_MSG_ID].TARGET_ID = tonumber(t[08])
891 CAIXA_MENSAGEM[CAIXA_MSG_ID].TARGET_NAME = t[09]
892 CAIXA_MENSAGEM[CAIXA_MSG_ID].TITLE = t[10]
893 CAIXA_MENSAGEM[CAIXA_MSG_ID].MESSAGEM = t[11]
894 CAIXA_MENSAGEM[CAIXA_MSG_ID].RESPOSTA = t[12]
895 CAIXA_MENSAGEM[CAIXA_MSG_ID].BOX_1 = t[13]
896 CAIXA_MENSAGEM[CAIXA_MSG_ID].BOX_2 = t[14]
897 CAIXA_MENSAGEM[CAIXA_MSG_ID].BOX_3 = t[15]
898 CAIXA_MENSAGEM[CAIXA_MSG_ID].BOX_4 = t[16]
899 CAIXA_MENSAGEM[CAIXA_MSG_ID].GOLD = tonumber(t[17])
900 CAIXA_MENSAGEM[CAIXA_MSG_ID].VIP = tonumber(t[18])
901 CAIXA_MENSAGEM[CAIXA_MSG_ID].LIDA = tonumber(t[19])
902 CAIXA_MENSAGEM[CAIXA_MSG_ID].BOX_CHECK = tonumber(t[20])
903 CAIXA_MENSAGEM[CAIXA_MSG_ID].DEL_MSG = tonumber(t[21])
904 CAIXA_MENSAGEM[CAIXA_MSG_ID].DEL_RESP = tonumber(t[22])
905
906 CAIXA_MSG_ID = CAIXA_MSG_ID + 01
907 end
908 if tonumber(t[02]) == 01 then
909 local localPlayer = g_game.getLocalPlayer()
910 local OrderMail = {}
911 for _MSG = 01, #CAIXA_MENSAGEM do
912 MSG_BOX = noticePanel:recursiveGetChildById('MSG_BOX_' .._MSG)
913 if MSG_BOX then
914 MSG_BOX:destroy()
915 end
916 end
917 if CAIXA_MSG_ID == 01 then
918 for X = 01, #CAIXA_MENSAGEM do
919 CAIXA_MENSAGEM[X].ID = 00
920 CAIXA_MENSAGEM[X].TYPE = 00
921 CAIXA_MENSAGEM[X].PLAYER_ID = 00
922 CAIXA_MENSAGEM[X].NAME = ""
923 CAIXA_MENSAGEM[X].TARGET_ID = 00
924 CAIXA_MENSAGEM[X].TARGET_NAME = ""
925 CAIXA_MENSAGEM[X].TITLE = ""
926 CAIXA_MENSAGEM[X].MESSAGEM = ""
927 CAIXA_MENSAGEM[X].RESPOSTA = ""
928 CAIXA_MENSAGEM[X].BOX_1 = ""
929 CAIXA_MENSAGEM[X].BOX_2 = ""
930 CAIXA_MENSAGEM[X].BOX_3 = ""
931 CAIXA_MENSAGEM[X].BOX_4 = ""
932 CAIXA_MENSAGEM[X].GOLD = 00
933 CAIXA_MENSAGEM[X].VIP = 00
934 CAIXA_MENSAGEM[X].LIDA = 00
935 CAIXA_MENSAGEM[X].BOX_CHECK = 00
936 CAIXA_MENSAGEM[X].DEL_MSG = 00
937 CAIXA_MENSAGEM[X].DEL_RESP = 00
938 end
939 end
940 for ORG = 01, 02 do
941 for Y = 01, #CAIXA_MENSAGEM do
942 if ORG == 01 then
943 if CAIXA_MENSAGEM[Y].ID > 00 then
944 if CAIXA_MENSAGEM[Y].LIDA == 00 then
945 table.insert(OrderMail, Y)
946 end
947 end
948 else
949 if CAIXA_MENSAGEM[Y].ID > 00 then
950 if CAIXA_MENSAGEM[Y].LIDA == 01 then
951 table.insert(OrderMail, Y)
952 end
953 end
954 end
955 end
956 end
957
958 for X = 01, #OrderMail do
959 local NEWS_ID = OrderMail[X]
960 if CAIXA_MENSAGEM[NEWS_ID].ID > 00 and CAIXA_MENSAGEM[NEWS_ID].NAME == localPlayer:getName() and CAIXA_MENSAGEM[NEWS_ID].DEL_MSG == 00
961 or CAIXA_MENSAGEM[NEWS_ID].ID > 00 and CAIXA_MENSAGEM[NEWS_ID].TARGET_NAME == localPlayer:getName() and CAIXA_MENSAGEM[NEWS_ID].DEL_RESP == 00 then
962 INBOX_MESSAGE = g_ui.createWidget('UIButton', messageItemPanel)
963 INBOX_MESSAGE:setId("MSG_BOX_" ..NEWS_ID)
964 INBOX_MESSAGE:setImageSource('/images/custom/Task/Monster_1')
965 INBOX_MESSAGE:setMarginTop(05)
966 INBOX_MESSAGE:setOpacity(0.8)
967 INBOX_MESSAGE.onHoverChange = function(widget, hoverState)
968 if hoverState then
969 widget:setOpacity('1.0')
970 else
971 widget:setOpacity('0.8')
972 end
973 end
974
975 INBOX_TITLE = g_ui.createWidget('UIButton', INBOX_MESSAGE)
976 INBOX_TITLE:setSize({width = 10, height = 22})
977 INBOX_TITLE:setTextAlign(AlignLeft)
978 INBOX_TITLE:setFont("verdana-11px-antialised")
979 INBOX_TITLE:setTextWrap(true)
980 INBOX_TITLE:setPhantom(true)
981 INBOX_TITLE:addAnchor(AnchorLeft, 'parent', AnchorLeft)
982 INBOX_TITLE:addAnchor(AnchorRight, 'parent', AnchorRight)
983 INBOX_TITLE:addAnchor(AnchorTop, 'parent', AnchorTop)
984 INBOX_TITLE:setMarginTop(05)
985 INBOX_TITLE:setMarginBottom(05)
986 INBOX_TITLE:setMarginLeft(55)
987 INBOX_TITLE:setMarginRight(07)
988 INBOX_TITLE:setText(CAIXA_MENSAGEM[NEWS_ID].TITLE)
989
990 INBOX_DESC = g_ui.createWidget('UIButton', INBOX_MESSAGE)
991 INBOX_DESC:setSize({width = 10, height = 10})
992 INBOX_DESC:setTextAlign(AlignLeft)
993 INBOX_DESC:setFont("terminus-10px")
994 INBOX_DESC:setTextWrap(true)
995 INBOX_DESC:setPhantom(true)
996 INBOX_DESC:addAnchor(AnchorLeft, 'parent', AnchorLeft)
997 INBOX_DESC:addAnchor(AnchorRight, 'parent', AnchorRight)
998 INBOX_DESC:addAnchor(AnchorTop, 'parent', AnchorTop)
999 INBOX_DESC:addAnchor(AnchorBottom, 'parent', AnchorBottom)
1000 INBOX_DESC:setMarginTop(25)
1001 INBOX_DESC:setMarginBottom(05)
1002 INBOX_DESC:setMarginLeft(60)
1003 INBOX_DESC:setMarginRight(07)
1004 if CAIXA_MENSAGEM[NEWS_ID].TYPE == 01 then
1005 INBOX_DESC:setText(tr('Bug Reportado'))
1006 elseif CAIXA_MENSAGEM[NEWS_ID].TYPE == 02 then
1007 INBOX_DESC:setText(tr('Sugestao Enviada'))
1008 elseif CAIXA_MENSAGEM[NEWS_ID].TYPE == 03 then
1009 INBOX_DESC:setText(tr('Duvida'))
1010 elseif CAIXA_MENSAGEM[NEWS_ID].TYPE == 04 then
1011 if CAIXA_MENSAGEM[NEWS_ID].NAME == localPlayer:getName() then
1012 INBOX_DESC:setText(tr('Mensagem Enviada para').. ' ' ..CAIXA_MENSAGEM[NEWS_ID].TARGET_NAME)
1013 else
1014 INBOX_DESC:setText(tr('Enviada por').. ' ' ..CAIXA_MENSAGEM[NEWS_ID].NAME)
1015 INBOX_MESSAGE:setImageSource('/images/custom/Task/Monster_4')
1016 end
1017 else
1018 INBOX_DESC:setText(tr('Desconhecido'))
1019 end
1020
1021 INBOX_ICON = g_ui.createWidget('UIButton', INBOX_MESSAGE)
1022 INBOX_ICON:setId("ICON_BOX_" ..NEWS_ID)
1023 INBOX_ICON:setSize({width = 32, height = 32})
1024 INBOX_ICON:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1025 INBOX_ICON:addAnchor(AnchorTop, 'parent', AnchorTop)
1026 INBOX_ICON:setMarginTop(07)
1027 INBOX_ICON:setMarginLeft(13)
1028 INBOX_ICON:setPhantom(true)
1029 if CAIXA_MENSAGEM[NEWS_ID].TYPE == 04 then
1030 if CAIXA_MENSAGEM[NEWS_ID].NAME == localPlayer:getName() then
1031 if #CAIXA_MENSAGEM[NEWS_ID].BOX_1 > 05 then
1032 INBOX_ICON:setImageSource('/images/custom/UI/email_open_anexo')
1033 else
1034 INBOX_ICON:setImageSource('/images/custom/UI/email_open')
1035 end
1036 else
1037 if CAIXA_MENSAGEM[NEWS_ID].LIDA == 00 then
1038 if #CAIXA_MENSAGEM[NEWS_ID].BOX_1 > 05 then
1039 INBOX_ICON:setImageSource('/images/custom/UI/email_closer_anexo')
1040 else
1041 INBOX_ICON:setImageSource('/images/custom/UI/email_closer')
1042 end
1043 INBOX_MESSAGE:setImageSource('/images/custom/Task/Monster_4')
1044 else
1045 if #CAIXA_MENSAGEM[NEWS_ID].BOX_1 > 05 then
1046 INBOX_ICON:setImageSource('/images/custom/UI/email_open_anexo')
1047 else
1048 INBOX_ICON:setImageSource('/images/custom/UI/email_open')
1049 end
1050 INBOX_MESSAGE:setImageSource('/images/custom/Task/Monster_1')
1051 end
1052 end
1053 else
1054 if CAIXA_MENSAGEM[NEWS_ID].LIDA == 00 then
1055 if #CAIXA_MENSAGEM[NEWS_ID].BOX_1 > 05 then
1056 INBOX_ICON:setImageSource('/images/custom/UI/email_closer_anexo')
1057 else
1058 INBOX_ICON:setImageSource('/images/custom/UI/email_closer')
1059 end
1060 INBOX_MESSAGE:setImageSource('/images/custom/Task/Monster_4')
1061 else
1062 if #CAIXA_MENSAGEM[NEWS_ID].BOX_1 > 05 then
1063 INBOX_ICON:setImageSource('/images/custom/UI/email_open_anexo')
1064 else
1065 INBOX_ICON:setImageSource('/images/custom/UI/email_open')
1066 end
1067 end
1068 end
1069
1070 INBOX_MESSAGE.onClick = function(widget)
1071 local CLICK_ID = NEWS_ID
1072 onNoticeConfig(08, CLICK_ID)
1073 MSG_ICON = noticePanel:recursiveGetChildById('ICON_BOX_' ..CLICK_ID)
1074 widget:setImageSource('/images/custom/Task/Monster_1')
1075 if #CAIXA_MENSAGEM[CLICK_ID].BOX_1 > 05 then
1076 onNoticeConfig(07, CLICK_ID)
1077 mainSeparador:show()
1078 mainAnexoButton:show()
1079 mainBox_1:show()
1080 mainBox_2:show()
1081 mainBox_3:show()
1082 mainBox_4:show()
1083 if CAIXA_MENSAGEM[CLICK_ID].NAME == localPlayer:getName() then
1084 mainAnexoButton:hide()
1085 else
1086 if CAIXA_MENSAGEM[CLICK_ID].BOX_CHECK == 01 then
1087 mainAnexoButton:disable()
1088 mainAnexoButton:setImageSource('/images/custom/Task/Monster_5')
1089 else
1090 mainAnexoButton:enable()
1091 mainAnexoButton:setImageSource('/images/custom/Task/Monster_3')
1092 mainAnexoButton.onClick = function()
1093 local A = CAIXA_MENSAGEM[CLICK_ID].ID
1094 local B = CAIXA_MENSAGEM[CLICK_ID].BOX_1
1095 local C = CAIXA_MENSAGEM[CLICK_ID].BOX_2
1096 local D = CAIXA_MENSAGEM[CLICK_ID].BOX_3
1097 local E = CAIXA_MENSAGEM[CLICK_ID].BOX_4
1098 g_game.getProtocolGame():sendExtendedOpcode(MESSAGE_BOX, "99|" ..A.. "|" ..B.. "|" ..C.. "|" ..D.. "|" ..E)
1099 CAIXA_MENSAGEM[CLICK_ID].BOX_CHECK = 01
1100 mainAnexoButton:disable()
1101 mainAnexoButton:setImageSource('/images/custom/Task/Monster_5')
1102 end
1103 end
1104 end
1105 else
1106 mainSeparador:hide()
1107 mainAnexoButton:hide()
1108 mainBox_1:hide()
1109 mainBox_2:hide()
1110 mainBox_3:hide()
1111 mainBox_4:hide()
1112
1113 local A = CAIXA_MENSAGEM[CLICK_ID].ID
1114 local B = CAIXA_MENSAGEM[CLICK_ID].BOX_1
1115 local C = CAIXA_MENSAGEM[CLICK_ID].BOX_2
1116 local D = CAIXA_MENSAGEM[CLICK_ID].BOX_3
1117 local E = CAIXA_MENSAGEM[CLICK_ID].BOX_4
1118
1119 if CAIXA_MENSAGEM[CLICK_ID].LIDA == 00 then
1120 g_game.getProtocolGame():sendExtendedOpcode(MESSAGE_BOX, "99|" ..A.. "|" ..B.. "|" ..C.. "|" ..D.. "|" ..E)
1121 end
1122 CAIXA_MENSAGEM[CLICK_ID].LIDA = 01
1123 end
1124 if #CAIXA_MENSAGEM[CLICK_ID].BOX_1 > 05 then
1125 MSG_ICON:setImageSource('/images/custom/UI/email_open_anexo')
1126 else
1127 MSG_ICON:setImageSource('/images/custom/UI/email_open')
1128 end
1129 if #CAIXA_MENSAGEM[CLICK_ID].RESPOSTA > 05 then
1130 respostaMessage:show()
1131 mainSeparador:show()
1132 respostaSeparador:show()
1133 respostaMessage:setText(tr(CAIXA_MENSAGEM[CLICK_ID].RESPOSTA))
1134 else
1135 respostaMessage:hide()
1136 mainSeparador:hide()
1137 respostaSeparador:hide()
1138 respostaMessage:setText('')
1139 end
1140
1141 delMessage:show()
1142 delMessage.onClick = function()
1143 local A = CAIXA_MENSAGEM[CLICK_ID].ID
1144 local delResp = 0
1145 if CAIXA_MENSAGEM[NEWS_ID].ID > 00 and CAIXA_MENSAGEM[NEWS_ID].TARGET_NAME == localPlayer:getName() and CAIXA_MENSAGEM[NEWS_ID].DEL_RESP == 00 then
1146 delResp = 01
1147 end
1148 g_game.getProtocolGame():sendExtendedOpcode(MESSAGE_BOX, "98|" ..A.. "|" ..delResp)
1149 end
1150
1151 mainMessage:show()
1152 mainMessage:setText(CAIXA_MENSAGEM[CLICK_ID].TITLE.. "\n_______________________________________________________\n\n" ..CAIXA_MENSAGEM[CLICK_ID].MESSAGEM)
1153 end
1154 end
1155 end
1156
1157 mainMessage:hide()
1158 mainAnexoButton:hide()
1159 mainSeparador:hide()
1160 mainBox_1:hide()
1161 mainBox_2:hide()
1162 mainBox_3:hide()
1163 mainBox_4:hide()
1164 delMessage:hide()
1165 respostaMessage:hide()
1166 respostaSeparador:hide()
1167 respostaBox_1:hide()
1168 respostaBox_2:hide()
1169 respostaBox_3:hide()
1170 respostaBox_4:hide()
1171 scheduleEvent(function()
1172 messageWindow:show()
1173 lastNoticeButton:setImageSource('/images/custom/Task/Monster_3')
1174 lastNoticeButton:enable()
1175 loadPanel:hide()
1176 end, 500)
1177 else
1178 onNoticeConfig(tonumber(t[02]))
1179 return
1180 end
1181 end
1182 end
1183end
1184function onGetAnexoMessage()
1185 return ANEXAR_MESSAGE
1186end
1187function onNoticeConfig(type, value)
1188 sendMessageWindow:hide()
1189 ANEXAR_MESSAGE = false
1190
1191 if type == 00 then
1192 for X = 01, #QUADRO_NOTICIAS do
1193 NEWS_ID = noticePanel:recursiveGetChildById('notice_' ..X)
1194 QUADRO_NOTICIAS[X].LEITURA = 00
1195 if NEWS_ID then
1196 NEWS_ID:setImageSource('/images/custom/Task/Monster_1')
1197 end
1198 end
1199 end
1200 if type == 01 then
1201 noticeWindow:show()
1202 loadPanel:hide()
1203 noticeLabel:setText('')
1204 local locale = g_settings.getString('locale')
1205 for NEWS_ID = 01, #QUADRO_NOTICIAS do
1206 NEWS_ID = noticePanel:recursiveGetChildById('notice_' ..NEWS_ID)
1207 if NEWS_ID then
1208 NEWS_ID:destroy()
1209 end
1210 end
1211 for X = 01, #QUADRO_NOTICIAS do
1212 if QUADRO_NOTICIAS[X].TITULO[locale] ~= "" then
1213 local newsId = X
1214 QUADRO_NOTICIAS[newsId].LEITURA = 00
1215 NOTICE_TAG = g_ui.createWidget('UIButton', noticeItemPanel)
1216 NOTICE_TAG:setId("notice_" ..newsId)
1217 NOTICE_TAG:setImageSource('/images/custom/Task/Monster_1')
1218 NOTICE_TAG:setMarginTop(05)
1219 NOTICE_TAG:setOpacity(0.8)
1220 NOTICE_TAG.onClick = function(window)
1221 local uniId = X
1222 local str = QUADRO_NOTICIAS[uniId].TITULO[locale]
1223 str = str.. "\n"
1224 str = str.. QUADRO_NOTICIAS[uniId].TEXT[locale][01]
1225 noticeLabel:setText(str)
1226 onNoticeConfig(00)
1227 QUADRO_NOTICIAS[uniId].LEITURA = 01
1228 window:setImageSource('/images/custom/Task/Monster_2')
1229 end
1230 NOTICE_TAG.onHoverChange = function(widget, hoverState)
1231 if hoverState then
1232 widget:setOpacity('1.0')
1233 else
1234 widget:setOpacity('0.8')
1235 end
1236 end
1237
1238 NOTICE_TITLE = g_ui.createWidget('UIButton', NOTICE_TAG)
1239 NOTICE_TITLE:setSize({width = 10, height = 22})
1240 NOTICE_TITLE:setTextAlign(AlignLeft)
1241 NOTICE_TITLE:setFont("verdana-11px-antialised")
1242 NOTICE_TITLE:setTextWrap(true)
1243 NOTICE_TITLE:setPhantom(true)
1244 NOTICE_TITLE:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1245 NOTICE_TITLE:addAnchor(AnchorRight, 'parent', AnchorRight)
1246 NOTICE_TITLE:addAnchor(AnchorTop, 'parent', AnchorTop)
1247 NOTICE_TITLE:setMarginTop(05)
1248 NOTICE_TITLE:setMarginBottom(05)
1249 NOTICE_TITLE:setMarginLeft(95)
1250 NOTICE_TITLE:setMarginRight(07)
1251 NOTICE_TITLE:setText(QUADRO_NOTICIAS[newsId].TITULO[locale])
1252
1253 NOTICE_DESC = g_ui.createWidget('UIButton', NOTICE_TAG)
1254 NOTICE_DESC:setSize({width = 10, height = 10})
1255 NOTICE_DESC:setTextAlign(AlignLeft)
1256 NOTICE_DESC:setFont("terminus-10px")
1257 NOTICE_DESC:setTextWrap(true)
1258 NOTICE_DESC:setPhantom(true)
1259 NOTICE_DESC:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1260 NOTICE_DESC:addAnchor(AnchorRight, 'parent', AnchorRight)
1261 NOTICE_DESC:addAnchor(AnchorTop, 'parent', AnchorTop)
1262 NOTICE_DESC:addAnchor(AnchorBottom, 'parent', AnchorBottom)
1263 NOTICE_DESC:setMarginTop(25)
1264 NOTICE_DESC:setMarginBottom(05)
1265 NOTICE_DESC:setMarginLeft(95)
1266 NOTICE_DESC:setMarginRight(07)
1267 NOTICE_DESC:setText(QUADRO_NOTICIAS[newsId].DESC[locale])
1268
1269 NOTICE_ICON = g_ui.createWidget('UIButton', NOTICE_TAG)
1270 NOTICE_ICON:setSize({width = 64, height = 64})
1271 NOTICE_ICON:setImageSource('/images/custom/UI/news_icon')
1272 NOTICE_ICON:addAnchor(AnchorLeft, 'parent', AnchorLeft)
1273 NOTICE_ICON:addAnchor(AnchorTop, 'parent', AnchorTop)
1274 NOTICE_ICON:setMarginTop(15)
1275 NOTICE_ICON:setMarginLeft(13)
1276 NOTICE_ICON:setPhantom(true)
1277 end
1278 end
1279
1280 onNoticeConfig(00)
1281 lastNoticeButton:setImageSource('/images/custom/Task/Monster_1')
1282 lastNoticeButton:disable()
1283 mensagemBoxButton:setImageSource('/images/custom/Task/Monster_3')
1284 mensagemBoxButton:enable()
1285 messageWindow:hide()
1286 noticePanel:show()
1287 end
1288 if type == 02 then
1289 noticeWindow:hide()
1290 lastNoticeButton:setImageSource('/images/custom/Task/Monster_1')
1291 lastNoticeButton:disable()
1292 mensagemBoxButton:setImageSource('/images/custom/Task/Monster_1')
1293 mensagemBoxButton:disable()
1294
1295 loadPanel:show()
1296 CAIXA_MSG_ID = 01
1297 g_game.getProtocolGame():sendExtendedOpcode(MESSAGE_BOX, "5")
1298 end
1299 if type == 03 then
1300 playerLabel:hide()
1301 destinatarioLabel:hide()
1302 box_1:show()
1303 box_2:show()
1304 box_3:show()
1305 box_4:show()
1306 destinatarioLabel:setText('')
1307 titleText:setText('')
1308 titleText:focus()
1309 messageText:setText('')
1310 MSG_TYPE = 04
1311
1312 CAIXA_MENSAGEM[00].BOX_1 = ""
1313 CAIXA_MENSAGEM[00].BOX_2 = ""
1314 CAIXA_MENSAGEM[00].BOX_3 = ""
1315 CAIXA_MENSAGEM[00].BOX_4 = ""
1316 typeCombo:setText(tr("Mensagem para outro Jogador"))
1317 typeCombo:disable()
1318 playerLabel:show()
1319 destinatarioLabel:show()
1320 destinatarioLabel:setText('')
1321 destinatarioLabel:focus(true)
1322 onNoticeConfig(06)
1323 ANEXAR_MESSAGE = true
1324
1325 local maxTitle = 30
1326 local maxMsg = 250
1327 local TitleChance = function(self, value)
1328 local Quant = titleText:getText()
1329 if #Quant > maxTitle then
1330 local LastStr = string.sub(Quant, 1, maxTitle)
1331 titleText:setText(LastStr)
1332 return
1333 end
1334 end
1335 titleText.onTextChange = TitleChance
1336 local MsgChance = function(self, value)
1337 local Quant = messageText:getText()
1338 if #Quant > maxMsg then
1339 local LastStr = string.sub(Quant, 1, maxMsg)
1340 messageText:setText(LastStr)
1341 return
1342 end
1343 end
1344 messageText.onTextChange = MsgChance
1345
1346 sendMessageWindow:show()
1347 end
1348 if type == 04 then
1349 sendMessageWindow:show()
1350 local localPlayer = g_game.getLocalPlayer()
1351 local PlayerText = destinatarioLabel:getText()
1352 local TitleMsgText = titleText:getText()
1353 local MsgText = messageText:getText()
1354 local GoldMsgText = goldText:getText()
1355 local VipMsgText = vipText:getText()
1356
1357 if localPlayer:getName() == PlayerText then
1358 modules.game_interface.onLoginAdvice(tr("Voce nao pode enviar mensagem para si mesmo."))
1359 return
1360 end
1361 if MSG_TYPE == 04 then
1362 if #PlayerText < 04 then
1363 modules.game_interface.onLoginAdvice(tr("Nome do destinatario invalido."))
1364 return
1365 end
1366 end
1367 if #TitleMsgText < 05 then
1368 modules.game_interface.onLoginAdvice(tr("Digite um titulo para sua mensagem."))
1369 return
1370 end
1371 if TitleMsgText:match('|') then
1372 modules.game_interface.onLoginAdvice(tr("Titulo com caractere invalido."))
1373 return
1374 end
1375 if #MsgText < 02 then
1376 modules.game_interface.onLoginAdvice(tr("Mensagem muito curta."))
1377 return
1378 end
1379 if MsgText:match('|') then
1380 modules.game_interface.onLoginAdvice(tr("Mensagem com caractere invalido."))
1381 return
1382 end
1383 if GoldMsgText ~= "" then
1384 if tonumber(goldText:getText()) == nil then
1385 goldText:setText('')
1386 goldText:focus()
1387 modules.game_interface.onLoginAdvice(tr("Valor de Gold invalido."))
1388 return
1389 end
1390 else
1391 GoldMsgText = "0"
1392 end
1393 if VipMsgText ~= "" then
1394 if tonumber(vipText:getText()) == nil then
1395 vipText:setText('')
1396 vipText:focus()
1397 modules.game_interface.onLoginAdvice(tr("Valor de Vip Coins invalido."))
1398 return
1399 end
1400 else
1401 VipMsgText = "0"
1402 end
1403 if CAIXA_MENSAGEM[00].BOX_1 == "" then
1404 CAIXA_MENSAGEM[00].BOX_1 = "0"
1405 end
1406 if CAIXA_MENSAGEM[00].BOX_2 == "" then
1407 CAIXA_MENSAGEM[00].BOX_2 = "0"
1408 end
1409 if CAIXA_MENSAGEM[00].BOX_3 == "" then
1410 CAIXA_MENSAGEM[00].BOX_3 = "0"
1411 end
1412 if CAIXA_MENSAGEM[00].BOX_4 == "" then
1413 CAIXA_MENSAGEM[00].BOX_4 = "0"
1414 end
1415
1416
1417 local stringCorrect = {'a','a','a','a','e','e','e','i','i','o','o','o','o','u','c','n','A','A','A','A','E','E','I','I','O','O','O','O','U','C','N'}
1418 for Replace = 01, #stringAcent do
1419 MsgText = MsgText:gsub(stringAcent[Replace], stringCorrect[Replace])
1420 end
1421 g_game.getProtocolGame():sendExtendedOpcode(MESSAGE_BOX, MSG_TYPE.. "|" ..PlayerText.. "|" ..TitleMsgText.. "|" ..MsgText.. "|" ..CAIXA_MENSAGEM[00].BOX_1.. "|" ..CAIXA_MENSAGEM[00].BOX_2.. "|" ..CAIXA_MENSAGEM[00].BOX_3.. "|" ..CAIXA_MENSAGEM[00].BOX_4.. "|" ..GoldMsgText.. "|" ..VipMsgText)
1422 return
1423 end
1424 if type == 05 then
1425 sendMessageWindow:show()
1426 if value ~= "00" then
1427 if CAIXA_MENSAGEM[00].BOX_1 ~= "" then
1428 local split_in = string.explode(CAIXA_MENSAGEM[00].BOX_1, "-")
1429 local split_tar = string.explode(value, "-")
1430 local UID_01 = tonumber(split_in[01])
1431 local SLOT = tonumber(split_in[11])
1432 local TAR_UID_01 = tonumber(split_tar[01])
1433 local TAR_SLOT = tonumber(split_tar[11])
1434
1435 if TAR_SLOT == 03 then
1436 if UID_01 == TAR_UID_01 then
1437 return
1438 end
1439 else
1440 if CAIXA_MENSAGEM[00].BOX_1 == value then
1441 return
1442 end
1443 end
1444
1445 end
1446 if CAIXA_MENSAGEM[00].BOX_2 ~= "" then
1447 local split_in = string.explode(CAIXA_MENSAGEM[00].BOX_2, "-")
1448 local split_tar = string.explode(value, "-")
1449 local UID_01 = tonumber(split_in[01])
1450 local SLOT = tonumber(split_in[11])
1451 local TAR_UID_01 = tonumber(split_tar[01])
1452 local TAR_SLOT = tonumber(split_tar[11])
1453
1454 if TAR_SLOT == 03 then
1455 if UID_01 == TAR_UID_01 then
1456 return
1457 end
1458 else
1459 if CAIXA_MENSAGEM[00].BOX_2 == value then
1460 return
1461 end
1462 end
1463 end
1464 if CAIXA_MENSAGEM[00].BOX_3 ~= "" then
1465 local split_in = string.explode(CAIXA_MENSAGEM[00].BOX_3, "-")
1466 local split_tar = string.explode(value, "-")
1467 local UID_01 = tonumber(split_in[01])
1468 local SLOT = tonumber(split_in[11])
1469 local TAR_UID_01 = tonumber(split_tar[01])
1470 local TAR_SLOT = tonumber(split_tar[11])
1471
1472 if TAR_SLOT == 03 then
1473 if UID_01 == TAR_UID_01 then
1474 return
1475 end
1476 else
1477 if CAIXA_MENSAGEM[00].BOX_3 == value then
1478 return
1479 end
1480 end
1481 end
1482 if CAIXA_MENSAGEM[00].BOX_4 ~= "" then
1483 local split_in = string.explode(CAIXA_MENSAGEM[00].BOX_4, "-")
1484 local split_tar = string.explode(value, "-")
1485 local UID_01 = tonumber(split_in[01])
1486 local SLOT = tonumber(split_in[11])
1487 local TAR_UID_01 = tonumber(split_tar[01])
1488 local TAR_SLOT = tonumber(split_tar[11])
1489
1490 if TAR_SLOT == 03 then
1491 if UID_01 == TAR_UID_01 then
1492 return
1493 end
1494 else
1495 if CAIXA_MENSAGEM[00].BOX_4 == value then
1496 return
1497 end
1498 end
1499 end
1500
1501 if CAIXA_MENSAGEM[00].BOX_1 == "" then
1502 CAIXA_MENSAGEM[00].BOX_1 = value
1503 elseif CAIXA_MENSAGEM[00].BOX_2 == "" then
1504 CAIXA_MENSAGEM[00].BOX_2 = value
1505 elseif CAIXA_MENSAGEM[00].BOX_3 == "" then
1506 CAIXA_MENSAGEM[00].BOX_3 = value
1507 elseif CAIXA_MENSAGEM[00].BOX_4 == "" then
1508 CAIXA_MENSAGEM[00].BOX_4 = value
1509 end
1510 end
1511
1512 local POS_BAG = 01
1513 local TEMPORARIO_BOX = {
1514 [01] = "",
1515 [02] = "",
1516 [03] = "",
1517 [04] = "",
1518 }
1519 for X = 01, #TEMPORARIO_BOX do
1520 if CAIXA_MENSAGEM[00].BOX_1 ~= "" then
1521 TEMPORARIO_BOX[POS_BAG] = CAIXA_MENSAGEM[00].BOX_1
1522 CAIXA_MENSAGEM[00].BOX_1 = ""
1523 POS_BAG = POS_BAG + 01
1524 elseif CAIXA_MENSAGEM[00].BOX_2 ~= "" then
1525 TEMPORARIO_BOX[POS_BAG] = CAIXA_MENSAGEM[00].BOX_2
1526 CAIXA_MENSAGEM[00].BOX_2 = ""
1527 POS_BAG = POS_BAG + 01
1528 elseif CAIXA_MENSAGEM[00].BOX_3 ~= "" then
1529 TEMPORARIO_BOX[POS_BAG] = CAIXA_MENSAGEM[00].BOX_3
1530 CAIXA_MENSAGEM[00].BOX_3 = ""
1531 POS_BAG = POS_BAG + 01
1532 elseif CAIXA_MENSAGEM[00].BOX_4 ~= "" then
1533 TEMPORARIO_BOX[POS_BAG] = CAIXA_MENSAGEM[00].BOX_4
1534 CAIXA_MENSAGEM[00].BOX_4 = ""
1535 POS_BAG = POS_BAG + 01
1536 end
1537 end
1538
1539 if TEMPORARIO_BOX[01] ~= "" then
1540 CAIXA_MENSAGEM[00].BOX_1 = TEMPORARIO_BOX[01]
1541 end
1542 if TEMPORARIO_BOX[02] ~= "" then
1543 CAIXA_MENSAGEM[00].BOX_2 = TEMPORARIO_BOX[02]
1544 end
1545 if TEMPORARIO_BOX[03] ~= "" then
1546 CAIXA_MENSAGEM[00].BOX_3 = TEMPORARIO_BOX[03]
1547 end
1548 if TEMPORARIO_BOX[04] ~= "" then
1549 CAIXA_MENSAGEM[00].BOX_4 = TEMPORARIO_BOX[04]
1550 end
1551
1552 onNoticeConfig(06)
1553 end
1554 if type == 06 then
1555 sendMessageWindow:show()
1556 ANEXAR_MESSAGE = true
1557 if #CAIXA_MENSAGEM[00].BOX_1 > 01 then
1558 local split = string.explode(CAIXA_MENSAGEM[00].BOX_1, "-")
1559 local UID_01 = tonumber(split[01])
1560 local UID_02 = tonumber(split[02])
1561 local UID_03 = tonumber(split[03])
1562 local UID_04 = tonumber(split[04])
1563 local UID_05 = tonumber(split[05])
1564 local UID_06 = tonumber(split[06])
1565 local UID_07 = tonumber(split[07])
1566 local UID_08 = tonumber(split[08])
1567 local UID_09 = tonumber(split[09])
1568 local UID_10 = tonumber(split[10])
1569 local SLOT = tonumber(split[11])
1570
1571 box_1:setText("")
1572 box_1:setIcon('/images/custom/Items/' ..UID_01)
1573 box_1:setImageSource('/images/custom/UI/rare_' ..UID_02)
1574 box_1.onMouseRelease = function(widget, mousePos, mouseButton)
1575 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1576 return
1577 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1578 local menu = g_ui.createWidget('PopupMenu')
1579 menu:addOption(tr("Remover"), function()
1580 CAIXA_MENSAGEM[00].BOX_1 = ""
1581 onNoticeConfig(05, "00")
1582 end)
1583 menu:display()
1584 end
1585 end
1586 if SLOT == 1 or SLOT == 7 then
1587 box_1:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1588 elseif SLOT == 4 then
1589 box_1:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1590 elseif SLOT == 03 then
1591 box_1:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1592 if UID_04 > 0 then
1593 if UID_04 < 10 then
1594 box_1:setText("0" ..UID_04)
1595 else
1596 box_1:setText(UID_04)
1597 end
1598 else
1599 box_1:setText("")
1600 end
1601 else
1602 box_1:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1603 end
1604 else
1605 box_1:setIcon('/images/custom/Items/0')
1606 box_1:setImageSource('/images/custom/UI/item_slot')
1607 box_1:setTooltip('')
1608 box_1:setText("")
1609 box_1.onMouseRelease = function(widget, mousePos, mouseButton)
1610 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1611 return
1612 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1613 return
1614 end
1615 end
1616 end
1617 if #CAIXA_MENSAGEM[00].BOX_2 > 01 then
1618 local split = string.explode(CAIXA_MENSAGEM[00].BOX_2, "-")
1619 local UID_01 = tonumber(split[01])
1620 local UID_02 = tonumber(split[02])
1621 local UID_03 = tonumber(split[03])
1622 local UID_04 = tonumber(split[04])
1623 local UID_05 = tonumber(split[05])
1624 local UID_06 = tonumber(split[06])
1625 local UID_07 = tonumber(split[07])
1626 local UID_08 = tonumber(split[08])
1627 local UID_09 = tonumber(split[09])
1628 local UID_10 = tonumber(split[10])
1629 local SLOT = tonumber(split[11])
1630
1631 box_2:setText("")
1632 box_2:setIcon('/images/custom/Items/' ..UID_01)
1633 box_2:setImageSource('/images/custom/UI/rare_' ..UID_02)
1634 box_2.onMouseRelease = function(widget, mousePos, mouseButton)
1635 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1636 return
1637 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1638 local menu = g_ui.createWidget('PopupMenu')
1639 menu:addOption(tr("Remover"), function()
1640 CAIXA_MENSAGEM[00].BOX_2 = ""
1641 onNoticeConfig(05, "00")
1642 end)
1643 menu:display()
1644 end
1645 end
1646 if SLOT == 1 or SLOT == 7 then
1647 box_2:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1648 elseif SLOT == 4 then
1649 box_2:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1650 elseif SLOT == 03 then
1651 box_2:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1652 if UID_04 > 0 then
1653 if UID_04 < 10 then
1654 box_2:setText("0" ..UID_04)
1655 else
1656 box_2:setText(UID_04)
1657 end
1658 else
1659 box_2:setText("")
1660 end
1661 else
1662 box_2:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1663 end
1664 else
1665 box_2:setIcon('/images/custom/Items/0')
1666 box_2:setImageSource('/images/custom/UI/item_slot')
1667 box_2:setTooltip('')
1668 box_2:setText("")
1669 box_2.onMouseRelease = function(widget, mousePos, mouseButton)
1670 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1671 return
1672 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1673 return
1674 end
1675 end
1676 end
1677 if #CAIXA_MENSAGEM[00].BOX_3 > 01 then
1678 local split = string.explode(CAIXA_MENSAGEM[00].BOX_3, "-")
1679 local UID_01 = tonumber(split[01])
1680 local UID_02 = tonumber(split[02])
1681 local UID_03 = tonumber(split[03])
1682 local UID_04 = tonumber(split[04])
1683 local UID_05 = tonumber(split[05])
1684 local UID_06 = tonumber(split[06])
1685 local UID_07 = tonumber(split[07])
1686 local UID_08 = tonumber(split[08])
1687 local UID_09 = tonumber(split[09])
1688 local UID_10 = tonumber(split[10])
1689 local SLOT = tonumber(split[11])
1690
1691 box_3:setText("")
1692 box_3:setIcon('/images/custom/Items/' ..UID_01)
1693 box_3:setImageSource('/images/custom/UI/rare_' ..UID_02)
1694 box_3.onMouseRelease = function(widget, mousePos, mouseButton)
1695 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1696 return
1697 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1698 local menu = g_ui.createWidget('PopupMenu')
1699 menu:addOption(tr("Remover"), function()
1700 CAIXA_MENSAGEM[00].BOX_3 = ""
1701 onNoticeConfig(05, "00")
1702 end)
1703 menu:display()
1704 end
1705 end
1706 if SLOT == 1 or SLOT == 7 then
1707 box_3:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1708 elseif SLOT == 4 then
1709 box_3:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1710 elseif SLOT == 03 then
1711 box_3:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1712 if UID_04 > 0 then
1713 if UID_04 < 10 then
1714 box_3:setText("0" ..UID_04)
1715 else
1716 box_3:setText(UID_04)
1717 end
1718 else
1719 box_3:setText("")
1720 end
1721 else
1722 box_3:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1723 end
1724 else
1725 box_3:setIcon('/images/custom/Items/0')
1726 box_3:setImageSource('/images/custom/UI/item_slot')
1727 box_3:setTooltip('')
1728 box_3:setText("")
1729 box_3.onMouseRelease = function(widget, mousePos, mouseButton)
1730 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1731 return
1732 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1733 return
1734 end
1735 end
1736 end
1737 if #CAIXA_MENSAGEM[00].BOX_4 > 01 then
1738 local split = string.explode(CAIXA_MENSAGEM[00].BOX_4, "-")
1739 local UID_01 = tonumber(split[01])
1740 local UID_02 = tonumber(split[02])
1741 local UID_03 = tonumber(split[03])
1742 local UID_04 = tonumber(split[04])
1743 local UID_05 = tonumber(split[05])
1744 local UID_06 = tonumber(split[06])
1745 local UID_07 = tonumber(split[07])
1746 local UID_08 = tonumber(split[08])
1747 local UID_09 = tonumber(split[09])
1748 local UID_10 = tonumber(split[10])
1749 local SLOT = tonumber(split[11])
1750
1751 box_4:setText("")
1752 box_4:setIcon('/images/custom/Items/' ..UID_01)
1753 box_4:setImageSource('/images/custom/UI/rare_' ..UID_02)
1754 box_4.onMouseRelease = function(widget, mousePos, mouseButton)
1755 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1756 return
1757 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1758 local menu = g_ui.createWidget('PopupMenu')
1759 menu:addOption(tr("Remover"), function()
1760 CAIXA_MENSAGEM[00].BOX_4 = ""
1761 onNoticeConfig(05, "00")
1762 end)
1763 menu:display()
1764 end
1765 end
1766 if SLOT == 1 or SLOT == 7 then
1767 box_4:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1768 elseif SLOT == 4 then
1769 box_4:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1770 elseif SLOT == 03 then
1771 box_4:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1772 if UID_04 > 0 then
1773 if UID_04 < 10 then
1774 box_4:setText("0" ..UID_04)
1775 else
1776 box_4:setText(UID_04)
1777 end
1778 else
1779 box_4:setText("")
1780 end
1781 else
1782 box_4:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1783 end
1784 else
1785 box_4:setIcon('/images/custom/Items/0')
1786 box_4:setImageSource('/images/custom/UI/item_slot')
1787 box_4:setTooltip('')
1788 box_4:setText("")
1789 box_4.onMouseRelease = function(widget, mousePos, mouseButton)
1790 if (widget:containsPoint(mousePos) and mouseButton == MouseLeftButton) then
1791 return
1792 elseif (widget:containsPoint(mousePos) and mouseButton == MouseRightButton) then
1793 return
1794 end
1795 end
1796 end
1797 end
1798 if type == 07 then
1799 if CAIXA_MENSAGEM[value].BOX_1 ~= "0" then
1800 local split = string.explode(CAIXA_MENSAGEM[value].BOX_1, "-")
1801 local UID_01 = tonumber(split[01])
1802 local UID_02 = tonumber(split[02])
1803 local UID_03 = tonumber(split[03])
1804 local UID_04 = tonumber(split[04])
1805 local UID_05 = tonumber(split[05])
1806 local UID_06 = tonumber(split[06])
1807 local UID_07 = tonumber(split[07])
1808 local UID_08 = tonumber(split[08])
1809 local UID_09 = tonumber(split[09])
1810 local UID_10 = tonumber(split[10])
1811 local SLOT = tonumber(split[11])
1812
1813 mainBox_1:setText("")
1814 mainBox_1:setIcon('/images/custom/Items/' ..UID_01)
1815 mainBox_1:setImageSource('/images/custom/UI/rare_' ..UID_02)
1816 if SLOT == 1 or SLOT == 7 then
1817 mainBox_1:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1818 elseif SLOT == 4 then
1819 mainBox_1:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1820 elseif SLOT == 03 then
1821 mainBox_1:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1822 if UID_04 > 0 then
1823 if UID_04 < 10 then
1824 mainBox_1:setText("0" ..UID_04)
1825 else
1826 mainBox_1:setText(UID_04)
1827 end
1828 else
1829 mainBox_1:setText("")
1830 end
1831 else
1832 mainBox_1:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1833 end
1834 else
1835 mainBox_1:setIcon('/images/custom/Items/0')
1836 mainBox_1:setImageSource('/images/custom/UI/item_slot')
1837 mainBox_1:setTooltip('')
1838 mainBox_1:setText("")
1839 end
1840 if CAIXA_MENSAGEM[value].BOX_2 ~= "0" then
1841 local split = string.explode(CAIXA_MENSAGEM[value].BOX_2, "-")
1842 local UID_01 = tonumber(split[01])
1843 local UID_02 = tonumber(split[02])
1844 local UID_03 = tonumber(split[03])
1845 local UID_04 = tonumber(split[04])
1846 local UID_05 = tonumber(split[05])
1847 local UID_06 = tonumber(split[06])
1848 local UID_07 = tonumber(split[07])
1849 local UID_08 = tonumber(split[08])
1850 local UID_09 = tonumber(split[09])
1851 local UID_10 = tonumber(split[10])
1852 local SLOT = tonumber(split[11])
1853
1854 mainBox_2:setText("")
1855 mainBox_2:setIcon('/images/custom/Items/' ..UID_01)
1856 mainBox_2:setImageSource('/images/custom/UI/rare_' ..UID_02)
1857 if SLOT == 1 or SLOT == 7 then
1858 mainBox_2:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1859 elseif SLOT == 4 then
1860 mainBox_2:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1861 elseif SLOT == 03 then
1862 mainBox_2:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1863 if UID_04 > 0 then
1864 if UID_04 < 10 then
1865 mainBox_2:setText("0" ..UID_04)
1866 else
1867 mainBox_2:setText(UID_04)
1868 end
1869 else
1870 mainBox_2:setText("")
1871 end
1872 else
1873 mainBox_2:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1874 end
1875 else
1876 mainBox_2:setIcon('/images/custom/Items/0')
1877 mainBox_2:setImageSource('/images/custom/UI/item_slot')
1878 mainBox_2:setTooltip('')
1879 mainBox_2:setText("")
1880 end
1881 if CAIXA_MENSAGEM[value].BOX_3 ~= "0" then
1882 local split = string.explode(CAIXA_MENSAGEM[value].BOX_3, "-")
1883 local UID_01 = tonumber(split[01])
1884 local UID_02 = tonumber(split[02])
1885 local UID_03 = tonumber(split[03])
1886 local UID_04 = tonumber(split[04])
1887 local UID_05 = tonumber(split[05])
1888 local UID_06 = tonumber(split[06])
1889 local UID_07 = tonumber(split[07])
1890 local UID_08 = tonumber(split[08])
1891 local UID_09 = tonumber(split[09])
1892 local UID_10 = tonumber(split[10])
1893 local SLOT = tonumber(split[11])
1894
1895 mainBox_3:setText("")
1896 mainBox_3:setIcon('/images/custom/Items/' ..UID_01)
1897 mainBox_3:setImageSource('/images/custom/UI/rare_' ..UID_02)
1898 if SLOT == 1 or SLOT == 7 then
1899 mainBox_3:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1900 elseif SLOT == 4 then
1901 mainBox_3:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1902 elseif SLOT == 03 then
1903 mainBox_3:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1904 if UID_04 > 0 then
1905 if UID_04 < 10 then
1906 mainBox_3:setText("0" ..UID_04)
1907 else
1908 mainBox_3:setText(UID_04)
1909 end
1910 else
1911 mainBox_3:setText("")
1912 end
1913 else
1914 mainBox_3:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1915 end
1916 else
1917 mainBox_3:setIcon('/images/custom/Items/0')
1918 mainBox_3:setImageSource('/images/custom/UI/item_slot')
1919 mainBox_3:setTooltip('')
1920 mainBox_3:setText("")
1921 end
1922 if CAIXA_MENSAGEM[value].BOX_4 ~= "0" then
1923 local split = string.explode(CAIXA_MENSAGEM[value].BOX_4, "-")
1924 local UID_01 = tonumber(split[01])
1925 local UID_02 = tonumber(split[02])
1926 local UID_03 = tonumber(split[03])
1927 local UID_04 = tonumber(split[04])
1928 local UID_05 = tonumber(split[05])
1929 local UID_06 = tonumber(split[06])
1930 local UID_07 = tonumber(split[07])
1931 local UID_08 = tonumber(split[08])
1932 local UID_09 = tonumber(split[09])
1933 local UID_10 = tonumber(split[10])
1934 local SLOT = tonumber(split[11])
1935
1936 mainBox_4:setText("")
1937 mainBox_4:setIcon('/images/custom/Items/' ..UID_01)
1938 mainBox_4:setImageSource('/images/custom/UI/rare_' ..UID_02)
1939 if SLOT == 1 or SLOT == 7 then
1940 mainBox_4:setTooltip("@JOIAS " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_05.. " " ..UID_09)
1941 elseif SLOT == 4 then
1942 mainBox_4:setTooltip("@GUN " ..UID_01.. " " ..UID_04.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_03.. " " ..UID_02.. " " ..UID_10.. " " ..UID_09)
1943 elseif SLOT == 03 then
1944 mainBox_4:setTooltip("@BAG " ..UID_01.. " " ..UID_03.. " " ..UID_02.. " " ..UID_04.. " " ..UID_09)
1945 if UID_04 > 0 then
1946 if UID_04 < 10 then
1947 mainBox_4:setText("0" ..UID_04)
1948 else
1949 mainBox_4:setText(UID_04)
1950 end
1951 else
1952 mainBox_4:setText("")
1953 end
1954 else
1955 mainBox_4:setTooltip("@EQUIP " ..UID_01.. " " ..UID_03.. " " ..UID_05.. " " ..UID_06.. " " ..UID_07.. " " ..UID_02.. " " ..UID_09)
1956 end
1957 else
1958 mainBox_4:setIcon('/images/custom/Items/0')
1959 mainBox_4:setImageSource('/images/custom/UI/item_slot')
1960 mainBox_4:setTooltip('')
1961 mainBox_4:setText("")
1962 end
1963 end
1964 if type == 08 then
1965 mainBox_1:setIcon('/images/custom/Items/0')
1966 mainBox_1:setImageSource('/images/custom/UI/item_slot')
1967 mainBox_1:setTooltip('')
1968 mainBox_1:setText("")
1969
1970 mainBox_2:setIcon('/images/custom/Items/0')
1971 mainBox_2:setImageSource('/images/custom/UI/item_slot')
1972 mainBox_2:setTooltip('')
1973 mainBox_2:setText("")
1974
1975 mainBox_3:setIcon('/images/custom/Items/0')
1976 mainBox_3:setImageSource('/images/custom/UI/item_slot')
1977 mainBox_3:setTooltip('')
1978 mainBox_3:setText("")
1979
1980 mainBox_4:setIcon('/images/custom/Items/0')
1981 mainBox_4:setImageSource('/images/custom/UI/item_slot')
1982 mainBox_4:setTooltip('')
1983 mainBox_4:setText("")
1984 end
1985 if type == 09 then
1986 playerLabel:hide()
1987 destinatarioLabel:hide()
1988 box_1:hide()
1989 box_2:hide()
1990 box_3:hide()
1991 box_4:hide()
1992 destinatarioLabel:setText('')
1993 titleText:setText('')
1994 titleText:focus()
1995 messageText:setText('')
1996 MSG_TYPE = 01
1997
1998 local maxTitle = 30
1999 local maxMsg = 250
2000 local TitleChance = function(self, value)
2001 local Quant = titleText:getText()
2002 if #Quant > maxTitle then
2003 local LastStr = string.sub(Quant, 1, maxTitle)
2004 titleText:setText(LastStr)
2005 return
2006 end
2007 end
2008 titleText.onTextChange = TitleChance
2009 local MsgChance = function(self, value)
2010 local Quant = messageText:getText()
2011 if #Quant > maxMsg then
2012 local LastStr = string.sub(Quant, 1, maxMsg)
2013 messageText:setText(LastStr)
2014 return
2015 end
2016 end
2017 messageText.onTextChange = MsgChance
2018
2019 CAIXA_MENSAGEM[00].BOX_1 = ""
2020 CAIXA_MENSAGEM[00].BOX_2 = ""
2021 CAIXA_MENSAGEM[00].BOX_3 = ""
2022 CAIXA_MENSAGEM[00].BOX_4 = ""
2023 typeCombo:setText(tr("Reportar um bug"))
2024 typeCombo:setOption(tr("Reportar um bug"), "01")
2025 typeCombo:enable()
2026 playerLabel:hide()
2027 destinatarioLabel:hide()
2028 destinatarioLabel:setText('')
2029 titleText:focus(true)
2030 ANEXAR_MESSAGE = false
2031 onNoticeConfig(06)
2032 sendMessageWindow:show()
2033 end
2034end
2035
2036function setMsgType(value)
2037 MSG_TYPE = tonumber(value)
2038end
2039function onChangeMsgType(comboBox, option, value)
2040 setMsgType(value:lower())
2041end
2042
2043function show()
2044 if noticePanel:isVisible() then
2045 return
2046 end
2047 onNoticeConfig(01)
2048end
2049function closer()
2050 noticePanel:hide()
2051 ANEXAR_MESSAGE = false
2052end
2053function offline()
2054 noticePanel:hide()
2055 ANEXAR_MESSAGE = false
2056end
2057function terminate()
2058 disconnect(g_game, {
2059 disconnect(g_game, 'onTextMessage', onNoticePanel),
2060 })
2061 ANEXAR_MESSAGE = false
2062 g_keyboard.unbindKeyDown(HOTKEY, modules.game_interface.getRootPanel())
2063 ProtocolGame.unregisterExtendedOpcode(MESSAGE_BOX)
2064 disconnect(g_game, { onGameEnd = offline })
2065 noticePanel:destroy()
2066end
2067
Top