Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /getgrap:
- permission: skript:admin
- trigger:
- give player fishing rod with nbt "{display:{Name:""&6グラップラー""},ench:[{id:0s,lvl:0s}],HideFlags:5,Unbreakable:1b}"
- send "&7You got &6Grappling Hook&7!"
- on fishing:
- if name of player's tool is "&6グラップラー":
- if fishing state is IN_GROUND:
- push player direction from player to fishing hook at speed distance between player and fishing hook/3.5
- if difference between y-coordinate of player and y-coordinate of fishing hook <= 2:
- set {_speed} to distance between player and fishing hook/30
- if {_speed} < 0.5:
- if distance between player and fishing hook >= 2:
- set {_speed} to 0.5
- push player upwards at speed {_speed}
- if fishing state is CAUGHT_ENTITY:
- caught entity is a living entity
- push caught entity direction from caught entity to player at speed distance between player and fishing hook/4
- push caught entity upwards at speed 0.5
- if fishing state is FISHING:
- loop blocks in radius 10 around location 1 meter above location of player:
- if loop-block is target block:
- set {_targetblock} to loop-block
- if {_targetblock} is not set:
- push fishing hook in direction of player at speed 8
- else if name of player's offhand is "&6Grappling Hook":
- if fishing state is IN_GROUND:
- push player direction from player to fishing hook at speed distance between player and fishing hook/3.5
- if difference between y-coordinate of player and y-coordinate of fishing hook <= 2:
- set {_speed} to distance between player and fishing hook/30
- if {_speed} < 0.5:
- if distance between player and fishing hook >= 2:
- set {_speed} to 0.5
- push player upwards at speed {_speed}
- if fishing state is CAUGHT_ENTITY:
- caught entity is a living entity
- push caught entity direction from caught entity to player at speed distance between player and fishing hook/4
- push caught entity upwards at speed 0.5
- if fishing state is FISHING:
- loop blocks in radius 10 around location 1 meter above location of player:
- if loop-block is target block:
- set {_targetblock} to loop-block
- if {_targetblock} is not set:
- push fishing hook in direction of player at speed 8
- every tick:
- loop all players:
- if loop-player's tool is fishing rod:
- if name of loop-player's tool is "&6Grappling Hook":
- add "{FallDistance:0}" to nbt of loop-player
- if loop-player's offhand is fishing rod:
- if name of loop-player's offhand is "&6Grappling Hook":
- add "{FallDistance:0}" to nbt of loop-player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement