-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,ge_offers_index_drawslot].cs2
219 lines (219 loc) · 7.37 KB
/
[proc,ge_offers_index_drawslot].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
// 798
[proc,ge_offers_index_drawslot](inv $inv0, int $int1, component $component2, int $comsubid3, component $component4, component $component5, component $component6, component $component7, component $component8, int $int9, int $comsubid10, int $comsubid11, int $comsubid12, int $comsubid13, int $comsubid14, int $comsubid15, int $comsubid16, int $comsubid17, int $comsubid18, int $comsubid19, int $comsubid20, int $comsubid21, int $comsubid22, int $comsubid23, int $comsubid24, int $comsubid25, int $comsubid26, component $component27)
def_obj $obj28 = null;
def_int $int29 = 0;
def_int $int30 = 0;
def_int $int31 = 0;
def_string $text0 = "Cancelled";
def_graphic $graphic32 = "ge_icons,2";
def_graphic $graphic33 = "ge_icons,3";
def_graphic $graphic34 = "ge_icons,0";
def_graphic $graphic35 = "ge_icons,1";
def_string $string1 = "Offer to BUY items.";
def_int $int36 = 0;
def_int $int37 = 0;
if (~deadman_world = true) {
if ($int9 < 8) {
$int37 = 1;
}
} else if ($int9 < 3 | %varcint103 = 1) {
$int37 = 1;
}
if (stockmarket_isofferempty($int9) = true) {
$obj28 = inv_getobj($inv0, 0);
if ($obj28 = null) {
$obj28 = inv_getobj($inv0, 1);
}
if ($obj28 = null) {
if (cc_find($component8, $comsubid15) = ^true) {
cc_settext("Empty");
}
if (cc_find($component8, $comsubid12) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid16) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid17) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid18) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid19) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid20) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid21) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid22) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid23) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid24) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid10) = ^true) {
cc_sethide(false);
}
if (cc_find($component8, $comsubid11) = ^true) {
cc_sethide(false);
}
if (cc_find($component8, $comsubid13) = ^true & .cc_find($component8, $comsubid14) = ^true) {
cc_sethide(false);
.cc_sethide(false);
if ($int37 = 1) {
cc_setop(1, "Create <col=ff9040>Buy</col> offer");
.cc_setop(1, "Create <col=ff9040>Sell</col> offer");
cc_setonop("script805(event_opindex, $int9, 0, $component2, $comsubid3, $component4, $component5, $component6, $component7, $component27)");
.cc_setonop("script805(event_opindex, $int9, 1, $component2, $comsubid3, $component4, $component5, $component6, $component7, $component27)");
cc_setonmouseover("cc_graphic_swapper($component8, $comsubid25, $graphic33, null)");
.cc_setonmouseover("cc_graphic_swapper($component8, $comsubid26, $graphic35, null)");
cc_setonmouseleave("cc_graphic_swapper($component8, $comsubid25, $graphic32, $component27)");
.cc_setonmouseleave("cc_graphic_swapper($component8, $comsubid26, $graphic34, $component27)");
cc_setonmouserepeat("tooltip_mouserepeat(event_com, event_comsubid, $component27, $string1, 25, 512)");
$string1 = "Offer to SELL items.";
.cc_setonmouserepeat("tooltip_mouserepeat(event_com, event_comsubid, $component27, $string1, 25, 512)");
if (cc_find($component8, $comsubid25) = ^true & .cc_find($component8, $comsubid26) = ^true) {
cc_sethide(false);
.cc_sethide(false);
cc_setgraphic($graphic32);
.cc_setgraphic($graphic34);
}
} else {
cc_clearops;
.cc_clearops;
cc_setonop(null);
.cc_setonop(null);
cc_setonmouseover(null);
.cc_setonmouseover(null);
cc_setonmouseleave(null);
.cc_setonmouseleave(null);
cc_setonmouserepeat(null);
.cc_setonmouserepeat(null);
if (cc_find($component8, $comsubid25) = ^true & .cc_find($component8, $comsubid26) = ^true) {
cc_sethide(false);
.cc_sethide(false);
cc_setgraphic($graphic33);
.cc_setgraphic($graphic35);
}
}
}
return;
}
$int36, $int29 = 1, inv_total($inv0, $obj28);
} else {
$obj28, $int29 = stockmarket_getofferitem($int9), stockmarket_getoffercount($int9);
$int30, $int31 = stockmarket_getoffercompletedcount($int9), stockmarket_getofferprice($int9);
if (stockmarket_getoffertype($int9) = 1) {
$text0 = "Sell";
} else {
$text0 = "Buy";
}
}
if (cc_find($component8, $comsubid15) = ^true) {
cc_settext($text0);
}
if (cc_find($component8, $comsubid10) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid11) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid13) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid14) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid25) = ^true) {
cc_sethide(true);
}
if (cc_find($component8, $comsubid26) = ^true) {
cc_sethide(true);
}
def_string $string2 = ",";
if (cc_find($component8, $comsubid12) = ^true) {
cc_sethide(false);
cc_settrans(255);
cc_setonmouseover("cc_settrans($component8, $comsubid12, 245, null)");
cc_setonmouseleave("cc_settrans($component8, $comsubid12, 255, $component27)");
cc_clearops;
cc_setop(1, "View offer");
if ($int36 = 1) {
$string1 = "Collect your items.";
} else if (stockmarket_getoffertype($int9) = 1) {
if (stockmarket_isofferfinished($int9) = true) {
$string1 = "Sold: <oc_name($obj28)><br><~tostring_spacer($int30, $string2)> / <~tostring_spacer($int29, $string2)>";
} else {
$string1 = "Selling: <oc_name($obj28)><br><~tostring_spacer($int30, $string2)> / <~tostring_spacer($int29, $string2)>";
cc_setop(2, "Abort offer");
}
} else if (stockmarket_isofferfinished($int9) = true) {
$string1 = "Bought: <oc_name($obj28)><br><~tostring_spacer($int30, $string2)> / <~tostring_spacer($int29, $string2)>";
} else {
$string1 = "Buying: <oc_name($obj28)><br><~tostring_spacer($int30, $string2)> / <~tostring_spacer($int29, $string2)>";
cc_setop(2, "Abort offer");
}
cc_setonmouserepeat("tooltip_mouserepeat(event_com, event_comsubid, $component27, $string1, 25, 512)");
}
if (cc_find($component8, $comsubid16) = ^true) {
cc_sethide(false);
}
if (cc_find($component8, $comsubid17) = ^true) {
cc_sethide(false);
cc_setobject($obj28, $int29);
}
def_int $width38 = 0;
def_string $string3 = "";
def_int $int39 = 0;
def_int $int40 = 0;
def_string $string4 = "";
if (cc_find($component8, $comsubid18) = ^true) {
cc_sethide(false);
$width38, $string3 = cc_getwidth, oc_name($obj28);
$int39 = string_length($string3);
if ($int39 > 0 & parawidth($string3, $width38, p11_full) > $width38) {
while ($int39 > 1 & $int40 = 0) {
$int39 = calc($int39 - 1);
$string4 = append(substring($string3, 0, $int39), "...");
if (parawidth($string4, $width38, p11_full) <= $width38) {
$string3, $int40 = $string4, 1;
}
}
}
cc_settext($string3);
}
if (cc_find($component8, $comsubid19) = ^true) {
if ($int31 > 0) {
cc_sethide(false);
if ($int31 = 1) {
cc_settext("1 coin");
} else {
cc_settext("<~tostring_spacer($int31, ",")> coins");
}
} else {
cc_sethide(true);
}
}
if (cc_find($component8, $comsubid20) = ^true) {
cc_sethide(false);
}
if (cc_find($component8, $comsubid21) = ^true) {
cc_sethide(false);
}
if (cc_find($component8, $comsubid23) = ^true) {
cc_sethide(false);
}
if (cc_find($component8, $comsubid24) = ^true) {
cc_sethide(false);
}
if (cc_find($component8, $comsubid22) = ^true) {
cc_sethide(false);
~script812($int9, $int29, $int30, $int36, $int1);
}