Jump to content

I need help with my skript code


Firoj1

Recommended Posts

I made this Skript for a daily reward but it doesn't work anyone know how I can fix it?

 

command /dailyreward
trigger:

if {dr::} does not contain player:
      add player to {dr::}
      give diamond to player
      send "Enjoy!" to player
    else
      send "you already claimed your daily reward"


command /resetdailyreward:
  permission: op
  permission message: &6No permission for that!
    trigger:
      set {dr::} to 0
      send "daily rewards can be used again!" to player 


every 86400 seconds
  trigger:
    set {dr::} to 0 

https://showbox.tools/

Link to comment
Share on other sites

i would just use a command with a cooldown (ill put an example). but if you dont want to do that just get rid of the trigger in the "every 86400 seconds" part.

I would also recommend just deleting the the "{dr::*} var

Update for your code

command dailyreward:
	trigger:
		if {dr::*} does not contain player:
			add player to {dr::*}
			give diamond to player
			send "Enjoy!" to player
		else:
			send "you already claimed your daily reward"


command resetdailyreward:
	permission: op
	permission message: &6No permission for that!
	trigger:
		delete {dr::*}
		send "daily rewards can be used again!" to player 


every 86400 seconds:
	delete {dr::*}

 

example of cooldown on other page


 

When to a new page for read ability

anyway, here is a command with cooldown

command daily:
	cooldown: 1 day
	cooldown message: You need to wait &l%remaining time% &rto use this command again!
	cooldown bypass: daily.nocooldown	
	trigger:
		give diamond to player
		send "Enjoy!" to player
		play sound "entity.experience_orb.pickup" with volume 0.5 to the player

 

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...