# 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
}