Drop Ability Named: Slice of Flesh

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

bewf

Member
Apr 19, 2024
27
0
1
24
Category: Need help with adding an ability to my item

Suggested name: Slice of Flesh

Spigot/Skript Version: 2.8.2



When I'd like it by: whenever is fine

What I want:
vvv

Could someone help add this ability to my skript called:
Id like the ability to active when the item is dropped and returned to the player right away. Id also like a 30 second cooldown on the ability, thank you.

And if someone could fix the cooldown system it would be much appreciated
Thank you!
&4Slice of &cFlesh
Which does the following effects on the next hit:
Takes away 25% from your health
Gives you strength 3 for 10 seconds
Gives the next hit slowness 1 for 10 seconds
Gives the hit darkness 1 for 10 seconds

this is the skript i have currently

on rightclick:
If name of player's tool contains "&cScythe of Reaping":
if {cooldown.%player%} is less than 1:
add 1 to {cooldown.%player%}
push player in direction the player is looking with force 2
wait 1 tick
set {cooldown.%player%} to 0
send "&6You performed a short dash with the &cScythe of Reaping!"
else:
if name of player's offhand tool contains "&cScythe of Reaping":
if {cooldown.%player%} is less than 1:
add 3 to {cooldown.%player%}
push player in direction the player is looking with force 5
wait 1 tick
set {cooldown.%player%} to 0
send "&6You performed a long dash with the &cScythe of Reaping!"

on join:
set {cooldown.%player%} to 0


PS. feel free to add/change anything as you see fit, or change something in the drop ability thatll have a similair affect
 
This should work!

AppleScript:
on drop:
    name of event-item contains "&cScythe of Reaping":
        cancel event
        set metadata tag "fleshslice" of player to true
        send "&cActivated Slice of Flesh! &6Your next hit will be far stronger." to player
        
on damage:
    metadata tag "fleshslice" of attacker is true:
        delete metadata tag "fleshslice" of attacker
        damage attacker by floor(attacker's health / 4)
        apply strength 3 without particles to attacker for 10 seconds
        apply slowness 1 without particles to victim for 10 seconds
        apply darkness 1 without particles to victim for 10 seconds

on rightclick:
    if name of player's tool contains "&cScythe of Reaping":
        if player has player's tool on cooldown:
            stop
        else:
            set cooldown of player's tool for player to 1.5 seconds
            push player in direction the player is looking with force 2
            send "&6You performed a short dash with the &cScythe of Reaping!"
    else if name of player's offhand tool contains "&cScythe of Reaping":
        if player has player's tool on cooldown:
            stop
        else:
            set cooldown of player's tool for player to 4 seconds
            push player in direction the player is looking with force 5
            send "&6You performed a long dash with the &cScythe of Reaping!"
 
This should work!

AppleScript:
on drop:
    name of event-item contains "&cScythe of Reaping":
        cancel event
        set metadata tag "fleshslice" of player to true
        send "&cActivated Slice of Flesh! &6Your next hit will be far stronger." to player
       
on damage:
    metadata tag "fleshslice" of attacker is true:
        delete metadata tag "fleshslice" of attacker
        damage attacker by floor(attacker's health / 4)
        apply strength 3 without particles to attacker for 10 seconds
        apply slowness 1 without particles to victim for 10 seconds
        apply darkness 1 without particles to victim for 10 seconds

on rightclick:
    if name of player's tool contains "&cScythe of Reaping":
        if player has player's tool on cooldown:
            stop
        else:
            set cooldown of player's tool for player to 1.5 seconds
            push player in direction the player is looking with force 2
            send "&6You performed a short dash with the &cScythe of Reaping!"
    else if name of player's offhand tool contains "&cScythe of Reaping":
        if player has player's tool on cooldown:
            stop
        else:
            set cooldown of player's tool for player to 4 seconds
            push player in direction the player is looking with force 5
            send "&6You performed a long dash with the &cScythe of Reaping!"
thank you lots i will try it out
and it removed it from the person using it
 
This should work!

AppleScript:
on drop:
    name of event-item contains "&cScythe of Reaping":
        cancel event
        set metadata tag "fleshslice" of player to true
        send "&cActivated Slice of Flesh! &6Your next hit will be far stronger." to player
       
on damage:
    metadata tag "fleshslice" of attacker is true:
        delete metadata tag "fleshslice" of attacker
        damage attacker by floor(attacker's health / 4)
        apply strength 3 without particles to attacker for 10 seconds
        apply slowness 1 without particles to victim for 10 seconds
        apply darkness 1 without particles to victim for 10 seconds

on rightclick:
    if name of player's tool contains "&cScythe of Reaping":
        if player has player's tool on cooldown:
            stop
        else:
            set cooldown of player's tool for player to 1.5 seconds
            push player in direction the player is looking with force 2
            send "&6You performed a short dash with the &cScythe of Reaping!"
    else if name of player's offhand tool contains "&cScythe of Reaping":
        if player has player's tool on cooldown:
            stop
        else:
            set cooldown of player's tool for player to 4 seconds
            push player in direction the player is looking with force 5
            send "&6You performed a long dash with the &cScythe of Reaping!"
Thank you very much, just had a few errors that were easy fixes, all we have to add know is a 30 second cooldown to the drop, and make it so when you hit a player it pushes them toward you slightly