Getting the attack damage on an item.

  • 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.
Aug 8, 2021
37
0
6
21
So, I am trying to make a weapon reach script but I want to get the weapon they are holding to work with any weapon. but I need to find out the attack damage to deal to the opponent.


Code:
on click:
    set {damagee.%player%} to the attack damage of the player's tool
    send "the weapon damage of the player's tool is %{damagee.%player%}%"
That is an attempt but makes an error.
Code:
on left click:
    if {reaches.%player%} is true:
        if {reach.%player%} is greater than 3:
            set {_loc} to location of target
            set {_dis} to distance between player and {_loc}
            if {_dis} <= {reach.%player%}:
                   make the player damage the target by 14

This is the Reach code but that works fine.

Code:
command /reach <integer> <player>:
    trigger:
        set {reach.%arg-2%} to arg-1
        send "%arg-2% now has %arg-1% Reach"
This also works and is the code that sets the reach

Thankyou to whoever helps
 
Status
Not open for further replies.