- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Secret Fisherman


By STiCory
Created: 2018/03/18 09:08:13 UTC-07:00 (6 years and 62 days ago)
Edited: 2018/03/18 09:08:13 UTC-07:00 (6 years and 62 days ago)
Likes: 1

Denizen Version: 1.0.2-SNAPSHOT (build 1646)
Script Version: 1.0
Description:

Small RPG-esque script that spawns a fisherman that fishes during the middle of the night, if talked to he gives you a super-duper-awesome fishing rod, only once per player!


Download script | View raw 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
16500

#   About:                                                                                              #
#   This little script spawns in an NPC at the chosen coordinates, then makes him walk to a selected    #
#   area and he starts fishing for a few hours, then when his time is up, he walks back to his house    #
#   and despawns, this repeats until the script is unloaded. It is advisable to make a path that is     #
#   easily traversable for him, and as make a house that only he can get in and out of, whether it be   #
#   with worldedit or whatever, but this way players don't actually see him spawn and despawn, but that #
#   choice is completely up to you!                                                                     #
#                                                                                                       #
#   Usage:                                                                                              #
#   FYI, the command /ex narrate <player.location.cursor_on> will tell you the useful coords!           #
#   Create an NPC and note his "ID," find and replace <npc> with your created NPC's ID, change out the  #
#   SPAWNCOORDS with the coordinates that he is to spawn/despawn at (formatted as x,y,z,worldname) then #
#   find and replace the STANDCOORDS with the coordinates in which you want him to stand at when he is  #
#   fishing, next replace FISHCOORDS with the coordinates that you want him to fish at, which are       #
#   typically about 10 blocks in front of him, next replace the TORCHCOORDS with the coordinates of a   #
#   block of air on the ground somewhere next to him.                                                   #
#                                                                                                       #
#   Known Issues:                                                                                       #
#   Occasionally the NPC will "fish" more than once, this usually only happens when the scripts are     #
#   reloaded, if this happens, don't worry as he won't ever actually catch anything, it just looks odd  #
#   if this bothers you, simply despawn him, and wait for the cycle to start over the next day          #
#   alternatively, you can set the time to 1244am after you despawn him to have him start the cycle     #
#   sooner than waiting another whole day, note that he can by default spawn/despawn +/- 15MC minutes!  #
#*******************************************************************************************************#
fisherman_easter_egg_cleanup:
    type: world
    debug: false
    events:
        on server start:
        - modifyblock TORCHCOORDS m@air
        - despawn <npc>
fisherman_easter_egg_mechanics:
    type: world
    debug: false
    events:
        on time 1 in world:
        - spawn <npc> SPAWNCOORDS
        - lookclose false <npc>
        - wait 10t
        - ~walk n@0 STANDCOORDS
        - look <npc> TORCHCOORDS
        - wait 10t
        - animate <npc> animation:ARM_SWING
        - modifyblock TORCHCOORDS m@torch
        - wait 10t
        - look <npc> FISHCOORDS
        - wait 1
        - fish npc:n@0 FISHCOORDS catch:none chance:0

        on time 4 in world:
        - ~fish npc:n@0 FISHCOORDS stop
        - look <npc> TORCHCOORDS
        - wait 10t
        - animate <npc> animation:ARM_SWING
        - ~modifyblock TORCHCOORDS m@air
        - wait 10t
        - ~walk npc:n@0 SPAWNCOORDS
        - wait 1
        - despawn <npc>

fisherman_easter_egg_ultra_rod:
    type: item
    debug: false
    material: i@fishing_rod
    display name: Ultra Rod
    enchantments:
    - luck:3
    - lure:2
    - durability:2

fisherman_easter_egg_assignment:
    type: assignment
    debug: false
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
        - trigger name:proximity state:true range:5
    interact scripts:
    - fisherman_easter_egg_fisherman

fisherman_easter_egg_fisherman:
    type: interact
    debug: false
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[fisherman_easter_egg]> == true {
                    - chat "Hello again <player.name>, still bumping into people I see!"
                    }
                    else {
                    - fish FISHCOORDS stop
                    - lookclose true
                    - chat "Eeek! <player.name>, you scared me!"
                    - wait 1
                    - chat "Hey <player.name>..."
                    - wait 1
                    - chat "Do you like fishing?"
                    - wait 1
                    - narrate "You can say 'Yes' or 'No'"
                    - zap 2
                    }
            chat trigger:
                unknown:
                    trigger/regex:.+/
                    script:
                    - if <player.has_flag[fisherman_easter_egg]> == true {
                        - chat "Hello again <player.name>, still bumping into people I see!"
                        }
                        else {
                        - fish FISHCOORDS stop
                        - lookclose true
                        - chat "Eeek! <player.name>, you scared me!"
                        - wait 1
                        - chat "Hey <player.name>..."
                        - wait 1
                        - chat "Do you like fishing?"
                        - wait 1
                        - narrate "You can say 'Yes' or 'No'"
                        - zap 2
                        }
        2:
            chat trigger:
                1:
                    trigger: Actually /yes/ I love it!
                    script:
                    - ^flag player fisherman_easter_egg
                    - chat "Excellent! Here, take this!"
                    - wait 1
                    - give i@fisherman_easter_egg_ultra_rod:1
                    - lookclose false
                    - look <npc> FISHCOORDS
                    - wait 1
                    - fish FISHCOORDS
                    - zap 1
                2:
                    trigger: /No/ actually, I don't..
                    script:
                    - ^flag player fisherman_easter_egg_no
                    - chat "Then be gone!"
                    - lookclose false
                    - look <npc> FISHCOORDS
                    - wait 1
                    - fish FISHCOORDS
                    - flag player fisherman_easter_egg_no:!
                    - zap 1
                unknown:
                    trigger/regex:.+/
                    script:
                    - chat "I'm sorry, I don't understand!"
            proximity trigger:
                exit:
                    script:
                    - ^if !<player.has_flag[fisherman_easter_egg_no]> {
                        }
                        else {
                        - chat "Good riddens!"
                        - lookclose false
                        - look <npc> FISHCOORDS
                        - wait 1
                        - fish FISHCOORDS
                        - zap 1
                        }





View History