forked from aaixy/rm-mvmz-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAXY_AjaxNetStuff.js
More file actions
6259 lines (5978 loc) · 250 KB
/
AXY_AjaxNetStuff.js
File metadata and controls
6259 lines (5978 loc) · 250 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
var AXY = AXY || {};
AXY.AjaxNetStuff = AXY.AjaxNetStuff || {};
AXY.AjaxNetStuff.VERSION = 1.48;
//=============================================================================
// A XueYu Plugin - Ajax Net Stuff
// AXY_AjaxNetStuff.js
// Version: 1.48
// License: MIT
//=============================================================================
/*:
* @plugindesc v1.48 This plugin support rmmv with ajax net stuff.
* @author A XueYu Plugin
*
* @help
* Introduction
* This plugin support rmmv with ajax net stuff.
* Easy to use of you just copy your own url to here.
* And then you will see it worked.
* Github: https://github.com/aaixy/rmmv-plugins
*
* Example:
* To open Coupon dialog,
* AXY_AjaxCoupon.show();
* To close Coupon dialog,
* AXY_AjaxCoupon.hide();
*
* LoginGift
* format:'type:id:amount;'. type:gold=0,item=1,weapon=2,armor=3.
* example:
* give 10 gold and 1 item1:'0:0:10;1:1:1;'
* give 10 gold and 1 weapon1:'0:0:10;2:1:1;'
*
* VerCloud
* AXY.AjaxNetStuff.Param.VerCloud; //string
* AXY.AjaxNetStuff.Param.VerLocal; //string
* AXY.AjaxNetStuff.Param.VerText; //string
* AXY_AjaxVerCheck.modal('#AXYAjaxVerCheckModal', 'show');
* AXY_AjaxVerCheck.modal('#AXYAjaxVerCheckModal', 'hide');
* Server Timestamp Switchs Variables
* AXY_AjaxFetchServerTSV.timestamp(); //return unix timestamp
* AXY.AjaxNetStuff.Variables.timestamp; //and Assign to this variable
* AXY_AjaxFetchServerTSV.datetime("Y-m-d H:i:s"); //return date time string such as 2019-09-09 13:14:15
* AXY_AjaxFetchServerTSV.datetime("Y-m-d"); //return date time string such as 2019-09-09
* AXY_AjaxFetchServerTSV.datetime("H:i:s"); //return date time string such as 13:14:15
* and many format in function, you can find format on this web: https://www.php.net/manual/en/function.date.php
* AXY.AjaxNetStuff.Variables.datetime; //and Assign to this variable
* AXY_AjaxFetchServerTSV.variable("id");
* AXY_AjaxFetchServerTSV.variable(2);
* AXY.AjaxNetStuff.Variables.variable["5"].v;
* AXY.AjaxNetStuff.Variables.variable["5"].n;
* Toplist
* var mygametoplist = AXY_AjaxTopList.fetch();
* now, you got the array obj mygametoplist, and these global variables:
* AXY.AjaxNetStuff.Variables.toplist;
* AXY.AjaxNetStuff.Variables.gamename;
* AXY.AjaxNetStuff.Variables.totalplayer;
* AXY.AjaxNetStuff.Variables.loggedin;
*
* changelog
* 1.48 2019.11.25
* modify: button default path from img/pictures to img/system;
* modify: button pageup/pagedown behavior;
* 1.47 2019.11.18
* modify: coupon paste input placeholder;
* Deprecated: AXY.AjaxNetStuff.Param.HandleShowTextLanguageObj, Use new one: AXY.AjaxNetStuff.Variables.HandleShowTextLanguageObj;
* Deprecated: AXY.AjaxNetStuff.Param.HandleShowTextDefaultLanguageId, Use new one: AXY.AjaxNetStuff.Variables.HandleShowTextDefaultLanguageId;
* fix: cloud language in statusText;
* 1.46 2019.11.16
* add: reserve CommonEvent with coupon/shopingame; see issues #2: https://github.com/aaixy/rmmv-plugins/issues/2
* add: param: displayGoldChangeInformation in ShopInGame struct;
* add: param: displayItemChangeInformation in ShopInGame struct;
* add: param: displayWeaponChangeInformation in ShopInGame struct;
* add: param: displayArmorChangeInformation in ShopInGame struct;
* add: param: displayCommonEventInformation in ShopInGame struct;
* 1.45 2019.11.13
* add: change switches and/or variables with coupon/shopingame; see issues #1: https://github.com/aaixy/rmmv-plugins/issues/1
* modify: 2 params about common event changed, so you can choose common event from a list now. Replaced manual input a number;
* fix: some bugs;
* 1.44 2019.11.10
* add: my store;
* add: new game with my store;
* add: episode selection;
* add: param: autoSaveAfterNewGame;
* add: param: episodeSelectionCommonEventId;
* add: param: episodeSelectionThreshold;
* modify: param: AutoSaveAfterShopping to autoSaveAfterShopping and move to shopingame settings struce;
* modify: param: CommandRemember to commandRemember;
* 1.43 2019.11.7
* add: param game name;
* add: toaster 666rpg.com info;
* 1.42 2019.11.6
* add: shopingame popular amount;
* remove: transaction password;
* modify: shopingame font size;
* 1.41 2019.10.30
* fix: autologin logic issus;
* 1.40 2019.10.29
* add: command Remember;
* fix: autologin checkbox issus;
* 1.39 2019.10.27
* add: pageup and pagedown buttons;
* fix: some bugs;
* 1.38 2019.10.23
* change: some param uint changed to rem from px;
* 1.37 2019.10.19
* change: login modal checkbox change to inline;
* 1.36 2019.10.15
* change: modal can not close by click on the backdrop or click keyboard esc;
* 1.35 2019.10.14
* fix: some crash situation when fetch toplist from server;
* 1.34 2019.10.5
* make vercheck modal customizable;
* 1.33 2019.10.4
* Add: print colorful console log selfinfo;
* 1.32 2019.10.3
* disable cloud variable cache on fetch from cloud;
* make danmu feature on mobile device customizable;
* upgrade some param format to rmmv v1.6.1;
* change login ui and make bgcolor, text color,opacity customizable;
* 1.31 2019.9.28
* disable danmu on mobile device;
* 1.30 2019.9.27
* Add: customizable top list sort by column in order or reverse order;
* Add: multiple top list ability;
* 1.29 2019.9.25
* Deprecated: AXY.AjaxNetStuff.Param.timestamp, Use new one: AXY.AjaxNetStuff.Variables.timestamp;
* Deprecated: AXY.AjaxNetStuff.Param.datetime, Use new one: AXY.AjaxNetStuff.Variables.datetime;
* Deprecated: AXY.AjaxNetStuff.Param.variable, Use new one: AXY.AjaxNetStuff.Variables.variable;
* Deprecated: AXY.AjaxNetStuff.Param.isonline, Use new one: AXY.AjaxNetStuff.Variables.isonline;
* Add: AXY.AjaxNetStuff.Variables.toplist;
* Add: Alt top list screen;
* Open: host your own rmmv mmol server address;
* 1.28 2019.9.11
* optimization: compress cloud variable;
* AXY.AjaxNetStuff.Variables.variable["5"].value; => AXY.AjaxNetStuff.Variables.variable["5"].v;
* AXY.AjaxNetStuff.Variables.variable["5"].name; => AXY.AjaxNetStuff.Variables.variable["5"].n;
* 1.27 2019.9.10
* fix bug: got crash when fetch variable or language on offline;
* 1.26 2019.9.9
* add some params for version check;
* add fetch server timestamp;
* add fetch server switchs or variables;
* 1.25 2019.8.29
* add feature: Handle ShowText by ajax.
* fix bug: when the player is shopping in game, and trigger the battle event, autosave file will crash.
* fix bug: login issus and mmol issus, when turn on the feature login gift or login commonevent.
* 1.24 2019.7.7
* fix some issus;
* 1.23 2019.7.6
* add autoSaveAfterShopping
* 1.22 2019.6.21
* add alert about shopingame and version issus;
* 1.21 2017.10.22
* add prevent android return key;
* add ce formula, now user can custom own ce calculation;
* change the menu button function on in battle;
* change chat notify both box and toast;
* 1.20 2017.10.21
* fix default api url;
* 1.19 2017.10.4
* optimization ce method;
* optimization inline time method;
* optimization shop in game display;
* optimization top 10 list display name and level method;
* add some net player staff;
* 1.18 2017.10.2
* change chat ui;
* add auction in game(not complete);
* 1.17 2017.10.2
* add try catch on top10list, remove sid in jsonstr;
* 1.16 2017.10.1
* add ce/online time display;
* 1.15 2017.9.1
* add img button that can open the menu and process the cancle;
* 1.14 2017.3.26
* add do common event by id when player logged in;
* 1.13 2017.2.6
* fix shopInGame can not scroll on android;
* 1.12 2017.2.4
* close open browser when click login button on pc;
* 1.11 2017.2.1
* bind login button with click;
* fix sometimes crash when danmu refresh;
* fix maybe crash when click login button before game ready;
* add reg button to open link with browser in game;
* 1.10 2017.1.29
* fix vercheck have new link can not click on android;
* 1.09 2017.1.28
* modify complate color to gray in coupon section;
* 1.08 2017.1.25
* fix some issus, add try catch;
* 1.07 2017.1.25
* fix danmu issus, send danmu on map after battle may display on battle and map;
* limit danmu and chat length to 20;
* add shop in game;
* 1.06 2017.1.20
* add coupon switch and text;
* add coupon menu command;
* 1.05 2017.1.19
* add danmu system;
* 1.04 2017.1.17
* add chat system;
* 1.03 2017.1.16
* add cloud save;
* fix android login and cloud save;
* 1.02 2017.1.13
* support login on android;
* fix cannot open ime after close ime on coupon dialog;
* fix login gift unlimited got;
* 1.01 2017.1.8
* fix ajax muilt post;
* add trim input space and html tag on left/center/right;
* add id to div;
* 1.0 2016.12.27
* first release.
* //=============================================================================
* End of Help File
* //=============================================================================
*
* @param URL
* @desc The url of your ajax net stuff.
* @default http://666rpg.com/zhongchou/product/id/20
*
* @param name
* @text Game Name
* @desc The game name.
* @type text
* @default
*
* @param Version
* @desc The game version.
* @default 1.0
*
* @param EnableTopList
* @desc Enable TopList? true/false
* @type boolean
* @default true
*
* @param TopListHAlign
* @desc The Horizontal align of TopList box. left/right
* @type select
* @option left
* @value left
* @option right
* @value right
* @default right
*
* @param TopListVAlign
* @desc The Vertical align of TopList box. top/bottom
* @type select
* @option top
* @value top
* @option bottom
* @value bottom
* @default top
*
* @param X
* @desc The x position of TopList box.
* @default 0
*
* @param Y
* @desc The y position of TopList box.
* @default 0
*
* @param Width
* @desc The TopList box width.
* @default 600
*
* @param Height
* @desc The TopList box height.
* @default 0
*
* @param backgroundcolor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default black
*
* @param opacity
* @desc The css opacity. 0-1
* @default 1
*
* @param TextColor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default yellow
*
* @param TextAlign
* @desc Button align. left/center/right
* @type select
* @option left
* @value left
* @option center
* @value center
* @option right
* @value right
* @default right
*
* @param fontsize
* @desc The size of text.
* @default 12
*
* @param zIndex
* @desc The css zIndex.
* @default 50000
*
* @param ImgWidth
* @desc The TopList Img width. Uint: rem.
* @default 5
*
* @param ImgHeight
* @desc The TopList Img Height. Uint: rem.
* @default 5
*
* @param ImgOpacity
* @desc The css opacity of img. 0-1
* @default 0.2
*
* @param LoginButtonText
* @desc Login Button Text
* @default Login
*
* @param LoginButtonColor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default yellow
*
* @param LoginButtonOpacity
* @desc The css opacity of login button. 0-1
* @default 1
*
* @param LoginButtonFontSize
* @desc The size of Login Button. Uint: rem.
* @default 2
*
* @param LoginModalBgColor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default black
*
* @param LoginModalTextColor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default white
*
* @param LoginModalOpacity
* @desc The css opacity of login modal. 0-1
* @default 0.8
*
* @param LoadingText
* @desc Loading Text
* @default Loading
*
* @param LastestText
* @desc Lastest Text
* @default Lastest
*
* @param LastestFullText
* @desc Lastest Full Text
* @default LastestFull
*
* @param ActorText
* @desc Actor Text
* @default Actor
*
* @param PlayerCEText
* @desc Player Compat Effectiveness Text
* @default CE
*
* @param PlayerCEFormula
* @desc Player Compat Effectiveness Formula
* @default a.agi+a.atk+a.cev+a.cnt+a.cri+a.def+a.eva+a.exr+a.fdr+a.grd+a.hit+a.hp*0.2+a.hrg+a.level+a.luk+a.mat+a.mcr+a.mdf+a.mdr+a.mev+a.mhp*0.2+a.mmp*0.2+a.mp*0.2+a.mrf+a.mrg+a.pdr+a.pha+a.rec+a.tcr+a.tgr+a.tp+a.trg
*
* @param TimeOLText
* @desc Time Online Text
* @default TimeOL
*
* @param LevelText
* @desc Level Text
* @default Level
*
* @param GoldText
* @desc Gold Text
* @default Gold
*
* @param StepsText
* @desc Steps Text
* @default Steps
*
* @param PlayTimeText
* @desc Play Time Text
* @default Play Time
*
* @param SaveTimesText
* @desc Save Times Text
* @default Save Times
*
* @param BattleTimesText
* @desc Battle Times Text
* @default Battle Times
*
* @param VictoryTimesText
* @desc Victory Times Text
* @default Victory Times
*
* @param EscapeTimesText
* @desc Escape Times Text
* @default Escape Times
*
* @param EnableCoupon
* @desc Enable coupon? true/false
* @type boolean
* @default true
*
* @param CouponText
* @desc Coupon Text
* @default Coupon
*
* @param EnableVerCheck
* @desc Enable VerCheck? true/false
* @type boolean
* @default true
*
* @param EnableVerCheckNotice
* @desc Enable VerCheck Notice? true/false
* @type boolean
* @default true
*
* @param VerCheckAutoDismissTimeSucc
* @desc Ver Check Auto Dismiss Time for success, set 0 to turn off auto dismiss.
* @default 3000
*
* @param VerCheckAutoDismissTimeErr
* @desc Ver Check Auto Dismiss Time for error, set 0 to turn off auto dismiss.
* @default 1000
*
* @param VerCheckModalBgColor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default black
*
* @param VerCheckModalTextColor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default white
*
* @param VerCheckModalOpacity
* @desc The css opacity of login modal. 0-1
* @default 0.8
*
* @param VerCheckX
* @desc The x position of VerCheck box.
* @default 0
*
* @param VerCheckY
* @desc The y position of VerCheck box.
* @default 0
*
* @param VerCheckWidth
* @desc The VerCheck box width with % percent or only number.
* @default 100%
*
* @param VerCheckbackgroundcolor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default rgba(0,0,0,0.7);
*
* @param VerCheckopacity
* @desc The css opacity. 0-1
* @default 1
*
* @param VerCheckTextColor
* @desc #000000-#FFFFFF or RGBA(R,G,B,A) or red blue green yellow etc.
* @default green
*
* @param VerCheckTextAlign
* @desc left/center/right
* @type select
* @option left
* @value left
* @option center
* @value center
* @option right
* @value right
* @default center
*
* @param VerCheckingText
* @desc Ver Checking Text
* @default Ver Checking
*
* @param NoNewText
* @desc No New Text
* @default No New
*
* @param HaveNewText
* @desc Have New Text
* @default Have New:
*
* @param LinkText
* @desc Link Text
* @default Link
*
* @param EnableLoginGift
* @desc Enable Login Gift? true/false
* @type boolean
* @default true
*
* @param LoginGift
* @desc format:'type:id:amount;'. type:gold=0,item=1,weapon=2,armor=3. for more detail check help.
* @default 0:0:100;1:1:1;
*
* @param EnableCloudSave
* @desc Enable Cloud Save? true/false
* @type boolean
* @default true
*
* @param CloudSaveText
* @desc Cloud Save Text
* @default Cloud Save
*
* @param EnableChat
* @desc Enable Chat? true/false
* @type boolean
* @default true
*
* @param EnableDanmu
* @desc Enable Danmu? true/false
* @type boolean
* @default true
*
* @param EnableDanmuOnMobileDevice
* @desc Enable Danmu On Mobile Device? true/false
* @type boolean
* @default false
*
* @param DanmuSpeed
* @desc Danmu Speed? unit: ms
* @default 5000
*
* @param DanmuInterval
* @desc Danmu Interval? unit: ms
* @default 1000
*
* @param ShopInGame
* @text Shop In Game Settings
* @desc Shop In Game Settings.
* @type struct<ShopInGameStruct>
*
* @param LoginCommonEventId
* @text Login Common Event
* @desc Do common event by this id when player logged in. Set 0 to disable.
* @type common_event
* @default 0
*
* @param EnableMenuButton
* @desc Enable MenuButton? true/false
* @type boolean
* @default true
*
* @param MenuButtonPositionX
* @desc Menu Button Position X? Uint: rem.
* @default 0
*
* @param MenuButtonPositionY
* @desc Menu Button Position Y? Uint: rem.
* @default 20
*
* @param EnableAuctionInGame
* @desc Enable AuctionInGame? true/false
* @type boolean
* @default true
*
* @param AuctionInGameText
* @desc AuctionInGame Text
* @default Auction In Game
*
* @param AuctionInGameSoldOutText
* @desc AuctionInGame Sold Out Text
* @default Sold Out
*
* @param AuctionInGameColumn
* @desc AuctionInGame Column
* @default 4
*
* @param PreventAndroidReturnKey
* @desc Prevent Android Return Key? true/false
* @type boolean
* @default true
*
* @param EnableHandleShowText
* @desc Enable Handle Show Text? true/false
* @type boolean
* @default false
*
* @param HandleShowTextText
* @desc HandleShowText Text
* @default Language
*
* @param HandleShowTextKey
* @desc HandleShowText key for aes decrypt.
* @default 0123456789abcdef
*
* @param AltTopList
* @text Alt Top List Settings
* @type struct<AltTopListStruct>
* @desc A "toggle" button that allows players to turn the UI
* on and off.
*
* @param Button
* @text Button Settings
* @desc Such as Page Up/Down Button Settings etc.
* @type struct<ButtonStruct>
* @default {"enable":"true","wheelThreshold":"20","KeyButton":"[\"{\\\"name\\\":\\\"pageUp\\\",\\\"enable\\\":\\\"true\\\",\\\"inputTrigger\\\":\\\"pageup\\\",\\\"image\\\":\\\"Arrow8\\\",\\\"opacity\\\":\\\"0.2\\\",\\\"x\\\":\\\"70\\\",\\\"y\\\":\\\"0\\\",\\\"soundEffect\\\":\\\"{\\\\\\\"name\\\\\\\":\\\\\\\"Cursor2\\\\\\\",\\\\\\\"volume\\\\\\\":\\\\\\\"90\\\\\\\",\\\\\\\"pitch\\\\\\\":\\\\\\\"100\\\\\\\",\\\\\\\"pan\\\\\\\":\\\\\\\"0\\\\\\\"}\\\"}\",\"{\\\"name\\\":\\\"pageDown\\\",\\\"enable\\\":\\\"true\\\",\\\"inputTrigger\\\":\\\"pagedown\\\",\\\"image\\\":\\\"Arrow2\\\",\\\"opacity\\\":\\\"0.2\\\",\\\"x\\\":\\\"73\\\",\\\"y\\\":\\\"0\\\",\\\"soundEffect\\\":\\\"{\\\\\\\"name\\\\\\\":\\\\\\\"Cursor2\\\\\\\",\\\\\\\"volume\\\\\\\":\\\\\\\"90\\\\\\\",\\\\\\\"pitch\\\\\\\":\\\\\\\"100\\\\\\\",\\\\\\\"pan\\\\\\\":\\\\\\\"0\\\\\\\"}\\\"}\"]"}
*
* @param commandRemember
* @text Command Remember
* @desc Command Remember? true/false, default:false.
* @type boolean
* @default false
*
* @param episodeSelectionCommonEventId
* @text Episode Selection Common Event
* @desc Do common event by this id when player select episode. Set 0 to disable. default:0.
* @type common_event
* @default 0
*
* @param episodeSelectionThreshold
* @text Episode Selection Threshold
* @desc Must exceeds this threshold can do common event when player select episode. default:0.
* @type number
* @default 0
*
*
*/
/*~struct~AltTopListStruct:
* @param Enable
* @text Enable
* @type boolean
* @desc Enable Alt Top List? true/false
* @default true
*
* @param ShowInMenu
* @text Show In Menu
* @type boolean
* @desc Show Alt Top List button In Menu? true/false
* @default true
*
* @param CommandText
* @text Command Text In Menu
* @desc Alt Top List Command Text In Menu
* @default Top List
*
* @param activeColumn
* @text Column to show
* @type text[]
* @desc Column will be show. Ex. "Lastest", "Actor", "PlayerCE", "TimeOL", "Level", "Gold", "Steps", "PlayTime", "SaveTimes", "BattleTimes", "VictoryTimes", "EscapeTimes"
* @default ["Lastest", "Actor", "PlayerCE", "TimeOL", "Level", "Gold", "Steps", "PlayTime", "SaveTimes", "BattleTimes", "VictoryTimes", "EscapeTimes"]
*
* @param orderbyColumn
* @text order by Column
* @type select
* @option Lastest
* @value Lastest
* @option PlayerCE
* @value PlayerCE
* @option TimeOL
* @value TimeOL
* @option Level
* @value Level
* @option Gold
* @value Gold
* @option Steps
* @value Steps
* @option PlayTime
* @value PlayTime
* @option SaveTimes
* @value SaveTimes
* @option BattleTimes
* @value BattleTimes
* @option VictoryTimes
* @value VictoryTimes
* @option EscapeTimes
* @value EscapeTimes
* @desc order by Column.
* @default Lastest
*
* @param SortMethod
* @text Sort Method
* @type select
* @option In Order
* @value In Order
* @option Reverse Order
* @value Reverse Order
* @desc Sort Method.
* @default Reverse Order
*
* @param x
* @text X
* @type text
* @desc X position of the alt top list. Formulas are allowed.
* (ex. Graphics.width - 96)
* @default 20
*
* @param y
* @text Y
* @type text
* @desc Y position of the alt top list. Formulas are allowed.
* (ex. Graphics.height - 96)
* @default 40
*
* @param maxWidth
* @text max Width
* @type text
* @desc max width per column. Formulas are allowed.
* (ex. Graphics.width - 96)
* @default 64
*
* @param maxHeight
* @text max Height
* @type text
* @desc max height per row. Formulas are allowed.
* (ex. Graphics.height - 96)
* @default 32
*
* @param spacing
* @text spacing
* @type text
* @desc Spacing between two columns. Formulas are allowed.
* (ex. Graphics.width - 96)
* @default 20
*
* @param align
* @text align
* @type select
* @option left
* @value left
* @option center
* @value center
* @option right
* @value right
* @desc column alignment.
* @default center
*
* @param activeColumnBackup
* @text All Column Backup
* @type text[]
* @desc All column backup here, you should not change this. Just for read only or copy from.
* Ex. "Lastest", "Actor", "PlayerCE", "TimeOL", "Level", "Gold", "Steps", "PlayTime", "SaveTimes", "BattleTimes", "VictoryTimes", "EscapeTimes"
* @default ["Lastest", "Actor", "PlayerCE", "TimeOL", "Level", "Gold", "Steps", "PlayTime", "SaveTimes", "BattleTimes", "VictoryTimes", "EscapeTimes"]
*
*/
/*~struct~ButtonStruct:
* @param enable
* @text Enable Button
* @desc Enable Button? true/false
* @type boolean
* @default true
*
* @param wheelThreshold
* @text Wheel Threshold
* @desc Wheel Threshold. Allowed values: 0 - 100, default: 20
* @type number
* @min 0
* @max 100
* @default 20
*
*
* @param KeyButton
* @text Key Button Settings
* @desc Such as Page Up/Down Button Settings etc.
* @type struct<KeyButtonStruct>[]
*/
/*~struct~KeyButtonStruct:
* @param enable
* @text Enable Button
* @desc Enable Button? true/false
* @type boolean
* @default true
*
* @param name
* @text Name
* @type text
* @desc The name of the button
*
* @param inputTrigger
* @text Input Code
* @type text
* @desc The input code triggered when the button is pressed.
* ex. ok / escape / pagedown / pageup
*
* @param image
* @text Image
* @type file
* @dir img/system
* @desc File path for the button image
* @require 1
*
* @param opacity
* @text Opacity
* @desc The image css opacity. 0-1
* @type text
* @default 1
*
* @param x
* @text X
* @type text
* @desc X position of the button. Uint: rem, 1rem ≈ 10px.
* @default 0
*
* @param y
* @text Y
* @type text
* @desc Y position of the button. Uint: rem, 1rem ≈ 10px.
* @default 0
*
* @param soundEffect
* @text Sound Effect
* @type struct<soundEffect>
* @desc Sound Effect to play when button is pressed.
* Depending on scenario, SE might already play. Test first.
*/
/*~struct~soundEffect:
* @param name
* @text Sound Effect Name
* @type file
* @dir audio/se
* @desc Sound effect to play when the button is pressed.
* @default
* @require 1
*
* @param volume
* @text Volume
* @type number
* @min 0
* @max 100
* @desc Volume of the sound effect, in %
* Allowed values: 0% - 100%
* @default 90
*
* @param pitch
* @text Pitch
* @type number
* @min 50
* @max 150
* @desc Pitch of the sound effect, in %
* Allowed values: 50% - 150%
* @default 100
*
* @param pan
* @text Pan
* @type number
* @min -100
* @max 100
* @desc Pan of the sound effect
* Allowed values: -100 - 100
* @default 0
*
*/
/*~struct~ShopInGameStruct:
* @param enable
* @desc Enable ShopInGame? true/false
* @type boolean
* @default true
*
* @param showInMenu
* @text Show In Menu
* @desc Show In Menu? true/false
* @type boolean
* @default true
*
* @param commandText
* @text Command Text In Menu
* @desc Command Text In Menu
* @type text
* @default Shop In Game
*
* @param soldOutText
* @text Sold Out Text
* @desc Sold Out Text
* @type text
* @default Sold Out
*
* @param popularText
* @text Popular Text
* @desc Popular Text
* @type text
* @default Popular
*
* @param generalText
* @text General Text
* @desc General Text
* @type text
* @default General
*
* @param myStoreText
* @text My Store Text
* @desc My Store Text
* @type text
* @default My Store
*
* @param amountText
* @text Amount Text
* @desc Amount Text
* @type text
* @default Amount:
*
* @param currencyText
* @text Currency Text
* @desc Currency Text
* @type text
* @default USD
*
* @param column
* @text Column
* @desc Column
* @type number
* @min 1
* @max 10
* @default 4
*
* @param popularAmount
* @text Popular Amount
* @desc Popular Amount
* @type number
* @default 4
*
* @param autoSaveAfterShopping
* @text Auto Save After Shopping
* @desc The save file id that you want Auto Save After Shopping. Default:21
* @type number
* @default 21
*
* @param autoSaveAfterNewGame
* @text Auto Save After NewGame
* @desc The save file id that you want Auto Save After NewGame with bought items. Default:22
* @type number
* @default 22
*
* @param displayGoldChangeInformation
* @text Display Gold Change Information
* @desc Display Gold Change Information? true/false default:true
* @type boolean
* @default true
*
* @param displayItemChangeInformation
* @text Display Item Change Information
* @desc Display Item Change Information? true/false default:true
* @type boolean
* @default true
*
* @param displayWeaponChangeInformation
* @text Display Weapon Change Information
* @desc Display Weapon Change Information? true/false default:true
* @type boolean
* @default true
*
* @param displayArmorChangeInformation
* @text Display Armor Change Information
* @desc Display Armor Change Information? true/false default:true
* @type boolean
* @default true
*
* @param displaySwitchesToggleInformation
* @text Display Switches Toggle Information
* @desc Display Switches Toggle Information? true/false default:true
* @type boolean
* @default true
*
* @param displayVariablesChangeInformation
* @text Display Variables Change Information
* @desc Display Variables Change Information? true/false default:true
* @type boolean
* @default true
*
* @param displayCommonEventInformation
* @text Display Common Event Information
* @desc Display Common Event Information? true/false default:true
* @type boolean
* @default true
*
*/
// Imported
var Imported = Imported || {};
Imported.AXY_AjaxNetStuff = true;
// Parameter Variables
AXY.AjaxNetStuff.Parameters = PluginManager.parameters('AXY_AjaxNetStuff');
AXY.AjaxNetStuff.Param = AXY.AjaxNetStuff.Param || {};
AXY.AjaxNetStuff.Alias = AXY.AjaxNetStuff.Alias || {};
AXY.AjaxNetStuff.Variables = AXY.AjaxNetStuff.Variables || {};
//
AXY.AjaxNetStuff.Param.URL = String(AXY.AjaxNetStuff.Parameters['URL']);
AXY.AjaxNetStuff.Param.EnableTopList = AXY.AjaxNetStuff.Parameters['EnableTopList'].toLowerCase() === 'true';
AXY.AjaxNetStuff.Param.X = parseInt(AXY.AjaxNetStuff.Parameters['X']);
AXY.AjaxNetStuff.Param.Y = parseInt(AXY.AjaxNetStuff.Parameters['Y']);
AXY.AjaxNetStuff.Param.Width = parseInt(AXY.AjaxNetStuff.Parameters['Width']);
AXY.AjaxNetStuff.Param.Height = parseInt(AXY.AjaxNetStuff.Parameters['Height']);
AXY.AjaxNetStuff.Param.backgroundcolor = String(AXY.AjaxNetStuff.Parameters['backgroundcolor']);
AXY.AjaxNetStuff.Param.opacity = parseFloat(AXY.AjaxNetStuff.Parameters['opacity']);
AXY.AjaxNetStuff.Param.TextColor = String(AXY.AjaxNetStuff.Parameters['TextColor']);
AXY.AjaxNetStuff.Param.TextAlign = String(AXY.AjaxNetStuff.Parameters['TextAlign']);
AXY.AjaxNetStuff.Param.fontsize = parseInt(AXY.AjaxNetStuff.Parameters['fontsize']);