Paste #51056: anvil event Code

Date: 2018/12/09 08:15:20 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


currency_creation_prevention:
    type: world
    events:
        on player prepares anvil craft item:
        #- narrate "bef - item: <context.item>"
        - if <context.item.material> == m@iron_nugget:
            #- narrate "after"
            - define silver_coin "silver coin"
            - if <context.item.display.to_lowercase.contains[<def[silver_coin]>]>:
                - narrate "Forgery is illegal!"
                - determine cancelled
        on player crafts item:
        - narrate "worked"