-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,script5380].cs2
86 lines (86 loc) · 2.03 KB
/
[proc,script5380].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
// 5380
[proc,script5380](stat $stat0, int $int1)(int)
def_int $xp2 = stat_xp($stat0);
def_int $int3 = 0;
def_int $int4 = ~private_event_world;
def_int $int5 = 0;
if ($stat0 = slayer) {
$int5 = %varbit13669;
if ($int4 = 3) {
$int5 = calc($int5 * 10);
}
$int3 = calc(scale(%varbit13670, 100, ~max(100, $int5)) / 10);
if ($int3 ! 0 & abs(calc(~xptracker_get_slayer_xp(0) - $int3)) <= 1) {
return(calc(($int1 - $xp2 - 1) / $int3 + 1));
}
return(-1);
}
if (~xptracker_iscombat($stat0) = 0) {
return(-1);
}
if (%varcint568 ! %varbit6100 & %varbit6100 ! 0) {
%varcint568 = %varbit6100;
}
def_enum $enum6 = enum(int, enum, enum_3908, %varbit357);
def_int $int7 = %var43;
if ($int7 = 4 & %varbit2668 = 1) {
$int7 = 5;
}
def_struct $struct8 = enum(int, struct, $enum6, $int7);
def_int $int9 = 0;
if (%varbit357 = 24 | %varbit357 = 29) {
$int9 = 1;
}
def_int $int10 = 0;
def_int $int11 = 0;
def_int $int12 = 0;
if (($int9 = 1 & %var43 = 3 | %varbit2668 = 1) & $stat0 = defence) {
$int3 = %varcint568;
$int10 = %varbit13094;
if ($int4 = 3) {
$int10 = calc($int10 * 10);
}
$int11 = 3;
} else {
switch_stat ($stat0) {
case attack :
$int11 = struct_param($struct8, param_1401);
$int10 = %varbit13092;
if ($int4 = 3) {
$int10 = calc($int10 * 10);
}
case strength :
$int11 = struct_param($struct8, param_1402);
$int10 = %varbit13093;
if ($int4 = 3) {
$int10 = calc($int10 * 10);
}
case ranged :
$int11 = struct_param($struct8, param_1405);
$int10 = %varbit13091;
if ($int4 = 3) {
$int10 = calc($int10 * 10);
}
case defence :
$int11 = struct_param($struct8, param_1403);
$int10 = %varbit13094;
if ($int4 = 3) {
$int10 = calc($int10 * 10);
}
case hitpoints :
$int11 = struct_param($struct8, param_1404);
$int10 = %varbit13095;
if ($int4 = 3) {
$int10 = calc($int10 * 10);
}
}
}
if ($int11 <= 0) {
return(-2);
}
$int3 = scale(%varcint568, 3, ~max(3, $int11));
if ($int3 <= 0) {
return(-2);
}
$int3 = scale($int3, 100, ~max(100, $int10));
return(calc(($int1 - $xp2 - 1) / $int3 + 1));