pls help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

crasher12345

Member
May 16, 2022
2
0
1
23
Hi guys, I was trying to make a jabkachest event.
When a player registers a command / jabkachest (random numbers from 0-9), he is teleported to a certain point.
I get the error "Current node: set {spawn.jabkachest} to true (nexus chest.sk , line 20)"
Do I need any special addon for this?
Here is the script, please help me:

options:
prefix: &a&lJabkaLand &8»
min-players: 3
delay: 5400
chars: 5
broadcast-pending: &e&lБыл активирован /jabkachest %{word}%!
warm-seconds: 60
broadcast-none: &a&lJabkaLand &8» &e&ljabkachest был завершен.

# -----------------------------------------------------------------= [ Code ] =-------------------------------------------------------------

on join:
add 1 to {jabkachest.players::*}

on quit:
reduce {jabkachest.players::*} by 1

every {@delay} seconds:
{jabkachest.players::*} >= {@min-players}
set {spawn.jabkachest} to true
set {word} to random {@chars} char string from `0-9`
broadcast "{@prefix} {@broadcast-pending}"
set {jabkachest.active} to now
stop

on chat:
if {jabkachest.chat} is true:
if message contains "%{word}%":
teleport player to {spawn.jabkachest}
stop

every tick:
if {jabkachest.active} is set:
if difference between {jabkachest.active} and now is greater than {@warm-seconds} seconds:
set {spawn.jabkachest} to false
delete {jabkachest.active}
broadcast "{@prefix} {@broadcast-none}"
stop

command /set [<text>]:
permission: *
permission message: &c&lУ вас не достаточно прав
trigger:
if arg-1 is "jabkachest":
set {spawn.jabkachest} to location of player
send "&aСундук JabkaChest успешно установлен"
 
Last edited:
Can you please use the code block by clicking the + sign and selecting Code on it?
Code:
options:
    prefix: &a&lJabkaLand &8»
    min-players: 3
    delay: 5400
    chars: 5
    broadcast-pending: &e&lБыл активирован /jabkachest %{word}%!
    warm-seconds: 60
    broadcast-none: &a&lJabkaLand &8» &e&ljabkachest был завершен.

# -----------------------------------------------------------------= [ Code ] =---------------------------------------------------------------------------------

on join:
    add 1 to {jabkachest.players::*}
  
on quit:
    reduce {jabkachest.players::*} by 1

every {@delay} seconds:
    {jabkachest.players::*} >= {@min-players}
    set {spawn.jabkachest} to true
    set {word} to random {@chars} char string from `0-9`
    broadcast "{@prefix} {@broadcast-pending}"
    set {jabkachest.active} to now
    stop
  
on chat:
    if {jabkachest.chat} is true:
        if message contains "%{word}%":   
            teleport player to {spawn.jabkachest}
    stop
every tick:
    if {jabkachest.active} is set:
        if difference between {jabkachest.active} and now is greater than {@warm-seconds} seconds:
            set {spawn.jabkachest} to false
            delete {jabkachest.active}
            broadcast "{@prefix} {@broadcast-none}"
    stop

command /set [<text>]:
    permission: *
    permission message: &c&lУ вас не достаточно прав
    trigger:
        if arg-1 is "jabkachest":
            set {spawn.jabkachest} to location of player
            send "&aСундук JabkaChest успешно установлен"
 
Status
Not open for further replies.