Jump to content

Grappling Hook Skript (Skript Disabled remaking)


wxterfall

Would you like an custom /give command  

59 members have voted

  1. 1. Would you like an custom /give command where you can give (premade) custom items (perfect for RPG servers)

    • Yes, please!
      52
    • No, thanks!
      8


Recommended Posts

I decided to make a decent grappling hook script it has a cooldown and also stops you from taking fall dmg after using it. 

To use the grappling hook hold a fishing rod in your hand and run the command: /itemname &aGrappling Hook  (make sure you have essentials or an itemname plugin installed.)


Skript:
 

Spoiler

if player's held item's name is "&aGrappling Hook":
        if "%fish state%" is "CAUGHT" or "REEL_IN" or "IN_GROUND":
            set {cooldown.%player%} to true
            set {nofalldamage.grapplinghook.%player%} to true
            repair player's held item
            set {_ploc.x} to x coordinate of player
            set {_floc.x} to x coordinate of fishing hook
            set {_ang} to {_floc.x} - {_ploc.x}
            set {_ploc.z} to z coordinate of player
            set {_floc.z} to z coordinate of fishing hook
            set {_ang.2} to {_floc.z} - {_ploc.z}
            set velocity of player to new Vector {_ang}, 1, {_ang.2}
            wait 2 seconds
            delete {cooldown.%player%}

on join:
    delete {cooldown.%player%}
    delete {nofalldamage.grapplinghook.%player%}

every 2 seconds:
    loop all players:
        if {nofalldamage.grapplinghook.%loop-player%} is true:
            if block below loop-player is solid:
                delete {nofalldamage.grapplinghook.%loop-player%}

on damage of player:
    if damage cause is fall:
        if {nofalldamage.grapplinghook.%victim%} is true:
            cancel event
            delete {nofalldamage.grapplinghook.%victim%}

 

Edited by wxterfall

If you like what I post or I've helped you please leave a like or upvote my posts! Thanks!

Link to comment
Share on other sites

  • wxterfall changed the title to Grappling Hook Skript (Skript Disabled remaking)
  • 1 month later...
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...