Skript help

Status
This thread has been locked.

Mayion

Feedback score
0
Posts
29
Reactions
7
Resources
0
I was wondering, does Skript support a "storage" string function, like arrayList in Java perhaps?
I just got into Skript. Say for example, Player A killed Player B > If it has been a day or more since last time A killed B > execute command.
Would appreciate any help, thanks.
 

Chearful

thomas.gg
Supreme
Feedback score
115
Posts
1,400
Reactions
2,236
Resources
1
You could use
Code:
Every 5 seconds

and then compare the variables.
 

Dovahkiin

Premium
Feedback score
0
Posts
52
Reactions
21
Resources
0
Code:
on death of a player:  
    add 1 to {_kills}
    set {executed::%{_kills} + 1%} to now
  
  
every 1 second:
    set {_time} to difference between {executed::*} and now      
    if {_time} is more than 1 day:          
        do your thing
 

Chearful

thomas.gg
Supreme
Feedback score
115
Posts
1,400
Reactions
2,236
Resources
1
Code:
on death of a player: 
    add 1 to {_kills}
    set {executed::%{_kills} + 1%} to now
 
 
every 1 second:
    set {_time} to difference between {executed::*} and now     
    if {_time} is more than 1 day:         
        do your thing
No need to do it every single second. Set it to every couple of mins
 
Status
This thread has been locked.
Top