Imbirek No

ITEM 1 — kurewska różdzka

Przeznaczenie: Szukający.

Wygląd: płomienna różdzka

Po użyciu losuje jednego aktywnego chowającego się gracza i nakłada na niego efekt Glowing na 3 sekundy.

Nie może wylosować osoby używającej itemu ani innych szukających.

Nie może wybierać graczy w trybie spectator ani osób poza rundą.

Cooldown: 3 minuty.

Jeśli nie ma żadnego chowającego się gracza, wyświetla komunikat i nie zużywa itemu ani cooldownu.

ITEM 2 — pizda

Przeznaczenie: Szukający.

Wygląd: slime

Po użyciu daje Speed II na 10 sekund.

Cooldown: 1 minuta.

Efekt nie powinien nakładać się wielokrotnie ani przedłużać przez spamowanie.

ITEM 3 — Eliksir frajera

Przeznaczenie: Chowający się.

Wygląd: Splash Potion.

Po użyciu daje niewidzialność na 5 sekund.

Cooldown: 90 sekund.

Nie usuwa zbroi ani przedmiotów gracza, ale należy pamiętać, że zbroja i przedmioty w rękach mogą zdradzać jego pozycję.

Efekt działa tylko podczas aktywnej rundy.

wszystkie itemy uzywa sie ppm i zaden item nie znika po uzyciu

komenda na dostanie itemów wszystkich /jebackurwy

Kodari AI
KodariOct 13 at 8:51 pm 1
HideAndSeekItems
Creates a hide-and-seek game item system with three unique items. The Seeker's Wand randomly selects a hiding player and applies Glowing for 3 seconds with a 3-minute cooldown. The Seeker's Speed grants Speed II for 10 seconds with a 1-minute cooldown. The Fool's Elixir provides invisibility for 5 seconds with a 90-second cooldown. All items are used with right-click, never consumed, and only function during active rounds. Includes a /jebackurwy command to give all items.

Utworzyłem skrypt z trzema itemami oraz komendami do obsługi rundy i ról.

Zapisz jako plugins/Skript/scripts/items.sk, nadaj odpowiednie uprawnienia hideandseek.items i hideandseek.admin, a następnie użyj /sk reload items. Uruchom rundę przez /jbrunda start, przypisz role przez /jbrola <gracz> szukajacy lub chowajacy, a itemy odbierzesz komendą /jebackurwy.

Kodari can make mistakes. Review important code before using.
Files
items.sk
Code
1 122
items.sk
options:
    prefix: &8[&dHide&8]&r

on script load:
    delete {jb::round::active}
    delete {jb::role::*}

command /jebackurwy:
    permission: hideandseek.items
    permission message: &cNie masz uprawnień do tej komendy.
    trigger:
        set {_wand} to blaze rod named "&cKurewska różdżka"
        set {_slime} to slime ball named "&dPizda"
        set {_potion} to splash potion named "&5Eliksir frajera"
        give {_wand} to player
        give {_slime} to player
        give {_potion} to player
        send "{@prefix} &aOtrzymałeś wszystkie trzy itemy." to player

command /jbrunda <text>:
    permission: hideandseek.admin
    permission message: &cNie masz uprawnień do tej komendy.
    trigger:
        if arg-1 is "start":
            set {jb::round::active} to true
            send "{@prefix} &aRunda została uruchomiona." to player
        else if arg-1 is "stop":
            delete {jb::round::active}
            delete {jb::role::*}
            send "{@prefix} &cRunda została zakończona, role wyczyszczone." to player
        else:
            send "&cUżycie: /jbrunda <start|stop>" to player

command /jbrola <player> <text>:
    permission: hideandseek.admin
    permission message: &cNie masz uprawnień do tej komendy.
    trigger:
        if {jb::round::active} is not true:
            send "{@prefix} &cNajpierw uruchom rundę: /jbrunda start" to player
            stop
        if arg-2 is "szukajacy":
            set {jb::role::%uuid of arg-1%} to "szukajacy"
            send "{@prefix} &aGracz &e%arg-1% &ajest szukającym." to player
        else if arg-2 is "chowajacy":
            set {jb::role::%uuid of arg-1%} to "chowajacy"
            send "{@prefix} &aGracz &e%arg-1% &ajest chowającym." to player
        else if arg-2 is "usun":
            delete {jb::role::%uuid of arg-1%}
            send "{@prefix} &aUsunięto rolę gracza &e%arg-1%&a." to player
        else:
            send "&cUżycie: /jbrola <gracz> <szukajacy|chowajacy|usun>" to player

on right click:
    if player's tool is air:
        stop
    set {_itemName} to uncolored name of player's tool

    if {_itemName} is "Kurewska różdżka":
        cancel event
        if {jb::round::active} is not true:
            send "{@prefix} &cNie trwa żadna runda." to player
            stop
        if {jb::role::%uuid of player%} is not "szukajacy":
            send "{@prefix} &cTen item jest przeznaczony dla szukających." to player
            stop

        loop all players:
            if loop-player is not player:
                if {jb::role::%uuid of loop-player%} is "chowajacy":
                    if gamemode of loop-player is not spectator:
                        add loop-player to {_targets::*}

        if {_targets::*} is not set:
            send "{@prefix} &cNie ma aktywnego chowającego się gracza do namierzenia." to player
            stop

        if {jb::cooldown::wand::%uuid of player%} is set:
            if difference between now and {jb::cooldown::wand::%uuid of player%} is less than 3 minutes:
                send "{@prefix} &cRóżdżka jest jeszcze na cooldownie." to player
                stop

        set {_target} to random element out of {_targets::*}
        set {jb::cooldown::wand::%uuid of player%} to now
        apply potion of glowing 1 to {_target} for 3 seconds
        send "{@prefix} &aNamierzyłeś gracza &e%{_target}%&a!" to player
        send "{@prefix} &cZostałeś namierzony na 3 sekundy!" to {_target}
        stop

    if {_itemName} is "Pizda":
        cancel event
        if {jb::round::active} is not true:
            send "{@prefix} &cNie trwa żadna runda." to player
            stop
        if {jb::role::%uuid of player%} is not "szukajacy":
            send "{@prefix} &cTen item jest przeznaczony dla szukających." to player
            stop
        if {jb::cooldown::speed::%uuid of player%} is set:
            if difference between now and {jb::cooldown::speed::%uuid of player%} is less than 1 minute:
                send "{@prefix} &cItem jest jeszcze na cooldownie." to player
                stop

        set {jb::cooldown::speed::%uuid of player%} to now
        apply potion of speed 2 to player for 10 seconds
        send "{@prefix} &aOtrzymałeś Speed II na 10 sekund." to player
        stop

    if {_itemName} is "Eliksir frajera":
        cancel event
        if {jb::round::active} is not true:
            send "{@prefix} &cNiewidzialność działa tylko podczas aktywnej rundy." to player
            stop
        if {jb::role::%uuid of player%} is not "chowajacy":
            send "{@prefix} &cTen item jest przeznaczony dla chowających się." to player
            stop
        if {jb::cooldown::invisibility::%uuid of player%} is set:
            if difference between now and {jb::cooldown::invisibility::%uuid of player%} is less than 90 seconds:
                send "{@prefix} &cEliksir jest jeszcze na cooldownie." to player
                stop

        set {jb::cooldown::invisibility::%uuid of player%} to now
        apply potion of invisibility 1 to player for 5 seconds
        send "{@prefix} &aJesteś niewidzialny przez 5 sekund. Zbroja i przedmioty w rękach nadal mogą zdradzić Twoją pozycję." to player