Jump to content

simple Generators perfect for your skygen server


idani1

Recommended Posts

Pls give credits for this code if you use it 🙂

thank you, idani1

 

 

on skript load:
    set {gens} to true

on script load:
    set {gens} to true

command /gens <text>:
    usage: &c/gens <on/off>
    permission: skript.gens
    trigger:
        if arg 1 is "on":
            set {gens} to true
            broadcast "&eGens turned on by &a%player%"
        else if arg 1 is "off":
            set {gens} to false
            broadcast "&eGens turned off by &a%player%"
        else:
            send "&c/gens <on/off>" to player

command /genplace:
    permission: skript.genplace
    trigger:
        set {genplace} to true
        send "&eGen place will expire in &a10 &eseconds!" to player
        wait 10 seconds
        set {genplace} to false
        send "&eGen place has expired" to player

on place oak log:
    if {genplace} is true:
        set {wl} to location of event-block's location

on place stone:
    if {genplace} is true:
        set {sl} to location of event-block's location

on place coal block:
    if {genplace} is true:
        set {cl} to location of event-block's location

on place iron block:
    if {genplace} is true:
        set {il} to location of event-block's location

on place gold block:
    if {genplace} is true:
        set {gl} to location of event-block's location

on place diamond block:
    if {genplace} is true:
        set {dl} to location of event-block's location

every 1 second:
    if {gens} is true:
        if {wl} is set:
            drop oak planks 0.5 above {wl}

every 1.5 second:
    if {gens} is true:
        if {sl} is set:
            drop stone 0.5 above {sl}

every 2 second:
    if {gens} is true:
        if {cl} is set:
            drop coal 0.5 above {cl}

every 5 second:
    if {gens} is true:
        if {il} is set:
            drop iron ingot 0.5 above {il}

every 3 second:
    if {gens} is true:
        if {gl} is set:
            drop gold ingot 0.5 above {gl}

every 7 second:
    if {gens} is true:
        if {dl} is set:
            drop diamond 0.5 above {dl}

every 64 seconds:
    if {gens} is true:
        clear all dropped items

Edited by idani1
  • Like 1
Link to comment
Share on other sites

Only one type of each gen will work. If a player places another gen, the old gen location gets replaced. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

9 minutes ago, _Tarna_ said:

Only one type of each gen will work. If a player places another gen, the old gen location gets replaced. 

are you sure bcz for me it works

(theclanpvp) hehe

Edited by idani1
Link to comment
Share on other sites

1 minute ago, idani1 said:

are you sure bcz for me it works

(theclanpvp) hehe

It does? Can you place multiple of the same type of gen and it drops it above all of them?

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

15 minutes ago, idani1 said:

are you sure you copyed the last edit?

beacuse it was true before i edited it

Yes I did test the whole thing and only one of each gen will work cause you did not use list variables and add the location to it. You just set the location to 1 value. Also if you break it, the item will still drop.

Edited by _Tarna_

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

3 hours ago, _Tarna_ said:

Yes I did test the whole thing and only one of each gen will work cause you did not use list variables and add the location to it. You just set the location to 1 value. Also if you break it, the item will still drop.

I dont know whats the problem for me it works with this exact code

 

Link to comment
Share on other sites

15 hours ago, _Tarna_ said:

Yes I did test the whole thing and only one of each gen will work cause you did not use list variables and add the location to it. You just set the location to 1 value. Also if you break it, the item will still drop.

it has multiple variables what are you talking about?

Edited by idani1
none :P
Link to comment
Share on other sites

7 hours ago, idani1 said:

it has multiple variables what are you talking about?

Yes there are multiple variables but there is only one variable for each type of gen. So you can only place on kind of each generator. Also the items will still drop if you break the gen.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

On 8/19/2020 at 5:22 PM, _Tarna_ said:

Only one type of each gen will work. If a player places another gen, the old gen location gets replaced. 

Have you edited the code? If you did you can dm me on discors the code if you dont want to share it or haven't edited the code you can dm me (Idani1#2107)

Edited by idani1
Link to comment
Share on other sites

31 minutes ago, idani1 said:

Have you edited the code?

I did not edit the code and I don't need it. I was just letting you know that only one of each type of gen will work. If you place multiple of the same gen, it won't drop it above all of them. Only the last one you placed.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

2 minutes ago, idani1 said:

Tarna i uderstanded the problem. ill try to fix it

You would just have to add the locations to a list variable and drop the items above the values in it. Also making it remove the location from the list variable when you break a gen.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Just now, _Tarna_ said:

You would just have to add the locations to a list variable and drop the items above the values in it. Also making it remove the location from the list variable when you break a gen.

In the edit i gonna do /delgen command to delete the gen

Link to comment
Share on other sites

  • 5 months later...

i dont understand i do /gens on i then place a coal block or something and nothing happens?

 

edit: nevermind i just changed it to add enderportal drops nether star netherite block drops netherite lapis block drops lapis redstone block drops redstone got rid of wood and stone and everything spawns in 5 seconds added genplace on/off and the items on ground reset every 5 minutes is u want this new version message me/reply to this

Edited by BoostBrodie
Link to comment
Share on other sites

  • 2 weeks later...

🔐 Topic locked.

Please do not reply on threads that have been inactive for over a month.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...