"bankaccount": type: assignment interact scripts: - 10 banker_script actions: on assignment: - trigger name:click toggle:true - trigger name:proximity toggle:true - trigger name:chat toggle:true 'banker_script': type: interact steps: 'announce banker*': proximity trigger: Entry: script: - chat "<white>Welcome <aqua><player.name> !" click trigger: script: - chat "<white>Do you want to <blue>open <white>an account?" - chat "<blue>Deposit <white>or <blue>withdraw <white>money?" - chat "<blue>Check <white>my account." - if '<flag.p:inbank_money || none>' == none flag player inbank_money:'account balance <player.name>' chat trigger: 1: trigger: /open/ script: - chat "Wait a second..." - ^execute as_player 'bank deposit 0.00' 2: trigger: /deposit/ script: - chat "How much would you pay in?" - zap step:deposit 3: trigger: /withdraw/ script: - chat "How much would you withdraw?" - zap step:take 4: trigger: /check/ script: - ^execute as_player 'bank balance' 'deposit': chat trigger: 1: trigger: /REGEX:^\d+$/ script: - zap 'step:announce banker' - ^if '<player.money.asint>' >= <player.chat_history> chat "There are now <proc:deposit procedure> in your chest." else chat "You do not have enough money to do this!" 'take': chat trigger: 1: trigger: /REGEX:^\d+$/ script: - zap 'step:announce banker' - if '<flag.p:inbank_money>' >= <player.chat_history> chat "It remains <proc:take procedure> in your chest." else chat "You do not have enough money in the bank!" 'deposit procedure': type: procedure script: - flag player 'inbank_money:+:<player.chat_history>' - ^execute as_player 'bank deposit <player.chat_history>' - determine "<flag.p:inbank_money.asint>" 'take procedure': type: procedure script: - flag player 'inbank_money:-:<player.chat_history>' - ^execute as_player 'bank withdraw <player.chat_history>' - determine "<flag.p:inbank_money.asint>"
edits made: corrected typo in script
Short and sweet, I like it!