-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,chatbox_multi_init].cs2
80 lines (80 loc) · 3.2 KB
/
[clientscript,chatbox_multi_init].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
// 58
[clientscript,chatbox_multi_init](string $string0, string $string1)
def_string $text2 = "";
def_string $text3 = "";
def_string $string4 = "";
def_string $string5 = "";
def_string $string6 = "";
$text2, $string1 = ~script632($string1);
$text3, $string1 = ~script632($string1);
def_int $int0 = 2;
$string4, $string1 = ~script632($string1);
if (string_length($string4) > 0) {
$int0 = 3;
$string5, $string1 = ~script632($string1);
if (string_length($string5) > 0) {
$int0 = 4;
$string6, $string1 = ~script632($string1);
if (string_length($string6) > 0) {
$int0 = 5;
}
}
}
cc_deleteall(interface_219:1);
.cc_create(interface_219:1, ^iftype_text, 0);
def_int $int1 = 10;
if ($int0 <= 2) {
~chatbox_multi_addoption(1, $text2, ~int_device(40, 36), ~int_device(24, 32), ^settextalign_centre);
~chatbox_multi_addoption(2, $text3, ~int_device(72, 68), ~int_device(24, 32), ^settextalign_centre);
} else if ($int0 = 3) {
~chatbox_multi_addoption(1, $text2, ~int_device(34, 29), ~int_device(20, 28), ^settextalign_centre);
~chatbox_multi_addoption(2, $text3, ~int_device(58, 57), ~int_device(20, 28), ^settextalign_centre);
~chatbox_multi_addoption(3, $string4, ~int_device(82, 85), ~int_device(20, 28), ^settextalign_centre);
if (~on_mobile = true) {
$int1 = 7;
}
} else if ($int0 = 4) {
~chatbox_multi_addoption(1, $text2, ~int_device(27, 25), ~int_device(20, 23), ^settextalign_centre);
~chatbox_multi_addoption(2, $text3, ~int_device(47, 48), ~int_device(20, 23), ^settextalign_centre);
~chatbox_multi_addoption(3, $string4, ~int_device(67, 71), ~int_device(20, 23), ^settextalign_centre);
~chatbox_multi_addoption(4, $string5, ~int_device(87, 94), ~int_device(20, 23), ^settextalign_centre);
if (~on_mobile = true) {
$int1 = 6;
}
} else {
~chatbox_multi_addoption(1, $text2, ~int_device(28, 25), ~int_device(16, 18), ^settextalign_centre);
~chatbox_multi_addoption(2, $text3, ~int_device(44, 43), ~int_device(16, 18), ^settextalign_centre);
~chatbox_multi_addoption(3, $string4, ~int_device(60, 61), ~int_device(16, 18), ^settextalign_centre);
~chatbox_multi_addoption(4, $string5, ~int_device(76, 79), ~int_device(16, 18), ^settextalign_centre);
~chatbox_multi_addoption(5, $string6, ~int_device(92, 97), ~int_device(16, 18), ^settextalign_centre);
if (~on_mobile = true) {
$int1 = 5;
}
$int0 = 5;
}
.cc_setsize(479, 20, ^setsize_abs, ^setsize_abs);
.cc_setposition(0, $int1, ^setpos_abs_left, ^setpos_abs_top);
.cc_setcolour(0x800000);
.cc_settextshadow(false);
.cc_settextfont(q8_full);
.cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
.cc_settext($string0);
def_int $int2 = parawidth($string0, 479, q8_full);
if ($int2 < 110) {
$int2 = 110;
}
if ($int2 > 350) {
return;
}
def_int $int3 = calc((479 - ($int2 + 111)) / 2 - 57);
if ($int3 < 2) {
$int3 = 2;
}
cc_create(interface_219:1, ^iftype_graphic, calc($int0 + 1));
.cc_create(interface_219:1, ^iftype_graphic, calc($int0 + 2));
cc_setsize(57, 13, ^setsize_abs, ^setsize_abs);
.cc_setsize(57, 13, ^setsize_abs, ^setsize_abs);
cc_setposition($int3, calc($int1 + 2), ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(calc(479 - ($int3 + 57)), calc($int1 + 2), ^setpos_abs_left, ^setpos_abs_top);
cc_setgraphic("sworddecor,1");
.cc_setgraphic("sworddecor,0");