Date: 2014/03/01 09:22:10 UTC-08: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
Chippy:
type: assignment
actions:
on assignment:
- trigger name:click state:true
interact scripts:
- 50 Chippy Handler
Chippy Handler:
type: interact
steps:
1:
click trigger:
script:
- chat 'Welcome to my chip shop!'
- wait 1
- chat 'What would you like?'
- wait 1
- chat 'We have Fish, Chips and Fish and chips'
chat trigger:
'1':
trigger: '/Fish/ please'
script:
- chat 'Certainly! How many would you like?'
- chat '5 copper/ea'
- zap 'step:Fish'
Fish:
chat trigger:
'1':
trigger: '/REGEX:./'
script:
- define number <player.chat_history[2]>
- if %number% matches double && %number% > 0 {
- define total <math:%number%*0.05>
- if <player.money> > %total% {
- chat '%total% Total'
- execute as_server 'money take <player.name> %total%'
- execute as_server 'give <player.name> cookedfish %number%'
- chat 'Thank you for your business'
}
- if <player.money> < %total% {
- chat 'You do not have that much sorry!'
}
- zap 'step:1'