Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Jak dodać permisje


Rekomendowane odpowiedzi

Opublikowano


command /kit [<text>] [<text>] [<player>]:

trigger:

if arg 1 is "save":

if arg 2 is set:

if {kits::%arg 2%} is set:

send "&6>> &9Ten kit pod taka nazwa jest juz zapisany"

stop

set {kits::%arg 2%} to argument 2

send "&6>> &9Zapisales &6[&a%arg 2%&6]&9 jako kit."

clear {kit.%arg 1%::*}

set {kit.%arg 2%.helmet} to "%helmet of the player%"

set {kit.%arg 2%.chestplate} to "%chestplate of the player%"

set {kit.%arg 2%.leggings} to "%leggings of the player%"

set {kit.%arg 2%.boots} to "%boots of the player%"

loop items in player's inventory:

if ID of loop-item is 373:

set {_id} to ID of loop-item

set {_data} to data value of loop-item

add "%{_id}%:%{_data}%" to {kit.%arg 2%::*}

else:

add "%loop-item%" to {kit.%arg 2%::*}

if arg 1 is "load":

if arg 2 is set:

if {kits::%arg 2%} is not set:

send "&6>> &9Nie ma takiego kitu"

stop

loop {kit.%arg 2%::*}:

give player (loop-value parsed as item)

equip player with {kit.%arg 2%.boots} parsed as item

equip player with {kit.%arg 2%.chestplate} parsed as item

equip player with {kit.%arg 2%.leggings} parsed as item

equip player with {kit.%arg 2%.helmet} parsed as item

send "&6>> &aDostales kit &6[&a%arg 2%&6]"

if arg 1 is "list":

send "&6>> &9Zapisane kity: &6%{kits::*}%"

stop

if arg 1 is "delete":

if arg 2 is set:

if {kits::%arg 2%} is not set:

send "&6>> &9Nie ma takiego kitu"

stop

clear {kits::%arg 2%}

clear {kit.%arg 2%::*}

clear {kit.%arg 2%.helmet}

clear {kit.%arg 2%.chestplate}

clear {kit.%arg 2%.leggings}

clear {kit.%arg 2%.boots}

send "&6>> &9Usunales kit &6[&a%arg 2%&6]"

if arg 1 is not set:

send "&6<>&7&M-----------------------------------&6<>"

send "&6/kit save <nazwa> &f- &9Zapisuje kit"

send "&6/kit load <nazwa> &f- &9Daje kit"

send "&6/kit delete <nazwa> &f- &9Usuwa kit"

send "&6/kit list &f- &9Lista kitow"

send "&6<>&7&M-----------------------------------&6<>"

stop

 

 

on rightclick on sign:

if line 1 of the clicked block is "&1[KitDeath]":

loop {kits::*}:

line 2 of the clicked block is loop-value

loop {kit.%line 2 of the clicked block%::*}:

give player (loop-value-2 parsed as item)

equip player with {kit.%line 2 of the clicked block%.boots} parsed as item

equip player with {kit.%line 2 of the clicked block%.chestplate} parsed as item

equip player with {kit.%line 2 of the clicked block%.leggings} parsed as item

equip player with {kit.%line 2 of the clicked block%.helmet} parsed as item

send "&6>> &aDostales kit &6[&a%line 2 of the clicked block%&6]"

stop

send "&6>> &cNie znaleziono zestawu zdefiniowanego na tabliczce."

 

on sign change:

if line 1 is "[k]":

loop {kits::*}:

line 2 is loop-value

set line 1 to "&1[KitDeath]"

send "&6>> &aStworzono tabliczke &6KIT"

stop

cancel event

send "&6>> &cNie znaleziono zestawu, ktory chcesz przypisac do tej tabliczki"

Posty: 100|200|300|400|500|600|700|800|900|1000|

Opublikowano

O co chodzi, bo chyba nie ogarniam

Jeżeli chcesz dodać permisję, to dodajesz "

if player has permission "cos.cos":

w skrypcie

3522088333.png

No Nieźle

Opublikowano
command /kit [<text>] [<text>] [<player>]:
    trigger:
        if arg 1 is "save":
            if player has permission "kit.save":
                if arg 2 is set:
                    if {kits::%arg 2%} is set:
                        send "&6>> &9Ten kit pod taka nazwa jest juz zapisany"
                        stop                
                    set {kits::%arg 2%} to argument 2
                    send "&6>> &9Zapisales &6[&a%arg 2%&6]&9 jako kit."
                    clear {kit.%arg 1%::*}
                    set {kit.%arg 2%.helmet} to "%helmet of the player%"
                    set {kit.%arg 2%.chestplate} to "%chestplate of the player%"
                    set {kit.%arg 2%.leggings} to "%leggings of the player%"
                    set {kit.%arg 2%.boots} to "%boots of the player%"
                    loop items in player's inventory:
                        if ID of loop-item is 373:
                            set {_id} to ID of loop-item
                            set {_data} to data value of loop-item
                            add "%{_id}%:%{_data}%" to {kit.%arg 2%::*}
                        else:
                            add "%loop-item%" to {kit.%arg 2%::*}
        if arg 1 is "load":
            if player has permission "kit.load":		
                if arg 2 is set:
                    if {kits::%arg 2%} is not set:
                        send "&6>> &9Nie ma takiego kitu"
                        stop                
                    loop {kit.%arg 2%::*}: 
                        give player (loop-value parsed as item)
                    equip player with {kit.%arg 2%.boots} parsed as item
                    equip player with {kit.%arg 2%.chestplate} parsed as item
                    equip player with {kit.%arg 2%.leggings} parsed as item
                    equip player with {kit.%arg 2%.helmet} parsed as item
                    send "&6>> &aDostales kit &6[&a%arg 2%&6]"    
        if arg 1 is "list":
            if player has permission "kit.list":
                send "&6>> &9Zapisane kity: &6%{kits::*}%"
                stop
        if arg 1 is "delete":
            if player has permission "kit.delete":
                if arg 2 is set:
                    if {kits::%arg 2%} is not set:
                        send "&6>> &9Nie ma takiego kitu"
                        stop                
                    clear {kits::%arg 2%} 
                    clear {kit.%arg 2%::*}
                    clear {kit.%arg 2%.helmet}
                    clear {kit.%arg 2%.chestplate}
                    clear {kit.%arg 2%.leggings}
                    clear {kit.%arg 2%.boots}                
                    send "&6>> &9Usunales kit &6[&a%arg 2%&6]"
        if arg 1 is not set:
            send  "&6<>&7&M-----------------------------------&6<>"
            send "&6/kit save <nazwa> &f- &9Zapisuje kit"
            send "&6/kit load <nazwa> &f- &9Daje kit"
            send "&6/kit delete <nazwa> &f- &9Usuwa kit"
            send "&6/kit list &f- &9Lista kitow"
            send  "&6<>&7&M-----------------------------------&6<>"            
            stop
on rightclick on sign:
    if player has permission "kit.sign":
        if line 1 of the clicked block is "&1[KitDeath]":
            loop {kits::*}:
                line 2 of the clicked block is loop-value
                loop {kit.%line 2 of the clicked block%::*}:
                    give player (loop-value-2 parsed as item)
                equip player with {kit.%line 2 of the clicked block%.boots} parsed as item
                equip player with {kit.%line 2 of the clicked block%.chestplate} parsed as item
                equip player with {kit.%line 2 of the clicked block%.leggings} parsed as item
                equip player with {kit.%line 2 of the clicked block%.helmet} parsed as item
                send "&6>> &aDostales kit &6[&a%line 2 of the clicked block%&6]"
                stop
            send "&6>> &cNie znaleziono zestawu zdefiniowanego na tabliczce." 
on sign change:
    if player has permission "kit.sign2:
        if line 1 is "[k]":
            loop {kits::*}:
                line 2 is loop-value
                set line 1 to "&1[KitDeath]"
                send "&6>> &aStworzono tabliczke  &6KIT"
                stop
            cancel event
            send "&6>> &cNie znaleziono zestawu, ktory chcesz przypisac do tej tabliczki"

(komenda) - "permisja"

 

/kit save - "kit.save"

/kit load - "kit.load"

/kit list - "kit.list"

/kit delete - "kit.delete"

 

Fragment:

on rightclick on sign:
    if player has permission "kit.sign":
        if line 1 of the clicked block is "&1[KitDeath]":
            loop {kits::*}:
                line 2 of the clicked block is loop-value
                loop {kit.%line 2 of the clicked block%::*}:
                    give player (loop-value-2 parsed as item)
                equip player with {kit.%line 2 of the clicked block%.boots} parsed as item
                equip player with {kit.%line 2 of the clicked block%.chestplate} parsed as item
                equip player with {kit.%line 2 of the clicked block%.leggings} parsed as item
                equip player with {kit.%line 2 of the clicked block%.helmet} parsed as item
                send "&6>> &aDostales kit &6[&a%line 2 of the clicked block%&6]"
                stop
            send "&6>> &cNie znaleziono zestawu zdefiniowanego na tabliczce." 

do permisji "kit.sign"

 

Fragment:

on sign change:
    if player has permission "kit.sign2:
        if line 1 is "[k]":
            loop {kits::*}:
                line 2 is loop-value
                set line 1 to "&1[KitDeath]"
                send "&6>> &aStworzono tabliczke  &6KIT"
                stop
            cancel event
            send "&6>> &cNie znaleziono zestawu, ktory chcesz przypisac do tej tabliczki"

do permisji "kit.sign2"

 

 

 

NIE TESTOWANE!

 

sygnatura.png

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...