Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # MFG's Skript to make breakable sign homes
- #
- #
- on sign edit:
- first line is "[HOME]"
- second line is "":
- set line 1 to "CANCELLED"
- set line 2 to "MAKE SURE TO"
- set line 3 to "ADD A HOME-NAME"
- set line 4 to "ON LINE 2"
- stop
- if {homes.%player%::*} is more than 0:
- message "<yellow>You alrady have a home, you are only authorized <gold>ONE <yellow>home!" to player
- set line 1 to "CANCELLED"
- set line 2 to "YOU CAN ONLY"
- set line 3 to "HAVE ONE"
- set line 4 to "HOME!!!!"
- stop
- if player has permission "homes.count.3":
- if {homes.%player%::*} is more than 2:
- message "<yellow>You alrady have <gold>three <yellow>homes, you are only authorized <gold>THREE <yellow>homes!" to player
- set line 1 to "CANCELLED"
- set line 2 to "YOU CAN ONLY"
- set line 3 to "HAVE THREE"
- set line 4 to "HOMES!!!!"
- stop
- if {homes.%player%::%line 2%} is set:
- message "HEY! Remember each home of your's has to have a unique name!" to player
- set line 1 to "CANCELLED"
- set line 2 to "YOU HOME NAMES"
- set line 3 to "HAVE TO BE"
- set line 4 to "UNIQUE"
- stop
- # Rest of the code, the checks are done!
- set {homes.%player%::%line 2%} to true
- set {homes.location.%player%::%line 2%} to the block's location
- set {homes.name.%player%::%line 2%} to line 2
- command /homes:
- trigger:
- size of {homes.%player%::*} is 0:
- message "<yellow>You have no homes set! Set them with a sign... First line ""<gold>[HOME]<yellow>"" and second line must be the name of a home" to player
- stop
- message "<yellow>Homes you currently have saved:"
- loop {homes.%player%::*}:
- message "<yellow>Home <gold>%loop-num%<yellow>: %loop-value%"
- command /home <text>:
- trigger:
- if arg 1 is "list":
- size of {homes.%player%::*} is 0:
- message "<yellow>You have no homes set! Set them with a sign... First line ""<gold>[HOME]<yellow>"" and second line must be the name of a home" to player
- stop
- make player execute command "/homes"
- stop
- if arg 1 is "delete" or "remove" or "del":
- size of {homes.%player%::*} is 0:
- message "<yellow>You have no homes set! Set them with a sign... First line ""<gold>[HOME]<yellow>"" and second line must be the name of a home" to player
- stop
- if {homes.%player%::%arg 1%} is set:
- message "<gold>[HOMES]<yellow> The home ""<gold>%{homes.name.%player%::%arg 1%}%<yellow>"" was removed" to player
- clear {homes.%player%::%arg 1%}
- clear {homes.name.%player%::%arg 1%}
- clear {homes.location.%player%::%arg 1%}
Advertisement
Add Comment
Please, Sign In to add comment