Jump to content

Need help with prison mine (like resetting etc)


TheMemester111

Recommended Posts

the plugin will be so much better and will have little lag 

but here is sum i made in like 10 min leme know if it works (i didn't test it)

options:
    p: server &8| &7
    perm: mine.admin
    permmsg: &cYou cant do that!

    block: stone



command setMine [<text>] [<int>]:
	permission: {@perm}
	permission message: {@permmsg}
	trigger:
		if arg-1 is set:
			if arg-2 is 1:
				set {%arg-1%pos1} to location of player's target block
				send "{@p}%{%arg-1%pos1}%"
			if arg-2 is 2:
				set {%arg-1%pos2} to location of player's target block
				send "{@p}%{%arg-1%pos2}%"
            if arg-2 is not 1 or 2:
                send "{@p}Please say 1 or 2"
		else:
			send "{@p}Please say A Name for the mine"
			
			
command ResetMine [<text>]:
	permission: {@perm}
	permission message: {@permmsg}
	trigger:
		if {%arg-1%pos1} and {%arg-1%pos2} are set:
			send "{@p}Repairing monuments..."
			set {_loc1x} to floor(x-coordinate of {%arg-1%pos1})
			set {_loc1y} to floor(y-coordinate of {%arg-1%pos1})
			set {_loc1z} to floor(z-coordinate of {%arg-1%pos1})
			set {_loc1} to "%{_loc1x}% %{_loc1y}% %{_loc1z}%"
			set {_loc2x} to floor(x-coordinate of {%arg-1%pos2})
			set {_loc2y} to floor(y-coordinate of {%arg-1%pos2})
			set {_loc2z} to floor(z-coordinate of {%arg-1%pos2})
			set {_loc2} to "%{_loc2x}% %{_loc2y}% %{_loc2z}%"
            execute console command "/fill %{_loc1}% %{_loc2}% {@block}"

 

Edited by BOXEY
stuff
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
×
×
  • Create New...