Date: 2023/12/24 15:39:18 UTC-08:00
Type: Diff Report
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
gem_deposit_handler:
type: world
debug: true
events:
on player clicks gem_filler_item in gem_deposit_inventory:
- determine cancelled
+ after player drags item_flagged:currency in gem_deposit_inventory:
+ - if <context.clicked_inventory.script.exists>:
+ - define quantity <context.clicked_inventory.quantity_item[currency_*]>
+ - take item:currency_* quantity:<[quantity]> from:<context.clicked_inventory>
+ - define gems_value <context.item.flag[currency]>
+ - define total <[quantity]>:*:<[gems_value]>
+ - flag <player> gem_bank:+:<[total]>
+ - narrate "<&a> You just deposited <[total].proc[gem_display_amt]><&a> to your account!" targets:<player>
+ - else:
+ - determine passively cancelled
after player clicks air in gem_deposit_inventory with:item_flagged:currency:
+ - if <context.clicked_inventory.script.exists>:
+ - define quantity <context.clicked_inventory.quantity_item[currency_*]>
+ - take item:currency_* quantity:<[quantity]> from:<context.clicked_inventory>
+ - define gems_value <context.item.flag[currency]>
+ - define total <[quantity]>:*:<[gems_value]>
+ - flag <player> gem_bank:+:<[total]>
+ - narrate "<&a> You just deposited <[total].proc[gem_display_amt]><&a> to your account!" targets:<player>
+ - else:
+ - determine passively cancelled
+ after player shift_right clicks item_flagged:currency in gem_deposit_inventory:
+ - if <context.clicked_inventory.script.exists>:
+ - define quantity <context.clicked_inventory.quantity_item[currency_*]>
+ - take item:currency_* quantity:<[quantity]> from:<context.clicked_inventory>
+ - define gems_value <context.item.flag[currency]>
+ - define total <[quantity]>:*:<[gems_value]>
+ - flag <player> gem_bank:+:<[total]>
+ - narrate "<&a> You just deposited <[total].proc[gem_display_amt]><&a> to your account!" targets:<player>
+ - else:
+ - determine passively cancelled
+ after player shift_left clicks item_flagged:currency in gem_deposit_inventory:
- if <context.clicked_inventory.script.exists>:
- define quantity <context.clicked_inventory.quantity_item[currency_*]>
- take item:currency_* quantity:<[quantity]> from:<context.clicked_inventory>
- - define gems_value <server.flag[currency]>
+ - define gems_value <context.item.flag[currency]>
- define total <[quantity]>:*:<[gems_value]>
- flag <player> gem_bank:+:<[total]>
- narrate "<&a> You just deposited <[total].proc[gem_display_amt]><&a> to your account!" targets:<player>
- else:
- determine passively cancelled
+ on player clicks !air|currency_* in gem_deposit_inventory:
+ - determine passively cancelled
gem_display_amt:
type: procedure
debug: false
definitions: gem_bank
script:
- define curr_name <proc[gem_get_name]>
- if <[gem_bank]> > 1 || <[gem_bank]> < -1:
- define curr_name <proc[gem_get_plural]>
- determine "<[gem_bank].format_number><&d> <[curr_name]>"
currency_christmas:
type: item
material: cookie
mechanisms:
custom_model_data: 10002
display name: <&a>Christmas <&6>cookie
flags:
currency: 4
currency_gems:
type: item
material: paper
mechanisms:
custom_model_data: 10000
display name: <&f>Gem
flags:
currency: 1