#Help with mob spawn please!
1 messages ยท Page 1 of 1 (latest)
Send your script and any errors you have
Indentation in Skript
In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually itโs recommended you use tabs, however.
A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:
With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:
after every if condition or else/ else if conditions indent the next line by 1 tab
wdym
Okay ๐ฆ
where to put "else"?
luv u
This is example of bad code:
on join:
send "hi" to player
broadcast "L"```
This is example of good code:
on join:
send "hi" to player
broadcast "L"```
This might explain it better:
!indent
Indentation in Skript
In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually itโs recommended you use tabs, however.
A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:
With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:
Basically, if there's a colon at the end of the line above a line, then indent it :)
I just need to put spaces?
What do I need to change here?
if condition:
#indented code
First off, never send pictures of code, send the text ๐คฆโโ๏ธ๐ข
Second off, INDENT!
His friend spoon fed him lol
if {enderdragonSpawned} is false:
...
instead of:
...```
Please send the text of the code
Like copy and paste
control c and then control v
I did it now but now the enderdragon doesn't spawn
Here you go
I have to type all of this
because you wouldn't listen
@void stone get yo mans
I'm still not even done :(
I love you so much
I will try it later
I can't now
But thank you so much
noooooo
noooooooooo
nooooooo
no
ono
no
non
no
no
I didn't saw it
Please
ืื ืื ื ืขืฉื, ืืืจืชื ืื ืฉืื ื ืฆืจืื ืืืงืืื ืืช ืืื ืื ืื ืฉืืืช ืื ืืช ืืงืื...
I cant im helping dhar rn
using translate
Who is Israeli
I have to type all of the code because you didn't send it to me
ohhhhhhhhhhh
You ment like this
ohhhhhhhhhhhh
I am so sorry
on load:
set {enderdragon} to a enderdragon
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
set display name of last spawned enderdragon to "&c&lBOSS"
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
here you go
Thanks
sorry lol
You're good
so?....
Fixing it right now
ok
This should work; if it doesn't, send me any errors and if you want anything changed.
on load:
kill all enderdragons
set {enderdragonSpawned} to false
clear {enderdragon}
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
.
on load:
kill all enderdragons
set {enderdragonSpawned} to false
clear {enderdragon}
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
still not spawning
.
Debug
Try broadcasting your variables, with broadcast "%{variable}%" to check if they really are set. If you are using variables starting with _, make sure they are set in the current trigger as they do not save between different triggers. Also make sure any conditions in your skript are being met.
so what to do? @void stone @civic wing
Sorry, I'm helping someone else. I can help you later tonight or tomorrow, please be patient :)
ok have a good day ๐
I am
ok
I just woke up good morning ๐
Ok iam in my bad wait a sec
!format
Code Blocks
To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:
```
Code here
```
ok back
on load:
kill all enderdragons
set {enderdragonSpawned} to false
clear {enderdragon}
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
here you go
you didnt read the !format
but ok
please put your code into a code block
so its easier for me to understand where you've indented, etc
!format
Code Blocks
To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:
```
Code here
```
ok
I sent the codse
just read what the minehut bot said
at the beginning and end of your code put three of the ` symbols
its found underneath your esc key
so like this code here
...
on load:
kill all enderdragons
set {enderdragonSpawned} to false
clear {enderdragon}
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
...
i put three of the ` symbols at the beginning and end of my thing
oh well
i guess i can try
'''
on load:
kill all enderdragons
set {enderdragonSpawned} to false
clear {enderdragon}
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
'''
how did you do it?
on load:
kill all enderdragons
set {enderdragonSpawned} to false
clear {enderdragon}
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
you did it!
{enderdragon} isnt set to anything..
you are just spawning nothing
why does it need to be a variable anyway?
just spawn the enderdragon normally.
so do i need to do enderdragon?
spawn enderdragon at location(0, 75, 0, world "world_the_end")
if victim is enderdragon:
ok wait a sec
and you can get rid of the clear {enderdragon} in the on load event
wait what is the key in the key board to this symbole?
on load:
kill all enderdragons
set {enderdragonSpawned} to false
every 10 seconds:
if {enderdragonSpawned} is false:
set {enderdragonSpawned} to true
spawn {enderdragon} at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if {enderdragonSpawned} is not set:
set {enderdragonSpawned} to false
on death:
if victim is {enderdragon}:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set {enderdragonSpawned} to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
like this?
you've made the code block.
but you haven't done anything to your code.
apart from get rid of that one line
you didnt do what i said
ok
on load:
kill all enderdragons
set enderdragon to false
every 10 seconds:
if enderdragon is false:
set enderdragon to true
spawn enderdragon at location(0, 75, 0, world "world_the_end")
set display name of last spawned enderdragon to "&c&lBOSS"
else:
if enderdragon is not set:
set enderdragon to false
on death:
if victim is enderdragon:
give attacker 1 dragon egg named "&d&lDragon's Egg"
set enderdragon to false
send "&a&l--------------------------------------" to all players
send "" to all players
send "&a%attacker% killed the &c&lBOSS!" to all players
send "" to all players
send "&a&l--------------------------------------" to all players
on spawn of enderdragon:
send "&c&l---------------------------------------" to all players
send "" to all players
send "&c&lBoss spawned!" to all players
send "" to all players
send "&c&l---------------------------------------" to all players
i will try it now
what is this
bruh
why u setting a entity to a boolean
i didnt even notice he did that
that wasnt in his original code
...
im pretty sure I gave him working code like 12 hours ago
apparently its broken
weird
he was tryna spawn a variable that had nothing in it
bruh
be def changed it
he
yea
dont get why he tried to set the enderdragon to true
but
i guess we'll find out if the code works or not
no crap
YEAH
woops
caps
yeah
you cant set the ender dragon to a boolean
thats not what i said anyway.
what you did in your original code was fine with {enderdragonSpawned}
i was talking about [enderdragon}
you didn't need to get rid of {enderdragonSpawned}
so to rid of the {enderdragon} but to keep the {enderdragonspawned} ??
correct
why have that last if condition
youโre already setting it to false on load
i forget what on load does tbh
i swear its when the skript gets loaded
or am i wrong
so do i need to delete this?
you dont need to
but
you also dont need that last if condition
basically the last condition is redundant
i cant find "on load" in the docs
i forgot what it does
on load is on skript load
ah
i was right then
gg
thank you so muchh guys
oh i have another problem with whitelist
this is not a skript problem
?
i mean, i can. its just not a skript problem.
bro
just get worldguard
and make out ur area
then turn pvp off
./rg flag <area name> pvp deny
easy
oh my god
yw
Thatโs not what he asked for-