Solved Rpg need a level to use 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 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!

AdenR84

Active Member
Sep 4, 2023
112
1
18
I have this
on damage:
name of attacker's tool is "&f&lWool Sword &f&l✪"
if attacker's level is lower or equal to 1:
cancel event
send "&cYou Are To Low Level To Use That Weapon!" to attacker
but
it does not let you hit anything above level 1 Please help me!
I have no skript plugins. @ShaneBee Can You Help?
 
Last edited:
You should get SkBee
You could use the skript below!

code_language.skript:
on damage:
    if player's held tool is named "&f&lWool Sword &f&l✪":
        if {level::%attacker's uuid%} >= 1:
            #hit enemy
        else if {level::%attacker's uuid%} = 0:
            cancel event
            send "&7You are to low to use that weapon!" to attacker

If this helps, Please reply to me!

Information |
MC Username: P3RTY
Discord: fabio_playz
 
You should get SkBee
You could use the skript below!

code_language.skript:
on damage:
    if player's held tool is named "&f&lWool Sword &f&l✪":
        if {level::%attacker's uuid%} >= 1:
            #hit enemy
        else if {level::%attacker's uuid%} = 0:
            cancel event
            send "&7You are to low to use that weapon!" to attacker

If this helps, Please reply to me!

Information |
MC Username: P3RTY
Discord: fabio_playz
That skript did not work and i alr have sk bee idk what to do, Can you join my server on minehut its ip is MotionPrint
 
Code:
on damage:
    player's tool's name is "Fiery Great Sword"
    if attacker's level < 5:
        set the damage to 0
        send "&cYou are too weak to use this!" to attacker
Honestly I had no idea symbols worked.
 
Code:
on damage:
    player's tool's name is "Fiery Great Sword"
    if attacker's level < 5:
        set the damage to 0
        send "&cYou are too weak to use this!" to attacker
You could also do cancel event instead of set the damage to 0. Both works, though.
 
Code:
on damage:
    player's tool's name is "Fiery Great Sword"
    if attacker's level < 5:
        set the damage to 0
        send "&cYou are too weak to use this!" to attacker
Use name of attacker's tool instead of player's tool's name. Why? Two reasons.

1. It doesn't recognize player in these types of events.

2. The way I worded it usually works and I am not sure about attacker's tool's name.
 
XD why did that look like chatgpt was saying that XD
"Sorry for the confusion. You are indeed correct, the proper syntax is player's tool's name. The changed code looks like this:
Code:
on damage:
    attacker's tool's name is "Fiery Great Sword"
    if attacker's level < 5:
        set the damage to 0
        send "&cYou are too weak to use this!" to attacker
"