-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,adventurepath_voucher_init].cs2
96 lines (96 loc) · 3.88 KB
/
[proc,adventurepath_voucher_init].cs2
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
// 3509
[proc,adventurepath_voucher_init](int $int0, string $text0)
def_enum $enum1 = enum(int, enum, enum_2621, $int0);
if ($enum1 = null) {
if_close;
mes("The voucher has already been used.");
return;
}
def_component $component2 = interface_643:4;
def_component $component3 = interface_643:3;
def_component $component4 = interface_643:0;
if_setsize(500, 334, ^setsize_abs, ^setsize_abs, $component4);
if_setposition(6, 0, ^setpos_abs_left, ^setpos_abs_top, $component4);
cc_deleteall($component2);
cc_deleteall($component3);
cc_deleteall($component4);
def_int $width5 = if_getwidth($component3);
def_int $height6 = if_getheight($component3);
def_int $int7 = calc($width5 - 64 - 36 * 2);
def_int $int8 = 0;
def_int $count9 = enum_getoutputcount($enum1);
if ($count9 = 0) {
if_close;
return;
}
def_int $int10 = 0;
def_struct $structarray0($count9);
def_enum $enum11 = null;
def_enum $enum12 = null;
def_int $count13 = 0;
def_int $int14 = 0;
def_int $int15 = 0;
def_int $int16 = 0;
def_int $height17 = 0;
while ($count13 < $count9) {
$structarray0($count13) = enum(int, struct, $enum1, $count13);
if ($structarray0($count13) ! null) {
$enum11 = struct_param($structarray0($count13), param_838);
$enum12 = struct_param($structarray0($count13), param_840);
if ($enum11 ! null & $enum12 ! null) {
if ($int14 = 0) {
cc_create($component3, ^iftype_text, $int10);
cc_setsize(calc(16 + $width5), 40, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height17, ^setpos_abs_left, ^setpos_abs_top);
cc_settext("<u=ff981f>Free to play rewards</u>");
cc_settextfont(b12_full);
cc_settextshadow(true);
cc_setcolour(0xff981f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
$int14 = 1;
$int10 = calc($int10 + 1);
$height17 = calc($height17 + 40);
}
$int10, $int16 = ~adventurepath_voucher_entry($height17, $component3, $int7, $int10, $enum11, $enum12, struct_param($structarray0($count13), adventurepath_description_free), struct_param($structarray0($count13), param_837), $int16, struct_param($structarray0($count13), param_844));
$height17 = calc($height17 + 88);
}
}
$count13 = calc($count13 + 1);
}
$count13 = 0;
while ($count13 < $count9) {
if ($structarray0($count13) ! null) {
$enum11 = struct_param($structarray0($count13), param_839);
$enum12 = struct_param($structarray0($count13), param_841);
if ($enum11 ! null & $enum12 ! null) {
if ($int15 = 0) {
cc_create($component3, ^iftype_text, $int10);
cc_setsize(calc(16 + $width5), 40, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height17, ^setpos_abs_left, ^setpos_abs_top);
cc_settext("<u=ff981f>Member rewards</u>");
cc_settextfont(b12_full);
cc_settextshadow(true);
cc_setcolour(0xff981f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
$int15 = 1;
$int10 = calc($int10 + 1);
$height17 = calc($height17 + 40);
}
$int10, $int16 = ~adventurepath_voucher_entry($height17, $component3, $int7, $int10, $enum11, $enum12, struct_param($structarray0($count13), adventurepath_description_member), struct_param($structarray0($count13), param_837), $int16, struct_param($structarray0($count13), param_845));
$height17 = calc($height17 + 88);
}
}
$count13 = calc($count13 + 1);
}
$height6 = if_getheight($component4);
def_int $int18 = calc($height6 - if_getheight($component3));
if ($height17 > $height6) {
if_setscrollsize(0, $height17, $component3);
~scrollbar_vertical($component2, $component3, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
if_sethide(false, $component2);
} else {
if_setsize(if_getwidth($component4), calc($int18 + $height17), ^setsize_abs, ^setsize_abs, $component4);
if_setposition(if_getx($component4), calc($int8 / 2), ^setpos_abs_left, ^setpos_abs_top, $component4);
if_sethide(true, $component2);
}
~stoneborder(interface_643:1, $text0, 0);