Jump to content

I need help with my skript code


kevindejonge2

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 

 

Edited by kevindejonge2
Link to comment
Share on other sites

16 minutes ago, kevindejonge2 said:

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 

 

I can do this! Give me 10 minutes

 

  • Thanks 1
Link to comment
Share on other sites

24 minutes ago, kevindejonge2 said:

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 

 

command /dailyreward:
    trigger:
        set {_dr} to difference between {dr.use.%player's uuid%} and now
        if {_dr} is less than 86400 seconds:
            send "&7&l[&e&lDELAY&7&l] &cYou have already claimed this reward! please wait &7'&3%difference between {_dr} and 86400 seconds%&7'&c before using this command again."
            stop
        else:
            set {dr.use.%player's uuid%} to now
            give diamond to player
            send "Enjoy!" to player
             send "you already claimed your daily reward"


command /resetdailyreward:
  permission: op
  permission message: &6No permission for that!
    trigger:
      clear {dr.use.%player's uuid%}
      send "daily rewards can be used again!" to player 
#Here!

  • Thanks 1
Link to comment
Share on other sites

you can also just use a command with a cooldown

 

EX

command /daily:
	cooldown: 1 minute #Change time
	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

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

44 minutes ago, BOXEY said:

you can also just use a command with a cooldown

 

EX

command /daily:
	cooldown: 1 minute #Change time
	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

 

Oh I didn't know I could do that, thanks! 😊

  • Like 2
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...