Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- bindable : sword or a bow or a pickaxe or a shovel or a hoe or an axe or shears #list of all items that can be bound, seperated by "or a/an"
- binds : 5 #number of items that can be bound at once
- soulbind : &3[&cSoulbind&3]
- command /soulbound: #print all bound items and their slots
- trigger:
- loop {sb.%player%::*}:
- send "%loop-value% - %loop-index%"
- loop {sbA.%player%::*}:
- send "%loop-value% - %loop-index%"
- command /soulsummon: #add all bound items to inventory
- permission: kukky.perm
- aliases: /ss
- trigger:
- loop {sb.%player%::*}:
- add loop-value to the player's inventory
- command /clear:
- permission: kukky.perm
- trigger:
- loop {sb.%player%::*}:
- remove loop-value from {sb.%player%::*}
- loop {sbA.%player%::*}:
- remove loop-value from {sbA.%player%::*}
- send "Reset soulbinds"
- #
- # DEBUG BITS ^^^^^
- #
- # IMPORTANT BITS vvvvv
- #
- on death: #make it so players dont drop their bound stuff
- set {soulDied.%player%} to true
- delete {sb2.%player%::*}
- loop {sb.%player%::*}:
- loop the drops:
- if loop-value-1 == loop-value-2:
- remove loop-value-1 from the drops
- add loop-value-1 to {sb2.%player%::*}
- loop {sbA.%player%::*}:
- loop the drops:
- if loop-value-1 == loop-value-2:
- remove loop-value-1 from the drops
- add loop-value-1 to {sb2.%player%::*}
- on respawn: #make it so players respawn with their bound stuff
- {soulDied.%player%} is true
- loop {sb2.%player%::*}:
- add loop-value to the player's inventory
- message "{@soulbind} &cYour soulbound items magically appear.."
- delete {sb2.%player%::*}
- set {soulDied.%player%} to false
- command /soulbind <text>: #allow players to bind tools to named slots
- description: Soulbind gear to stop it from dropping on death
- executable by: players
- aliases: /sb
- trigger:
- if arg 1 is "help":
- send "{@soulbind} &cSoulbind Help" to player
- send "" to player
- send "{@soulbind} &c/soulbind help - Shows a list of Commands" to player
- send "{@soulbind} &c/soulbind list - Shows lists of Binds" to player
- send "{@soulbind} &c/soulbind armor - Soulbinds your Armor" to player
- send "{@soulbind} &c/soulbind [name of soulbind] - Soulbinds an item in your hand" to player
- send "{@soulbind} &c/unbind armor - Unbinds all armor" to player
- send "{@soulbind} &c/unbind all - Unbinds all items" to player
- send "{@soulbind} &c/unbind [name of soulbind] - Unbinds the specified item" to player
- stop
- else if arg 1 is "list":
- loop {sb.%player%::*}:
- send "{@soulbind} &a%loop-value% - %loop-index%"
- loop {sbA.%player%::*}:
- send "{@soulbind} &a%loop-value% - %loop-index%"
- stop
- else if arg 1 is "armor":
- send "Armors bound"
- set {sbA.%player%::helm} to helmet of player
- set {sbA.%player%::chestplate} to chestplate of player
- set {sbA.%player%::legs} to legs of player
- set {sbA.%player%::boots} to boots of player
- loop {sbA.%player%::*}:
- if loop-value is air:
- remove loop-value from {sbA.%player%::*}
- else:
- send "{@soulbind} &aBound %loop-value% - %loop-index%!" to the player
- stop
- else:
- if the held item is a {@bindable}:
- reset {sbFail.%player%}
- set {sb.%player%::%arg 1%} to the held item
- loop {sb.%player%::*}:
- if {_n} is not set:
- set {_n} to 0
- add 1 to {_n}
- if {_n} is greater than {@binds}:
- subtract 1 from {_n}
- if {_n} is greater than {@binds}:
- send "{@soulbind} &cYou have an unnatural amount of Soulbound items! All items have been unbound."
- set {sbFail.%player%} to true
- loop {sb.%player%::*}:
- remove loop-value-2 from {sb.%player%::*}
- exit the loop
- send "{@soulbind} &cYou have reached the Soulbind Limit!"
- set {sbFail.%player%} to true
- remove the held item from {sb.%player%::*}
- exit the loop
- if {sbFail.%player%} is true:
- reset {sbFail.%player%} # Add cool effects on failure here
- else:
- send "{@soulbind} &a%held item% &7has been successfully bound to you!" # Add cool effects on success here
- else:
- send "{@soulbind} &cThat item cannot be bound."
- #
- # /soulbind TODO: add cost?
- #
- command /unbind <text>: #unbinds the specified slot. TODO: say if that slot wasnt bound in the first place?
- trigger:
- if arg 1 is "armor":
- loop {sbA.%player%::*}:
- remove loop-value from {sbA.%player%::*}
- send "{@soulbind} &aUnbound Armor!"
- stop
- else if arg 1 is "all":
- reset {sb.%player%}
- send "{@soulbind} &aUnbound all items!"
- send "{@soulbind} &aUnbound %{sb.%player%::%arg 1%}%!"
- remove {sb.%player%::%arg 1%} from {sb.%player%::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement