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!

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

SkellettProxy SkellettProxy

Discussion in 'Tutorials' started by YoshYz, May 7, 2017.

  1. YoshYz

    YoshYz Well-Known Member

    Joined:
    Jan 28, 2017
    Messages:
    694
    Likes Received:
    82
    [​IMG]
    What I'll explain in this tutorial?
    • How to install correctly SkellettProxy
    • How to use correctly the syntax of it
    • Many examples
    What you need to install SkellettProxy?
    • A BungeeCord server
    • 1+ Servers
    • Skellett installed in all connected servers.
    Place SkellettProxy.jar in your plugins folder of your BungeeCord server.
    Place Skellett.jar in all your connected servers of your BungeeCord.
    Enable SkellettProxy option in every Skellett config.
    Put the IP of your Bungeecord in every Skellett config as "Host".
    Run BungeeCord and all the servers connected in it.

    (Version of Skellet & SkellettProxy should match to work correctly.)
    (EventPort must be different in every Skellett config.)
    (Port must be the same in every Skellett & SkellettProxy config.)

    SkellettProxy Config.yml
    Code (Skript):
    1.  
    2. debug: false #Debug Mode if enabled you l'll get connection info messages in your bungee console.
    3. Port: 7332 #Event port (Should be the same in all Skellett config files connected in your bungeecord.)
    4. GlobalScripts: #These scripts are loaded into all connected servers in your bungeecord.)
    5.     Enabled: true
    6. NetworkVariables: #These variables are connected in all servers in your bungeecord.)
    7.     Enabled: true
    8.     AutomaticSharing: false #If enabled all network variables are automatically loaded in all the servers and you don't need to get them first of use.
    9.  
    NetworkVariables [AutomaticSharing: False]
    Code (Skript):
    1. set network variable {tutorial} to "Example"
    2. set {_variable} to network variable {tutorial}
    NetworkVariables [AutomaticSharing: True]
    Code (Skript):
    1. set global variable {tutorial} to "Example"
    [​IMG]
    You can execute bungeecord commands using:
    Code (Skript):
    1. skellettcord execute bungeecord console command "end"
    You can execute an action in every connected servers using the evaluate expression:
    Code (Skript):
    1. loop all bungeecord servers:
    2.     evaluate "broadcast ""&cJust a tutorial!""" on bungeecord server "%loop-value%"
    Small resources using Skellettcord sintax

    Little friends system using global variables:
    Code (Skript):
    1. command /friends [<text>] [<offlineplayer>]:
    2.     trigger:
    3.         if arg-1 is "add":
    4.             if arg-2 is set:
    5.                 if {friends::%player%::%arg-2%} isn't set:
    6.                     set global variable {friends::%player%::%arg-2%} to true
    7.                     message "&8[&3Friends&8] &7You have added &b%arg-2% &7to your friends list."
    8.                     stop
    9.                 else:
    10.                     message "&8[&3Friends&8] &c%arg-2% &7is already in your friends list."
    11.                     stop
    12.         if arg-1 is "remove":
    13.             if arg-2 is set:
    14.                 if {friends::%player%::%arg-2%} is set:
    15.                     delete global variable {friends::%player%::%arg-2%}
    16.                     message "&8[&3Friends&8] &7You have removed &c%arg-2% &7from your friends list."
    17.                     stop
    18.                 else:
    19.                     message "&8[&3Friends&8] &c%arg-2% &7is not in your friends list."
    20.                     stop
    21.         if arg-1 is "list":
    22.             set {_size} to size of {friends::%player%::*}
    23.             if {_size} is more than 0:
    24.                 message "&8[&3Friends&8] &8(&b%{_size}%&8) &a%{friends::%player%::*}%"
    25.             else:
    26.                 message "&8[&3Friends&8] &7Your friends list is empty."
    27.                 stop
    28.              
    29. on join:
    30.     loop {friends::%player%::*}:
    31.         if skellettcord "%loop-value%" is online bungeecord:
    32.             add loop-value to {_online::*}
    33.     set {_size} to size of {_online::*}
    34.     if {_size} is more than 0:
    35.         message "&3Online Friends&8: &8(&b%{_size}%&8) &a%{_online::*}%"
    36.     else:
    37.         message "&cNo one of your friends is online."
    Global "/msg" command:
    Code (Skript):
    1. command /msg [<offlineplayer>] [<text>]:
    2.     aliases: /tell , /message , /send , /say , /w
    3.     trigger:
    4.         if arg-1 is set:
    5.             if arg-1 isn't player:
    6.                 if arg-2 is set:
    7.                     message coloured "&8[&b&8] &a%player% &9&l> &3%arg 2%" to bungeecord player "%arg-1%"
    8.                     message coloured "&8[&b&8] &a%player% &9&l> &3%arg 2%"
    9.                     stop
    10.                 else:
    11.                     message " &8[&c&8] &7You need to write the text of the message."
    12.                     stop
    13.             else:
    14.                 message " &8[&c&8] &7You can't send a message to yourself."
    15.                 stop
    16.         else:
    17.             message " &8[&c&8] &7You need to write the player's name."
    18.             stop
    Ping command:
    Code (Skript):
    1. command /ping:
    2.     trigger:
    3.         set {_ping} to skellettcord ping of "%player%"
    4.         if {_ping} is less than 51:
    5.             message " &8[&a&8] &3Ping: &a%{_ping}%ms"
    6.             stop
    7.         if {_ping} is more than 50:
    8.             if {_ping} is less than 151:
    9.                 message " &8[&a&8] &3Ping: &6%{_ping}%ms"
    10.                 stop
    11.         if {_ping} is more than 150:
    12.             message " &8[&a&8] &3Ping: &c%{_ping}%ms"
    13.             stop
    Bungee broadcast:
    Code (Skript):
    1. command /broadcast [<text>]:
    2.     trigger:
    3.         if sender is a player:
    4.             if player has permission "bungeescript.broadcast":
    5.                 skellettcord message coloured "&8[&3Network&8] &b%arg-1%" to all bungeecord players
    6.         if sender is console:
    7.             skellettcord message coloured "&8[&3Network&8] &b%arg-1%" to all bungeecord players

    FAQ
    Q Skellett isn't correctly connected in your Bungeecord?
    A Be sure that you enabled skellettproxy in the options and that you put the correctly IP of your bungeecord.

    Q Are you getting socket errors?
    A Be sure that all the ports your using are open and with all correctly permissions to do what you need.
     
    #1 YoshYz, May 7, 2017
    Last edited: May 7, 2017
    • Like Like x 1
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Damn this is Sexy, I approve! Well done. I will be sure to link some people to this thread!

    Also do you mean Syntax?

    Those banners are epic aswell! Just great tutorial in general.
     
    • Agree Agree x 1
    • Friendly Friendly x 1
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Ooh , thank you:emoji_blush:
    You can free contact me if you will need one!

    Corrected to "Syntax".
     
    • Agree Agree x 1
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Its not working at home friends
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    What do you mean?
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    When I do / friends sa tells me that the command does not exist
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    fells dumb. but can i do ... ONLY set varaibles to two server instead global?

    example:

    Code (Skript):
    1. set global variable {friends::%player%::%arg-2%} to true
    2. #instead
    3. set "SkyBlock" and "Prison" variable {Friends::%player%}
    4. #because i got Prison, Lobby, SkyBlock, Prison OP, Survival
    5. #and i only want set variables between skyblock and prison
     
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Nope , you can't.
    You should use them with "AutomaticSharing: False" and get them only where you need.
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Hmmm so its mean i need on Server Prison:

    Code (Skript):
    1. set network variable {tutorial} to "Example"
    2.  
    and On Server SkyBlock:

    Code (Skript):
    1. set {_variable} to network variable {tutorial}
    ?
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    @ChisleLP The AutomaticSharing means that the global variables will override variables on all servers. So if you set a network variable {this} to something. On all servers the variable {this} will be set to that. (Keep that on false in this case for what you're doing)

    And you can use the evaluate effect to send variables to special servers.
    Code (Skript):
    1. evaluate "set {this} to true" on bungeecord server "Skyblock"
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Hmmm... seen doesn't work. :/


    output broadcast: <none>

    test.sk in Prison server:
    Code (Skript):
    1. command /test:
    2.     trigger:
    3.         evaluate "set {this} to Hahahaha" on bungeecord server "Skyblock"
    test.sk in Skyblock server:
    Code (Skript):
    1. command /test:
    2.     trigger:
    3.         broadcast "%{this}%"
    Output:
    upload_2017-5-18_20-19-0.png
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    It's case sensitive and make sure it matches the name that's in the Bungeecord. Also that it's sending packets to the bungeecord still.
     
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    ....

    no one need to know what i edit.


    I added "" "" and its work...

    Code (Skript):
    1. evaluate "set {this} to ""Im a text""" on bungeecord server "Skyblock"
     
Loading...