so i have this code, that manages my ranks and global variables using BungeeSK.i have a variable that stores a date as plain text. (like: 2025.08.20 11:28), i want to make my skript like get that date and compare it to whats the date now, and if its greater that that, it executes a bunch of actions. but it dosent work
please help me im using skript 2.9.3 (im using 1.18.2)
heres my skript:
command /globalrank <offlineplayer> <text> <text>:
permission: globalrank.admin
permission message: "&cNincs jogod a GlobalRank parancs használatához!"
trigger:
set {_player} to arg-1
set {_rank} to arg-2
set {_duration} to arg-3
set {_current} to now
set {_expiryTime} to now + {_duration} parsed as number * 1000 milliseconds
set {_expiryFormatted} to {_expiryTime} formatted as "yyyy. MM. dd. HH:mm"
set global variable "frostranks_player::%uuid of {_player}%" to name of {_player}
set global variable "frostranks_rank::%uuid of {_player}%" to {_rank}
set global variable "frostranks_rank::%uuid of {_player}%_duration" to {_expiryFormatted}
if {frostranks_player_list::*} is not set:
set {frostranks_player_list::*} to uuid of {_player}
else:
add uuid of {_player} to {frostranks_player_list::*}
execute console command "pr setrank %{_player}% %{_rank}%"
set {_expiryFormatted} to {_expiryTime} formatted as "yyyy. MM. dd. HH:mm"
send "&aSikeresen beállítottad %name of {_player}% rangját %{_rank}% értékre %{_duration}% másodpercig. Lejár: %{_expiryFormatted}%"
every 10 seconds:
loop {frostranks_player_list::*}:
set {_uuid} to loop-value
set {_expiry} to global variable "frostranks_rank::%{_uuid}%_duration"
send "&5Frost&dPlayer&9Check &7» &eJátékos ellenőrizve, UUID: &6%{_uuid}%" to console
set {_expiryLoop} to {_expiry} parsed as date
send "&eDEBUG: now: %now% | expiry: %{_expiryLoop}%" to console
if {_expiryLoop} is set:
if now >= {_expiryLoop}:
delete global variable "frostranks_player::{_uuid}"
delete global variable "frostranks_rank::{_uuid}"
delete global variable "frostranks_rank::{_uuid}_duration"
execute console command "pr setrank %{_uuid}% Tag"
set {_list::*} to {frostranks_player_list::*}
remove {_uuid} from {_list::*}
set {frostranks_player_list::*} to {_list::*}
command /checkrank <offlineplayer>:
permission: globalrank.check
permission message: "&cNincs jogod a rang ellenőrzéséhez!"
trigger:
set {_player} to arg-1
set {_uuid} to uuid of {_player}
set {_rank} to global variable "frostranks_rank::%{_uuid}%"
set {_expiry} to global variable "frostranks_rank::%{_uuid}%_duration"
if {_rank} is not set:
send "&c%name of {_player}% jelenleg nem rendelkezik ideiglenes ranggal."
else:
send "&e%name of {_player}% &frangja: &a%{_rank}%"
send "&fLejárat ideje: &c%{_expiry}%"
command /resetranks:
permission: globalrank.admin
permission message: "&cNincs jogod a rangok visszaállításához!"
trigger:
if {frostranks_player_list::*} is set:
loop {frostranks_player_list::*}:
set {_uuid} to loop-value
delete global variable "frostranks_player::%{_uuid}%"
delete global variable "frostranks_rank::%{_uuid}%"
delete global variable "frostranks_rank::%{_uuid}%_duration"
execute console command "pr setrank %{_uuid}% Tag"
delete {frostranks_player_list::*}
send "&aMinden ideiglenes rang visszaállítva és globális változók törölve."
else:
send "&eNincsenek ideiglenes rangok, amiket vissza lehetne állítani."
heres my skript:
command /globalrank <offlineplayer> <text> <text>:
permission: globalrank.admin
permission message: "&cNincs jogod a GlobalRank parancs használatához!"
trigger:
set {_player} to arg-1
set {_rank} to arg-2
set {_duration} to arg-3
set {_current} to now
set {_expiryTime} to now + {_duration} parsed as number * 1000 milliseconds
set {_expiryFormatted} to {_expiryTime} formatted as "yyyy. MM. dd. HH:mm"
set global variable "frostranks_player::%uuid of {_player}%" to name of {_player}
set global variable "frostranks_rank::%uuid of {_player}%" to {_rank}
set global variable "frostranks_rank::%uuid of {_player}%_duration" to {_expiryFormatted}
if {frostranks_player_list::*} is not set:
set {frostranks_player_list::*} to uuid of {_player}
else:
add uuid of {_player} to {frostranks_player_list::*}
execute console command "pr setrank %{_player}% %{_rank}%"
set {_expiryFormatted} to {_expiryTime} formatted as "yyyy. MM. dd. HH:mm"
send "&aSikeresen beállítottad %name of {_player}% rangját %{_rank}% értékre %{_duration}% másodpercig. Lejár: %{_expiryFormatted}%"
every 10 seconds:
loop {frostranks_player_list::*}:
set {_uuid} to loop-value
set {_expiry} to global variable "frostranks_rank::%{_uuid}%_duration"
send "&5Frost&dPlayer&9Check &7» &eJátékos ellenőrizve, UUID: &6%{_uuid}%" to console
set {_expiryLoop} to {_expiry} parsed as date
send "&eDEBUG: now: %now% | expiry: %{_expiryLoop}%" to console
if {_expiryLoop} is set:
if now >= {_expiryLoop}:
delete global variable "frostranks_player::{_uuid}"
delete global variable "frostranks_rank::{_uuid}"
delete global variable "frostranks_rank::{_uuid}_duration"
execute console command "pr setrank %{_uuid}% Tag"
set {_list::*} to {frostranks_player_list::*}
remove {_uuid} from {_list::*}
set {frostranks_player_list::*} to {_list::*}
command /checkrank <offlineplayer>:
permission: globalrank.check
permission message: "&cNincs jogod a rang ellenőrzéséhez!"
trigger:
set {_player} to arg-1
set {_uuid} to uuid of {_player}
set {_rank} to global variable "frostranks_rank::%{_uuid}%"
set {_expiry} to global variable "frostranks_rank::%{_uuid}%_duration"
if {_rank} is not set:
send "&c%name of {_player}% jelenleg nem rendelkezik ideiglenes ranggal."
else:
send "&e%name of {_player}% &frangja: &a%{_rank}%"
send "&fLejárat ideje: &c%{_expiry}%"
command /resetranks:
permission: globalrank.admin
permission message: "&cNincs jogod a rangok visszaállításához!"
trigger:
if {frostranks_player_list::*} is set:
loop {frostranks_player_list::*}:
set {_uuid} to loop-value
delete global variable "frostranks_player::%{_uuid}%"
delete global variable "frostranks_rank::%{_uuid}%"
delete global variable "frostranks_rank::%{_uuid}%_duration"
execute console command "pr setrank %{_uuid}% Tag"
delete {frostranks_player_list::*}
send "&aMinden ideiglenes rang visszaállítva és globális változók törölve."
else:
send "&eNincsenek ideiglenes rangok, amiket vissza lehetne állítani."