This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path[proc,league_rewards_draw].cs2
167 lines (167 loc) · 6.91 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
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
// 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, component $component13, component $component14, int $y15)
cc_deleteall($component4);
cc_deleteall($component5);
cc_deleteall($component6);
def_int $int16 = 0;
def_int $height17 = 7;
def_int $int18 = calc(if_getwidth($component6) / 2);
def_enum $enum19 = enum_2670;
def_int $count20 = enum_getoutputcount($enum19);
def_int $int21 = 0;
def_int $int22 = 1;
def_int $int23 = 0;
def_int $int24 = 0;
def_struct $struct25 = null;
def_enum $enum26 = null;
def_int $int27 = 0;
def_int $int28 = 0;
def_boolean $boolean29 = ~script7714;
%varbit10110 = -1;
while ($int22 <= $count20) {
$struct25 = enum(int, struct, $enum19, $int22);
$enum26 = struct_param($struct25, param_87);
if ($enum26 ! null & enum_getoutputcount($enum26) > 0) {
if ($int22 ! 1) {
$height17, $int27 = ~pest_rewards_divider(5, $component5, $height17, $int27);
}
cc_create($component5, ^iftype_text, $int27);
cc_settext(struct_param($struct25, param_858));
cc_settextfont(b12_full);
cc_settextshadow(true);
cc_setcolour(0xff891f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_setsize(if_getwidth($component6), 13, ^setsize_abs, ^setsize_abs);
cc_setposition(0, $height17, ^setpos_abs_left, ^setpos_abs_top);
$height17 = calc($height17 + 13);
$int27 = calc($int27 + 1);
$height17, $int27 = ~pest_rewards_divider(5, $component5, $height17, $int27);
while ($int23 < enum_getoutputcount($enum26)) {
if (calc($int23 % 2) = 0) {
$int16 = 0;
} else {
$int16 = calc($int18 - 1);
}
$int16 = calc($int16 + 4);
if ($int23 ! 0 & calc($int23 % 2) = 0) {
$height17 = calc($height17 + 32 + 8);
}
$int27, $int28 = ~league_reward_draw_item($int16, $height17, $int18, enum(int, struct, $enum26, $int23), $int24, $int0, $int27, $int28, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14, $struct25);
$int23 = calc($int23 + 1);
$int24 = calc($int24 + 1);
}
$height17 = calc($height17 + 32 + 10);
}
$int22 = calc($int22 + 1);
$int23 = 0;
}
$int27 = 0;
def_string $text0 = "";
def_string $string1 = "";
def_int $int30 = 0;
def_int $colour31 = ^white;
def_string $op2 = "";
def_string $string3 = ",";
def_struct $struct32 = null;
cc_deleteall($component7);
cc_deleteall($component10);
cc_deleteall($component12);
cc_deleteall($component13);
if ($int0 ! -1) {
$text0, $string1, $int30, $struct32 = ~script3286($int0);
%varbit10110 = $int0;
~league_rewards_confirmdraw(false, $text0, $component8);
while ($int27 < $int0) {
cc_create($component7, ^iftype_rectangle, $int27);
cc_sethide(true);
$int27 = calc($int27 + 1);
}
cc_create($component7, ^iftype_rectangle, $int27);
cc_sethide(false);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
if ($boolean29 = true) {
cc_setop(1, "Info");
} else {
cc_setop(1, "Confirm");
}
cc_setopbase("<col=ff981f><$text0></col>");
if (~on_mobile = false) {
cc_setonmouserepeat("league_rewards_confirmdraw(true, $text0, $component8)");
cc_setonmouseleave("league_rewards_confirmdraw(false, $text0, $component8)");
}
cc_setonop("league_reward_shop_confirmop(event_op, $component9, $struct32)");
~script2285;
~steelborder($component10, $text0, 1);
if ($boolean29 = true) {
if_settext("<br><col=ffffff><$text0></col><br><$string1><br>It will cost <col=ffffff><~tostring_spacer($int30, $string3)></col> points.", $component11);
} else {
if_settext("<col=ffffff><$text0></col><br><br><$string1><br>Are you sure that you wish to buy this item for <col=ffffff><~tostring_spacer($int30, $string3)></col> points?<br><col=ffffff>You cannot sell this item back</col> if you change your mind.", $component11);
}
$int27 = ~v2_stone_button($component12);
cc_create($component12, ^iftype_text, $int27);
$op2 = "Confirm";
if_setop(1, $op2, $component12);
if_setopbase("<col=ff981f>League reward</col>", $component12);
if (~on_mobile = false) {
if_setonmouseleave("script7747($component12, false, $op2, ^white)", $component12);
if_setonmouseover("script7747($component12, true, $op2, 0xaaaaaa)", $component12);
}
if_setonop("league_reward_shop_buy", $component12);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_settext($op2);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour($colour31);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
$int27 = ~v2_stone_button($component13);
cc_create($component13, ^iftype_text, $int27);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
$op2 = "Cancel";
if ($boolean29 = true) {
$op2 = "Back";
}
cc_settext($op2);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour(^white);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
if_setop(1, $op2, $component13);
if_setopbase("<col=ff981f>League reward</col>", $component13);
if (~on_mobile = false) {
if_setonmouseleave("script7747($component13, false, $op2, ^white)", $component13);
if_setonmouseover("script7747($component13, true, $op2, 0xaaaaaa)", $component13);
}
if_setonop("league_reward_confirm_back($int0, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10, $component11, $component12, $component13, $component14)", $component13);
} else {
$int27 = ~v2_stone_button_in_filled($component8);
cc_create($component8, ^iftype_text, $int27);
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);
if ($boolean29 = true) {
cc_settext("Info");
} else {
cc_settext("Confirm");
}
}
cc_deleteall($component14);
~scrollbar_vertical($component14, $component6, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
if ($height17 > if_getheight($component6)) {
if_setscrollsize(0, $height17, $component6);
} else {
if_setscrollsize(0, 0, $component6);
}
if_setscrollpos(0, $y15, $component6);
~scrollbar_vertical_rebuild($component14, $component6);
if ($boolean29 = true) {
if_sethide(true, interface_658:22);
if_setposition(0, 13, ^setpos_abs_centre, ^setpos_abs_bottom, interface_658:23);
if_settext("You can purchase these rewards on a Non-Leagues world.", interface_658:12);
if_setsize(220, if_getheight(interface_658:12), ^setsize_abs, ^setsize_abs, interface_658:12);
}