#is there any way to simpifly this
1 messages · Page 1 of 1 (latest)
if event-entity is a zombie or skeleton:
set {_loot1} to a random integer between 1 and 1000
if {_loot1} < 25 then:
equip event-entity with netherite helmet
else if {_loot1} < 100 then:
equip event-entity with diamond helmet
else if {_loot1} < 200 then:
equip event-enttiy with iron helmet
else if {_loot1} < 400 then:
equip event-entity with gold helmet
else if {_loot1} < 500 then:
equip event-entity with chainmail helmet
else if {_loot1} < 700 then:
equip event-entity with copper helmet
else if {_loot1} < 900 then:
equip event-entity with leather helmet
else if {_loot1} < 1000 then:
#do nothing
set {_loot2} to a random integer between 1 and 1000
if {_loot2} < 25 then:
equip event-entity with netherite chestplate
else if {_loot2} < 100 then:
equip event-entity with diamond chestplate
else if {_loot2} < 200 then:
equip event-enttiy with iron chestplate
else if {_loot2} < 400 then:
equip event-entity with gold chestplate
else if {_loot2} < 500 then:
equip event-entity with chainmail chestplate
else if {_loot2} < 700 then:
equip event-entity with copper chestplate
else if {_loot2} < 900 then:
equip event-entity with leather chestplate
else if {_loot2} < 1000 then:
#do nothing```
if {_loot3} < 25 then:
equip event-entity with netherite leggings
else if {_loot3} < 100 then:
equip event-entity with diamond leggings
else if {_loot3} < 200 then:
equip event-enttiy with iron leggings
else if {_loot3} < 400 then:
equip event-entity with gold leggings
else if {_loot3} < 500 then:
equip event-entity with chainmail leggings
else if {_loot3} < 700 then:
equip event-entity with copper leggings
else if {_loot3} < 900 then:
equip event-entity with leather leggings
else if {_loot3} < 1000 then:
#do nothing
set {_loot4} to a random integer between 1 and 1000
if {_loot4} < 25 then:
equip event-entity with netherite boots
else if {_loot4} < 100 then:
equip event-entity with diamond boots
else if {_loot4} < 200 then:
equip event-enttiy with iron boots
else if {_loot4} < 400 then:
equip event-entity with gold boots
else if {_loot4} < 500 then:
equip event-entity with chainmail boots
else if {_loot4} < 700 then:
equip event-entity with copper boots
else if {_loot4} < 900 then:
equip event-entity with leather boots
else if {_loot4} < 1000 then:
#do nothing```
I dont think I've ever seen if %condition% THEN: before
also #do nothing will give an empy configuration section warning. You can just remove those if statements, or use stop/continue
sorry i got mixed up with lua and skript
cuz im a roblox developer
so theres not much i can do?
I mean you are basically doing the same thing over and over again
so ig you could use a function; blah blah: giveRandomHelmet(player) ... giveRandomBoots(player)
if event-entity is a zombie or skeleton:
set {_loot1} to a random integer between 1 and 1000
set {_loot2} to a random integer between 1 and 1000
set {_loot3} to a random integer between 1 and 1000
set {_loot4} to a random integer between 1 and 1000
if {_loot1} < 25:
equip event-entity with netherite helmet
else if {_loot1} < 100:
equip event-entity with diamond helmet
else if {_loot1} < 200:
equip event-entity with iron helmet
else if {_loot1} < 400:
equip event-entity with golden helmet
else if {_loot1} < 500:
equip event-entity with chainmail helmet
else if {_loot1} < 700:
equip event-entity with copper helmet
else if {_loot1} < 900:
equip event-entity with leather helmet
else if {_loot1} < 1000:
stop
if {_loot2} < 25:
equip event-entity with netherite chestplate
else if {_loot2} < 100:
equip event-entity with diamond chestplate
else if {_loot2} < 200:
equip event-entity with iron chestplate
else if {_loot2} < 400:
equip event-entity with golden chestplate
else if {_loot2} < 500:
equip event-entity with chainmail chestplate
else if {_loot2} < 700:
equip event-entity with copper chestplate
else if {_loot2} < 900:
equip event-entity with leather chestplate
else if {_loot2} < 1000:
stop```
equip event-entity with netherite leggings
else if {_loot3} < 100:
equip event-entity with diamond leggings
else if {_loot3} < 200:
equip event-entity with iron leggings
else if {_loot3} < 400:
equip event-entity with golden leggings
else if {_loot3} < 500:
equip event-entity with chainmail leggings
else if {_loot3} < 700:
equip event-entity with copper leggings
else if {_loot3} < 900:
equip event-entity with leather leggings
else if {_loot3} < 1000:
stop
if {_loot4} < 25:
equip event-entity with netherite boots
else if {_loot4} < 100:
equip event-entity with diamond boots
else if {_loot4} < 200:
equip event-entity with iron boots
else if {_loot4} < 400:
equip event-entity with golden boots
else if {_loot4} < 500:
equip event-entity with chainmail boots
else if {_loot4} < 700:
equip event-entity with copper boots
else if {_loot4} < 900:
equip event-entity with leather boots
else if {_loot4} < 1000:
stop```
i had to update the code because there were a lot of typos but why is this happening?
bruh how does this happen
i notice its only with copper armor
x8ight
help
also nothing even happens for skeletons
wdym
thats not helpful
why does copper armor appear in the wrong places
and why do skeletons have no armor
also its only copper armor no other armor is appearing in different places
Use this https://skripthub.net/docs/?id=955
Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.
Body armor is a special slot that can only be used for:
- Horses: Horse armour (doesn't work on zombie or skeleton horses)
- Wolves: Wolf Armor
- Llamas (regular or trader): Carpet
- Happy Ghasts: Harness
Saddle is a special slot that can only be used for: pigs, stri...
If you want randomness creating a list of the different items then choosing a random item from the list seems way simpler
And if u want to increase the chance of any specific item just add it to the list multiple times
Either skript or paper’s fault
U just gotta wait for an update
Prolly cause copper armor just got added
i dont understand
so should i just remove copper armor
i dont think that will work
wait how do i even create a list
Zevcraft suggests that you read Sovde's List Variable Tutorial @spark maple
Then u can just do equip event-entity with random element of {list::*}
Who?
oh i didn't know the it was a bot
i thought u told someone to tell me that
lol
Wait if ur just doing all armor I’m pretty sure u could use tags
I’m not on my pc rn but once I am I’ll look at skript docs and send u the stuff u need to do this with tags
This will shorten ur code to like 4 lines
Excluding the spawn event & checking if it’s a zombie
So like 6 lines total
Actually mabye a bit more cause u want a chance of it being no armor
But still way shorter than a list or what ur doing rn
thats a huge improvement
Represents a tag which can be used to classify items, blocks, or entities.
Tags are composed of a value and an optional namespace: "minecraft:oak_logs".
If you omit the namespace, one will be provided for you, depending on what kind of tag you're using. For example, tag "doors" will be the tag "minecraft:doors", while paper tag "doors" will ...
this is what u will need ^
tell me if u need help understanding what to do
wait so how do tags help me
im using minecraft tag right?
i think the syntax is something like random element of minecraft tag "helmets"
so
equip event-entity with a random element of minecraft tag "helmets"
that doesnt work
how do i figure out what exactly the syntax is
The docs
i cant find anything in the docs
Read the error, try broadcasting the list and see what it broadcasts, if it’s broadcasting texts just parse them as item types
what list
how do i broadcast a list
how do i parse them as item types
oh wait
it just prints none
if event-entity is a zombie or skeleton:
unequip event-entity's armor
broadcast "%minecraft tag "helmets"%"
equip event-entity with a random element of minecraft tag "helmets"
equip event-entity with a random element of minecraft tag "chestplate"
equip event-entity with a random element of minecraft tag "leggings"
equip event-entity with a random element of minecraft tag "boots"```
if event-entity is a zombie or skeleton:
unequip event-entity's armor
broadcast "%random element of minecraft tag "helmets"%"
equip event-entity with a random element of minecraft tag "helmets"
equip event-entity with a random element of minecraft tag "chestplate"
equip event-entity with a random element of minecraft tag "leggings"
equip event-entity with a random element of minecraft tag "boots"```
doing this also just says none
try head_armorinstead of helmets
it errors
you forgot the "
i tired that too
it just prints this
broadcast "%minecraft tag "head_armor"%"
and prints the same for
broadcast "%random element of minecraft tag "head_armor"%"
this ^
so i tired to do lists instead but it wont work
set {_helmets::*} to "netherite helmet", "diamond helmet", "iron helmet", "golden helmet", and "leather helmet"
bruh this thing is wrong
i tired like several different possibilities
i dont think lists are a thing
remove the oxford comma
i tired every possiblity
how do i do that
show me
works for me
unless by "does not work" you mean something other than its throwing an error
i meant throwing errors
so like this set {_helmets::*} to "netherite helmet", "diamond helmet", "iron helmet", "golden helmet" and "leather helmet" set {_chestplates::*} to "netherite chestplate", "diamond chestplate", "iron chestplate" "golden chestplate" and "leather chestplate" set {_leggings::*} to "netherite leggings", "diamond leggings", "iron leggings", "golden leggings" and "leather leggings" set {_boots::*} to "netherite boots", "diamond boots", "iron boots", "golden boots" and "leather boots"
im just testing
i will remove
if it doesnt work
wdym
he said to remove the oxford comma
should i just remove all commas?
bro it errors
it doesnt work
i removed the oxford comma
every single one errors
pretty sure you need to combine these
thats how you turn minercfta tag "helmets" into leather helmet, gold helmet, chain helemet,..., diamond helmet, netherite helmet
i dont see how
also i gave up on that i just wanna make my own lists
You get the value of the helmwt tag i think
bro not even the example from the https://sovdee.gitbook.io/skript-tutorials/core-concepts/variables/list-basics work
i finally got it to work it just needed a function
set {_helmets::*} to netherite helmet, diamond helmet, iron helmet, golden helmet and leather helmet
set {_chestplates::*} to netherite chestplate, diamond chestplate, iron chestplate, golden chestplate and leather chestplate
set {_leggings::*} to netherite leggings, diamond leggings, iron leggings, golden leggings and leather leggings
set {_boots::*} to netherite boots, diamond boots, iron boots, golden boots and leather boots
on spawn:
if event-entity is a zombie or skeleton:
unequip event-entity's armor
equip event-entity with a random element of {_helmets::*}
equip event-entity with a random element of {_chestplates::*}
equip event-entity with a random element of {_leggings::*}
equip event-entity with a random element of {_boots::*}```
but skeletons still dont have any armor
set {helmets::*} to netherite helmet, diamond helmet, iron helmet, chainmail helmet, golden helmet and leather helmet
set {chestplates::*} to netherite chestplate, diamond chestplate, iron chestplate, chainmail chestplate, golden chestplate and leather chestplate
set {leggings::*} to netherite leggings, diamond leggings, iron leggings, chainmail leggings, golden leggings and leather leggings
set {boots::*} to netherite boots, diamond boots, iron boots, chainmail boots, golden boots and leather boots
on spawn:
if event-entity is a zombie or skeleton:
unequip event-entity's armor
equip event-entity with a random element of {helmets::*}
equip event-entity with a random element of {chestplates::*}
equip event-entity with a random element of {leggings::*}
equip event-entity with a random element of {boots::*}```
There shouldnt be an event-entity on the load event
there isn't?
i just wanna fix it so that skeletons also have armor too
this should be the way you get it
random element out tag values of minecraft tag "head_armor"
it works :D
equip event-entity with a random element of tag values of minecraft tag "head_armor"
what would be the minecraft tag for chestplate,leggings,and boots tho
no
equip event-entity with a random element of tag values of minecraft tag "body_armor"
doesnt work
theres no errors
oh
equip event-entity with a random element of tag values of minecraft tag "chest_armor"
equip event-entity with a random element of tag values of minecraft tag "leg_armor"
equip event-entity with a random element of tag values of minecraft tag "foot_armor"```