Jump to content

generator skript modification


zeetox13___0132

Recommended Posts

So i found a skript for a skygen server and i dont understand how to make so can place 2 type gens instead of only 1 of each type and if someone could help me that would be nice!

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}

Link to comment
Share on other sites

22 hours ago, zeetox13___0132 said:

So i found a skript for a skygen server and i dont understand how to make so can place 2 type gens instead of only 1 of each type and if someone could help me that would be nice!

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}

you made them single variables, when they need to be list variables.

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...