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.

Any Idea how to make multiplayer skyblock worlds?

Discussion in 'Skript' started by EpicLucas100, Jun 6, 2020.

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

    EpicLucas100 Member

    Joined:
    Jun 6, 2020
    Messages:
    10
    Likes Received:
    0
    [C]I've looked everywhere across the internet and on the forums and I can't find anything on this. There aren't any tutorials for this and I'm just getting very confused. I just recently started scripting so I would love some help! Its Cave instead of skyblock since a new server with a new idea.

    Code (Text):
    1. command /cave [<text>] [<text>]:
    2.     aliases:/c
    3.     permission: cave.use
    4.     trigger:
    5.         if arg 1 is not set:
    6.             if player has the permission "cave.create":
    7.                 open chest with 3 rows named "&e&lCave Create" to player
    8.                 format slot 13 of player with stone named "&b&lCreate A Cave" to run [command "cave create "]
    9.             if player has the permission "cave.gui":
    10.                 open chest with 3 rows named "&e&lCave Settings" to player
    11.                 format slot 13 of player with stone named "&b&lCave Home" to run [command "cave home "]
    12.         if arg 1 is set:
    13.             if arg 1 is "create":
    14.                 if player has the permission "cave.create":
    15.                     execute console command "/mv clone ul_CavingX1 %player%"
    16.                     wait 2 seconds
    17.                     message "&6&lCave Created! Do /cave home To go to The Cave!"
    18.                     execute console command "lp user %player% parent set realdefault"
    19.                 else:
    20.                     message "&6&lYou already Have a Cave! Do /cave home To go There!"
    21.             if arg 1 is "home":
    22.                 if player has the permission "cave.create":
    23.                     message "&l&6You don't Own a Cave, Please do /cave create To Get A Cave!"
    24.                 if player has the permission "cave.home":
    25.                     execute console command "/mvtp %player% %player%"
    26.                     execute console comand "/mv load %player%"
    27.                     teleport player to location(104, 241, -89, world("%player%"))
    28.             if arg 1 is "join":
    29.                 if player has permission "cave.gui":
    30.                     if arg 2 is offline player:
    31.                     else:
    32.                         message "&6&lYou must put in a player name To ask to join!"
    33.  
    34. on join:
    35.     execute console command "/mv load %player%"
    36.  
    37. on quit:
    38.     console command "/mv unload %player%"
    39.  
    40. on death:
    41.     wait 3 ticks
    42.     teleport player to location(104, 241, -89, world("%player%"))


    For the join segment, I've managed to get that much done and I'm at a loss of what to do now. I would really love some help but its fine if no one is able to do anything!

    Edited it to make the code more readable
     
    #1 EpicLucas100, Jun 6, 2020
    Last edited: Jun 7, 2020
  2. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
  3. EpicLucas100

    EpicLucas100 Member

    Joined:
    Jun 6, 2020
    Messages:
    10
    Likes Received:
    0
  4. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
    No, you didn't, you've set into quotes, you need to insert into the ''</> code'' format that I show u before
     
  5. EpicLucas100

    EpicLucas100 Member

    Joined:
    Jun 6, 2020
    Messages:
    10
    Likes Received:
    0
    Ok, I Re Fixed it So its code, Hope it helps now!
    --- Double Post Merged, Jun 7, 2020, Original Post Date: Jun 7, 2020 ---
    Yes i know what you mean and i will switch to that to counteract user name changes, but i still have no idea how to get other people to join that world, I made it where yes it does copy the world but i dont know how to make it so other people can join it
     
  6. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Dude wtf, clean your code too much hardcoding, try to use effects implemented in skript!!
    --- Double Post Merged, Jun 7, 2020, Original Post Date: Jun 7, 2020 ---
    Btw, that will make it really ez for u and also don't use variables of skript use configs (Eg. "data\%player's uuid%.yml)
    --- Double Post Merged, Jun 7, 2020 ---
    To store members and other things
     
  7. EpicLucas100

    EpicLucas100 Member

    Joined:
    Jun 6, 2020
    Messages:
    10
    Likes Received:
    0
    Can you give me a website to that? I havent found any website saying things about the variables, either that or im just blind
     
  8. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Ok, its late for me, tomorrow i'll try to code you that ok??
    --- Double Post Merged, Jun 7, 2020, Original Post Date: Jun 7, 2020 ---
    BUT, keep coding you might find the solution
     
  9. EpicLucas100

    EpicLucas100 Member

    Joined:
    Jun 6, 2020
    Messages:
    10
    Likes Received:
    0
    If you can I'd be extremly grateful, Take your time its no rush, I never even expected an answer on my post this fast, Thanks!

    I will keep trying!
     
  10. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    I released a recourse when it gets aproveal go download it and use it, requires skript-mirror
     
  11. EpicLucas100

    EpicLucas100 Member

    Joined:
    Jun 6, 2020
    Messages:
    10
    Likes Received:
    0
    Thanks so Much! I tried to figure out how to do it, but what i was trying to do i couldn't figure it out. I really thank you so much!
     
  12. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Code (Skript):
    1. import:
    2.     org.bukkit.Bukkit
    3.     org.apache.commons.io.FileUtils
    4.     java.io.File
    5.     org.bukkit.WorldCreator
    6. effect clone world %string% and name it %string%:
    7.     trigger:
    8.         set {_f} to Bukkit.getWorld(expr-1)
    9.         if {_f} is set:
    10.             send "§aThe world: %{_f}% is unloading!" to console
    11.             Bukkit.getServer().unloadWorld({_f},true)
    12.             set {_world} to new File("%Bukkit.getWorldContainer().getCanonicalPath()%/%{_f}.getName()%")
    13.             FileUtils.copyDirectory({_world},new File("%Bukkit.getWorldContainer().getCanonicalPath()%/%expr-2%"))
    14.             set {_uid} to new File("%Bukkit.getWorldContainer().getCanonicalPath()%/%expr-2%/uid.dat")
    15.             if {_uid}.exists():
    16.                 {_uid}.delete()
    17.             Bukkit.createWorld(new WorldCreator(expr-2))
    18.            
    19.         else:
    20.             send "§cThat world doesn't exist!" to console
    21.  
    --- Double Post Merged, Jun 9, 2020, Original Post Date: Jun 9, 2020 ---
    Requires skript-mirror
     
Thread Status:
Not open for further replies.

Share This Page

Loading...