Skript

Forum > Help

GUI Commands Not Working?

  • 7 posts
    #1 May 16, 2014 at 09:31 UTC - 0 likes

    What happens is I click the item and it basically doesn't work. It shows up on the console as "Unknown command. Type "help" for help."

    Code:

    on rightclick holding a chest:
    		show "s;1;i;Stick;n;<light green>Mage's Staff!;l;<RED>Blast them away!;c;/g1 t;s;2;i;Blaze Rod;n;<white>Lightning Rod!;l;<cyan>The mighty Thor.;c;/g2" with 1 rows named "<light green>Gadgets!" to PLAYER
    
    		
    
    on rightclick holding a stick:
    		make the player shoot a fireball at speed 5
    		
    command /g1:
    	trigger:
    	         give a stick named "<Yellow>Mage's Staff!" to the player
    				
    on rightclick holding a blaze rod:
    		strike lightning effect at the player
    		
    command /g2:
    	trigger:
    	         give a blaze rod named "<CYAN>Lightning Rod!" to the player
    
    #2 May 16, 2014 at 10:09 UTC - 0 likes

    @Triple3r: Go

    When a player clicks, the command will be executed by console and not by player ;)

    Skript Fest

    #3 May 16, 2014 at 17:08 UTC - 0 likes

    @Triple3r: Go

    Take the slash away, if you have a slash there the console tries to run "g2"

    MostFunGuy:

    Owner of the Off The Grid Network - MCOTG.COM

    #4 May 18, 2014 at 10:32 UTC - 0 likes

    Is there a way to make the player run the command and not the console?

    #5 May 18, 2014 at 10:34 UTC - 0 likes

    @Triple3r: Go

    on rightclick:

    make player execute "suicide"

    EDIT: Sorry, forgot which thread I was in. No, there is no way to directly do it, but there are workarounds, like having a console command that forces the player to run a command and such

    Last edited May 18, 2014 by MostFunGuy
    #6 May 18, 2014 at 10:58 UTC - 0 likes

    Oh I see, could you explain further on to this? If it's not too much trouble.

    #7 May 18, 2014 at 16:39 UTC - 1 like

    @Triple3r: Go

    It runs a console command of your choice, so you have it run a console command that makes the player run something

    on rightclick with stick:
      wait 2 ticks
      show "s;1;i;fire;n;Click here to suicide!;l;Nooooo!;c;sudo %player% suicide" with 1 row named "DONT DO IT D:" to the player
    
    command sudo <player> <text>:
        trigger:
            make player argument execute "%text argment%"
    
    command suicide:
       trigger:
          kill player
    
  • 7 posts

You must login to post a comment. Don't have an account? Register to get one!