Date: 2014/03/22 13:37:18 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
killtenpigsandtencows:
type: assignment
actions:
on assignment:
- trigger name:chat toggle:true
- trigger name:click toggle:true
- lookclose state:true
default constants:
mobtype1: pig
mobtype1amount: 10
mobtype2: cow
mobtype2amount: 10
questredodelay: 1m
item1: pork
item1amount: 64
item2: raw_beef
item2amount: 64
moneyreward: 10000
interact scripts:
- 10 pigcowquest
pigcowquest:
type: interact
steps:
"*meet":
click trigger:
script:
- if <player.flag[pigcowquest]> != done {
- chat "Hallo <player.name>."
- wait 1
- chat "Ich brauche noch einige Zutaten für das heutige Essen!"
- wait 1
- chat "Kannst du mir helfen?"
- narrate "<&6>Schreibe <&a>Ja<&6> oder <&c>Nein<&6>!"
- zap step:accept duration:10s
} else {
- chat "Danke nochmal für das Fleisch!"
- wait 1
- chat "Melde dich morgen nochmal, vielleicht brauche ich dann wieder welches!"
}
accept:
chat trigger:
"yes":
trigger: "/Ja/, ich werde dir helfen."
script:
- narrate "<&5>Steak Tag <&6>- Quest gestartet"
- chat "Heute soll es ordentlich Fleisch geben!"
- wait 1
- chat "Töte <cons:mobtype1amount> Schweine und <cons:mobtype2amount> Kühe und bringe mir dann <cons:item1amount> rohes Schweine- und <cons:item2amount> rohes Kuhfleisch!"
- ^flag player mob1count:0
- ^flag player mob2count:0
- listen kill "id:Schwein Listener" type:entity name:<cons:mobtype1> qty:1 script:pigcheck
- listen kill "id:Kuh Listener" type:entity name:<cons:mobtype2> qty:1 script:cowcheck
- zap step:huntpigcow
"no":
trigger: "/Nein/, ich hab gerade keine Zeit."
script:
- chat "Schade, dann werde ich mal jemand anderes fragen."
- wait 1
- chat "Solltest du doch irgendwann Zeit haben, dann melde dich einfach nochmal bei mir!"
- zap step:meet
huntpigcow:
click trigger:
script:
- chat "<player.name>, du hast erst <player.flag[mob1count].as_int>/<cons:mobtype1amount> Schweine und <player.flag[mob2count].as_int>/<cons:mobtype2amount> Kühe getötet!"
whiledelivering:
click trigger:
script:
- ^if <player.item_in_hand.material> == m@<cons:item1> {
- ^if <player.flag[item1delivered].as_int> < <cons:item1amount> {
- define item_in_hand <player.item_in_hand.qty>
- define toomuch <math.as_int:64-<player.flag[item1delivered]>>
- ^flag player item1delivered:++:<player.item_in_hand.qty>
- ^take i@<cons:item1> qty:<player.item_in_hand.qty>
- if <player.flag[item1delivered].as_int> < <cons:item1amount> {
- ^chat "Danke für <player.item_in_hand.qty> rohes Schweinefleisch!"
} else {
- ^chat "Danke für %toomuch% rohes Schweinefleisch!"
- flag player item1:done
- flag player item1delivered:<cons:item1amount>
- if <player.flag[item1delivered].as_int> > <cons:item1amount> {
- give i@<cons:item1> qty:<math.as_int:<player.flag[item1delivered]>-<cons:item1amount>>
} else {
}
- if <player.flag[item1]> == done && <player.flag[item2]> == done {
- chat "Danke für deine Hilfe. Hier hast du deine Belohnung!"
- give money qty:<cons:moneyreward>
- narrate "<&2>[<&f>Money<&2>] Received <&f><cons:moneyreward> Dollars <&2>from <&f><player.name>"
- narrate "<&5>Steak Tag <&6>- Quest abgeschlossen"
- flag player pigcowquest:done duration:<cons:questredodelay>
- zap script:pigcowquest step:meet
} else {
- chat "Du musst noch etwas rohes Kuhfleisch zu mir bringen!"
}
}
} else {
- chat "Du hast bereits genügend rohes Schweinefleisch abgeliefert!"
}
}
} else if <player.item_in_hand.material> == m@<cons:item2> {
- ^if <player.flag[item2delivered].as_int> < <cons:item2amount> {
- define item_in_hand <player.item_in_hand.qty>
- define toomuch <math.as_int:64-<player.flag[item2delivered]>>
- ^flag player item2delivered:++:<player.item_in_hand.qty>
- ^take i@<cons:item2> qty:<player.item_in_hand.qty>
- if <player.flag[item2delivered].as_int> < <cons:item2amount> {
- ^chat "Danke für <player.item_in_hand.qty> rohes Kuhfleisch!"
} else {
- ^chat "Danke für %toomuch% rohes Kuhfleisch!"
- flag player item2:done
- flag player item2delivered:<cons:item2amount>
- if <player.flag[item2delivered].as_int> > <cons:item2amount> {
- give i@<cons:item2> qty:<math.as_int:<player.flag[item2delivered]>-<cons:item2amount>>
} else {
}
- if <player.flag[item1]> == done && <player.flag[item2]> == done {
- chat "Danke für deine Hilfe. Hier hast du deine Belohnung!"
- give money qty:<cons:moneyreward>
- narrate "<&2>[<&f>Money<&2>] Received <&f><cons:moneyreward> Dollars <&2>from <&f><player.name>"
- narrate "<&5>Steak Tag <&6>- Quest abgeschlossen"
- flag player pigcowquest:done duration:<cons:questredodelay>
- zap script:pigcowquest step:meet
} else {
- chat "Du musst noch etwas rohes Schweinefleisch zu mir bringen!"
}
}
} else {
- chat "Du hast bereits genügend rohes Kuhfleisch abgeliefert!"
}
}
} else {
- chat "Ich brauche noch das Fleisch! Du kannst auch einzelne Portionen bringen!"
- wait 1
- chat "Du hast erst <player.flag[item1delivered].as_int>/<cons:item1amount> rohes Schweinefleisch und <player.flag[item2delivered].as_int>/<cons:item2amount> rohes Kuhfleisch zur mir gebracht!"
}
pigcheck:
type: task
script:
- ^flag player mob1count:++
- ^narrate "<&5>[QUEST]<&f><&co> Du hast <player.flag[mob1count].as_int>/<cons:mobtype1amount> Schweine getötet!"
- ^if <player.flag[mob1count].as_int> >= <cons:mobtype1amount> {
- flag player mob1:done
- if <player.flag[mob1]> == done && <player.flag[mob2]> == done {
- narrate "<&5>[QUEST]<&f><&co> Du hast <cons:mobtype1amount> Schweine und <cons:mobtype2amount> Kühe getötet. Bring der Küchenhilfe <cons:item1amount> rohes Schweine- und <cons:item2amount> rohes Kuhfleisch!"
- ^flag player mob1count:0
- ^flag player mob2count:0
- ^flag player item1delivered:0
- ^flag player item2delivered:0
- ^flag player mob1:!
- ^flag player mob2:!
- ^flag player item1:!
- ^flag player item2:!
- zap script:pigcowquest step:whiledelivering
} else {
- narrate "<&5>[QUEST]<&f><&co> Du musst noch ein paar Kühe töten!"
}
} else {
- ^listen kill "id:Schwein Listener" type:entity name:<cons:mobtype1> qty:1 script:pigcheck
}
cowcheck:
type: task
script:
- ^flag player mob2count:++
- ^narrate "<&5>[QUEST]<&f><&co> Du hast <player.flag[mob2count].as_int>/<cons:mobtype2amount> Kühe getötet!"
- ^if <player.flag[mob2count].as_int> >= <cons:mobtype2amount> {
- flag player mob2:done
- if <player.flag[mob1]> == done && <player.flag[mob2]> == done {
- narrate "<&5>[QUEST]<&f><&co> Du hast <cons:mobtype1amount> Schweine und <cons:mobtype2amount> Kühe getötet. Bring der Küchenhilfe <cons:item1amount> rohes Schweine- und <cons:item2amount> rohes Kuhfleisch!"
- ^flag player mob1count:0
- ^flag player mob2count:0
- ^flag player item1delivered:0
- ^flag player item2delivered:0
- ^flag player mob1:!
- ^flag player mob2:!
- ^flag player item1:!
- ^flag player item2:!
- zap script:pigcowquest step:whiledelivering
} else {
- narrate "<&5>[QUEST]<&f><&co> Du musst noch ein paar Schweine töten!"
}
} else {
- ^listen kill "id:Kuh Listener" type:entity name:<cons:mobtype2> qty:1 script:cowcheck
}