Custom ids

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

skanto123

Active Member
Jan 8, 2018
70
0
0
34
So how do I make it so when I place a stone named "me" it creates a new id in a file for it and it drops stone around the block every couple of seconds
 
I really don't understand your mean :/
Ok so when I place a stone named "&6Stone spawner" it makes it so it drops 2-4 stone around the block and when you mine it it drops the stone named "&6Stone spawner" so do I need like a place to store all the like locations where its placed so when it gets mined it drops the stone ? How would I make that?
 
When it is placed add its location to a list variable such as {spawners::*} then on break check if the event block’s location is in the list, if it is then drop the stone named spawner and remove it from the list
 
Code may by is:
code_language.skript:
options:
    timedrop: 5

on place of a stone:
    if name of player's tool is "&6Stone Spawner":
        set {StoneSpawner.%location of event-block%} to location of event-block
        add {StoneSpawner.%location of event-block%} to {Store.StoneSpawner::*}

on break a stone:
    if location of event-block is {Store.StoneSpawner::*}:
        drop a stone named "&6Stone Spawner"

every {@timedrop} seconds in "world":
    drop random number between 2 and 4 at {Store.StoneSpawner::*}
 
Code may by is:
code_language.skript:
options:
    timedrop: 5

on place of a stone:
    if name of player's tool is "&6Stone Spawner":
        set {StoneSpawner.%location of event-block%} to location of event-block
        add {StoneSpawner.%location of event-block%} to {Store.StoneSpawner::*}

on break a stone:
    if location of event-block is {Store.StoneSpawner::*}:
        drop a stone named "&6Stone Spawner"

every {@timedrop} seconds in "world":
    drop random number between 2 and 4 at {Store.StoneSpawner::*}
Will it work if I place multiple stone spawners?
 
Can you check my suits post
There was an error and the code after the fix was:
code_language.skript:
options:
    timedrop: 5

on place of a stone:
    if name of player's tool is "&6Stone Spawner":
        set {StoneSpawner.%location of event-block%} to location of event-block
        add {StoneSpawner.%location of event-block%} to {Store.StoneSpawner::*}

on break a stone:
    if location of event-block is {Store.StoneSpawner::*}:
        drop a stone named "&6Stone Spawner"

every {@timedrop} seconds in "world":
    set {droprandom} to random number between 2 and 4
    drop {droprandom} at {Store.StoneSpawner::*}
 
There was an error and the code after the fix was:
code_language.skript:
options:
    timedrop: 5

on place of a stone:
    if name of player's tool is "&6Stone Spawner":
        set {StoneSpawner.%location of event-block%} to location of event-block
        add {StoneSpawner.%location of event-block%} to {Store.StoneSpawner::*}

on break a stone:
    if location of event-block is {Store.StoneSpawner::*}:
        drop a stone named "&6Stone Spawner"

every {@timedrop} seconds in "world":
    set {droprandom} to random number between 2 and 4
    drop {droprandom} at {Store.StoneSpawner::*}
It dosnt remove the location when you break it
There was an error and the code after the fix was:
code_language.skript:
options:
    timedrop: 5

on place of a stone:
    if name of player's tool is "&6Stone Spawner":
        set {StoneSpawner.%location of event-block%} to location of event-block
        add {StoneSpawner.%location of event-block%} to {Store.StoneSpawner::*}

on break a stone:
    if location of event-block is {Store.StoneSpawner::*}:
        drop a stone named "&6Stone Spawner"

every {@timedrop} seconds in "world":
    set {droprandom} to random number between 2 and 4
    drop {droprandom} at {Store.StoneSpawner::*}
it dosnt remove the location when you break it so it still spawns stone around it after you break it
 
It dosnt remove the location when you break it

it dosnt remove the location when you break it so it still spawns stone around it after you break it
Sorry, I forgot to remove the value from the list when breaking the block
It is code:
code_language.skript:
options:
    timedrop: 5

on place of a stone:
    if name of player's tool is "&6Stone Spawner":
        set {StoneSpawner.%location of event-block%} to location of event-block
        add {StoneSpawner.%location of event-block%} to {Store.StoneSpawner::*}

on break a stone:
    if location of event-block is {Store.StoneSpawner::*}:
        drop a stone named "&6Stone Spawner"
        remove {StoneSpawner.%location of event-block%} from {Store.StoneSpawner::*}

every {@timedrop} seconds in "world":
    set {droprandom} to random number between 2 and 4
    drop {droprandom} at {Store.StoneSpawner::*}
 
Status
Not open for further replies.