Jump to content

Pryzmm

Moderator
  • Posts

    1,924
  • Joined

  • Last visited

  • Days Won

    33

Posts posted by Pryzmm

  1. On 11/8/2020 at 8:28 PM, guyofallguys123 said:

    I'm creating a command that is the setblock command but doesn't send anything to the other players, hence shsetblock. But the problem is I don't know how to set an argument in a custom command to block, because I can't find a list of arguments anywhere, and if I load the skript, it tells me I need an argument that indicates blocks. Here's the code for context:

    
    
    
    on chat:
    	if player has permission "owner":
    		set chat format to "&r&4[&r&0&kh&r&4] &r&6&n&l[player] &r&4[&r&0&kh&r&4]&r&b: &r&9[message]"
    	else:
    		set chat format to "&7[player]&7: &8[message]"
    
    command shgive <item> <player=%player%> [<integer=1>]:
    	aliases: /shitem, /shi
    	permission: "owner"
    	trigger:
    		if arg-2 is online:
    			if arg-3 < 1:
    				send "Cannot give less than one item." to the player
    				exit
    			else:
    				give arg-2 arg-3 of arg-1
    		else:
    			send "That player is offline." to the player
    			exit
    			
    command shsetblock <text> <text> <integer> <integer> <integer> [<world=%world%>]:
    	usage: "<world/self> <blockdata> <Coords>"
    	permission: "Owner"
    	trigger:
    		if arg-1 = "world":
    			set {_xpos} to arg-3
    			set {_ypos} to arg-4
    			set {_zpos} to arg-5
    		else if arg-1 = "self":
    			set {x.cord} to player's x-coordinate
    			set {y.cord} to player's y-coordinate
    			set {z.cord} to player's z-coordinate
    			set {_xpos} to arg-3 + {x.cord}
    			set {_ypos} to arg-4 + {y.cord}
    			set {_zpos} to arg-5 + {z.cord}
    		else:
    			send "Please use world for world coordinates, or self for , for arguement one." to player
    			exit
    		set block at location at {_xpos}, {_ypos}, {_zpos} in arg-6 to arg-2

    So what argument could I use for blocks on arg-2? And could you point me to a list of arguments for future reference?

    i am 99.95% sure it's because you did "owner", not owner. you don't usually use quotaions in usage, permission, permission message, or pretty much anything before the trigger:

    EDIT: also noticed one of your permissions for owner are capitalized. don't know if its case sensitive or not, just wanted to point that out.

  2. 15 hours ago, saint_spicy_pavlov said:

    can someone please send a script that allows tnt duping

    command /dupe:
    	trigger:
    		if player's held item is tnt:
    			set {_item} to player's tool
    			give {_item} to player
    			stop
    		else:
    			send "&c&lError: &4You can only dupe TNT!" to player

    This skript only allows players to dupe TNT

  3. Im making a skript to help ppl who dont know how to skript. I wanted to add changeable colors.

    Spoiler

    command /skhelpcolor:
        trigger:
            if {orange} is true:
                set {orange} to false
                set {gray} to true
                set {color1} to "<light gray>"
                set {color2} to "<dark gray>"
                send "%{color1}%Skript color has been set to %{color2}%Gray! (you may need to reload the skript)" to player
            else if {gray} is true:
                set {gray} to false
                set {purple} to true
                set {color1} to "<purple>"
                set {color2} to "<magenta>"
                send "%{color1}%Skript color has been set to %{color2}%Purple! (you may need to reload the skript)" to player
            else if {purple} is true:
                set {purple} to false
                set {green} to true
                set {color1} to "<green>"
                set {color2} to "<lime>"
                send "%{color1}%Skript color has been set to %{color2}%Green! (you may need to reload the skript)" to player
            else if {green} is true:
                set {green} to false
                set {red} to true
                set {color1} to "<red>"
                set {color2} to "<light red>"
                send "%{color1}%Skript color has been set to %{color2}%Red! (you may need to reload the skript)" to player
            else if {red} is true:
                set {red} to false
                set {orange} to true
                set {color1} to "<orange>"
                set {color2} to "<yellow>"
                send "%{color1}%Skript color has been set to %{color2}%Orange! (you may need to reload the skript)" to player

    whenever i do a command like this one below:

    Spoiler

    command /test:
        trigger:
            send "%{color1}%Why Color %{color2}% no work" to player

    i've noticed colors only work on broadcast "message" and not on send "message" to player

     

  4. example code:

    command /example <text>:
    	trigger:
    		if arg-1 is set to "test1":
      			send "test1" to player
      		if arg-1 is set to "test2":
      			send "test2" to player
      		if arg-1 is set to "test3":
      			send "test3" to player
      
      # How would i search for these arguments?
      # Like minecraft's search for commands command... thingy

    read last 2 lines

  5. 5 hours ago, Annoying_Brother said:
    
    variables:
    	{money} = 0
    
    command /balance:
    	aliases: /bal
    	trigger:
    		send "&aYou have %{money}% &ain your bank!"
    command /pay <player> <integer>:
    	trigger:
    		if {money} >= arg-integer:
    			subtract arg-integer from {uuid::%player%::money}
    			add arg-integer to  {uuid::%arg-player%::money}
    		else:
    			send "You don't have enough money!" to player
    every 1 second:
    	loop all players:
    		add 1 to {{uuid::%loop-player%}::money}

    This doesn't work at all as all the money is the same as 1 person and it doesn't give any money at all! Please help. Thank you!

    you are setting your {money} variable as the whole server. you would need to change it to a player variable. for example, {money.%player%}. This is also used as attacker and victim for damage and death events, like so. {money.%victim%} and {money.%attacker%} Another reminder, when variables are going in text like in line 7, you need to put percent signs before and after the variable, like this. %{money.%player%}%

  6. 1 hour ago, MagicMan49 said:

    I think I know why it is not working. You forgot to put percent signs around the variables in the command.

    Here is what it should look like:

    
    make console execute command "worldborder center %{x}% %{z}%"

     

    I've tried this already, but it still dosen't work.

  7. i'm making a gamemode where the world border moves with the pig. Yeah, that's it.
    Here is the skript:
     

    function spawnmob(loc: location, entity: entity type):
    	spawn {_entity} at {_loc}
    
    on death:
    	if victim is pig:
    		if victim's name is "World Border":
    			cancel event
    
    command /pig:
    	trigger:
    		spawnmob(location of player, pig)	
    		set name of last spawned entity to "World Border"
    		set {_entity} to last spawned entity
    
    every 0.1 seconds in world "world":
    	set {_x} to x-position of {_entity}
    	set {_z} to z-position of {_entity}
    	make console execute command "worldborder center {_x} {_z}"

    I don't get any errors at all, but the border does not move at all. I know this because i set the border to 50 or smth

×
×
  • Create New...