-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.py
2306 lines (1962 loc) · 111 KB
/
App.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import sys
import http.client
from urllib import parse
import json
import heapq
import random
import os
import sys
import time
import math
import winsound
import logging
import traceback
from PyQt5.QtWidgets import *
from PyQt5 import uic
from io import BytesIO
from PIL import Image
from PyQt5.QtGui import QIcon, QPixmap, QImage
from PyQt5.QtCore import QDateTime, Qt
from PyQt5.QtCore import QTimer
def resource_path(relative_path):
base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
return os.path.join(base_path, relative_path)
def make_link_label_txt(link, tag):
llt = '<a href="' + link + '">' + tag + '</a>'
return llt
def is_int_number(val):
int_num_flag = True
try:
num = int(val)
if (math.isnan(num)):
int_num_flag = False
else:
if (num >= 10 and num <= 7200):
int_num_flag = True
else:
int_num_flag = False
except:
int_num_flag = False
return int_num_flag
# NOTSET, DEBUG, INFO, ERROR, CRITICAL
logging.basicConfig(filename="log/MSp1n9util_ERROR.log", level=logging.ERROR)
form = resource_path("resources/ui/MSp1n9ui.ui")
form_class = uic.loadUiType(form)[0]
class WindowClass(QMainWindow, form_class):
def __init__(self) :
super().__init__()
self.setupUi(self)
self.setWindowIcon(QIcon(resource_path("resources/icon/favicon.ico")))
self.datetime = QDateTime.currentDateTime()
self.lb_livetime.setText(self.datetime.toString('hh:mm:ss - yy년 MM월 dd일'))
self.livetime_timer = QTimer(self)
self.livetime_timer.setInterval(1000)
self.livetime_timer.timeout.connect(self.display_livetime)
self.livetime_timer.start()
self.setFixedSize(1600, 900)
self.cb_prog_tab_hide.stateChanged.connect(self.ui_checbox_changed)
self.cb_prog_mini.stateChanged.connect(self.ui_checbox_changed)
self.cb_prog_on_top.stateChanged.connect(self.ui_checbox_changed)
self.tab_main.setCurrentIndex(0)
self.wa_wav_list = [
"p",
resource_path("resources/snd/wa_skill1.wav"), #1 short
resource_path("resources/snd/wa_skill2.wav"), #2
resource_path("resources/snd/wa_skill3.wav"), #3
resource_path("resources/snd/wa_skill4.wav"), #4
resource_path("resources/snd/wa_skill5.wav"), #5
resource_path("resources/snd/wa_skill6.wav"), #6
resource_path("resources/snd/wa_10m.wav"), #7
resource_path("resources/snd/wa_20m.wav"), #8
resource_path("resources/snd/wa_1h.wav"), #9
resource_path("resources/snd/wa_2h.wav"), #10
resource_path("resources/snd/wa_30m.wav"), #11 long
resource_path("resources/snd/wa_15m.wav"), #12
resource_path("resources/snd/wa_ealarm.wav"), #13
resource_path("resources/snd/wa_palarm.wav"), #14
resource_path("resources/snd/wa_100s.wav"), #15
]
# tab_boss_kalos_wav_list
self.b_kalos_wav_list = [
"p",
resource_path("resources/snd/boss_kalos_sa10.wav"), #1
resource_path("resources/snd/boss_kalos_sa5.wav"), #2
resource_path("resources/snd/boss_kalos_breath.wav"), #3
resource_path("resources/snd/boss_kalos_right.wav"), #4
resource_path("resources/snd/boss_kalos_left.wav"), #5
resource_path("resources/snd/boss_kalos_if10.wav"), #6
resource_path("resources/snd/boss_kalos_if5.wav"), #7
]
# tab_watimer
self.wa_alarm_heap = []
self.txt_wa_s1.returnPressed.connect(self.clicked_btn_wa_s1)
self.btn_wa_s1.clicked.connect(self.clicked_btn_wa_s1)
self.cb_wa_s1.stateChanged.connect(self.skill_checkbox_changed)
self.txt_wa_s2.returnPressed.connect(self.clicked_btn_wa_s2)
self.btn_wa_s2.clicked.connect(self.clicked_btn_wa_s2)
self.cb_wa_s2.stateChanged.connect(self.skill_checkbox_changed)
self.txt_wa_s3.returnPressed.connect(self.clicked_btn_wa_s3)
self.btn_wa_s3.clicked.connect(self.clicked_btn_wa_s3)
self.cb_wa_s3.stateChanged.connect(self.skill_checkbox_changed)
self.txt_wa_s4.returnPressed.connect(self.clicked_btn_wa_s4)
self.btn_wa_s4.clicked.connect(self.clicked_btn_wa_s4)
self.cb_wa_s4.stateChanged.connect(self.skill_checkbox_changed)
self.txt_wa_s5.returnPressed.connect(self.clicked_btn_wa_s5)
self.btn_wa_s5.clicked.connect(self.clicked_btn_wa_s5)
self.cb_wa_s5.stateChanged.connect(self.skill_checkbox_changed)
self.txt_wa_s6.returnPressed.connect(self.clicked_btn_wa_s6)
self.btn_wa_s6.clicked.connect(self.clicked_btn_wa_s6)
self.cb_wa_s6.stateChanged.connect(self.skill_checkbox_changed)
self.wa_alarm_timer = QTimer(self)
self.wa_alarm_timer.setInterval(1000)
self.wa_alarm_timer.timeout.connect(self.activate_wa_alarm_timer)
self.wa_timer = QTimer(self)
self.wa_timer.setInterval(1000)
self.wa_timer.timeout.connect(self.activate_wa_timer)
self.btn_wa_start.clicked.connect(self.clicked_btn_wa_start)
self.btn_wa_stop.clicked.connect(self.clicked_btn_wa_stop)
self.wa_cnt = 0
self.wa_pb_val = 0
self.wa_total = 0
self.wa_ss = 0
self.wa_mm = 0
self.wa_hh = 0
self.wa_s1_ss = -1
self.wa_s2_ss = -1
self.wa_s3_ss = -1
self.wa_s4_ss = -1
self.wa_s5_ss = -1
self.wa_s6_ss = -1
self.wa_etimer = QTimer(self)
self.wa_etimer.setInterval(1000)
self.wa_etimer.timeout.connect(self.activate_wa_etimer)
self.btn_wa_estart.clicked.connect(self.clicked_btn_wa_estart)
self.btn_wa_estop.clicked.connect(self.clicked_btn_wa_estop)
self.btn_wa_eclear.clicked.connect(self.clicked_btn_wa_eclear)
self.wa_ecnt = 0
self.wa_etotal = 0
self.wa_ess = 0
self.wa_emm = 0
self.wa_ehh = 0
self.wa_ptimer = QTimer(self)
self.wa_ptimer.setInterval(1000)
self.wa_ptimer.timeout.connect(self.activate_wa_ptimer)
self.btn_wa_pstart.clicked.connect(self.clicked_btn_wa_pstart)
self.btn_wa_pstop.clicked.connect(self.clicked_btn_wa_pstop)
self.btn_wa_preset.clicked.connect(self.clicked_btn_wa_preset)
self.btn_wa_ppm.clicked.connect(self.clicked_btn_btn_wa_ppm)
self.btn_wa_epm.clicked.connect(self.clicked_btn_btn_wa_epm)
self.btn_wa_fwm.clicked.connect(self.clicked_btn_btn_wa_fwm)
self.btn_wa_ppp.clicked.connect(self.clicked_btn_btn_wa_ppp)
self.btn_wa_epp.clicked.connect(self.clicked_btn_btn_wa_epp)
self.btn_wa_fwp.clicked.connect(self.clicked_btn_btn_wa_fwp)
self.wa_pss = 90
self.wa_pflag = 1
self.wa_pp_cnt = 15
self.wa_ep_cnt = 5
self.wa_fw_cnt = 5
# tab_search
api_key_file = open("nexon_api_key/api_key_lts.txt", 'r')
api_key_data = api_key_file.read()
self.keys = api_key_data
self.headers = {
'accept': 'application/json',
'x-nxopen-api-key': str(self.keys)
}
self.lb_api_key.setText('API키: ' + self.keys)
api_key_file.close()
self.txt_api_key.returnPressed.connect(self.clicked_btn_api_key_input)
self.btn_api_key_input.clicked.connect(self.clicked_btn_api_key_input)
s_arcane_img = QPixmap(resource_path("resources/img/stat_arcane.png"))
self.lb_s_arcane.setPixmap(s_arcane_img)
s_authentic_img = QPixmap(resource_path("resources/img/stat_authentic.png"))
self.lb_s_authentic.setPixmap(s_authentic_img)
s_drop_img = QPixmap(resource_path("resources/img/stat_drop.png"))
self.lb_s_drop.setPixmap(s_drop_img)
s_exp_img = QPixmap(resource_path("resources/img/stat_exp.png"))
self.lb_s_exp.setPixmap(s_exp_img)
s_meso_img = QPixmap(resource_path("resources/img/stat_meso.png"))
self.lb_s_meso.setPixmap(s_meso_img)
s_normd_img = QPixmap(resource_path("resources/img/stat_normd.png"))
self.lb_s_normd.setPixmap(s_normd_img)
s_starforce_img = QPixmap(resource_path("resources/img/stat_starforce.png"))
self.lb_s_starforce.setPixmap(s_starforce_img)
self.txt_c_name.returnPressed.connect(self.clicked_btn_c_search)
self.btn_c_search.clicked.connect(self.clicked_btn_c_search)
self.lb_api_guide.setText(make_link_label_txt('https://github.com/p1n9u/MapleStory-p1n9u-Utils/blob/main/nexon_api_key_guide/README.md', '발급방법'))
self.lb_api_guide.setOpenExternalLinks(True)
# tab_info_ward
self.lb_l_ghome.setText(make_link_label_txt('https://maplestory.nexon.com/Home/Main', '메이플 공홈'))
self.lb_l_ghome.setOpenExternalLinks(True)
self.lb_l_gyt.setText(make_link_label_txt('https://www.youtube.com/@MapleStoryKR', '메이플 유튜브'))
self.lb_l_gyt.setOpenExternalLinks(True)
self.lb_l_dorosi.setText(make_link_label_txt('https://m.inven.co.kr/board/maple/2314?stype=nickname&svalue=%EB%A7%88%EB%B9%A1%EB%8F%84%EB%A1%9C%EC%8B%9C', '인벤m 마빡도로시'))
self.lb_l_dorosi.setOpenExternalLinks(True)
self.lb_l_malgum.setText(make_link_label_txt('https://www.youtube.com/@Malgum.', '맑음 유튜브'))
self.lb_l_malgum.setOpenExternalLinks(True)
self.lb_l_seollal.setText(make_link_label_txt('https://seollal.tistory.com/category/%EB%A9%94%EC%9D%B4%ED%94%8C%EC%8A%A4%ED%86%A0%EB%A6%AC', '한설날 티스토리 블로그'))
self.lb_l_seollal.setOpenExternalLinks(True)
self.lb_l_maplegg.setText(make_link_label_txt('https://maple.gg/', '메이플 지지 - 종합 통계'))
self.lb_l_maplegg.setOpenExternalLinks(True)
self.lb_l_mscouter.setText(make_link_label_txt('https://maplescouter.com/', '환산 주스탯'))
self.lb_l_mscouter.setOpenExternalLinks(True)
self.lb_l_chuchugg.setText(make_link_label_txt('https://chuchu.gg/starforce', '츄츄 지지 - 스타포스 히스토리'))
self.lb_l_chuchugg.setOpenExternalLinks(True)
self.lb_l_msupport.setText(make_link_label_txt('https://maple.support/', '메이플 서포트 - 큐브 히스토리'))
self.lb_l_msupport.setOpenExternalLinks(True)
self.lb_l_mavg.setText(make_link_label_txt('http://mapleaverage.dothome.co.kr/', '메이플 평균'))
self.lb_l_mavg.setOpenExternalLinks(True)
self.lb_l_guildreal.setText(make_link_label_txt('https://guildbon.github.io/', '길드원 본캐 찾기'))
self.lb_l_guildreal.setOpenExternalLinks(True)
self.lb_l_guildatk.setText(make_link_label_txt('https://www.yegangs.com/guildbon/', '길드원 전투력 스카우터'))
self.lb_l_guildatk.setOpenExternalLinks(True)
self.lb_l_nicklog.setText(make_link_label_txt('https://mapleagency.kr/', '닉네임 변경 로그'))
self.lb_l_nicklog.setOpenExternalLinks(True)
self.lb_l_badtradelog.setText(make_link_label_txt('https://faladine.com/main', '사기꾼 로그'))
self.lb_l_badtradelog.setOpenExternalLinks(True)
self.lb_l_unioncal.setText(make_link_label_txt('https://xenogents.github.io/LegionSolver/', '유니온 배치 계산기'))
self.lb_l_unioncal.setOpenExternalLinks(True)
self.lb_l_corecal.setText(make_link_label_txt('https://shalchoong.tistory.com/80', '5차 중첩 코강 계산기'))
self.lb_l_corecal.setOpenExternalLinks(True)
self.lb_l_bstonecal.setText(make_link_label_txt('https://boss.lastchan.kr/', '주보 결정 계산기'))
self.lb_l_bstonecal.setOpenExternalLinks(True)
self.lb_l_hmesocal.setText(make_link_label_txt('https://mapleroad.kr/utils/poa', '사냥 메소 계산기'))
self.lb_l_hmesocal.setOpenExternalLinks(True)
self.lb_l_heffcal.setText(make_link_label_txt('https://betweenmoon.github.io/maple_hyper/HTML/calcLevelUp.html', '사냥터 효율 계산기'))
self.lb_l_heffcal.setOpenExternalLinks(True)
self.lb_l_lpotioncal.setText(make_link_label_txt('https://maple.gazua.in/exp', '성장의 비약 계산기'))
self.lb_l_lpotioncal.setOpenExternalLinks(True)
self.lb_l_srangecal.setText(make_link_label_txt('https://icepeng.github.io/maple-calc/skill', '스킬 범위 계산기'))
self.lb_l_srangecal.setOpenExternalLinks(True)
self.lb_l_speceffcal.setText(make_link_label_txt('https://maplestats.com/home', '스펙 투자 효율 계산기'))
self.lb_l_speceffcal.setOpenExternalLinks(True)
self.lb_l_symhexcal.setText(make_link_label_txt('https://maple-util.web.app/hexa-calculator', '헥사스킬/심볼 계산기'))
self.lb_l_symhexcal.setOpenExternalLinks(True)
self.lb_l_artical.setText(make_link_label_txt('https://www.inven.co.kr/board/maple/2304/37006', '아티팩트 레벨업 계산기'))
self.lb_l_artical.setOpenExternalLinks(True)
self.lb_l_ucoincal.setText(make_link_label_txt('https://gubbib.github.io/MapleUnionCoin/', '유니온 코인 계산기'))
self.lb_l_ucoincal.setOpenExternalLinks(True)
self.lb_l_hstatcal.setText(make_link_label_txt('https://mapleroad.kr/utils/hstat', '하이퍼 스탯 계산기'))
self.lb_l_hstatcal.setOpenExternalLinks(True)
self.lb_l_surocal.setText(make_link_label_txt('https://141.kr/suro', '수로-무릉 환산기'))
self.lb_l_surocal.setOpenExternalLinks(True)
self.lb_l_problist.setText(make_link_label_txt('https://maplestory.nexon.com/Guide/CashShop/Probability/RoyalStyle', '메이플 공홈 - 가이드(확률)'))
self.lb_l_problist.setOpenExternalLinks(True)
self.lb_l_mmarket.setText(make_link_label_txt('https://xn--hz2b1j494a9mhnwh.com/', '메이플 경매장 - 메이플마켓.com'))
self.lb_l_mmarket.setOpenExternalLinks(True)
self.lb_l_mstime.setText(make_link_label_txt('https://time.navyism.com/?host=maplestory.nexon.com', '메이플 서버 시간 - 네이비즘'))
self.lb_l_mstime.setOpenExternalLinks(True)
self.lb_l_artiopti.setText(make_link_label_txt('https://m.inven.co.kr/board/maple/2304/36811', '아티팩트 최적 포인트 분배(정배)'))
self.lb_l_artiopti.setOpenExternalLinks(True)
self.lb_l_seedhelp.setText(make_link_label_txt('https://mapleutils.com/ko/seed/22', '더 시드 도우미'))
self.lb_l_seedhelp.setOpenExternalLinks(True)
self.lb_l_mcollhelp.setText(make_link_label_txt('https://www.moncol.kr/', '몬컬 도우미'))
self.lb_l_mcollhelp.setOpenExternalLinks(True)
self.lb_l_cweekhelp.setText(make_link_label_txt('https://maple.gg/info/muto', '츄츄 주간 도우미'))
self.lb_l_cweekhelp.setOpenExternalLinks(True)
self.lb_l_rweekhelp.setText(make_link_label_txt('https://in-fo.github.io/midnight-chaser-helper/', '레헬른 주간 도우미'))
self.lb_l_rweekhelp.setOpenExternalLinks(True)
self.lb_l_eweekhelp.setText(make_link_label_txt('https://mapleroad.kr/utils/esfera', '에스페라 주간 도우미'))
self.lb_l_eweekhelp.setOpenExternalLinks(True)
self.lb_l_puzzlemhelp.setText(make_link_label_txt('https://qr96.github.io/Puzzle-Master/', '퍼즐 마스터 도우미'))
self.lb_l_puzzlemhelp.setOpenExternalLinks(True)
self.lb_l_aopsimul.setText(make_link_label_txt('https://bnbmupload.github.io/maplerebirthflame/', '추옵 시뮬레이터'))
self.lb_l_aopsimul.setOpenExternalLinks(True)
self.lb_l_starsimul.setText(make_link_label_txt('https://mesu.live/sim/starforce', '스타포스 시뮬레이터'))
self.lb_l_starsimul.setOpenExternalLinks(True)
self.lb_l_cubesimul.setText(make_link_label_txt('https://cubemesu.co/', '큐브 시뮬레이터'))
self.lb_l_cubesimul.setOpenExternalLinks(True)
self.lb_l_hexasimul.setText(make_link_label_txt('https://memoday.github.io/hexaStat_Simulator/', '헥사스탯 시뮬레이터'))
self.lb_l_hexasimul.setOpenExternalLinks(True)
self.lb_l_gatchasimul.setText(make_link_label_txt('https://ganjang-chichen.github.io/BlackCow_Defender/', '가챠 시뮬레이터'))
self.lb_l_gatchasimul.setOpenExternalLinks(True)
self.lb_l_royalsimul.setText(make_link_label_txt('https://maple.gazua.in/', '로얄 시뮬레이터'))
self.lb_l_royalsimul.setOpenExternalLinks(True)
self.lb_l_dmgssimul.setText(make_link_label_txt('https://0407chan.github.io/maple-demage-skin-simulator/', '뎀스 시뮬레이터'))
self.lb_l_dmgssimul.setOpenExternalLinks(True)
self.lb_l_coordisimul.setText(make_link_label_txt('https://maple.gazua.in/coordi', '코디 시뮬레이터'))
self.lb_l_coordisimul.setOpenExternalLinks(True)
self.lb_l_lvsimul.setText(make_link_label_txt('https://ksw04052.github.io/levelsim/', '레벨 시뮬레이터(old)'))
self.lb_l_lvsimul.setOpenExternalLinks(True)
self.lb_l_itemsimul.setText(make_link_label_txt('https://itemsim.pages.dev/', '아이템 시뮬레이터'))
self.lb_l_itemsimul.setOpenExternalLinks(True)
# tab_copyrights
cr_nexon_logo_img = QPixmap(resource_path("resources/img/nexon_logo.png"))
self.lb_cr_nexon_logo.setPixmap(cr_nexon_logo_img)
self.lb_cr_api.setText(make_link_label_txt('https://openapi.nexon.com/support/terms/', 'Data based on NEXON Open API'))
self.lb_cr_api.setOpenExternalLinks(True)
cr_server_logo_img = QPixmap(resource_path("resources/img/server_logo.png"))
self.lb_cr_thx_serverimg.setPixmap(cr_server_logo_img)
cr_git_logo_img = QPixmap(resource_path("resources/img/git_logo.png"))
self.lb_cr_dev_gitimg.setPixmap(cr_git_logo_img)
cr_guild_logo_img = QPixmap(resource_path("resources/img/guild_logo.png"))
self.lb_cr_thx_guildimg.setPixmap(cr_guild_logo_img)
cr_lic_img = QPixmap(resource_path("resources/img/repo_license.png"))
self.lb_cr_licimg.setPixmap(cr_lic_img)
boss_kalos_img = QPixmap(resource_path("resources/img/easy_evade.png"))
self.lb_boss_kalos_img.setPixmap(boss_kalos_img)
self.lb_cr_font.setText(make_link_label_txt('https://maplestory.nexon.com/Media/Font', 'Font'))
self.lb_cr_font.setOpenExternalLinks(True)
self.lb_cr_music1.setText(make_link_label_txt('https://www.youtube.com/watch?v=ixww1OHztbs', 'Music1'))
self.lb_cr_music1.setOpenExternalLinks(True)
self.lb_cr_music2.setText(make_link_label_txt('https://maplestory.nexon.com/Media/Music', 'Music2'))
self.lb_cr_music2.setOpenExternalLinks(True)
self.lb_cr_music3.setText(make_link_label_txt('https://downloads.khinsider.com/game-soundtracks/album/maplestory-music', 'Music3'))
self.lb_cr_music3.setOpenExternalLinks(True)
self.lb_cr_tts.setText(make_link_label_txt('https://xn--yq5bk9r.com/blog/text-speech-download', 'TTS'))
self.lb_cr_tts.setOpenExternalLinks(True)
self.lb_cr_dev_gitlink.setText(make_link_label_txt('https://github.com/p1n9u/MapleStory-p1n9u-Utils', 'Repo'))
self.lb_cr_dev_gitlink.setOpenExternalLinks(True)
self.lb_cr_dune.setText(make_link_label_txt('https://www.inven.co.kr/board/maple/2299/9759968', '듄쌤티콘'))
self.lb_cr_dune.setOpenExternalLinks(True)
# tab_boss_web
self.lb_bw_black.setText(make_link_label_txt('https://ksw04052.github.io/blackmage/', '검은 마법사'))
self.lb_bw_black.setOpenExternalLinks(True)
self.lb_bw_jin1.setText(make_link_label_txt('https://jhanoo.github.io/JinHilla/', '진힐라 (화면공유 O)'))
self.lb_bw_jin1.setOpenExternalLinks(True)
self.lb_bw_jin2.setText(make_link_label_txt('https://jsfiddle.net/isaac917/6zdacrox/9/show', '진힐라 (화면공유 X)'))
self.lb_bw_jin2.setOpenExternalLinks(True)
self.lb_bw_kal1.setText(make_link_label_txt('https://hhykim.github.io/KalosTimer/', '칼로스 (화면공유 O)'))
self.lb_bw_kal1.setOpenExternalLinks(True)
self.lb_bw_kal2.setText(make_link_label_txt('http://kalos.dothome.co.kr/', '칼로스 (화면공유 X)'))
self.lb_bw_kal2.setOpenExternalLinks(True)
# tab_boss_kalos
self.boss_kalos_alarm_heap = []
# phase: 1
self.boss_kalos_previous_phase = 0
self.boss_kalos_current_phase = 0
self.is_boss_kalos_changed_phase = 0
self.btn_kalos_start.clicked.connect(self.clicked_btn_kalos_start)
self.btn_kalos_reset.clicked.connect(self.clicked_btn_kalos_reset)
self.btn_kalos_stop.clicked.connect(self.clicked_btn_kalos_stop)
self.boss_kalos_main_timer = QTimer(self)
self.boss_kalos_main_timer.setInterval(1000)
self.boss_kalos_main_timer.timeout.connect(self.activate_boss_kalos_main_timer)
self.boss_kalos_salvo_timer = QTimer(self)
self.boss_kalos_salvo_timer.setInterval(1000)
self.boss_kalos_salvo_timer.timeout.connect(self.activate_boss_kalos_salvo_timer)
self.boss_kalos_salvo_sec = 0
self.btn_kalos_salvo.clicked.connect(self.clicked_btn_kalos_salvo)
self.btn_kalos_p50s.clicked.connect(self.clicked_btn_kalos_p50s)
self.btn_kalos_p20s.clicked.connect(self.clicked_btn_kalos_p20s)
self.btn_kalos_p10s.clicked.connect(self.clicked_btn_kalos_p10s)
self.btn_kalos_p4s.clicked.connect(self.clicked_btn_kalos_p4s)
self.btn_kalos_m50s.clicked.connect(self.clicked_btn_kalos_m50s)
self.btn_kalos_m20s.clicked.connect(self.clicked_btn_kalos_m20s)
self.btn_kalos_m10s.clicked.connect(self.clicked_btn_kalos_m10s)
self.btn_kalos_m4s.clicked.connect(self.clicked_btn_kalos_m4s)
self.boss_kalos_if_timer = QTimer(self)
self.boss_kalos_if_timer.setInterval(1000)
self.boss_kalos_if_timer.timeout.connect(self.activate_boss_kalos_if_timer)
self.boss_kalos_if_sec = 0
self.btn_kalos_if.clicked.connect(self.clicked_btn_kalos_if)
self.boss_kalos_right_timer = QTimer(self)
self.boss_kalos_right_timer.setInterval(1000)
self.boss_kalos_right_timer.timeout.connect(self.activate_boss_kalos_right_timer)
self.btn_kalos_right_on.clicked.connect(self.clicked_btn_right_on)
self.btn_kalos_right_off.clicked.connect(self.clicked_btn_right_off)
self.boss_kalos_right_sec = 0
self.boss_kalos_left_timer = QTimer(self)
self.boss_kalos_left_timer.setInterval(1000)
self.boss_kalos_left_timer.timeout.connect(self.activate_boss_kalos_left_timer)
self.btn_kalos_left_on.clicked.connect(self.clicked_btn_left_on)
self.btn_kalos_left_off.clicked.connect(self.clicked_btn_left_off)
self.boss_kalos_left_sec = 0
self.boss_kalos_breath_timer = QTimer(self)
self.boss_kalos_breath_timer.setInterval(1000)
self.boss_kalos_breath_timer.timeout.connect(self.activate_boss_kalos_breath_timer)
self.btn_kalos_breath_on.clicked.connect(self.clicked_btn_breath_on)
self.btn_kalos_breath_off.clicked.connect(self.clicked_btn_breath_off)
self.boss_kalos_breath_sec = 1557
self.btn_kalos_phase2_1.clicked.connect(self.clicked_btn_kalos_phase2_1)
self.btn_kalos_phase2_2.clicked.connect(self.clicked_btn_kalos_phase2_2)
self.btn_kalos_phase2_3.clicked.connect(self.clicked_btn_kalos_phase2_3)
####################################################################################################################################################################
# ui main functions
def display_livetime(self):
datetime = QDateTime.currentDateTime()
self.lb_livetime.setText(datetime.toString('hh:mm:ss - yy년 MM월 dd일'))
def ui_checbox_changed(self):
if (self.cb_prog_tab_hide.isChecked() and self.cb_prog_mini.isChecked()):
self.setFixedSize(640, 100)
elif (self.cb_prog_tab_hide.isChecked()):
self.setFixedSize(640, 100)
elif (self.cb_prog_mini.isChecked()):
self.setFixedSize(640, 900)
else:
self.setFixedSize(1600, 900)
if (self.cb_prog_on_top.isChecked()):
self.setWindowFlag(Qt.WindowStaysOnTopHint, True)
self.show()
else:
self.setWindowFlag(Qt.WindowStaysOnTopHint, False)
self.show()
####################################################################################################################################################################
# tab_watimer functions
# wa functions
def skill_checkbox_changed(self):
if ((self.cb_wa_s1.isChecked()) and (not is_int_number(self.wa_s1_ss))):
self.cb_wa_s1.setCheckState(0)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬1]: 올바른 값 설정 필요 - ' + log_num)
if ((self.cb_wa_s2.isChecked()) and (not is_int_number(self.wa_s2_ss))):
self.cb_wa_s2.setCheckState(0)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬2]: 올바른 값 설정 필요 - ' + log_num)
if ((self.cb_wa_s3.isChecked()) and (not is_int_number(self.wa_s3_ss))):
self.cb_wa_s3.setCheckState(0)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬3]: 올바른 값 설정 필요 - ' + log_num)
if ((self.cb_wa_s4.isChecked()) and (not is_int_number(self.wa_s4_ss))):
self.cb_wa_s4.setCheckState(0)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬4]: 올바른 값 설정 필요 - ' + log_num)
if ((self.cb_wa_s5.isChecked()) and (not is_int_number(self.wa_s5_ss))):
self.cb_wa_s5.setCheckState(0)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬5]: 올바른 값 설정 필요 - ' + log_num)
if ((self.cb_wa_s6.isChecked()) and (not is_int_number(self.wa_s6_ss))):
self.cb_wa_s6.setCheckState(0)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬6]: 올바른 값 설정 필요 - ' + log_num)
# wa timer
def clicked_btn_wa_start(self):
self.wa_stop_progress()
self.wa_alarm_timer.start()
self.wa_timer.start()
self.cb_prog_mini.setCheckState(2)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('먼치의 삶 체험 시작 - ' + log_num)
def wa_stop_progress(self):
self.wa_alarm_heap.clear()
self.wa_alarm_timer.stop()
self.wa_timer.stop()
self.wa_cnt = 0
self.wa_total = 0
self.wa_ss = 0
self.wa_mm = 0
self.wa_hh = 0
self.wa_pb_val = 0
self.pb_wa.setValue(0)
def clicked_btn_wa_stop(self):
self.cb_prog_mini.setCheckState(0)
self.wa_stop_progress()
self.lb_wa_time.setText('0:00:00')
self.lb_wa_cnt.setText('0')
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('먼치의 삶 체험 종료 - ' + log_num)
def activate_wa_timer(self):
wa_log_str = ''
self.wa_total += 1
self.wa_ss += 1
self.wa_pb_val += 1
self.pb_wa.setValue(self.wa_pb_val)
if (self.wa_total % 7200 == 0):
self.wa_pb_val = 0
self.pb_wa.setValue(self.wa_pb_val)
if (self.wa_ss == 60):
self.wa_mm += 1
self.wa_ss = 0
if (self.wa_mm == 60):
self.wa_hh += 1
self.wa_mm = 0
wa_time_str = "{0}:{1:02}:{2:02}".format(self.wa_hh, self.wa_mm, self.wa_ss)
self.lb_wa_time.setText(wa_time_str)
# short
if (self.cb_wa_s1.isChecked() and ((self.wa_total + 5) % self.wa_s1_ss) == 0):
heapq.heappush(self.wa_alarm_heap, 1)
wa_log_str += '스킬1 '
if (self.cb_wa_s2.isChecked() and ((self.wa_total + 5) % self.wa_s2_ss) == 0):
heapq.heappush(self.wa_alarm_heap, 2)
wa_log_str += '스킬2 '
if (self.cb_wa_s3.isChecked() and ((self.wa_total + 5) % self.wa_s3_ss) == 0):
heapq.heappush(self.wa_alarm_heap, 3)
wa_log_str += '스킬3 '
if (self.cb_wa_s4.isChecked() and ((self.wa_total + 5) % self.wa_s4_ss) == 0):
heapq.heappush(self.wa_alarm_heap, 4)
wa_log_str += '스킬4 '
if (self.cb_wa_s5.isChecked() and ((self.wa_total + 5) % self.wa_s5_ss) == 0):
heapq.heappush(self.wa_alarm_heap, 5)
wa_log_str += '스킬5 '
if (self.cb_wa_s6.isChecked() and ((self.wa_total + 5) % self.wa_s6_ss) == 0):
heapq.heappush(self.wa_alarm_heap, 6)
wa_log_str += '스킬6 '
if (self.cb_wa_10m.isChecked() and ((self.wa_total + 3) % 600) == 0):
heapq.heappush(self.wa_alarm_heap, 7)
wa_log_str += '10분 '
if (self.cb_wa_20m.isChecked() and ((self.wa_total + 3) % 1200) == 0):
heapq.heappush(self.wa_alarm_heap, 8)
wa_log_str += '20분 '
if (self.cb_wa_1h.isChecked() and ((self.wa_total + 3) % 3600) == 0):
heapq.heappush(self.wa_alarm_heap, 9)
wa_log_str += '1시간 '
if (self.cb_wa_2h.isChecked() and ((self.wa_total + 3) % 7200) == 0):
heapq.heappush(self.wa_alarm_heap, 10)
wa_log_str += '2시간 '
self.wa_cnt += 1
self.lb_wa_cnt.setText(str(self.wa_cnt))
# long
if (self.cb_wa_30m.isChecked() and ((self.wa_total + 3) % 1800) == 0):
heapq.heappush(self.wa_alarm_heap, 11)
wa_log_str += '30분 '
if (self.cb_wa_15m.isChecked() and ((self.wa_total + 3) % 900) == 0):
wa_log_str += '15분 '
if (self.cb_wa_100s.isChecked() and ((self.wa_total + 3) %100) == 0):
wa_log_str += '메소! '
elif (self.cb_wa_15m.isChecked() and ((self.wa_total + 3) % 900) == 0):
heapq.heappush(self.wa_alarm_heap, 12)
wa_log_str += '15분 '
if (self.cb_wa_100s.isChecked() and ((self.wa_total + 3) %100) == 0):
wa_log_str += '메소! '
elif (((self.wa_etotal + 60) % 1800) == 0):
heapq.heappush(self.wa_alarm_heap, 13)
if (self.cb_wa_100s.isChecked() and ((self.wa_total + 3) %100) == 0):
wa_log_str += '메소! '
elif (self.wa_pss == 20 and self.wa_pflag):
heapq.heappush(self.wa_alarm_heap, 14)
if (self.cb_wa_100s.isChecked() and ((self.wa_total + 3) %100) == 0):
wa_log_str += '메소! '
elif (self.cb_wa_100s.isChecked() and ((self.wa_total + 3) %100) == 0):
heapq.heappush(self.wa_alarm_heap, 15)
wa_log_str += '메소! '
# wa alarm timer
def activate_wa_alarm_timer(self):
if (len(self.wa_alarm_heap)):
alarm_num = heapq.heappop(self.wa_alarm_heap)
winsound.PlaySound(self.wa_wav_list[alarm_num], winsound.SND_ASYNC)
# wa exp timer
def clicked_btn_wa_estart(self):
self.wa_estop_progress()
self.wa_etimer.start()
log_num = str(random.randrange(1000, 9999))
self.lb_wa_ecnt.setText('1')
self.txt_wa_log.setPlainText('연뿌 타이머 시작 - ' + log_num)
def wa_estop_progress(self):
self.wa_etimer.stop()
self.wa_etotal = 0
self.wa_ess = 0
self.wa_emm = 0
self.wa_ehh = 0
def clicked_btn_wa_estop(self):
self.wa_estop_progress()
self.lb_wa_etime.setText('0:00:00')
self.lb_wa_ecnt.setText('0')
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('연뿌 타이머 종료 - ' + log_num)
def clicked_btn_wa_eclear(self):
self.te_ememo.clear()
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[경뿌]: 메모장 초기화 완료 - ' + log_num)
def activate_wa_etimer(self):
self.wa_etotal += 1
self.wa_ess += 1
if (self.wa_ess == 60):
self.wa_emm += 1
self.wa_ess = 0
if (self.wa_emm == 60):
self.wa_ehh += 1
self.wa_emm = 0
wa_etime_str = "{0}:{1:02}:{2:02}".format(self.wa_ehh, self.wa_emm, self.wa_ess)
self.lb_wa_etime.setText(wa_etime_str)
if (((self.wa_etotal + 60) % 1800) == 0):
self.wa_ecnt += 1
self.lb_expcnt_value.setText(str(self.wa_ecnt))
# wa portal timer
def clicked_btn_wa_pstart(self):
self.wa_pstop_progress()
self.wa_ptimer.start()
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('포탈 타이머 시작 - ' + log_num)
def wa_pstop_progress(self):
self.wa_ptimer.stop()
self.wa_pflag = 1
self.wa_pss = 90
self.lb_wa_ptime.setText(str(self.wa_pss))
self.lb_wa_ptime.setStyleSheet('color: black;')
def clicked_btn_wa_pstop(self):
self.wa_pstop_progress()
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('포탈 타이머 종료 - ' + log_num)
def activate_wa_ptimer(self):
if (self.wa_pflag):
self.wa_pss -= 1
self.lb_wa_ptime.setText(str(self.wa_pss))
if (self.wa_pss == 0):
self.wa_pflag = 0
self.lb_wa_ptime.setStyleSheet('color: blue;')
else:
self.wa_pss += 1
self.lb_wa_ptime.setText(str(self.wa_pss))
if (self.wa_pss == 45):
self.clicked_btn_wa_pstop()
def clicked_btn_wa_preset(self):
self.wa_pp_cnt = 15
self.lb_wa_pp_cnt.setText(str(self.wa_pp_cnt))
self.wa_ep_cnt = 5
self.lb_wa_ep_cnt.setText(str(self.wa_ep_cnt))
self.wa_fw_cnt = 5
self.lb_wa_fw_cnt.setText(str(self.wa_fw_cnt))
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[포탈]: 카운트 초기화 완료 - ' + log_num)
def clicked_btn_btn_wa_ppm(self):
self.wa_pp_cnt -= 1
if (self.wa_pp_cnt == 1):
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('다음 입장 시 [폴로/프리토/에스페시아] 입장 불가 - ' + log_num)
elif (self.wa_pp_cnt == 0):
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[폴로/프리토/에스페시아]: 입장 불가 - ' + log_num)
elif (self.wa_pp_cnt < 0):
self.wa_pp_cnt = 0
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[폴프]: Stop Press (-) Button - ' + log_num)
self.lb_wa_pp_cnt.setText(str(self.wa_pp_cnt))
def clicked_btn_btn_wa_epm(self):
self.wa_ep_cnt -= 1
if (self.wa_ep_cnt == 1):
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('다음 입장 시 [폴로/프리토/에스페시아] 입장 불가 - ' + log_num)
elif (self.wa_ep_cnt == 0):
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[폴로/프리토/에스페시아]: 입장 불가 - ' + log_num)
elif (self.wa_ep_cnt < 0):
self.wa_ep_cnt = 0
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[에페]: Stop Press (-) Button - ' + log_num)
self.lb_wa_ep_cnt.setText(str(self.wa_ep_cnt))
def clicked_btn_btn_wa_fwm(self):
self.wa_fw_cnt -= 1
if (self.wa_fw_cnt == 1):
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('다음 입장 시 [불늑] 입장 불가 - ' + log_num)
elif (self.wa_fw_cnt == 0):
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[불늑]: 입장 불가 - ' + log_num)
elif (self.wa_fw_cnt < 0):
self.wa_fw_cnt = 0
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[불늑]: Stop Press (-) Button - ' + log_num)
self.lb_wa_fw_cnt.setText(str(self.wa_fw_cnt))
def clicked_btn_btn_wa_ppp(self):
self.wa_pp_cnt += 1
if (self.wa_pp_cnt > 15):
self.wa_pp_cnt = 15
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[폴프]: Stop Press (+) Button - ' + log_num)
self.lb_wa_pp_cnt.setText(str(self.wa_pp_cnt))
def clicked_btn_btn_wa_epp(self):
self.wa_ep_cnt += 1
if (self.wa_ep_cnt > 15):
self.wa_ep_cnt = 15
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[폴프]: Stop Press (+) Button - ' + log_num)
self.lb_wa_ep_cnt.setText(str(self.wa_ep_cnt))
def clicked_btn_btn_wa_fwp(self):
self.wa_fw_cnt += 1
if (self.wa_fw_cnt > 15):
self.wa_fw_cnt = 15
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[폴프]: Stop Press (+) Button - ' + log_num)
self.lb_wa_fw_cnt.setText(str(self.wa_fw_cnt))
# custom skill functions
def clicked_btn_wa_s1(self):
custom_sec = self.txt_wa_s1.text()
if (is_int_number(custom_sec)):
self.lb_wa_s1_sec.setText(custom_sec)
self.wa_s1_ss = int(custom_sec)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬1]: 적용 성공 - ' + log_num)
else:
self.lb_wa_s1_sec.setText('-')
self.wa_s1_ss = -1
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬1]: 양의 정수를 10~7200 (초)단위로 입력 - ' + log_num)
self.txt_wa_s1.clear()
def clicked_btn_wa_s2(self):
custom_sec = self.txt_wa_s2.text()
if (is_int_number(custom_sec)):
self.lb_wa_s2_sec.setText(custom_sec)
self.wa_s2_ss = int(custom_sec)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬2]: 적용 성공 - ' + log_num)
else:
self.lb_wa_s2_sec.setText('-')
self.wa_s2_ss = -1
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬2]: 양의 정수를 10~7200 (초)단위로 입력 - ' + log_num)
self.txt_wa_s2.clear()
def clicked_btn_wa_s3(self):
custom_sec = self.txt_wa_s3.text()
if (is_int_number(custom_sec)):
self.lb_wa_s3_sec.setText(custom_sec)
self.wa_s3_ss = int(custom_sec)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬3]: 적용 성공 - ' + log_num)
else:
self.lb_wa_s3_sec.setText('-')
self.wa_s3_ss = -1
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬3]: 양의 정수를 10~7200 (초)단위로 입력 - ' + log_num)
self.txt_wa_s3.clear()
def clicked_btn_wa_s4(self):
custom_sec = self.txt_wa_s4.text()
if (is_int_number(custom_sec)):
self.lb_wa_s4_sec.setText(custom_sec)
self.wa_s4_ss = int(custom_sec)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬4]: 적용 성공 - ' + log_num)
else:
self.lb_wa_s4_sec.setText('-')
self.wa_s4_ss = -1
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬4]: 양의 정수를 10~7200 (초)단위로 입력 - ' + log_num)
self.txt_wa_s4.clear()
def clicked_btn_wa_s5(self):
custom_sec = self.txt_wa_s5.text()
if (is_int_number(custom_sec)):
self.lb_wa_s5_sec.setText(custom_sec)
self.wa_s5_ss = int(custom_sec)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬5]: 적용 성공 - ' + log_num)
else:
self.lb_wa_s5_sec.setText('-')
self.wa_s5_ss = -1
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬5]: 양의 정수를 10~7200 (초)단위로 입력 - ' + log_num)
self.txt_wa_s5.clear()
def clicked_btn_wa_s6(self):
custom_sec = self.txt_wa_s6.text()
if (is_int_number(custom_sec)):
self.lb_wa_s6_sec.setText(custom_sec)
self.wa_s6_ss = int(custom_sec)
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬6]: 적용 성공 - ' + log_num)
else:
self.lb_wa_s6_sec.setText('-')
self.wa_s6_ss = -1
log_num = str(random.randrange(1000, 9999))
self.txt_wa_log.setPlainText('[스킬6]: 양의 정수를 10~7200 (초)단위로 입력 - ' + log_num)
self.txt_wa_s6.clear()
####################################################################################################################################################################
# tab_boss_kalos fuctions
# btn_kalos_start
def clicked_btn_kalos_start(self):
if (self.is_difficulty_selected()):
# main timer start + log
self.boss_kalos_stop_progress()
self.cb_prog_mini.setCheckState(2)
self.boss_kalos_main_timer.start()
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[칼로스 1페 입장] - ' + log_num)
# salvo timer start, 155 sec
self.boss_kalos_salvo_timer.start()
self.lb_kalos_salvo.setText('[전탄]: 알림 시작')
self.set_salvo_sec()
# if timer start, 65 sec
self.boss_kalos_if_timer.start()
self.lb_kalos_if.setText('[간섭]: 알림 시작')
self.set_if_sec()
# current phase 1
self.boss_kalos_current_phase = 0
self.lb_kalos_cphase.setText('현재페이즈: 1')
else:
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[난이도 선택란 획인] - ' + log_num)
# btn_kalos_reset
def clicked_btn_kalos_reset(self):
if (self.is_difficulty_selected()):
# stop and clear related to phase 1
self.boss_kalos_stop_progress()
self.cb_prog_mini.setCheckState(2)
self.lb_kalos_right.setText('[오비]: 2페 진입')
self.lb_kalos_left.setText('[왼비]: 2페 진입')
self.lb_kalos_breath.setText('[브레스]: 2페 진입')
# main timer restart
self.boss_kalos_main_timer.start()
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[칼로스 2페 입장] - ' + log_num)
# salvo timer start, 150 sec
self.boss_kalos_salvo_timer.start()
self.lb_kalos_salvo.setText('[전탄]: 2페 진입')
self.reset_salvo_sec()
# if timer start, 60 sec
self.boss_kalos_if_timer.start()
self.lb_kalos_if.setText('[간섭]: 2페 진입')
self.reset_if_sec()
# current phase 2-1
self.boss_kalos_current_phase = 1
self.lb_kalos_cphase.setText('현재페이즈: 2-1')
else:
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[난이도 선택란 획인] - ' + log_num)
def boss_kalos_stop_progress(self):
self.boss_kalos_alarm_heap.clear()
self.boss_kalos_main_timer.stop()
self.boss_kalos_salvo_timer.stop()
self.boss_kalos_if_timer.stop()
self.boss_kalos_right_timer.stop()
self.boss_kalos_left_timer.stop()
self.boss_kalos_breath_timer.stop()
# btn_kalos_stop
def clicked_btn_kalos_stop(self):
self.cb_prog_mini.setCheckState(0)
self.boss_kalos_stop_progress()
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[타이머 중지] - ' + log_num)
self.lb_kalos_right.setText('')
self.lb_kalos_left.setText('[비석]: 2초전 알림')
self.lb_kalos_breath.setText('[브레스]: 브레스 장전 5초전 알림')
self.lb_kalos_salvo.setText('[전탄]: 10초/5초전 알림')
self.lb_kalos_if.setText('[간섭]: 10초/5초전 알림')
self.lb_kalos_cphase.setText('현재페이즈: 입장 전')
# boss kalos main timer
def activate_boss_kalos_main_timer(self):
if (len(self.boss_kalos_alarm_heap)):
alarm_num = heapq.heappop(self.boss_kalos_alarm_heap)
winsound.PlaySound(self.b_kalos_wav_list[alarm_num], winsound.SND_ASYNC)
# boss kalos salvo timer
def reset_salvo_sec(self):
self.boss_kalos_salvo_sec = 150
def set_salvo_sec(self):
self.boss_kalos_salvo_sec = 155
def activate_boss_kalos_salvo_timer(self):
self.lb_kalos_salvo.setText('[전탄]: ' + str(self.boss_kalos_salvo_sec) + '초 전')
if (self.boss_kalos_salvo_sec == 10):
heapq.heappush(self.boss_kalos_alarm_heap, 1)
if (self.boss_kalos_salvo_sec == 5):
heapq.heappush(self.boss_kalos_alarm_heap, 2)
self.set_salvo_sec()
self.boss_kalos_salvo_sec -= 1
def clicked_btn_kalos_salvo(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: Reset - ' + log_num)
self.reset_salvo_sec()
def clicked_btn_kalos_p50s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (+)50초 - ' + log_num)
self.boss_kalos_salvo_sec += 50
def clicked_btn_kalos_p20s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (+)20초 - ' + log_num)
self.boss_kalos_salvo_sec += 20
def clicked_btn_kalos_p10s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (+)10초 - ' + log_num)
self.boss_kalos_salvo_sec += 10
def clicked_btn_kalos_p4s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (+)4초 - ' + log_num)
self.boss_kalos_salvo_sec += 4
def clicked_btn_kalos_m50s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (-)50초 - ' + log_num)
self.boss_kalos_salvo_sec -= 50
def clicked_btn_kalos_m20s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (-)20초 - ' + log_num)
self.boss_kalos_salvo_sec -= 20
def clicked_btn_kalos_m10s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (-)10초 - ' + log_num)
self.boss_kalos_salvo_sec -= 10
def clicked_btn_kalos_m4s(self):
log_num = str(random.randrange(1000, 9999))
self.txt_kalos_log.setPlainText('[전탄]: (-)4초 - ' + log_num)
self.boss_kalos_salvo_sec -= 4
# boss kalos if timer
def reset_if_sec(self):
self.boss_kalos_if_sec = 60