Aiming Enchantment

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Orangesanta8415

Supporter
Nov 21, 2020
42
0
6
Category: Enchantment

Suggested name: Aiming Enchant

Spigot/Skript Version: 1.15.2

What I want:
An enchantment that goes on a bow that when you shoot an arrow it will track that entity until it hits it.

Ideas for commands: /aiming apply and if you could /aiming book give {name} for an enchanted book

Ideas for permissions: aiming. apply and aiming.book if that is implemented. aiming.use

When I'd like it by A reasonable time
 
Last edited:
Ok, I will soon code this for you. I hope you will enjoy, but it will be coming later due to my school schedule.

- I do hope this work, as I found no documentation for "make player face".

Code:
on skript load:
  register a new custom enchantment with id name "Aiming"

on right click:
  if player's tool is bow:
    set {_yaw} to yaw of attacker
    set {_pitch} to pitch of attacker
    loop all entities:
      set {_dist} to (distance between {_player} and loop-entity *1000) + (random integer between 0 and 999)/1000
      set {_list::%{_dist}%} to loop-entity
      make player face the first element of {_list::*}
 
Last edited: