Spawner Spam Bug

  • 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!

SafaYVS

Member
Jun 22, 2018
30
0
0
26
if player write /coin spawner he win coin spawner. But this spawner placed on island maximum 1 . if player try to put 1 more do not allow. maximum one can be placed in each island.
 
by island are you referring to aSkyBlock island?
If yes, you could use this code, which would require WolvSK to check for island owner

code_language.skript:
on place of spawner:
    set {_owner} to owner of island at location of player
    if {isspanwer::%{_owner}%} is not set:
        set {isspanwer::%{_owner}%} to true
    if {isspanwer::%{_owner}%} is true:
        cancel event
        send "YOU CAN NOT PLACE MORE THAN ONE SPAWNER ON THIS ISLAND"

on break of spawner:
    set {_owner} to owner of island at location of player
    set {isspanwer::%{_owner}%} to false

This will basically create a boolean variable for each island, so each time a spawner is placed, the variable will be created, and a person will only be able to place ONE spawner per island
 
yes skyblock islands
[doublepost=1530138051,1530137999][/doublepost]but how to add if name of player's tool is "&b&lPCNW &9» &eCoin Spawner":
 
i guess like so, give that a try, you MIGHT have to add "colored" after "player's tool is"

code_language.skript:
on place of spawner:
    if name of player's tool is "&b&lPCNW &9» &eCoin Spawner":
        set {_owner} to owner of island at location of player
        if {isspanwer::%{_owner}%} is not set:
            set {isspanwer::%{_owner}%} to true
        if {isspanwer::%{_owner}%} is true:
            cancel event
            send "YOU CAN NOT PLACE MORE THAN ONE SPAWNER ON THIS ISLAND"
 
on break of spawner:
    set {_owner} to owner of island at location of player
    set {isspanwer::%{_owner}%} to false
 
finish finish :emoji_grinning:
Code:
on place of brick block:
    if name of player's tool is "&b&lPCNW &9» &eCoin Spawner":
        create holo object "&eCoin &6Spawner;ItemStack:Gold Nugget;;&6Sahibi &9» &e%player%;&6Süre &9» &e10 Saniye;&6Miktar &9» &e1" with id "%event-block's location%" at location 2.8 meters above block
        set {_location} to location of targeted block
        set {demirspawner1::%{_location}%} to {_location}       
        set {_x} to x coord of event-location
        set {_y} to y coord of event-location
        set {_z} to z coord of event-location
        wait 2 tick
        execute player command "setblock %{_x}% %{_y}% %{_z}% brick_block 0 replace {EntityId:Item,SpawnData:{Item:{id:minecraft:gold_nugget,Count:1b}},SpawnCount:0,SpawnRange:0,RequiredPlayerRange:50,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:00,MaxNearbyEntities:0}"   
        send "&bPCNW &9» &aKazma ile kırınca geri alabilirsin." to player
      
on break of brick block:
    if {demirspawner1::%location of targeted block%} is set:
        set block to air       
        delete holo object "%event-block's location%"
        remove location of targeted block from {demirspawner1::*}
        clear {demirspawner1::%location of targeted block%}       
        execute console command "give %player% brick_block 1 name:&b&lPCNW_&9»_&eCoin_Spawner"
        send "&bPCNW &9» &aSpawnerin geri alındı." to player
how to combine item spawner .
[doublepost=1530138867,1530138465][/doublepost]and give error http://prntscr.com/k05znd
 
like i said, for the "owner of the island" expression you will need WolvSk
 
im not sure how you are getting that error... i just looked over your code and you dont even have anything in there about the owner of the island
 
oh sorry i forgot the ASB
so change:
set {_owner} to owner of island at location of player
to:
set {_owner} to asb owner of island at location of player
 
code_language.skript:
on place of spawner:
    set {_owner} to asb owner of island at location of player
    if {isspanwer::%{_owner}%} is not set:
        set {isspanwer::%{_owner}%} to true
    if {isspanwer::%{_owner}%} is true:
        cancel event
        send "YOU CAN NOT PLACE MORE THAN ONE SPAWNER ON THIS ISLAND"
 
on break of spawner:
    set {_owner} to asb owner of island at location of player
    set {isspanwer::%{_owner}%} to false
 
Code:
on place of brick block:
    if name of player's tool is "&b&lPCNW &9» &eCoin Spawner":
        set {_owner} to asb owner of island at location of player
        create holo object "&eCoin &6Spawner;ItemStack:Gold Nugget;;&6Sahibi &9» &e%player%;&6Süre &9» &e10 Saniye;&6Miktar &9» &e1" with id "%event-block's location%" at location 2.8 meters above block
        set {_location} to location of targeted block
        set {demirspawner1::%{_location}%} to {_location}       
        set {_x} to x coord of event-location
        set {_y} to y coord of event-location
        set {_z} to z coord of event-location
        wait 2 tick
        execute player command "setblock %{_x}% %{_y}% %{_z}% brick_block 0 replace {EntityId:Item,SpawnData:{Item:{id:minecraft:gold_nugget,Count:1b}},SpawnCount:0,SpawnRange:0,RequiredPlayerRange:50,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:00,MaxNearbyEntities:0}"   
        send "&bPCNW &9» &aKazma ile kırınca geri alabilirsin." to player
        if {isspanwer::%{_owner}%} is not set:
            set {isspanwer::%{_owner}%} to true
        if {isspanwer::%{_owner}%} is true:
            delete holo object "%event-block's location%"
            remove location of targeted block from {demirspawner1::*}
            clear {demirspawner1::%location of targeted block%}     
            execute console command "give %player% brick_block 1 name:&b&lPCNW_&9»_&eCoin_Spawner"
            send "&bPCNW &9» &aSpawnerin geri alındı." to player
            send "YOU CAN NOT PLACE MORE THAN ONE SPAWNER ON THIS ISLAND"

on break of brick block:
        set {_owner} to asb owner of island at location of player
        set {isspanwer::%{_owner}%} to false   
        delete holo object "%event-block's location%"
        remove location of targeted block from {demirspawner1::*}
        clear {demirspawner1::%location of targeted block%}     
        execute console command "give %player% brick_block 1 name:&b&lPCNW_&9»_&eCoin_Spawner"
        send "&bPCNW &9» &aSpawnerin geri alındı." to player

dont working but placing one more spawner
 
okay, i actually have to head out for a few hours but when i get home and have time i will work on this and get it all sorted for you
 
thank you igive my spawner skript. You can adjust it on. if you want to add item spawner yourself

Code:
command /CoinSpawner:
    trigger:
        give 1 brick block named "&bPCNW &9» &eCoin Spawner" to player
       
on place of brick block:
    if name of player's tool is "&bPCNW &9» &eCoin Spawner":   
        create holo object "&eCoin &6Spawner;ItemStack:Gold Nugget;;&6Sahibi &9» &e%player%;&6Süre &9» &e10 Saniye;&6Miktar &9» &e1" with id "%event-block's location%" at location 2.8 meters above block
        set {_location} to location of targeted block
        set {coinspawner::%{_location}%} to {_location}       
        set {_x} to x coord of event-location
        set {_y} to y coord of event-location
        set {_z} to z coord of event-location
        wait 2 tick
        execute player command "setblock %{_x}% %{_y}% %{_z}% brick_block 0 replace {EntityId:Item,SpawnData:{Item:{id:minecraft:gold_nugget,Count:1b}},SpawnCount:0,SpawnRange:0,RequiredPlayerRange:50,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:00,MaxNearbyEntities:0}"   
   
on break of brick block:
    if {coinspawner::%location of targeted block%} is set:   
        cancel event
        set block to air
        delete holo object "%event-block's location%"       
        remove location of targeted block from {coinspawner::*}
        clear {coinspawner::%location of targeted block%}       
        give 1 brick block named "&bPCNW &9» &eCoin Spawner" to player

every 10 second:
    loop {coinspawner::*}:
        drop 1 gold nugget named "&eCoin" at block 0 above loop-value
 
okay, this should do it :emoji_slight_smile:

code_language.skript:
command /CoinSpawner:
    trigger:
        give 1 brick block named "&bPCNW &9» &eCoin Spawner" to player
      
on place of brick block:
    set {_owner} to asb owner of island at location of player
    if {isspanwer::%{_owner}%} is not set:
        set {isspanwer::%{_owner}%} to true
        if name of player's tool is "&bPCNW &9» &eCoin Spawner": 
            create holo object "&eCoin &6Spawner;ItemStack:Gold Nugget;;&6Sahibi &9» &e%player%;&6Süre &9» &e10 Saniye;&6Miktar &9» &e1" with id "%event-block's location%" at location 2.8 meters above block
            set {_location} to location of targeted block
            set {coinspawner::%{_location}%} to {_location}     
            set {_x} to x coord of event-location
            set {_y} to y coord of event-location
            set {_z} to z coord of event-location
            wait 2 tick
            execute player command "setblock %{_x}% %{_y}% %{_z}% brick_block 0 replace {EntityId:Item,SpawnData:{Item:{id:minecraft:gold_nugget,Count:1b}},SpawnCount:0,SpawnRange:0,RequiredPlayerRange:50,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:00,MaxNearbyEntities:0}" 
            stop
    if {isspanwer::%{_owner}%} is true:
        cancel event
        send "YOU CAN NOT PLACE MORE THAN ONE SPAWNER ON THIS ISLAND"  # << ------ EDIT TO YOUR LIKING
        stop

on break of brick block:
    if {coinspawner::%location of targeted block%} is set: 
        cancel event
        set block to air
        delete holo object "%event-block's location%"     
        remove location of targeted block from {coinspawner::*}
        clear {coinspawner::%location of targeted block%}     
        give 1 brick block named "&bPCNW &9» &eCoin Spawner" to player
        set {_owner} to asb owner of island at location of player
        delete {isspanwer::%{_owner}%}
 
every 10 second:
    loop {coinspawner::*}:
        drop 1 gold nugget named "&eCoin" at block 0 above loop-value
 
can you please give more detail of what is not working?
I tested it and it works.

I place the block, every 10 seconds it spits out the coins.
If i try place another one, it cancels it, when i break it, it gives it to me and I can place it again.
Seems to be working for me
 
the hologram is not forming, the spawner is not active, the script is not active, just the messages are coming,