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[clientscript,cr_tutorial_init].cs2
55 lines (55 loc) · 2.39 KB
/
[clientscript,cr_tutorial_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
// 6415
[clientscript,cr_tutorial_init](component $component0, component $component1, component $component2)
~steelborder($component0, "Activity Adviser", 1);
def_int $int3 = 0;
def_int $int4 = 5;
def_int $int5 = 10;
def_int $int6 = 15;
cc_create($component1, ^iftype_text, $int3);
cc_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(calc(2 * $int5), $int6, ^setsize_minus, ^setsize_abs);
cc_settextalign(^settextalign_left, ^settextalign_top, $int6);
cc_setcolour(0xff981f);
cc_settextshadow(true);
cc_settextfont(p12_full);
cc_settext("Welcome back to Old School RuneScape!");
$int3 = calc($int3 + 1);
$int4 = calc($int4 + $int6 + $int5);
def_string $string0 = "To help you find new adventures, you can use the new <col=ffffff>Activity Adviser</col> feature. This provides personalised activity suggestions if you're ever unsure what to do next!";
def_int $height7 = paraheight($string0, calc(if_getwidth($component1) - 2 * $int5), p12_full);
def_int $int8 = calc($int6 * $height7);
cc_create($component1, ^iftype_text, $int3);
cc_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(calc(2 * $int5), $int8, ^setsize_minus, ^setsize_abs);
cc_settextalign(^settextalign_left, ^settextalign_top, $int6);
cc_setcolour(0xff981f);
cc_settextshadow(true);
cc_settextfont(p12_full);
cc_settext($string0);
$int3 = calc($int3 + 1);
$int4 = calc($int4 + $int8 + $int5);
if (~on_mobile = true) {
$string0 = "Tap the button by the <col=ffffff>Minimap</col> to find new adventures!";
} else {
$string0 = "Click the button by the <col=ffffff>Minimap</col> to find new adventures!";
}
$height7 = paraheight($string0, calc(if_getwidth($component1) - 2 * $int5), p12_full);
$int8 = calc($int6 * $height7);
cc_create($component1, ^iftype_text, $int3);
cc_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(calc(2 * $int5), $int8, ^setsize_minus, ^setsize_abs);
cc_settextalign(^settextalign_left, ^settextalign_top, $int6);
cc_setcolour(0xff981f);
cc_settextshadow(true);
cc_settextfont(p12_full);
cc_settext($string0);
$int3 = calc($int3 + 1);
$int4 = calc($int4 + $int8 + $int5);
cc_create($component1, ^iftype_graphic, $int3);
cc_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize(33, 36, ^setsize_abs, ^setsize_abs);
cc_setgraphic("side_icons,37");
$int3 = calc($int3 + 1);
$int4 = calc($int4 + 22);
def_string $string1 = "Close";
~cr_tutorial_button_draw($component2, $string1);