-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,xpdrops_setbar].cs2
218 lines (218 loc) · 8.93 KB
/
[proc,xpdrops_setbar].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
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
// 999
[proc,xpdrops_setbar](component $component0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6)
%varcint2 = 0;
def_stat $stat7 = null;
if (%varbit4697 = 31) {
$stat7 = %varcint72;
} else if (%varbit4697 = 30) {
$stat7 = null;
} else {
$stat7 = enum(int, stat, enum_681, %varbit4697);
}
def_stat $stat8 = null;
if (%varbit4698 = 31) {
$stat8 = %varcint72;
} else if (%varbit4698 = 30) {
$stat8 = null;
} else {
$stat8 = enum(int, stat, enum_681, %varbit4698);
}
def_boolean $boolean9 = false;
def_string $string0 = ",";
def_string $string1 = "";
def_string $string2 = "";
def_string $string3 = "";
def_int $int10 = 0;
def_int $int11 = 0;
def_int $int12 = 0;
def_int $int13 = 0;
def_int $int14 = 0;
def_int $int15 = 0;
def_int $int16 = 0;
def_int $int17 = 0;
def_int $int18 = 0;
if ($stat7 ! null) {
$boolean9 = true;
if_setgraphic(enum(stat, graphic, enum_255, $stat7), $component1);
$int10, $int11 = ~xpdrops_data_get($stat7);
$int12 = stat_xp($stat7);
if ($int11 = -1) {
$int15 = calc($int12 - $int10);
if ($int15 >= 0) {
$string3 = ~tostring_spacer($int15, $string0);
if_settext("+<$string3>", $component2);
$string1 = "<enum(stat, string, enum_680, $stat7)> tracker:|Tracking from:|Total XP:";
$string2 = "<$string3>|<~tostring_spacer($int10, $string0)>|<~tostring_spacer($int12, $string0)>";
} else {
if_settext("N/A", $component2);
$string1 = "Your <enum(stat, string, enum_680, $stat7)> tracker is invalid.<br>Set a lower starting point.";
}
} else {
$string3 = ~tostring_spacer($int12, $string0);
if_settext($string3, $component2);
$int13 = stat_base($stat7);
if ($int13 < 99) {
$int14 = enum(int, int, enum_256, calc($int13 + 1));
$string1 = "<enum(stat, string, enum_680, $stat7)> XP:|<~text_client("<col=7f7f7f>", "<col=adadad>")>Next level:</col>|Remaining:";
$string2 = "<$string3>|<~text_client("<col=7f7f7f>", "<col=adadad>")><~tostring_spacer($int14, $string0)></col>|<~tostring_spacer(calc($int14 - $int12), $string0)>";
} else {
$string1 = "<enum(stat, string, enum_680, $stat7)> XP:";
$string2 = $string3;
}
}
} else if (%varbit4697 = 30) {
if_setgraphic(null, $component1);
if_settext("", $component2);
$string1, $string2 = "", "";
~deltooltip_action($component6);
} else {
$boolean9 = true;
if_setgraphic("staticons2,7", $component1);
$int17, $int16 = ~stats_totalxp;
if (%var1252 = -1) {
$int15 = calc($int16 % 1000);
$int18 = calc($int17 * pow(10, 6) + $int16 / 1000);
if ($int18 > %var1228) {
$string3 = "<~tostring_spacer(calc($int18 - %var1228), $string0)><$string0><~script47($int15)>";
if_settext("+<$string3>", $component2);
$string1 = "Total XP tracker:|Tracking from:|Total XP:";
if (%var1228 > 0) {
$string2 = "<$string3>|<~tostring_spacer(%var1228, $string0)><$string0>000|<~stats_tostring_totalxp($int17, $int16)>";
} else {
$string2 = "<$string3>|0|<~stats_tostring_totalxp($int17, $int16)>";
}
} else if ($int18 = %var1228 & $int15 >= 0) {
$string3 = tostring($int15);
if_settext("+<$string3>", $component2);
$string1 = "Total XP tracker:|Tracking from:|Total XP:";
if (%var1228 > 0) {
$string2 = "<$string3>|<~tostring_spacer(%var1228, $string0)><$string0>000|<~stats_tostring_totalxp($int17, $int16)>";
} else {
$string2 = "<$string3>|0|<~stats_tostring_totalxp($int17, $int16)>";
}
} else {
if_settext("N/A", $component2);
$string1 = "Your Total XP tracker is invalid.<br>Set a lower starting point.";
}
} else {
$string3 = ~stats_tostring_totalxp($int17, $int16);
if_settext($string3, $component2);
$string1 = "Total XP:";
$string2 = $string3;
}
}
def_component $layer19 = if_getlayer($component2);
~xp_drops_tooltip_setup($string2, $string1, $component6, $layer19, $component0);
if (~on_mobile = true) {
if_setnoclickthrough($boolean9, $layer19);
} else {
if_setnoclickthrough(false, $layer19);
}
def_boolean $boolean20 = false;
def_int $int21 = 0;
def_int $int22 = 0;
def_int $int23 = 0;
def_int $int24 = 0;
def_int $int25 = 0;
def_int $int26 = 0;
if ($stat8 ! null) {
$boolean20 = true;
$int12 = stat_xp($stat8);
$int10, $int11 = ~xpdrops_data_get($stat8);
if ($int11 ! -1 & $int11 > $int10) {
$int21 = ~xpdrops_setbar_progress($component4, $int10, $int12, $int11, 1);
$string1 = "<enum(stat, string, enum_680, $stat8)> goal|<~text_client("<col=7f7f7f>", "<col=adadad>")>Start:</col>|Current:|<~text_client("<col=7f7f7f>", "<col=adadad>")>End:</col>";
$string2 = "<~xpdrops_percentage_tostring($int21)>|<~text_client("<col=7f7f7f>", "<col=adadad>")><~tostring_spacer($int10, $string0)></col>|<~tostring_spacer($int12, $string0)>|<~text_client("<col=7f7f7f>", "<col=adadad>")><~tostring_spacer($int11, $string0)></col>";
if ($int12 < $int11) {
$string1 = append($string1, "|Remaining:");
$string2 = append($string2, "|<~tostring_spacer(calc($int11 - $int12), $string0)>");
}
} else {
$int13 = stat_base($stat8);
$int22 = calc($int13 + 1);
if ($int22 > 99) {
$int22 = 99;
}
$int14 = enum(int, int, enum_256, $int22);
$int21 = ~xpdrops_setbar_progress($component4, enum(int, int, enum_256, $int13), $int12, $int14, 0);
if ($int13 < 99) {
$string1 = "<enum(stat, string, enum_680, $stat8)>|Current XP:|<~text_client("<col=7f7f7f>", "<col=adadad>")>Next level:</col>|Remaining:";
$string2 = "<~xpdrops_percentage_tostring($int21)>|<~tostring_spacer($int12, $string0)>|<~text_client("<col=7f7f7f>", "<col=adadad>")><~tostring_spacer($int14, $string0)></col>|<~tostring_spacer(calc($int14 - $int12), $string0)>";
} else {
$string1 = "<enum(stat, string, enum_680, $stat8)> XP:";
$string2 = ~tostring_spacer($int12, $string0);
}
}
} else if (%varbit4698 = 30) {
$boolean20 = true;
$int17, $int16 = ~stats_totalxp;
if (%var1252 ! -1 & %var1252 > %var1228) {
if ($int17 < 2 & %var1252 <= calc(^max_32bit_int / 1000)) {
$int21 = ~xpdrops_setbar_progress($component4, calc(%var1228 * 1000), calc($int17 * pow(10, 9) + $int16), calc(%var1252 * 1000), 1);
$int24 = calc(%var1252 * 1000 - ($int17 * pow(10, 9) + $int16));
} else {
$int25 = calc($int17 * pow(10, 6) + $int16 / 1000);
$int21 = ~xpdrops_setbar_progress($component4, %var1228, $int25, %var1252, 1);
if ($int25 < %var1252) {
$int24 = calc(%var1252 - $int25);
$int26 = calc($int16 % 1000);
if ($int26 > 0) {
$int24 = calc($int24 - 1);
$int23 = calc($int24 / pow(10, 6));
$int24 = calc($int24 % pow(10, 6) * 1000);
$int24 = calc($int24 + (1000 - $int26));
} else {
$int23 = calc($int24 / pow(10, 6));
$int24 = calc($int24 % pow(10, 6) * 1000);
}
}
}
$string1 = "Total XP goal|<~text_client("<col=7f7f7f>", "<col=adadad>")>Start:</col>|Current:|<~text_client("<col=7f7f7f>", "<col=adadad>")>End:</col>";
if (%var1228 > 0) {
$string2 = "<~xpdrops_percentage_tostring($int21)>|<~text_client("<col=7f7f7f>", "<col=adadad>")><~tostring_spacer(%var1228, $string0)><$string0>000</col>|<~stats_tostring_totalxp($int17, $int16)>|<~text_client("<col=7f7f7f>", "<col=adadad>")><~tostring_spacer(%var1252, $string0)><$string0>000</col>";
} else {
$string2 = "<~xpdrops_percentage_tostring($int21)>|<~text_client("<col=7f7f7f>", "<col=adadad>")>0</col>|<~stats_tostring_totalxp($int17, $int16)>|<~text_client("<col=7f7f7f>", "<col=adadad>")><~tostring_spacer(%var1252, $string0)><$string0>000</col>";
}
if ($int23 > 0 | $int24 > 0) {
$string1 = append($string1, "|Remaining:");
$string2 = append($string2, "|<~stats_tostring_totalxp($int23, $int24)>");
}
} else {
if_setsize(0, 0, ^setsize_minus, ^setsize_minus, $component4);
if_setcolour(0x606060, $component4);
$string1, $string2 = "Use the setup menu to set a Total XP goal.", "";
}
} else {
$string1, $string2 = "", "";
~deltooltip_action($component6);
}
~xp_drops_tooltip_setup($string2, $string1, $component6, $component3, $component0);
if (~on_mobile = true) {
if_setnoclickthrough($boolean20, $component3);
} else {
if_setnoclickthrough(false, $component3);
}
if ($boolean9 = true) {
if_sethide(false, $layer19);
if_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_top, $layer19);
if_setsize(0, 29, ^setsize_minus, ^setsize_abs, $layer19);
if ($boolean20 = true) {
if_sethide(false, $component3);
if_setposition(0, 28, ^setpos_abs_centre, ^setpos_abs_top, $component3);
if_setposition(0, 38, ^setpos_abs_centre, ^setpos_abs_top, $component5);
} else {
if_sethide(true, $component3);
if_setposition(0, 29, ^setpos_abs_centre, ^setpos_abs_top, $component5);
}
} else if ($boolean20 = true) {
if_sethide(false, $layer19);
if_setposition(0, 5, ^setpos_abs_centre, ^setpos_abs_top, $layer19);
if_setsize(0, 4, ^setsize_minus, ^setsize_abs, $layer19);
if_sethide(false, $component3);
if_setposition(0, 7, ^setpos_abs_centre, ^setpos_abs_top, $component3);
if_setposition(0, 17, ^setpos_abs_centre, ^setpos_abs_top, $component5);
} else {
if_sethide(true, $layer19);
if_sethide(true, $component3);
if_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_top, $component5);
}