Solved How can I make a Grappling Hook with skript?

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

  • 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.

Gorilla

Member
Jul 22, 2019
4
0
0
27
Hi, how can i make a Grappling Hook with skript?
[doublepost=1563787356,1563785728][/doublepost]or how can i make shoot a fishing hook?
 
Hi, of course!

Try this:

Code:
on fishing:
    if "%fishing state%" is "failed attempt" or "in ground":
        if block below hook is not air:
            if block below hook is not water or lava:
                push player (direction from player to hook) at speed (distance between hook and player/3)
                if (y coordinate of hook-1) > (y coordinate of player):
                    push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
                play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
        else if block at hook is not air:
            push player (direction from player to hook) at speed (distance between hook and player/3)
            if (y coordinate of hook-1) > (y coordinate of player):
                push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
            play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
        else if block below hook is air:
            if block below block below hook is not air or water or lava:
                push player (direction from player to hook) at speed (distance between hook and player/3)
                if (y coordinate of hook-1) > (y coordinate of player):
                    push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
                play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
        
            else if "%fishing state%" = "failed attempt":
                message "&cUnable to grapple"
            
on damage:
    if damage cause is fall:
        set damage to damage / 2
    if attacker's tool is a fishing rod named "&6Grapple":
        cancel event
on tool change:
    if player's tool is a fishing rod named "&6Grapple":
        message "&6Grapple detached"
        play raw sound "note.hat" at player with pitch 1 volume 1
 
  • Like
Reactions: PolduZ and acai
Hi, of course!

Try this:

Code:
on fishing:
    if "%fishing state%" is "failed attempt" or "in ground":
        if block below hook is not air:
            if block below hook is not water or lava:
                push player (direction from player to hook) at speed (distance between hook and player/3)
                if (y coordinate of hook-1) > (y coordinate of player):
                    push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
                play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
        else if block at hook is not air:
            push player (direction from player to hook) at speed (distance between hook and player/3)
            if (y coordinate of hook-1) > (y coordinate of player):
                push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
            play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
        else if block below hook is air:
            if block below block below hook is not air or water or lava:
                push player (direction from player to hook) at speed (distance between hook and player/3)
                if (y coordinate of hook-1) > (y coordinate of player):
                    push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
                play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
       
            else if "%fishing state%" = "failed attempt":
                message "&cUnable to grapple"
           
on damage:
    if damage cause is fall:
        set damage to damage / 2
    if attacker's tool is a fishing rod named "&6Grapple":
        cancel event
on tool change:
    if player's tool is a fishing rod named "&6Grapple":
        message "&6Grapple detached"
        play raw sound "note.hat" at player with pitch 1 volume 1
Thanks.
[doublepost=1564051858,1564038850][/doublepost]
Hi, of course!

Try this:

Code:
on fishing:
    if "%fishing state%" is "failed attempt" or "in ground":
        if block below hook is not air:
            if block below hook is not water or lava:
                push player (direction from player to hook) at speed (distance between hook and player/3)
                if (y coordinate of hook-1) > (y coordinate of player):
                    push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
                play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
        else if block at hook is not air:
            push player (direction from player to hook) at speed (distance between hook and player/3)
            if (y coordinate of hook-1) > (y coordinate of player):
                push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
            play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
        else if block below hook is air:
            if block below block below hook is not air or water or lava:
                push player (direction from player to hook) at speed (distance between hook and player/3)
                if (y coordinate of hook-1) > (y coordinate of player):
                    push player upward at speed ((0.07000000000000001)*(difference between y coordinate of hook and y coordinate of player))
                play raw sound "mob.zombie.infect" at player with pitch 2 volume 1
       
            else if "%fishing state%" = "failed attempt":
                message "&cUnable to grapple"
           
on damage:
    if damage cause is fall:
        set damage to damage / 2
    if attacker's tool is a fishing rod named "&6Grapple":
        cancel event
on tool change:
    if player's tool is a fishing rod named "&6Grapple":
        message "&6Grapple detached"
        play raw sound "note.hat" at player with pitch 1 volume 1
Hi, what is the addons? Can you help me?
 
Status
Not open for further replies.