# We are making a script for the Barrel.
# This is called a "Device Script".
# This is our recipe (Function).
# It takes the player who found the barrel.
Give_Fishing_Gear := (player : Player) -> unit:
# This line gives the player a fishing rod.
# It's like handing them a tool.
player.Grant_Item("Creative_Fishing_Rod")
# This line turns on the fishing zone.
# We assume the zone is named "My_Fishing_Zone".
My_Fishing_Zone.Enable()
# Print a message to the chat.
# This helps us know it worked.
Print("Here is your fishing gear!")
# This is the Event.
# It rings when a player searches the barrel.
On_Search := (params : On_Search_Params) -> unit:
# Get the player who searched.
player := params.Player
# Run our recipe!
Give_Fishing_Gear(player)
Verse Library
verse
01 Fragment
Grants a fishing rod and enables a zone when a player searches a barrel.
verse-library/fish-in-a-barrel/01-fragment.verse