-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,league_rewards_draw].cs2
140 lines (140 loc) · 6.16 KB
/
[proc,league_rewards_draw].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
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
// 503
[proc,league_rewards_draw](int $int0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, component $component9, component $component10, component $component11, component $component12, int $y13)
cc_deleteall($component4);
def_int $int14 = 0;
def_int $height15 = 7;
def_int $int16 = calc(if_getwidth($component4) / 2);
def_enum $enum17 = enum_2670;
def_int $count18 = enum_getoutputcount($enum17);
def_int $int19 = 0;
def_int $int20 = 1;
def_int $int21 = 0;
def_int $int22 = 0;
def_struct $struct23 = null;
def_enum $enum24 = null;
def_int $int25 = 0;
%varbit10110 = -1;
while ($int20 <= $count18) {
$struct23 = enum(int, struct, $enum17, $int20);
$enum24 = struct_param($struct23, param_87);
if ($enum24 ! null & enum_getoutputcount($enum24) > 0) {
if ($int20 ! 1) {
$height15, $int25 = ~pest_rewards_divider(5, $component4, $height15, $int25);
}
cc_create($component4, ^iftype_text, $int25);
cc_settext(struct_param($struct23, param_858));
cc_settextfont(b12_full);
cc_settextshadow(true);
cc_setcolour(0xff891f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setsize(if_getwidth($component4), 13, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height15, ^setpos_abs_left, ^setpos_abs_top);
$height15 = calc($height15 + 13);
$int25 = calc($int25 + 1);
$height15, $int25 = ~pest_rewards_divider(5, $component4, $height15, $int25);
while ($int21 < enum_getoutputcount($enum24)) {
if (calc($int21 % 2) = 0) {
$int14 = 0;
} else {
$int14 = calc($int16 - 1);
}
$int14 = calc($int14 + 4);
if ($int21 ! 0 & calc($int21 % 2) = 0) {
$height15 = calc($height15 + 32 + 8);
}
$int25 = ~league_reward_draw_item($component4, $int14, $height15, $int16, enum(int, struct, $enum24, $int21), $int22, $int0, $int25, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $struct23);
$int21 = calc($int21 + 1);
$int22 = calc($int22 + 1);
}
$height15 = calc($height15 + 32 + 10);
}
$int20 = calc($int20 + 1);
$int21 = 0;
}
$int25 = 0;
def_string $text0 = "";
def_string $string1 = "";
def_int $int26 = 0;
def_string $op2 = "";
def_string $string3 = ",";
def_struct $struct27 = null;
cc_deleteall($component5);
cc_deleteall($component8);
cc_deleteall($component10);
cc_deleteall($component11);
if ($int0 ! -1) {
$text0, $string1, $int26, $struct27 = ~script3286($int0);
if (~script3292($struct27) = 1) {
%varbit10110 = $int0;
~pest_rewards_confirmdraw(false, $text0, $component6);
while ($int25 < $int0) {
cc_create($component5, ^iftype_rectangle, $int25);
cc_sethide(true);
$int25 = calc($int25 + 1);
}
cc_create($component5, ^iftype_rectangle, $int25);
cc_sethide(false);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setop(1, "Confirm");
cc_setopbase("<col=ff981f><$text0></col>");
if (~on_mobile = false) {
cc_setonmouserepeat("pest_rewards_confirmdraw(true, $text0, $component6)");
cc_setonmouseleave("pest_rewards_confirmdraw(false, $text0, $component6)");
}
cc_setonop("league_reward_shop_confirmop(event_opindex, $component7, $struct27)");
~steelborder($component8, $text0, 1);
if_settext("<col=ffffff><$text0></col><br><$string1><br><br>Are you sure that you wish to buy this item for <col=ffffff><~tostring_spacer($int26, $string3)></col> points?<br><col=ffffff>You cannot sell this item back</col> if you change your mind.", $component9);
$int25 = ~v2_stone_button($component10);
cc_create($component10, ^iftype_text, $int25);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
$op2 = "Confirm";
cc_settext($op2);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour(^white);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
if_setop(1, $op2, $component10);
if (~on_mobile = false) {
if_setonmouseleave("league_relic_button_hover($component10, false, $op2, ^white)", $component10);
if_setonmouseover("league_relic_button_hover($component10, true, $op2, 0xaaaaaa)", $component10);
}
if_setonop("league_reward_shop_buy(event_opindex, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12)", $component10);
$int25 = ~v2_stone_button($component11);
cc_create($component11, ^iftype_text, $int25);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
$op2 = "Cancel";
cc_settext($op2);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour(^white);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
if_setop(1, $op2, $component11);
if (~on_mobile = false) {
if_setonmouseleave("league_relic_button_hover($component11, false, $op2, ^white)", $component11);
if_setonmouseover("league_relic_button_hover($component11, true, $op2, 0xaaaaaa)", $component11);
}
if_setonop("league_reward_confirm_back($int0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12)", $component11);
}
} else {
$int25 = ~v2_stone_button_in_filled($component6);
cc_create($component6, ^iftype_text, $int25);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setcolour(0x9f9f9f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextfont(p12_full);
cc_settextshadow(false);
cc_settext("Confirm");
}
cc_deleteall($component12);
~scrollbar_vertical($component12, $component4, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
if ($height15 > if_getheight($component4)) {
if_setscrollsize(0, $height15, $component4);
} else {
if_setscrollsize(0, 0, $component4);
}
if_setscrollpos(0, $y13, $component4);
~scrollbar_vertical_rebuild($component12, $component4);