Facebook
From Dominik, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 355
  1. variables:
  2.         {case::player::%player%::open} = false
  3.         {case::player::%player%::openwait} = false
  4.  
  5. options:
  6.        
  7.         # General
  8.        
  9.         tag: &f&l[&6&lCase&f&l] # Przedrostek wiadomosci
  10.        
  11.         # Drop case
  12.        
  13.         chance drop key: 0% # Szansa na wykopanie klucza podana w procentach
  14.         chance drop chest: 1% # Szansa na wykopanie skrzyni podana w procentach
  15.         block drop: gravel # Z jakiego bloku mozna wykopac skrzynie/klucz
  16.        
  17.         chance death key: 0% # Szansa na wypadniecie klucza po zabiciu gracza
  18.         chance death chest: 1% # Szansa na wypadniecie skrzyni po zabiciu gracza
  19.        
  20.         # Colour message:
  21.        
  22.         important: &6&l
  23.         general: &7&l
  24.         leere: &8&l
  25.        
  26.         lore: &c
  27.        
  28. command /case [<text="help">] [<text>] [<text>] [<text>]:
  29.         trigger:
  30.                 if player has permission "case.*":
  31.                         if arg 1 is "help":
  32.                                 send "{@tag}"
  33.                                 send "{@important}/case add <name> <type> {@leere}- {@general}Dodaje nowa skrzynke."
  34.                                 send "{@important}/case remove <name> {@leere}- {@general}Usuwa skrzynke."
  35.                                 send "{@important}/case edit <name> {@leere}- {@general}Edytuje zawartosc skrzyni."
  36.                                 send "{@important}/case give <name> [<player/all>] [<number>] {@leere}- {@general}Daje nam klucz i skrzynie."
  37.                                 send "{@important}/case list {@leere}- {@general}Lista skrzyn w gui."
  38.                                 send "{@important}/case stats [<player>] {@leere}- {@general}Statystyki gracza."
  39.                                 send "{@important}/case open <name> [<player>] {@leere}- {@general}Otwiera skrzynie."
  40.                         if arg 1 is "add":
  41.                                 if arg 2 is set:
  42.                                         set {_name} to arg 2
  43.                                         replace all "_" with " " in {_name}
  44.                                         loop {case::chestlist::*}:
  45.                                                 if loop-value is {_name}:
  46.                                                         send "{@tag} {@general}Taka skrzynia juz istnieje!"
  47.                                                         stop
  48.                                         if arg 3 is set:
  49.                                                 if arg 3 is "key" or "notkey":
  50.                                                         add {_name} to {case::chestlist::*}
  51.                                                         send "{@tag} {@general}Dodano skrzynie o nazwie {@important}%{_name}%{@general}."
  52.                                                         if arg 3 is "key":
  53.                                                                 set {case::type::%{_name}%} to "key"
  54.                                                                 send "{@tag} {@general}Skrzynia wymaga klucza."
  55.                                                         if arg 3 is "notkey":
  56.                                                                 set {case::type::%{_name}%} to "notkey"
  57.                                                                 send "{@tag} {@general}Skrzynia nie wymaga klucza."
  58.                                                 else:
  59.                                                         send "{@tag} {@important}/case add <name> <type=""key""or""notkey""> "
  60.                                         else:
  61.                                                 send "{@tag} {@important}/case add <name> <type=""key""or""notkey""> " 
  62.                                 else:
  63.                                         send "{@tag} {@important}/case add <name> <type=""key""or""notkey""> "
  64.                         if arg 1 is "remove":
  65.                                 if arg 2 is set:
  66.                                         set {_name} to arg 2
  67.                                         replace all "_" with " " in {_name}
  68.                                         loop {case::chestlist::*}:
  69.                                                 if loop-value is {_name}:
  70.                                                         remove {_name} from {case::chestlist::*}
  71.                                                         delete {case::%{_name}%::itemlist::*}
  72.                                                         delete {case::type::%{_name}%}
  73.                                                         send "{@tag} {@general}Usunieto skrzynie o nazwie {@important}%{_name}%{@general}."
  74.                                                         stop
  75.                                         send "{@tag} {@general}Taka skrzynia nie istnieje!"
  76.                                 else:
  77.                                         send "{@tag} {@important}/case remove <name>"
  78.                         if arg 1 is "edit":
  79.                                 if arg 2 is set:
  80.                                         set {_name} to arg 2
  81.                                         replace all "_" with " " in {_name}
  82.                                         loop {case::chestlist::*}:
  83.                                                 if loop-value is {_name}:
  84.                                                         open chest with 3 rows named "{@important}Edytujesz: {@lore}%{_name}%" to player
  85.                                                         wait 1 tick
  86.                                                         set {_slot} to 0
  87.                                                         loop {case::%{_name}%::itemlist::*}:
  88.                                                                 set slot {_slot} of current inventory of player to loop-value-2
  89.                                                                 add 1 to {_slot}
  90.                                                         set {case::player::%player%::openedit} to "%{_name}%"
  91.                                                         send "{@tag} {@general}Edytujesz zawartosc skrzyni {@important}%{_name}%{@general}." to player
  92.                                                         while inventory name of player is "{@important}Edytujesz: {@lore}%{_name}%":
  93.                                                                 set {case::player::%player%::openedit} to "%{_name}%"
  94.                                                                 wait 5 tick
  95.                                                         stop
  96.                                         send "{@tag} {@general}Taka skrzynia nie istnieje!"
  97.                                 else:
  98.                                         send "{@tag} {@important}/case additem <name>"
  99.                         if arg 1 is "give":
  100.                                 if arg 2 is set:
  101.                                         set {_name} to arg 2
  102.                                         replace all "_" with " " in {_name}
  103.                                         loop {case::chestlist::*}:
  104.                                                 if loop-value is {_name}:
  105.                                                         set {_lore} to "%{case::%{_name}%::itemlist::*}%"
  106.                                                         replace all ", " with "|| {@leere}- {@lore}" in {_lore}
  107.                                                         replace all "and " with "|| {@leere}- {@lore}" in {_lore}
  108.                                                         if arg 3 is set:
  109.                                                                 if arg 4 is set:
  110.                                                                         set {_number} to arg 4 parsed as integer
  111.                                                                 else:
  112.                                                                         set {_number} to 64
  113.                                                                 if arg 3 is "all":
  114.                                                                         loop all players:
  115.                                                                                 if {case::type::%{_name}%} is "key":
  116.                                                                                         add {_number} of chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to loop-player's inventory
  117.                                                                                         add {_number} of 4455 named "{@important}Klucz do skrzyni {@lore}%{_name}%" to loop-player's inventory
  118.                                                                                 else if {case::type::%{_name}%} is "notkey":
  119.                                                                                         add {_number} of ender chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to loop-player's inventory
  120.                                                                 if arg 3 is not "all":
  121.                                                                         set {_player} to arg 3 parsed as offlineplayer
  122.                                                                         if {case::type::%{_name}%} is "key":
  123.                                                                                 add {_number} of chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to {_player}'s inventory
  124.                                                                                 add {_number} of 4455 named "{@important}Klucz do skrzyni {@lore}%{_name}%" to {_player}'s inventory
  125.                                                                         else if {case::type::%{_name}%} is "notkey":
  126.                                                                                 add {_number} of ender chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to {_player}'s inventory
  127.                                                         else:
  128.                                                                 if {case::type::%{_name}%} is "key":
  129.                                                                         add 64 of chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to player's inventory
  130.                                                                         add 64 of 4455 named "{@important}Klucz do skrzyni {@lore}%{_name}%" to player's inventory
  131.                                                                 else:
  132.                                                                         add 64 of ender chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to player's inventory
  133.                                                         stop
  134.                                         send "{@tag} {@general}Taka skrzynia nie istnieje!"
  135.                                 else:
  136.                                         send "{@tag} {@important}/case give <name> [<type=""%%player%%""or""all"">] [<number>]"
  137.                         if arg 1 is "list":
  138.                                 open chest with 6 rows named "{@important}Lista skrzynek:" to player
  139.                                 wait 1 tick
  140.                                 set {_slot} to 0
  141.                                 loop {case::chestlist::*}:
  142.                                         if loop-value contains "<none>":
  143.                                                 remove loop-value from {case::chestlist::*}
  144.                                         set {_lore} to "%{case::%loop-value%::itemlist::*}%"
  145.                                         set {_name%loop-index%} to loop-value
  146.                                         replace all ", " with "|| {@leere}- {@lore}" in {_lore}
  147.                                         replace all "and " with "|| {@leere}- {@lore}" in {_lore}
  148.                                         replace all " " with "_" in {_name%loop-index%}
  149.                                         if {case::type::%loop-value%} is "key":
  150.                                                 format slot {_slot} of player with 1 of chest named "{@important}%loop-value%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to run [close player's inventory]->[wait 2 tick]->[execute player command "case open %{_name%{_slot}%}%"]
  151.                                         else:
  152.                                                 format slot {_slot} of player with 1 of ender chest named "{@important}%loop-value%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to run [close player's inventory]->[wait 2 tick]->[execute player command "case open %{_name%{_slot}%}%"]
  153.                                         add 1 to {_slot}
  154.                                         wait 1 tick
  155.                         if arg 1 is "stats":
  156.                                 if arg 2 is set:
  157.                                         set {_player} to arg 2 parsed as player
  158.                                 else:
  159.                                         set {_player} to player
  160.                                 send "{@tag} {@general}Otworzone skrzynie gracza {@important}%{_player}%{@general}:"
  161.                                 loop {case::chestlist::*}:
  162.                                         if {case::player::%{_player}%::stats::%loop-value%} is set:
  163.                                                 send " {@important}%loop-value%{@leere}: {@general}%{case::player::%{_player}%::stats::%loop-value%}%"
  164.                                         else:
  165.                                                 send " {@important}%loop-value%{@leere}: {@general}0"
  166.                 if arg 1 is "open":
  167.                         if arg 2 is set:
  168.                                 if arg 3 is set:
  169.                                         if player has permission "case.*":
  170.                                                 set {_player} to arg 3 parsed as player
  171.                                         else:
  172.                                                 send "{@tag} {@general}Nie posiadasz uprawnien!"
  173.                                 else:
  174.                                         set {_player} to player
  175.                                 set {_name} to arg 2
  176.                                 replace all "_" with " " in {_name}
  177.                                 loop {case::chestlist::*}:
  178.                                         if loop-value is {_name}:
  179.                                                 set {_lore} to "%{case::%loop-value%::itemlist::*}%"
  180.                                                 replace all ", " with "|| {@leere}- {@lore}" in {_lore}
  181.                                                 replace all "and " with "|| {@leere}- {@lore}" in {_lore}
  182.                                                 set lore of player's tool to " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || "
  183.                                                 if {case::type::%{_name}%} is "key":
  184.                                                         if {_player}'s inventory contains 4455 named "{@important}Klucz do skrzyni {@lore}%{_name}%":
  185.                                                                 if {_player}'s inventory contains chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || ":
  186.                                                                         if {case::player::%{_player}%::openwait} is true:
  187.                                                                                 send "{@tag} {@general}Juz otwierasz skrzynie!" to {_player}
  188.                                                                         else:
  189.                                                                                 if (size of {case::%{_name}%::itemlist::*}) > 0:
  190.                                                                                         add 1 to {case::player::%{_player}%::stats::%{_name}%}
  191.                                                                                         remove 1 4455 named "{@important}Klucz do skrzyni {@lore}%{_name}%" from {_player}'s inventory
  192.                                                                                         remove 1 chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " from {_player}'s inventory
  193.                                                                                         set {case::player::%{_player}%::open} to true
  194.                                                                                         set {case::player::%{_player}%::openwait} to true
  195.                                                                                         open chest with 6 rows named "{@important}Skrzynia {@lore}%{_name}%" to {_player}
  196.                                                                                         wait 1 tick
  197.                                                                                         loop 9 times:
  198.                                                                                                 set {_item%loop-number%} to random element out of {case::%{_name}%::itemlist::*}
  199.                                                                                                 format slot loop-number + 8 of {_player} with {_item%loop-number%} to be unstealable
  200.                                                                                                 format slot loop-number - 1 of {_player} with 1 of black stained glass pane to be unstealable
  201.                                                                                                 format slot loop-number + 17 of {_player} with 1 of black stained glass pane to be unstealable
  202.                                                                                         format slot 4 of {_player} with 1 of hopper to be unstealable
  203.                                                                                         set {_slot} to 0
  204.                                                                                         loop {case::%{_name}%::itemlist::*}:
  205.                                                                                                 if {case::player::%{_player}%::open} is true:
  206.                                                                                                         add 1 to {_slot}
  207.                                                                                                         format slot {_slot} + 26 of {_player} with loop-value-2 to be unstealable
  208.                                                                                                         wait 1 tick
  209.                                                                                         set {_random} to random integer between 20 and 30
  210.                                                                                         wait 1 seconds
  211.                                                                                         loop {_random} times:
  212.                                                                                                 if loop-number > 15:
  213.                                                                                                         loop loop-number - 12 times:
  214.                                                                                                                 wait 1 tick
  215.                                                                                                 else:
  216.                                                                                                         wait 3 tick
  217.                                                                                                 play raw sound "mob.skeleton.death" at {_player} with pitch 8 volume 1
  218.                                                                                                 loop 8 times:
  219.                                                                                                         set {_item%loop-number-2%} to {_item%loop-number-2 + 1%}
  220.                                                                                                         if {case::player::%{_player}%::open} is true:
  221.                                                                                                                 format slot loop-number-2 + 8 of {_player} with {_item%loop-number-2%} to be unstealable
  222.                                                                                                 set {_item9} to random element out of {case::%{_name}%::itemlist::*}
  223.                                                                                                 if {case::player::%{_player}%::open} is true:
  224.                                                                                                         format slot 17 of {_player} with {_item9} to be unstealable
  225.                                                                                         set {case::player::%{_player}%::open} to false
  226.                                                                                         wait 3 seconds
  227.                                                                                         broadcast "{@tag} {@general}Gracz {@important}%{_player}% {@general}wylosowal {@important}%{stored items::*}% {@general}ze skrzyni {@important}%{_name}%{@general}. Gratulacje!"
  228.                                                                                         launch flickering trailing ball firework colored green at {_player} timed 1
  229.                                                                                         add {_item5} to {_player}'s inventory
  230.                                                                                         play raw sound "mob.endermen.portal" at {_player} with pitch 0.1 volume 1
  231.                                                                                         set {case::player::%{_player}%::openwait} to false
  232.                                                                                 else:
  233.                                                                                         send "{@tag} {@general}W tej skrzyni nie mozna nic wylosowac!" to {_player}
  234.                                                                 else:
  235.                                                                         send "{@tag} {@general}Nie posiadasz tej skrzyni!" to {_player}
  236.                                                         else:
  237.                                                                 send "{@tag} {@general}Nie posiadasz klucza do tej skrzyni!" to {_player}
  238.                                                 else:
  239.                                                         if {_player}'s inventory contains ender chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || ":
  240.                                                                 if {case::player::%{_player}%::openwait} is true:
  241.                                                                         send "{@tag} {@general}Juz otwierasz skrzynie!" to {_player}
  242.                                                                 else:
  243.                                                                         if (size of {case::%{_name}%::itemlist::*}) > 0:
  244.                                                                                 add 1 to {case::player::%{_player}%::stats::%{_name}%}
  245.                                                                                 remove 1 ender chest named "{@important}%{_name}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " from {_player}'s inventory
  246.                                                                                 set {case::player::%{_player}%::open} to true
  247.                                                                                 set {case::player::%{_player}%::openwait} to true
  248.                                                                                 open chest with 6 rows named "{@important}Skrzynia {@lore}%{_name}%" to {_player}
  249.                                                                                 wait 1 tick
  250.                                                                                 loop 9 times:
  251.                                                                                         set {_item%loop-number%} to random element out of {case::%{_name}%::itemlist::*}
  252.                                                                                         format slot loop-number + 8 of {_player} with {_item%loop-number%} to be unstealable
  253.                                                                                         format slot loop-number - 1 of {_player} with 1 of black stained glass pane to be unstealable
  254.                                                                                         format slot loop-number + 17 of {_player} with 1 of black stained glass pane to be unstealable
  255.                                                                                 format slot 4 of {_player} with 1 of hopper to be unstealable
  256.                                                                                 set {_slot} to 0
  257.                                                                                 loop {case::%{_name}%::itemlist::*}:
  258.                                                                                         if {case::player::%{_player}%::open} is true:
  259.                                                                                                 add 1 to {_slot}
  260.                                                                                                 format slot {_slot} + 26 of {_player} with loop-value-2 to be unstealable
  261.                                                                                                 wait 1 tick
  262.                                                                                 set {_random} to random integer between 20 and 30
  263.                                                                                 wait 1 seconds
  264.                                                                                 loop {_random} times:
  265.                                                                                         if loop-number > 15:
  266.                                                                                                 loop loop-number - 12 times:
  267.                                                                                                         wait 1 tick
  268.                                                                                         else:
  269.                                                                                                 wait 3 tick
  270.                                                                                         play raw sound "mob.skeleton.death" at {_player} with pitch 8 volume 1
  271.                                                                                         loop 8 times:
  272.                                                                                                 set {_item%loop-number-2%} to {_item%loop-number-2 + 1%}
  273.                                                                                                 if {case::player::%{_player}%::open} is true:
  274.                                                                                                         format slot loop-number-2 + 8 of {_player} with {_item%loop-number-2%} to be unstealable
  275.                                                                                         set {_item9} to random element out of {case::%{_name}%::itemlist::*}
  276.                                                                                         if {case::player::%{_player}%::open} is true:
  277.                                                                                                 format slot 17 of {_player} with {_item9} to be unstealable
  278.                                                                                 set {case::player::%{_player}%::open} to false
  279.                                                                                 wait 3 seconds
  280.                                                                                 broadcast "{@tag} {@general}Gracz {@important}%{_player}% {@general}wylosowal {@important}%{stored items::*}% {@general}ze skrzyni {@important}%{_name}%{@general}. Gratulacje!"
  281.                                                                                 launch flickering trailing ball firework colored green at {_player} timed 1
  282.                                                                                 add {_item5} to {_player}'s inventory
  283.                                                                                 play raw sound "mob.endermen.portal" at {_player} with pitch 0.1 volume 1
  284.                                                                                 set {case::player::%{_player}%::openwait} to false
  285.                                                                         else:
  286.                                                                                 send "{@tag} {@general}W tej skrzyni nie mozna nic wylosowac!" to {_player}
  287.                                                         else:
  288.                                                                 send "{@tag} {@general}Nie posiadasz tej skrzyni!" to {_player}
  289.                                                 stop
  290.                                 send "{@tag} {@general}Taka skrzynia nie istnieje!" to {_player}
  291. on inventory close:
  292.         if {case::player::%player%::open} is true:
  293.                 set {case::player::%player%::open} to false
  294.                 send "{@tag} {@general}Zamknieto podglad losowania."
  295.         if {case::player::%player%::openedit} is set:
  296.                 clear {case::%{case::player::%player%::openedit}%::itemlist::*}
  297.                 loop 27 times:
  298.                         if slot "%loop-number - 1%" parsed as an integer of current inventory of player is not air:
  299.                                 set {_item} to slot loop-number - 1 of current inventory of player
  300.                                 add {_item} to {case::%{case::player::%player%::openedit}%::itemlist::*}
  301.                 clear {case::player::%player%::openedit}
  302.                 send "{@tag} {@general}Zapisano."
  303. on quit:
  304.         set {case::player::%player%::open} to false
  305.         set {case::player::%player%::openwait} to false
  306.         clear {case::player::%player%::openedit}
  307. on death:
  308.         set {case::player::%victim%::open} to false
  309.         set {case::player::%victim%::openwait} to false
  310.         clear {case::player::%player%::openedit}
  311.         if attacker is a player:
  312.                 chance of {@chance death chest}:
  313.                         set {_element} to random element out of {case::chestlist::*}
  314.                         set {_lore} to "%{case::%{_element}%::itemlist::*}%"
  315.                         replace all ", " with "|| {@leere}- {@lore}" in {_lore}
  316.                         replace all "and " with "|| {@leere}- {@lore}" in {_lore}
  317.                         if {case::type::%{_element}%} is "key":
  318.                                 drop chest named "{@important}%{_element}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " at location of victim
  319.                         else:
  320.                                 drop ender chest named "{@important}%{_element}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " at location of victim
  321.                 chance of {@chance death key}:
  322.                         set {_element} to random element out of {case::chestlist::*}
  323.                         if {case::type::%{_element}%} is "notkey":
  324.                                 drop 4455 named "{@important}Klucz do skrzyni {@lore}%{_element}%" at location of victim
  325. on right click:
  326.         if player's tool is chest or ender chest:
  327.                 loop {case::chestlist::*}:
  328.                         if uncolored name of player's tool is loop-value:
  329.                                 cancel event
  330.                                 set {_name} to uncolored name of player's tool
  331.                                 replace all " " with "_" in {_name}
  332.                                 execute player command "case open %{_name}%"
  333.                                 stop
  334.         if player's tool is tripwire hook:
  335.                 if name of player's tool contains "Klucz do skrzyni":
  336.                         cancel event
  337.                         open chest with 6 rows named "{@important}Lista skrzynek:" to player
  338.                         wait 1 tick
  339.                         set {_slot} to 0
  340.                         loop {case::chestlist::*}:
  341.                                 if loop-value contains "<none>":
  342.                                         remove loop-value from {case::chestlist::*}
  343.                                 set {_lore} to "%{case::%loop-value%::itemlist::*}%"
  344.                                 set {_name%loop-index%} to loop-value
  345.                                 replace all ", " with "|| {@leere}- {@lore}" in {_lore}
  346.                                 replace all "and " with "|| {@leere}- {@lore}" in {_lore}
  347.                                 replace all " " with "_" in {_name%loop-index%}
  348.                                 if {case::type::%loop-value%} is "key":
  349.                                         format slot {_slot} of player with 1 of chest named "{@important}%loop-value%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to run [close player's inventory]->[wait 2 tick]->[execute player command "case open %{_name%{_slot}%}%"]
  350.                                 else:
  351.                                         format slot {_slot} of player with 1 of ender chest named "{@important}%loop-value%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || " to run [close player's inventory]->[wait 2 tick]->[execute player command "case open %{_name%{_slot}%}%"]
  352.                                 add 1 to {_slot}
  353.                                 wait 1 tick
  354. on mine of {@block drop}:
  355.         chance of {@chance drop chest}:
  356.                 set {_element} to random element out of {case::chestlist::*}
  357.                 set {_lore} to "%{case::%{_element}%::itemlist::*}%"
  358.                 replace all ", " with "|| {@leere}- {@lore}" in {_lore}
  359.                 replace all "and " with "|| {@leere}- {@lore}" in {_lore}
  360.                 if {case::type::%{_element}%} is "key":
  361.                         drop chest named "{@important}%{_element}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || "
  362.                 else:
  363.                         drop ender chest named "{@important}%{_element}%" with lore " || {@important}W tej skrzyni mozesz zdobyc: || || {@leere}- {@lore}%{_lore}% || "
  364.                 play raw sound "mob.endermen.portal" at player with pitch 0.001 volume 1
  365.                 send "{@tag} {@general}Zdobyles skrzynie {@important}%{_element}%{@general}!"
  366.         chance of {@chance drop key}:
  367.                 set {_element} to random element out of {case::chestlist::*}
  368.                 if {case::type::%{_element}%} is "key":
  369.                         drop 4455 named "{@important}Klucz do skrzyni {@lore}%{_element}%"
  370.                         play raw sound "mob.endermen.portal" at player with pitch 0.001 volume 1
  371.                         send "{@tag} {@general}Zdobyles klucz do skrzyni {@important}%{_element}%{@general}!"