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,stats_setlevels].cs2
105 lines (105 loc) · 4.12 KB
/
[proc,stats_setlevels].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
// 395
[proc,stats_setlevels](stat $stat0, component $component1, string $string0, component $component2)
def_boolean $boolean3 = enum(stat, boolean, enum_1497, $stat0);
cc_settext(tostring(stat($stat0)));
def_int $lvl4 = stat_base($stat0);
.cc_settext(tostring($lvl4));
def_int $xp5 = stat_xp($stat0);
def_string $string1 = ",";
def_string $string2 = "<$string0> XP:";
def_string $string3 = ~tostring_spacer($xp5, $string1);
def_int $int6 = 0;
if (%varbit4181 = 0) {
if ($lvl4 < 99) {
$int6 = enum(int, int, enum_256, calc($lvl4 + 1));
$string2 = append($string2, "|Next level at:|Remaining XP:");
$string3 = append($string3, "|<~tostring_spacer($int6, $string1)>|<~tostring_spacer(calc($int6 - $xp5), $string1)>");
}
} else {
$string2 = append($string2, "|Next level at:");
$string3 = append($string3, "|<~tostring_spacer(enum(int, int, enum_256, calc($lvl4 + 1)), $string1)>");
}
if (~league_relic_active(equilibrium_1736) = 1) {
$string2 = append($string2, "|<~script7699>");
$string3 = append($string3, "|<~tostring_spacer(~script7698($stat0), $string1)>");
}
def_int $int7 = 0;
def_int $int8 = 0;
def_int $int9 = 0;
def_int $int10 = 0;
if (~deadman_world ! 0) {
$int7 = ~script1936($stat0);
if ($int7 ! -1) {
$int7 = calc($int7 / 10);
if ($int7 > $xp5) {
$string2 = append($string2, "|<~text_client("<col=7c0808>", "<col=ef1020>")>XP to regain:</col>");
$string3 = append($string3, "|<~text_client("<col=7c0808>", "<col=ef1020>")><~tostring_spacer(calc($int7 - $xp5), $string1)></col>");
$int8 = 1;
}
}
if ($int8 = 0 & %var1588 > 0) {
switch_stat ($stat0) {
case attack, strength, magic :
$int10 = ~script2031(20);
if ($int10 > 0) {
$string2 = append($string2, "|<~text_client("<col=7c0808>", "<col=ef1020>")>XP permitted:</col>");
$string3 = append($string3, "|<~text_client("<col=7c0808>", "<col=ef1020>")><~tostring_spacer($int10, $string1)></col>");
} else {
$int9 = 1;
$string2 = append($string2, "|<~text_client("<col=7c0808>", "<col=ef1020>")>XP permitted:</col>");
$string3 = append($string3, "|<~text_client("<col=7c0808>", "<col=ef1020>")>NONE</col>");
}
case ranged :
$int10 = ~script2031(30);
if ($int10 > 0) {
$string2 = append($string2, "|<~text_client("<col=7c0808>", "<col=ef1020>")>XP permitted:</col>");
$string3 = append($string3, "|<~text_client("<col=7c0808>", "<col=ef1020>")><~tostring_spacer($int10, $string1)></col>");
} else {
$int9 = 1;
$string2 = append($string2, "|<~text_client("<col=7c0808>", "<col=ef1020>")>XP permitted:</col>");
$string3 = append($string3, "|<~text_client("<col=7c0808>", "<col=ef1020>")>NONE</col>");
}
case defence :
$int10 = ~script2031(40);
if ($int10 > 0) {
$string2 = append($string2, "|<~text_client("<col=7c0808>", "<col=ef1020>")>XP permitted:</col>");
$string3 = append($string3, "|<~text_client("<col=7c0808>", "<col=ef1020>")><~tostring_spacer($int10, $string1)></col>");
} else {
$int9 = 1;
$string2 = append($string2, "|<~text_client("<col=7c0808>", "<col=ef1020>")>XP permitted:</col>");
$string3 = append($string3, "|<~text_client("<col=7c0808>", "<col=ef1020>")>NONE</col>");
}
}
}
}
if (.cc_find($component1, 5) = ^true) {
if ($int9 = 1) {
.cc_sethide(false);
} else {
.cc_sethide(true);
}
} else {
.cc_create($component1, ^iftype_graphic, 5);
.cc_setposition(6, 0, ^setpos_abs_left, ^setpos_abs_centre);
.cc_setsize(19, 19, ^setsize_abs, ^setsize_abs);
.cc_setgraphic("warning_icons,0");
.cc_setgraphicshadow(0x010101);
if ($int9 = 1) {
.cc_sethide(false);
} else {
.cc_sethide(true);
}
}
if ($boolean3 = true & map_members = false & %varcint103 = 0) {
$string2 = "<col=ff0000><$string0>:</col>";
$string3 = "<col=ff0000>Members Only</col>";
}
if (~on_mobile = true) {
if_setonop("stats_op(event_op, event_com, -1, $component2, $string2, $string3, p12_full)", $component1);
if (%varcint218 = $component1 & %varcint217 = -1) {
~script2344($component1, -1, $component2, $string2, $string3, p12_full);
}
} else {
if_setonmouserepeat("script992(event_com, -1, $component2, $string2, $string3, p12_full, calc(25 / 5))", $component1);
%varcint2 = 0;
}