Date: 2013/12/31 07:07:55 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
45
46
47
48
49
50
51
52
53
54
Shoptest:
type: assignment
Interact Scripts:
- Shop
Shop:
type: interact
steps:
1:
click trigger:
script:
- chat "Welcome to my shop <player.name>!"
- wait 1
- chat "would you like to buy"
- chat "Steak for 15 gold"
- chat "Chicken for 10 gold"
2:
Chat trigger:
1:
trigger: /Steak/
script:
- check <player.inventory>
- if money qty:15 run:GiveSteak
else run:NotEnoughMoney
2:
trigger: /Chicken/
script:
- if money qty:10 run:GiveChicken
else run:NotEnoughMoney
GiveSteak:
type: task
script:
- take money qt:15
- give player item: steak
- narrate "you buy some steak"
- chat "Thanks for buying come back soon"
- run script:Shop
GiveChicken:
type: task
script:
- take money qt:10
- give player item: chicken
- narrate "you buy some Chicken"
- chat "Thanks for buying come back soon"
- run script:Shop
NotEnoughMoney:
type: task
script:
- chat "Are you trying to swindle me?"
- run script:Shop