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.

More texture pack on a server

Discussion in 'Skript' started by AKRODOGY, Aug 7, 2018.

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

    AKRODOGY Active Member

    Joined:
    Mar 20, 2018
    Messages:
    52
    Likes Received:
    2
    IT s exist a way to put more texture packs on a Single server? I search a lot but i don t find, i want to do a gui with select a texture pack and to select witch pack you want, (modern etc) but to put auto to install it, same at a Single texture
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    OOO that is a good question. As far as I know, theres only the option for 1, BUT, I could very well be wrong. I am excited to see if there is a way to do this.
     
  3. Ofus

    Ofus Member

    Joined:
    Mar 28, 2018
    Messages:
    26
    Likes Received:
    3
    You are a very easily excitable fella I wish you luck on your path to euphoria :emoji_slight_smile:
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Haha I truly am. :emoji_wink:
     
  5. Farid

    Farid Active Member

    Joined:
    Feb 5, 2017
    Messages:
    179
    Likes Received:
    11
    Requires skript 2.2 + skript-mirror
    Code (Skript):
    1. on "org.bukkit.event.player.PlayerJoinEvent":
    2.     set {_p} to event.getPlayer()
    3.     open virtual chest inventory with size 1 named "Select texturepack." to player.
    4.     create a gui slot 0 of player with potato named "First" to close then run function sendTexture({_p}, 1)
    5.     create a gui slot 1 of player with potato named "Second" to close then run function sendTexture({_p}, 2)
    6.     create a gui slot 2 of player with potato named "Third" to close then run function sendTexture({_p}, 3)
    7.    
    8.    
    9.    
    10.    
    11. function sendTexture(p: player, id: integer)
    12.     if {_id} = 1:
    13.         {_p}.setResourcePack("Zip link #1")
    14.         send "Attemping to download texture pack 1." to {_p}
    15.     else if {_id} = 2:
    16.         {_p}.setResourcePack("Zip link #2")
    17.         send "Attemping to download texture pack 2." to {_p}
    18.     else if {_id} = 3:
    19.         {_p}.setResourcePack("Zip link #3")
    20.         send "Attemping to download texture pack 3." to {_p}
    21.        
    22.    
    23.    
    24.    
    25.    
    --- Double Post Merged, Aug 8, 2018, Original Post Date: Aug 8, 2018 ---
    Also if you want to kick them or something when they don't accept
    Code (Skript):
    1. on "org.bukkit.event.player.PlayerResourcePackStatusEvent":
    2.     set {_player} to event.getPlayer()
    3.     set {_status} to event.getStatus()
    4.     if "%{_status}%" = "DECLINED" or "FAILED_DOWNLOAD":
    5.         send centered "&e&lWe recommend you to use our resource pack for a fun experience!" to {_player}
     
    #5 Farid, Aug 8, 2018
    Last edited: Aug 8, 2018
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    I’m curious why you’re using skript mirror for the join event? Skript has an on join event.
     
  7. Farid

    Farid Active Member

    Joined:
    Feb 5, 2017
    Messages:
    179
    Likes Received:
    11
    no reason i just like skript-mirror because it tends to work 97.5% of the time rather than skript
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    220
    Ah gotcha. Okie dokie.
     
  9. AKRODOGY

    AKRODOGY Active Member

    Joined:
    Mar 20, 2018
    Messages:
    52
    Likes Received:
    2
    [09:52:40 INFO]: [Skript] Reloading the config and all scripts...
    [09:52:42 INFO]: Loaded a total of 79112 english aliases
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 1 tab (Rename.sk, line 9: if {_id} = 1:')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 2 tabs (Rename.sk, line 10: {_p}.setResourcePack("Zip link#1");')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 2 tabs (Rename.sk, line 11: send "Attemping to download texture pack 1." to {_p}')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 1 tab (Rename.sk, line 12: else if {_id} = 2:')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 2 tabs (Rename.sk, line 13: {_p}.setResourcePack("Zip link#2");')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 2 tabs (Rename.sk, line 14: send "Attemping to download texture pack 2." to {_p}')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 1 tab (Rename.sk, line 15: else if {_id} = 3:')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 2 tabs (Rename.sk, line 16: {_p}.setResourcePack("Zip link#3");')
    [09:52:42 ERROR]: indentation error: expected 0 tabs, but found 2 tabs (Rename.sk, line 17: send "Attemping to download texture pack 3." to {_p}')
    [09:52:42 ERROR]: Can't understand this condition/effect: open virtual chest inventory with size 1 named "Select texturepack." to player. (Rename.sk, line 3: open virtual chest inventory with size 1 named "Select texturepack." to player.')
    [09:52:42 ERROR]: The function 'sendTexture' does not exist. (Rename.sk, line 4: create a gui slot 0 of player with potato named "First" to close then run function sendTexture({_p}, 1)')
    [09:52:43 ERROR]: The function 'sendTexture' does not exist. (Rename.sk, line 5: create a gui slot 1 of player with potato named "Second" to close then run function sendTexture({_p}, 2)')
    [09:52:44 ERROR]: The function 'sendTexture' does not exist. (Rename.sk, line 6: create a gui slot 2 of player with potato named "Third" to close then run function sendTexture({_p}, 3)')
    [09:52:44 ERROR]: invalid line - all code has to be put into triggers (Rename.sk, line 8: function sendTexture(p: player, id: integer)')
    [09:52:44 ERROR]: Can't understand this condition/effect: send centered "&e&lWe recommend you to use our resource pack for a fun experience!" to {_player} (Rename.sk, line 23: send centered "&e&lWe recommend you to use our resource pack for a fun experience!" to {_player}')
    --- Double Post Merged, Aug 8, 2018, Original Post Date: Aug 8, 2018 ---
    i am noob, you can give me this in a skript file?
     
  10. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,500
    Likes Received:
    107
    Medals:
    He forgot a : at the end of the function defenition line, add it. Also remove the centered part from the messages you probably have to remove the ; as well because they're no longer needed in the newer
     
    • Like Like x 1
  11. AKRODOGY

    AKRODOGY Active Member

    Joined:
    Mar 20, 2018
    Messages:
    52
    Likes Received:
    2
  12. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,500
    Likes Received:
    107
    Medals:
    Try this:
    Code (Skript):
    1. on "org.bukkit.event.player.PlayerJoinEvent":
    2.     set {_p} to event.getPlayer()
    3.     open virtual chest inventory with size 1 named "Select texturepack." to player
    4.     create a gui slot 0 of player with potato named "First" to close then run function sendTexture({_p}, 1)
    5.     create a gui slot 1 of player with potato named "Second" to close then run function sendTexture({_p}, 2)
    6.     create a gui slot 2 of player with potato named "Third" to close then run function sendTexture({_p}, 3)
    7.  
    8. function sendTexture(p: player, id: integer):
    9.     if {_id} = 1:
    10.         {_p}.setResourcePack("Zip link #1")
    11.         send "Attemping to download texture pack 1." to {_p}
    12.     else if {_id} = 2:
    13.         {_p}.setResourcePack("Zip link #2")
    14.         send "Attemping to download texture pack 2." to {_p}
    15.     else if {_id} = 3:
    16.         {_p}.setResourcePack("Zip link #3")
    17.         send "Attemping to download texture pack 3." to {_p}
     
Thread Status:
Not open for further replies.

Share This Page

Loading...