Emir Yeni

write a code that is suitable with 26.2 papermc skript. the code should add AMETİST KAZMA which is a netherite pickaxe which breaks 3x3 (the block broken and the 8 block near that block) this pickaxe should never break and should come with efficiency 5. this picaxe will be bought from /ametist for 10k it should work with the vault plugin

Kodari AI
KodariSep 7 at 3:20 pm 1
AmethystMiningTool
A Minecraft Skript plugin for PaperMC 26.2 that adds a special Amethyst Pickaxe. This netherite pickaxe features a 3x3 mining area effect, never breaks, comes with Efficiency 5 enchantment, and can be purchased for 10,000 currency through the /ametist command. The purchase system integrates with the Vault plugin for currency management, providing players with a powerful mining tool that enhances resource gathering efficiency.

ametist-kazma.sk:

Dosyayı plugins/Skript/scripts/ametist-kazma.sk konumuna koyduktan sonra:

Plain Text
/sk reload ametist-kazma

Vault ile birlikte çalışan bir ekonomi eklentisi de kurulu ve aktif olmalıdır.

Emir Yeni

kod çalışmıyor. ayrıca ametist kazma satın alma guisi ekle

Kodari AI
KodariSep 7 at 3:28 pm 1

Aşağıdaki sürüm Skript + Vault + Vault destekli ekonomi eklentisi ile çalışır. Ekstra addon gerektirmez.

plugins/Skript/scripts/ametist-kazma.sk dosyasına koyun:

Skript
options:
    prefix: &5&lAMETİST &8»&r
    gui-title: &5&lAMETİST KAZMA
    pickaxe-name: &5&lAMETİST KAZMA
    pickaxe-marker: &8AMETIST_KAZMA
    price: 10000

function ametist_kazma() :: item:
    set {_pickaxe} to netherite pickaxe
    set name of {_pickaxe} to "{@pickaxe-name}"
    set lore of {_pickaxe} to "&7Özel madencilik kazması", "&7", "&dYeteneği: &f3x3 blok kırma", "&dKırılmaz", "{@pickaxe-marker}"
    enchant {_pickaxe} with efficiency 5
    set unbreakable state of {_pickaxe} to true
    return {_pickaxe}

command /ametist:
    trigger:
        open virtual chest inventory with 1 row named "{@gui-title}" to player

        set slot 0 of player's current inventory to purple stained glass pane named "&r"
        set slot 1 of player's current inventory to purple stained glass pane named "&r"
        set slot 2 of player's current inventory to purple stained glass pane named "&r"
        set slot 3 of player's current inventory to purple stained glass pane named "&r"
        set slot 4 of player's current inventory to ametist_kazma()
        set slot 5 of player's current inventory to purple stained glass pane named "&r"
        set slot 6 of player's current inventory to purple stained glass pane named "&r"
        set slot 7 of player's current inventory to purple stained glass pane named "&r"
        set slot 8 of player's current inventory to emerald block named "&a&lSATIN AL" with lore "&7Fiyat: &e10.000$"

on inventory click:
    if name of player's current inventory is "{@gui-title}":
        cancel event

        if clicked slot is 8:
            if name of event-item is "&a&lSATIN AL":
                if player's balance is less than {@price}:
                    send "{@prefix} &cBu kazmayı almak için yeterli paran yok." to player
                    send "{@prefix} &7Gerekli para: &e10.000$" to player
                    stop

                remove {@price} from player's balance
                give ametist_kazma() to player

                send "{@prefix} &aAMETİST KAZMA satın alındı!" to player
                send "{@prefix} &eHesabından 10.000$ çekildi." to player
                close player's inventory

on inventory drag:
    if name of player's current inventory is "{@gui-title}":
        cancel event

on break:
    if lore of player's tool does not contain "{@pickaxe-marker}":
        stop

    if {ametist.breaking::%player%} is set:
        stop

    set {ametist.breaking::%player%} to true
    set {_center} to event-block

    # Yatay düzlemde tam olarak 3x3 alan oluşturur.
    loop integers between -1 and 1:
        set {_x-offset} to loop-value

        loop integers between -1 and 1:
            set {_target-location} to location of {_center}

            add {_x-offset} to x-coordinate of {_target-location}
            add loop-value to z-coordinate of {_target-location}

            set {_target-block} to block at {_target-location}

            if {_target-block} is not {_center}:
                if {_target-block} is not air:
                    if {_target-block} is not bedrock:
                        break {_target-block} naturally using player's tool

    delete {ametist.breaking::%player%}

on item damage:
    if lore of event-item contains "{@pickaxe-marker}":
        cancel event

Kurulum:

  1. Vault eklentisini kurun.

  2. Vault ile çalışan bir ekonomi eklentisi kurun. Örneğin EssentialsX Economy.

  3. ametist-kazma.sk dosyasını şu klasöre koyun:

Plain Text
plugins/Skript/scripts/
  1. Sunucuda şu komutu çalıştırın:

Plain Text
/sk reload ametist-kazma
  1. Oyuncu /ametist komutunu kullanarak GUI’yi açabilir. Kazma 10.000 karşılığında satın alınır.

Kazma, kırılan bloğun bulunduğu yatay düzlemde toplam 9 blok kırar ve dayanıklılığı azalmaz.

Emir Yeni

write the code again

Kodari AI
KodariSep 7 at 3:31 pm 1

ametist-kazma.sk:

Skript
options:
    prefix: &5&lAMETİST &8» &r
    gui-title: &5&lAMETİST KAZMA
    pickaxe-name: &5&lAMETİST KAZMA
    pickaxe-marker: &8[AMETIST_KAZMA]
    price: 10000

function createAmethystPickaxe() :: item:
    set {_pickaxe} to netherite pickaxe
    set name of {_pickaxe} to "{@pickaxe-name}"
    set lore of {_pickaxe} to "&7Özel madencilik kazması", "&7", "&dÖzellik: &f3x3 blok kırma", "&dDayanıklılık: &fKırılmaz", "{@pickaxe-marker}"
    enchant {_pickaxe} with efficiency 5
    set unbreakable state of {_pickaxe} to true
    return {_pickaxe}

command /ametist:
    trigger:
        open chest inventory with 1 row named "{@gui-title}" to player

        set slot 0 of player's current inventory to purple stained glass pane named "&r"
        set slot 1 of player's current inventory to purple stained glass pane named "&r"
        set slot 2 of player's current inventory to purple stained glass pane named "&r"
        set slot 3 of player's current inventory to purple stained glass pane named "&r"

        set slot 4 of player's current inventory to createAmethystPickaxe()

        set slot 5 of player's current inventory to purple stained glass pane named "&r"
        set slot 6 of player's current inventory to purple stained glass pane named "&r"
        set slot 7 of player's current inventory to purple stained glass pane named "&r"

        set slot 8 of player's current inventory to emerald block named "&a&lSATIN AL" with lore "&7Fiyat: &e10.000$"

on inventory click:
    if name of event-inventory is "{@gui-title}":
        cancel event

        if clicked slot is 8:
            if player's balance is less than {@price}:
                send "{@prefix}&cBu kazmayı satın almak için yeterli paran yok." to player
                send "{@prefix}&7Gerekli para: &e10.000$" to player
                stop

            remove {@price} from player's balance
            give createAmethystPickaxe() to player

            send "{@prefix}&aAMETİST KAZMA satın alındı!" to player
            send "{@prefix}&eHesabından 10.000$ çekildi." to player
            close player's inventory

on inventory drag:
    if name of event-inventory is "{@gui-title}":
        cancel event

on break:
    if lore of player's tool does not contain "{@pickaxe-marker}":
        stop

    if {amethyst-mining.%player%} is set:
        stop

    set {amethyst-mining.%player%} to true

    set {_center} to event-block
    set {_center-location} to location of {_center}

    loop integers between -1 and 1:
        set {_x} to loop-value

        loop integers between -1 and 1:
            set {_z} to loop-value

            if {_x} is not 0:
                if {_z} is not 0:
                    set {_target-location} to {_center-location}
                    add {_x} to x-coordinate of {_target-location}
                    add {_z} to z-coordinate of {_target-location}

                    set {_target-block} to block at {_target-location}

                    if {_target-block} is not air:
                        if {_target-block} is not bedrock:
                            break {_target-block} naturally using player's tool

    delete {amethyst-mining.%player%}

Dosyayı buraya koyun:

Plain Text
plugins/Skript/scripts/ametist-kazma.sk

Gerekli eklentiler:

  • Skript

  • Vault

  • Vault destekli ekonomi eklentisi, örneğin EssentialsX + EssentialsX Economy

Sonrasında sunucuda çalıştırın:

Plain Text
/sk reload ametist-kazma

GUI’yi açmak için:

Plain Text
/ametist

Bu sürüm kazmanın bulunduğu bloğun etrafındaki yatay düzlemde toplam 3x3 alan kırar.

Emir Yeni

kodda hata var. kazma dikeyde 3 yatayda 3 olmak üzere 9 blok kırmalı

Kodari AI
KodariSep 7 at 3:38 pm 1

Aşağıdaki kodda kazma, kırılan bloğun bulunduğu merkez hariç üst-alt ve sağ-sol yönlerinde toplam 8 blok, merkezle birlikte 3x3 = 9 blok kırar. Önceki hatadaki gibi yalnızca köşeler kırılmaz.

Dosyayı plugins/Skript/scripts/ametist-kazma.sk içine koyup şu komutla yükleyin:

Plain Text
/sk reload ametist-kazma

Gerekli eklentiler:

  • Skript

  • Vault

  • Vault destekli ekonomi eklentisi, örneğin EssentialsX Economy

Bu sürümde düzlem X-Y eksenidir: yatayda 3, dikeyde 3 blok kırılır.

Kodari can make mistakes. Review important code before using.
Files
ametist-kazma.sk
Code
1 90
ametist-kazma.sk
options:
    prefix: &5&lAMETİST &8» &r
    gui-title: &5&lAMETİST KAZMA
    pickaxe-name: &5&lAMETİST KAZMA
    pickaxe-marker: &8AMETIST_KAZMA
    price: 10000

function createAmethystPickaxe() :: item:
    set {_pickaxe} to netherite pickaxe
    set name of {_pickaxe} to "{@pickaxe-name}"
    set lore of {_pickaxe} to "&7Özel madencilik kazması", "&7", "&dÖzellik: &f3x3 blok kırma", "&dDayanıklılık: &fKırılmaz", "{@pickaxe-marker}"
    enchant {_pickaxe} with efficiency 5
    set unbreakable state of {_pickaxe} to true
    return {_pickaxe}

function createAmethystBuyItem() :: item:
    set {_item} to emerald block
    set name of {_item} to "&a&lSATIN AL"
    set lore of {_item} to "&7AMETİST KAZMA", "&7", "&eFiyat: &f10.000$"
    return {_item}

command /ametist:
    trigger:
        open chest inventory with 1 row named "{@gui-title}" to player

        set slot 0 of player's current inventory to purple stained glass pane named "&r"
        set slot 1 of player's current inventory to purple stained glass pane named "&r"
        set slot 2 of player's current inventory to purple stained glass pane named "&r"
        set slot 3 of player's current inventory to purple stained glass pane named "&r"
        set slot 4 of player's current inventory to createAmethystPickaxe()
        set slot 5 of player's current inventory to purple stained glass pane named "&r"
        set slot 6 of player's current inventory to purple stained glass pane named "&r"
        set slot 7 of player's current inventory to purple stained glass pane named "&r"
        set slot 8 of player's current inventory to createAmethystBuyItem()

on inventory click:
    if name of event-inventory is "{@gui-title}":
        cancel event

        if clicked slot is 8:
            if player's balance is less than {@price}:
                send "{@prefix}&cBu kazmayı almak için yeterli paran yok." to player
                send "{@prefix}&7Gerekli para: &e10.000$" to player
                stop

            remove {@price} from player's balance
            give createAmethystPickaxe() to player

            send "{@prefix}&aAMETİST KAZMA satın alındı!" to player
            send "{@prefix}&eHesabından &f10.000$ &eçekildi." to player
            close player's inventory

on inventory drag:
    if name of event-inventory is "{@gui-title}":
        cancel event

on break:
    if lore of player's tool does not contain "{@pickaxe-marker}":
        stop

    if {amethyst.breaking::%uuid of player%} is set:
        stop

    set {amethyst.breaking::%uuid of player%} to true

    set {_center-location} to location of event-block

    loop integers between -1 and 1:
        set {_x} to loop-value

        loop integers between -1 and 1:
            set {_y} to loop-value

            if {_x} is not 0 or {_y} is not 0:
                set {_target-location} to {_center-location}

                add {_x} to x-coordinate of {_target-location}
                add {_y} to y-coordinate of {_target-location}

                set {_target-block} to block at {_target-location}

                if {_target-block} is not air:
                    if {_target-block} is not bedrock:
                        break {_target-block} naturally using player's tool

    delete {amethyst.breaking::%uuid of player%}

on item damage:
    if lore of event-item contains "{@pickaxe-marker}":
        cancel event