Paste #44967: dasdasdas

Date: 2017/10/11 15:00:12 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


cEmbassyPlotTax:
    type: command
    name: EmbassyPlotTax
    script:
    - narrate format:TownyGUIFormat "Enter the taxation you wish to charge for <&nl>embassy plots. Type <&dq>cancel<&dq> to cancel this interaction."
    - flag player EmbassyPlotTax

wEmbassyPlotTax:
    type: world
    debug: false
    events:
        on player chats:
        - if <player.has_flag[EmbassyPlotTax]> && <context.message> != cancel {
          - execute as_player "town set embassytax <context.message>"
          - flag player EmbassyPlotTax:!
          - determine cancelled
          - queue clear
          }
        - if <player.has_flag[EmbassyPlotTax]> && <context.message> == cancel {       
          - narrate format:TownyGUIFormat "You have cancelled the interaction."
          - flag player EmbassyPlotTax:!
          - determine cancelled
          }