Solved Custom enchant Heavy hand

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

WiebeHero

Active Member
Aug 23, 2017
135
5
0
So hi (me again hate my life XD)
Here is the code

on damage:
attacker is a player
chance of 100%
if lore of attacker's held item contains "Heavy Hand I":
create fake explosion at location of victim

Basicly what i want it to do i want it to do extra damage to the victim any ideas?
 
391aa5e24e.png
 
Oh and 1 more thing sorry XD. But if i spam click the enchants (thats what i call it) still activates and im in 1.12.1 do you know how to make it so they only activate when they are full and ready to attack?
 
Oh and 1 more thing sorry XD. But if i spam click the enchants (thats what i call it) still activates and im in 1.12.1 do you know how to make it so they only activate when they are full and ready to attack?
you could do it a few waysx3 I like doing it by cooldown, skript comes with a great cooldown example sk in your sk folder. you can also use a boolean(true/false) variable
 
you could do it a few waysx3 I like doing it by cooldown, skript comes with a great cooldown example sk in your sk folder. you can also use a boolean(true/false) variable
Using a cooldown in skript would work ok, but the recharge time after swinging isnt the same for all weapons so that would be sortve annoying to deal with.

In java you can get the current charge of the player's tool with EntityPlayer.n(0) and if it is 1 that means the tool is fully charged (0.5 would be half charged, 0.25 would be a quarter charged etc...) so you could do this in skript with skript-mirror. However, ive never used skript-mirror so youll need to look how to use it on your own or ask someone else

here is what would need to do in java so if you (or someone else) wants to figure out how to convert it to skript with skript-mirror go ahead or if youre too lazy to do that a simple cooldown like wynnevir said wouldnt be awful
Java:
import net.minecraft.server.v1_12_R1.EntityPlayer;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;

EntityPlayer entityPlayer = ((CraftPlayer)somePlayer).getHandle();
Float currentToolCharge = entityPlayer.n(0);
 
  • Like
Reactions: Wynnevir
Using a cooldown in skript would work ok, but the recharge time after swinging isnt the same for all weapons so that would be sortve annoying to deal with.

In java you can get the current charge of the player's tool with EntityPlayer.n(0) and if it is 1 that means the tool is fully charged (0.5 would be half charged, 0.25 would be a quarter charged etc...) so you could do this in skript with skript-mirror. However, ive never used skript-mirror so youll need to look how to use it on your own or ask someone else

here is what would need to do in java so if you (or someone else) wants to figure out how to convert it to skript with skript-mirror go ahead or if youre too lazy to do that a simple cooldown like wynnevir said wouldnt be awful
Java:
import net.minecraft.server.v1_12_R1.EntityPlayer;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;

EntityPlayer entityPlayer = ((CraftPlayer)somePlayer).getHandle();
Float currentToolCharge = entityPlayer.n(0);
Wants to figure it out? It's essentially the same thing lol
 
Status
Not open for further replies.