Date: 2014/05/02 11:55:40 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
Tutorial-shop:
type: assignment
interact scripts:
- 10 Tutorial-shop1
actions:
on assignment:
- trigger name:proximity toggle:true
- trigger name:chat toggle:true
- trigger name:click toggle:true
Tutorial-shop1:
type: interact
requierments:
mode: all
list:
- - flagged player 'Tutorial-shop-bought'
steps:
1:
proximity trigger:
entry:
script:
- chat "<yellow>Hello there and Welcome to Tutorial Shop!"
- wait 1
- chat "<yellow>Here i will teach you how to use them"
- wait 1
- chat "<yellow>If You want to see what we offer take a look on list of items "
- narrate '<yellow>Say <red>List <yellow>to see list of items'
- zap 'step:2'
exit:
script:
- chat '<yellow>Good bye and have a nice day!'
- queue clear
- zap 'step:1'
2:
chat trigger:
list-of-items:
trigger: Can i see the /list/ Please
script:
- chat '<yellow>We offer'
- wait 1
- chat '<red>Food'
- wait 1
- chat '<yellow>What would you like to buy? '
- narrate '<yellow>Now , if you say <red>Food<yellow> he will tell you what food does he sell'
- zap 'step:3'
proximity trigger:
exit:
script:
- chat '<yellow>Good bye and have a nice day!'
- queue clear
- zap 'step:1'
3:
chat trigger:
1:
trigger: I would like to buy /Food/
script:
- chat '<yellow>Okay , We Offer'
- wait 1
- Chat '<red>Steak<Yellow> 20 units --- 5 Gold ingots'
- wait 1
- chat '<yellow>What would you like to buy?'
- zap 'step:4'
proximity trigger:
exit:
script:
- chat '<yellow>Good bye and have a nice day!'
- queue clear
- zap 'step:1'
4:
chat trigger:
Steak:
trigger: I would like to buy /Steak/ .
script:
- wait 1
- chat '<yellow>Okay that would be 5 Gold ingots!'
- if <player.inventory.qty[266]> >= 5 runtask "script:Steak" else runtask "script:Mine-undone"
Steak:
type: task
Script:
- take item:gold_ingot qty:5
- narrate '<yellow>You pay <npc.name> 5 Golden bars'
- wait 1
- give item 364:0 qty:20
- narrate '<yellow>You recieved 20 Steaks'
- wait 1
- flag player 'Tutorial-shop-bought'
- chat '<yellow>There go, now you know how to use Shops '
- chat 'You can go and proceed to next tutorial'
Mine-undone:
type: task
script:
- chat '<yellow>You dont have enough Gold, Are you sure you visited Mine?'
- zap 'script:tutorial-shop1' 'step:1'