Jump to content

I need help with my /give skript


Ramina__

Recommended Posts

I don't know why this isn't working please help me:

 

on skript load:
    add all items to {BLOCKS::*}
on skript unload:
    delete {BLOCKS::*}
command /give [<player>] [<item>] [<number>]:
    permission: OP
    trigger:
        if arg-1 is player:
            loop {BLOCKS::*}:
                if arg-2 contains loop-value:
                    if arg-3 is higher than 64:
                        send "&4&lVelvetSurv>> &cYou can only give yourself 64 of this item or lower" to player
                    else:
                        set {_blocc} to arg-2
                        set {_nombre} to arg-3
                        give arg-1 {_nombre} of {_blocc}
                        
                    

Link to comment
Share on other sites

Try this.

command /give [<player>] [<item>] [<number>]:
	trigger:
		if arg-3 is higher than 64:
			send "&4&lVelvetSurv>> &cYou cannot give yourself more then 64 of an item!" to player
		else:
			give arg-3 of arg-2 to arg-1
			send "&2&lVelvetSurv>> &aYou have given yourself &a%arg-3% &a%arg-2% &ato &a%arg-1%&a!" to player

 

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

On 9/29/2021 at 7:45 PM, Lapzzo said:

Try this.

command /give [<player>] [<item>] [<number>]:
	trigger:
		if arg-3 is higher than 64:
			send "&4&lVelvetSurv>> &cYou cannot give yourself more then 64 of an item!" to player
		else:
			give arg-3 of arg-2 to arg-1
			send "&2&lVelvetSurv>> &aYou have given yourself &a%arg-3% &a%arg-2% &ato &a%arg-1%&a!" to player

 

Thanks it works! Can you maybe help me with this too? it wont work:

command /hug <player>:
  trigger:
    set {_p} to player
    if player is not set:
      set {_p} to CONSOLE 
    if arg-1 is not set:
      send "&cSpecify someone to hug!"
    else:
      if arg-1 is player:
        send "&c&lYou cannot hug yourself!"
      else:
        send "&7You hug &b%arg-1% &7With &dLove &cAww ❤." to player
        send "&b%{_p}% &7Hugs you with &dLove &cAww ❤." to arg-1
function Heart(t: text) :: text:
    if {_t} contains ":<3:":
        replace "<3" with "&c❤&r"
    return {_t}
 

Link to comment
Share on other sites

command /hug <player>:
	trigger:
		if arg-1 is not set:
			send "&cYou cannot hug air silly!" to player
		else:
			if arg-1 is %player%:
				send "&cYou must be lonely if your hugging yourself!" to player
			else:
				send "&7You hug &b%arg-1% &7With &dLove &cAww ❤." to player
				send "&b%{_p}% &7Hugs you with &dLove &cAww ❤." to arg-1

on chat:
	replace all "<3" with "&c❤&r"

Sorry if this doesnt work, I cant test it because file manager is down

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

11 hours ago, Lapzzo said:
command /hug <player>:
	trigger:
		if arg-1 is not set:
			send "&cYou cannot hug air silly!" to player
		else:
			if arg-1 is %player%:
				send "&cYou must be lonely if your hugging yourself!" to player
			else:
				send "&7You hug &b%arg-1% &7With &dLove &cAww ❤." to player
				send "&b%{_p}% &7Hugs you with &dLove &cAww ❤." to arg-1

on chat:
	replace all "<3" with "&c❤&r"

Sorry if this doesn't work, I cant test it because file manager is down

Doesn't work sorry..

Edited by nolando09
Link to comment
Share on other sites

File manager is back, and I found the errors! Heres a fixed one

command /hug <player>:
	trigger:
		if arg-1 is not set:
			send "&cYou cannot hug air silly!" to player
		else:
			if arg-1 is player:
				send "&cYou must be lonely if your hugging yourself!" to player
			else:
				send "&7You hug &b%arg-1% &7With &dLove &cAww ❤." to player
				send "&b%{_p}% &7Hugs you with &dLove &cAww ❤." to arg-1

on chat:
	if message contains "<3":
		replace all "<3" with "&c❤&r" in message

 

Edited by Lapzzo

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...