Force player right click

  • 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 community!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Mattllama987

Supporter
Aug 5, 2018
225
7
18
Hello, im trying to make a Auto Fishing skript, and need a little help with something. Im not sure how i can make a player right click. I have the code to make the player left click, but not right click. If anyone knows how to do this. Please let me know.
Thanks!
~Matt


Code:
option NMS:
  get:
    return 4th element out of ((class "org.bukkit.Bukkit").getServer().getClass().getPackage().getName() split at ".")
import:
  net.minecraft.server.{@NMS}.PacketPlayOutAnimation

effect make %players% (attack|swing) [for %-players%]:
  trigger:
    loop exprs-1:
      set {_handle} to loop-value.getHandle()
      set {_packet} to new PacketPlayOutAnimation({_handle}, 0)
      loop exprs-2 ? all players:
        loop-value-2.getHandle().playerConnection.sendPacket({_packet})
 
I have no idea what any of that stuff means xDDDD Im just starting to learn what packets are and stuff hahahaha
[doublepost=1584674674,1584584607][/doublepost]bump
 
Maybe...

Code:
command /autofish <text> <text>:
  if {autofish} = false:
    set {autofish} to true
  if {autofish} = true:
    set {autofish} to false

on right click:
  if target-block is water:
     if {autofish} = true:
      if player is holding a fishing rod:
        loop 1000 times:
          make player click
I am no genius XD but I tried I actually don't know if you can tho. Why don't you just use the pressure plate, fence, noteblock, autoclicker, and trapdoor method for autofishing?
 
Status
Not open for further replies.