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

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help meeeee :(

Discussion in 'Skript' started by MINJUN, Feb 26, 2019.

Thread Status:
Not open for further replies.
  1. MINJUN

    MINJUN Member

    Joined:
    Feb 26, 2019
    Messages:
    2
    Likes Received:
    0
    "/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:
     
  2. 07L

    07L Active Member

    Joined:
    Feb 23, 2019
    Messages:
    43
    Likes Received:
    0
    code?
     
  3. MINJUN

    MINJUN Member

    Joined:
    Feb 26, 2019
    Messages:
    2
    Likes Received:
    0
    Code (Text):
    1. command /spawner [<text>] [<text>] [<text>]:
    2.     permission: spawner.*
    3.     permission message: &cyou don't have permissions for this command.
    4.     trigger:
    5.         if arg 1 is not set:
    6.             message "{@mob} /spawner create [name]"
    7.             message "{@mob} /spawner delete [num]"
    8.             message "{@mob} /spawner monster수 [name] [amount] "
    9.             message "{@mob} /spawner list"
    10.             message "{@mob} /spawner reset"
    11.         if arg 1 is "reset":
    12.             delete {spawner.list::*}
    13.             message "{@mob} all spawner deleted."
    14.         if arg 1 is "create":
    15.             if arg 2 is set:
    16.                 loop {spawner.list::*}:
    17.                     if loop-value is player's location:
    18.                         message "{@mob} spawner at that point is already set."
    19.                         stop
    20.                 loop {spawn.mob.list::*}:
    21.                     if loop-value is arg 2:
    22.                         set {spawner.%player's location%.loc} to arg 2
    23.                         add player's location to {spawner.list::*}
    24.                         set {spawner.amount.%arg 2%} to 15
    25.                         message "{@mob} %arg 2% &fcreated mob in spawner."
    26.                         stop
    27.                 message "{@mob} %arg 2%&fthe mob doesn't exist. plz check &e[/mob list]&f"
    28.             else:
    29.                 message "{@mob} /spawner create [name]"
    30.         if arg 1 is "list":
    31.             message "{@mob} &f&lmob spawner list"
    32.             loop {spawner.list::*}:
    33.                 message "{@mob} &f&l%loop-index%. &f%{spawner.%loop-value%.loc}% - %loop-value%"
    34.         if arg 1 is "delete":
    35.             if arg 2 is not set:
    36.                 message "{@mob} /spawner delete [name]"
    37.                 stop
    38.             if {spawner.list::%arg 2%} is set:
    39.                 message "{@mob} %{spawner.list::%arg 2%}% mob spawner deleted."
    40.                 delete {spawner.%{spawner.list::%arg 2%}%.loc}
    41.                 delete {spawner.list::%arg 2%}
    42.                 delete {spawner.amount.%arg 2%}
    43.                 stop
    44.             message "{@mob} /spawner delete [num]"
    45.         if arg 1 is "monster수":
    46.             if arg 3 is set:
    47.                 message "{@mob} %arg 2% has set the amount of monsters."
    48.                 set {spawner.amount.%arg 2%} to arg 3
    49.             else:
    50.                 message "{@mob} /spawner monster [name] [amount]"
    51.  
    52.  
    53. every 3 seconds:
    54.     loop {spawner.list::*}:
    55.         set {_monster.num} to 0
    56.         set {_monster.num.2} to 0
    57.         loop all players:
    58.             distance between the loop-player-1 and loop-value-1 is smaller than 30:
    59.                 add 1 to {_monster.num}
    60.         loop all entities:
    61.             if "%uncolored name of loop-entity-1%" contains "%{spawner.%loop-value-1%.loc}%":
    62.                 add 1 to {_monster.num.2}
    63.         if "%{_monster.num}%" parsed as integer > 0:
    64.             if "%{_monster.num.2}%" parsed as integer < "%{spawner.amount.%{spawner.%loop-value%.loc}%}%" parsed as number:
    65.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "zombie":
    66.                     spawn a zombie at loop-value
    67.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "chicken":
    68.                     spawn a chicken at loop-value
    69.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "skeleton":
    70.                     spawn a skeleton at loop-value
    71.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "cow":
    72.                     spawn a cow at loop-value
    73.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "pig":
    74.                     spawn a pig at loop-value
    75.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "golem":
    76.                     spawn a iron golem at loop-value
    77.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "wolf":
    78.                     spawn a wolf at loop-value
    79.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "spider":
    80.                     spawn a spider at loop-value
    81.                 if {mob.type.%{spawner.%loop-value%.loc}%} contains "witch":
    82.                     spawn a witch at loop-value
    83.                 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 ]"
    84.                 set spawned entity's health to 20
    85.                 wait 2 tick
    86.                 set spawned entity's tool to {mob.e.%{spawner.%loop-value%.loc}%}
    87.                 set spawned entity's helmet to {mob.a.%{spawner.%loop-value%.loc}%}
    88.                 set spawned entity's chestplate to {mob.b.%{spawner.%loop-value%.loc}%}
    89.                 set spawned entity's leggings to {mob.c.%{spawner.%loop-value%.loc}%}
    90.                 set spawned entity's boots to {mob.d.%{spawner.%loop-value%.loc}%}
    91.                 add 1 to {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%}
    92.                 if {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%} >= 540:
    93.                     if {mob.name.%{spawner.%loop-value%.loc}%} contains "Boss-":
    94.                         broadcast "&c&l[Warning] &f%{mob.name.%{spawner.%loop-value%.loc}%}% &fAppeared."
    95.                         delete {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%}
    96.                     if {mob.name.%{spawner.%loop-value%.loc}%} contains "reid-":
    97.                         broadcast "&c&l[Warning] &f%{mob.name.%{spawner.%loop-value%.loc}%}% &fAppeared."
    98.                         delete {mob.boss.cool.%{mob.name.%{spawner.%loop-value%.loc}%}%}
    99.                 else:
    100.                     if {mob.name.%{spawner.%loop-value%.loc}%} contains "Boss-":
    101.                         kill the spawned entity
    102.                     if {mob.name.%{spawner.%loop-value%.loc}%} contains "reid-":
    103.                         kill the spawned entity
    Sorry, I'm late.
    And thank you very much.
     
Thread Status:
Not open for further replies.
Loading...