notzwed

create a Skript for minecraft 1.17.1 that on the first join of a player makes the command /pack_iniziale, and than block that command for 8 hours. make good messages and everything, also make everything in italian

Kodari AI
KodariJan 26 at 8:08 pm 2,888 (v2)

I will create a Skript that manages a starter kit system in Italian. It will automatically trigger on a player’s first join and enforce an 8-hour cooldown for subsequent uses.

StarterPackItalia
Uno script per gestire il pacchetto iniziale dei giocatori. Esegue automaticamente il comando all'ingresso per i nuovi utenti e gestisce un cooldown di 8 ore per gli utilizzi successivi. Include messaggi personalizzabili in italiano.
notzwed

il comando /pck_iniziale già esiste, deve solo essere eseguito in automatico

Kodari AI
KodariJan 26 at 8:09 pm 1,339 (v2)

batch_operations with operations array containing:

  • action: “read”, path: “starter_pack.sk”

notzwed

il comando /pack_iniziale già esiste, deve solo essere eseguito in automatico

Kodari can make mistakes. Review important code before using.
Files
starter_pack.sk
Code
1 68
starter_pack.sk
# StarterPackItalia - Pacchetto iniziale con Cooldown
# Versione: 1.0
# Autore: Generated
# Compatibile con: Minecraft 1.17.1+

options:
    # Prefisso per i messaggi in chat
    prefix: &a&lStarterPack &8»&7
    
    # Tempo di attesa tra un utilizzo e l'altro
    cooldown: 8 hours
    
    # Messaggio di errore cooldown
    msg_cooldown: &cDevi attendere ancora &e%difference between {@cooldown} and {_waited}% &cprima di richiedere nuovamente il pacchetto.
    
    # Messaggio di successo
    msg_received: &7Hai ricevuto il tuo &apacchetto iniziale&7! Torna tra 8 ore per averne un altro.
    
    # Messaggio di benvenuto al primo join
    msg_welcome: &bBenvenuto nel server! &7Ecco un equipaggiamento per iniziare la tua avventura.

# Comando principale
command /pack_iniziale:
    description: Ricevi il pacchetto di risorse iniziale
    permission: starterpack.use
    permission message: &cNon hai il permesso per usare questo comando.
    trigger:
        # Controllo del cooldown
        if {starterpack::last_use::%player%} is set:
            set {_waited} to difference between {starterpack::last_use::%player%} and now
            if {_waited} is less than {@cooldown}:
                send "{@prefix} {@msg_cooldown}" to player
                stop
        
        # Assegnazione degli oggetti (Starter Kit)
        # Puoi modificare questa lista a piacimento
        give 1 stone sword to player
        give 1 stone pickaxe to player
        give 1 stone axe to player
        give 1 stone shovel to player
        give 16 cooked beef to player
        give 1 leather helmet to player
        give 1 leather chestplate to player
        give 1 leather leggings to player
        give 1 leather boots to player
        
        # Imposta il cooldown e invia messaggio
        set {starterpack::last_use::%player%} to now
        send "{@prefix} {@msg_received}" to player
        play sound "entity.player.levelup" with volume 1 and pitch 1 to player

# Evento al primo ingresso del giocatore
on first join:
    # Attende 5 secondi per assicurarsi che il giocatore sia caricato completamente
    wait 5 seconds
    
    # Invia messaggio di benvenuto
    send "{@prefix} {@msg_welcome}" to player
    
    # Esegue il comando per il giocatore
    make player execute command "/pack_iniziale"

# Evento opzionale: resetta il cooldown se un admin lo desidera
command /resetpack <player>:
    permission: starterpack.admin
    trigger:
        delete {starterpack::last_use::%arg-1%}
        send "{@prefix} &aCooldown del pacchetto resettato per &e%arg-1%&a." to player