-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[clientscript,poh_board_addline].cs2
333 lines (333 loc) · 12.1 KB
/
[clientscript,poh_board_addline].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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
// 3110
[clientscript,poh_board_addline](int $comsubid0, string $string0, int $int1)
if (if_hassub(enum(component, component, ~toplevel_getcomponents, toplevel_osrs_stretch:16)) = false) {
return;
}
def_string $string1 = "";
def_string $string2 = "";
def_string $string3 = "";
def_string $text4 = "";
def_string $string5 = "-";
def_string $string6 = "-";
def_string $string7 = "-";
def_string $string8 = "-";
def_string $string9 = "-";
def_string $string10 = "-";
def_int $int2 = 25;
def_int $int3 = 40;
def_int $int4 = 10;
def_graphic $graphic5 = "rightarrow_small_stone,0";
def_graphic $graphic6 = "rightarrow_small_stone,1";
if (~on_mobile = true) {
$int2 = 35;
}
if (string_length($string0) > 0) {
$string1, $string0 = ~script632($string0);
$string2, $string0 = ~script632($string0);
$text4, $string0 = ~script632($string0);
$string5, $string0 = ~script632($string0);
$string6, $string0 = ~script632($string0);
$string7, $string0 = ~script632($string0);
$string8, $string0 = ~script632($string0);
$string9, $string0 = ~script632($string0);
$string10, $string0 = ~script632($string0);
if (cc_find(interface_52:9, $comsubid0) = ^true) {
cc_setposition(10, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize(100, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_setcolour(0xff981f);
cc_settext($string1);
cc_sethide(false);
}
$int4 = 120;
if (cc_find(interface_52:12, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_setcolour(0xff981f);
cc_settext($text4);
cc_sethide(false);
}
$int4 = calc($int4 + $int3);
if (cc_find(interface_52:35, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settext("<$string5><$string1>");
}
if (cc_find(interface_52:13, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
if (compare($string5, "Y") = 0) {
cc_setcolour(^white);
} else {
cc_setcolour(0xff981f);
}
cc_settext($string5);
cc_sethide(false);
if (cc_find(interface_52:35, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settext("<$string5><$string1>");
}
}
$int4 = calc($int4 + $int3);
if (cc_find(interface_52:14, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
if (compare($string6, "3") = 0) {
cc_setcolour(^white);
} else {
cc_setcolour(0xff981f);
}
cc_settext($string6);
cc_sethide(false);
if (cc_find(interface_52:36, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settext("<$string6><$string1>");
}
}
$int4 = calc($int4 + $int3);
if (cc_find(interface_52:15, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
if (compare($string7, "3") = 0) {
cc_setcolour(^white);
} else {
cc_setcolour(0xff981f);
}
cc_settext($string7);
cc_sethide(false);
if (cc_find(interface_52:37, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settext("<$string7><$string1>");
}
}
$int4 = calc($int4 + $int3);
if (cc_find(interface_52:16, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
if (compare($string8, "5") = 0) {
cc_setcolour(^white);
} else {
cc_setcolour(0xff981f);
}
cc_settext($string8);
cc_sethide(false);
if (cc_find(interface_52:38, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settext("<$string8><$string1>");
}
}
$int4 = calc($int4 + $int3);
if (cc_find(interface_52:17, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
if (compare($string9, "4") = 0) {
cc_setcolour(^white);
} else {
cc_setcolour(0xff981f);
}
cc_settext($string9);
cc_sethide(false);
if (cc_find(interface_52:39, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settext("<$string9><$string1>");
}
}
$int4 = calc($int4 + $int3);
if (cc_find(interface_52:18, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
cc_settextshadow(true);
if (compare($string10, "Y") = 0) {
cc_setcolour(^white);
} else {
cc_setcolour(0xff981f);
}
cc_settext($string10);
cc_sethide(false);
if (cc_find(interface_52:40, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
cc_settext("<$string10><$string1>");
}
}
$int4 = calc($int4 + $int3);
if (cc_find(interface_52:19, $comsubid0) = ^true & .cc_find(interface_52:10, $comsubid0) = ^true) {
cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
cc_setsize(32, 21, ^setsize_abs, ^setsize_abs);
cc_setgraphic("rightarrow_small_stone,0");
cc_settrans(0);
.cc_setposition($int4, calc(%varcint377 * $int2), ^setpos_abs_left, ^setpos_abs_centre);
.cc_setsize($int3, $int2, ^setsize_abs, ^setsize_abs);
.cc_settextalign(^settextalign_left, ^settextalign_centre, 0);
.cc_settextshadow(true);
.cc_setcolour(0xff981f);
.cc_settextfont(p12_full);
.cc_settext(~poh_board_loc($string2));
if (compare(tostring($int1), $string2) = 0) {
cc_sethide(false);
.cc_sethide(true);
cc_setonop("poh_board_set_last_name($string1, interface_52:19, $comsubid0)");
cc_setop(1, "Enter House");
cc_setonmouserepeat("cc_graphic_swapper(event_com, event_comsubid, $graphic6, null)");
cc_setonmouseleave("cc_graphic_swapper(event_com, event_comsubid, $graphic5, null)");
.cc_setonclick(null);
cc_setonclick(null);
} else {
cc_sethide(true);
.cc_sethide(false);
.cc_setonclick("poh_board_explain_location($string2)");
cc_clearops;
cc_setonop(null);
cc_setonmouserepeat(null);
cc_setonmouseleave(null);
}
}
%varcint377 = calc(%varcint377 + 1);
} else {
if (cc_find(interface_52:9, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:12, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:13, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:14, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:15, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:16, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:17, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:18, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:35, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:36, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:37, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:38, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:39, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:40, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:10, $comsubid0) = ^true) {
cc_settext("");
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_52:19, $comsubid0) = ^true) {
cc_setsize(0, 0, ^setsize_abs, ^setsize_abs);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setonop(null);
cc_clearops;
}
}
def_int $height7 = 0;
if ($comsubid0 >= 200) {
$height7 = calc(%varcint377 * $int2);
if ($height7 > if_getheight(interface_52:7)) {
if_setscrollsize(0, $height7, interface_52:7);
~scrollbar_resize(interface_52:20, interface_52:7, %varcint378);
} else {
if_setscrollsize(0, 0, interface_52:7);
~scrollbar_resize(interface_52:20, interface_52:7, 0);
%varcint378 = 0;
}
cc_deleteall(interface_52:4);
if (%varcint377 <= 0) {
cc_create(interface_52:4, ^iftype_text, 0);
cc_setposition(0, calc($int2 * 3), ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(0, $int2, ^setsize_minus, ^setsize_abs);
cc_setcolour(0xff981f);
cc_settextfont(p12_full);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextshadow(true);
cc_settext("No houses are currently listed.");
return;
}
if (%varcint379 ! 0 & %varcint379 ! 1 & %varcint379 ! 2 & %varcint379 ! 3 & %varcint379 ! 4 & %varcint379 ! 5 & %varcint379 ! 6 & %varcint379 ! 7 & %varcint379 ! 8 & %varcint379 ! 9 & %varcint379 ! 10 & %varcint379 ! 11 & %varcint379 ! 12 & %varcint379 ! 13 & %varcint379 ! 14 & %varcint379 ! 15) {
%varcint379 = 5;
}
~poh_board_setsort(interface_52:5, interface_52:2, interface_52:21);
$height7 = calc(%varcint377 * $int2);
if ($height7 > if_getheight(interface_52:7)) {
if_setscrollsize(0, $height7, interface_52:7);
~scrollbar_resize(interface_52:20, interface_52:7, %varcint378);
} else {
if_setscrollsize(0, 0, interface_52:7);
~scrollbar_resize(interface_52:20, interface_52:7, 0);
%varcint378 = 0;
}
%varcint377 = 0;
}