Advertisement
Guest User

Untitled

a guest
May 24th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 98.50 KB | None | 0 0
  1.  
  2. Save New Duplicate & Edit Just Text Twitter
  3. 1
  4. 2
  5. 3
  6. 4
  7. 5
  8. 6
  9. 7
  10. 8
  11. 9
  12. 10
  13. 11
  14. 12
  15. 13
  16. 14
  17. 15
  18. 16
  19. 17
  20. 18
  21. 19
  22. 20
  23. 21
  24. 22
  25. 23
  26. 24
  27. 25
  28. 26
  29. 27
  30. 28
  31. 29
  32. 30
  33. 31
  34. 32
  35. 33
  36. 34
  37. 35
  38. 36
  39. 37
  40. 38
  41. 39
  42. 40
  43. 41
  44. 42
  45. 43
  46. 44
  47. 45
  48. 46
  49. 47
  50. 48
  51. 49
  52. 50
  53. 51
  54. 52
  55. 53
  56. 54
  57. 55
  58. 56
  59. 57
  60. 58
  61. 59
  62. 60
  63. 61
  64. 62
  65. 63
  66. 64
  67. 65
  68. 66
  69. 67
  70. 68
  71. 69
  72. 70
  73. 71
  74. 72
  75. 73
  76. 74
  77. 75
  78. 76
  79. 77
  80. 78
  81. 79
  82. 80
  83. 81
  84. 82
  85. 83
  86. 84
  87. 85
  88. 86
  89. 87
  90. 88
  91. 89
  92. 90
  93. 91
  94. 92
  95. 93
  96. 94
  97. 95
  98. 96
  99. 97
  100. 98
  101. 99
  102. 100
  103. 101
  104. 102
  105. 103
  106. 104
  107. 105
  108. 106
  109. 107
  110. 108
  111. 109
  112. 110
  113. 111
  114. 112
  115. 113
  116. 114
  117. 115
  118. 116
  119. 117
  120. 118
  121. 119
  122. 120
  123. 121
  124. 122
  125. 123
  126. 124
  127. 125
  128. 126
  129. 127
  130. 128
  131. 129
  132. 130
  133. 131
  134. 132
  135. 133
  136. 134
  137. 135
  138. 136
  139. 137
  140. 138
  141. 139
  142. 140
  143. 141
  144. 142
  145. 143
  146. 144
  147. 145
  148. 146
  149. 147
  150. 148
  151. 149
  152. 150
  153. 151
  154. 152
  155. 153
  156. 154
  157. 155
  158. 156
  159. 157
  160. 158
  161. 159
  162. 160
  163. 161
  164. 162
  165. 163
  166. 164
  167. 165
  168. 166
  169. 167
  170. 168
  171. 169
  172. 170
  173. 171
  174. 172
  175. 173
  176. 174
  177. 175
  178. 176
  179. 177
  180. 178
  181. 179
  182. 180
  183. 181
  184. 182
  185. 183
  186. 184
  187. 185
  188. 186
  189. 187
  190. 188
  191. 189
  192. 190
  193. 191
  194. 192
  195. 193
  196. 194
  197. 195
  198. 196
  199. 197
  200. 198
  201. 199
  202. 200
  203. 201
  204. 202
  205. 203
  206. 204
  207. 205
  208. 206
  209. 207
  210. 208
  211. 209
  212. 210
  213. 211
  214. 212
  215. 213
  216. 214
  217. 215
  218. 216
  219. 217
  220. 218
  221. 219
  222. 220
  223. 221
  224. 222
  225. 223
  226. 224
  227. 225
  228. 226
  229. 227
  230. 228
  231. 229
  232. 230
  233. 231
  234. 232
  235. 233
  236. 234
  237. 235
  238. 236
  239. 237
  240. 238
  241. 239
  242. 240
  243. 241
  244. 242
  245. 243
  246. 244
  247. 245
  248. 246
  249. 247
  250. 248
  251. 249
  252. 250
  253. 251
  254. 252
  255. 253
  256. 254
  257. 255
  258. 256
  259. 257
  260. 258
  261. 259
  262. 260
  263. 261
  264. 262
  265. 263
  266. 264
  267. 265
  268. 266
  269. 267
  270. 268
  271. 269
  272. 270
  273. 271
  274. 272
  275. 273
  276. 274
  277. 275
  278. 276
  279. 277
  280. 278
  281. 279
  282. 280
  283. 281
  284. 282
  285. 283
  286. 284
  287. 285
  288. 286
  289. 287
  290. 288
  291. 289
  292. 290
  293. 291
  294. 292
  295. 293
  296. 294
  297. 295
  298. 296
  299. 297
  300. 298
  301. 299
  302. 300
  303. 301
  304. 302
  305. 303
  306. 304
  307. 305
  308. 306
  309. 307
  310. 308
  311. 309
  312. 310
  313. 311
  314. 312
  315. 313
  316. 314
  317. 315
  318. 316
  319. 317
  320. 318
  321. 319
  322. 320
  323. 321
  324. 322
  325. 323
  326. 324
  327. 325
  328. 326
  329. 327
  330. 328
  331. 329
  332. 330
  333. 331
  334. 332
  335. 333
  336. 334
  337. 335
  338. 336
  339. 337
  340. 338
  341. 339
  342. 340
  343. 341
  344. 342
  345. 343
  346. 344
  347. 345
  348. 346
  349. 347
  350. 348
  351. 349
  352. 350
  353. 351
  354. 352
  355. 353
  356. 354
  357. 355
  358. 356
  359. 357
  360. 358
  361. 359
  362. 360
  363. 361
  364. 362
  365. 363
  366. 364
  367. 365
  368. 366
  369. 367
  370. 368
  371. 369
  372. 370
  373. 371
  374. 372
  375. 373
  376. 374
  377. 375
  378. 376
  379. 377
  380. 378
  381. 379
  382. 380
  383. 381
  384. 382
  385. 383
  386. 384
  387. 385
  388. 386
  389. 387
  390. 388
  391. 389
  392. 390
  393. 391
  394. 392
  395. 393
  396. 394
  397. 395
  398. 396
  399. 397
  400. 398
  401. 399
  402. 400
  403. 401
  404. 402
  405. 403
  406. 404
  407. 405
  408. 406
  409. 407
  410. 408
  411. 409
  412. 410
  413. 411
  414. 412
  415. 413
  416. 414
  417. 415
  418. 416
  419. 417
  420. 418
  421. 419
  422. 420
  423. 421
  424. 422
  425. 423
  426. 424
  427. 425
  428. 426
  429. 427
  430. 428
  431. 429
  432. 430
  433. 431
  434. 432
  435. 433
  436. 434
  437. 435
  438. 436
  439. 437
  440. 438
  441. 439
  442. 440
  443. 441
  444. 442
  445. 443
  446. 444
  447. 445
  448. 446
  449. 447
  450. 448
  451. 449
  452. 450
  453. 451
  454. 452
  455. 453
  456. 454
  457. 455
  458. 456
  459. 457
  460. 458
  461. 459
  462. 460
  463. 461
  464. 462
  465. 463
  466. 464
  467. 465
  468. 466
  469. 467
  470. 468
  471. 469
  472. 470
  473. 471
  474. 472
  475. 473
  476. 474
  477. 475
  478. 476
  479. 477
  480. 478
  481. 479
  482. 480
  483. 481
  484. 482
  485. 483
  486. 484
  487. 485
  488. 486
  489. 487
  490. 488
  491. 489
  492. 490
  493. 491
  494. 492
  495. 493
  496. 494
  497. 495
  498. 496
  499. 497
  500. 498
  501. 499
  502. 500
  503. 501
  504. 502
  505. 503
  506. 504
  507. 505
  508. 506
  509. 507
  510. 508
  511. 509
  512. 510
  513. 511
  514. 512
  515. 513
  516. 514
  517. 515
  518. 516
  519. 517
  520. 518
  521. 519
  522. 520
  523. 521
  524. 522
  525. 523
  526. 524
  527. 525
  528. 526
  529. 527
  530. 528
  531. 529
  532. 530
  533. 531
  534. 532
  535. 533
  536. 534
  537. 535
  538. 536
  539. 537
  540. 538
  541. 539
  542. 540
  543. 541
  544. 542
  545. 543
  546. 544
  547. 545
  548. 546
  549. 547
  550. 548
  551. 549
  552. 550
  553. 551
  554. 552
  555. 553
  556. 554
  557. 555
  558. 556
  559. 557
  560. 558
  561. 559
  562. 560
  563. 561
  564. 562
  565. 563
  566. 564
  567. 565
  568. 566
  569. 567
  570. 568
  571. 569
  572. 570
  573. 571
  574. 572
  575. 573
  576. 574
  577. 575
  578. 576
  579. 577
  580. 578
  581. 579
  582. 580
  583. 581
  584. 582
  585. 583
  586. 584
  587. 585
  588. 586
  589. 587
  590. 588
  591. 589
  592. 590
  593. 591
  594. 592
  595. 593
  596. 594
  597. 595
  598. 596
  599. 597
  600. 598
  601. 599
  602. 600
  603. 601
  604. 602
  605. 603
  606. 604
  607. 605
  608. 606
  609. 607
  610. 608
  611. 609
  612. 610
  613. 611
  614. 612
  615. 613
  616. 614
  617. 615
  618. 616
  619. 617
  620. 618
  621. 619
  622. 620
  623. 621
  624. 622
  625. 623
  626. 624
  627. 625
  628. 626
  629. 627
  630. 628
  631. 629
  632. 630
  633. 631
  634. 632
  635. 633
  636. 634
  637. 635
  638. 636
  639. 637
  640. 638
  641. 639
  642. 640
  643. 641
  644. 642
  645. 643
  646. 644
  647. 645
  648. 646
  649. 647
  650. 648
  651. 649
  652. 650
  653. 651
  654. 652
  655. 653
  656. 654
  657. 655
  658. 656
  659. 657
  660. 658
  661. 659
  662. 660
  663. 661
  664. 662
  665. 663
  666. 664
  667. 665
  668. 666
  669. 667
  670. 668
  671. 669
  672. 670
  673. 671
  674. 672
  675. 673
  676. 674
  677. 675
  678. 676
  679. 677
  680. 678
  681. 679
  682. 680
  683. 681
  684. 682
  685. 683
  686. 684
  687. 685
  688. 686
  689. 687
  690. 688
  691. 689
  692. 690
  693. 691
  694. 692
  695. 693
  696. 694
  697. 695
  698. 696
  699. 697
  700. 698
  701. 699
  702. 700
  703. 701
  704. 702
  705. 703
  706. 704
  707. 705
  708. 706
  709. 707
  710. 708
  711. 709
  712. 710
  713. 711
  714. 712
  715. 713
  716. 714
  717. 715
  718. 716
  719. 717
  720. 718
  721. 719
  722. 720
  723. 721
  724. 722
  725. 723
  726. 724
  727. 725
  728. 726
  729. 727
  730. 728
  731. 729
  732. 730
  733. 731
  734. 732
  735. 733
  736. 734
  737. 735
  738. 736
  739. 737
  740. 738
  741. 739
  742. 740
  743. 741
  744. 742
  745. 743
  746. 744
  747. 745
  748. 746
  749. 747
  750. 748
  751. 749
  752. 750
  753. 751
  754. 752
  755. 753
  756. 754
  757. 755
  758. 756
  759. 757
  760. 758
  761. 759
  762. 760
  763. 761
  764. 762
  765. 763
  766. 764
  767. 765
  768. 766
  769. 767
  770. 768
  771. 769
  772. 770
  773. 771
  774. 772
  775. 773
  776. 774
  777. 775
  778. 776
  779. 777
  780. 778
  781. 779
  782. 780
  783. 781
  784. 782
  785. 783
  786. 784
  787. 785
  788. 786
  789. 787
  790. 788
  791. 789
  792. 790
  793. 791
  794. 792
  795. 793
  796. 794
  797. 795
  798. 796
  799. 797
  800. 798
  801. 799
  802. 800
  803. 801
  804. 802
  805. 803
  806. 804
  807. 805
  808. 806
  809. 807
  810. 808
  811. 809
  812. 810
  813. 811
  814. 812
  815. 813
  816. 814
  817. 815
  818. 816
  819. 817
  820. 818
  821. 819
  822. 820
  823. 821
  824. 822
  825. 823
  826. 824
  827. 825
  828. 826
  829. 827
  830. 828
  831. 829
  832. 830
  833. 831
  834. 832
  835. 833
  836. 834
  837. 835
  838. 836
  839. 837
  840. 838
  841. 839
  842. 840
  843. 841
  844. 842
  845. 843
  846. 844
  847. 845
  848. 846
  849. 847
  850. 848
  851. 849
  852. 850
  853. 851
  854. 852
  855. 853
  856. 854
  857. 855
  858. 856
  859. 857
  860. 858
  861. 859
  862. 860
  863. 861
  864. 862
  865. 863
  866. 864
  867. 865
  868. 866
  869. 867
  870. 868
  871. 869
  872. 870
  873. 871
  874. 872
  875. 873
  876. 874
  877. 875
  878. 876
  879. 877
  880. 878
  881. 879
  882. 880
  883. 881
  884. 882
  885. 883
  886. 884
  887. 885
  888. 886
  889. 887
  890. 888
  891. 889
  892. 890
  893. 891
  894. 892
  895. 893
  896. 894
  897. 895
  898. 896
  899. 897
  900. 898
  901. 899
  902. 900
  903. 901
  904. 902
  905. 903
  906. 904
  907. 905
  908. 906
  909. 907
  910. 908
  911. 909
  912. 910
  913. 911
  914. 912
  915. 913
  916. 914
  917. 915
  918. 916
  919. 917
  920. 918
  921. 919
  922. 920
  923. 921
  924. 922
  925. 923
  926. 924
  927. 925
  928. 926
  929. 927
  930. 928
  931. 929
  932. 930
  933. 931
  934. 932
  935. 933
  936. 934
  937. 935
  938. 936
  939. 937
  940. 938
  941. 939
  942. 940
  943. 941
  944. 942
  945. 943
  946. 944
  947. 945
  948. 946
  949. 947
  950. 948
  951. 949
  952. 950
  953. 951
  954. 952
  955. 953
  956. 954
  957. 955
  958. 956
  959. 957
  960. 958
  961. 959
  962. 960
  963. 961
  964. 962
  965. 963
  966. 964
  967. 965
  968. 966
  969. 967
  970. 968
  971. 969
  972. 970
  973. 971
  974. 972
  975. 973
  976. 974
  977. 975
  978. 976
  979. 977
  980. 978
  981. 979
  982. 980
  983. 981
  984. 982
  985. 983
  986. 984
  987. 985
  988. 986
  989. 987
  990. 988
  991. 989
  992. 990
  993. 991
  994. 992
  995. 993
  996. 994
  997. 995
  998. 996
  999. 997
  1000. 998
  1001. 999
  1002. 1000
  1003. 1001
  1004. 1002
  1005. 1003
  1006. 1004
  1007. 1005
  1008. 1006
  1009. 1007
  1010. 1008
  1011. 1009
  1012. 1010
  1013. 1011
  1014. 1012
  1015. 1013
  1016. 1014
  1017. 1015
  1018. 1016
  1019. 1017
  1020. 1018
  1021. 1019
  1022. 1020
  1023. 1021
  1024. 1022
  1025. 1023
  1026. 1024
  1027. 1025
  1028. 1026
  1029. 1027
  1030. 1028
  1031. 1029
  1032. 1030
  1033. 1031
  1034. 1032
  1035. 1033
  1036. 1034
  1037. 1035
  1038. 1036
  1039. 1037
  1040. 1038
  1041. 1039
  1042. 1040
  1043. 1041
  1044. 1042
  1045. 1043
  1046. 1044
  1047. 1045
  1048. 1046
  1049. 1047
  1050. 1048
  1051. 1049
  1052. 1050
  1053. 1051
  1054. 1052
  1055. 1053
  1056. 1054
  1057. 1055
  1058. 1056
  1059. 1057
  1060. 1058
  1061. 1059
  1062. 1060
  1063. 1061
  1064. 1062
  1065. 1063
  1066. 1064
  1067. 1065
  1068. 1066
  1069. 1067
  1070. 1068
  1071. 1069
  1072. 1070
  1073. 1071
  1074. 1072
  1075. 1073
  1076. 1074
  1077. 1075
  1078. 1076
  1079. 1077
  1080. 1078
  1081. 1079
  1082. 1080
  1083. 1081
  1084. 1082
  1085. 1083
  1086. 1084
  1087. 1085
  1088. 1086
  1089. 1087
  1090. 1088
  1091. 1089
  1092. 1090
  1093. 1091
  1094. 1092
  1095. 1093
  1096. 1094
  1097. 1095
  1098. 1096
  1099. 1097
  1100. 1098
  1101. 1099
  1102. 1100
  1103. 1101
  1104. 1102
  1105. 1103
  1106. 1104
  1107. 1105
  1108. 1106
  1109. 1107
  1110. 1108
  1111. 1109
  1112. 1110
  1113. 1111
  1114. 1112
  1115. 1113
  1116. 1114
  1117. 1115
  1118. 1116
  1119. 1117
  1120. 1118
  1121. 1119
  1122. 1120
  1123. 1121
  1124. 1122
  1125. 1123
  1126. 1124
  1127. 1125
  1128. 1126
  1129. 1127
  1130. 1128
  1131. 1129
  1132. 1130
  1133. 1131
  1134. 1132
  1135. 1133
  1136. 1134
  1137. 1135
  1138. 1136
  1139. 1137
  1140. 1138
  1141. 1139
  1142. 1140
  1143. 1141
  1144. 1142
  1145. 1143
  1146. 1144
  1147. 1145
  1148. 1146
  1149. 1147
  1150. 1148
  1151. 1149
  1152. 1150
  1153. 1151
  1154. 1152
  1155. 1153
  1156. 1154
  1157. 1155
  1158. 1156
  1159. 1157
  1160. 1158
  1161. 1159
  1162. 1160
  1163. 1161
  1164. 1162
  1165. 1163
  1166. 1164
  1167. 1165
  1168. 1166
  1169. 1167
  1170. 1168
  1171. 1169
  1172. 1170
  1173. 1171
  1174. 1172
  1175. 1173
  1176. 1174
  1177. 1175
  1178. 1176
  1179. 1177
  1180. 1178
  1181. 1179
  1182. 1180
  1183. 1181
  1184. 1182
  1185. 1183
  1186. 1184
  1187. 1185
  1188. 1186
  1189. 1187
  1190. 1188
  1191. 1189
  1192. 1190
  1193. 1191
  1194. 1192
  1195. 1193
  1196. 1194
  1197. 1195
  1198. 1196
  1199. 1197
  1200. 1198
  1201. 1199
  1202. 1200
  1203. 1201
  1204. 1202
  1205. 1203
  1206. 1204
  1207. 1205
  1208. 1206
  1209. 1207
  1210. 1208
  1211. 1209
  1212. 1210
  1213. 1211
  1214. 1212
  1215. 1213
  1216. 1214
  1217. 1215
  1218. 1216
  1219. 1217
  1220. 1218
  1221. 1219
  1222. 1220
  1223. 1221
  1224. 1222
  1225. 1223
  1226. 1224
  1227. 1225
  1228. 1226
  1229. 1227
  1230. 1228
  1231. 1229
  1232. 1230
  1233. 1231
  1234. 1232
  1235. 1233
  1236. 1234
  1237. 1235
  1238. 1236
  1239. 1237
  1240. 1238
  1241. 1239
  1242. 1240
  1243. 1241
  1244. 1242
  1245. 1243
  1246. 1244
  1247. 1245
  1248. 1246
  1249. 1247
  1250. 1248
  1251. 1249
  1252. 1250
  1253. 1251
  1254. 1252
  1255. 1253
  1256. 1254
  1257. 1255
  1258. 1256
  1259. 1257
  1260. 1258
  1261. 1259
  1262. 1260
  1263. 1261
  1264. 1262
  1265. 1263
  1266. 1264
  1267. 1265
  1268. 1266
  1269. 1267
  1270. 1268
  1271. 1269
  1272. 1270
  1273. 1271
  1274. 1272
  1275. 1273
  1276. 1274
  1277. 1275
  1278. 1276
  1279. 1277
  1280. 1278
  1281. 1279
  1282. 1280
  1283. 1281
  1284. 1282
  1285. 1283
  1286. 1284
  1287. 1285
  1288. 1286
  1289. 1287
  1290. 1288
  1291. 1289
  1292. 1290
  1293. 1291
  1294. 1292
  1295. 1293
  1296. 1294
  1297. 1295
  1298. 1296
  1299. 1297
  1300. 1298
  1301. 1299
  1302. 1300
  1303. 1301
  1304. 1302
  1305. 1303
  1306. 1304
  1307. 1305
  1308. 1306
  1309. 1307
  1310. 1308
  1311. 1309
  1312. 1310
  1313. 1311
  1314. 1312
  1315. 1313
  1316. 1314
  1317. 1315
  1318. 1316
  1319. 1317
  1320. 1318
  1321. 1319
  1322. 1320
  1323. 1321
  1324. 1322
  1325. 1323
  1326. 1324
  1327. 1325
  1328. 1326
  1329. 1327
  1330. 1328
  1331. 1329
  1332. 1330
  1333. 1331
  1334. 1332
  1335. 1333
  1336. 1334
  1337. 1335
  1338. 1336
  1339. 1337
  1340. 1338
  1341. 1339
  1342. 1340
  1343. 1341
  1344. 1342
  1345. 1343
  1346. 1344
  1347. 1345
  1348. 1346
  1349. 1347
  1350. 1348
  1351. 1349
  1352. 1350
  1353. 1351
  1354. 1352
  1355. 1353
  1356. 1354
  1357. 1355
  1358. 1356
  1359. 1357
  1360. 1358
  1361. 1359
  1362. 1360
  1363. 1361
  1364. 1362
  1365. 1363
  1366. 1364
  1367. 1365
  1368. 1366
  1369. 1367
  1370. 1368
  1371. 1369
  1372. 1370
  1373. 1371
  1374. 1372
  1375. 1373
  1376. 1374
  1377. 1375
  1378. 1376
  1379. 1377
  1380. 1378
  1381. 1379
  1382. 1380
  1383. 1381
  1384. 1382
  1385. 1383
  1386. 1384
  1387. 1385
  1388. 1386
  1389. 1387
  1390. 1388
  1391. 1389
  1392. 1390
  1393. 1391
  1394. 1392
  1395. 1393
  1396. 1394
  1397. 1395
  1398. 1396
  1399. 1397
  1400. 1398
  1401. 1399
  1402. 1400
  1403. 1401
  1404. 1402
  1405. 1403
  1406. 1404
  1407. 1405
  1408. 1406
  1409. 1407
  1410. 1408
  1411. 1409
  1412. 1410
  1413. 1411
  1414. 1412
  1415. 1413
  1416. 1414
  1417. 1415
  1418. 1416
  1419. 1417
  1420. 1418
  1421. 1419
  1422. 1420
  1423. 1421
  1424. 1422
  1425. 1423
  1426. 1424
  1427. 1425
  1428. 1426
  1429. 1427
  1430. 1428
  1431. 1429
  1432. 1430
  1433. 1431
  1434. 1432
  1435. 1433
  1436. 1434
  1437. 1435
  1438. 1436
  1439. 1437
  1440. 1438
  1441. 1439
  1442. 1440
  1443. 1441
  1444. 1442
  1445. 1443
  1446. 1444
  1447. 1445
  1448. 1446
  1449. 1447
  1450. 1448
  1451. 1449
  1452. 1450
  1453. 1451
  1454. 1452
  1455. 1453
  1456. 1454
  1457. 1455
  1458. 1456
  1459. 1457
  1460. 1458
  1461. 1459
  1462. 1460
  1463. 1461
  1464. 1462
  1465. 1463
  1466. 1464
  1467. 1465
  1468. 1466
  1469. 1467
  1470. 1468
  1471. 1469
  1472. 1470
  1473. 1471
  1474. 1472
  1475. 1473
  1476. 1474
  1477. 1475
  1478. 1476
  1479. 1477
  1480. 1478
  1481. 1479
  1482. 1480
  1483. 1481
  1484. 1482
  1485. 1483
  1486. 1484
  1487. 1485
  1488. 1486
  1489. 1487
  1490. 1488
  1491. 1489
  1492. 1490
  1493. 1491
  1494. 1492
  1495. 1493
  1496. 1494
  1497. 1495
  1498. 1496
  1499. 1497
  1500. 1498
  1501. 1499
  1502. 1500
  1503. 1501
  1504. 1502
  1505. 1503
  1506. 1504
  1507. 1505
  1508. 1506
  1509. 1507
  1510. 1508
  1511. 1509
  1512. 1510
  1513. 1511
  1514. 1512
  1515. 1513
  1516. 1514
  1517. 1515
  1518. 1516
  1519. 1517
  1520. 1518
  1521. 1519
  1522. 1520
  1523. 1521
  1524. 1522
  1525. 1523
  1526. 1524
  1527. 1525
  1528. 1526
  1529. 1527
  1530. 1528
  1531. 1529
  1532. 1530
  1533. 1531
  1534. 1532
  1535. 1533
  1536. 1534
  1537. 1535
  1538. 1536
  1539. 1537
  1540. 1538
  1541. 1539
  1542. 1540
  1543. 1541
  1544. 1542
  1545. 1543
  1546. 1544
  1547. 1545
  1548. 1546
  1549. 1547
  1550. 1548
  1551. 1549
  1552. 1550
  1553. 1551
  1554. 1552
  1555. 1553
  1556. 1554
  1557. 1555
  1558. 1556
  1559. 1557
  1560. 1558
  1561. 1559
  1562. 1560
  1563. 1561
  1564. 1562
  1565. 1563
  1566. 1564
  1567. 1565
  1568. 1566
  1569. 1567
  1570. 1568
  1571. 1569
  1572. 1570
  1573. 1571
  1574. 1572
  1575. 1573
  1576. 1574
  1577. 1575
  1578. 1576
  1579. 1577
  1580. 1578
  1581. 1579
  1582. 1580
  1583. 1581
  1584. 1582
  1585. 1583
  1586. 1584
  1587. 1585
  1588. 1586
  1589. 1587
  1590. 1588
  1591. 1589
  1592. 1590
  1593. 1591
  1594. 1592
  1595. 1593
  1596. 1594
  1597. 1595
  1598. 1596
  1599. 1597
  1600. 1598
  1601. 1599
  1602. 1600
  1603. 1601
  1604. 1602
  1605. 1603
  1606. 1604
  1607. 1605
  1608. 1606
  1609. 1607
  1610. 1608
  1611. 1609
  1612. 1610
  1613. 1611
  1614. 1612
  1615. 1613
  1616. 1614
  1617. 1615
  1618. 1616
  1619. 1617
  1620. 1618
  1621. 1619
  1622. 1620
  1623. 1621
  1624. 1622
  1625. 1623
  1626. 1624
  1627. 1625
  1628. 1626
  1629. 1627
  1630. 1628
  1631. 1629
  1632. 1630
  1633. 1631
  1634. 1632
  1635. 1633
  1636. 1634
  1637. 1635
  1638. 1636
  1639. 1637
  1640. 1638
  1641. 1639
  1642. 1640
  1643. 1641
  1644. 1642
  1645. 1643
  1646. 1644
  1647. 1645
  1648. 1646
  1649. 1647
  1650. 1648
  1651. 1649
  1652. 1650
  1653. 1651
  1654. 1652
  1655. 1653
  1656. 1654
  1657. 1655
  1658. 1656
  1659. 1657
  1660. 1658
  1661. 1659
  1662. 1660
  1663. 1661
  1664. 1662
  1665. 1663
  1666. 1664
  1667. 1665
  1668. 1666
  1669. 1667
  1670. 1668
  1671. 1669
  1672. 1670
  1673. 1671
  1674. 1672
  1675. 1673
  1676. 1674
  1677. 1675
  1678. 1676
  1679. 1677
  1680. 1678
  1681. 1679
  1682. 1680
  1683. 1681
  1684. 1682
  1685. 1683
  1686. 1684
  1687. 1685
  1688. 1686
  1689. 1687
  1690. 1688
  1691. 1689
  1692. 1690
  1693. 1691
  1694. 1692
  1695. 1693
  1696. 1694
  1697. 1695
  1698. 1696
  1699. 1697
  1700. 1698
  1701. 1699
  1702. 1700
  1703. 1701
  1704. 1702
  1705. 1703
  1706. 1704
  1707. 1705
  1708. 1706
  1709. 1707
  1710. 1708
  1711. 1709
  1712. 1710
  1713. 1711
  1714. 1712
  1715. 1713
  1716. 1714
  1717. 1715
  1718. 1716
  1719. 1717
  1720. 1718
  1721. 1719
  1722. 1720
  1723. 1721
  1724. 1722
  1725. 1723
  1726. 1724
  1727. 1725
  1728. 1726
  1729. 1727
  1730. 1728
  1731. 1729
  1732. 1730
  1733. 1731
  1734. 1732
  1735. 1733
  1736. 1734
  1737. 1735
  1738. 1736
  1739. 1737
  1740. 1738
  1741. 1739
  1742. 1740
  1743. 1741
  1744. 1742
  1745. 1743
  1746. 1744
  1747. 1745
  1748. 1746
  1749. 1747
  1750. 1748
  1751. 1749
  1752. 1750
  1753. 1751
  1754. 1752
  1755. 1753
  1756. 1754
  1757. 1755
  1758. 1756
  1759. 1757
  1760. 1758
  1761. 1759
  1762. 1760
  1763. 1761
  1764. 1762
  1765. 1763
  1766. 1764
  1767. 1765
  1768. 1766
  1769. 1767
  1770. 1768
  1771. 1769
  1772. 1770
  1773. 1771
  1774. 1772
  1775. 1773
  1776. 1774
  1777. 1775
  1778. 1776
  1779. 1777
  1780. 1778
  1781. 1779
  1782. 1780
  1783. 1781
  1784. 1782
  1785. 1783
  1786. 1784
  1787. 1785
  1788. 1786
  1789. 1787
  1790. 1788
  1791. 1789
  1792. 1790
  1793. 1791
  1794. 1792
  1795. 1793
  1796. 1794
  1797. 1795
  1798. 1796
  1799. 1797
  1800. 1798
  1801. 1799
  1802. 1800
  1803. 1801
  1804. 1802
  1805. 1803
  1806. 1804
  1807. 1805
  1808. 1806
  1809. 1807
  1810. 1808
  1811. 1809
  1812. 1810
  1813. 1811
  1814. 1812
  1815. 1813
  1816. 1814
  1817. 1815
  1818. 1816
  1819. 1817
  1820. 1818
  1821. 1819
  1822. 1820
  1823. 1821
  1824. 1822
  1825. 1823
  1826. 1824
  1827. 1825
  1828. 1826
  1829. 1827
  1830. 1828
  1831. 1829
  1832. 1830
  1833. 1831
  1834. 1832
  1835. 1833
  1836. 1834
  1837. 1835
  1838. 1836
  1839. 1837
  1840. 1838
  1841. 1839
  1842. 1840
  1843. 1841
  1844. 1842
  1845. 1843
  1846. 1844
  1847. 1845
  1848. 1846
  1849. 1847
  1850. 1848
  1851. 1849
  1852. 1850
  1853. 1851
  1854. 1852
  1855. 1853
  1856. 1854
  1857. 1855
  1858. 1856
  1859. 1857
  1860. 1858
  1861. 1859
  1862. 1860
  1863. 1861
  1864. 1862
  1865. 1863
  1866. 1864
  1867. 1865
  1868. 1866
  1869. 1867
  1870. 1868
  1871. 1869
  1872. 1870
  1873. 1871
  1874. 1872
  1875. 1873
  1876. 1874
  1877. 1875
  1878. 1876
  1879. 1877
  1880. 1878
  1881. 1879
  1882. 1880
  1883. 1881
  1884. 1882
  1885. 1883
  1886. 1884
  1887. 1885
  1888. 1886
  1889. 1887
  1890. 1888
  1891. 1889
  1892. 1890
  1893. 1891
  1894. 1892
  1895. 1893
  1896. 1894
  1897. 1895
  1898. 1896
  1899. 1897
  1900. 1898
  1901. 1899
  1902. 1900
  1903. 1901
  1904. 1902
  1905. 1903
  1906. 1904
  1907. 1905
  1908. 1906
  1909. 1907
  1910. 1908
  1911. 1909
  1912. 1910
  1913. 1911
  1914. 1912
  1915. 1913
  1916. 1914
  1917. 1915
  1918. 1916
  1919. 1917
  1920. 1918
  1921. 1919
  1922. 1920
  1923. 1921
  1924. 1922
  1925. 1923
  1926. 1924
  1927. 1925
  1928. 1926
  1929. 1927
  1930. 1928
  1931. 1929
  1932. 1930
  1933. 1931
  1934. 1932
  1935. 1933
  1936. 1934
  1937. 1935
  1938. 1936
  1939. 1937
  1940. 1938
  1941. 1939
  1942. 1940
  1943. 1941
  1944. 1942
  1945. 1943
  1946. 1944
  1947. 1945
  1948. 1946
  1949. 1947
  1950. 1948
  1951. 1949
  1952. 1950
  1953. 1951
  1954. 1952
  1955. 1953
  1956. 1954
  1957. 1955
  1958. 1956
  1959. 1957
  1960. 1958
  1961. 1959
  1962. 1960
  1963. 1961
  1964. 1962
  1965. 1963
  1966. 1964
  1967. 1965
  1968. 1966
  1969. 1967
  1970. 1968
  1971. 1969
  1972. 1970
  1973. 1971
  1974. 1972
  1975. 1973
  1976. 1974
  1977. 1975
  1978. 1976
  1979. 1977
  1980. 1978
  1981. 1979
  1982. 1980
  1983. 1981
  1984. 1982
  1985. 1983
  1986. 1984
  1987. 1985
  1988. 1986
  1989. 1987
  1990. 1988
  1991. 1989
  1992. 1990
  1993. 1991
  1994. 1992
  1995. 1993
  1996. 1994
  1997. 1995
  1998. 1996
  1999. 1997
  2000. 1998
  2001. 1999
  2002. 2000
  2003. 2001
  2004. 2002
  2005. 2003
  2006. 2004
  2007. 2005
  2008. 2006
  2009. 2007
  2010. 2008
  2011. 2009
  2012. 2010
  2013. 2011
  2014. 2012
  2015. 2013
  2016. 2014
  2017. 2015
  2018. 2016
  2019. 2017
  2020. 2018
  2021. 2019
  2022. 2020
  2023. 2021
  2024. 2022
  2025. 2023
  2026. 2024
  2027. 2025
  2028. 2026
  2029. 2027
  2030. 2028
  2031. 2029
  2032. 2030
  2033. 2031
  2034. 2032
  2035. 2033
  2036. 2034
  2037. 2035
  2038. 2036
  2039. 2037
  2040. 2038
  2041. 2039
  2042. 2040
  2043. 2041
  2044. 2042
  2045. 2043
  2046. 2044
  2047. 2045
  2048. 2046
  2049. 2047
  2050. 2048
  2051. 2049
  2052. 2050
  2053. 2051
  2054. 2052
  2055. 2053
  2056. 2054
  2057. 2055
  2058. 2056
  2059. 2057
  2060. 2058
  2061. 2059
  2062. 2060
  2063. 2061
  2064. 2062
  2065. 2063
  2066. 2064
  2067. 2065
  2068. 2066
  2069. 2067
  2070. 2068
  2071. 2069
  2072. 2070
  2073. 2071
  2074. 2072
  2075. 2073
  2076. 2074
  2077. 2075
  2078. 2076
  2079. 2077
  2080. 2078
  2081. 2079
  2082. 2080
  2083. 2081
  2084. 2082
  2085. 2083
  2086. 2084
  2087. 2085
  2088. 2086
  2089. 2087
  2090. 2088
  2091. 2089
  2092. 2090
  2093. 2091
  2094. 2092
  2095. 2093
  2096. 2094
  2097. 2095
  2098. 2096
  2099. 2097
  2100. 2098
  2101. 2099
  2102. 2100
  2103. 2101
  2104. 2102
  2105. 2103
  2106. 2104
  2107. 2105
  2108. 2106
  2109. 2107
  2110. 2108
  2111. 2109
  2112. 2110
  2113. 2111
  2114. 2112
  2115. 2113
  2116. 2114
  2117. 2115
  2118. 2116
  2119. 2117
  2120. 2118
  2121. 2119
  2122. 2120
  2123. 2121
  2124. 2122
  2125. 2123
  2126. 2124
  2127. 2125
  2128. 2126
  2129. 2127
  2130. 2128
  2131. 2129
  2132. 2130
  2133. 2131
  2134. 2132
  2135. 2133
  2136. 2134
  2137. 2135
  2138. 2136
  2139. 2137
  2140. 2138
  2141. 2139
  2142. 2140
  2143. 2141
  2144. 2142
  2145. 2143
  2146. 2144
  2147. 2145
  2148. 2146
  2149. 2147
  2150. 2148
  2151. 2149
  2152. 2150
  2153. 2151
  2154. 2152
  2155. 2153
  2156. 2154
  2157. 2155
  2158. 2156
  2159. 2157
  2160. 2158
  2161. 2159
  2162. 2160
  2163. 2161
  2164. 2162
  2165. 2163
  2166. 2164
  2167. 2165
  2168. 2166
  2169. 2167
  2170. 2168
  2171. 2169
  2172. 2170
  2173. 2171
  2174. 2172
  2175. 2173
  2176. 2174
  2177. 2175
  2178. 2176
  2179. 2177
  2180. 2178
  2181. 2179
  2182. 2180
  2183. 2181
  2184. 2182
  2185. 2183
  2186. 2184
  2187. 2185
  2188. 2186
  2189. 2187
  2190. 2188
  2191. 2189
  2192. 2190
  2193. 2191
  2194. 2192
  2195. 2193
  2196. 2194
  2197. 2195
  2198. 2196
  2199. 2197
  2200. 2198
  2201. 2199
  2202. 2200
  2203. 2201
  2204. 2202
  2205. 2203
  2206. 2204
  2207. 2205
  2208. 2206
  2209. 2207
  2210. 2208
  2211. 2209
  2212. 2210
  2213. 2211
  2214. 2212
  2215. 2213
  2216. 2214
  2217. 2215
  2218. 2216
  2219. 2217
  2220. 2218
  2221. 2219
  2222. 2220
  2223. 2221
  2224. 2222
  2225. 2223
  2226. 2224
  2227. 2225
  2228. 2226
  2229. 2227
  2230. 2228
  2231. 2229
  2232. 2230
  2233. 2231
  2234. 2232
  2235. 2233
  2236. 2234
  2237. 2235
  2238. 2236
  2239. 2237
  2240. 2238
  2241. 2239
  2242. 2240
  2243. 2241
  2244. 2242
  2245. 2243
  2246. 2244
  2247. 2245
  2248. 2246
  2249. 2247
  2250. 2248
  2251. 2249
  2252. 2250
  2253. 2251
  2254. 2252
  2255. 2253
  2256. 2254
  2257. 2255
  2258. 2256
  2259. 2257
  2260. 2258
  2261. 2259
  2262. 2260
  2263. 2261
  2264. 2262
  2265. 2263
  2266. 2264
  2267. 2265
  2268. 2266
  2269. 2267
  2270. 2268
  2271. 2269
  2272. 2270
  2273. 2271
  2274. 2272
  2275. 2273
  2276. 2274
  2277. 2275
  2278. 2276
  2279. 2277
  2280. 2278
  2281. 2279
  2282. 2280
  2283. 2281
  2284. 2282
  2285. 2283
  2286. 2284
  2287. 2285
  2288. 2286
  2289. 2287
  2290. 2288
  2291. 2289
  2292. 2290
  2293. 2291
  2294. 2292
  2295. 2293
  2296. 2294
  2297. 2295
  2298. 2296
  2299. 2297
  2300. 2298
  2301. 2299
  2302. 2300
  2303. 2301
  2304. 2302
  2305. 2303
  2306. 2304
  2307. 2305
  2308. 2306
  2309. 2307
  2310. 2308
  2311. 2309
  2312. 2310
  2313. 2311
  2314. 2312
  2315. 2313
  2316. 2314
  2317. 2315
  2318. 2316
  2319. 2317
  2320. 2318
  2321. 2319
  2322. 2320
  2323. 2321
  2324. 2322
  2325. 2323
  2326. 2324
  2327. 2325
  2328. 2326
  2329. 2327
  2330. 2328
  2331. 2329
  2332. 2330
  2333. 2331
  2334. 2332
  2335. 2333
  2336. 2334
  2337. 2335
  2338. 2336
  2339. 2337
  2340. 2338
  2341. 2339
  2342. 2340
  2343. 2341
  2344. 2342
  2345. 2343
  2346. 2344
  2347. 2345
  2348. 2346
  2349. 2347
  2350. 2348
  2351. 2349
  2352. 2350
  2353. 2351
  2354. 2352
  2355. 2353
  2356. 2354
  2357. 2355
  2358. 2356
  2359. 2357
  2360. 2358
  2361. 2359
  2362. 2360
  2363. 2361
  2364. 2362
  2365. 2363
  2366. 2364
  2367. 2365
  2368. 2366
  2369. 2367
  2370. 2368
  2371. 2369
  2372. 2370
  2373. 2371
  2374. 2372
  2375. 2373
  2376. 2374
  2377. 2375
  2378. 2376
  2379. 2377
  2380. 2378
  2381. 2379
  2382. 2380
  2383. 2381
  2384. 2382
  2385. 2383
  2386. 2384
  2387. 2385
  2388. 2386
  2389. 2387
  2390. 2388
  2391. 2389
  2392. 2390
  2393. 2391
  2394. 2392
  2395. 2393
  2396. 2394
  2397. 2395
  2398. 2396
  2399. 2397
  2400. 2398
  2401. 2399
  2402. 2400
  2403. 2401
  2404. 2402
  2405. 2403
  2406. 2404
  2407. 2405
  2408. 2406
  2409. 2407
  2410. 2408
  2411. 2409
  2412. 2410
  2413. 2411
  2414. 2412
  2415. 2413
  2416. 2414
  2417. 2415
  2418. 2416
  2419. 2417
  2420. 2418
  2421. 2419
  2422. 2420
  2423. 2421
  2424. 2422
  2425. 2423
  2426. 2424
  2427. 2425
  2428. 2426
  2429. 2427
  2430. 2428
  2431. 2429
  2432. 2430
  2433. 2431
  2434. 2432
  2435. 2433
  2436. 2434
  2437. 2435
  2438. 2436
  2439. 2437
  2440. 2438
  2441. 2439
  2442. 2440
  2443. 2441
  2444. 2442
  2445. 2443
  2446. 2444
  2447. 2445
  2448. 2446
  2449. 2447
  2450. 2448
  2451. 2449
  2452. 2450
  2453. 2451
  2454. 2452
  2455. 2453
  2456. 2454
  2457. 2455
  2458. 2456
  2459. 2457
  2460. 2458
  2461. 2459
  2462. 2460
  2463. 2461
  2464. 2462
  2465. 2463
  2466. 2464
  2467. 2465
  2468. 2466
  2469. 2467
  2470. 2468
  2471. 2469
  2472. 2470
  2473. 2471
  2474. 2472
  2475. 2473
  2476. 2474
  2477. 2475
  2478. 2476
  2479. 2477
  2480. 2478
  2481. 2479
  2482. 2480
  2483. 2481
  2484. 2482
  2485. 2483
  2486. 2484
  2487. 2485
  2488. 2486
  2489. 2487
  2490. 2488
  2491. 2489
  2492. 2490
  2493. 2491
  2494. 2492
  2495. 2493
  2496. 2494
  2497. 2495
  2498. 2496
  2499. 2497
  2500. 2498
  2501. 2499
  2502. 2500
  2503. 2501
  2504. 2502
  2505. 2503
  2506. 2504
  2507. 2505
  2508. 2506
  2509. 2507
  2510. 2508
  2511. 2509
  2512. 2510
  2513. 2511
  2514. 2512
  2515. 2513
  2516. 2514
  2517. 2515
  2518. 2516
  2519. 2517
  2520. 2518
  2521. 2519
  2522. 2520
  2523. 2521
  2524. 2522
  2525. 2523
  2526. 2524
  2527. 2525
  2528. 2526
  2529. 2527
  2530. 2528
  2531. 2529
  2532. 2530
  2533. 2531
  2534. 2532
  2535. 2533
  2536. 2534
  2537. 2535
  2538. 2536
  2539. 2537
  2540. 2538
  2541. 2539
  2542. 2540
  2543. 2541
  2544. 2542
  2545. 2543
  2546. 2544
  2547. 2545
  2548. 2546
  2549. 2547
  2550. 2548
  2551. 2549
  2552. 2550
  2553. 2551
  2554. 2552
  2555. 2553
  2556. 2554
  2557. 2555
  2558. 2556
  2559. 2557
  2560. 2558
  2561. 2559
  2562. 2560
  2563. 2561
  2564. 2562
  2565. 2563
  2566. 2564
  2567. 2565
  2568. 2566
  2569. 2567
  2570. 2568
  2571. 2569
  2572. 2570
  2573. 2571
  2574. 2572
  2575. 2573
  2576. 2574
  2577. 2575
  2578. 2576
  2579. 2577
  2580. 2578
  2581. 2579
  2582. 2580
  2583. 2581
  2584. 2582
  2585. 2583
  2586. 2584
  2587. 2585
  2588. 2586
  2589. 2587
  2590. 2588
  2591. 2589
  2592. 2590
  2593. 2591
  2594. 2592
  2595. 2593
  2596. 2594
  2597. 2595
  2598. 2596
  2599. 2597
  2600. 2598
  2601. 2599
  2602. 2600
  2603. 2601
  2604. 2602
  2605. 2603
  2606. 2604
  2607. 2605
  2608. 2606
  2609. 2607
  2610. 2608
  2611. 2609
  2612. 2610
  2613. 2611
  2614. 2612
  2615. 2613
  2616. 2614
  2617. 2615
  2618. 2616
  2619. 2617
  2620. 2618
  2621. 2619
  2622. 2620
  2623. 2621
  2624. import os
  2625. import app
  2626. import dbg
  2627. import grp
  2628. import item
  2629. import background
  2630. import chr
  2631. import chrmgr
  2632. import player
  2633. import snd
  2634. import chat
  2635. import event
  2636. import textTail
  2637. import snd
  2638. import net
  2639. import effect
  2640. import wndMgr
  2641. import fly
  2642. import systemSetting
  2643. import quest
  2644. import guild
  2645. import skill
  2646. import messenger
  2647. import localeInfo
  2648. import constInfo
  2649. import exchange
  2650. import ime
  2651.  
  2652. import ui
  2653. import uiCommon
  2654. import uiPhaseCurtain
  2655. import uiMapNameShower
  2656. import uiAffectShower
  2657. import uiPlayerGauge
  2658. import uiCharacter
  2659. import uiTarget
  2660.  
  2661. # PRIVATE_SHOP_PRICE_LIST
  2662. import uiPrivateShopBuilder
  2663. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2664.  
  2665. import mouseModule
  2666. import consoleModule
  2667. import localeInfo
  2668.  
  2669. import playerSettingModule
  2670. import interfaceModule
  2671.  
  2672. import musicInfo
  2673. import debugInfo
  2674. import stringCommander
  2675. if app.ENABLE_TELEPORT_TAB:
  2676. import uiteleport
  2677. if app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  2678. from uispecialStorage import SpecialStorageWindow
  2679.  
  2680. from _weakref import proxy
  2681.  
  2682. # TEXTTAIL_LIVINGTIME_CONTROL
  2683. #if localeInfo.IsJAPAN():
  2684. # app.SetTextTailLivingTime(8.0)
  2685. # END_OF_TEXTTAIL_LIVINGTIME_CONTROL
  2686.  
  2687. # SCREENSHOT_CWDSAVE
  2688. SCREENSHOT_CWDSAVE = False
  2689. SCREENSHOT_DIR = None
  2690.  
  2691. if localeInfo.IsEUROPE():
  2692. SCREENSHOT_CWDSAVE = True
  2693.  
  2694. if localeInfo.IsCIBN10():
  2695. SCREENSHOT_CWDSAVE = False
  2696. SCREENSHOT_DIR = "YT2W"
  2697.  
  2698. cameraDistance = 1550.0
  2699. cameraPitch = 27.0
  2700. cameraRotation = 0.0
  2701. cameraHeight = 100.0
  2702.  
  2703. testAlignment = 0
  2704. BPisLodaded = 0
  2705.  
  2706. class GameWindow(ui.ScriptWindow):
  2707. def __init__(self, stream):
  2708. ui.ScriptWindow.__init__(self, "GAME")
  2709. self.SetWindowName("game")
  2710. net.SetPhaseWindow(net.PHASE_WINDOW_GAME, self)
  2711. player.SetGameWindow(self)
  2712.  
  2713. self.quickSlotPageIndex = 0
  2714. self.lastPKModeSendedTime = 0
  2715. self.pressNumber = None
  2716.  
  2717. self.guildWarQuestionDialog = None
  2718. self.interface = None
  2719. self.targetBoard = None
  2720. self.console = None
  2721. self.mapNameShower = None
  2722. self.affectShower = None
  2723. self.playerGauge = None
  2724.  
  2725. self.stream=stream
  2726. self.interface = interfaceModule.Interface()
  2727. self.interface.MakeInterface()
  2728. self.interface.ShowDefaultWindows()
  2729.  
  2730. self.curtain = uiPhaseCurtain.PhaseCurtain()
  2731. self.curtain.speed = 0.03
  2732. self.curtain.Hide()
  2733.  
  2734. self.targetBoard = uiTarget.TargetBoard()
  2735. self.targetBoard.SetWhisperEvent(ui.__mem_func__(self.interface.OpenWhisperDialog))
  2736. self.targetBoard.Hide()
  2737.  
  2738. if app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  2739. self.uispecialStorage = SpecialStorageWindow()
  2740. self.uispecialStorage.Hide()
  2741.  
  2742. self.console = consoleModule.ConsoleWindow()
  2743. self.console.BindGameClass(self)
  2744. self.console.SetConsoleSize(wndMgr.GetScreenWidth(), 200)
  2745. self.console.Hide()
  2746.  
  2747. self.mapNameShower = uiMapNameShower.MapNameShower()
  2748. self.affectShower = uiAffectShower.AffectShower()
  2749.  
  2750. self.playerGauge = uiPlayerGauge.PlayerGauge(self)
  2751. self.playerGauge.Hide()
  2752.  
  2753. if app.ENABLE_TELEPORT_TAB:
  2754. self.teleport = uiteleport.TeleportWindow()
  2755.  
  2756. #wj 2014.1.2. ESCĹ°¸¦ ´©¸¦ ˝Ă żěĽ±ŔűŔ¸·Î DropQuestionDialog¸¦ ˛ôµµ·Ď ¸¸µéľú´Ů. ÇĎÁö¸¸ ĂłŔ˝żˇ itemDropQuestionDialog°ˇ Ľ±ľđµÇľî ŔÖÁö ľĘľĆ ERROR°ˇ ąß»ýÇĎż© initżˇĽ­ Ľ±ľđ°ú µż˝Ăżˇ ĂʱâČ­ ˝ĂĹ´.
  2757. self.itemDropQuestionDialog = None
  2758.  
  2759. self.__SetQuickSlotMode()
  2760.  
  2761. self.__ServerCommand_Build()
  2762. self.__ProcessPreservedServerCommand()
  2763.  
  2764. def __del__(self):
  2765. player.SetGameWindow(0)
  2766. net.ClearPhaseWindow(net.PHASE_WINDOW_GAME, self)
  2767. ui.ScriptWindow.__del__(self)
  2768.  
  2769. def Open(self):
  2770. app.SetFrameSkip(1)
  2771.  
  2772. self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
  2773.  
  2774. self.quickSlotPageIndex = 0
  2775. self.PickingCharacterIndex = -1
  2776. self.PickingItemIndex = -1
  2777. self.consoleEnable = False
  2778. self.isShowDebugInfo = False
  2779. self.ShowNameFlag = False
  2780.  
  2781. self.enableXMasBoom = False
  2782. self.startTimeXMasBoom = 0.0
  2783. self.indexXMasBoom = 0
  2784.  
  2785. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  2786.  
  2787. app.SetCamera(cameraDistance, cameraPitch, cameraRotation, cameraHeight)
  2788.  
  2789. constInfo.SET_DEFAULT_CAMERA_MAX_DISTANCE()
  2790. constInfo.SET_DEFAULT_CHRNAME_COLOR()
  2791. constInfo.SET_DEFAULT_FOG_LEVEL()
  2792. constInfo.SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE()
  2793. constInfo.SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS()
  2794. constInfo.SET_DEFAULT_USE_SKILL_EFFECT_ENABLE()
  2795.  
  2796. # TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  2797. constInfo.SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE()
  2798. # END_OF_TWO_HANDED_WEAPON_ATTACK_SPEED_UP
  2799.  
  2800. import event
  2801. event.SetLeftTimeString(localeInfo.UI_LEFT_TIME)
  2802.  
  2803. textTail.EnablePKTitle(constInfo.PVPMODE_ENABLE)
  2804.  
  2805. if constInfo.PVPMODE_TEST_ENABLE:
  2806. self.testPKMode = ui.TextLine()
  2807. self.testPKMode.SetFontName(localeInfo.UI_DEF_FONT)
  2808. self.testPKMode.SetPosition(0, 15)
  2809. self.testPKMode.SetWindowHorizontalAlignCenter()
  2810. self.testPKMode.SetHorizontalAlignCenter()
  2811. self.testPKMode.SetFeather()
  2812. self.testPKMode.SetOutline()
  2813. self.testPKMode.Show()
  2814.  
  2815. self.testAlignment = ui.TextLine()
  2816. self.testAlignment.SetFontName(localeInfo.UI_DEF_FONT)
  2817. self.testAlignment.SetPosition(0, 35)
  2818. self.testAlignment.SetWindowHorizontalAlignCenter()
  2819. self.testAlignment.SetHorizontalAlignCenter()
  2820. self.testAlignment.SetFeather()
  2821. self.testAlignment.SetOutline()
  2822. self.testAlignment.Show()
  2823.  
  2824. self.__BuildKeyDict()
  2825. self.__BuildDebugInfo()
  2826.  
  2827. # PRIVATE_SHOP_PRICE_LIST
  2828. uiPrivateShopBuilder.Clear()
  2829. # END_OF_PRIVATE_SHOP_PRICE_LIST
  2830.  
  2831. # UNKNOWN_UPDATE
  2832. exchange.InitTrading()
  2833. # END_OF_UNKNOWN_UPDATE
  2834.  
  2835. if debugInfo.IsDebugMode():
  2836. self.ToggleDebugInfo()
  2837.  
  2838. ## Sound
  2839. snd.SetMusicVolume(systemSetting.GetMusicVolume()*net.GetFieldMusicVolume())
  2840. snd.SetSoundVolume(systemSetting.GetSoundVolume())
  2841.  
  2842. netFieldMusicFileName = net.GetFieldMusicFileName()
  2843. if netFieldMusicFileName:
  2844. snd.FadeInMusic("BGM/" + netFieldMusicFileName)
  2845. elif musicInfo.fieldMusic != "":
  2846. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  2847.  
  2848. self.__SetQuickSlotMode()
  2849. self.__SelectQuickPage(self.quickSlotPageIndex)
  2850.  
  2851. self.SetFocus()
  2852. self.Show()
  2853. app.ShowCursor()
  2854.  
  2855. net.SendEnterGamePacket()
  2856.  
  2857. # START_GAME_ERROR_EXIT
  2858. try:
  2859. self.StartGame()
  2860. except:
  2861. import exception
  2862. exception.Abort("GameWindow.Open")
  2863. # END_OF_START_GAME_ERROR_EXIT
  2864.  
  2865. # NPC°ˇ ĹĄşę˝Ă˝şĹŰŔ¸·Î ¸¸µé Ľö ŔÖ´Â ľĆŔĚĹ۵éŔÇ ¸ń·ĎŔ» Äł˝Ě
  2866. # ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
  2867. self.cubeInformation = {}
  2868. self.currentCubeNPC = 0
  2869.  
  2870. def Close(self):
  2871. self.Hide()
  2872.  
  2873. global cameraDistance, cameraPitch, cameraRotation, cameraHeight
  2874. (cameraDistance, cameraPitch, cameraRotation, cameraHeight) = app.GetCamera()
  2875.  
  2876. if musicInfo.fieldMusic != "":
  2877. snd.FadeOutMusic("BGM/"+ musicInfo.fieldMusic)
  2878.  
  2879. self.onPressKeyDict = None
  2880. self.onClickKeyDict = None
  2881.  
  2882. chat.Close()
  2883. snd.StopAllSound()
  2884. grp.InitScreenEffect()
  2885. chr.Destroy()
  2886. textTail.Clear()
  2887. quest.Clear()
  2888. background.Destroy()
  2889. guild.Destroy()
  2890. messenger.Destroy()
  2891. skill.ClearSkillData()
  2892. wndMgr.Unlock()
  2893. mouseModule.mouseController.DeattachObject()
  2894.  
  2895. if self.guildWarQuestionDialog:
  2896. self.guildWarQuestionDialog.Close()
  2897.  
  2898. self.guildNameBoard = None
  2899. self.partyRequestQuestionDialog = None
  2900. self.partyInviteQuestionDialog = None
  2901. self.guildInviteQuestionDialog = None
  2902. self.guildWarQuestionDialog = None
  2903. self.messengerAddFriendQuestion = None
  2904.  
  2905. # UNKNOWN_UPDATE
  2906. self.itemDropQuestionDialog = None
  2907. # END_OF_UNKNOWN_UPDATE
  2908.  
  2909. # QUEST_CONFIRM
  2910. self.confirmDialog = None
  2911. # END_OF_QUEST_CONFIRM
  2912.  
  2913. self.PrintCoord = None
  2914. self.FrameRate = None
  2915. self.Pitch = None
  2916. self.Splat = None
  2917. self.TextureNum = None
  2918. self.ObjectNum = None
  2919. self.ViewDistance = None
  2920. self.PrintMousePos = None
  2921.  
  2922. self.ClearDictionary()
  2923.  
  2924. self.playerGauge = None
  2925. self.mapNameShower = None
  2926. self.affectShower = None
  2927.  
  2928. if self.console:
  2929. self.console.BindGameClass(0)
  2930. self.console.Close()
  2931. self.console=None
  2932.  
  2933. if self.targetBoard:
  2934. self.targetBoard.Destroy()
  2935. self.targetBoard = None
  2936.  
  2937. if self.interface:
  2938. self.interface.HideAllWindows()
  2939. self.interface.Close()
  2940. self.interface=None
  2941.  
  2942. player.ClearSkillDict()
  2943. player.ResetCameraRotation()
  2944.  
  2945. self.KillFocus()
  2946. app.HideCursor()
  2947.  
  2948. print "---------------------------------------------------------------------------- CLOSE GAME WINDOW"
  2949.  
  2950. def __BuildKeyDict(self):
  2951. onPressKeyDict = {}
  2952.  
  2953. ##PressKey ´Â ´©¸Ł°í ŔÖ´Â µżľČ °čĽÓ ŔűżëµÇ´Â Ĺ°ŔĚ´Ů.
  2954.  
  2955. ## ĽýŔÚ ´ÜĂŕĹ° Äü˝˝·Ôżˇ ŔĚżëµČ´Ů.(ŔĚČÄ ĽýŔڵ鵵 Äü ˝˝·Ôżë żąľŕ)
  2956. ## F12 ´Â Ŭ¶ó µđąö±×żë Ĺ°Ŕ̹ǷΠľ˛Áö ľĘ´Â °Ô ÁÁ´Ů.
  2957. onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
  2958. onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
  2959. onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
  2960. onPressKeyDict[app.DIK_4] = lambda : self.__PressNumKey(4)
  2961. onPressKeyDict[app.DIK_5] = lambda : self.__PressNumKey(5)
  2962. onPressKeyDict[app.DIK_6] = lambda : self.__PressNumKey(6)
  2963. onPressKeyDict[app.DIK_7] = lambda : self.__PressNumKey(7)
  2964. onPressKeyDict[app.DIK_8] = lambda : self.__PressNumKey(8)
  2965. onPressKeyDict[app.DIK_9] = lambda : self.__PressNumKey(9)
  2966. onPressKeyDict[app.DIK_F1] = lambda : self.__PressQuickSlot(4)
  2967. onPressKeyDict[app.DIK_F2] = lambda : self.__PressQuickSlot(5)
  2968. onPressKeyDict[app.DIK_F3] = lambda : self.__PressQuickSlot(6)
  2969. onPressKeyDict[app.DIK_F4] = lambda : self.__PressQuickSlot(7)
  2970. if app.ENABLE_TELEPORT_TAB:
  2971. onPressKeyDict[app.DIK_TAB] = lambda : self.teleport.Open()
  2972. if app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  2973. onPressKeyDict[app.DIK_U] = lambda : self.interface.ToggleKeySpecialStorageWindow()
  2974. if app.ENABLE_DUNGEON_INFO_SYSTEM:
  2975. onPressKeyDict[app.DIK_F5] = lambda : self.interface.ToggleDungeonInfoWindow()
  2976.  
  2977. onPressKeyDict[app.DIK_LALT] = lambda : self.ShowName()
  2978. onPressKeyDict[app.DIK_LCONTROL] = lambda : self.ShowMouseImage()
  2979. onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
  2980. onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
  2981.  
  2982. #Äł¸ŻĹÍ Ŕ̵żĹ°
  2983. onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
  2984. onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
  2985. onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
  2986. onPressKeyDict[app.DIK_RIGHT] = lambda : self.MoveRight()
  2987. onPressKeyDict[app.DIK_W] = lambda : self.MoveUp()
  2988. onPressKeyDict[app.DIK_S] = lambda : self.MoveDown()
  2989. onPressKeyDict[app.DIK_A] = lambda : self.MoveLeft()
  2990. onPressKeyDict[app.DIK_D] = lambda : self.MoveRight()
  2991.  
  2992. onPressKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_TO_POSITIVE)
  2993. onPressKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_TO_NEGATIVE)
  2994. #onPressKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  2995. onPressKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_TO_NEGATIVE)
  2996. onPressKeyDict[app.DIK_G] = self.__PressGKey
  2997. onPressKeyDict[app.DIK_Q] = self.__PressQKey
  2998.  
  2999. onPressKeyDict[app.DIK_NUMPAD9] = lambda: app.MovieResetCamera()
  3000. onPressKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_TO_NEGATIVE)
  3001. onPressKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_TO_POSITIVE)
  3002. onPressKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_TO_NEGATIVE)
  3003. onPressKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_TO_POSITIVE)
  3004. onPressKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_TO_NEGATIVE)
  3005. onPressKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_TO_POSITIVE)
  3006. onPressKeyDict[app.DIK_GRAVE] = lambda : self.PickUpItem()
  3007. onPressKeyDict[app.DIK_Z] = lambda : self.PickUpItem()
  3008. onPressKeyDict[app.DIK_C] = lambda state = "STATUS": self.interface.ToggleCharacterWindow(state)
  3009. onPressKeyDict[app.DIK_V] = lambda state = "SKILL": self.interface.ToggleCharacterWindow(state)
  3010. #onPressKeyDict[app.DIK_B] = lambda state = "EMOTICON": self.interface.ToggleCharacterWindow(state)
  3011. onPressKeyDict[app.DIK_N] = lambda state = "QUEST": self.interface.ToggleCharacterWindow(state)
  3012. onPressKeyDict[app.DIK_I] = lambda : self.interface.ToggleInventoryWindow()
  3013. onPressKeyDict[app.DIK_O] = lambda : self.interface.ToggleDragonSoulWindowWithNoInfo()
  3014. onPressKeyDict[app.DIK_M] = lambda : self.interface.PressMKey()
  3015. #onPressKeyDict[app.DIK_H] = lambda : self.interface.OpenHelpWindow()
  3016. onPressKeyDict[app.DIK_ADD] = lambda : self.interface.MiniMapScaleUp()
  3017. onPressKeyDict[app.DIK_SUBTRACT] = lambda : self.interface.MiniMapScaleDown()
  3018. onPressKeyDict[app.DIK_L] = lambda : self.interface.ToggleChatLogWindow()
  3019. onPressKeyDict[app.DIK_COMMA] = lambda : self.ShowConsole() # "`" key
  3020. onPressKeyDict[app.DIK_LSHIFT] = lambda : self.__SetQuickPageMode()
  3021.  
  3022. onPressKeyDict[app.DIK_J] = lambda : self.__PressJKey()
  3023. onPressKeyDict[app.DIK_H] = lambda : self.__PressHKey()
  3024. onPressKeyDict[app.DIK_B] = lambda : self.__PressBKey()
  3025. onPressKeyDict[app.DIK_F] = lambda : self.__PressFKey()
  3026.  
  3027. # CUBE_TEST
  3028. #onPressKeyDict[app.DIK_K] = lambda : self.interface.OpenCubeWindow()
  3029. # CUBE_TEST_END
  3030.  
  3031. self.onPressKeyDict = onPressKeyDict
  3032.  
  3033. onClickKeyDict = {}
  3034. onClickKeyDict[app.DIK_UP] = lambda : self.StopUp()
  3035. onClickKeyDict[app.DIK_DOWN] = lambda : self.StopDown()
  3036. onClickKeyDict[app.DIK_LEFT] = lambda : self.StopLeft()
  3037. onClickKeyDict[app.DIK_RIGHT] = lambda : self.StopRight()
  3038. onClickKeyDict[app.DIK_SPACE] = lambda : self.EndAttack()
  3039.  
  3040. onClickKeyDict[app.DIK_W] = lambda : self.StopUp()
  3041. onClickKeyDict[app.DIK_S] = lambda : self.StopDown()
  3042. onClickKeyDict[app.DIK_A] = lambda : self.StopLeft()
  3043. onClickKeyDict[app.DIK_D] = lambda : self.StopRight()
  3044. onClickKeyDict[app.DIK_Q] = lambda: app.RotateCamera(app.CAMERA_STOP)
  3045. onClickKeyDict[app.DIK_E] = lambda: app.RotateCamera(app.CAMERA_STOP)
  3046. onClickKeyDict[app.DIK_R] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  3047. onClickKeyDict[app.DIK_F] = lambda: app.ZoomCamera(app.CAMERA_STOP)
  3048. onClickKeyDict[app.DIK_T] = lambda: app.PitchCamera(app.CAMERA_STOP)
  3049. onClickKeyDict[app.DIK_G] = lambda: self.__ReleaseGKey()
  3050. onClickKeyDict[app.DIK_NUMPAD4] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  3051. onClickKeyDict[app.DIK_NUMPAD6] = lambda: app.MovieRotateCamera(app.CAMERA_STOP)
  3052. onClickKeyDict[app.DIK_PGUP] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  3053. onClickKeyDict[app.DIK_PGDN] = lambda: app.MovieZoomCamera(app.CAMERA_STOP)
  3054. onClickKeyDict[app.DIK_NUMPAD8] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  3055. onClickKeyDict[app.DIK_NUMPAD2] = lambda: app.MoviePitchCamera(app.CAMERA_STOP)
  3056. onClickKeyDict[app.DIK_LALT] = lambda: self.HideName()
  3057. onClickKeyDict[app.DIK_LCONTROL] = lambda: self.HideMouseImage()
  3058. onClickKeyDict[app.DIK_LSHIFT] = lambda: self.__SetQuickSlotMode()
  3059.  
  3060. #if constInfo.PVPMODE_ACCELKEY_ENABLE:
  3061. # onClickKeyDict[app.DIK_B] = lambda: self.ChangePKMode()
  3062.  
  3063. self.onClickKeyDict=onClickKeyDict
  3064.  
  3065. def __PressNumKey(self,num):
  3066. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3067.  
  3068. if num >= 1 and num <= 9:
  3069. if(chrmgr.IsPossibleEmoticon(-1)):
  3070. chrmgr.SetEmoticon(-1,int(num)-1)
  3071. net.SendEmoticon(int(num)-1)
  3072. else:
  3073. if num >= 1 and num <= 4:
  3074. self.pressNumber(num-1)
  3075.  
  3076. def __ClickBKey(self):
  3077. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3078. return
  3079. else:
  3080. if constInfo.PVPMODE_ACCELKEY_ENABLE:
  3081. self.ChangePKMode()
  3082.  
  3083. def __PressJKey(self):
  3084. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3085. if player.IsMountingHorse():
  3086. net.SendChatPacket("/unmount")
  3087. else:
  3088. #net.SendChatPacket("/user_horse_ride")
  3089. if not uiPrivateShopBuilder.IsBuildingPrivateShop():
  3090. for i in xrange(player.INVENTORY_PAGE_SIZE):
  3091. if player.GetItemIndex(i) in (71114, 71116, 71118, 71120):
  3092. net.SendItemUsePacket(i)
  3093. break
  3094.  
  3095. def __PressHKey(self):
  3096. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3097. net.SendChatPacket("/user_horse_ride")
  3098. else:
  3099. self.interface.OpenHelpWindow()
  3100.  
  3101. def __PressBKey(self):
  3102. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3103. net.SendChatPacket("/user_horse_back")
  3104. else:
  3105. state = "EMOTICON"
  3106. self.interface.ToggleCharacterWindow(state)
  3107.  
  3108. def __PressFKey(self):
  3109. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3110. net.SendChatPacket("/user_horse_feed")
  3111. else:
  3112. app.ZoomCamera(app.CAMERA_TO_POSITIVE)
  3113.  
  3114. def __PressGKey(self):
  3115. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3116. net.SendChatPacket("/ride")
  3117. else:
  3118. if self.ShowNameFlag:
  3119. self.interface.ToggleGuildWindow()
  3120. else:
  3121. app.PitchCamera(app.CAMERA_TO_POSITIVE)
  3122.  
  3123. def __ReleaseGKey(self):
  3124. app.PitchCamera(app.CAMERA_STOP)
  3125.  
  3126. def __PressQKey(self):
  3127. if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
  3128. if 0==interfaceModule.IsQBHide:
  3129. interfaceModule.IsQBHide = 1
  3130. self.interface.HideAllQuestButton()
  3131. else:
  3132. interfaceModule.IsQBHide = 0
  3133. self.interface.ShowAllQuestButton()
  3134. else:
  3135. app.RotateCamera(app.CAMERA_TO_NEGATIVE)
  3136.  
  3137. def __SetQuickSlotMode(self):
  3138. self.pressNumber=ui.__mem_func__(self.__PressQuickSlot)
  3139.  
  3140. def __SetQuickPageMode(self):
  3141. self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
  3142.  
  3143. def __PressQuickSlot(self, localSlotIndex):
  3144. if localeInfo.IsARABIC():
  3145. if 0 <= localSlotIndex and localSlotIndex < 4:
  3146. player.RequestUseLocalQuickSlot(3-localSlotIndex)
  3147. else:
  3148. player.RequestUseLocalQuickSlot(11-localSlotIndex)
  3149. else:
  3150. player.RequestUseLocalQuickSlot(localSlotIndex)
  3151.  
  3152. def __SelectQuickPage(self, pageIndex):
  3153. self.quickSlotPageIndex = pageIndex
  3154. player.SetQuickPage(pageIndex)
  3155.  
  3156. def ToggleDebugInfo(self):
  3157. self.isShowDebugInfo = not self.isShowDebugInfo
  3158.  
  3159. if self.isShowDebugInfo:
  3160. self.PrintCoord.Show()
  3161. self.FrameRate.Show()
  3162. self.Pitch.Show()
  3163. self.Splat.Show()
  3164. self.TextureNum.Show()
  3165. self.ObjectNum.Show()
  3166. self.ViewDistance.Show()
  3167. self.PrintMousePos.Show()
  3168. else:
  3169. self.PrintCoord.Hide()
  3170. self.FrameRate.Hide()
  3171. self.Pitch.Hide()
  3172. self.Splat.Hide()
  3173. self.TextureNum.Hide()
  3174. self.ObjectNum.Hide()
  3175. self.ViewDistance.Hide()
  3176. self.PrintMousePos.Hide()
  3177.  
  3178. def __BuildDebugInfo(self):
  3179. ## Character Position Coordinate
  3180. self.PrintCoord = ui.TextLine()
  3181. self.PrintCoord.SetFontName(localeInfo.UI_DEF_FONT)
  3182. self.PrintCoord.SetPosition(wndMgr.GetScreenWidth() - 270, 0)
  3183.  
  3184. ## Frame Rate
  3185. self.FrameRate = ui.TextLine()
  3186. self.FrameRate.SetFontName(localeInfo.UI_DEF_FONT)
  3187. self.FrameRate.SetPosition(wndMgr.GetScreenWidth() - 270, 20)
  3188.  
  3189. ## Camera Pitch
  3190. self.Pitch = ui.TextLine()
  3191. self.Pitch.SetFontName(localeInfo.UI_DEF_FONT)
  3192. self.Pitch.SetPosition(wndMgr.GetScreenWidth() - 270, 40)
  3193.  
  3194. ## Splat
  3195. self.Splat = ui.TextLine()
  3196. self.Splat.SetFontName(localeInfo.UI_DEF_FONT)
  3197. self.Splat.SetPosition(wndMgr.GetScreenWidth() - 270, 60)
  3198.  
  3199. ##
  3200. self.PrintMousePos = ui.TextLine()
  3201. self.PrintMousePos.SetFontName(localeInfo.UI_DEF_FONT)
  3202. self.PrintMousePos.SetPosition(wndMgr.GetScreenWidth() - 270, 80)
  3203.  
  3204. # TextureNum
  3205. self.TextureNum = ui.TextLine()
  3206. self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
  3207. self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
  3208.  
  3209. # żŔşęÁ§Ć® ±×¸®´Â °łĽö
  3210. self.ObjectNum = ui.TextLine()
  3211. self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
  3212. self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
  3213.  
  3214. # ˝Ăľß°Ĺ¸®
  3215. self.ViewDistance = ui.TextLine()
  3216. self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
  3217. self.ViewDistance.SetPosition(0, 0)
  3218.  
  3219. def __NotifyError(self, msg):
  3220. chat.AppendChat(chat.CHAT_TYPE_INFO, msg)
  3221.  
  3222. def ChangePKMode(self):
  3223.  
  3224. if not app.IsPressed(app.DIK_LCONTROL):
  3225. return
  3226.  
  3227. if player.GetStatus(player.LEVEL)<constInfo.PVPMODE_PROTECTED_LEVEL:
  3228. self.__NotifyError(localeInfo.OPTION_PVPMODE_PROTECT % (constInfo.PVPMODE_PROTECTED_LEVEL))
  3229. return
  3230.  
  3231. curTime = app.GetTime()
  3232. if curTime - self.lastPKModeSendedTime < constInfo.PVPMODE_ACCELKEY_DELAY:
  3233. return
  3234.  
  3235. self.lastPKModeSendedTime = curTime
  3236.  
  3237. curPKMode = player.GetPKMode()
  3238. nextPKMode = curPKMode + 1
  3239. if nextPKMode == player.PK_MODE_PROTECT:
  3240. if 0 == player.GetGuildID():
  3241. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_CANNOT_SET_GUILD_MODE)
  3242. nextPKMode = 0
  3243. else:
  3244. nextPKMode = player.PK_MODE_GUILD
  3245.  
  3246. elif nextPKMode == player.PK_MODE_MAX_NUM:
  3247. nextPKMode = 0
  3248.  
  3249. net.SendChatPacket("/PKMode " + str(nextPKMode))
  3250. print "/PKMode " + str(nextPKMode)
  3251.  
  3252. def OnChangePKMode(self):
  3253.  
  3254. self.interface.OnChangePKMode()
  3255.  
  3256. try:
  3257. self.__NotifyError(localeInfo.OPTION_PVPMODE_MESSAGE_DICT[player.GetPKMode()])
  3258. except KeyError:
  3259. print "UNKNOWN PVPMode[%d]" % (player.GetPKMode())
  3260.  
  3261. if constInfo.PVPMODE_TEST_ENABLE:
  3262. curPKMode = player.GetPKMode()
  3263. alignment, grade = chr.testGetPKData()
  3264. self.pkModeNameDict = { 0 : "PEACE", 1 : "REVENGE", 2 : "FREE", 3 : "PROTECT", }
  3265. self.testPKMode.SetText("Current PK Mode : " + self.pkModeNameDict.get(curPKMode, "UNKNOWN"))
  3266. self.testAlignment.SetText("Current Alignment : " + str(alignment) + " (" + localeInfo.TITLE_NAME_LIST[grade] + ")")
  3267.  
  3268. ###############################################################################################
  3269. ###############################################################################################
  3270. ## Game Callback Functions
  3271.  
  3272. # Start
  3273. def StartGame(self):
  3274. self.RefreshInventory()
  3275. self.RefreshEquipment()
  3276. self.RefreshCharacter()
  3277. self.RefreshSkill()
  3278.  
  3279. # Refresh
  3280. def CheckGameButton(self):
  3281. if self.interface:
  3282. self.interface.CheckGameButton()
  3283.  
  3284. def RefreshAlignment(self):
  3285. self.interface.RefreshAlignment()
  3286.  
  3287. def RefreshStatus(self):
  3288. self.CheckGameButton()
  3289.  
  3290. if self.interface:
  3291. self.interface.RefreshStatus()
  3292.  
  3293. if self.playerGauge:
  3294. self.playerGauge.RefreshGauge()
  3295.  
  3296. def RefreshStamina(self):
  3297. self.interface.RefreshStamina()
  3298.  
  3299. def RefreshSkill(self):
  3300. self.CheckGameButton()
  3301. if self.interface:
  3302. self.interface.RefreshSkill()
  3303.  
  3304. def RefreshQuest(self):
  3305. self.interface.RefreshQuest()
  3306.  
  3307. def RefreshMessenger(self):
  3308. self.interface.RefreshMessenger()
  3309.  
  3310. def RefreshGuildInfoPage(self):
  3311. self.interface.RefreshGuildInfoPage()
  3312.  
  3313. def RefreshGuildBoardPage(self):
  3314. self.interface.RefreshGuildBoardPage()
  3315.  
  3316. def RefreshGuildMemberPage(self):
  3317. self.interface.RefreshGuildMemberPage()
  3318.  
  3319. def RefreshGuildMemberPageGradeComboBox(self):
  3320. self.interface.RefreshGuildMemberPageGradeComboBox()
  3321.  
  3322. def RefreshGuildSkillPage(self):
  3323. self.interface.RefreshGuildSkillPage()
  3324.  
  3325. def RefreshGuildGradePage(self):
  3326. self.interface.RefreshGuildGradePage()
  3327.  
  3328. def RefreshMobile(self):
  3329. if self.interface:
  3330. self.interface.RefreshMobile()
  3331.  
  3332. def OnMobileAuthority(self):
  3333. self.interface.OnMobileAuthority()
  3334.  
  3335. def OnBlockMode(self, mode):
  3336. self.interface.OnBlockMode(mode)
  3337.  
  3338. if app.ENABLE_TELEPORT_TAB:
  3339. def OpenQuestWindow(self, skin, idx):
  3340. import constInfo
  3341. if constInfo.INPUT_IGNORE == 1:
  3342. net.SendQuestInputStringPacket(str(constInfo.SendString))
  3343. constInfo.INPUT_IGNORE = 0
  3344. else:
  3345. self.interface.OpenQuestWindow(skin, idx)
  3346. else:
  3347. def OpenQuestWindow(self, skin, idx):
  3348. self.interface.OpenQuestWindow(skin, idx)
  3349.  
  3350. def AskGuildName(self):
  3351.  
  3352. guildNameBoard = uiCommon.InputDialog()
  3353. guildNameBoard.SetTitle(localeInfo.GUILD_NAME)
  3354. guildNameBoard.SetAcceptEvent(ui.__mem_func__(self.ConfirmGuildName))
  3355. guildNameBoard.SetCancelEvent(ui.__mem_func__(self.CancelGuildName))
  3356. guildNameBoard.Open()
  3357.  
  3358. self.guildNameBoard = guildNameBoard
  3359.  
  3360. def ConfirmGuildName(self):
  3361. guildName = self.guildNameBoard.GetText()
  3362. if not guildName:
  3363. return
  3364.  
  3365. if net.IsInsultIn(guildName):
  3366. self.PopupMessage(localeInfo.GUILD_CREATE_ERROR_INSULT_NAME)
  3367. return
  3368.  
  3369. net.SendAnswerMakeGuildPacket(guildName)
  3370. self.guildNameBoard.Close()
  3371. self.guildNameBoard = None
  3372. return True
  3373.  
  3374. def CancelGuildName(self):
  3375. self.guildNameBoard.Close()
  3376. self.guildNameBoard = None
  3377. return True
  3378.  
  3379. ## Refine
  3380. def PopupMessage(self, msg):
  3381. self.stream.popupWindow.Close()
  3382. self.stream.popupWindow.Open(msg, 0, localeInfo.UI_OK)
  3383.  
  3384. def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, type=0):
  3385. self.interface.OpenRefineDialog(targetItemPos, nextGradeItemVnum, cost, prob, type)
  3386.  
  3387. def AppendMaterialToRefineDialog(self, vnum, count):
  3388. self.interface.AppendMaterialToRefineDialog(vnum, count)
  3389.  
  3390. def RunUseSkillEvent(self, slotIndex, coolTime):
  3391. self.interface.OnUseSkill(slotIndex, coolTime)
  3392.  
  3393. def ClearAffects(self):
  3394. self.affectShower.ClearAffects()
  3395.  
  3396. def SetAffect(self, affect):
  3397. self.affectShower.SetAffect(affect)
  3398.  
  3399. def ResetAffect(self, affect):
  3400. self.affectShower.ResetAffect(affect)
  3401.  
  3402. # UNKNOWN_UPDATE
  3403. def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
  3404. self.affectShower.BINARY_NEW_AddAffect(type, pointIdx, value, duration)
  3405. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  3406. self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
  3407. elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
  3408. self.BINARY_DragonSoulGiveQuilification()
  3409.  
  3410. def BINARY_NEW_RemoveAffect(self, type, pointIdx):
  3411. self.affectShower.BINARY_NEW_RemoveAffect(type, pointIdx)
  3412. if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
  3413. self.interface.DragonSoulDeactivate()
  3414.  
  3415.  
  3416.  
  3417. # END_OF_UNKNOWN_UPDATE
  3418.  
  3419. def ActivateSkillSlot(self, slotIndex):
  3420. if self.interface:
  3421. self.interface.OnActivateSkill(slotIndex)
  3422.  
  3423. def DeactivateSkillSlot(self, slotIndex):
  3424. if self.interface:
  3425. self.interface.OnDeactivateSkill(slotIndex)
  3426.  
  3427. def RefreshEquipment(self):
  3428. if self.interface:
  3429. self.interface.RefreshInventory()
  3430.  
  3431. def RefreshInventory(self):
  3432. if self.interface:
  3433. self.interface.RefreshInventory()
  3434.  
  3435. def RefreshCharacter(self):
  3436. if self.interface:
  3437. self.interface.RefreshCharacter()
  3438.  
  3439. def OnGameOver(self):
  3440. self.CloseTargetBoard()
  3441. self.OpenRestartDialog()
  3442.  
  3443. def OpenRestartDialog(self):
  3444. self.interface.OpenRestartDialog()
  3445.  
  3446. def ChangeCurrentSkill(self, skillSlotNumber):
  3447. self.interface.OnChangeCurrentSkill(skillSlotNumber)
  3448.  
  3449. ## TargetBoard
  3450. def SetPCTargetBoard(self, vid, name):
  3451. self.targetBoard.Open(vid, name)
  3452.  
  3453. if app.IsPressed(app.DIK_LCONTROL):
  3454.  
  3455. if not player.IsSameEmpire(vid):
  3456. return
  3457.  
  3458. if player.IsMainCharacterIndex(vid):
  3459. return
  3460. elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(vid):
  3461. return
  3462.  
  3463. self.interface.OpenWhisperDialog(name)
  3464.  
  3465. def RefreshTargetBoardByVID(self, vid):
  3466. self.targetBoard.RefreshByVID(vid)
  3467.  
  3468. def RefreshTargetBoardByName(self, name):
  3469. self.targetBoard.RefreshByName(name)
  3470.  
  3471. def __RefreshTargetBoard(self):
  3472. self.targetBoard.Refresh()
  3473.  
  3474. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  3475. def SetHPTargetBoard(self, vid, hpPercentage, iMinHP, iMaxHP):
  3476. if vid != self.targetBoard.GetTargetVID():
  3477. self.targetBoard.ResetTargetBoard()
  3478. self.targetBoard.SetEnemyVID(vid)
  3479.  
  3480. self.targetBoard.SetHP(hpPercentage, iMinHP, iMaxHP)
  3481. self.targetBoard.Show()
  3482. else:
  3483. def SetHPTargetBoard(self, vid, hpPercentage):
  3484. if vid != self.targetBoard.GetTargetVID():
  3485. self.targetBoard.ResetTargetBoard()
  3486. self.targetBoard.SetEnemyVID(vid)
  3487.  
  3488. self.targetBoard.SetHP(hpPercentage)
  3489. self.targetBoard.Show()
  3490.  
  3491. def CloseTargetBoardIfDifferent(self, vid):
  3492. if vid != self.targetBoard.GetTargetVID():
  3493. self.targetBoard.Close()
  3494.  
  3495. def CloseTargetBoard(self):
  3496. self.targetBoard.Close()
  3497.  
  3498. ## View Equipment
  3499. def OpenEquipmentDialog(self, vid):
  3500. self.interface.OpenEquipmentDialog(vid)
  3501.  
  3502. def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
  3503. self.interface.SetEquipmentDialogItem(vid, slotIndex, vnum, count)
  3504.  
  3505. def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
  3506. self.interface.SetEquipmentDialogSocket(vid, slotIndex, socketIndex, value)
  3507.  
  3508. def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
  3509. self.interface.SetEquipmentDialogAttr(vid, slotIndex, attrIndex, type, value)
  3510.  
  3511. # SHOW_LOCAL_MAP_NAME
  3512. def ShowMapName(self, mapName, x, y):
  3513.  
  3514. if self.mapNameShower:
  3515. self.mapNameShower.ShowMapName(mapName, x, y)
  3516.  
  3517. if self.interface:
  3518. self.interface.SetMapName(mapName)
  3519. # END_OF_SHOW_LOCAL_MAP_NAME
  3520.  
  3521. def BINARY_OpenAtlasWindow(self):
  3522. self.interface.BINARY_OpenAtlasWindow()
  3523.  
  3524. ## Chat
  3525. def OnRecvWhisper(self, mode, name, line):
  3526. if mode == chat.WHISPER_TYPE_GM:
  3527. self.interface.RegisterGameMasterName(name)
  3528. chat.AppendWhisper(mode, name, line)
  3529. self.interface.RecvWhisper(name)
  3530.  
  3531. def OnRecvWhisperSystemMessage(self, mode, name, line):
  3532. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
  3533. self.interface.RecvWhisper(name)
  3534.  
  3535. def OnRecvWhisperError(self, mode, name, line):
  3536. if localeInfo.WHISPER_ERROR.has_key(mode):
  3537. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, localeInfo.WHISPER_ERROR[mode](name))
  3538. else:
  3539. chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, "Whisper Unknown Error(mode=%d, name=%s)" % (mode, name))
  3540. self.interface.RecvWhisper(name)
  3541.  
  3542. def RecvWhisper(self, name):
  3543. self.interface.RecvWhisper(name)
  3544.  
  3545. def OnPickMoney(self, money):
  3546. if app.ENABLE_SHOW_CHAT_EXP:
  3547. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_MONEY % (localeInfo.NumberToExp(money)))
  3548. else:
  3549. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_MONEY % (money))
  3550.  
  3551. if app.ENABLE_SHOW_CHAT_EXP:
  3552. def OnEarnExp(self, exp):
  3553. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_PICK_EXP % (localeInfo.NumberToExp(exp)))
  3554.  
  3555. def OnShopError(self, type):
  3556. try:
  3557. self.PopupMessage(localeInfo.SHOP_ERROR_DICT[type])
  3558. except KeyError:
  3559. self.PopupMessage(localeInfo.SHOP_ERROR_UNKNOWN % (type))
  3560.  
  3561. def OnSafeBoxError(self):
  3562. self.PopupMessage(localeInfo.SAFEBOX_ERROR)
  3563.  
  3564. def OnFishingSuccess(self, isFish, fishName):
  3565. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_SUCCESS(isFish, fishName), 2000)
  3566.  
  3567. # ADD_FISHING_MESSAGE
  3568. def OnFishingNotifyUnknown(self):
  3569. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_UNKNOWN)
  3570.  
  3571. def OnFishingWrongPlace(self):
  3572. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_WRONG_PLACE)
  3573. # END_OF_ADD_FISHING_MESSAGE
  3574.  
  3575. def OnFishingNotify(self, isFish, fishName):
  3576. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.FISHING_NOTIFY(isFish, fishName))
  3577.  
  3578. def OnFishingFailure(self):
  3579. chat.AppendChatWithDelay(chat.CHAT_TYPE_INFO, localeInfo.FISHING_FAILURE, 2000)
  3580.  
  3581. def OnCannotPickItem(self):
  3582. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_PICK_ITEM)
  3583.  
  3584. # MINING
  3585. def OnCannotMining(self):
  3586. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GAME_CANNOT_MINING)
  3587. # END_OF_MINING
  3588.  
  3589. def OnCannotUseSkill(self, vid, type):
  3590. if localeInfo.USE_SKILL_ERROR_TAIL_DICT.has_key(type):
  3591. textTail.RegisterInfoTail(vid, localeInfo.USE_SKILL_ERROR_TAIL_DICT[type])
  3592.  
  3593. if localeInfo.USE_SKILL_ERROR_CHAT_DICT.has_key(type):
  3594. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_SKILL_ERROR_CHAT_DICT[type])
  3595.  
  3596. def OnCannotShotError(self, vid, type):
  3597. textTail.RegisterInfoTail(vid, localeInfo.SHOT_ERROR_TAIL_DICT.get(type, localeInfo.SHOT_ERROR_UNKNOWN % (type)))
  3598.  
  3599. ## PointReset
  3600. def StartPointReset(self):
  3601. self.interface.OpenPointResetDialog()
  3602.  
  3603. ## Shop
  3604. def StartShop(self, vid):
  3605. self.interface.OpenShopDialog(vid)
  3606.  
  3607. def EndShop(self):
  3608. self.interface.CloseShopDialog()
  3609.  
  3610. def RefreshShop(self):
  3611. self.interface.RefreshShopDialog()
  3612.  
  3613. def SetShopSellingPrice(self, Price):
  3614. pass
  3615.  
  3616. ## Exchange
  3617. def StartExchange(self):
  3618. self.interface.StartExchange()
  3619.  
  3620. def EndExchange(self):
  3621. self.interface.EndExchange()
  3622.  
  3623. def RefreshExchange(self):
  3624. self.interface.RefreshExchange()
  3625.  
  3626. ## Party
  3627. def RecvPartyInviteQuestion(self, leaderVID, leaderName):
  3628. partyInviteQuestionDialog = uiCommon.QuestionDialog()
  3629. partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
  3630. partyInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerPartyInvite(arg))
  3631. partyInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerPartyInvite(arg))
  3632. partyInviteQuestionDialog.Open()
  3633. partyInviteQuestionDialog.partyLeaderVID = leaderVID
  3634. self.partyInviteQuestionDialog = partyInviteQuestionDialog
  3635.  
  3636. def AnswerPartyInvite(self, answer):
  3637.  
  3638. if not self.partyInviteQuestionDialog:
  3639. return
  3640.  
  3641. partyLeaderVID = self.partyInviteQuestionDialog.partyLeaderVID
  3642.  
  3643. distance = player.GetCharacterDistance(partyLeaderVID)
  3644. if distance < 0.0 or distance > 5000:
  3645. answer = False
  3646.  
  3647. net.SendPartyInviteAnswerPacket(partyLeaderVID, answer)
  3648.  
  3649. self.partyInviteQuestionDialog.Close()
  3650. self.partyInviteQuestionDialog = None
  3651.  
  3652. def AddPartyMember(self, pid, name):
  3653. self.interface.AddPartyMember(pid, name)
  3654.  
  3655. def UpdatePartyMemberInfo(self, pid):
  3656. self.interface.UpdatePartyMemberInfo(pid)
  3657.  
  3658. def RemovePartyMember(self, pid):
  3659. self.interface.RemovePartyMember(pid)
  3660. self.__RefreshTargetBoard()
  3661.  
  3662. def LinkPartyMember(self, pid, vid):
  3663. self.interface.LinkPartyMember(pid, vid)
  3664.  
  3665. def UnlinkPartyMember(self, pid):
  3666. self.interface.UnlinkPartyMember(pid)
  3667.  
  3668. def UnlinkAllPartyMember(self):
  3669. self.interface.UnlinkAllPartyMember()
  3670.  
  3671. def ExitParty(self):
  3672. self.interface.ExitParty()
  3673. self.RefreshTargetBoardByVID(self.targetBoard.GetTargetVID())
  3674.  
  3675. def ChangePartyParameter(self, distributionMode):
  3676. self.interface.ChangePartyParameter(distributionMode)
  3677.  
  3678. ## Messenger
  3679. def OnMessengerAddFriendQuestion(self, name):
  3680. messengerAddFriendQuestion = uiCommon.QuestionDialog2()
  3681. messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))
  3682. messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
  3683. messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
  3684. messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
  3685. messengerAddFriendQuestion.Open()
  3686. messengerAddFriendQuestion.name = name
  3687. self.messengerAddFriendQuestion = messengerAddFriendQuestion
  3688.  
  3689. def OnAcceptAddFriend(self):
  3690. name = self.messengerAddFriendQuestion.name
  3691. net.SendChatPacket("/messenger_auth y " + name)
  3692. self.OnCloseAddFriendQuestionDialog()
  3693. return True
  3694.  
  3695. def OnDenyAddFriend(self):
  3696. name = self.messengerAddFriendQuestion.name
  3697. net.SendChatPacket("/messenger_auth n " + name)
  3698. self.OnCloseAddFriendQuestionDialog()
  3699. return True
  3700.  
  3701. def OnCloseAddFriendQuestionDialog(self):
  3702. self.messengerAddFriendQuestion.Close()
  3703. self.messengerAddFriendQuestion = None
  3704. return True
  3705.  
  3706. ## SafeBox
  3707. def OpenSafeboxWindow(self, size):
  3708. self.interface.OpenSafeboxWindow(size)
  3709.  
  3710. def RefreshSafebox(self):
  3711. self.interface.RefreshSafebox()
  3712.  
  3713. def RefreshSafeboxMoney(self):
  3714. self.interface.RefreshSafeboxMoney()
  3715.  
  3716. # ITEM_MALL
  3717. def OpenMallWindow(self, size):
  3718. self.interface.OpenMallWindow(size)
  3719.  
  3720. def RefreshMall(self):
  3721. self.interface.RefreshMall()
  3722. # END_OF_ITEM_MALL
  3723.  
  3724. ## Guild
  3725. def RecvGuildInviteQuestion(self, guildID, guildName):
  3726. guildInviteQuestionDialog = uiCommon.QuestionDialog()
  3727. guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
  3728. guildInviteQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerGuildInvite(arg))
  3729. guildInviteQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerGuildInvite(arg))
  3730. guildInviteQuestionDialog.Open()
  3731. guildInviteQuestionDialog.guildID = guildID
  3732. self.guildInviteQuestionDialog = guildInviteQuestionDialog
  3733.  
  3734. def AnswerGuildInvite(self, answer):
  3735.  
  3736. if not self.guildInviteQuestionDialog:
  3737. return
  3738.  
  3739. guildLeaderVID = self.guildInviteQuestionDialog.guildID
  3740. net.SendGuildInviteAnswerPacket(guildLeaderVID, answer)
  3741.  
  3742. self.guildInviteQuestionDialog.Close()
  3743. self.guildInviteQuestionDialog = None
  3744.  
  3745.  
  3746. def DeleteGuild(self):
  3747. self.interface.DeleteGuild()
  3748.  
  3749. ## Clock
  3750. def ShowClock(self, second):
  3751. self.interface.ShowClock(second)
  3752.  
  3753. def HideClock(self):
  3754. self.interface.HideClock()
  3755.  
  3756. ## Emotion
  3757. def BINARY_ActEmotion(self, emotionIndex):
  3758. if self.interface.wndCharacter:
  3759. self.interface.wndCharacter.ActEmotion(emotionIndex)
  3760.  
  3761. ###############################################################################################
  3762. ###############################################################################################
  3763. ## Keyboard Functions
  3764.  
  3765. def CheckFocus(self):
  3766. if False == self.IsFocus():
  3767. if True == self.interface.IsOpenChat():
  3768. self.interface.ToggleChat()
  3769.  
  3770. self.SetFocus()
  3771.  
  3772. def SaveScreen(self):
  3773. print "save screen"
  3774.  
  3775. # SCREENSHOT_CWDSAVE
  3776. if SCREENSHOT_CWDSAVE:
  3777. if not os.path.exists(os.getcwd()+os.sep+"screenshot"):
  3778. os.mkdir(os.getcwd()+os.sep+"screenshot")
  3779.  
  3780. (succeeded, name) = grp.SaveScreenShotToPath(os.getcwd()+os.sep+"screenshot"+os.sep)
  3781. elif SCREENSHOT_DIR:
  3782. (succeeded, name) = grp.SaveScreenShot(SCREENSHOT_DIR)
  3783. else:
  3784. (succeeded, name) = grp.SaveScreenShot()
  3785. # END_OF_SCREENSHOT_CWDSAVE
  3786.  
  3787. if succeeded:
  3788. pass
  3789. """
  3790. chat.AppendChat(chat.CHAT_TYPE_INFO, name + localeInfo.SCREENSHOT_SAVE1)
  3791. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE2)
  3792. """
  3793. else:
  3794. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SCREENSHOT_SAVE_FAILURE)
  3795.  
  3796. def ShowConsole(self):
  3797. if debugInfo.IsDebugMode() or True == self.consoleEnable:
  3798. player.EndKeyWalkingImmediately()
  3799. self.console.OpenWindow()
  3800.  
  3801. def ShowName(self):
  3802. self.ShowNameFlag = True
  3803. self.playerGauge.EnableShowAlways()
  3804. player.SetQuickPage(self.quickSlotPageIndex+1)
  3805.  
  3806. # ADD_ALWAYS_SHOW_NAME
  3807. def __IsShowName(self):
  3808. if app.ENABLE_SHOW_JUST_ITEM_TEXT_TAIL:
  3809. if systemSetting.IsAlwaysShowName() == 0:
  3810. return True
  3811. else:
  3812. if systemSetting.IsAlwaysShowName():
  3813. return True
  3814.  
  3815. if self.ShowNameFlag:
  3816. return True
  3817.  
  3818. return False
  3819.  
  3820. if app.ENABLE_SHOW_JUST_ITEM_TEXT_TAIL:
  3821. def __IsShowNameItem(self):
  3822. if systemSetting.IsAlwaysShowName() == 1:
  3823. return True
  3824.  
  3825. return False
  3826. # END_OF_ADD_ALWAYS_SHOW_NAME
  3827.  
  3828. def HideName(self):
  3829. self.ShowNameFlag = False
  3830. self.playerGauge.DisableShowAlways()
  3831. player.SetQuickPage(self.quickSlotPageIndex)
  3832.  
  3833. def ShowMouseImage(self):
  3834. self.interface.ShowMouseImage()
  3835.  
  3836. def HideMouseImage(self):
  3837. self.interface.HideMouseImage()
  3838.  
  3839. def StartAttack(self):
  3840. player.SetAttackKeyState(True)
  3841.  
  3842. def EndAttack(self):
  3843. player.SetAttackKeyState(False)
  3844.  
  3845. def MoveUp(self):
  3846. player.SetSingleDIKKeyState(app.DIK_UP, True)
  3847.  
  3848. def MoveDown(self):
  3849. player.SetSingleDIKKeyState(app.DIK_DOWN, True)
  3850.  
  3851. def MoveLeft(self):
  3852. player.SetSingleDIKKeyState(app.DIK_LEFT, True)
  3853.  
  3854. def MoveRight(self):
  3855. player.SetSingleDIKKeyState(app.DIK_RIGHT, True)
  3856.  
  3857. def StopUp(self):
  3858. player.SetSingleDIKKeyState(app.DIK_UP, False)
  3859.  
  3860. def StopDown(self):
  3861. player.SetSingleDIKKeyState(app.DIK_DOWN, False)
  3862.  
  3863. def StopLeft(self):
  3864. player.SetSingleDIKKeyState(app.DIK_LEFT, False)
  3865.  
  3866. def StopRight(self):
  3867. player.SetSingleDIKKeyState(app.DIK_RIGHT, False)
  3868.  
  3869. def PickUpItem(self):
  3870. if app.ENABLE_INSTANT_PICKUP:
  3871. player.PickCloseItemVector()
  3872. else:
  3873. player.PickCloseItem()
  3874.  
  3875. ###############################################################################################
  3876. ###############################################################################################
  3877. ## Event Handler
  3878.  
  3879. def OnKeyDown(self, key):
  3880. if self.interface.wndWeb and self.interface.wndWeb.IsShow():
  3881. return
  3882.  
  3883. if key == app.DIK_ESC:
  3884. self.RequestDropItem(False)
  3885. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  3886.  
  3887. try:
  3888. self.onPressKeyDict[key]()
  3889. except KeyError:
  3890. pass
  3891. except:
  3892. raise
  3893.  
  3894. return True
  3895.  
  3896. def OnKeyUp(self, key):
  3897. try:
  3898. self.onClickKeyDict[key]()
  3899. except KeyError:
  3900. pass
  3901. except:
  3902. raise
  3903.  
  3904. return True
  3905.  
  3906. def OnMouseLeftButtonDown(self):
  3907. if self.interface.BUILD_OnMouseLeftButtonDown():
  3908. return
  3909.  
  3910. if mouseModule.mouseController.isAttached():
  3911. self.CheckFocus()
  3912. else:
  3913. hyperlink = ui.GetHyperlink()
  3914. if hyperlink:
  3915. return
  3916. else:
  3917. self.CheckFocus()
  3918. player.SetMouseState(player.MBT_LEFT, player.MBS_PRESS);
  3919.  
  3920. return True
  3921.  
  3922. def OnMouseLeftButtonUp(self):
  3923.  
  3924. if self.interface.BUILD_OnMouseLeftButtonUp():
  3925. return
  3926.  
  3927. if mouseModule.mouseController.isAttached():
  3928.  
  3929. attachedType = mouseModule.mouseController.GetAttachedType()
  3930. attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
  3931. attachedItemSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  3932. attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
  3933.  
  3934. ## QuickSlot
  3935. if player.SLOT_TYPE_QUICK_SLOT == attachedType:
  3936. player.RequestDeleteGlobalQuickSlot(attachedItemSlotPos)
  3937.  
  3938. ## Inventory
  3939. elif player.SLOT_TYPE_INVENTORY == attachedType:
  3940.  
  3941. if player.ITEM_MONEY == attachedItemIndex:
  3942. self.__PutMoney(attachedType, attachedItemCount, self.PickingCharacterIndex)
  3943. else:
  3944. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  3945.  
  3946. ## DragonSoul
  3947. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  3948. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  3949.  
  3950. ## Special Storage
  3951. elif app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  3952. if player.SLOT_TYPE_SKILLBOOK_INVENTORY == attachedType or\
  3953. player.SLOT_TYPE_UPPITEM_INVENTORY == attachedType or\
  3954. player.SLOT_TYPE_GHOSTSTONE_INVENTORY == attachedType or\
  3955. player.SLOT_TYPE_GENERAL_INVENTORY == attachedType:
  3956.  
  3957. self.__PutItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, self.PickingCharacterIndex)
  3958.  
  3959. mouseModule.mouseController.DeattachObject()
  3960.  
  3961. else:
  3962. hyperlink = ui.GetHyperlink()
  3963. if hyperlink:
  3964. if app.IsPressed(app.DIK_LALT):
  3965. link = chat.GetLinkFromHyperlink(hyperlink)
  3966. ime.PasteString(link)
  3967. else:
  3968. self.interface.MakeHyperlinkTooltip(hyperlink)
  3969. return
  3970. else:
  3971. player.SetMouseState(player.MBT_LEFT, player.MBS_CLICK)
  3972.  
  3973. #player.EndMouseWalking()
  3974. return True
  3975.  
  3976. def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
  3977. if player.SLOT_TYPE_INVENTORY == attachedType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  3978. attachedInvenType = player.SlotTypeToInvenType(attachedType)
  3979. if True == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
  3980. if player.IsEquipmentSlot(attachedItemSlotPos) and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedType:
  3981. self.stream.popupWindow.Close()
  3982. self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  3983. else:
  3984. if chr.IsNPC(dstChrID):
  3985. if app.ENABLE_REFINE_RENEWAL:
  3986. constInfo.AUTO_REFINE_TYPE = 2
  3987. constInfo.AUTO_REFINE_DATA["NPC"][0] = dstChrID
  3988. constInfo.AUTO_REFINE_DATA["NPC"][1] = attachedInvenType
  3989. constInfo.AUTO_REFINE_DATA["NPC"][2] = attachedItemSlotPos
  3990. constInfo.AUTO_REFINE_DATA["NPC"][3] = attachedItemCount
  3991. net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
  3992. else:
  3993. net.SendExchangeStartPacket(dstChrID)
  3994. net.SendExchangeItemAddPacket(attachedInvenType, attachedItemSlotPos, 0)
  3995. else:
  3996. self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
  3997.  
  3998. def __PutMoney(self, attachedType, attachedMoney, dstChrID):
  3999. if True == chr.HasInstance(dstChrID) and player.GetMainCharacterIndex() != dstChrID:
  4000. net.SendExchangeStartPacket(dstChrID)
  4001. net.SendExchangeElkAddPacket(attachedMoney)
  4002. else:
  4003. self.__DropMoney(attachedType, attachedMoney)
  4004.  
  4005. def __DropMoney(self, attachedType, attachedMoney):
  4006. # PRIVATESHOP_DISABLE_ITEM_DROP - °łŔλóÁˇ ż­°í ŔÖ´Â µżľČ ľĆŔĚĹŰ ąö¸˛ ąćÁö
  4007. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  4008. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  4009. return
  4010. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4011.  
  4012. if attachedMoney>=1000:
  4013. self.stream.popupWindow.Close()
  4014. self.stream.popupWindow.Open(localeInfo.DROP_MONEY_FAILURE_1000_OVER, 0, localeInfo.UI_OK)
  4015. return
  4016.  
  4017. itemDropQuestionDialog = uiCommon.QuestionDialog()
  4018. itemDropQuestionDialog.SetText(localeInfo.DO_YOU_DROP_MONEY % (attachedMoney))
  4019. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  4020. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  4021. itemDropQuestionDialog.Open()
  4022. itemDropQuestionDialog.dropType = attachedType
  4023. itemDropQuestionDialog.dropCount = attachedMoney
  4024. itemDropQuestionDialog.dropNumber = player.ITEM_MONEY
  4025. self.itemDropQuestionDialog = itemDropQuestionDialog
  4026.  
  4027. def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
  4028. # PRIVATESHOP_DISABLE_ITEM_DROP - °łŔλóÁˇ ż­°í ŔÖ´Â µżľČ ľĆŔĚĹŰ ąö¸˛ ąćÁö
  4029. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  4030. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  4031. return
  4032. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4033.  
  4034. if player.SLOT_TYPE_INVENTORY == attachedType and player.IsEquipmentSlot(attachedItemSlotPos):
  4035. self.stream.popupWindow.Close()
  4036. self.stream.popupWindow.Open(localeInfo.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
  4037.  
  4038. else:
  4039. if player.SLOT_TYPE_INVENTORY == attachedType:
  4040. dropItemIndex = player.GetItemIndex(attachedItemSlotPos)
  4041.  
  4042. item.SelectItem(dropItemIndex)
  4043. dropItemName = item.GetItemName()
  4044.  
  4045. ## Question Text
  4046. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4047. if attachedItemCount==1:
  4048. questionText = localeInfo.ITEM_DROP_DIALOG_NEW % (dropItemName)
  4049. else:
  4050. questionText = localeInfo.ITEM_DROP_DIALOG_NEW2 % (dropItemName, attachedItemCount)
  4051. else:
  4052. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
  4053.  
  4054. ## Dialog
  4055. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4056. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  4057. else:
  4058. itemDropQuestionDialog = uiCommon.QuestionDialog()
  4059. itemDropQuestionDialog.SetText(questionText)
  4060. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4061. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  4062. itemDropQuestionDialog.SetItemIcon(item.GetIconImageFileName())
  4063. if item.IsAntiFlag(item.ANTIFLAG_DROP):
  4064. itemDropQuestionDialog.SetCannotDrop()
  4065. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  4066. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  4067. itemDropQuestionDialog.Open()
  4068. itemDropQuestionDialog.dropType = attachedType
  4069. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  4070. itemDropQuestionDialog.dropCount = attachedItemCount
  4071. self.itemDropQuestionDialog = itemDropQuestionDialog
  4072.  
  4073. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  4074. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedType:
  4075. dropItemIndex = player.GetItemIndex(player.DRAGON_SOUL_INVENTORY, attachedItemSlotPos)
  4076.  
  4077. item.SelectItem(dropItemIndex)
  4078. dropItemName = item.GetItemName()
  4079.  
  4080. ## Question Text
  4081. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4082. if attachedItemCount==1:
  4083. questionText = localeInfo.ITEM_DROP_DIALOG_NEW % (dropItemName)
  4084. else:
  4085. questionText = localeInfo.ITEM_DROP_DIALOG_NEW2 % (dropItemName, attachedItemCount)
  4086. else:
  4087. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
  4088.  
  4089. ## Dialog
  4090. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4091. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  4092. else:
  4093. itemDropQuestionDialog = uiCommon.QuestionDialog()
  4094. itemDropQuestionDialog.SetText(questionText)
  4095. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4096. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  4097. itemDropQuestionDialog.SetItemIcon(item.GetIconImageFileName())
  4098. if item.IsAntiFlag(item.ANTIFLAG_DROP):
  4099. itemDropQuestionDialog.SetCannotDrop()
  4100. itemDropQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDropItem(arg))
  4101. itemDropQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDropItem(arg))
  4102. itemDropQuestionDialog.Open()
  4103. itemDropQuestionDialog.dropType = attachedType
  4104. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  4105. itemDropQuestionDialog.dropCount = attachedItemCount
  4106. self.itemDropQuestionDialog = itemDropQuestionDialog
  4107.  
  4108. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  4109.  
  4110. elif app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  4111. if player.SLOT_TYPE_SKILLBOOK_INVENTORY == attachedType or\
  4112. player.SLOT_TYPE_UPPITEM_INVENTORY == attachedType or\
  4113. player.SLOT_TYPE_GHOSTSTONE_INVENTORY == attachedType or\
  4114. player.SLOT_TYPE_GENERAL_INVENTORY == attachedType:
  4115.  
  4116. dropItemIndex = player.GetItemIndex(player.SlotTypeToInvenType(attachedType), attachedItemSlotPos)
  4117.  
  4118. item.SelectItem(dropItemIndex)
  4119. dropItemName = item.GetItemName()
  4120.  
  4121. ## Question Text
  4122. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4123. if attachedItemCount==1:
  4124. questionText = localeInfo.ITEM_DROP_DIALOG_NEW % (dropItemName)
  4125. else:
  4126. questionText = localeInfo.ITEM_DROP_DIALOG_NEW2 % (dropItemName, attachedItemCount)
  4127. else:
  4128. questionText = localeInfo.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)
  4129.  
  4130. ## Dialog
  4131. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4132. itemDropQuestionDialog = uiCommon.QuestionDialogItem()
  4133. else:
  4134. itemDropQuestionDialog = uiCommon.QuestionDialog()
  4135. itemDropQuestionDialog.SetText(questionText)
  4136. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4137. itemDropQuestionDialog.SetDestroyEvent(lambda arg=True: self.RequestDestroyItem(arg))
  4138. itemDropQuestionDialog.SetItemIcon(item.GetIconImageFileName())
  4139. if item.IsAntiFlag(item.ANTIFLAG_DROP):
  4140. itemDropQuestionDialog.SetCannotDrop()
  4141. itemDropQuestionDialog.SetAcceptEvent(lambda arg = True: self.RequestDropItem(arg))
  4142. itemDropQuestionDialog.SetCancelEvent(lambda arg = False: self.RequestDropItem(arg))
  4143. itemDropQuestionDialog.Open()
  4144. itemDropQuestionDialog.dropType = attachedType
  4145. itemDropQuestionDialog.dropNumber = attachedItemSlotPos
  4146. itemDropQuestionDialog.dropCount = attachedItemCount
  4147. self.itemDropQuestionDialog = itemDropQuestionDialog
  4148.  
  4149. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
  4150.  
  4151. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4152. def RequestDestroyItem(self, answer):
  4153. if not self.itemDropQuestionDialog:
  4154. return
  4155. if not hasattr(self, 'isdestroy'):
  4156. self.isdestroy = 1
  4157. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.NEW_DROP_DIALOG__CONFIRM_MSG)
  4158. self.itemDropQuestionDialog.SetDestroyText(localeInfo.NEW_DROP_DIALOG__CONFIRM)
  4159. return
  4160. if answer:
  4161. dropType = self.itemDropQuestionDialog.dropType
  4162. dropNumber = self.itemDropQuestionDialog.dropNumber
  4163.  
  4164. if player.SLOT_TYPE_INVENTORY == dropType:
  4165. if dropNumber == player.ITEM_MONEY:
  4166. return
  4167. else:
  4168. # PRIVATESHOP_DISABLE_ITEM_DROP
  4169. self.__SendDestroyItemPacket(dropNumber)
  4170. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4171. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  4172. # PRIVATESHOP_DISABLE_ITEM_DROP
  4173. self.__SendDestroyItemPacket(dropNumber, player.DRAGON_SOUL_INVENTORY)
  4174. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4175. elif app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  4176. if player.SLOT_TYPE_SKILLBOOK_INVENTORY == dropType or\
  4177. player.SLOT_TYPE_UPPITEM_INVENTORY == dropType or\
  4178. player.SLOT_TYPE_GHOSTSTONE_INVENTORY == dropType or\
  4179. player.SLOT_TYPE_GENERAL_INVENTORY == dropType:
  4180. # PRIVATESHOP_DISABLE_ITEM_DROP
  4181. self.__SendDestroyItemPacket(dropNumber, player.SlotTypeToInvenType(dropType))
  4182. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4183.  
  4184. del self.isdestroy
  4185. self.itemDropQuestionDialog.Close()
  4186. self.itemDropQuestionDialog = None
  4187.  
  4188. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  4189.  
  4190. def __SendDestroyItemPacket(self, itemVNum, itemInvenType = player.INVENTORY):
  4191. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  4192. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  4193. return
  4194. net.SendItemDestroyPacket(itemVNum, itemInvenType)
  4195.  
  4196. def RequestDropItem(self, answer):
  4197. if not self.itemDropQuestionDialog:
  4198. return
  4199.  
  4200. if answer:
  4201. dropType = self.itemDropQuestionDialog.dropType
  4202. dropCount = self.itemDropQuestionDialog.dropCount
  4203. dropNumber = self.itemDropQuestionDialog.dropNumber
  4204.  
  4205. if player.SLOT_TYPE_INVENTORY == dropType:
  4206. if dropNumber == player.ITEM_MONEY:
  4207. net.SendGoldDropPacketNew(dropCount)
  4208. snd.PlaySound("sound/ui/money.wav")
  4209. else:
  4210. # PRIVATESHOP_DISABLE_ITEM_DROP
  4211. self.__SendDropItemPacket(dropNumber, dropCount)
  4212. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4213. elif player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == dropType:
  4214. # PRIVATESHOP_DISABLE_ITEM_DROP
  4215. self.__SendDropItemPacket(dropNumber, dropCount, player.DRAGON_SOUL_INVENTORY)
  4216. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4217. elif app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  4218. if player.SLOT_TYPE_SKILLBOOK_INVENTORY == dropType or\
  4219. player.SLOT_TYPE_UPPITEM_INVENTORY == dropType or\
  4220. player.SLOT_TYPE_GHOSTSTONE_INVENTORY == dropType or\
  4221. player.SLOT_TYPE_GENERAL_INVENTORY == dropType:
  4222. # PRIVATESHOP_DISABLE_ITEM_DROP
  4223. self.__SendDropItemPacket(dropNumber, dropCount, player.SlotTypeToInvenType(dropType))
  4224. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4225.  
  4226. if app.DELETE_ITEM_AND_NEW_DIALOG_DROP:
  4227. if hasattr(self, 'isdestroy'):
  4228. del self.isdestroy
  4229. self.itemDropQuestionDialog.Close()
  4230. self.itemDropQuestionDialog = None
  4231.  
  4232. constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
  4233.  
  4234. # PRIVATESHOP_DISABLE_ITEM_DROP
  4235. def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY):
  4236. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  4237. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
  4238. return
  4239.  
  4240. net.SendItemDropPacketNew(itemInvenType, itemVNum, itemCount)
  4241. # END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
  4242.  
  4243. def OnMouseRightButtonDown(self):
  4244.  
  4245. self.CheckFocus()
  4246.  
  4247. if True == mouseModule.mouseController.isAttached():
  4248. mouseModule.mouseController.DeattachObject()
  4249.  
  4250. else:
  4251. player.SetMouseState(player.MBT_RIGHT, player.MBS_PRESS)
  4252.  
  4253. return True
  4254.  
  4255. def OnMouseRightButtonUp(self):
  4256. if True == mouseModule.mouseController.isAttached():
  4257. return True
  4258.  
  4259. player.SetMouseState(player.MBT_RIGHT, player.MBS_CLICK)
  4260. return True
  4261.  
  4262. def OnMouseMiddleButtonDown(self):
  4263. player.SetMouseMiddleButtonState(player.MBS_PRESS)
  4264.  
  4265. def OnMouseMiddleButtonUp(self):
  4266. player.SetMouseMiddleButtonState(player.MBS_CLICK)
  4267.  
  4268. def OnUpdate(self):
  4269. app.UpdateGame()
  4270.  
  4271. if self.mapNameShower.IsShow():
  4272. self.mapNameShower.Update()
  4273.  
  4274. if self.isShowDebugInfo:
  4275. self.UpdateDebugInfo()
  4276.  
  4277. if self.enableXMasBoom:
  4278. self.__XMasBoom_Update()
  4279.  
  4280. self.interface.BUILD_OnUpdate()
  4281.  
  4282.  
  4283. def UpdateDebugInfo(self):
  4284. #
  4285. # Äł¸ŻĹÍ ÁÂÇĄ ą× FPS Ăâ·Â
  4286. (x, y, z) = player.GetMainCharacterPosition()
  4287. nUpdateTime = app.GetUpdateTime()
  4288. nUpdateFPS = app.GetUpdateFPS()
  4289. nRenderFPS = app.GetRenderFPS()
  4290. nFaceCount = app.GetFaceCount()
  4291. fFaceSpeed = app.GetFaceSpeed()
  4292. nST=background.GetRenderShadowTime()
  4293. (fAveRT, nCurRT) = app.GetRenderTime()
  4294. (iNum, fFogStart, fFogEnd, fFarCilp) = background.GetDistanceSetInfo()
  4295. (iPatch, iSplat, fSplatRatio, sTextureNum) = background.GetRenderedSplatNum()
  4296. if iPatch == 0:
  4297. iPatch = 1
  4298.  
  4299. #(dwRenderedThing, dwRenderedCRC) = background.GetRenderedGraphicThingInstanceNum()
  4300.  
  4301. self.PrintCoord.SetText("Coordinate: %.2f %.2f %.2f ATM: %d" % (x, y, z, app.GetAvailableTextureMemory()/(1024*1024)))
  4302. xMouse, yMouse = wndMgr.GetMousePosition()
  4303. self.PrintMousePos.SetText("MousePosition: %d %d" % (xMouse, yMouse))
  4304.  
  4305. self.FrameRate.SetText("UFPS: %3d UT: %3d FS %.2f" % (nUpdateFPS, nUpdateTime, fFaceSpeed))
  4306.  
  4307. if fAveRT>1.0:
  4308. self.Pitch.SetText("RFPS: %3d RT:%.2f(%3d) FC: %d(%.2f) " % (nRenderFPS, fAveRT, nCurRT, nFaceCount, nFaceCount/fAveRT))
  4309.  
  4310. self.Splat.SetText("PATCH: %d SPLAT: %d BAD(%.2f)" % (iPatch, iSplat, fSplatRatio))
  4311. #self.Pitch.SetText("Pitch: %.2f" % (app.GetCameraPitch())
  4312. #self.TextureNum.SetText("TN : %s" % (sTextureNum))
  4313. #self.ObjectNum.SetText("GTI : %d, CRC : %d" % (dwRenderedThing, dwRenderedCRC))
  4314. self.ViewDistance.SetText("Num : %d, FS : %f, FE : %f, FC : %f" % (iNum, fFogStart, fFogEnd, fFarCilp))
  4315.  
  4316. def OnRender(self):
  4317. app.RenderGame()
  4318.  
  4319. if self.console.Console.collision:
  4320. background.RenderCollision()
  4321. chr.RenderCollision()
  4322.  
  4323. (x, y) = app.GetCursorPosition()
  4324.  
  4325. ########################
  4326. # Picking
  4327. ########################
  4328. textTail.UpdateAllTextTail()
  4329.  
  4330. if True == wndMgr.IsPickedWindow(self.hWnd):
  4331.  
  4332. self.PickingCharacterIndex = chr.Pick()
  4333.  
  4334. if -1 != self.PickingCharacterIndex:
  4335. textTail.ShowCharacterTextTail(self.PickingCharacterIndex)
  4336. if 0 != self.targetBoard.GetTargetVID():
  4337. textTail.ShowCharacterTextTail(self.targetBoard.GetTargetVID())
  4338.  
  4339. # ADD_ALWAYS_SHOW_NAME
  4340. if not self.__IsShowName():
  4341. self.PickingItemIndex = item.Pick()
  4342. if -1 != self.PickingItemIndex:
  4343. textTail.ShowItemTextTail(self.PickingItemIndex)
  4344. # END_OF_ADD_ALWAYS_SHOW_NAME
  4345.  
  4346. ## Show all name in the range
  4347.  
  4348. # ADD_ALWAYS_SHOW_NAME
  4349. if self.__IsShowName():
  4350. textTail.ShowAllTextTail()
  4351. self.PickingItemIndex = textTail.Pick(x, y)
  4352. if app.ENABLE_SHOW_JUST_ITEM_TEXT_TAIL:
  4353. if self.__IsShowNameItem():
  4354. textTail.ShowJustItemTextTail()
  4355. self.PickingItemIndex = textTail.Pick(x, y)
  4356. # END_OF_ADD_ALWAYS_SHOW_NAME
  4357.  
  4358. textTail.UpdateShowingTextTail()
  4359. textTail.ArrangeTextTail()
  4360. if -1 != self.PickingItemIndex:
  4361. textTail.SelectItemName(self.PickingItemIndex)
  4362.  
  4363. grp.PopState()
  4364. grp.SetInterfaceRenderState()
  4365.  
  4366. textTail.Render()
  4367. textTail.HideAllTextTail()
  4368.  
  4369. def OnPressEscapeKey(self):
  4370. if app.TARGET == app.GetCursor():
  4371. app.SetCursor(app.NORMAL)
  4372.  
  4373. elif True == mouseModule.mouseController.isAttached():
  4374. mouseModule.mouseController.DeattachObject()
  4375.  
  4376. else:
  4377. self.interface.OpenSystemDialog()
  4378.  
  4379. return True
  4380.  
  4381. def OnIMEReturn(self):
  4382. if app.IsPressed(app.DIK_LSHIFT):
  4383. self.interface.OpenWhisperDialogWithoutTarget()
  4384. else:
  4385. self.interface.ToggleChat()
  4386. return True
  4387.  
  4388. def OnPressExitKey(self):
  4389. self.interface.ToggleSystemDialog()
  4390. return True
  4391.  
  4392. ## BINARY CALLBACK
  4393. ######################################################################################
  4394.  
  4395. # WEDDING
  4396. def BINARY_LoverInfo(self, name, lovePoint):
  4397. if self.interface.wndMessenger:
  4398. self.interface.wndMessenger.OnAddLover(name, lovePoint)
  4399. if self.affectShower:
  4400. self.affectShower.SetLoverInfo(name, lovePoint)
  4401.  
  4402. def BINARY_UpdateLovePoint(self, lovePoint):
  4403. if self.interface.wndMessenger:
  4404. self.interface.wndMessenger.OnUpdateLovePoint(lovePoint)
  4405. if self.affectShower:
  4406. self.affectShower.OnUpdateLovePoint(lovePoint)
  4407. # END_OF_WEDDING
  4408.  
  4409. if app.ENABLE_SEND_TARGET_INFO:
  4410. def BINARY_AddTargetMonsterDropInfo(self, raceNum, itemVnum, itemCount):
  4411. if not raceNum in constInfo.MONSTER_INFO_DATA:
  4412. constInfo.MONSTER_INFO_DATA.update({raceNum : {}})
  4413. constInfo.MONSTER_INFO_DATA[raceNum].update({"items" : []})
  4414. curList = constInfo.MONSTER_INFO_DATA[raceNum]["items"]
  4415.  
  4416. isUpgradeable = False
  4417. isMetin = False
  4418. item.SelectItem(itemVnum)
  4419. if item.GetItemType() == item.ITEM_TYPE_WEAPON or item.GetItemType() == item.ITEM_TYPE_ARMOR:
  4420. isUpgradeable = True
  4421. elif item.GetItemType() == item.ITEM_TYPE_METIN:
  4422. isMetin = True
  4423.  
  4424. for curItem in curList:
  4425. if isUpgradeable:
  4426. if curItem.has_key("vnum_list") and curItem["vnum_list"][0] / 10 * 10 == itemVnum / 10 * 10:
  4427. if not (itemVnum in curItem["vnum_list"]):
  4428. curItem["vnum_list"].append(itemVnum)
  4429. return
  4430. elif isMetin:
  4431. if curItem.has_key("vnum_list"):
  4432. baseVnum = curItem["vnum_list"][0]
  4433. if curItem.has_key("vnum_list") and (baseVnum - baseVnum%1000) == (itemVnum - itemVnum%1000):
  4434. if not (itemVnum in curItem["vnum_list"]):
  4435. curItem["vnum_list"].append(itemVnum)
  4436. return
  4437. else:
  4438. if curItem.has_key("vnum") and curItem["vnum"] == itemVnum and curItem["count"] == itemCount:
  4439. return
  4440.  
  4441. if isUpgradeable or isMetin:
  4442. curList.append({"vnum_list":[itemVnum], "count":itemCount})
  4443. else:
  4444. curList.append({"vnum":itemVnum, "count":itemCount})
  4445.  
  4446. def BINARY_RefreshTargetMonsterDropInfo(self, raceNum):
  4447. self.targetBoard.RefreshMonsterInfoBoard()
  4448.  
  4449. # QUEST_CONFIRM
  4450. def BINARY_OnQuestConfirm(self, msg, timeout, pid):
  4451. confirmDialog = uiCommon.QuestionDialogWithTimeLimit()
  4452. confirmDialog.Open(msg, timeout)
  4453. confirmDialog.SetAcceptEvent(lambda answer=True, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  4454. confirmDialog.SetCancelEvent(lambda answer=False, pid=pid: net.SendQuestConfirmPacket(answer, pid) or self.confirmDialog.Hide())
  4455. self.confirmDialog = confirmDialog
  4456. # END_OF_QUEST_CONFIRM
  4457.  
  4458. # GIFT command
  4459. def Gift_Show(self):
  4460. self.interface.ShowGift()
  4461.  
  4462. # CUBE
  4463. def BINARY_Cube_Open(self, npcVNUM):
  4464. self.currentCubeNPC = npcVNUM
  4465.  
  4466. self.interface.OpenCubeWindow()
  4467.  
  4468.  
  4469. if npcVNUM not in self.cubeInformation:
  4470. net.SendChatPacket("/cube r_info")
  4471. else:
  4472. cubeInfoList = self.cubeInformation[npcVNUM]
  4473.  
  4474. i = 0
  4475. for cubeInfo in cubeInfoList:
  4476. if app.ENABLE_CUBE_PERCENT_INFO:
  4477. self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"], cubeInfo["percent"])
  4478. else:
  4479. self.interface.wndCube.AddCubeResultItem(cubeInfo["vnum"], cubeInfo["count"])
  4480.  
  4481. j = 0
  4482. for materialList in cubeInfo["materialList"]:
  4483. for materialInfo in materialList:
  4484. itemVnum, itemCount = materialInfo
  4485. self.interface.wndCube.AddMaterialInfo(i, j, itemVnum, itemCount)
  4486. j = j + 1
  4487.  
  4488. i = i + 1
  4489.  
  4490. self.interface.wndCube.Refresh()
  4491.  
  4492. def BINARY_Cube_Close(self):
  4493. self.interface.CloseCubeWindow()
  4494.  
  4495. # Á¦ŔŰżˇ ÇĘżäÇŃ °ńµĺ, żą»óµÇ´Â żĎĽşÇ°ŔÇ VNUM°ú °łĽö Á¤ş¸ update
  4496. def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
  4497. self.interface.UpdateCubeInfo(gold, itemVnum, count)
  4498.  
  4499. def BINARY_Cube_Succeed(self, itemVnum, count):
  4500. print "ĹĄşę Á¦ŔŰ Ľş°ř"
  4501. self.interface.SucceedCubeWork(itemVnum, count)
  4502. pass
  4503.  
  4504. def BINARY_Cube_Failed(self):
  4505. print "ĹĄşę Á¦ŔŰ ˝ÇĆĐ"
  4506. self.interface.FailedCubeWork()
  4507. pass
  4508.  
  4509. def BINARY_Cube_ResultList(self, npcVNUM, listText):
  4510. # ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 ŔĚ·±˝ÄŔ¸·Î "/" ą®ŔÚ·Î ±¸şĐµČ ¸®˝şĆ®¸¦ ÁÜ
  4511. #print listText
  4512.  
  4513. if npcVNUM == 0:
  4514. npcVNUM = self.currentCubeNPC
  4515.  
  4516. self.cubeInformation[npcVNUM] = []
  4517.  
  4518. try:
  4519. for eachInfoText in listText.split("/"):
  4520. eachInfo = eachInfoText.split(",")
  4521. itemVnum = int(eachInfo[0])
  4522. itemCount = int(eachInfo[1])
  4523. if app.ENABLE_CUBE_PERCENT_INFO:
  4524. percent = int(eachInfo[2])
  4525.  
  4526. if app.ENABLE_CUBE_PERCENT_INFO:
  4527. self.cubeInformation[npcVNUM].append({"vnum": itemVnum, "count": itemCount, "percent": percent})
  4528. else:
  4529. self.cubeInformation[npcVNUM].append({"vnum": itemVnum, "count": itemCount})
  4530.  
  4531. if app.ENABLE_CUBE_PERCENT_INFO:
  4532. self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount, percent)
  4533. else:
  4534. self.interface.wndCube.AddCubeResultItem(itemVnum, itemCount)
  4535.  
  4536. resultCount = len(self.cubeInformation[npcVNUM])
  4537. requestCount = 7
  4538. modCount = resultCount % requestCount
  4539. splitCount = resultCount / requestCount
  4540. for i in xrange(splitCount):
  4541. #print("/cube r_info %d %d" % (i * requestCount, requestCount))
  4542. net.SendChatPacket("/cube r_info %d %d" % (i * requestCount, requestCount))
  4543.  
  4544. if 0 < modCount:
  4545. #print("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  4546. net.SendChatPacket("/cube r_info %d %d" % (splitCount * requestCount, modCount))
  4547.  
  4548. except RuntimeError, msg:
  4549. dbg.TraceError(msg)
  4550. return 0
  4551.  
  4552. pass
  4553.  
  4554. def BINARY_Cube_MaterialInfo(self, startIndex, listCount, listText):
  4555. # Material Text Format : 125,1|126,2|127,2|123,5&555,5&555,4/120000
  4556. try:
  4557. #print listText
  4558.  
  4559. if 3 > len(listText):
  4560. dbg.TraceError("Wrong Cube Material Infomation")
  4561. return 0
  4562.  
  4563.  
  4564.  
  4565. eachResultList = listText.split("@")
  4566.  
  4567. cubeInfo = self.cubeInformation[self.currentCubeNPC]
  4568.  
  4569. itemIndex = 0
  4570. for eachResultText in eachResultList:
  4571. cubeInfo[startIndex + itemIndex]["materialList"] = [[], [], [], [], []]
  4572. materialList = cubeInfo[startIndex + itemIndex]["materialList"]
  4573.  
  4574. gold = 0
  4575. splitResult = eachResultText.split("/")
  4576. if 1 < len(splitResult):
  4577. gold = int(splitResult[1])
  4578.  
  4579. #print "splitResult : ", splitResult
  4580. eachMaterialList = splitResult[0].split("&")
  4581.  
  4582. i = 0
  4583. for eachMaterialText in eachMaterialList:
  4584. complicatedList = eachMaterialText.split("|")
  4585.  
  4586. if 0 < len(complicatedList):
  4587. for complicatedText in complicatedList:
  4588. (itemVnum, itemCount) = complicatedText.split(",")
  4589. itemVnum = int(itemVnum)
  4590. itemCount = int(itemCount)
  4591. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  4592.  
  4593. materialList[i].append((itemVnum, itemCount))
  4594.  
  4595. else:
  4596. itemVnum, itemCount = eachMaterialText.split(",")
  4597. itemVnum = int(itemVnum)
  4598. itemCount = int(itemCount)
  4599. self.interface.wndCube.AddMaterialInfo(itemIndex + startIndex, i, itemVnum, itemCount)
  4600.  
  4601. materialList[i].append((itemVnum, itemCount))
  4602.  
  4603. i = i + 1
  4604.  
  4605.  
  4606.  
  4607. itemIndex = itemIndex + 1
  4608.  
  4609. self.interface.wndCube.Refresh()
  4610.  
  4611.  
  4612. except RuntimeError, msg:
  4613. dbg.TraceError(msg)
  4614. return 0
  4615.  
  4616. pass
  4617.  
  4618. # END_OF_CUBE
  4619.  
  4620. # żëČĄĽ®
  4621. def BINARY_Highlight_Item(self, inven_type, inven_pos):
  4622. self.interface.Highligt_Item(inven_type, inven_pos)
  4623.  
  4624. def BINARY_DragonSoulGiveQuilification(self):
  4625. self.interface.DragonSoulGiveQuilification()
  4626.  
  4627. def BINARY_DragonSoulRefineWindow_Open(self):
  4628. self.interface.OpenDragonSoulRefineWindow()
  4629.  
  4630. def BINARY_DragonSoulRefineWindow_RefineFail(self, reason, inven_type, inven_pos):
  4631. self.interface.FailDragonSoulRefine(reason, inven_type, inven_pos)
  4632.  
  4633. def BINARY_DragonSoulRefineWindow_RefineSucceed(self, inven_type, inven_pos):
  4634. self.interface.SucceedDragonSoulRefine(inven_type, inven_pos)
  4635.  
  4636. # END of DRAGON SOUL REFINE WINDOW
  4637.  
  4638. def BINARY_SetBigMessage(self, message):
  4639. self.interface.bigBoard.SetTip(message)
  4640.  
  4641. def BINARY_SetTipMessage(self, message):
  4642. self.interface.tipBoard.SetTip(message)
  4643.  
  4644. if app.ENABLE_DUNGEON_INFO_SYSTEM:
  4645. def DungeonInfo(self, questindex):
  4646. import constInfo
  4647. constInfo.dungeonData["quest_index"] = questindex
  4648.  
  4649. def CleanDungeonInfo(self):
  4650. import constInfo
  4651. constInfo.dungeonInfo = []
  4652.  
  4653. def CleanDungeonRanking(self):
  4654. import constInfo
  4655. constInfo.dungeonRanking["ranking_list"] = []
  4656.  
  4657. def GetDungeonInfo(self, cmd):
  4658. import constInfo
  4659. cmd = cmd.split("#")
  4660.  
  4661. if cmd[0] == "INPUT":
  4662. constInfo.INPUT_IGNORE = int(cmd[1])
  4663.  
  4664. elif cmd[0] == "CMD":
  4665. net.SendQuestInputStringPacket(constInfo.dungeonData["quest_cmd"])
  4666. constInfo.dungeonData["quest_cmd"] = ""
  4667.  
  4668. else:
  4669. pass
  4670.  
  4671. def UpdateDungeonInfo(self, type, organization, levelLimit, partyMembers, mapName, mapIndex, mapCoordX, mapCoordY, cooldown, duration, entranceMapName, strengthBonusName, resistanceBonusName, itemVnum, finished, fastestTime, highestDamage):
  4672. type = int(type)
  4673. organization = int(organization)
  4674. levelLimit = int(levelLimit)
  4675. partyMembers = int(partyMembers)
  4676. mapName = str(mapName).replace("_", " ")
  4677. mapIndex = int(mapIndex)
  4678. mapCoordX = int(mapCoordX)
  4679. mapCoordY = int(mapCoordY)
  4680. cooldown = int(cooldown)
  4681. duration = int(duration)
  4682. entranceMapName = str(entranceMapName).replace("_", " ")
  4683. strengthBonusName = str(strengthBonusName).replace("_", " ")
  4684. resistanceBonusName = str(resistanceBonusName).replace("_", " ")
  4685. itemVnum = int(itemVnum)
  4686. finished = int(finished)
  4687. fastestTime = int(fastestTime)
  4688. highestDamage = int(highestDamage)
  4689.  
  4690. import constInfo
  4691. constInfo.dungeonInfo.append(\
  4692. {
  4693. "type" : type,\
  4694. "organization" : organization,\
  4695. "level_limit" : levelLimit,\
  4696. "party_members" : partyMembers,\
  4697. "map" : mapName,\
  4698. "map_index" : mapIndex,\
  4699. "map_coord_x" : mapCoordX,\
  4700. "map_coord_y" : mapCoordY,\
  4701. "cooldown" : cooldown,\
  4702. "duration" : duration,\
  4703. "entrance_map" : entranceMapName,\
  4704. "strength_bonus" : strengthBonusName,\
  4705. "resistance_bonus" : resistanceBonusName,\
  4706. "item_vnum" : itemVnum,
  4707. "finished" : finished,
  4708. "fastest_time" : fastestTime,
  4709. "highest_damage" : highestDamage,
  4710. },
  4711. )
  4712.  
  4713. def UpdateDungeonRanking(self, name, level, pointType):
  4714. name = str(name)
  4715. level = int(level)
  4716. pointType = int(pointType)
  4717.  
  4718. import constInfo
  4719. constInfo.dungeonRanking["ranking_list"].append([name, level, pointType],)
  4720.  
  4721. def OpenDungeonRanking(self):
  4722. import uiDungeonInfo
  4723. self.DungeonRank = uiDungeonInfo.DungeonRank()
  4724. self.DungeonRank.Open()
  4725.  
  4726. def BINARY_AppendNotifyMessage(self, type):
  4727. if not type in localeInfo.NOTIFY_MESSAGE:
  4728. return
  4729. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.NOTIFY_MESSAGE[type])
  4730.  
  4731. def BINARY_Guild_EnterGuildArea(self, areaID):
  4732. self.interface.BULID_EnterGuildArea(areaID)
  4733.  
  4734. def BINARY_Guild_ExitGuildArea(self, areaID):
  4735. self.interface.BULID_ExitGuildArea(areaID)
  4736.  
  4737. def BINARY_GuildWar_OnSendDeclare(self, guildID):
  4738. pass
  4739.  
  4740. def BINARY_GuildWar_OnRecvDeclare(self, guildID, warType):
  4741. mainCharacterName = player.GetMainCharacterName()
  4742. masterName = guild.GetGuildMasterName()
  4743. if mainCharacterName == masterName:
  4744. self.__GuildWar_OpenAskDialog(guildID, warType)
  4745.  
  4746. def BINARY_GuildWar_OnRecvPoint(self, gainGuildID, opponentGuildID, point):
  4747. self.interface.OnRecvGuildWarPoint(gainGuildID, opponentGuildID, point)
  4748.  
  4749. def BINARY_GuildWar_OnStart(self, guildSelf, guildOpp):
  4750. self.interface.OnStartGuildWar(guildSelf, guildOpp)
  4751.  
  4752. def BINARY_GuildWar_OnEnd(self, guildSelf, guildOpp):
  4753. self.interface.OnEndGuildWar(guildSelf, guildOpp)
  4754.  
  4755. def BINARY_BettingGuildWar_SetObserverMode(self, isEnable):
  4756. self.interface.BINARY_SetObserverMode(isEnable)
  4757.  
  4758. def BINARY_BettingGuildWar_UpdateObserverCount(self, observerCount):
  4759. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  4760.  
  4761. def __GuildWar_UpdateMemberCount(self, guildID1, memberCount1, guildID2, memberCount2, observerCount):
  4762. guildID1 = int(guildID1)
  4763. guildID2 = int(guildID2)
  4764. memberCount1 = int(memberCount1)
  4765. memberCount2 = int(memberCount2)
  4766. observerCount = int(observerCount)
  4767.  
  4768. self.interface.UpdateMemberCount(guildID1, memberCount1, guildID2, memberCount2)
  4769. self.interface.wndMiniMap.UpdateObserverCount(observerCount)
  4770.  
  4771. def __GuildWar_OpenAskDialog(self, guildID, warType):
  4772.  
  4773. guildName = guild.GetGuildName(guildID)
  4774.  
  4775. # REMOVED_GUILD_BUG_FIX
  4776. if "Noname" == guildName:
  4777. return
  4778. # END_OF_REMOVED_GUILD_BUG_FIX
  4779.  
  4780. import uiGuild
  4781. questionDialog = uiGuild.AcceptGuildWarDialog()
  4782. questionDialog.SAFE_SetAcceptEvent(self.__GuildWar_OnAccept)
  4783. questionDialog.SAFE_SetCancelEvent(self.__GuildWar_OnDecline)
  4784. questionDialog.Open(guildName, warType)
  4785.  
  4786. self.guildWarQuestionDialog = questionDialog
  4787.  
  4788. def __GuildWar_CloseAskDialog(self):
  4789. self.guildWarQuestionDialog.Close()
  4790. self.guildWarQuestionDialog = None
  4791.  
  4792. def __GuildWar_OnAccept(self):
  4793.  
  4794. guildName = self.guildWarQuestionDialog.GetGuildName()
  4795.  
  4796. net.SendChatPacket("/war " + guildName)
  4797. self.__GuildWar_CloseAskDialog()
  4798.  
  4799. return 1
  4800.  
  4801. def __GuildWar_OnDecline(self):
  4802.  
  4803. guildName = self.guildWarQuestionDialog.GetGuildName()
  4804.  
  4805. net.SendChatPacket("/nowar " + guildName)
  4806. self.__GuildWar_CloseAskDialog()
  4807.  
  4808. return 1
  4809. ## BINARY CALLBACK
  4810. ######################################################################################
  4811.  
  4812. def __ServerCommand_Build(self):
  4813. serverCommandList={
  4814. "ConsoleEnable" : self.__Console_Enable,
  4815. "DayMode" : self.__DayMode_Update,
  4816. "PRESERVE_DayMode" : self.__PRESERVE_DayMode_Update,
  4817. "CloseRestartWindow" : self.__RestartDialog_Close,
  4818. "OpenPrivateShop" : self.__PrivateShop_Open,
  4819. "PartyHealReady" : self.PartyHealReady,
  4820. "ShowMeSafeboxPassword" : self.AskSafeboxPassword,
  4821. "CloseSafebox" : self.CommandCloseSafebox,
  4822.  
  4823. # ITEM_MALL
  4824. "CloseMall" : self.CommandCloseMall,
  4825. "ShowMeMallPassword" : self.AskMallPassword,
  4826. "item_mall" : self.__ItemMall_Open,
  4827. # END_OF_ITEM_MALL
  4828.  
  4829. "RefineSuceeded" : self.RefineSuceededMessage,
  4830. "RefineFailed" : self.RefineFailedMessage,
  4831. "xmas_snow" : self.__XMasSnow_Enable,
  4832. "xmas_boom" : self.__XMasBoom_Enable,
  4833. "xmas_song" : self.__XMasSong_Enable,
  4834. "xmas_tree" : self.__XMasTree_Enable,
  4835. "newyear_boom" : self.__XMasBoom_Enable,
  4836. "PartyRequest" : self.__PartyRequestQuestion,
  4837. "PartyRequestDenied" : self.__PartyRequestDenied,
  4838. "horse_state" : self.__Horse_UpdateState,
  4839. "hide_horse_state" : self.__Horse_HideState,
  4840. "WarUC" : self.__GuildWar_UpdateMemberCount,
  4841. "test_server" : self.__EnableTestServerFlag,
  4842. "mall" : self.__InGameShop_Show,
  4843.  
  4844. # WEDDING
  4845. "lover_login" : self.__LoginLover,
  4846. "lover_logout" : self.__LogoutLover,
  4847. "lover_near" : self.__LoverNear,
  4848. "lover_far" : self.__LoverFar,
  4849. "lover_divorce" : self.__LoverDivorce,
  4850. "PlayMusic" : self.__PlayMusic,
  4851. # END_OF_WEDDING
  4852.  
  4853. # PRIVATE_SHOP_PRICE_LIST
  4854. "MyShopPriceList" : self.__PrivateShop_PriceList,
  4855. # END_OF_PRIVATE_SHOP_PRICE_LIST
  4856. "getinputbegin" : self.getinputbegin,
  4857. "getinputend" : self.getinputend,
  4858.  
  4859. }
  4860.  
  4861. if app.ENABLE_TELEPORT_TAB:
  4862. serverCommandList["Teleport"] = self.Teleport
  4863.  
  4864. if app.ENABLE_SPECIAL_STORAGE_SYSTEM:
  4865. serverCommandList["auto_stack_storage"] = self.interface.AutoStackStorage
  4866.  
  4867. if app.ENABLE_DUNGEON_INFO_SYSTEM:
  4868. serverCommandList.update({
  4869. "DungeonInfo" : self.DungeonInfo,
  4870. "CleanDungeonInfo" : self.CleanDungeonInfo,
  4871. "CleanDungeonRanking" : self.CleanDungeonRanking,
  4872. "GetDungeonInfo" : self.GetDungeonInfo,
  4873. "UpdateDungeonInfo" : self.UpdateDungeonInfo,
  4874. "UpdateDungeonRanking" : self.UpdateDungeonRanking,
  4875. "OpenDungeonRanking" : self.OpenDungeonRanking,
  4876. })
  4877.  
  4878. # if app.ENABLE_ITEMSHOP_IN_GAME:
  4879. # serverCommandList.update({
  4880. # self.serverCommander.SAFE_RegisterCallBack("ClearItemShop", self.__ClearItemShop),
  4881. # self.serverCommander.SAFE_RegisterCallBack("RecvItemShop", self.__RecvItemShop),
  4882. # self.serverCommander.SAFE_RegisterCallBack("RefreshItemShop", self.__RefreshItemShop),
  4883. # self.serverCommander.SAFE_RegisterCallBack("UpdateItemShopMoney", self.__UpdateItemShopMoney),
  4884. # self.serverCommander.SAFE_RegisterCallBack("FortuneWheelItem", self.__FortuneWheelItem),
  4885. # self.serverCommander.SAFE_RegisterCallBack("FortuneWheelConfig", self.__FortuneWheelConfig),
  4886. # })
  4887.  
  4888. self.serverCommander=stringCommander.Analyzer()
  4889. for serverCommandItem in serverCommandList.items():
  4890. self.serverCommander.SAFE_RegisterCallBack(
  4891. serverCommandItem[0], serverCommandItem[1]
  4892. )
  4893.  
  4894. def BINARY_ServerCommand_Run(self, line):
  4895. #dbg.TraceError(line)
  4896. try:
  4897. #print " BINARY_ServerCommand_Run", line
  4898. return self.serverCommander.Run(line)
  4899. except RuntimeError, msg:
  4900. dbg.TraceError(msg)
  4901. return 0
  4902.  
  4903. def __ProcessPreservedServerCommand(self):
  4904. try:
  4905. command = net.GetPreservedServerCommand()
  4906. while command:
  4907. print " __ProcessPreservedServerCommand", command
  4908. self.serverCommander.Run(command)
  4909. command = net.GetPreservedServerCommand()
  4910. except RuntimeError, msg:
  4911. dbg.TraceError(msg)
  4912. return 0
  4913.  
  4914. def PartyHealReady(self):
  4915. self.interface.PartyHealReady()
  4916.  
  4917. def AskSafeboxPassword(self):
  4918. self.interface.AskSafeboxPassword()
  4919.  
  4920. # ITEM_MALL
  4921. def AskMallPassword(self):
  4922. self.interface.AskMallPassword()
  4923.  
  4924. def __ItemMall_Open(self):
  4925. self.interface.OpenItemMall();
  4926.  
  4927. def CommandCloseMall(self):
  4928. self.interface.CommandCloseMall()
  4929. # END_OF_ITEM_MALL
  4930.  
  4931. def RefineSuceededMessage(self):
  4932. self.PopupMessage(localeInfo.REFINE_SUCCESS)
  4933. if app.ENABLE_FAST_REFINE:
  4934. self.interface.CheckRefineDialog(False)
  4935.  
  4936. def RefineFailedMessage(self):
  4937. self.PopupMessage(localeInfo.REFINE_FAILURE)
  4938. if app.ENABLE_FAST_REFINE:
  4939. self.interface.CheckRefineDialog(True)
  4940.  
  4941. def CommandCloseSafebox(self):
  4942. self.interface.CommandCloseSafebox()
  4943.  
  4944. # PRIVATE_SHOP_PRICE_LIST
  4945. def __PrivateShop_PriceList(self, itemVNum, itemPrice):
  4946. uiPrivateShopBuilder.SetPrivateShopItemPrice(itemVNum, itemPrice)
  4947. # END_OF_PRIVATE_SHOP_PRICE_LIST
  4948.  
  4949. def __Horse_HideState(self):
  4950. self.affectShower.SetHorseState(0, 0, 0)
  4951.  
  4952. def __Horse_UpdateState(self, level, health, battery):
  4953. self.affectShower.SetHorseState(int(level), int(health), int(battery))
  4954.  
  4955. def __IsXMasMap(self):
  4956. mapDict = ( "metin2_map_n_flame_01",
  4957. "metin2_map_n_desert_01",
  4958. "metin2_map_spiderdungeon",
  4959. "metin2_map_deviltower1", )
  4960.  
  4961. if background.GetCurrentMapName() in mapDict:
  4962. return False
  4963.  
  4964. return True
  4965.  
  4966. def __XMasSnow_Enable(self, mode):
  4967.  
  4968. self.__XMasSong_Enable(mode)
  4969.  
  4970. if "1"==mode:
  4971.  
  4972. if not self.__IsXMasMap():
  4973. return
  4974.  
  4975. print "XMAS_SNOW ON"
  4976. background.EnableSnow(1)
  4977.  
  4978. else:
  4979. print "XMAS_SNOW OFF"
  4980. background.EnableSnow(0)
  4981.  
  4982. def __XMasBoom_Enable(self, mode):
  4983. if "1"==mode:
  4984.  
  4985. if not self.__IsXMasMap():
  4986. return
  4987.  
  4988. print "XMAS_BOOM ON"
  4989. self.__DayMode_Update("dark")
  4990. self.enableXMasBoom = True
  4991. self.startTimeXMasBoom = app.GetTime()
  4992. else:
  4993. print "XMAS_BOOM OFF"
  4994. self.__DayMode_Update("light")
  4995. self.enableXMasBoom = False
  4996.  
  4997. def __XMasTree_Enable(self, grade):
  4998.  
  4999. print "XMAS_TREE ", grade
  5000. background.SetXMasTree(int(grade))
  5001.  
  5002. def __XMasSong_Enable(self, mode):
  5003. if "1"==mode:
  5004. print "XMAS_SONG ON"
  5005.  
  5006. XMAS_BGM = "xmas.mp3"
  5007.  
  5008. if app.IsExistFile("BGM/" + XMAS_BGM)==1:
  5009. if musicInfo.fieldMusic != "":
  5010. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  5011.  
  5012. musicInfo.fieldMusic=XMAS_BGM
  5013. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  5014.  
  5015. else:
  5016. print "XMAS_SONG OFF"
  5017.  
  5018. if musicInfo.fieldMusic != "":
  5019. snd.FadeOutMusic("BGM/" + musicInfo.fieldMusic)
  5020.  
  5021. musicInfo.fieldMusic=musicInfo.METIN2THEMA
  5022. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  5023.  
  5024. def __RestartDialog_Close(self):
  5025. self.interface.CloseRestartDialog()
  5026.  
  5027. def __Console_Enable(self):
  5028. constInfo.CONSOLE_ENABLE = True
  5029. self.consoleEnable = True
  5030. app.EnableSpecialCameraMode()
  5031. ui.EnablePaste(True)
  5032.  
  5033. ## PrivateShop
  5034. def __PrivateShop_Open(self):
  5035. self.interface.OpenPrivateShopInputNameDialog()
  5036.  
  5037. def BINARY_PrivateShop_Appear(self, vid, text):
  5038. self.interface.AppearPrivateShop(vid, text)
  5039.  
  5040. def BINARY_PrivateShop_Disappear(self, vid):
  5041. self.interface.DisappearPrivateShop(vid)
  5042.  
  5043. ## DayMode
  5044. def __PRESERVE_DayMode_Update(self, mode):
  5045. if "light"==mode:
  5046. background.SetEnvironmentData(0)
  5047. elif "dark"==mode:
  5048.  
  5049. if not self.__IsXMasMap():
  5050. return
  5051.  
  5052. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  5053. background.SetEnvironmentData(1)
  5054.  
  5055. def __DayMode_Update(self, mode):
  5056. if "light"==mode:
  5057. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToLight)
  5058. elif "dark"==mode:
  5059.  
  5060. if not self.__IsXMasMap():
  5061. return
  5062.  
  5063. self.curtain.SAFE_FadeOut(self.__DayMode_OnCompleteChangeToDark)
  5064.  
  5065. def __DayMode_OnCompleteChangeToLight(self):
  5066. background.SetEnvironmentData(0)
  5067. self.curtain.FadeIn()
  5068.  
  5069. def __DayMode_OnCompleteChangeToDark(self):
  5070. background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
  5071. background.SetEnvironmentData(1)
  5072. self.curtain.FadeIn()
  5073.  
  5074. ## XMasBoom
  5075. def __XMasBoom_Update(self):
  5076.  
  5077. self.BOOM_DATA_LIST = ( (2, 5), (5, 2), (7, 3), (10, 3), (20, 5) )
  5078. if self.indexXMasBoom >= len(self.BOOM_DATA_LIST):
  5079. return
  5080.  
  5081. boomTime = self.BOOM_DATA_LIST[self.indexXMasBoom][0]
  5082. boomCount = self.BOOM_DATA_LIST[self.indexXMasBoom][1]
  5083.  
  5084. if app.GetTime() - self.startTimeXMasBoom > boomTime:
  5085.  
  5086. self.indexXMasBoom += 1
  5087.  
  5088. for i in xrange(boomCount):
  5089. self.__XMasBoom_Boom()
  5090.  
  5091. def __XMasBoom_Boom(self):
  5092. x, y, z = player.GetMainCharacterPosition()
  5093. randX = app.GetRandom(-150, 150)
  5094. randY = app.GetRandom(-150, 150)
  5095.  
  5096. snd.PlaySound3D(x+randX, -y+randY, z, "sound/common/etc/salute.mp3")
  5097.  
  5098. def __PartyRequestQuestion(self, vid):
  5099. vid = int(vid)
  5100. partyRequestQuestionDialog = uiCommon.QuestionDialog()
  5101. partyRequestQuestionDialog.SetText(chr.GetNameByVID(vid) + localeInfo.PARTY_DO_YOU_ACCEPT)
  5102. partyRequestQuestionDialog.SetAcceptText(localeInfo.UI_ACCEPT)
  5103. partyRequestQuestionDialog.SetCancelText(localeInfo.UI_DENY)
  5104. partyRequestQuestionDialog.SetAcceptEvent(lambda arg=True: self.__AnswerPartyRequest(arg))
  5105. partyRequestQuestionDialog.SetCancelEvent(lambda arg=False: self.__AnswerPartyRequest(arg))
  5106. partyRequestQuestionDialog.Open()
  5107. partyRequestQuestionDialog.vid = vid
  5108. self.partyRequestQuestionDialog = partyRequestQuestionDialog
  5109.  
  5110. def __AnswerPartyRequest(self, answer):
  5111. if not self.partyRequestQuestionDialog:
  5112. return
  5113.  
  5114. vid = self.partyRequestQuestionDialog.vid
  5115.  
  5116. if answer:
  5117. net.SendChatPacket("/party_request_accept " + str(vid))
  5118. else:
  5119. net.SendChatPacket("/party_request_deny " + str(vid))
  5120.  
  5121. self.partyRequestQuestionDialog.Close()
  5122. self.partyRequestQuestionDialog = None
  5123.  
  5124. def __PartyRequestDenied(self):
  5125. self.PopupMessage(localeInfo.PARTY_REQUEST_DENIED)
  5126.  
  5127. def __EnableTestServerFlag(self):
  5128. app.EnableTestServerFlag()
  5129.  
  5130. def __InGameShop_Show(self, url):
  5131. if constInfo.IN_GAME_SHOP_ENABLE:
  5132. self.interface.OpenWebWindow(url)
  5133.  
  5134. # WEDDING
  5135. def __LoginLover(self):
  5136. if self.interface.wndMessenger:
  5137. self.interface.wndMessenger.OnLoginLover()
  5138.  
  5139. def __LogoutLover(self):
  5140. if self.interface.wndMessenger:
  5141. self.interface.wndMessenger.OnLogoutLover()
  5142. if self.affectShower:
  5143. self.affectShower.HideLoverState()
  5144.  
  5145. def __LoverNear(self):
  5146. if self.affectShower:
  5147. self.affectShower.ShowLoverState()
  5148.  
  5149. def __LoverFar(self):
  5150. if self.affectShower:
  5151. self.affectShower.HideLoverState()
  5152.  
  5153. def __LoverDivorce(self):
  5154. if self.interface.wndMessenger:
  5155. self.interface.wndMessenger.ClearLoverInfo()
  5156. if self.affectShower:
  5157. self.affectShower.ClearLoverState()
  5158.  
  5159. def __PlayMusic(self, flag, filename):
  5160. flag = int(flag)
  5161. if flag:
  5162. snd.FadeOutAllMusic()
  5163. musicInfo.SaveLastPlayFieldMusic()
  5164. snd.FadeInMusic("BGM/" + filename)
  5165. else:
  5166. snd.FadeOutAllMusic()
  5167. musicInfo.LoadLastPlayFieldMusic()
  5168. snd.FadeInMusic("BGM/" + musicInfo.fieldMusic)
  5169.  
  5170. # END_OF_WEDDING
  5171.  
  5172. if app.ENABLE_ACCE_SYSTEM:
  5173. def ActAcce(self, iAct, bWindow):
  5174. if self.interface:
  5175. self.interface.ActAcce(iAct, bWindow)
  5176.  
  5177. def AlertAcce(self, bWindow):
  5178. snd.PlaySound("sound/ui/make_soket.wav")
  5179. if bWindow:
  5180. self.PopupMessage(localeInfo.ACCE_DEL_SERVEITEM)
  5181. else:
  5182. self.PopupMessage(localeInfo.ACCE_DEL_ABSORDITEM)
  5183.  
  5184. if app.ENABLE_TELEPORT_TAB:
  5185. def Teleport(self, getString):
  5186. if getString.find("index") != -1:
  5187. self.teleport.UpdateIndex(int(getString.split("x")[1]))
  5188. else:
  5189. constInfo.SendString = str(self.teleport.SendToServer)
  5190. constInfo.INPUT_IGNORE = 1
  5191.  
  5192. if app.ENABLE_ITEMSHOP_IN_GAME:
  5193. def __FortuneWheelConfig(self, arg1, arg2):
  5194. if (self.interface):
  5195. self.interface.FortuneWheel("config", (int(arg1), int(arg2)))
  5196.  
  5197. def __FortuneWheelItem(self, arg1, arg2, arg3):
  5198. if (self.interface):
  5199. self.interface.FortuneWheel("item", (int(arg1), int(arg2), int(arg3)))
  5200.  
  5201. def __UpdateItemShopMoney(self, type, money):
  5202. if (self.interface):
  5203. self.interface.UpdateItemShopMoney(type, int(money))
  5204.  
  5205. def __ClearItemShop(self):
  5206. if (self.interface):
  5207. self.interface.ClearItemShop()
  5208.  
  5209. def __RecvItemShop(self, category, number, itemVnum, count, price, currency):
  5210. if (self.interface):
  5211. self.interface.RecvItemShop(int(category), int(number), int(itemVnum), int(count), int(price), int(currency))
  5212.  
  5213. def __RefreshItemShop(self):
  5214. if (self.interface):
  5215. self.interface.RefreshItemShop()
  5216.  
  5217. def getinputbegin(self):
  5218. constInfo.INPUT_IGNORE = 1
  5219.  
  5220. def getinputend(self):
  5221. constInfo.INPUT_IGNORE = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement