Paste #118868: server flag

Date: 2023/12/23 17:42:31 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


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 <server.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