Jump to content

Need help with Skript


Cirga5

Recommended Posts

I got some code, Im using SkriptWebAPI and idk if this is reqn too. ChatGPT made it and I modified it to the docs. Its not receiving though..:

 

command /resetvar:
  trigger:
    set {variable1} to 0

command /addvar:
  trigger:
    add 1 to {variable1}
    broadcast {variable1}

command /sendData:
    trigger:
        set {_url} to "https://html-skript-http-get-test.cirga5twitch.repl.co"  # Replace with your actual endpoint URL

        set {_header} to "Content-Type: application/json"

        set {_body} to "{ 'variable1': '%{variable1}%', 'variable2': '%{variable2}%', 'variable3': '%{variable3}%', 'variable4': '%{variable4}%' }"

        send post request to {_url} with header {_header} and body {_body}

        broadcast "Done"

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