Jump to content
Pepe_Sad_Frog

I need help with a grant skript.

Recommended Posts

  Hello

I want to ask for help for a grant skript I am making.

 

 

command /grant <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    open chest with 3 rows named "&c&l             Grant         " to player
    format slot 12 of player with paper named "&3&lRanks" to close then run [execute console command "/rank %arg-1%"]
    format slot 14 of player with paper named "&b&lPermissions" to close then run [execute console command "/permissions %arg-1%"]


 

command /rank <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    send "aaa" to player
    wait 1 second
    open chest with 6 rows named "&c&l             Ranks         " to player
    format slot 13 of player with golden apple named "&4&lOwner" to close then run [execute console command "/manuadd %arg 1% Owner"]
    format slot 20 of player with nether star named "&c&lAdmin" to close then run [execute console command "/manuadd %arg 1% Admin"]
    format slot 24 of player with redstone named "&4&lDeveloper" to close then run [execute console command "/manuadd %arg 1% Developer

 

It has no errors but it doesnt show the second menu when I click "Ranks"

Do I need to skript more for it or install an addon ;;-;;

 

Thanks for having the time reading this

Share this post


Link to post
Share on other sites

I would personally use TuSKe GUIs instead because skQuery GUIs (the addon that you are using) isn't very efficient nor reliable. 

To fix your problem with your Skript, try adding ticks to your first menu, it may do the trick, also do the same with your second menu. Here is an example:
 

command /grant <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    wait 2 ticks
    open chest with 3 rows named "&c&l             Grant         " to player
    wait 3 ticks
    format slot 12 of player with paper named "&3&lRanks" to close then run [execute console command "/rank %arg-1%"]
    format slot 14 of player with paper named "&b&lPermissions" to close then run [execute console command "/permissions %arg-1%"]
    
command /rank <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    wait 2 ticks
    open chest with 6 rows named "&c&l             Ranks         " to player
    wait 3 ticks
    format slot 13 of player with golden apple named "&4&lOwner" to close then run [execute console command "/manuadd %arg 1% Owner"]
    format slot 20 of player with nether star named "&c&lAdmin" to close then run [execute console command "/manuadd %arg 1% Admin"]
    format slot 24 of player with redstone named "&4&lDeveloper" to close then run [execute console command "/manuadd %arg 1% Developer

^ This is the method I used when I made GUIs with skQuery.

Additionally, I wouldn't recommend using commands to open other GUIs, yes it may do the trick, but it's not a very good way of scripting. Instead, use Functions. Here is an example with TuSKe GUIs. 
 

command /grant <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    open virtual chest inventory with size 6 named "&c&l             Grant         " to player
    format gui slot 12 of player with paper named "&3&lRanks" to run:
        openRanksGUI(player, arg 1)
    format gui slot 14 of player with paper named "&b&lPermissions" to run:
        openPermissionsGUI(player, arg 1)
        
function openRanksGUI(p: player, arg: player):
    open virtual chest inventory with size 6 named "&c&l             Ranks         " to {_p}
    format gui slot 13 of {_p} with golden apple named "&4&lOwner" to close then execute console command "/manuadd %{_arg}% Owner"
    format gui slot 20 of {_p} with nether star named "&c&lAdmin" to close then execute console command "/manuadd %{_arg}% Admin"
    format gui slot 24 of {_p} with redstone named "&4&lDeveloper" to close then execute console command "/manuadd %{_arg}% Developer"
    
function openPermissionsGUI(p: player, arg: player):
    # follow the same steps as above
    
    

If you would like further guidance on using TuSKe for GUIs then I would hugely recommend this tutorial by Trent and Michael

 

  • Thanks 1

Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Share this post


Link to post
Share on other sites
1 hour ago, Koroonotchii said:

I would personally use TuSKe GUIs instead because skQuery GUIs (the addon that you are using) isn't very efficient nor reliable. 

To fix your problem with your Skript, try adding ticks to your first menu, it may do the trick, also do the same with your second menu. Here is an example:
 


command /grant <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    wait 2 ticks
    open chest with 3 rows named "&c&l             Grant         " to player
    wait 3 ticks
    format slot 12 of player with paper named "&3&lRanks" to close then run [execute console command "/rank %arg-1%"]
    format slot 14 of player with paper named "&b&lPermissions" to close then run [execute console command "/permissions %arg-1%"]
    
command /rank <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    wait 2 ticks
    open chest with 6 rows named "&c&l             Ranks         " to player
    wait 3 ticks
    format slot 13 of player with golden apple named "&4&lOwner" to close then run [execute console command "/manuadd %arg 1% Owner"]
    format slot 20 of player with nether star named "&c&lAdmin" to close then run [execute console command "/manuadd %arg 1% Admin"]
    format slot 24 of player with redstone named "&4&lDeveloper" to close then run [execute console command "/manuadd %arg 1% Developer

^ This is the method I used when I made GUIs with skQuery.

Additionally, I wouldn't recommend using commands to open other GUIs, yes it may do the trick, but it's not a very good way of scripting. Instead, use Functions. Here is an example with TuSKe GUIs. 
 


command /grant <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    open virtual chest inventory with size 6 named "&c&l             Grant         " to player
    format gui slot 12 of player with paper named "&3&lRanks" to run:
        openRanksGUI(player, arg 1)
    format gui slot 14 of player with paper named "&b&lPermissions" to run:
        openPermissionsGUI(player, arg 1)
        
function openRanksGUI(p: player, arg: player):
    open virtual chest inventory with size 6 named "&c&l             Ranks         " to {_p}
    format gui slot 13 of {_p} with golden apple named "&4&lOwner" to close then execute console command "/manuadd %{_arg}% Owner"
    format gui slot 20 of {_p} with nether star named "&c&lAdmin" to close then execute console command "/manuadd %{_arg}% Admin"
    format gui slot 24 of {_p} with redstone named "&4&lDeveloper" to close then execute console command "/manuadd %{_arg}% Developer"
    
function openPermissionsGUI(p: player, arg: player):
    # follow the same steps as above
    
    

If you would like further guidance on using TuSKe for GUIs then I would hugely recommend this tutorial by Trent and Michael

 

Omg thank you so much I'll try that with Tuske you are the best ❤️

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, Koroonotchii said:

I would personally use TuSKe GUIs instead because skQuery GUIs (the addon that you are using) isn't very efficient nor reliable. 

To fix your problem with your Skript, try adding ticks to your first menu, it may do the trick, also do the same with your second menu. Here is an example:
 


command /grant <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    wait 2 ticks
    open chest with 3 rows named "&c&l             Grant         " to player
    wait 3 ticks
    format slot 12 of player with paper named "&3&lRanks" to close then run [execute console command "/rank %arg-1%"]
    format slot 14 of player with paper named "&b&lPermissions" to close then run [execute console command "/permissions %arg-1%"]
    
command /rank <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    wait 2 ticks
    open chest with 6 rows named "&c&l             Ranks         " to player
    wait 3 ticks
    format slot 13 of player with golden apple named "&4&lOwner" to close then run [execute console command "/manuadd %arg 1% Owner"]
    format slot 20 of player with nether star named "&c&lAdmin" to close then run [execute console command "/manuadd %arg 1% Admin"]
    format slot 24 of player with redstone named "&4&lDeveloper" to close then run [execute console command "/manuadd %arg 1% Developer

^ This is the method I used when I made GUIs with skQuery.

Additionally, I wouldn't recommend using commands to open other GUIs, yes it may do the trick, but it's not a very good way of scripting. Instead, use Functions. Here is an example with TuSKe GUIs. 
 


command /grant <player>:
  permission: grant.*
  permission message: "&cNo perms"
  trigger:
    open virtual chest inventory with size 6 named "&c&l             Grant         " to player
    format gui slot 12 of player with paper named "&3&lRanks" to run:
        openRanksGUI(player, arg 1)
    format gui slot 14 of player with paper named "&b&lPermissions" to run:
        openPermissionsGUI(player, arg 1)
        
function openRanksGUI(p: player, arg: player):
    open virtual chest inventory with size 6 named "&c&l             Ranks         " to {_p}
    format gui slot 13 of {_p} with golden apple named "&4&lOwner" to close then execute console command "/manuadd %{_arg}% Owner"
    format gui slot 20 of {_p} with nether star named "&c&lAdmin" to close then execute console command "/manuadd %{_arg}% Admin"
    format gui slot 24 of {_p} with redstone named "&4&lDeveloper" to close then execute console command "/manuadd %{_arg}% Developer"
    
function openPermissionsGUI(p: player, arg: player):
    # follow the same steps as above
    
    

If you would like further guidance on using TuSKe for GUIs then I would hugely recommend this tutorial by Trent and Michael

 

oh btw the commands are not working do you know why?

Share this post


Link to post
Share on other sites
26 minutes ago, Pepe_Sad_Frog said:

oh btw the commands are not working do you know why?

Are you testing the commands on an offline player?


Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Share this post


Link to post
Share on other sites
2 minutes ago, Pepe_Sad_Frog said:

Nope I test them on myself. Is it bcs I dont use essentials?

 

Uhhh I would try that, if that doesn't work then let me know


Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Share this post


Link to post
Share on other sites
1 minute ago, Koroonotchii said:

Uhhh I would try that, if that doesn't work then let me know

Okay I will test somethings too. Btw with skquery the commands were working but I had not tuske shoulld I have both and see?

 

Share this post


Link to post
Share on other sites
10 minutes ago, Pepe_Sad_Frog said:

Okay I will test somethings too. Btw with skquery the commands were working but I had not tuske shoulld I have both and see?

 

Sure, if you think that will fix the problem


Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Share this post


Link to post
Share on other sites
1 hour ago, Pepe_Sad_Frog said:

It didnt lul

 

Oof

Wait what's not working? The query GUI or the TuSKe GUI?


Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Share this post


Link to post
Share on other sites
47 minutes ago, Pepe_Sad_Frog said:

I don't really know. The skript has no errors but the commands don't work ;o

Did you put the TuSKe Skript in without deleting the skQuery skript? Because that may be the problem


Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Share this post


Link to post
Share on other sites
10 hours ago, Koroonotchii said:

Did you put the TuSKe Skript in without deleting the skQuery skript? Because that may be the problem

First I did it without SkQuery addon. After I did it with it nothing worked. I have something on my mind im going to test and I'll tell you if my problem gets solved.

 

Thank you for having the time and try to help me 😄

 

 

Edited by Pepe_Sad_Frog

Share this post


Link to post
Share on other sites
10 hours ago, Koroonotchii said:

Did you put the TuSKe Skript in without deleting the skQuery skript? Because that may be the problem

Nvm didn't work. I guess I will try something else with the grant skript but tysm for having the time :,)

 

Edited by Pepe_Sad_Frog

Share this post


Link to post
Share on other sites
Just now, Pepe_Sad_Frog said:

Nvm didn't work. I

Are there any errors when reloading the Script? If there aren't, then delete all of the Scripts for this and just have one of your choice, the skQuery one or the TuSKe one. If that doesn't work then unfortunately I am not too sure.


Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Share this post


Link to post
Share on other sites
Just now, Koroonotchii said:

Are there any errors when reloading the Script? If there aren't, then delete all of the Scripts for this and just have one of your choice, the skQuery one or the TuSKe one. If that doesn't work then unfortunately I am not too sure.

oh ya you are right I'll see if it will work with skQuery thank you again. It has no errors btw

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



×
×
  • Create New...