Solved Server Startup Code/IP

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

    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.

NickPlayzHD

Member
Aug 24, 2017
3
0
0
Skript Version: Skript 2.1.2
Minecraft Version: 1.7-1.8
---
I am not sure if I am putting it under the right category or not but is there a way to do the following:

So when the server starts up you must enter a code in console for it to complete the startup, if the wrong code is entered it will stop the server

Or

On start up of the server if the server is running off the "incorrect ip" or an ip that is not set inside the sk it will stop the server

Are tiehr of these things possible to do or no? If not could someone create an addon of some sorts?

Thanks,
Nick.
 
im think you want request a code?

btw i think we need more infomantion. btw i don't understand really what you want. Btw why do you want doing this?


btw what i understand:
code_language.skript:
on skript load:
    set {STARTUPCODE} to "ANYCODE"

on connect:
    if {STARTUPCODE} is set:
        kick player due to "Sorry, The owner need enter the Code first"

command /code [<text>]:
    trigger:
        if {STARTUPCODE} is "%arg-1%":
            delete {STARTUPCODE}
            send "Sucessfull logged. Server is now open" to console
        else:
            send "Wrong code. Server will shutding down in 3 seconds" to console
            wait 3 seconds
            stop server
 
Last edited by a moderator:
or if you wanna go by ip this should work?
code_language.skript:
options:
    ip: "xxx.xx.xxx.xxx"
on server startup:
    if {@ip} is "":
        message "IP is not set, recommended to set" to console
    else if "%ip of server%" isn't {@ip}:
        message "Invalid IP, server shutting down" to console
        wait 3 seconds
        stop server
No gaurantees on this working though, should require just wildskript in order to work
 
or if you wanna go by ip this should work?
code_language.skript:
options:
    ip: "xxx.xx.xxx.xxx"
on server startup:
    if {@ip} is "":
        message "IP is not set, recommended to set" to console
    else if "%ip of server%" isn't {@ip}:
        message "Invalid IP, server shutting down" to console
        wait 3 seconds
        stop server
No gaurantees on this working though, should require just wildskript in order to work
Unforatnly this does not work :emoji_frowning:
[doublepost=1503631882,1503631849][/doublepost]
im think you want request a code?

btw i think we need more infomantion. btw i don't understand really what you want. Btw why do you want doing this?


btw what i understand:
code_language.skript:
on skript load:
    set {STARTUPCODE} to "ANYCODE"

on connect:
    if {STARTUPCODE} is set:
        kick player due to "Sorry, The owner need enter the Code first"

command /code [<text>]:
    trigger:
        if {STARTUPCODE} is "%arg-1%":
            delete {STARTUPCODE}
            send "Sucessfull logged. Server is now open" to console
        else:
            send "Wrong code. Server will shutding down in 3 seconds" to console
            wait 3 seconds
            stop server
This works thanks :emoji_slight_smile:
 
Status
Not open for further replies.