-
Notifications
You must be signed in to change notification settings - Fork 11
/
[clientscript,duel_confirm_text].cs2
77 lines (77 loc) · 3.73 KB
/
[clientscript,duel_confirm_text].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
// 206
[clientscript,duel_confirm_text]
def_string $string0 = "";
def_string $string1 = "";
if (%varbit642 > 0) {
$string0 = "<$string0>Some worn items will be taken off.<br>";
}
if (testbit(%var286, 7) = ^true | testbit(%var286, 13) = ^true) {
$string0 = "<$string0>Boosted stats will be restored.<br>";
}
if (testbit(%var286, 9) = ^true) {
$string0 = "<$string0>Existing prayers will be stopped.<br>";
}
if (testbit(%var286, 0) = ^true) {
$string1 = "<$string1>You cannot forfeit the duel.<br>";
}
if (testbit(%var286, 1) = ^true) {
$string1 = "<$string1>You cannot move.<br>";
}
if (testbit(%var286, 2) = ^true) {
$string1 = "<$string1>You cannot switch weapons.<br>";
}
if (testbit(%var286, 4) = ^true) {
$string1 = "<$string1>You cannot use Ranged attacks <col=ff0000>or salamanders<col=ffffff>.<br>";
}
if (testbit(%var286, 5) = ^true) {
$string1 = "<$string1>You cannot use Melee attacks <col=ff0000>or salamanders<col=ffffff>.<br>";
}
if (testbit(%var286, 6) = ^true) {
$string1 = "<$string1>You cannot use Magic attacks <col=ff0000>or salamanders<col=ffffff>.<br>";
}
if (testbit(%var286, 13) = ^true) {
$string1 = "<$string1>You cannot use special attacks.<br>";
}
if (testbit(%var286, 12) = ^true) {
$string1 = "<$string1>You can only attack with 'fun' weapons.<br>";
}
if (testbit(%var286, 7) = ^true) {
$string1 = "<$string1>You cannot use potions or drinks.<br>";
}
if (testbit(%var286, 8) = ^true) {
$string1 = "<$string1>You cannot use food.<br>";
}
if (testbit(%var286, 9) = ^true) {
$string1 = "<$string1>You cannot use Prayer.<br>";
}
if (testbit(%var286, 10) = ^true) {
$string1 = "<$string1>There will be obstacles in the arena.<br>";
}
if (testbit(%var286, 17) = ^true | testbit(%var286, 19) = ^true) {
$string1 = "<$string1>You can't use 2H weapons such as bows.<br>";
}
if_settext($string0, interface_476:68);
if_settext($string1, interface_476:70);
if_setsize(100, calc(11 * paraheight(if_gettext(interface_476:66), 100, p11_full)), ^setsize_abs, ^setsize_abs, interface_476:66);
if_setsize(132, calc(11 * paraheight($string0, 132, p11_full)), ^setsize_abs, ^setsize_abs, interface_476:68);
if_setsize(132, calc(11 * paraheight($string1, 132, p11_full)), ^setsize_abs, ^setsize_abs, interface_476:70);
if_setposition(2, 2, ^setpos_abs_left, ^setpos_abs_top, interface_476:71);
if (if_gethide(interface_476:71) = true) {
if_setposition(2, 2, ^setpos_abs_left, ^setpos_abs_top, interface_476:65);
} else {
if_setposition(2, calc(if_gety(interface_476:71) + if_getheight(interface_476:71) + 2), ^setpos_abs_left, ^setpos_abs_top, interface_476:65);
}
if_setposition(2, calc(if_gety(interface_476:65) + if_getheight(interface_476:65) + 2), ^setpos_abs_left, ^setpos_abs_top, interface_476:66);
if_setposition(2, calc(if_gety(interface_476:66) + if_getheight(interface_476:66) + 2), ^setpos_abs_left, ^setpos_abs_top, interface_476:67);
if_setposition(2, calc(if_gety(interface_476:67) + if_getheight(interface_476:67) + 2), ^setpos_abs_left, ^setpos_abs_top, interface_476:68);
if_setposition(2, calc(if_gety(interface_476:68) + if_getheight(interface_476:68) + 2), ^setpos_abs_left, ^setpos_abs_top, interface_476:69);
if_setposition(2, calc(if_gety(interface_476:69) + if_getheight(interface_476:69) + 2), ^setpos_abs_left, ^setpos_abs_top, interface_476:70);
def_int $height0 = calc(if_gety(interface_476:70) + if_getheight(interface_476:70) + 2);
if ($height0 > if_getheight(interface_476:62)) {
if_setscrollsize(0, $height0, interface_476:63);
if_sethide(false, interface_476:64);
~scrollbar_vertical(interface_476:64, interface_476:63, "scrollbar_dragger_v2,3", "scrollbar_dragger_v2,0", "scrollbar_dragger_v2,1", "scrollbar_dragger_v2,2", "scrollbar_v2,0", "scrollbar_v2,1");
} else {
if_sethide(true, interface_476:64);
if_setscrollpos(0, 0, interface_476:63);
}