function changeName(p: Player, clicktype: String):
set {_number} to name of slot 4 of {_p}'s current inventory parsed as number #Requires SkQuery or Bensku's fork
if {_clicktype} is "left":
remove 1 from {_number}
else if {_clicktype} is "shift left":
remove 100 from {_number}
else if {_clicktype} is "right":
add 1 to {_number}
else if {_clicktype} is "shift right":
add 100 to {_number}
set name of slot 4 of {_p}'s current inventory to "%{_number}%"
command /multiactionExample:
trigger:
open virtual dispenser inventory named "Multi-action example" to player
set {_item} to diamond named "1"
set line 1 of lore of {_item} to "&7Left click: remove 1"
set line 2 of lore of {_item} to "&7Shift left click: remove 100"
set line 3 of lore of {_item} to "&7Right click: add 1"
set line 4 of lore of {_item} to "&7Shift right click: add 100"
format gui slot 4 of player with {_item} to run function changeName(player, "left") with "left" click
format gui slot 4 of player with {_item} to run function changeName(player, "shift left") with "shift left" click
format gui slot 4 of player with {_item} to run function changeName(player, "right") with "right" click
format gui slot 4 of player with {_item} to run function changeName(player, "shift right") with "shift right" click
Çok Teşekkürler gerçekten işime yaradı sağolKod:function changeName(p: Player, clicktype: String): set {_number} to name of slot 4 of {_p}'s current inventory parsed as number #Requires SkQuery or Bensku's fork if {_clicktype} is "left": remove 1 from {_number} else if {_clicktype} is "shift left": remove 100 from {_number} else if {_clicktype} is "right": add 1 to {_number} else if {_clicktype} is "shift right": add 100 to {_number} set name of slot 4 of {_p}'s current inventory to "%{_number}%" command /multiactionExample: trigger: open virtual dispenser inventory named "Multi-action example" to player set {_item} to diamond named "1" set line 1 of lore of {_item} to "&7Left click: remove 1" set line 2 of lore of {_item} to "&7Shift left click: remove 100" set line 3 of lore of {_item} to "&7Right click: add 1" set line 4 of lore of {_item} to "&7Shift right click: add 100" format gui slot 4 of player with {_item} to run function changeName(player, "left") with "left" click format gui slot 4 of player with {_item} to run function changeName(player, "shift left") with "shift left" click format gui slot 4 of player with {_item} to run function changeName(player, "right") with "right" click format gui slot 4 of player with {_item} to run function changeName(player, "shift right") with "shift right" click
Alıntıdır. Buradan yola çıkarak halledebilirsin.