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.

How to make an update checker with Reqn and github?

Discussion in 'Skript' started by Aidanete, Aug 16, 2018.

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

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    I see that Reqn can be used for this with github, and I don't know how to do it. Can anyone help me?
     
  2. btk5h

    Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    154
    Likes Received:
    159
  3. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    It's strange because I did it in another way and works. But thank you anyway :emoji_smiley:
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    here's an example of what i did in my skript.
    Code (Skript):
    1. on load:
    2.     send a "GET" request to "https://raw.githubusercontent.com/ShaneBeee/RandomTP/master/version"
    3.     set {_t} to last http response
    4.     set {_j} to {_t}'s body
    5.     set {_v::*} to {_j} split at "|"
    6.     send "&7[&a&lRTP&7] - &2Loaded successfully" to console
    7.     if "{@version}" is not equal to "%{_v::2}%":
    8.         send "&7[&a&lRandomTP&7] - &2Running version: {@version}" to console
    9.         send "&7[&a&lRandomTP&7] - &cUpdate available, version: %{_v::2}%" to console
    10.     else:
    11.         send "&7[&a&lRandomTP&7] - &2Running current version: {@version}" to console
    Obviously point the url to your url, and change the name of your stuff in there,
    I also have an option at the top of my skript for the version that checks against the website {@version}
     
  5. KingAlterIV

    KingAlterIV Active Member

    Joined:
    Jan 26, 2017
    Messages:
    98
    Likes Received:
    16
    Was definitely not made by me.
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    RIGHT i couldn't remember who gave me the code... haha! Thanks KING
     
  7. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Don't worry, I did that. My API will have an update checker. :emoji_grinning:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...