-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,clanwars_setup_corner_update].cs2
90 lines (90 loc) · 3.31 KB
/
[proc,clanwars_setup_corner_update].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
// 590
[proc,clanwars_setup_corner_update](component $component0, int $int1, component $component2, int $int3)
if_setonvartransmit("clanwars_setup_corner_update($component0, $int1, $component2, %varbit4285){var92}", $component0);
if_setontimer("clanwars_setup_corner_update($component0, $int1, $component2, %varbit4285)", $component0);
def_int $comsubid4 = -1;
if (%varbit4285 ! $int3) {
if (%varbit4285 = 1) {
$comsubid4 = ~v2_stone_button_in_filled($component2);
cc_create($component2, ^iftype_text, $comsubid4);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_settextfont(p12_full);
cc_setcolour(^white);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_settext("Waiting");
if_setonmouserepeat(null, $component2);
if_setonmouseleave(null, $component2);
} else {
$comsubid4 = ~v2_stone_button_out_filled($component2);
cc_create($component2, ^iftype_text, $comsubid4);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_settextfont(p12_full);
cc_setcolour(0xff981f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_settext("Accept");
if_setonmouserepeat("cc_colour_swapper($component2, $comsubid4, ^white)", $component2);
if_setonmouseleave("cc_colour_swapper($component2, $comsubid4, 0xff981f)", $component2);
}
}
if (%varbit4271 = 1 & %varbit4272 = 1) {
if (%varbit4273 = 3) {
if (cc_find($component0, $int1) = ^true) {
cc_settext("<col=ff0000>If you turn off all forms of combat, your battle will be mighty peculiar.</col>");
}
if_sethide(true, $component2);
return;
} else if (%varbit4273 = 2) {
if (cc_find($component0, $int1) = ^true) {
cc_settext("<col=ff0000>You can't have a proper battle with only the Bind, Snare and Entangle spells.</col>");
}
if_sethide(true, $component2);
return;
}
}
if (%varbit4273 >= 2 & %varbit4281 = 1) {
if (cc_find($component0, $int1) = ^true) {
cc_settext("<col=ff0000>Powered Staves are enabled against players, yet their spells are forbidden by the Magic restrictions.</col>");
}
if_sethide(true, $component2);
return;
}
if (%varbit4279 = 1 & %varbit4273 = 2) {
if (cc_find($component0, $int1) = ^true) {
cc_settext("<col=ff0000>It seems odd to restrict Magic to just the binding spells when you've disabled their binding effects.</col>");
}
if_sethide(true, $component2);
return;
}
if (%varbit4271 = 1 & %varbit12229 = 1) {
if (cc_find($component0, $int1) = ^true) {
cc_settext("<col=ff0000>Vesta's Blighted Longsword is enabled, yet Melee is restricted.</col>");
}
if_sethide(true, $component2);
return;
}
if (map_members = ^false & enum(int, boolean, enum_935, %varbit4283) = true) {
if (cc_find($component0, $int1) = ^true) {
cc_settext("<col=ff0000>That's a members-only arena.</col>");
}
if_sethide(true, $component2);
return;
}
def_int $int5 = 0;
if (%varcint59 >= 0) {
$int5 = calc(clientclock - %varcint59);
if ($int5 < 250 & $int5 >= 0) {
if (cc_find($component0, $int1) = ^true) {
cc_settext("Your opponent has made changes!<br><tostring(calc((250 - $int5) / 50 + 1))>");
}
if_sethide(true, $component2);
return;
}
}
if (cc_find($component0, $int1) = ^true) {
cc_settext("");
}
if_sethide(false, $component2);