How would I create a double damage effect

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

W00lyP4rr0t2

New Member
Feb 19, 2024
6
0
1
24
Working on a custom plugin for my server currently and realised that the damage taken would be different depending of the victims armor so I can't just use damage.
Here is the script i have so far:
on damage:
if attacker's tool is named "Warden Sword":
chance of 2.5%:

How would I make the damage the victim takes double?
 
Well first of all, if this is what you mean, you could use Minecraft's /damage command to your advantage to set the damage of the Warden Sword.
Example:

Code:
on damage:
    if attacker's tool is named "Warden Sword":
        execute console command "damage %victim% 5 minecraft:generic_kill by %attacker%"

You could find the amount of damage the Warden Sword does, (should be in the attack damage area when you hover over the item) and replace the 5 in the example with it. This will also keep a death message when you kill someone. Should say "victim was slain by attacker" if they die by the sword.
 
no the code he provided is correct, he's not damaging the victim but changing the damage of the sword. I don't know if the command will be executed before the event triggers though.