Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
command /stack [<text>]:
permission: system.stack
permission message: &7[&eSkyBlock&7] &cDu hast keine Rechte dazu.
trigger:
send "&7[&eSkyBlock&7] &7Deine Items wurden gestackt!"
stack items of player's inventory
options:
prefix: &7[&eSkyblock&7]
command stack [<text>]:
permission: system.stack
permission message: &7[&eSkyBlock&7] &cDu hast keine Rechte dazu.
trigger:
if arg 1 is set:
set {_item} to arg 1 parsed as item
set {_slot} to 0
loop 36 times:
if slot {_slot} of player is {_item}:
set {SB.Main::%player%} to {_slot}
stop loop
add 1 to {_slot}
set {_slotv2} to {SB.Main::%player%}
loop 36 times:
if {SB.Main::%player%} is set:
if slot {_slotv2} of player is {_item}:
set {_THERE::%{_slotv2}%::NUMBER} to {_slotv2}
set {_THERE::%{_slotv2}%} to slot {_THERE::%{_slotv2}%::NUMBER} of player
set slot {_THERE::%{_slotv2}%::NUMBER} of player to air
give player {_THERE::%{_slotv2}%}
else:
send "{@prefix} Item Not found, Make sure that you've typed the name correctly or You don't have it"
stop trigger
add 1 to {_slotv2}
send "{@prefix} Successfully Stacked Your Items!"
clear {SB.Main::%player%}
else:
send "{@prefix} Select an item"
options:
prefix: &7[&eSkyblock&7]
command stack [<text>]:
permission: system.stack
permission message: &7[&eSkyBlock&7] &cDu hast keine Rechte dazu.
trigger:
if arg 1 is set:
if arg 1 is not "all":
set {_item} to arg 1 parsed as item
set {_slot} to 0
loop 36 times:
if slot {_slot} of player is {_item}:
set {SB.Main::%player%} to {_slot}
stop loop
add 1 to {_slot}
set {_slotv2} to {SB.Main::%player%}
loop 36 times:
if {SB.Main::%player%} is set:
if slot {_slotv2} of player is {_item}:
set {_THERE::%{_slotv2}%::NUMBER} to {_slotv2}
set {_THERE::%{_slotv2}%} to slot {_THERE::%{_slotv2}%::NUMBER} of player
set slot {_THERE::%{_slotv2}%::NUMBER} of player to air
give player {_THERE::%{_slotv2}%}
else:
send "{@prefix} Item Not found, Make sure that you've typed the name correctly or You don't have it"
stop trigger
add 1 to {_slotv2}
send "{@prefix} Successfully Stacked: &e%{_item}%&7!"
clear {SB.Main::%player%}
else:
set {_slot} to 0
loop 36 times:
if slot {_slot} of player is not air:
set {_slotN::%{_slot}%} to {_slot}
loop {_slotN::*}:
if slot {_slotN::%loop-value-2%} of player is slot {_slot} of player:
set {_slotM::%loop-value-2%} to {_slot}
loop 36 times:
set {_SLOTTOGIVE} to slot {_slotM::%loop-value-2%} of player
set slot {_slotM::%loop-value-2%} of player to air
give player {_SLOTTOGIVE}
add 1 to {_slot}
send "{@prefix} Successfully Stacked Your Items!"
else:
send "{@prefix} Select an item or type ""all"""