-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,magic_training_rewards].cs2
41 lines (41 loc) · 1.44 KB
/
[proc,magic_training_rewards].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
// 3255
[proc,magic_training_rewards](component $component0, component $component1, component $component2)(int)
cc_deleteall($component0);
def_int $count3 = 0;
def_int $count4 = enum_getoutputcount(enum_2753);
def_int $int5 = 0;
def_namedobj $namedobj6 = null;
def_string $string0 = "";
def_int $int7 = calc(if_getwidth($component0) / 6);
def_int $int8 = calc(if_getheight($component0) / 4);
def_int $int9 = 0;
def_int $int10 = 0;
while ($count3 < $count4) {
$namedobj6 = enum(int, namedobj, enum_2753, $count3);
if ($namedobj6 ! null) {
$string0 = oc_name($namedobj6);
cc_create($component0, ^iftype_graphic, $int5);
cc_setoutline(1);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int7 / 2 - 36 / 2 + $int10 * $int7), calc($int8 / 2 - 32 / 2 + $int9 * $int8), ^setpos_abs_left, ^setpos_abs_top);
cc_setobject($namedobj6, 1);
cc_setop(1, "Select <col=ff981f><$string0>");
cc_setop(2, "Examine <col=ff981f><$string0>");
cc_setonop("magic_training_rewards_op(event_op, $component1, $count3, $component2, $component0)");
if (~on_mobile = false) {
cc_setonmouseleave("cc_settrans(event_com, cc_getid, 0, null)");
cc_setonmouserepeat("cc_settrans(event_com, cc_getid, 140, null)");
}
$int5 = calc($int5 + 1);
$int10 = calc($int10 + 1);
if ($int10 > 5) {
$int9 = calc($int9 + 1);
$int10 = 0;
}
}
$count3 = calc($count3 + 1);
}
if ($int10 = 0) {
$int9 = calc($int9 - 1);
}
return(calc((1 + $int9) * $int8));