TuSKe Addon

  • Welcome to skUnity!

    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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Mayor0701

Member
Oct 20, 2018
13
2
0
19
code_language.skript:
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
Hi guys!


Can someone help me? I want to try the tuSke GUI manager, but when I reload the script it is written: https://imgur.com/a/3H4Z1lH
Plugins: TuSKe (1.8.2) Skript (2.1.2)
 
Thanks!
He does not write a bug. But do you know why this does not work? When I enter the menu, the menu will appear, but when I click on the stone nothing happens.
code_language.skript:
command /menü:
    trigger:
        openMenu(player, "page 1")

function openMenu(p: Player, type: String):
    if {_type} is "page 1":
        open virtual chest inventory with size 1 named "Page 1" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 2" to run function openMeny({_p}, "page 2")
    else if {_type} is "page 2":
        open virtual chest inventory with size 1 named "Page 2" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 3" to run function openMeny({_p}, "page 3")
   #And so on until ends of page...
    else if {_type} is "page 3":
        open virtual chest inventory with size 1 named "Page 3" to {_p}
        make a gui slot 0 of {_p} with stone named "Go back to page 1" to run function openMeny({_p}, "page 1")
 
Thanks!
He does not write a bug. But do you know why this does not work? When I enter the menu, the menu will appear, but when I click on the stone nothing happens.
code_language.skript:
command /menü:
    trigger:
        openMenu(player, "page 1")

function openMenu(p: Player, type: String):
    if {_type} is "page 1":
        open virtual chest inventory with size 1 named "Page 1" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 2" to run function openMeny({_p}, "page 2")
    else if {_type} is "page 2":
        open virtual chest inventory with size 1 named "Page 2" to {_p}
        make a gui slot 0 of {_p} with stone named "Go to page 3" to run function openMeny({_p}, "page 3")
   #And so on until ends of page...
    else if {_type} is "page 3":
        open virtual chest inventory with size 1 named "Page 3" to {_p}
        make a gui slot 0 of {_p} with stone named "Go back to page 1" to run function openMeny({_p}, "page 1")
"openMeny"? I think that's a mistake, change it to openMenu
 
  • Like
Reactions: Mayor0701
Status
Not open for further replies.