Files
dog_summoner.sk
Code
1 87
dog_summoner.sk
# Dog Summoning Rod
# Author: Generated
# Version: 1.0
# Description: Right-click a special fishing rod to summon 12 tamed armored dogs
options:
rod-name: &6&l⚡ Dog Summoner Rod ⚡
# Change the color/name above as desired
# &6 = gold, &l = bold
spawn-amount: 12
armor-type: iron # Can be: leather, iron, gold, diamond
permission: dogsummoner.use
permission-give: dogsummoner.give
# Command to give the special fishing rod
command /givedogrod [<offline player>]:
permission: {@permission-give}
permission message: &cYou need OP permissions to use this command!
trigger:
if arg-1 is set:
set {_target} to arg-1
else:
set {_target} to player
give 1 fishing rod named "{@rod-name}" to {_target}
send "&a✓ Gave Dog Summoner Rod to %{_target}%!" to player
if {_target} is online:
if {_target} is not player:
send "&a✓ You received a Dog Summoner Rod!" to {_target}
# Main summoning event
on right click:
# Check if player is holding the special rod
if player's tool is fishing rod:
if name of player's tool is "{@rod-name}":
# Check permission
if player has permission "{@permission}" or player is op:
# Spawn 12 dogs around the player
loop {@spawn-amount} times:
# Spawn wolf near player with slight random offset
set {_x} to random number between -2 and 2
set {_z} to random number between -2 and 2
set {_loc} to location of player
add {_x} to x-coordinate of {_loc}
add {_z} to z-coordinate of {_loc}
# Spawn the wolf
spawn a wolf at {_loc}
set {_wolf} to last spawned wolf
# Tame the wolf to the player
set owner of {_wolf} to player
set {_wolf}'s target to player
# Make wolf sit initially
make {_wolf} sit
# Apply armor (works in MC 1.20.5+)
# For older versions, this line can be removed
equip {_wolf} with {@armor-type} wolf armor
# Heal the wolf to full health
heal {_wolf}
# Effects and messages
play sound "entity.wolf.howl" with volume 1 and pitch 1 at player
send "&6⚡ &eYou summoned &6{@spawn-amount} &eloyal dogs!" to player
broadcast "&6%player% &esummoned a pack of dogs!"
else:
send "&cYou need OP permissions to use this rod!" to player
cancel event
# Prevent normal fishing with the special rod
on fishing:
if player's tool is fishing rod:
if name of player's tool is "{@rod-name}":
cancel event
send "&eThis rod is for summoning dogs, not fishing!" to player
# Script load message
on script load:
send "&6[Dog Summoner] &aScript loaded successfully!" to console
send "&7- Command: /givedogrod [player]" to console
send "&7- Permission: {@permission} (or OP)" to console