Paste #5455: Merchant Fragment.

Date: 2014/06/19 16:16:25 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


4:
        Chat Trigger:
          1:
            Trigger: /regex:\d+/
            Script:
              - flag player Wolfden_Petshop_Purchase_quantity:<context.message> 
              - if "<flag.p:Wolfden_Petshop_Purchase_Item>" == "383:100" {
                - flag player Wolfden_Petshop_Player_Transaction_Cost:<m:<context.message>*5>
                }
                else if "<flag.p:Wolfden_Petshop_Purchase_Item>" == "383:95" {
                - flag player Wolfden_Petshop_Player_Transaction_Cost:<m:<context.message>*4>
                }
                else if "<flag.p:Wolfden_Petshop_Purchase_Item>" == "383:98" {
                - flag player Wolfden_Petshop_Player_Transaction_Cost:<m:<context.message>*2>
                }
              - IF <player.money> >= <flag.p:Wolfden_Petshop_Player_Transaction_Cost> {
                - CHAT "Would you like to purchase <aqua><context.message> <flag.P:Wolfden_Petshop_Purchase_Item_Colloquial>s <yellow>for a total of <aqua><flag.p:Wolfden_Petshop_Player_Transaction_Cost> Bars<yellow>?"
                - zap Purchase
                } 
                else {
                - run script:Wolfden_Petshop_Insufficient_Funds_Task
                }