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,pvpa_sidepanel_writecontents].cs2
142 lines (142 loc) · 5.56 KB
/
[proc,pvpa_sidepanel_writecontents].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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// 6269
[proc,pvpa_sidepanel_writecontents](boolean $boolean0, component $component1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8)
def_int $clanslot9 = null;
def_string $text0 = "";
def_string $text1 = "";
def_int $int10 = 0;
def_int $int11 = 0;
switch_int (%varclansetting33) {
case 1001 :
$clanslot9, $text0 = activeclansettings_getcurrentowner_slot, "1v1 Tournament";
if ($clanslot9 ! null) {
$text1 = activeclansettings_getaffineddisplayname($clanslot9);
} else {
$text1 = "Host not found";
}
if ($clanslot9 = activeclansettings_getaffinedslot(removetags(chat_playername))) {
$int11 = 1;
}
case 1002 :
$text0, $text1, $int10 = "1v1 Tournament", "<img=1> Official Group", 1;
case 1003 :
$clanslot9, $text0 = activeclansettings_getcurrentowner_slot, "Group Battle";
if ($clanslot9 ! null) {
$text1 = activeclansettings_getaffineddisplayname($clanslot9);
} else {
$text1 = activeclansettings_getclanname;
}
if ($clanslot9 = activeclansettings_getaffinedslot(removetags(chat_playername))) {
$int11 = 1;
}
case 1004 :
$text0, $text1, $int10 = "Group Battle", "<img=1> Official Group", 1;
case 1005 :
$clanslot9, $text0 = activeclansettings_getcurrentowner_slot, "1v1 Duels";
if ($clanslot9 ! null) {
$text1 = activeclansettings_getaffineddisplayname($clanslot9);
} else {
$text1 = activeclansettings_getclanname;
}
if ($clanslot9 = activeclansettings_getaffinedslot(removetags(chat_playername))) {
$int11 = 1;
}
case 1006 :
$text0, $text1, $int10 = "1v1 Duels", "<img=1> Official Group", 1;
}
if_settext($text0, $component1);
if_settext($text1, $component2);
def_string $text2 = "";
def_string $string3 = "<tostring(activeclansettings_getaffinedcount)>/<tostring(64)>";
if ($int10 = 1) {
if ($boolean0 = true) {
$text2 = "<col=ffb83f>Sign up</col> to be invited to fights.";
~stonebutton_init("<col=0dc10d>Sign up</col>", $component6, p12_full, 0);
if_setonop("opsound(event_op, 2)", $component6);
~stonebutton_init("<col=ff0000>Discard</col>", $component7, p12_full, 0);
} else {
$text2 = "Waiting for players to match...";
~stonebutton_init("Options", $component6, p12_full, 0);
if_setonop("opsound(event_op, 2)", $component6);
~stonebutton_init("<col=ff0000>Leave</col>", $component7, p12_full, 0);
}
} else if ($int11 = 1 & $boolean0 = false) {
$text1 = "JC: <activeclansettings_getclanname>";
if_settext($text1, $component2);
$text2 = ~text_device("<$string3> - Click <col=ffb83f>Start</col> when ready.", "<$string3> - Tap <col=ffb83f>Start</col> when ready.");
~stonebutton_init("<col=0dc10d>Start</col>", $component6, p12_full, 0);
if_setonop("opsound(event_op, 2)", $component6);
~stonebutton_init("<col=ff981f>Options</col>", $component7, p12_full, 0);
} else if ($boolean0 = true) {
$text2 = "<col=ffb83f>Sign up</col> to be invited to the fight.";
~stonebutton_init("<col=0dc10d>Sign up</col>", $component6, p12_full, 0);
if_setonop("opsound(event_op, 2)", $component6);
~stonebutton_init("<col=ff0000>Discard</col>", $component7, p12_full, 0);
} else {
$text2 = "<$string3> - Waiting for group leader.";
~stonebutton_draw(true, "<col=9f9f9f>---</col>", p12_full, 0, $component6);
if_setonmouserepeat(null, $component6);
if_setonmouseleave(null, $component6);
if_clearops($component6);
if_setonop(null, $component6);
if_setontimer(null, $component6);
~stonebutton_init("<col=ff0000>Leave</col>", $component7, p12_full, 0);
}
if_setonop("opsound(event_op, 2)", $component7);
if_sethide(false, $component4);
def_int $int12 = 0;
def_string $text4 = "";
if ($boolean0 = true) {
if (activeclanchannel_find_listened = true) {
$int12 = activeclanchannel_getusercount;
if ($int12 > 0) {
if_settext($text2, $component5);
~clan_sidepanel_drawchannel($boolean0, $int12, $component3, 0, $component4);
return;
}
$text4 = "There are no players to list.";
} else {
$text4 = "Loading player list...";
}
cc_deleteall($component8);
if_sethide(true, $component8);
} else if (%varbit14013 ! 0) {
if (map_world = %varbit14013) {
$text4 = "Join your opponents<br>upstairs in the Arena building. Hurry!";
$text2 = "A fight has been found for you!";
if_sethide(false, $component8);
~stonebutton_init("<col=0dc10d>Join fight</col>", $component8, p12_full, 0);
if_setonop("opsound(event_op, 2)", $component8);
} else {
$text4 = "Waiting for you<br>on world <tostring(%varbit14013)>...";
$text2 = "A fight has been found for you!";
if_sethide(false, $component8);
~stonebutton_init("<col=0dc10d>Switch world</col>", $component8, p12_full, 0);
if_setonop("opsound(event_op, 2)", $component8);
}
} else if (activeclanchannel_find_affined(^clantype_pvpa_group) = true) {
cc_deleteall($component8);
if_sethide(true, $component8);
$int12 = activeclanchannel_getusercount;
if ($int12 > 0) {
if_settext($text2, $component5);
~clan_sidepanel_drawchannel($boolean0, $int12, $component3, 0, $component4);
return;
}
$text4 = "There are no players to list.";
} else {
$text4 = "Loading player list...";
cc_deleteall($component8);
if_sethide(true, $component8);
}
if_settext($text2, $component5);
if_setscrollpos(0, 0, $component3);
if_setscrollsize(0, 0, $component3);
cc_create($component3, ^iftype_text, 0);
cc_setsize(10, 10, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_setcolour(0xff981f);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 15);
cc_settextshadow(true);
cc_settext($text4);
~scrollbar_resize($component4, $component3, 0);