Help meeeee :(

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

MINJUN

Member
Feb 26, 2019
2
0
0
22
"/mobspawn add" command to add a monster sponge, there are mobs there. When all the mobs are dead, the mob must come out after the set time.
However, if you kill with the rpgitem or magic spell skill instead of the default item, you will get an error that the mobs do not spawn.

If you need source code, plz tell me. Thx :emoji_grinning:
 
"/mobspawn add" command to add a monster sponge, there are mobs there. When all the mobs are dead, the mob must come out after the set time.
However, if you kill with the rpgitem or magic spell skill instead of the default item, you will get an error that the mobs do not spawn.

If you need source code, plz tell me. Thx :emoji_grinning:
code?
 
Code:
command /spawner [<text>] [<text>] [<text>]:
    permission: spawner.*
    permission message: &cyou don't have permissions for this command.
    trigger:
        if arg 1 is not set:
            message "{@mob} /spawner create [name]"
            message "{@mob} /spawner delete [num]"
            message "{@mob} /spawner monster수 [name] [amount] "
            message "{@mob} /spawner list"
            message "{@mob} /spawner reset"
        if arg 1 is "reset":
            delete {spawner.list::*}
            message "{@mob} all spawner deleted."
        if arg 1 is "create":
            if arg 2 is set:
                loop {spawner.list::*}:
                    if loop-value is player's location:
                        message "{@mob} spawner at that point is already set."
                        stop
                loop {spawn.mob.list::*}:
                    if loop-value is arg 2:
                        set {spawner.%player's location%.loc} to arg 2
                        add player's location to {spawner.list::*}
                        set {spawner.amount.%arg 2%} to 15
                        message "{@mob} %arg 2% &fcreated mob in spawner."
                        stop
                message "{@mob} %arg 2%&fthe mob doesn't exist. plz check &e[/mob list]&f"
            else:
                message "{@mob} /spawner create [name]"
        if arg 1 is "list":
            message "{@mob} &f&lmob spawner list"
            loop {spawner.list::*}:
                message "{@mob} &f&l%loop-index%. &f%{spawner.%loop-value%.loc}% - %loop-value%"
        if arg 1 is "delete":
            if arg 2 is not set:
                message "{@mob} /spawner delete [name]"
                stop
            if {spawner.list::%arg 2%} is set:
                message "{@mob} %{spawner.list::%arg 2%}% mob spawner deleted."
                delete {spawner.%{spawner.list::%arg 2%}%.loc}
                delete {spawner.list::%arg 2%}
                delete {spawner.amount.%arg 2%}
                stop
            message "{@mob} /spawner delete [num]"
        if arg 1 is "monster수":
            if arg 3 is set:
                message "{@mob} %arg 2% has set the amount of monsters."
                set {spawner.amount.%arg 2%} to arg 3
            else:
                message "{@mob} /spawner monster [name] [amount]"


every 3 seconds:
    loop {spawner.list::*}:
        set {_monster.num} to 0
        set {_monster.num.2} to 0
        loop all players:
            distance between the loop-player-1 and loop-value-1 is smaller than 30:
                add 1 to {_monster.num}
        loop all entities:
            if "%uncolored name of loop-entity-1%" contains "%{spawner.%loop-value-1%.loc}%":
                add 1 to {_monster.num.2}
        if "%{_monster.num}%" parsed as integer > 0:
            if "%{_monster.num.2}%" parsed as integer < "%{spawner.amount.%{spawner.%loop-value%.loc}%}%" parsed as number:
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "zombie":
                    spawn a zombie at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "chicken":
                    spawn a chicken at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "skeleton":
                    spawn a skeleton at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "cow":
                    spawn a cow at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "pig":
                    spawn a pig at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "golem":
                    spawn a iron golem at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "wolf":
                    spawn a wolf at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "spider":
                    spawn a spider at loop-value
                if {mob.type.%{spawner.%loop-value%.loc}%} contains "witch":
                    spawn a witch at loop-value
                set spawned entity's name to "%{mob.level.%{spawner.%loop-value%.loc}%}% &f%{mob.name.%{spawner.%loop-value%.loc}%}% &c[ %{mob.health.%{spawner.%loop-value%.loc}%}% HP ]"
                set spawned entity's health to 20
                wait 2 tick
                set spawned entity's tool to {mob.e.%{spawner.%loop-value%.loc}%}
                set spawned entity's helmet to {mob.a.%{spawner.%loop-value%.loc}%}
                set spawned entity's chestplate to {mob.b.%{spawner.%loop-value%.loc}%}
                set spawned entity's leggings to {mob.c.%{spawner.%loop-value%.loc}%}
                set spawned entity's boots to {mob.d.%{spawner.%loop-value%.loc}%}
                add 1 to {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%}
                if {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%} >= 540:
                    if {mob.name.%{spawner.%loop-value%.loc}%} contains "Boss-":
                        broadcast "&c&l[Warning] &f%{mob.name.%{spawner.%loop-value%.loc}%}% &fAppeared."
                        delete {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%}
                    if {mob.name.%{spawner.%loop-value%.loc}%} contains "reid-":
                        broadcast "&c&l[Warning] &f%{mob.name.%{spawner.%loop-value%.loc}%}% &fAppeared."
                        delete {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%}
                else:
                    if {mob.name.%{spawner.%loop-value%.loc}%} contains "Boss-":
                        kill the spawned entity
                    if {mob.name.%{spawner.%loop-value%.loc}%} contains "reid-":
                        kill the spawned entity

Sorry, I'm late.
And thank you very much.
 
Status
Not open for further replies.