-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,br_reward_shop_itemdraw].cs2
131 lines (131 loc) · 4.32 KB
/
[proc,br_reward_shop_itemdraw].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
// 3088
[proc,br_reward_shop_itemdraw](int $int0, int $y1, int $int2, int $int3, component $component4, component $component5, component $component6, component $component7, int $int8, int $int9)(int)
.cc_create($component5, ^iftype_rectangle, $int8);
$int8 = calc($int8 + 1);
.cc_setsize($int3, 32, ^setsize_abs, ^setsize_abs);
.cc_setposition($int2, $y1, ^setpos_abs_left, ^setpos_abs_top);
.cc_setcolour(^black);
.cc_setfill(true);
.cc_settrans(255);
.cc_setop(1, enum(int, string, enum_2634, $int0));
def_namedobj $namedobj10 = enum(int, namedobj, enum_2633, $int0);
def_int $num11 = enum(int, int, enum_3048, $int0);
if ($namedobj10 = null) {
$namedobj10 = obj_6512;
}
cc_create($component5, ^iftype_graphic, $int8);
$int8 = calc($int8 + 1);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int2 + (40 - 36) / 2), $y1, ^setpos_abs_left, ^setpos_abs_top);
if ($num11 = 1) {
cc_setobject_nonum($namedobj10, 1);
} else {
cc_setobject($namedobj10, $num11);
}
cc_setgraphicshadow(0x333333);
cc_setoutline(1);
def_int $width12 = calc($int3 - 40);
$int2 = calc($int2 + 40);
cc_create($component5, ^iftype_text, $int8);
$int8 = calc($int8 + 1);
cc_setsize($width12, 32, ^setsize_abs, ^setsize_abs);
cc_setposition($int2, $y1, ^setpos_abs_left, ^setpos_abs_top);
cc_settextalign(^settextalign_left, ^settextalign_top, 0);
cc_settextshadow(true);
def_int $colour13 = 0xff981f;
def_int $colour14 = 0xffb83f;
def_int $num15 = inv_getnum(inv_422, $int0);
def_int $int16 = enum(int, int, enum_2636, $int0);
def_string $mes0 = "";
def_int $int17 = 0;
if (oc_members($namedobj10) = ^true & map_members = ^false) {
cc_setcolour(0x9f9f9f);
$mes0 = "You must be on a members' world to purchase that item.";
.cc_setonop("br_reward_shop_refuse($mes0, $component4, $component5, $component6, $component7)");
$colour13, $colour14 = 0x9f9f9f, 0x9f9f9f;
} else if (%var262 < $int16) {
cc_setcolour(0x9f9f9f);
if ($int16 > 1) {
$mes0 = "You must achieve <tostring($int16)> wins before you can have that item.";
} else {
$mes0 = "You must achieve one win before you can have that item.";
}
.cc_setonop("br_reward_shop_refuse($mes0, $component4, $component5, $component6, $component7)");
$colour13, $colour14 = 0x9f9f9f, 0x9f9f9f;
} else if (%var261 < $num15) {
cc_setcolour(0x9f9f9f);
$mes0 = "You need <~pest_rewards_costpoints($num15)> to claim that reward.";
.cc_setonop("br_reward_shop_refuse($mes0, $component4, $component5, $component6, $component7)");
$colour13, $colour14 = 0x9f9f9f, 0x9f9f9f;
} else {
if ($int9 = $int0) {
cc_setcolour(^white);
} else {
cc_setcolour(0x00df00);
}
.cc_setonop("br_reward_shop_select($int0, $component4, $component5, $component6, $component7)");
}
if ($int0 = 66) {
$int17 = %varbit9520;
} else if ($int0 = 67) {
$int17 = %varbit9521;
} else if ($int0 = 68) {
$int17 = %varbit9522;
} else if ($int0 = 69) {
$int17 = %varbit9523;
}
if ($int17 = 1) {
if ($int9 = $int0) {
cc_setcolour(^white);
} else {
cc_setcolour(0x00df00);
}
.cc_setonop("br_reward_shop_select($int0, $component4, $component5, $component6, $component7)");
} else if ($int17 = 2) {
if ($int9 = $int0) {
cc_setcolour(^white);
} else {
cc_setcolour(0x00df00);
}
.cc_setonop("br_reward_shop_select($int0, $component4, $component5, $component6, $component7)");
}
def_string $string1 = enum(int, string, enum_2634, $int0);
if (parawidth($string1, 512, p12_full) > $width12) {
cc_settextfont(p11_full);
} else {
cc_settextfont(p12_full);
}
cc_settext($string1);
cc_create($component5, ^iftype_text, $int8);
$int8 = calc($int8 + 1);
cc_setsize($width12, 32, ^setsize_abs, ^setsize_abs);
cc_setposition($int2, $y1, ^setpos_abs_left, ^setpos_abs_top);
cc_settextalign(^settextalign_left, ^settextalign_bottom, 0);
cc_settextfont(p11_full);
cc_settextshadow(true);
if ($num15 > 0) {
cc_settext(~pest_rewards_costpoints($num15));
} else if ($int16 > 0) {
if ($int16 > 1) {
cc_settext("<tostring($int16)> wins");
} else {
cc_settext("One win");
}
} else {
cc_settext("Free");
}
if ($int17 = 1) {
cc_settext("Enable");
} else if ($int17 = 2) {
cc_settext("Disable");
}
if ($int9 = $int0) {
cc_setcolour(^white);
.cc_setonmouserepeat(null);
.cc_setonmouseleave(null);
} else {
cc_setcolour($colour13);
.cc_setonmouserepeat("cc_colour_swapper(event_com, cc_getid, $colour14)");
.cc_setonmouseleave("cc_colour_swapper(event_com, cc_getid, $colour13)");
}
return($int8);