Jump to content

anti killing nakeds skript


centralwtf

Recommended Posts

Hello!
Can someone make a skript, that blocks people from hitting eachother if they did not ever had armor in equipment? However if they had armor in equipment or enderchest people can hit them aswell as they can hit others. And if they dropped armor on ground, they can still get hit and hit others

Thanks ❤️

 

on damage:
    if attacker is a player:
        if victim is not wearing any armor:
            if victim's inventory doesn't contain armor:
                if victim's enderchest doesn't contain armor:
                    cancel event

on damage:
    if attacker is a player:
        if attacker's inventory does not contain armor:
            cancel event
        
That is my current skript

Edited by centralwtf
Edit
Hello!
IGN✦ centralwtf
Gender★ he/him
==========================================

Owner★ Boxable, NetherBox, FishHype

 ==========================================

Joined★ 22.07.2019

Member -> VIP ★ 29.04.2020

 ==========================================

obraz_2021-04-08_103028.png.8fa96840c599c6ff81febf732163163f.png

 

 

Link to comment
Share on other sites

  • 2 weeks later...

1 second making one But, you know you can check the players armor?

Invislol 

• 4-5 years of skript experience
• 6 Months of active java experience
• 2 Years of javascript and python experience


unknown.png
[PATRON] RANK

Helpful Stuff:
Appeals and Reports  - Here | Minehut  Global And forums rules - Here

Link to comment
Share on other sites

on damage:
    set victim's chestplate to {_c}
    if {_c} is "<none>":
        set victim's leggings to {_l}
        if {_l} is "<none>":
            set victim's boots to {_b}
            if {_b} is "<none>":
                set victim's helmet to {_h}
                if {_h} is "<none>":
                    cancel event 

on damage:
    set attacker's chestplate to {_c}
    if {_c} is "<none>":
        set attacker's leggings to {_l}
        if {_l} is "<none>":
            set attacker's boots to {_b}
            if {_b} is "<none>":
                set attacker's helmet to {_h}
                if {_h} is "<none>":
                    cancel event 

Btw this is not tested so you will have to test and if its broken fix it ;D

Invislol 

• 4-5 years of skript experience
• 6 Months of active java experience
• 2 Years of javascript and python experience


unknown.png
[PATRON] RANK

Helpful Stuff:
Appeals and Reports  - Here | Minehut  Global And forums rules - Here

Link to comment
Share on other sites

  • 11 months later...
On 5/14/2021 at 8:28 AM, Invislol said:
on damage:
    set victim's chestplate to {_c}
    if {_c} is "<none>":
        set victim's leggings to {_l}
        if {_l} is "<none>":
            set victim's boots to {_b}
            if {_b} is "<none>":
                set victim's helmet to {_h}
                if {_h} is "<none>":
                    cancel event 

on damage:
    set attacker's chestplate to {_c}
    if {_c} is "<none>":
        set attacker's leggings to {_l}
        if {_l} is "<none>":
            set attacker's boots to {_b}
            if {_b} is "<none>":
                set attacker's helmet to {_h}
                if {_h} is "<none>":
                    cancel event 

Btw this is not tested so you will have to test and if its broken fix it ;D

 

EDIT: Just realized @CorruptionGamez necroposted. Woops...

 

could be made much simpler

on damage:
	if attacker is not wearing any armor:
		cancel event
	if victim is not wearing any armor:
		cancel event

https://skripthub.net/docs/?id=1165

Edited by AgentGamerPro
  • Like 1

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...