Jump to content

anti killing nakeds skript


centralwtf
 Share

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

On Vacation For About 5 Days, Will Not Respond To DMs Or Posts

 

image.png.bc433d6489d70ad831075fe76809b993.png

 

[VIP] 12/26/20 - 10/27/2021
[PRO] 12/27/21 - 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
 Share



×
×
  • Create New...