-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,skillmulti_quantitybuttons_set].cs2
104 lines (104 loc) · 3.75 KB
/
[proc,skillmulti_quantitybuttons_set].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
// 2055
[proc,skillmulti_quantitybuttons_set](int $int0, int $int1)
def_boolean $boolean2 = enum(int, boolean, enum_1810, $int0);
if ($boolean2 = true) {
%varcint200 = ~max(1, ~min($int1, %varcint200));
} else {
if (%varcint200 > 5) {
%varcint200 = 10;
} else if (%varcint200 > 1) {
%varcint200 = 5;
} else {
%varcint200 = 1;
}
%varcint200 = ~min(%varcint200, $int1);
}
def_int $int3 = 0;
def_string $text0 = "X";
if ($boolean2 = true) {
if ($int1 > 1) {
if (%varcint200 = 1) {
$int3 = ~skillmulti_quantitybutton_setup(1, 1, interface_270:7, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, 1, interface_270:7, $int0, $int1, $int3);
}
} else {
~skillmulti_wipebutton(interface_270:7);
}
if ($int1 > 5) {
if (%varcint200 = 5) {
$int3 = ~skillmulti_quantitybutton_setup(1, 5, interface_270:8, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, 5, interface_270:8, $int0, $int1, $int3);
}
} else {
~skillmulti_wipebutton(interface_270:8);
}
if ($int1 > 10) {
if (%varcint200 = 10) {
$int3 = ~skillmulti_quantitybutton_setup(1, 10, interface_270:9, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, 10, interface_270:9, $int0, $int1, $int3);
}
} else {
~skillmulti_wipebutton(interface_270:9);
}
if (%varcint201 = 1 | %varcint201 = 5 | %varcint201 = 10 | %varcint201 = $int1) {
~skillmulti_wipebutton(interface_270:10);
} else if (%varcint201 < 1 | %varcint201 > $int1) {
~skillmulti_wipebutton(interface_270:10);
} else if (%varcint200 = %varcint201) {
$int3 = ~skillmulti_quantitybutton_setup(1, %varcint201, interface_270:10, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, %varcint201, interface_270:10, $int0, $int1, $int3);
}
if ($int1 > 2) {
if_setposition($int3, 0, ^setpos_abs_left, ^setpos_abs_centre, interface_270:11);
$int3 = calc($int3 + if_getwidth(interface_270:11) + 5);
~skillmulti_quantitybutton_draw(false, $text0, interface_270:11);
if_setonmouseover("skillmulti_quantitybutton_draw(true, $text0, event_com)", interface_270:11);
if_setonmouseleave("skillmulti_quantitybutton_draw(false, $text0, event_com)", interface_270:11);
if_setop(1, "Other quantity", interface_270:11);
if_setonop("skillmulti_quantitybutton_x_start(event_opindex, $int0, $int1)", interface_270:11);
if_setontimer(null, interface_270:11);
} else {
~skillmulti_wipebutton(interface_270:11);
}
if (%varcint200 >= $int1) {
$int3 = ~skillmulti_quantitybutton_setup(1, $int1, interface_270:12, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, $int1, interface_270:12, $int0, $int1, $int3);
}
} else {
if (%varcint200 = 1) {
$int3 = ~skillmulti_quantitybutton_setup(1, 1, interface_270:7, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, 1, interface_270:7, $int0, $int1, $int3);
}
if ($int1 >= 5) {
if (%varcint200 = 5) {
$int3 = ~skillmulti_quantitybutton_setup(1, 5, interface_270:8, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, 5, interface_270:8, $int0, $int1, $int3);
}
} else {
~skillmulti_wipebutton(interface_270:8);
}
if ($int1 >= 10) {
if (%varcint200 = 10) {
$int3 = ~skillmulti_quantitybutton_setup(1, 10, interface_270:9, $int0, $int1, $int3);
} else {
$int3 = ~skillmulti_quantitybutton_setup(0, 10, interface_270:9, $int0, $int1, $int3);
}
} else {
~skillmulti_wipebutton(interface_270:9);
}
~skillmulti_wipebutton(interface_270:10);
~skillmulti_wipebutton(interface_270:11);
~skillmulti_wipebutton(interface_270:12);
}
if ($int3 > 0) {
$int3 = calc($int3 - 5);
}
if_setsize($int3, 0, ^setsize_abs, ^setsize_minus, interface_270:6);
if_setsize($int3, 0, ^setsize_minus, ^setsize_minus, interface_270:3);