1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Punishment System with Proof

Discussion in 'Skript' started by FabricioSouza, Mar 22, 2018.

Thread Status:
Not open for further replies.
  1. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    Well, I did a Punishment System and I wanted to do a kind of proof, for example: when I type the / ban <offline player> <reason> <test> command, as you see, in argument 3 that is <proof > will be a site showing the proof because of the punishment only when I type command I want it like this: if the staff enter the command everything right and when he puts the proof, if the proof was njkdddnlnjkbdxd.net, would give an error saying that the proof can only begin with http: //
    --- Double Post Merged, Apr 14, 2018, Original Post Date: Mar 22, 2018 ---
    Does anyone know if this syntax exists:

    Code (Skript):
    1. if arg 3 is a link:
    2.     broadcast "Argument 3 has been defined."
    --- Double Post Merged, Apr 15, 2018 ---
    Someone help me.
     
  2. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    you could do what you said and just check if the first 8 characters of arg-3 are https://
    Code (Skript):
    1. if the first 8 characters of arg-3 are "https://":
    2.     broadcast "Argument 3 has been defined."
    if you wanna make sure the link is valid and/or if you wanna allow links that dont necessarily begin with https:// then you could use an expression with a url in it such as skquery''s text from url expression and if it returns none you can assume the link is invalid
    Code (Skript):
    1. if text from arg-3 is not "<none>":
    2.     broadcast "Argument 3 has been defined."
     
  3. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    I want him to announce a valid link.
    --- Double Post Merged, Apr 15, 2018, Original Post Date: Apr 15, 2018 ---
    [QUOTE = "Donut, post: 28917, membro: 1948"] você pode fazer o que você disse e verificar se os 8 primeiros caracteres de arg-3 são https: //
    [CODE = SKRIPT] se os primeiros 8 caracteres de arg-3 forem "https: //":
    broadcast "Argumento 3 foi definido" [/ CODE]
    se você quer ter certeza de que o link é válido e / ou se você quer permitir links que não necessariamente começam com https: // então você poderia usar uma expressão com uma URL como o texto da skquery da expressão url e se ele não retorna nenhum, você pode assumir que o link é inválido
    [CODE = SKRIPT] se o texto de arg-3 não for "<none>":
    broadcast "Argumento 3 foi definido." [/ CODE] [/ QUOTE]

    Donut, I wanted the player to announce a valid link. How I do.
     
  4. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    i literally spoonfed you
     
  5. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    So, if it put any site for example: https://teste.net, but that site does not exist what I would do.
     
  6. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
     
  7. OrangeCanadian

    OrangeCanadian Active Member

    Joined:
    Aug 2, 2017
    Messages:
    72
    Likes Received:
    0
    If you have found out a fix. Please set the post prefix to SOLVED. Thanks!
     
  8. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    Man, this has not been solved yet.
     
  9. OrangeCanadian

    OrangeCanadian Active Member

    Joined:
    Aug 2, 2017
    Messages:
    72
    Likes Received:
    0
    I said if you've "found" out I fix
    --- Double Post Merged, Apr 15, 2018, Original Post Date: Apr 15, 2018 ---
    Well Donut gave you what you needed... He legitimately stated that he Spoon-fed you.
     
  10. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    Why is it saying here: <none>

    Code (Skript):
    1. if text from arg-3 is not "<none>":
    2.      broadcast "Argument 3 has been defined".
     
  11. OrangeCanadian

    OrangeCanadian Active Member

    Joined:
    Aug 2, 2017
    Messages:
    72
    Likes Received:
    0
    It clearly states. Just read it...
     
  12. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    I'm talking to Donut not with you.
     
  13. OrangeCanadian

    OrangeCanadian Active Member

    Joined:
    Aug 2, 2017
    Messages:
    72
    Likes Received:
    0
    Well you responded to my message... So I think you were chatting with me.
     
  14. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    You're serious, you're taking me seriously.
    --- Double Post Merged, Apr 15, 2018, Original Post Date: Apr 15, 2018 ---
    Ready, but if the player announces a link that does not exist or put in argument 3 any word what I do.
    --- Double Post Merged, Apr 15, 2018 ---
    Please donut answer me.
     
  15. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    Code (Skript):
    1. if text from arg-3 is not "<none>":
    2.     broadcast "Argument 3 has been defined."
    3. else:
    4.     broadcast "Invalid link"
     
  16. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Donut, post: 28947, membro: 1948"] [CODE = SKRIPT] se o texto de arg-3 não for "<none>":
    broadcast "Argumento 3 foi definido".
    outro:
    transmissão "Link inválido" [/ CODE] [/ QUOTE]

    You are not understanding, notice, If the player puts a site: https://gjhgshjdhjs.net will appear a message saying invalid link, please use an existing link. So I'm doubtful because the player can put any link that does not exist or can even put random words like: jkfduhjdfsdvhjdfhjfdshoj.
     
  17. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    idk what youre rambling about it works fine. test it and see for yourself
     
    • Agree Agree x 1
  18. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Donut, post: 28949, membro: 1948"] idk o que você está falando sobre isso funciona bem. teste e veja por si mesmo [/ QUOTE]

    I already tested it. But my problem still is that my biggest fear is that when the player sets the argument 3 the site does not exist for example see this site: https://ablaablaabla.net. Then this site does not exist, and if the player announces this site will give an error saying that the site is non-existent.
     
  19. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    that site is non existent... the code says its non existent... whats the problem?
     
  20. FabricioSouza

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Donut, post: 28951, membro: 1948"] esse site é inexistente ... o código diz que não existe ... qual é o problema? [/ QUOTE]

    What is the part of the code that the site does not exist.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...