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[proc,ge_offers_setup_draw].cs2
172 lines (172 loc) · 5.46 KB
/
[proc,ge_offers_setup_draw].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
// 779
[proc,ge_offers_setup_draw](boolean $boolean0, component $component1, int $comsubid2, int $comsubid3, int $comsubid4, int $comsubid5, int $comsubid6, int $comsubid7, int $comsubid8, int $comsubid9, int $comsubid10, int $comsubid11, int $comsubid12, int $comsubid13, component $component14, int $comsubid15, int $comsubid16)
if (%varbit4397 = 1) {
if (cc_find($component1, $comsubid2) = ^true) {
cc_sethide(true);
}
if (cc_find($component1, $comsubid7) = ^true) {
cc_settrans(0);
cc_setontimer(null);
}
if (cc_find($component1, $comsubid13) = ^true) {
cc_sethide(true);
}
if (cc_find($component1, $comsubid5) = ^true) {
cc_settext("Sell offer");
}
if (cc_find($component1, $comsubid6) = ^true) {
cc_setgraphic("ge_smallicons,7");
}
if (cc_find($component1, $comsubid3) = ^true & .cc_find($component1, $comsubid4) = ^true) {
cc_sethide(false);
.cc_sethide(false);
cc_setop(1, "All");
.cc_settext("All");
}
if (cc_find($component1, $comsubid16) = ^true) {
cc_setop(2, "");
}
} else if ($boolean0 = true) {
if (cc_find($component1, $comsubid2) = ^true) {
cc_sethide(true);
}
if (cc_find($component1, $comsubid7) = ^true) {
cc_settrans(0);
cc_setontimer(null);
}
if (cc_find($component1, $comsubid13) = ^true) {
cc_sethide(true);
}
if (cc_find($component1, $comsubid5) = ^true) {
cc_settext("Buy offer");
}
if (cc_find($component1, $comsubid6) = ^true) {
cc_setgraphic("ge_smallicons,6");
}
if (cc_find($component1, $comsubid3) = ^true) {
cc_sethide(true);
cc_clearops;
}
} else {
if (cc_find($component1, $comsubid2) = ^true) {
cc_sethide(false);
}
if (cc_find($component1, $comsubid7) = ^true) {
cc_settrans(100);
cc_setontimer("ge_offers_pulsate(event_com, event_comsubid, clientclock, 100, 250)");
}
if (cc_find($component1, $comsubid13) = ^true) {
cc_sethide(false);
}
if (cc_find($component1, $comsubid5) = ^true) {
cc_settext("Buy offer");
}
if (cc_find($component1, $comsubid6) = ^true) {
cc_setgraphic("ge_smallicons,6");
}
if (cc_find($component1, $comsubid3) = ^true & .cc_find($component1, $comsubid4) = ^true) {
cc_sethide(false);
.cc_sethide(false);
cc_setop(1, "+1K");
.cc_settext("+1K");
}
if (cc_find($component1, $comsubid16) = ^true) {
cc_setop(2, "All");
}
}
def_string $string0 = ",";
def_int $int17 = 0;
def_int $int18 = 0;
def_int $int19 = 0;
if (%var1151 ! null) {
if (cc_find($component1, $comsubid8) = ^true) {
cc_setobject_nonum(%var1151, %varbit4396);
}
if (cc_find($component1, $comsubid9) = ^true) {
cc_settext(oc_name(%var1151));
}
if (cc_find($component1, $comsubid10) = ^true) {
cc_settext(~tostring_spacer(%varbit4396, $string0));
}
if (cc_find($component1, $comsubid11) = ^true) {
if (%varbit4398 = 1) {
cc_settext("1 coin");
} else {
cc_settext("<~tostring_spacer(%varbit4398, $string0)> coins");
}
}
if (%varbit4396 > 0 & calc(^max_32bit_int / %varbit4396) < %varbit4398) {
if (cc_find($component1, $comsubid12) = ^true) {
cc_settextfont(b12_full);
cc_settext("<col=ff0000>Too much money!</col>");
}
~ge_offers_setup_draw_disableconfirm($component1, $comsubid15, $component14);
} else {
$int17 = calc(%varbit4396 * %varbit4398);
if (cc_find($component1, $comsubid12) = ^true) {
if (%varbit4397 = 1 & %varbit13139 > 0) {
$int18 = ~min(5000000, scale(%varbit13139, 1000, %varbit4398));
if ($int18 > 0) {
$int19 = calc($int17 - %varbit4396 * $int18);
if ($int18 < 5000000) {
cc_settextfont(b12_full);
if ($int19 = 1) {
cc_settext("1 coin <col=9f9f9f>(<~tostring_spacer($int17, $string0)> - <~script5731>)</col>");
} else {
cc_settext("<~tostring_spacer($int19, $string0)> coins <col=9f9f9f>(<~tostring_spacer($int17, $string0)> - <~script5731>)</col>");
}
} else {
cc_settextfont(p12_full);
if ($int19 = 1) {
cc_settext("1 coin <col=9f9f9f>(<~tostring_spacer($int17, $string0)> - <~tostring_spacer(5000000, $string0)> per item)</col>");
} else {
cc_settext("<~tostring_spacer($int19, $string0)> coins <col=9f9f9f>(<~tostring_spacer($int17, $string0)> - <~tostring_spacer(5000000, $string0)> per item)</col>");
}
}
} else {
cc_settextfont(b12_full);
if ($int17 = 1) {
cc_settext("1 coin <col=9f9f9f>(no fee expected)</col>");
} else {
cc_settext("<~tostring_spacer($int17, $string0)> coins <col=9f9f9f>(no fee expected)</col>");
}
}
} else {
cc_settextfont(b12_full);
if ($int17 = 1) {
cc_settext("1 coin");
} else {
cc_settext("<~tostring_spacer($int17, $string0)> coins");
}
}
}
if ($int17 > 0) {
~v2_stone_button_out_filled($component14);
if_setonmouserepeat("v2_stone_button_in_filled(event_com)", $component14);
if_setonmouseleave("v2_stone_button_out_filled(event_com)", $component14);
if_setonop("opsound(event_op, 2)", $component14);
if (cc_find($component1, $comsubid15) = ^true) {
cc_settext("<col=ffffff>Confirm</col>");
}
} else {
~ge_offers_setup_draw_disableconfirm($component1, $comsubid15, $component14);
}
}
} else {
if (cc_find($component1, $comsubid8) = ^true) {
cc_setobject_nonum(obj_6512, 1);
}
if (cc_find($component1, $comsubid9) = ^true) {
cc_settext("Choose an item...");
}
if (cc_find($component1, $comsubid10) = ^true) {
cc_settext("");
}
if (cc_find($component1, $comsubid11) = ^true) {
cc_settext("");
}
if (cc_find($component1, $comsubid12) = ^true) {
cc_settext("");
}
~ge_offers_setup_draw_disableconfirm($component1, $comsubid15, $component14);
}