Jump to content

Skript; Starter kit code I made... but it's broken


Dolly_Paints

Recommended Posts

This is most likely the wrong forum so please forgive me...

I created this skript and no matter what I do it gives me errors can someone please help?
okay so explanation: this script is supposed to give new players my starter kit I have tried the same thing with essentials but it didn't do anything, so I tried it with skripts. To do this I essentially just copied the way it was formatted in essentials, combined that formatting with like 3 videos I watched and ended up getting this janky code:

I should preference, 'give' could also be replaced with ' - ' and it could possibly work the same way, the errors I got didn't increase nor decrease when using either one.... 

On join:
    if {Joined} does not contain %uuid of player%:
        give shulker box to the player
        give 64 oak logs to the player
        give 64 torches to the player
        give book 1 mending:1
        add %uuid of player% to {Joined}
        set join message to "&e%player% &ris now a hobo!"
    if {Joined} contains %uuid of player%
    set join message to "welcome &a%player% &rback to the hut!"

command /resetjoins:
    permission: joins.resetjoins
    permission message: "Nice try"
    trigger:
        delete {Joined}
        send "&cDeleted Joins" to player

on leave:
    set leave message to "&a %player% &r left the hut"

 

I know the error is the conditions and 'on leave' but idk what to replace them with to make this janky code work.... any advice is much appreciated.

Link to comment
Share on other sites

Moved to Skript

Please make sure you're posting in the correct category on the forums in the future!

𝚄𝚗𝚝𝚛𝚎𝚊𝚝𝚎𝚍

𝔻𝕚𝕤𝕔𝕠𝕣𝕕: @𝕌𝕟𝕥𝕣𝕖𝕒𝕥𝕖𝕕#𝟘𝟘𝟘𝟙

News & Updates  Rules • Helper Application

Reports • Appeals

𝚂𝚝𝚊𝚏𝚏 𝚘𝚗 𝙼𝚒𝚗𝚎𝚑𝚞𝚝 𝚜𝚒𝚗𝚌𝚎 𝙹𝚞𝚗𝚎 𝟹𝟶𝚝𝚑, 𝟸𝟶𝟸𝟶

Link to comment
Share on other sites

12 hours ago, Dolly_Paints said:

This is most likely the wrong forum so please forgive me...

I created this skript and no matter what I do it gives me errors can someone please help?
okay so explanation: this script is supposed to give new players my starter kit I have tried the same thing with essentials but it didn't do anything, so I tried it with skripts. To do this I essentially just copied the way it was formatted in essentials, combined that formatting with like 3 videos I watched and ended up getting this janky code:

I should preference, 'give' could also be replaced with ' - ' and it could possibly work the same way, the errors I got didn't increase nor decrease when using either one.... 

On join:
    if {Joined} does not contain %uuid of player%:
        give shulker box to the player
        give 64 oak logs to the player
        give 64 torches to the player
        give book 1 mending:1
        add %uuid of player% to {Joined}
        set join message to "&e%player% &ris now a hobo!"
    if {Joined} contains %uuid of player%
    set join message to "welcome &a%player% &rback to the hut!"

command /resetjoins:
    permission: joins.resetjoins
    permission message: "Nice try"
    trigger:
        delete {Joined}
        send "&cDeleted Joins" to player

on leave:
    set leave message to "&a %player% &r left the hut"

 

I know the error is the conditions and 'on leave' but idk what to replace them with to make this janky code work.... any advice is much appreciated.

You could use the "On Disconnect:" event. Also i suggest using list variables, like {Joined::*} instead of {Joined}

  • Like 1

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

Here spent a bit of time on this so if you could +1 on my rep that would be great!

I made two methods on how to fix your problem.

I fixed your skript code which you could use:

on join:
    if player has played before:
        set join message to "welcome &a%player% &rback to the hut!"
    else:
        give shulker box to the player
        give 64 oak logs to the player
        give 64 torches to the player
        give enchanted book of mending to the player
        set join message to "&e%player% &ris now a hobo!"

# to reset joins just go to your world folder then delete playerdata

on quit:
    set leave message to "&a %player% &r left the hut"

Or you could use essentials to give a player a kit editing kits.yml inside Plugins > EssentialsX > kits.yml and then changing tools to the name of the kit you want to give the player when they first join.

tools.PNG

  • Like 1

Youtube: https://www.youtube.com/c/83y123

Discord: 83y#2552

IGN: 83y

 

If your seeing this I am currently banned from Posting, the Discord and GitHub

I have helped out countless player's and been re-payed with multiple bans.

staff are attention seeking and biased, i'd just leave for your sake.

your just wasting your time.

like.gif

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...