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.

Farid's snippets [All my previous skript]

Discussion in 'Snippets' started by Farid, Sep 16, 2017.

  1. Farid

    Farid Active Member

    Feb 5, 2017
    Likes Received:
    I had a lot more files but lost them, here are all my previous work.

    Hope you make a use of it, I'm moving on, skript has helped me think like a computer and now it's time to go full advance.

    the zip includes 14 different skripts,

    guilds, magic, misc, core, levels and much more.
    --- Double Post Merged, Sep 8, 2019, Original Post Date: Sep 16, 2017 ---

    [1.14.4] (9/8/19)

    Requires skript-mirror (Latest version), SavageFactions (Could work with any factions plugins)

    Place savagefactions.jar inside /plugins/skript-mirror/ so you can import external .jars

    Code (Text):
    1. import:
    2.     com.massivecraft.factions.FLocation as FLocation
    3.     com.massivecraft.factions.Board as Board
    5. function getFactionAt(p: player) :: text:
    6.     set {_loc} to new FLocation({_p})
    7.     set {_facID} to Board.getInstance().getFactionAt({_loc}).getTag()
    8.     return (uncolored {_facID})
    Code (Text):
    1. Usage: set {_test} to getFactionAt(player)
    Returns wilderness, safezone, warzone or another faction's tag (name of the faction).

    You can use this compare if a land at player is claimed, etc.
    --- Double Post Merged, Sep 17, 2019 ---
    delayTeleport(player, 5, {loc})
    Would check if player has moved in the last 5 seconds or so.
    Requires skDragon for particles.

    Code (Text):
    1. function delayTeleport(p: player, duration: integer, destination: location):
    2.     # constructor
    3.     send "&6Teleport commencing. &cDo not move." to {_p}
    4.     set {_s} to 0
    5.     set {_true} to true # do not change this at all.
    6.     drawWarpRings style 1, particle "redstone", RGB 255, 255, 255, center location of {_p}, id "%{_p}%", rainbowMode true, scan true, height 2, radius 0.5, ringCount 40, ringDensity 20, visibleRange 32          
    7.     # player's absolute location. OG position
    8.     set {_x} to x-coordinate of {_p}
    9.     set {_y} to y-coordinate of {_p}
    10.     set {_z} to z-coordinate of {_p}
    11.     #
    12.     while {_true} = true:
    13.         wait 1 second
    14.         if "%x-coordinate of {_p}%" = "%{_x}%":
    15.             if "%y-coordinate of {_p}%" = "%{_y}%":
    16.                 if "%z-coordinate of {_p}%" = "%{_z}%":
    17.                     add 1 to {_s}
    18.                     if {_s} >= 5:
    19.                         delete {_true}
    20.                         stopEffect id "%{_p}%"
    21.                         teleport {_p} to {_destination}
    22.                         send "&6Teleport complete. &aYou may move now." to {_p}
    23.                 else:
    24.                     delete {_true}
    25.                     stopEffect id "%{_p}%"
    26.                     send "&6Teleportation &ccancelled" to {_p}
    27.             else:
    28.                 delete {_true}
    29.                 stopEffect id "%{_p}%"
    30.                 send "&6Teleportation &ccancelled" to {_p}
    31.         else:
    32.             delete {_true}
    33.             stopEffect id "%{_p}%"
    34.             send "&6Teleportation &ccancelled" to {_p}

    Attached Files:

    • sk.zip
      File size:
      20.4 KB
    #1 Farid, Sep 17, 2019
    Last edited: Sep 17, 2019
    CustomWorldYT likes this.

Share This Page