Date: 2014/04/24 20:14:24 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
# NPC Fisherman
# Citizens 2 (build #992)
# Denizen 0.9.3 (build #1352)
#
# @author Hyruii
#
# Select the NPC and type /npc assign --set "fisherman"
freshfish:
type: item
material: 349
display name: 'Fresh Fish'
lore:
- Fresh fish from the docks of Sushi Land
- Sashimi anyone?
- '-Gives extra 4 hearts-'
Sashimi:
type: world
events:
on player right clicks with i@freshfish:
- take i@freshfish qty:1 from:<player.inventory>
- potion health_boost <player> duration:5m power:1
fisherman:
type: assignment
interact scripts:
# Priority starts from 10
- 10 fisherman trade
actions:
on assignment:
# These triggers enable/disable interaction with an NPC via chatting, clicking and entering proximity.
- trigger name:chat toggle:true
- trigger name:click toggle:true
- trigger name:proximity toggle:true radius:6
- equip fishing_rod
on enter proximity:
- narrate "<blue><npc.name> grins at you."
- chat "<blue>Ahoy, <red><player.name>!"
- if <player.inventory.contains[rotten_flesh]> {
- chat "<blue>You have some zombie flesh on you, I can smell the stink!"
- chat "<blue>I could use them for fish bait. Click on me to trade for them!"
}
else {
- chat "<blue>Do you have zombie flesh? I could use it for fishing bait!"
}
"fisherman trade":
type: interact
steps:
Trade:
click trigger:
script:
- playsound <player.location> sound:water volume:2.0
- if <player.inventory.contains[rotten_flesh]> {
- if <player.inventory.qty[rotten_flesh]> OR_MORE 16 {
- take rotten_flesh qty:16
- give freshfish qty:4
- chat "<blue>Thanks for the zombie flesh! Here are some of those famous fish from Sushi Land!"
}
else {
- chat "<blue>You do not have enough zombie flesh to trade, <red><player.name>. <blue>Bring at least 16 zombie flesh."
}
}
else {
- chat "<blue>The fish here are quite nutritious. That was why I settled here. Hohoho!"
}