Sueta

SkEdit

1.0

Its like worldedit. but complitely in skript

·Plugin

SkEdit.jpg Donate

What is SkEdit?
SkEdit is a API that allows you to mainly fill and paste in structures. it is not created to copy Worledit, nor to compete with it. The fill and pasting is based on a delay system, its standart set to (Fill: 20000 blocks per tick, and copy: 1000 blocks per tick).

Know: this was made on Dev36 and might not work on newer/older versions, its known to not work propperly on 2.3.6


Commands:



    • /ske (ske.admin)
    • /skedit (ske.admin)


Features:



    • [✓] Copy and paste system
    • [✓] Fill system
    • [✓] Schematic system
    • [✓] Skript only (no other addons required)
    • [✓] Small command system [/ske]
    • [✓] Gui System
    • [✓] Api
    • [✓] Improve the return so its more usefull
    • [✓] use block id and skript alias for block fill
    • [✓] Semi async block placing and copying

API:

Usage: set {_R} to Ske("Function", {_Objects})
    Note:
        This function is NOT for beginners, it has complex code that can be hard to use. you might need to look into SkEdit on how to use a function propperly.

    Example: (command: /ske fill)

        # Defining the objects
        add skePos(1, player) to {_Obj::*}
        add skePos(2, player) to {_Obj::*}
        add arg 2 to {_Obj::*}
        set {_R} to ske("Fill", {_Obj::*}) # Executing the function with a triggered smart object

        # Checking if there is a problem with the objects, if there is. it will return a string, else a integer that is the "SkID"
        if {_R} parsed as a integer is a integer:

            set {_B::*} to skIDGetstate({_R} parsed as a integer) # To get the current SkID return variables
            message "&8[&4SkEdit&8] &fFilling blocks..."
            message "&8[&4SkEdit&8] &fTotal blocks: &c%{_B::2}%"
            message "&8[&4SkEdit&8] &fEstimated time: &c%(Rounded ({_B::2}/{ske::speed::paste::Blocks}*{ske::speed::paste::MaxDelay}*100))/30% seconds"

            #Starting the loop, and checking if its done
            set {_Now} to now
            while {_B::1} = false:
                wait skeDelay("paste") #To delay so it matches the delay of the (in this case, paste) max delay
                if difference between now and {_Now} is more than 1 second:
                    message "&8[&4SkEdit&8] &fProgress: &c%{_B::2}% &fBPC, &c%{_B::3}%&f Cycles, &c%{_B::4}% &fBlocks left"
                    set {_Now} to now
                set {_B::*} to skIDGetstate({_R} parsed as a integer) #Again, to get the curren SkID variable

            # when its done
            message "&8[&4SkEdit&8] &fSuccesfully pasted &c%{_B::2}% &fBlocks, in &c%{_B::3}% &fCycles"
            message "&8[&4SkEdit&8] &fTotal time: &c%{_B::4}%"

        #Something went wrong.
        else:
            message "&8[&4SkEdit&8] &fFailed pasting due to: &c%{_R}%"
Functions

To use with the "SKE" function, please note the name of the function, (PlayerCopy, SaveSchem, Fill, etc). also, not all the functions are supportet! only the block copy and paste ones!

[/B][/B]
[B][B]    GiveWand:
       Syntax:    skeGivewand(player)
        Example: skeGivewand(player)
        Notes:
            Gives the SkEdit wand

    GetPosition:
        Syntax: skePos(position, player)
        Example: set {_Pos} skePos(1, player)
        Returns:
            - postion x of player's selection
            - Nothing, invalid position
        Notes:
            Gives the first or second position, can only be 1 and 2

    PlayerCopy:
        Syntax: skePCopy(Location 1, Location 2, player)
        Example: set {_R} to skePCopy(skePos(1, player), skePos(2, player), player)
        Returns:
            - Nothing (Everything went well)
            - Location x not set
            - Player not found
            - Different worlds of positions
        Notes:
            Copies block, its slower than pasting or filling

    PlayerPaste:
        Syntax: skePPaste(player)
        Example: set {_R} to skePPaste(player)
        Returns:
            - Nothing (Everything went well)
            - Clipboard empty
            - Player not found
        Notes:
            Pasts the clipboard of the player

    PlayerSaveSchem:
        Syntax: skePSaveSchem(location 1, location 2, "new Schematic", player)
        Example: set {_R} to skePSaveSchem(skePos(1, player), skePos(2, player), arg 3, player)
        Returns:
            - Nothing (Everything went well)
            - Location x not set
            - Different worlds of positions
            - Schematic already exists
            - Player isnt online
        Notes:
            Saves a schematic relative to the player

    PlayerLoadSchem:
        Syntax: skePLoadSchem("Schematic", player)
        Example: set {_R} to skePLoadSchem(arg 3, player)
        Returns:
            - Schematic does not exist
            - Nothing (Everything went well)
        Notes:
            Loads the schematic to the player's clipboard


Global:
    Fill:
        Syntax:    skeFill(Location 1, Location 2, Blocks)
        Example: set {_R} to skeFill(skePos(1, player), skePos(2, player), "Sand||stone||dirt")
        Returns:
            - Nothing (Everything went well)
            - Location x not set
            - World are different
        Notes:
            - Doesnt check if the block is valid or not
            - There can be multiple blocks, seperatet at "||" example: "Red wool||White wool||Orange wool"

    SaveSchem:
        Syntax: skeSaveSchem(Location 1, Location 2, "new schematic")
        Example: set {_R} to skeSaveSchem({_Loc1}, {_Loc2}, "Tower_Tier_1")
        Returns:
            - Nothing (Everything went well)
            - Position x not set
            - Different worlds
            - Schematic already exist
        Notes:
            Saves the schematic relative to location 1

    PasteSchem:
        Syntax: skeSchemPaste(Center location, world, "schematic")
        Example: set {_R} to skeSchemPaste(location of player, world of player, arg 3)
        Returns:
            - Nothing (Everything went well)
            - Center not set
            - Schematic doesnt exists
            - World does not exist
        Notes:
            Pastes from where the schematic has been created

    ShowSchems:
        Syntax: skeShowSchems()
        Example: set {_list::*} to skeShowSchems()
        Returns:
            - List of all schems
            - No schematic set (No schematics exist)

    DeleteSchem:
        Syntax: skeDeleteSchem("schematic")
        Example: set {_R} to skeDeleteSchem("Lol")
        Returns:
            - Nothing (All went succesful)
            - Invalid schematic (Schematic doesnt exist)

    Random:
        Syntax: Random(Min, Max{, Times}) #in {} is unnceseary and defaulted to 5
        Example: set {_RandomVariable} to Random(5, 100)
        Returns:
            - Number


Addons:
- SkQuery-lime 3.6.4
- Skellett
- SkRayFall (for sound)

Need help or found a bug? Join the discord! dont leave in the revieuw. https://discord.gg/cNcxs7n

Similar projects

Plugin →