Jafeet Alberda

Creame un plugins funcional enfocado en este skript

Kodari AI
KodariOct 20 at 3:30 pm 1

Pásame el contenido del Skript al que te refieres o dime qué funciones quieres que tenga. No veo ningún archivo ni código adjunto; con eso te preparo un .sk funcional para instalar en plugins/Skript/scripts/.

Jafeet Alberda

Ahi esta

Kodari AI
KodariOct 20 at 3:33 pm 1

Plan:

  1. Completar la dependencia que falta para el catálogo de encantamientos custom.

  2. Añadir comandos de administración para registrar, listar y eliminar entradas sin addons extra.

  3. Dejar indicado cómo instalarlo y recargar los Skript.

Creé arkcustom.sk para completar la dependencia que faltaba en arkmenu.sk. Añade un catálogo administrable con /arkce list, registro y eliminación; las entradas se guardan y vuelven a cargarse al reiniciar.

Instala arkmenu.sk, decorarark.sk y arkcustom.sk en plugins/Skript/scripts/ y ejecuta /sk reload all. Después, por ejemplo:

Plain Text
/arkce add|filo_ancestral|ELITE|5|Espadas|ALL_SWORD|@GC@Filo ancestral|Aumenta el poder~de tu espada

Es un conjunto de Skript, no un plugin Java compilado. El catálogo personalizado añade la entrada al lore; no implementa por sí solo los efectos jugables de AdvancedEnchantments. Los comandos usan el permiso op.admin.

Kodari can make mistakes. Review important code before using.
Files
arkcustom.sk
arkmenu_decoracion_palo_listo.zip
arkmenu.sk
decorarark.sk
Code
4 2,724
arkmenu.sk
# ============================================================
# ARKEN TALLER - Taller unificado (/ark)
# Requiere: decorarark.sk (itemrpg_aplicar / itemrpg_revertir)
#           arkcustom.sk  (datos de los encantamientos custom)
#
# UN SOLO MENU:
#   Slots 0-35  : zona libre, aquí pones los objetos
#   Slots 45-46 : ENCANTAMIENTOS VANILLA  (elige nivel y aplica)
#   Slots 47-48 : ENCANTAMIENTOS CUSTOM   (lista con páginas)
#   Slot  49    : rareza (clic para cambiar)
#   Slots 50-51 : PONER LORE
#   Slots 52-53 : QUITAR LORE
#   Slot  39    : AJUSTES DE OBJETO (irrompible, ocultar atributos, ocultar encantamientos)
#   Slot  41    : QUITAR ENCANTAMIENTOS (vanilla, custom o todos)
#   Slots 38 y 42 : PONER NICK (escribes el nombre en el chat y eliges el color)
#                   En el menú de color: "NICK Y COLOR AUTOMÁTICO" (slot 31) -> escribes
#                   el nick completo con colores, ej: &f「 &#FFECAB⚡ &#FFE076&lODIN &f」
#       estilos: negrita, cursiva, subrayado, tachado, MAYUSCULAS
#       colores: 16 colores, arcoiris y DEGRADADO de dos colores (hex, 1.16+)
#       clic izquierdo -> quita solo el diseño (conserva encantamientos custom)
#       clic derecho   -> borra TODO el lore
#
# COMANDOS:
#   /ark                    -> abre el taller (en decorarark.sk)
#   /lore clear [mano|all]  -> borra TODO el lore
#   /lore revert [mano|all] -> quita solo el diseño (como "Restaurar")
# ============================================================

options:
    pre: &8[&6&lARKEN&8] &7
    nivel_max_vanilla: 100
    efectos: true


# ============================================================
# CONFIGURACION DE COLORES POR GRUPO
# Pon aquí los mismos colores que tienes en groups: de
# la config de AdvancedEnchantments (reemplaza a %group-color%)
# ============================================================

function ark_grupo_color(g: text) :: text:
    if {_g} is "SIMPLE":
        return "&7"
    if {_g} is "UNIQUE":
        return "&a"
    if {_g} is "ELITE":
        return "&b"
    if {_g} is "ULTIMATE":
        return "&e"
    if {_g} is "LEGENDARY":
        return "&6"
    if {_g} is "FABLED":
        return "&d"
    return "&f"

function ark_grupo_key(i: integer) :: text:
    if {_i} is 1:
        return "SIMPLE"
    if {_i} is 2:
        return "UNIQUE"
    if {_i} is 3:
        return "ELITE"
    if {_i} is 4:
        return "ULTIMATE"
    if {_i} is 5:
        return "LEGENDARY"
    if {_i} is 6:
        return "FABLED"
    return ""


# ============================================================
# EFECTOS (sonido + particulas) - todo en UN solo lugar
# Para apagarlos pon  efectos: false  en options.
# Si tu version de Skript no reconoce alguna particula,
# cambia solo el nombre aqui abajo.
# ============================================================

function ark_fx(p: player, t: text):
    if "{@efectos}" is "false":
        stop
    set {_u} to "%uuid of {_p}%"
    if {_t} is "enchant":
        play sound "block.enchantment_table.use" with volume 1 and pitch 1.2 to {_p}
        play sound "entity.player.levelup" with volume 0.6 and pitch 1.4 to {_p}
        execute console command "execute as %{_u}% at @s run particle minecraft:enchant ~ ~1 ~ 0.5 0.7 0.5 0.5 30 force"
    else if {_t} is "lore":
        play sound "entity.player.levelup" to {_p}
        execute console command "execute as %{_u}% at @s run particle minecraft:happy_villager ~ ~1 ~ 0.5 0.7 0.5 0 20 force"
    else if {_t} is "nick":
        play sound "entity.experience_orb.pickup" with volume 1 and pitch 1.4 to {_p}
        execute console command "execute as %{_u}% at @s run particle minecraft:happy_villager ~ ~1 ~ 0.5 0.7 0.5 0 20 force"
    else if {_t} is "grad":
        play sound "entity.player.levelup" with volume 1 and pitch 1.6 to {_p}
        play sound "block.amethyst_block.chime" with volume 1 and pitch 1.2 to {_p}
        execute console command "execute as %{_u}% at @s run particle minecraft:totem_of_undying ~ ~1 ~ 0.5 0.8 0.5 0.3 35 force"
    else if {_t} is "quitar":
        play sound "block.grindstone.use" to {_p}
        execute console command "execute as %{_u}% at @s run particle minecraft:smoke ~ ~1 ~ 0.4 0.6 0.4 0 20 force"
    else if {_t} is "ajuste":
        play sound "block.smithing_table.use" to {_p}
        execute console command "execute as %{_u}% at @s run particle minecraft:crit ~ ~1 ~ 0.4 0.6 0.4 0 15 force"


# ============================================================
# UTILIDADES
# ============================================================

function ark_romano(n: integer) :: text:
    if {_n} < 1:
        return "%{_n}%"
    if {_n} > 3999:
        return "%{_n}%"
    set {_v::*} to 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4 and 1
    set {_s::*} to "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV" and "I"
    set {_r} to ""
    loop 13 times:
        set {_k} to loop-value
        while {_n} >= {_v::%{_k}%}:
            set {_r} to "%{_r}%%{_s::%{_k}%}%"
            subtract {_v::%{_k}%} from {_n}
    return {_r}

function ark_rareza_texto(k: text) :: text:
    if {_k} is "sin":
        return "&7Sin cambio"
    if {_k} is "quitar":
        return "&cQuitar rareza"
    return itemrpg_rareza({_k})

function ark_linea() :: text:
    return "&8&m                              "

function ark_boton_rareza(k: text) :: item:
    set {_txt} to ark_rareza_texto({_k})
    set {_sep} to ark_linea()
    set {_i} to diamond named "&r&6&l✦ RAREZA &8» %{_txt}%" with lore {_sep}, "&7Elige la rareza que se aplicará", "&7al pulsar &aPONER LORE&7.", {_sep}, "" and "&e▸ &fClic para cambiar"
    return {_i}

function ark_nivel_item(l: integer, mx: integer, t: text) :: item:
    set {_sep} to ark_linea()
    set {_i} to enchanted book named "&r&e&lNIVEL &f&l%{_l}% &8/ &7%{_mx}%" with lore {_sep}, "&7Aplicando: %{_t}%", {_sep} and "&7Ajusta el nivel con los botones"
    return {_i}


# ============================================================
# ENCANTAMIENTOS VANILLA
# Aplica todos los que admite el objeto (sin maldiciones)
# ============================================================

function ark_vanilla_aplicar(i: itemtype, l: number) :: itemtype:
    set {_n} to "%type of {_i}%"
    set {_arm::*} to "protection", "fire protection", "blast protection", "projectile protection", "thorns", "unbreaking" and "mending"
    if {_n} contains "helmet" or "turtle":
        set {_e::*} to {_arm::*}, "respiration" and "aqua affinity"
    else if {_n} contains "chestplate":
        set {_e::*} to {_arm::*}
    else if {_n} contains "leggings":
        set {_e::*} to {_arm::*} and "swift sneak"
    else if {_n} contains "boots":
        set {_e::*} to {_arm::*}, "feather falling", "depth strider", "frost walker" and "soul speed"
    else if {_n} contains "elytra":
        set {_e::*} to "unbreaking" and "mending"
    else if {_n} contains "sword":
        set {_e::*} to "sharpness", "smite", "bane of arthropods", "knockback", "fire aspect", "looting", "sweeping edge", "unbreaking" and "mending"
    else if {_n} contains "pickaxe", "shovel" or "hoe":
        set {_e::*} to "efficiency", "silk touch", "fortune", "unbreaking" and "mending"
    else if {_n} contains "axe":
        set {_e::*} to "sharpness", "smite", "bane of arthropods", "efficiency", "silk touch", "unbreaking" and "mending"
    else if {_n} contains "crossbow":
        set {_e::*} to "multishot", "piercing", "quick charge", "unbreaking" and "mending"
    else if {_n} contains "bow":
        set {_e::*} to "power", "punch", "flame", "infinity", "unbreaking" and "mending"
    else if {_n} contains "trident":
        set {_e::*} to "impaling", "riptide", "loyalty", "channeling", "unbreaking" and "mending"
    else if {_n} contains "mace":
        set {_e::*} to "density", "breach", "wind burst", "smite", "bane of arthropods", "fire aspect", "unbreaking" and "mending"
    else if {_n} contains "fishing rod":
        set {_e::*} to "luck of the sea", "lure", "unbreaking" and "mending"
    else if {_n} contains "shears":
        set {_e::*} to "efficiency", "unbreaking" and "mending"
    else if {_n} contains "shield" or "flint and steel":
        set {_e::*} to "unbreaking" and "mending"
    loop {_e::*}:
        set {_t} to "%loop-value% %{_l}%" parsed as enchantment type
        if {_t} is set:
            enchant {_i} with {_t}
    return {_i}


# ============================================================
# ENCANTAMIENTOS CUSTOM (AdvancedEnchantments)
# Se aplican escribiendo la línea en el lore:  <color><nombre> <nivel romano>
# Luego PONER LORE los acomoda dentro de "| Habilidades"
# ============================================================

# ¿Se puede aplicar este custom a este objeto? (según applies: del yml)
function ark_ce_aplica(id: text, i: itemtype) :: boolean:
    set {_n} to "%type of {_i}%" in lower case
    replace all "_" with " " in {_n}