Date: 2014/06/18 14:42:42 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
HorseRetrieveQuest:
Type: assignment
Actions:
on assignment:
- trigger name: chat toggle:true
- trigger name: click toggle:true
- lookclose state:true
interact scripts:
- 1 RancherMain
RancherMain:
type: interact
steps:
1:
click trigger:
script:
- narrate "<&lb><red><npc.name><white><&rb><&co> Hello <player.name>, I could really use some help."
- wait 1
- narrate "<&lb><red><npc.name><white><&rb><&co> I really need a new horse"
- wait 1
- narrate "<&lb><red><npc.name><white><&rb><&co> Could you help me out?"
- narrate "<dark_gray><&lb>Hint <&co> Yes to accept the quest, No to decline.<&rb>"
chat trigger:
1:
trigger: /Yes/, I can help you out!
script:
- narrate "<&lb><red><npc.name><white><&rb><&co> Great! Bring me a horse on a lead."
- wait 1
- give i@LEASH qty:1
- narrate "<&lb><red><npc.name><white><&rb><&co> Come back when you find one!"
- zap step:2
2:
trigger: /No/, I am too busy.
script:
- narrate "<&lb><red><npc.name><white><&rb><&co> Oh, ok. Please come back whenever you have more time!"
2:
click trigger:
script:
- if <player.location.find.entities[HORSE].within[6].size> >= 1 {
- foreach <player.location.find.entities[HORSE].within[6]> {
- if <%value%.get_leash_holder> == <player> {
- run s@HorseReturn delay:1 def:%value%
}
}
} else {
- narrate "<&lb><red><npc.name><white><&rb><&co> What are you waiting for? Lets go get some horses <player.name>!"
- wait 1
- narrate "<&lb><red><npc.name><white><&rb><&co> I really need a new horse!"
}
3:
click trigger:
script:
- narrate "<&lb><red><npc.name><white><&rb><&co> Thank you so much for helping me out!"
HorseReturn:
type: task
script:
- narrate "<&lb><red><npc.name><white><&rb><&co> Great, a new horse!"
- wait 2
- narrate "<&lb><red><npc.name><white><&rb><&co> Hold on, let me put a post in the ground real quick!"
- animate <npc> animation:ARM_SWING
- modifyblock l@-395,72,76,ST m@fence
- leash %1% holder:l@-395,72,76,ST m@fence
- wait 1
- narrate "<&lb><red><npc.name><white><&rb><&co> Thank you, this will make my job so much easier!"
- wait 2
- narrate "<&lb><red><npc.name><white><&rb><&co> Take this for helping me out!"
- wait 1
- give i@apple qty:10
- give i@emerald qty:5
- give xp qty:100
- zap s@RancherMain step:3
- run s@HorseCleanup delay:10
- if <player.inventory.contains[LEASH].qty[1]> {
- ^take LEASH qty:1
}
HorseCleanup:
type: task
script:
- remove <npc.location.find.entities[HORSE].within[5]>
- modifyblock l@-395,72,76,ST m@air
RancherCleanupWorld:
type: world
events:
on server start:
- if <l@-395,72,76,ST.material> == m@fence {
- modifyblock l@-395,72,76,ST m@air
}