Jump to content

Need help scripting!


EtienneK91

Recommended Posts

Hi!! 

I just started a minehut server today and know nothing about scripting.. Is there anybody that could help me with this:

I would like to have a command /warps or /warplist so it shows all the warps I've set. Is this possible?

Also, how do I add all the possible commands to another list so my equally noob friends know what they can do?

Thanks!!!!

Edited by EtienneK91
I didn't know if it was obvious to people going through topic titles
Link to comment
Share on other sites

  • EtienneK91 changed the title to Need help scripting!
options:
	nopermission: &cInsufficient permission.
	line: &8&m---&r
	
command /setwarp [<text>]:
	permission: command.setwarp
	permission message: {@nopermission}
	trigger:
		if arg 1 is not set:
			message "{@line} &6SetWarp {@line}"
			message "&6/setwarp &7<warp>"
		if arg 1 is set:
			if {serverinfo::warps::*} contains "%arg 1%":
				message "&6Warps &8» &7That warp already exists"
				stop
			add "%arg 1%" to {serverinfo::warps::*}
			set {serverinfo::warplocations::%arg 1%} to location of player
			message "&6Warps &8» &7You added warp &6%arg 1% &7with location &7&o%location of player%"
	
command /delwarp [<text>]:
	permission: command.delwarp
	permission message: {@nopermission}
	trigger:
		if arg 1 is not set:
			message "{@line} &6DelWarp {@line}"
			message "&6/delwarp &7<warp>"
		if arg 1 is set:
			if {serverinfo::warps::*} does not contain "%arg 1%":
				message "&6Warps &8» &7That warp does not exist"
				stop
			remove "%arg 1%" from {serverinfo::warps::*}
			delete {serverinfo::warplocations::%arg 1%}
			message "&6Warps &8» &7You deleted warp &6%arg 1%"
	
command /warp [<text>]:
	trigger:
		if arg 1 is not set:
			message "{@line} &6Warps {@line}"
			if {serverinfo::warps::*} is not set:
				message "&6Warps &8» &7There are not warps yet"
				stop
			loop {serverinfo::warps::*}:
				message "&7&l• &e%loop-value%"
		if arg 1 is set:
			if {serverinfo::warps::*} does not contain "%arg 1%":
				message "&6Warps &8» &7That warp does not exist"
				stop
			teleport player to {serverinfo::warplocations::%arg 1%}
			message "&6Warps &8» &7Warping to &6%arg 1%"

 

  • Like 1

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

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...