#Help

1 messages · Page 1 of 1 (latest)

frail zealot
crystal vapor
#

well first u define a command
then u add a cooldown but u need to store the cooldown with skripts cooldown store
and then give the player the item

timber folio
#

Will this work?
Command /daily:
Cooldown: 84000
Cooldown message: &4Just wait &c%time% &4You butt head -_-"
Trigger:
Send "&aYou just claimed your daily reward!"
Execute console command "/give %player% Minecraft:diamond 2"

#

@crystal vapor

crystal vapor
#

!format

dapper beaconBOT
# crystal vapor !format

:technologist: Code Blocks

To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:

```
Code here
```

cinder cape
#

^, and indentation

timber folio
#

So \``
Command /daily:
Cooldown: 84000 seconds
Cooldown message: &4Just wait &c%time% &4You butt head -_-"
Trigger:
Send "&aYou just claimed your daily reward!"
Give player 2 diamons `

cinder cape
#

Cooldown is a timespan not an integer

#

And seconds or min etc

timber folio
#

84000 secs = 1 day

cinder cape
#

Then put 84000 seconds or 1 day

#

Or 1/7 weeks

#

And done execute console commands for give. Skript has an effect for that

timber folio
#

Command /daily: Cooldown: 84000 seconds Cooldown message: &4Just wait &c%time% &4You butt head -_-" Trigger: Send "&aYou just claimed your daily reward!" Give player 2 diamonds

#

This?

#

@cinder cape

cinder cape
cinder cape
cinder cape
#

and thats not how indentation works

pliant quartz
#

everytime you end a line with :, you need to add a length of indentation before the next line.
so like,

command /test:
  cooldown: 1 day
  trigger:
    do stuff
    do more stuff
    if (thing):
      this code happens if the if works
    this code isnt part of the if as it isnt in the block of indentation
#

note: one length of indentation is either a tab or a fix amount of spaces

#

you can use tabs for simplicity

timber folio
#
Cooldown: 84000 seconds
Cooldown message: &4Just wait
&c%time% &4You butt head -_-"
Permission: daily.daily
Permission node: &cYou do not have permission !"
  Trigger:
 Send: "&aYou just claimed your daily reward!"
Give player 2 diamonds ```
#

Will this work ?

safe crater
#

Cool down bad for command when you have such a long cool down

untold fog
wet elbow
#

!intendation

#

oh god they removed it

#

If you end a line with : add one tab infront of the next line; for example:

  trigger:
    send "e"```
#

please use tabs instead of spaces

timber folio
#
Cooldown: 24 hours
Cooldown message: &4Just wait
&c%time% &4You butt head -_-"
Permission: daily.daily
Permission node: &cYou do not have permission !"
  Trigger:
 Send "&aYou just claimed your daily reward!"
Give player 2 diamonds ``` ?
wet elbow
#
  permission: this.is.a.permission
  permission message: "no"
  trigger:
    send "e"
    send "e - the return"```

Every `:` opens a new 'section'. All lines in these 'sections' need to have the same amount of tabs. Just remove one tab to leave one section
#

Again: Please use tabs and not spaces

frail zealot
dapper beaconBOT
# frail zealot !indent

In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually it’s recommended you use tabs, however.

A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:

With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:

https://i.imgur.com/PbfZ12M.png

wet elbow
#

this explains it way better than i ever could

pliant quartz
#

ah, I think you're aware

wet elbow
#

i mean, the noun is 'intendation' right?

pliant quartz
#

indentation

#

!indentation

wet elbow
#

oh huh

#

english is not my first language

pliant quartz
#

google seems to confirm for me

#

also I mean, it does say !indent

crystal vapor
cinder cape
#

Iirc %remaining time% is a thing for command cooldowns

fervent pine
dapper beaconBOT
# fervent pine !indent

In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually it’s recommended you use tabs, however.

A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:

With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:

https://i.imgur.com/PbfZ12M.png

fervent pine
#

You used wrong command!

wet elbow
#

bruh

#

someone alr told me

cinder cape
fervent pine
wet elbow
#

:3

silver fog
#

^,hy^,