Jump to content

Mine system skript


HeavyGames
 Share

Recommended Posts


    prefix : &f[&5&lMine&f]
    #Permissons
    mine-permission-message : &cYou don't have enough permission!
    mine-set-permission : op
    mine-delete-permission : op
    mine-name-permission : op
    mine-names-permission : op
    mine-clearnames-permission : op
    mine-addblock-permission : op
    mine-blocks-permission : op
    mine-removeblock-permission : op
    mine-timer-permission : op    
on script load:
    set {minecore.timer} to 0

command /mine:clearnames:
    permission : {@mine-clearnames-permission}
    permission message : {@mine-permission-message}
    trigger:
        clear {minecore.names::*}
        send "{@prefix} &aNames successfully cleared!" to player

command /mine:set :
    permission : {@mine-set-permission}
    permission message : {@mine-permission-message}
    trigger:
        set slot 0 of player to glowing stick named "&4Set Position 1"
        set slot 1 of player to glowing stick named "&4Set Position 2"
        set slot 2 of player  to glowing feather named "&aConfirm Locations"

command /mine:name <text>:
    permission : {@mine-name-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore.location1.%uuid of player%} is not set:
            send "{@prefix} &4Position 1 is not set!" to player
            stop
        if {minecore.location2.%uuid of player%} is not set:
            send "{@prefix} &4Position 2 is not set!" to player
            stop
        set {minecore::%arg-1%::position::position_1} to {minecore.location1.%uuid of player%}
        set {minecore::%arg-1%::position::position_2} to {minecore.location2.%uuid of player%}
        if {minecore.names::*} does not contain arg-1:
            add arg-1 to {minecore.names::*}
        clear {minecore.location1.%uuid of player%}
        clear {minecore.location2.%uuid of player%}
        send "{@prefix} &aMine &c%arg-1% &ahas been successfully added!" to player

command /mine:addblock <text>:
    permission : {@mine-addblock-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            add type of player's tool to {minecore::%arg-1%::panel::*}
            send "{@prefix} &aBlock &c%type of player's tool% &ahas been added to mine &c%arg-1%" to player
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player
command /mine:names:
    permission : {@mine-names-permission}
    permission message : {@mine-permission-message}
    trigger:
        loop {minecore.names::*}:
            send "&a%loop-value%" to player

command /mine:blocks <text>:
    permission : {@mine-blocks-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            loop {minecore::%arg-1%::panel::*}:
                send "&6%loop-value%" to player
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

command /mine:removeblock <text>:
    permission : {@mine-removeblock-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            if {minecore::%arg-1%::panel::*} contains type of player's tool:
                remove type of player's tool from {minecore::%arg-1%::panel::*}
                send "{@prefix} &aBlock &c%type of player's tool% &ahas been removed from mine &c%arg-1%" to player
                stop
            else:
                send "{@prefix} &aThat item is not in blocks!" to player
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

command /mine:timer <text> <integer>:
    permission : {@mine-timer-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            set {minecore::%arg-1%::timer} to arg-2
            send "{@prefix} &aTime &c%{minecore::%arg-1%::timer}%&a second(s) has been successfully added to mine &c%arg-1%&a!" to player
            stop
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

command /mine:delete <text>:
    permission : {@mine-delete-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            clear {minecore::%arg-1%::*}
            remove arg-1 from {minecore.names::*}
            send "{@prefix} &aMine &c%arg-1%&a successfully deleted!" to player 
            stop
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

every 1 second in world "world":
    set {minecore.timer} to {minecore.timer} + 1
    loop {minecore.names::*}:
        #broadcast "%mod({minecore.timer}, {minecore::%loop-value%::timer})%"
        if mod({minecore.timer}, {minecore::%loop-value%::timer}) = 0:
            loop blocks within {minecore::%loop-value%::position::position_1} to {minecore::%loop-value%::position::position_2}:
                set {_block} to random element of {minecore::%loop-value-1%::panel::*}
                set block at loop-block to {_block}
on right click:
    if player is holding glowing feather named "&aConfirm Locations":
        if {minecore.location1.%uuid of player%} is not set:
            send "{@prefix} &4Position 1 is not set!" to player
            stop
        if {minecore.location2.%uuid of player%} is not set:
            send "{@prefix} &4Position 2 is not set!" to player
            stop
        send "{@prefix} &aDo /mine:name <name> to select name for mine and add it to panel"
        stop
    else if player is holding glowing stick named "&4Set Position 1":
        set {minecore.location1.%uuid of player%} to location of target block
        send "{@prefix} &aPosition 1 successfully set to %{minecore.location1.%uuid of player%}%"
        stop
    else if player is holding glowing stick named "&4Set Position 2":
        set {minecore.location2.%uuid of player%} to location of target block
        send "{@prefix} &aPosition 2 successfully set to %{minecore.location2.%uuid of player%}%"
        stop
 

Default since 2019

Bought vip in 2021

 

Link to comment
Share on other sites

  • 2 weeks later...
On 1/30/2021 at 10:51 PM, HeavyGames said:


    prefix : &f[&5&lMine&f]
    #Permissons
    mine-permission-message : &cYou don't have enough permission!
    mine-set-permission : op
    mine-delete-permission : op
    mine-name-permission : op
    mine-names-permission : op
    mine-clearnames-permission : op
    mine-addblock-permission : op
    mine-blocks-permission : op
    mine-removeblock-permission : op
    mine-timer-permission : op    
on script load:
    set {minecore.timer} to 0

command /mine:clearnames:
    permission : {@mine-clearnames-permission}
    permission message : {@mine-permission-message}
    trigger:
        clear {minecore.names::*}
        send "{@prefix} &aNames successfully cleared!" to player

command /mine:set :
    permission : {@mine-set-permission}
    permission message : {@mine-permission-message}
    trigger:
        set slot 0 of player to glowing stick named "&4Set Position 1"
        set slot 1 of player to glowing stick named "&4Set Position 2"
        set slot 2 of player  to glowing feather named "&aConfirm Locations"

command /mine:name <text>:
    permission : {@mine-name-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore.location1.%uuid of player%} is not set:
            send "{@prefix} &4Position 1 is not set!" to player
            stop
        if {minecore.location2.%uuid of player%} is not set:
            send "{@prefix} &4Position 2 is not set!" to player
            stop
        set {minecore::%arg-1%::position::position_1} to {minecore.location1.%uuid of player%}
        set {minecore::%arg-1%::position::position_2} to {minecore.location2.%uuid of player%}
        if {minecore.names::*} does not contain arg-1:
            add arg-1 to {minecore.names::*}
        clear {minecore.location1.%uuid of player%}
        clear {minecore.location2.%uuid of player%}
        send "{@prefix} &aMine &c%arg-1% &ahas been successfully added!" to player

command /mine:addblock <text>:
    permission : {@mine-addblock-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            add type of player's tool to {minecore::%arg-1%::panel::*}
            send "{@prefix} &aBlock &c%type of player's tool% &ahas been added to mine &c%arg-1%" to player
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player
command /mine:names:
    permission : {@mine-names-permission}
    permission message : {@mine-permission-message}
    trigger:
        loop {minecore.names::*}:
            send "&a%loop-value%" to player

command /mine:blocks <text>:
    permission : {@mine-blocks-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            loop {minecore::%arg-1%::panel::*}:
                send "&6%loop-value%" to player
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

command /mine:removeblock <text>:
    permission : {@mine-removeblock-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            if {minecore::%arg-1%::panel::*} contains type of player's tool:
                remove type of player's tool from {minecore::%arg-1%::panel::*}
                send "{@prefix} &aBlock &c%type of player's tool% &ahas been removed from mine &c%arg-1%" to player
                stop
            else:
                send "{@prefix} &aThat item is not in blocks!" to player
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

command /mine:timer <text> <integer>:
    permission : {@mine-timer-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            set {minecore::%arg-1%::timer} to arg-2
            send "{@prefix} &aTime &c%{minecore::%arg-1%::timer}%&a second(s) has been successfully added to mine &c%arg-1%&a!" to player
            stop
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

command /mine:delete <text>:
    permission : {@mine-delete-permission}
    permission message : {@mine-permission-message}
    trigger:
        if {minecore::%arg-1%::*} is set:
            clear {minecore::%arg-1%::*}
            remove arg-1 from {minecore.names::*}
            send "{@prefix} &aMine &c%arg-1%&a successfully deleted!" to player 
            stop
        else:
            send "{@prefix} &aMine &c%arg-1%&a doesn't exist!" to player

every 1 second in world "world":
    set {minecore.timer} to {minecore.timer} + 1
    loop {minecore.names::*}:
        #broadcast "%mod({minecore.timer}, {minecore::%loop-value%::timer})%"
        if mod({minecore.timer}, {minecore::%loop-value%::timer}) = 0:
            loop blocks within {minecore::%loop-value%::position::position_1} to {minecore::%loop-value%::position::position_2}:
                set {_block} to random element of {minecore::%loop-value-1%::panel::*}
                set block at loop-block to {_block}
on right click:
    if player is holding glowing feather named "&aConfirm Locations":
        if {minecore.location1.%uuid of player%} is not set:
            send "{@prefix} &4Position 1 is not set!" to player
            stop
        if {minecore.location2.%uuid of player%} is not set:
            send "{@prefix} &4Position 2 is not set!" to player
            stop
        send "{@prefix} &aDo /mine:name <name> to select name for mine and add it to panel"
        stop
    else if player is holding glowing stick named "&4Set Position 1":
        set {minecore.location1.%uuid of player%} to location of target block
        send "{@prefix} &aPosition 1 successfully set to %{minecore.location1.%uuid of player%}%"
        stop
    else if player is holding glowing stick named "&4Set Position 2":
        set {minecore.location2.%uuid of player%} to location of target block
        send "{@prefix} &aPosition 2 successfully set to %{minecore.location2.%uuid of player%}%"
        stop
 

nice skript 🤣 https://forums.skunity.com/resources/mine-system.1239/

  • Sad 1

Developer

 

Joined Minecraft in 2010 on PC

Joined Minehut in August 2016

1 year Skript experience

2 months Java experience

5 months Javascript experience

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share



×
×
  • Create New...