-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,adventurepath_task_init].cs2
113 lines (113 loc) · 6.99 KB
/
[proc,adventurepath_task_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
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
// 2951
[proc,adventurepath_task_init](component $component0, int $int1, component $component2, component $component3, component $component4, component $component5, component $component6, component $component7, component $component8, component $component9, component $component10, component $component11, component $component12, component $component13, component $component14, component $component15, component $component16, component $component17, component $component18, component $component19, component $component20, component $component21, component $component22, component $component23, component $component24)
cc_deleteall($component3);
cc_deleteall($component4);
cc_deleteall($component10);
cc_deleteall($component11);
cc_deleteall($component12);
cc_deleteall($component13);
cc_deleteall($component14);
cc_deleteall($component6);
def_struct $struct25 = null;
def_int $width26 = if_getwidth($component4);
def_enum $enum27 = null;
def_int $int28 = -1;
def_int $count29 = 0;
def_int $int30 = 0;
def_int $int31 = 0;
if (~script3512($int1) = 0) {
$int1 = 1;
}
$enum27 = enum(int, enum, enum_2620, $int1);
def_int $int32 = 0;
def_int $int33 = 0;
def_graphic $graphic34 = null;
def_int $int35 = 0;
while ($count29 < enum_getoutputcount($enum27)) {
$struct25 = enum(int, struct, $enum27, $count29);
if ($struct25 = null) {
mes("This Adventure path is not available at this time.");
if_close;
return;
}
if (struct_param($struct25, param_807) = $int1) {
$graphic34 = struct_param($struct25, param_811);
$int32 = struct_param($struct25, param_806);
if (%var2358 = 0) {
%var2358 = $int32;
}
if ($int32 ! 0 & $int32 = %var2358) {
$int33 = 1;
} else {
$int33 = 0;
}
$int35 = ~script2973($int32, $int1);
if ($int35 ! $int32) {
$int31 = ~create_v2_stone_button_filled_free_icon($component4, $int31, $width26, 50, 0, calc((50 + 5) * $int30), struct_param($struct25, param_810), ^red, ^white, $int32, $int33, $graphic34);
cc_setonop("adventurepath_set_info($int32, $component7, $component8, $component9, $component10, $struct25, $component11, $component12, $component3, $component0, $component4, $component13, $component14, $int1, $component2, $component5, $component6, $int32, $component15, $component16, $component17, $component18, $component19, $component20, $component21, $component22, $component23, $component24)");
} else if (~adventurepath_return_task_status($int32) = 1) {
if (~adventurepath_return_reward_f2p($int32) = 0 | ~adventurepath_return_reward_p2p($int32) = 0) {
$int31 = ~create_v2_stone_button_filled_free_icon($component4, $int31, $width26, 50, 0, calc((50 + 5) * $int30), struct_param($struct25, param_810), 0x32dbe9, ^white, $int32, $int33, $graphic34);
cc_setonop("adventurepath_set_info($int32, $component7, $component8, $component9, $component10, $struct25, $component11, $component12, $component3, $component0, $component4, $component13, $component14, $int1, $component2, $component5, $component6, $int32, $component15, $component16, $component17, $component18, $component19, $component20, $component21, $component22, $component23, $component24)");
} else {
$int31 = ~create_v2_stone_button_filled_free_icon($component4, $int31, $width26, 50, 0, calc((50 + 5) * $int30), struct_param($struct25, param_810), 0x0dc10d, ^white, $int32, $int33, $graphic34);
cc_setonop("adventurepath_set_info($int32, $component7, $component8, $component9, $component10, $struct25, $component11, $component12, $component3, $component0, $component4, $component13, $component14, $int1, $component2, $component5, $component6, $int32, $component15, $component16, $component17, $component18, $component19, $component20, $component21, $component22, $component23, $component24)");
}
} else {
$int31 = ~create_v2_stone_button_filled_free_icon($component4, $int31, $width26, 50, 0, calc((50 + 5) * $int30), struct_param($struct25, param_810), ^yellow, ^white, $int32, $int33, $graphic34);
cc_setonop("adventurepath_set_info($int32, $component7, $component8, $component9, $component10, $struct25, $component11, $component12, $component3, $component0, $component4, $component13, $component14, $int1, $component2, $component5, $component6, $int32, $component15, $component16, $component17, $component18, $component19, $component20, $component21, $component22, $component23, $component24)");
}
if (%var2358 = $int32) {
~adventurepath_set_info($int32, $component7, $component8, $component9, $component10, $struct25, $component11, $component12, $component3, $component0, $component4, $component13, $component14, $component15, $component16, $component17, $component18, $component19, $component20, $component21, $component22, $component23, $component24);
}
$int30 = calc($int30 + 1);
}
$count29 = calc(1 + $count29);
}
def_int $height36 = calc((50 + 5) * $int30 - 5);
if ($height36 > if_getheight($component4)) {
if_setscrollsize(0, $height36, $component4);
} else {
if_setscrollsize(0, 0, $component4);
}
$int31 = ~v2_stone_button_out_filled($component12);
$int31 = ~adventurepath_back_button_text($component12, $int31, $component3, $component0, $component4, $component16, $component17);
if_setonmouseover("adventurepath_back_mouseover($component12, $component3, $component0, $component4, $component16, $component17)", $component12);
if_setonmouseleave("adventurepath_back_mouseleave($component12, $component3, $component0, $component4, $component16, $component17)", $component12);
def_string $text0 = "Show path reward";
$int31 = 0;
$int31 = ~v2_stone_button_out_filled($component13);
$int31 = ~adventurepath_button_text($component13, $int31, $text0);
if_setonmouserepeat("adventurepath_mouseover_path_reward($int1, $component13, $text0)", $component13);
if_setonmouseleave("adventurepath_mouseleave_path_reward($int1, $component13, $text0)", $component13);
cc_setop(1, "Show <col=ff9040>path reward");
cc_setonop("button_select_sound");
$int31 = 0;
def_int $int37 = ~adventurepath_return_path_length(%var2357);
def_int $int38 = ~adventurepath_return_path_tasks_done(%var2357);
if ($int37 <= 0) {
return;
}
cc_create($component14, ^iftype_text, $int31);
cc_setsize(0, 0, ^setsize_minus, ^setsize_minus);
cc_setposition(0, 0, ^setpos_abs_centre, ^setpos_abs_centre);
cc_settext("Completed <tostring($int38)>/<tostring($int37)> tasks");
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour(0xff981f);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
def_int $width39 = if_getwidth($component6);
$int31 = 0;
$int31 = ~stonepanel(0, $component6, $int31);
cc_create($component6, ^iftype_graphic, $int31);
cc_setgraphic("v2_borders_slim,0");
cc_setposition(0, 118, ^setpos_abs_centre, ^setpos_abs_top);
cc_setsize($width39, 32, ^setsize_abs, ^setsize_abs);
cc_create($component6, ^iftype_graphic, calc(1 + $int31));
cc_setgraphic("v2_borders_slim,9");
cc_setposition(0, 116, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(32, 32, ^setsize_abs, ^setsize_abs);
cc_create($component6, ^iftype_graphic, calc(2 + $int31));
cc_setgraphic("v2_borders_slim,10");
cc_setposition(0, 116, ^setpos_abs_right, ^setpos_abs_top);
cc_setsize(32, 32, ^setsize_abs, ^setsize_abs);