Solved Reseting Prison Mines

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

FlameikTV

Member
May 22, 2020
19
2
3
24
Hi,
I want to reset my mines with skript but I don't want to reset mine by coordinates like in this topic..

My friend has told me that it is possible to loop all blocks in WorldGuard region and test if it is 0 - fill it and if it is (for example as block in current mine) 1 - don't fill it..

Do you somebody know how to do it?
Thank you very much for any help. :emoji_slight_smile:

and sorry for my poor english..
[doublepost=1590178035,1590169412][/doublepost]I have solved this with schematic and placing it through console, but i need to run that command every day at 12AM, how can i do it? Thanks for any help..
 
but i need to run that command every day at 12AM, how can i do it?

Do you use a mc host, to host your server?
[doublepost=1590181499,1590181456][/doublepost]if so, they most likely has a commands section, in which you can make commands that are automatically run
 
No, I am using Fakaheda.eu its Czech hosting, they don't have anything like timed commands and so on..
[doublepost=1590184866,1590184324][/doublepost]Maybe it'll need some external java plugin to do it, because from skript i now only time variable %now% but it is not good for my prupose.
 
Hi,
I want to reset my mines with skript but I don't want to reset mine by coordinates like in this topic..

My friend has told me that it is possible to loop all blocks in WorldGuard region and test if it is 0 - fill it and if it is (for example as block in current mine) 1 - don't fill it..

Do you somebody know how to do it?
Thank you very much for any help. :emoji_slight_smile:

and sorry for my poor english..
[doublepost=1590178035,1590169412][/doublepost]I have solved this with schematic and placing it through console, but i need to run that command every day at 12AM, how can i do it? Thanks for any help..
Requires: Skellet
Code:
command /mine [<text>] [<int>]:
    permission message: &cNo permissions.
    executable by: players
    permission: rank.admin
    trigger:
        if arg-1 is set:
            if arg-1 is "set" or "corner" or "pos":
                if arg-2 is set:
                    if arg-2 is 1 or 2:
                        set {mine.coner%arg-2%} to player's location
                        send "&aYou have set the corner &f%{mine.coner%arg-2%}% &afor &fprison_mine&a."
                    else:
                        send "&cIncorrect usage."
                else:
                    send "&cIncorrect usage."

            else if arg-1 is "save" or "create":
                if arg-2 is not set:
                    if {mine.coner1} is set:
                        if {mine.coner2} is set:
                            create a regenerator with ID "prison_mine" from {mine.coner1} to {mine.coner2}
                            delete {mine.coner1} and {mine.coner2}
                        else:
                            send "&cMissing the 2nd corner for regenerator."
                    else:
                        send "&cMissing the 1st corner for regenerator."
                else:
                    send "&cIncorrect usage."

            else if arg-1 is "delete" or "remove":
                if arg-2 is not set:
                    loop all regenerator ids:
                        if loop-value is "prison_mine":
                            delete regenerator with ID "prison_mine"
                            send "&cYou have deleted the regenerator &fprison_mine&c."
                            delete {mine.coner1} and {mine.coner2}
                        else:
                            send "&cThere is no a regenerator."
                else:
                    send "&cIncorrect usage."

            else if arg-1 is "reset" or "regen":
                if arg-2 is not set:
                    loop all regenerator ids:
                        if loop-value is "prison_mine":
                            regenerate regenerator with ID "prison_mine"
                            send "&fprison_mine &ahave been reset."
                        else:
                            send "&cThere is no a regenerator."
                else:
                    send "&cIncorrect usage."
            else:
                send "&cUsage: /mine <set | save | reset | delete> <corner>"
        else:
            send "&cUsage: /mine <set | save | reset | delete> <corner>"

on skript load:
    regenerate regenerator with ID "prison_mine"
    send "[Prison] &aThe mine have been reset." to console

every 12 hours:
    regenerate regenerator with ID "prison_mine"
    broadcast "[Prison] &aThe mine have been reset."
 
I have doned that with schematics and pasting them by console and using //world command, but your code may work too, thank you wery much :emoji_slight_smile:
 
I have doned that with schematics and pasting them by console and using //world command, but your code may work too, thank you wery much :emoji_slight_smile:
I tried pasting schematics, too, but I tried with regenerators based on ID's and it works faster without any lag in my opinion.
 
Status
Not open for further replies.