Date: 2017/05/22 20:47:29 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
banker:
type: assignment
debug: true
actions:
on click:
- chat "Hello <player.name>!"
interact scripts:
- 1 banker_interact
banker_interact:
type: interact
debug: true
steps:
1:
click trigger:
script:
- chat "What can I do for today?"
chat trigger:
1:
trigger: I'd like to /regex:(?i)(create|open|buy|purchase|make|add|start)/ a new account.
script:
- chat "Okay"
- if <player.money> >= 25000 {
- if flag.player.accounts_owned == 3 {
- chat "Sorry, but you can only open a max of 3 accounts."
} else {
- chat "You will be charged $25000. No refunds."
- chat "Would you like to continue?"
- zap 2
}
} else {
- chat "You do not have enough money."
}
2:
trigger: I'd like to /rename/ my account.
script:
- chat "..."
3:
trigger: Show me bank /regex:(?i)(info|information)/.
script:
- chat "..."
4:
trigger: I'd like to make a /deposit/.
script:
- chat "..."
5:
trigger: I'd like to make a /withdrawal/.
script:
- chat "..."
6:
trigger: I'd like to /add/ a member to my account.
script:
- chat "..."
7:
trigger: I'd like to /remove/ a member from my account.
script:
- chat "..."
8:
trigger: /REGEX:.+/
script:
- chat "Things I can do for you:"
- narrate "- Create a new bank account."
- narrate "- Rename a bank account."
- narrate "- Display bank information."
- narrate "- Make a withdrawal or deposit."
- narrate "- Add or remove members."
9:
trigger: Purge /flags/.
script:
- flag global account_names:!
- flag player account_owned:!
- narrate "Flags purged."
2:
chat trigger:
1:
trigger: /regex:(?i)(yes|okay|yeah|ok|sure|y)/
script:
- chat "Okay... give me one second..."
- chat "What would you like to name your account?"
- zap 3
2:
trigger: /regex:(?i)(no|nah|n)/
script:
- chat "Okay, come back if you change your mind!"
- zap 1
3:
chat trigger:
1:
trigger: /REGEX:.+/
script:
- chat "Alright..."
- chat "Trying to add your bank account, <context.message>..."
- define name <context.message>
- if <flag.[global.account_names].find[name]> == -1 || <flag.[global.account_names].find[name]> == null {
- flag global account_names:->:name
- flag player accounts_owned:++
- execute as_server "manuaddp <player.name> hyperconomy.bank"
- execute as_player "bank create <context.message>"
- execute as_server "manudelp <player.name> hyperconomy.bank"
- chat "Is there anything else I can do for you?"
- zap 1
} else {
- chat "That name already exists in our database. Please give another name."
}