-
Notifications
You must be signed in to change notification settings - Fork 11
/
[clientscript,slayer_rewards_buy_op].cs2
43 lines (43 loc) · 1.7 KB
/
[clientscript,slayer_rewards_buy_op].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
// 322
[clientscript,slayer_rewards_buy_op](int $opindex0, component $component1, int $comsubid2, component $component3, component $component4, component $component5, component $component6, component $component7)
def_namedobj $namedobj8 = null;
def_string $string0 = "Choose an item from the shop.";
def_int $int9 = 0;
def_int $int10 = 0;
if ($opindex0 <= 1) {
sound_synth(interface_select1, 1, 0);
if_sethide(true, $component3);
if_sethide(false, $component4);
cc_deleteall($component6);
if_setposition(92, 165, ^setpos_abs_left, ^setpos_abs_top, $component7);
if_sethide(true, $component6);
$namedobj8 = enum(int, namedobj, enum_840, $comsubid2);
if ($namedobj8 ! null) {
$string0 = "<u=ff981f><oc_name($namedobj8)></u><br><br><enum(obj, string, enum_843, $namedobj8)><br><br>";
$int9 = enum(obj, int, enum_842, $namedobj8);
$int10 = enum(obj, int, enum_841, $namedobj8);
if ($int9 ! 1) {
if ($int10 > 1) {
$string0 = append($string0, "Cost: <tostring($int9)> points for <tostring($int10)>");
} else {
$string0 = append($string0, "Cost: <tostring($int9)> points each");
}
} else if ($int10 > 1) {
$string0 = append($string0, "Cost: 1 point for <tostring($int10)>");
} else {
$string0 = append($string0, "Cost: 1 point each");
}
}
if_settext($string0, $component5);
if_setop(1, "Back", $component7);
if_setonop("slayer_rewards_confirm_back(false, event_opindex, $component3, $component4, $component5, $component6, $component7)", $component7);
return;
}
if ($opindex0 >= 10) {
return;
}
if (cc_find($component1, $comsubid2) = ^true) {
cc_settrans(75);
sound_synth(interface_select1, 1, 0);
cc_setontimer("slayer_rewards_buy_release($component1, $comsubid2, calc(clientclock + 10))");
}