#Help with mob spawn please!

1 messages ยท Page 1 of 1 (latest)

civic wing
#

Send skript and any errors.

#

thank you, I am currently helping someone else, I will be with you shortly! :)

void stone
#

Send your script and any errors you have

ruby sedge
void stone
#

bro indent

#

!indent

formal sluiceBOT
#

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:

void stone
#

after every if condition or else/ else if conditions indent the next line by 1 tab

ruby sedge
#

wdym

void stone
#

.-.

#

@civic wing explain it to this man pretty please

civic wing
#

Okay ๐Ÿฆ‹

ruby sedge
#

where to put "else"?

void stone
#

luv u

civic wing
#

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

formal sluiceBOT
#

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:

civic wing
#

Basically, if there's a colon at the end of the line above a line, then indent it :)

ruby sedge
#

I just need to put spaces?

void stone
#

if condition:
#indented code

civic wing
#

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

ruby sedge
#

I did it now but now the enderdragon doesn't spawn

civic wing
#

Please send the WHOLE code.

#

ALL of it, the text

#

Not a screenshot

#

Please

#

:)

ruby sedge
#

This is literly the whole thing

ruby sedge
civic wing
#

Do you know how to copy and paste?

#

Ctrl C then Ctrl V?

ruby sedge
ruby sedge
civic wing
#

I have to type all of this

#

because you wouldn't listen

#

@void stone get yo mans

#

I'm still not even done :(

ruby sedge
#

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

civic wing
#

ื–ื” ืœื ื ืขืฉื”, ืืžืจืชื™ ืœืš ืฉืื ื™ ืฆืจื™ืš ืœื”ืงืœื™ื“ ืืช ื”ื›ืœ ื›ื™ ืœื ืฉืœื—ืช ืœื™ ืืช ื”ืงื•ื“...

void stone
ruby sedge
#

ืืชื” ื™ืฉืจืืœื™ื™ื™ื™ื™ื™

#

oh

civic wing
#

Who is Israeli

ruby sedge
#

nm

#

bruh I lost event

civic wing
#

I have to type all of the code because you didn't send it to me

ruby sedge
#

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

civic wing
#

Thanks

ruby sedge
#

sorry lol

civic wing
#

You're good

ruby sedge
#

so?....

civic wing
#

Fixing it right now

ruby sedge
#

ok

civic wing
#

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
ruby sedge
#

ok wam

#

wait a min

#

no errors

#

but not spawning

civic wing
#
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
ruby sedge
#

still not spawning

void stone
#

debug

#

!debug

formal sluiceBOT
#

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.

ruby sedge
#

so what to do? @void stone @civic wing

civic wing
#

Sorry, I'm helping someone else. I can help you later tonight or tomorrow, please be patient :)

void stone
#

kfira what is the problem

#

not sure if you are online

ruby sedge
#

I am

void stone
#

ok

ruby sedge
#

I just woke up good morning ๐Ÿ˜‰

void stone
#

so whats the problem?

#

please send your code

ruby sedge
#

Ok iam in my bad wait a sec

void stone
#

!format

formal sluiceBOT
#

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

ruby sedge
#

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

ruby sedge
void stone
#

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

formal sluiceBOT
#

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

ruby sedge
#

what is that mean

#

what to do?

void stone
#

ok

ruby sedge
#

I sent the codse

void stone
#

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

ruby sedge
#

!code here

#

didn't work

void stone
#

so like this code here

ruby sedge
#

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

void stone
#

i put three of the ` symbols at the beginning and end of my thing

#

oh well

#

i guess i can try

ruby sedge
#

'''
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?

void stone
#

its the `

#

not '

#

or "

#

its found underneath your esc key

#

and above your tab key

ruby sedge
#
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
void stone
#

you did it!

ruby sedge
#

oh here

#

yeahhhh

void stone
#

{enderdragon} isnt set to anything..

#

you are just spawning nothing

#

why does it need to be a variable anyway?

#

just spawn the enderdragon normally.

ruby sedge
#

so do i need to do enderdragon?

void stone
#

spawn enderdragon at location(0, 75, 0, world "world_the_end")

#

if victim is enderdragon:

ruby sedge
#

ok wait a sec

void stone
#

and you can get rid of the clear {enderdragon} in the on load event

ruby sedge
#

wait what is the key in the key board to this symbole?

void stone
ruby sedge
# void stone
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?

void stone
#

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

ruby sedge
#

oh what

#

oh i didn't save it

#

wait a min

#

lol

void stone
#

ok

ruby sedge
#
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
void stone
#

well?

#

does it work?

ruby sedge
#

i will try it now

void stone
#

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

void stone
#

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}

ruby sedge
#

so to rid of the {enderdragon} but to keep the {enderdragonspawned} ??

void stone
#

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

ruby sedge
void stone
#

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

ruby sedge
#

it is workinggggg

#

lets goooo

void stone
#

gg

ruby sedge
#

thank you so muchh guys

void stone
#

now dont touch it

#

^^^

ruby sedge
#

oh i have another problem with whitelist

void stone
#

this is not a skript problem

ruby sedge
#

ok

#

but you can't help me with that?

ruby sedge
void stone
#

i mean, i can. its just not a skript problem.

worn tapir
#

bro

#

just get worldguard

#

and make out ur area

#

then turn pvp off

#

./rg flag <area name> pvp deny

#

easy

#

oh my god

#

yw

void stone
#

Thatโ€™s not what he asked for-

ruby sedge
#

I said literly whitelist