Anemonex

QuickBuilder

May 24th, 2015
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.93 KB | None | 0 0
  1. on load:
  2.     clear {builder::*}
  3.     if folder "plugins/Skript/scripts/Anemonex" doesn't exists:
  4.         create folder "plugins/Skript/scripts/Anemonex"
  5.     if folder "plugins/Skript/scripts/Anemonex/Builder" doesn't exists:
  6.         create folder "plugins/Skript/scripts/Anemonex/Builder"
  7.     if folder "plugins/Skript/scripts/Anemonex/Builder/buildings" doesn't exists:
  8.         create folder "plugins/Skript/scripts/Anemonex/Builder/buildings"
  9.     if folder "plugins/Skript/scripts/Anemonex/Builder/effects" doesn't exists:
  10.         create folder "plugins/Skript/scripts/Anemonex/Builder/effects"
  11.  
  12.  
  13. command /builder [<text>] [<text>] [<int>] [<int>] [<int>] [<int>] [<int>] [<int>]:
  14.     trigger:
  15.         if sender is player:
  16.             if sender has permission "builder":
  17.                 if arg-1 is "build":
  18.                     if arg-2 is set:
  19.                         set {_x} to x-coordinate of targeted block
  20.                         set {_y} to y-coordinate of targeted block
  21.                         set {_z} to z-coordinate of targeted block
  22.                         if arg-3 is set:
  23.                             if arg-4 is set:
  24.                                 if arg-5 is set:
  25.                                     set {_x} to arg-3
  26.                                     set {_y} to arg-4
  27.                                     set {_z} to arg-5
  28.                         set {_w} to world of targeted block
  29.                         set {_t} to "%arg-2%"
  30.                         if file "plugins/Skript/scripts/Anemonex/Builder/buildings/%{_t}%.schema" exists:
  31.                             function "build.build" {{_x} and {_y} and {_z} and {_w} and {_t}};
  32.                             stop
  33.                         else:
  34.                             send "&cPlik %{_t}%.schema nie zostal znaleziony w folderze plugins/Skript/scripts/Anemonex/Builder/buildings/"
  35.                             stop
  36.                     else:
  37.                         send "&cMusisz podac nazwe pliku!"
  38.                         stop
  39.                 if arg-1 is "save":
  40.                     if arg-2 is set:
  41.                         if file "plugins/Skript/scripts/Anemonex/Builder/buildings/%arg-2%.schema" doesn't exists:
  42.                             if {builder::loc1.%player%} is set:
  43.                                 if {builder::loc2.%player%} is set:
  44.                                     set {_f} to arg-2
  45.                                     set {_w} to world of player
  46.                                     function "save.quick" {{builder::loc1.%player%} and {builder::loc2.%player%} and {_f} and {_w}};
  47.                                     send "&3Schemat zostal zapisany do pliku %arg-2%.schema!"
  48.                                     stop
  49.                                 else:
  50.                                     send "&cDruga lokalizacja nie zostala podana!"
  51.                                     stop
  52.                             else:
  53.                                 send "&cPierwsza lokalizacja nie zostala znaleziona!"
  54.                                 stop
  55.                         else:
  56.                             send "&cPlik o podanej nazwie istnieje!"
  57.                             stop
  58.                     else:
  59.                         send "&cMusisz podac nazwe pliku, w ktorym zostanie zapisany schemat"
  60.                         stop
  61.                 if arg-1 is "help":
  62.                     if arg-2 is "2":
  63.                         send "&7=======================[ &32/4 &7]========================"
  64.                         send "&3/builder build <file> [x] [y] [z] &7- przy pomocy tej komendy stworzysz w wybranym miejscu schemat, ktory zostal zapisany w pliku &3<file>&7. Pamietaj, aby nazwe pliku podac &cbez rozszerzenia .schema&7. Dodatkowo mozesz podac koordynaty, na ktorych rozpoczeta zostanie budowanie. Jezeli tego nie zrobisz, obiekt pojawi sie na miejscu, na ktore patrzyles podczas uzywania komendy."
  65.                         stop
  66.                     if arg-2 is "3":
  67.                         send "&7=======================[ &33/4 &7]========================"
  68.                         send "&3/builder save <file> &7- zapisuje zaznaczony teren do pliku &3<file>&7. Teren mozesz zaznaczyc klikajac PPM i LPM trzymajac patyk. Potrzebujesz do tego pozwolenia &3builder&7 (ktore, jezeli mozesz to przeczytac, posiadasz)."
  69.                         stop
  70.                     if arg-2 is "4":
  71.                         send "&7=======================[ &34/4 &7]========================"
  72.                         send "&3 WKROTCE"
  73.                         stop
  74.                     send "&7=======================[ &31/4 &7]========================"
  75.                     send "&7* &3Strona 2: Wywolywanie schematu"
  76.                     send "&7* &3Strona 3: Zapisywanie schematu"
  77.                     send "&7* &3Strona 4: Linki i informacje od autora"
  78.                     send " "
  79.                     send "&7Wpisz &3/builder help [strona]&7, aby przejsc do wybranej strony"
  80.                     send " "
  81.                     send "&7Legenda:"
  82.                     send "&7* &3<wymagane>"
  83.                     send "&7* &3[opcjonalne]"
  84.                     stop
  85.                 send "&3/builder help"
  86.             else:
  87.                 send "&cBrak uprawnien!"
  88.         else:
  89.             send "Konsola potem, nie mialem czasu :v"
  90.  
  91.  
  92. on leftclick:
  93.     player is holding stick
  94.     player has permission "builder"
  95.     set {builder::loc1.%player%} to location of clicked block
  96.     send "&3Pierwsza pozycja ustawiona!"
  97.     stop
  98.  
  99.  
  100. on rightclick:
  101.     player is holding stick
  102.     player has permission "builder"
  103.     set {builder::loc2.%player%} to location of clicked block
  104.     send "&3Druga pozycja ustawiona!"
  105.     stop
  106.  
  107.  
  108. # ROZPOCZNIJ BUDOWĘ
  109. method "build.rozpocznij" {x and y and z and w and file}:
  110.     set {_lokalizacja.x} to arg{1};
  111.     set {_lokalizacja.y} to arg{2};
  112.     set {_lokalizacja.z} to arg{3};
  113.     set {_lokalizacja.w} to arg{4};
  114.     set {_plik} to arg{5};
  115.     set {_schemat} to content of file "plugins/Skript/scripts/Anemonex/Builder/buildings/%{_plik}%.schema" parsed as text
  116.     replace all "%nl%" with "" in {_schemat}
  117.     replace all " " with "" in {_schemat}
  118.     if last character of {_schemat} is ";":
  119.         set {_skracanie} to length of {_schemat}
  120.         set {_schemat} to first {_skracanie}-1 characters of {_schemat}
  121.     set {_schemat.wiersze::*} to {_schemat} split at ";"
  122.     loop {_schemat.wiersze::*}:
  123.         set {_schemat.podzielone::*} to loop-value-1 split at "="
  124.         set {_schemat.koordynaty.pobierz} to {_schemat.podzielone::1}
  125.         set {_schemat.bloki.pobierz} to {_schemat.podzielone::2}
  126.         set {_schemat.koordynaty::*} to {_schemat.koordynaty.pobierz} split at ","
  127.         set {_schemat.koordynat.x} to {_schemat.koordynaty::1} parsed as integer
  128.         set {_schemat.koordynat.y} to {_schemat.koordynaty::2} parsed as integer
  129.         set {_schemat.koordynat.z} to {_schemat.koordynaty::3} parsed as integer
  130.         set {_schemat.bloki::*} to {_schemat.bloki.pobierz} split at ","
  131.         loop {_schemat.bloki::*}:
  132.             add 1 to {_liczba.x}
  133.             if "%loop-value-2%" contains "[" or "]":
  134.                 set {_stala} to "%loop-value-2%"
  135.                 if {_stala} contains "explosion":
  136.                     function "build.explosion" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  137.                 else if {_stala} contains "ecuboid":
  138.                     function "build.ecuboid" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  139.                 else if {_stala} contains "fcuboid":
  140.                     function "build.fcuboid" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  141.                 else if {_stala} contains "edge":
  142.                     function "build.edge" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  143.                 else if {_stala} contains "line":
  144.                     function "build.line" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  145.                 else if {_stala} contains "build":
  146.                     function "build.build" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  147.                 else if {_stala} contains "wall":
  148.                     function "build.wall" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  149.                 else if {_stala} contains "floor":
  150.                     function "build.floor" {{_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x} and {_lokalizacja.y}+{_schemat.koordynat.y} and {_lokalizacja.z}+{_schemat.koordynat.z} and {_lokalizacja.w} and {_stala}};
  151.             else:
  152.                 set {_blok} to loop-value-2 parsed as item
  153.                 set block at location at {_lokalizacja.x}-1+{_liczba.x}+{_schemat.koordynat.x}, {_lokalizacja.y}+{_schemat.koordynat.y}, {_lokalizacja.z}+{_schemat.koordynat.z} in world {_lokalizacja.w} to {_blok}
  154.         clear {_liczba.x}
  155.  
  156.  
  157. # EKSPLOZJA
  158. method "build.explosion" {x and y and z and w and text}:
  159.     set {_stala} to arg{5};
  160.     replace "explosion[" with "" in {_stala}
  161.     replace "]" with "" in {_stala}
  162.     set {_moc} to {_stala} parsed as integer
  163.     set {_x} to arg{1};
  164.     set {_y} to arg{2};
  165.     set {_z} to arg{3};
  166.     set {_w} to arg{4};
  167.     broadcast "%{_x}%, %{_y}%, %{_z}% in world %{_w}% with power %{_moc}%"
  168.     create an explosion of force {_moc} at location at {_x}, {_y}, {_z} in world {_w}
  169.  
  170.  
  171. # WYPEŁNIONY PROSTOKĄT
  172. method "build.fcuboid" {x and y and z and w and text}:
  173.     set {_x} to arg{1};
  174.     set {_y} to arg{2};
  175.     set {_z} to arg{3};
  176.     set {_w} to arg{4};
  177.     set {_stala} to arg{5};
  178.     replace all "fcuboid[" with "" in {_stala}
  179.     replace "]" with "" in {_stala}
  180.     set {_argumenty::*} to {_stala} split at "."
  181.     set {_blok} to {_argumenty::1} parsed as item
  182.     set {_wartosc.x} to {_argumenty::2} parsed as integer
  183.     set {_wartosc.y} to {_argumenty::3} parsed as integer
  184.     set {_wartosc.z} to {_argumenty::4} parsed as integer
  185.     loop {_wartosc.y} times:
  186.         loop {_wartosc.z} times:
  187.             set {_blok.1} to block at location {_x}, {_y}-1+loop-number-1, {_z}-1+loop-number-2 in world {_w}
  188.             set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}-1+loop-number-1, {_z}-1+loop-number-2 in world {_w}
  189.             loop blocks between {_blok.1} and {_blok.2}:
  190.                 set loop-block to {_blok}
  191.  
  192.  
  193. # PUSTY PROSTOKĄT
  194. method "build.ecuboid" {x and y and z and w and text}:
  195.     set {_x} to arg{1};
  196.     set {_y} to arg{2};
  197.     set {_z} to arg{3};
  198.     set {_w} to arg{4};
  199.     set {_stala} to arg{5};
  200.     replace all "ecuboid[" with "" in {_stala}
  201.     replace "]" with "" in {_stala}
  202.     set {_argumenty::*} to {_stala} split at "."
  203.     set {_blok} to {_argumenty::1} parsed as item
  204.     set {_wartosc.x} to {_argumenty::2} parsed as integer
  205.     set {_wartosc.y} to {_argumenty::3} parsed as integer
  206.     set {_wartosc.z} to {_argumenty::4} parsed as integer
  207.     loop {_wartosc.z} times:
  208.         set {_blok.1} to block at location {_x}, {_y}, {_z}-1+loop-number in world {_w}
  209.         set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}, {_z}-1+loop-number in world {_w}
  210.         loop blocks between {_blok.1} and {_blok.2}:
  211.             set loop-block to {_blok}
  212.     loop {_wartosc.z} times:
  213.         set {_blok.1} to block at location {_x}, {_y}-1+{_wartosc.y}, {_z}-1+loop-number in world {_w}
  214.         set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}-1+{_wartosc.y}, {_z}-1+loop-number in world {_w}
  215.         loop blocks between {_blok.1} and {_blok.2}:
  216.             set loop-block to {_blok}
  217.     loop {_wartosc.y} times:
  218.         set {_blok.1} to block at location {_x}, {_y}-1+loop-number, {_z} in world {_w}
  219.         set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}-1+loop-number, {_z} in world {_w}
  220.         loop blocks between {_blok.1} and {_blok.2}:
  221.             set loop-block to {_blok}
  222.     loop {_wartosc.y} times:
  223.         set {_blok.1} to block at location {_x}, {_y}-1+loop-number, {_z}-1+{_wartosc.z} in world {_w}
  224.         set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}-1+loop-number, {_z}-1+{_wartosc.z} in world {_w}
  225.         loop blocks between {_blok.1} and {_blok.2}:
  226.             set loop-block to {_blok}
  227.     loop {_wartosc.y} times:
  228.         set {_blok.1} to block at location {_x}, {_y}-1+loop-number, {_z} in world {_w}
  229.         set {_blok.2} to block at location {_x}, {_y}-1+loop-number, {_z}-1+{_wartosc.z} in world {_w}
  230.         loop blocks between {_blok.1} and {_blok.2}:
  231.             set loop-block to {_blok}
  232.     loop {_wartosc.y} times:
  233.         set {_blok.1} to block at location {_x}-1+{_wartosc.x}, {_y}-1+loop-number, {_z} in world {_w}
  234.         set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}-1+loop-number, {_z}-1+{_wartosc.z} in world {_w}
  235.         loop blocks between {_blok.1} and {_blok.2}:
  236.             set loop-block to {_blok}
  237.  
  238.  
  239. # KRAWĘDZIE PROSTOKĄTA
  240. method "build.edge" {x and y and z and w and text}:
  241.     set {_x} to arg{1};
  242.     set {_y} to arg{2};
  243.     set {_z} to arg{3};
  244.     set {_w} to arg{4};
  245.     set {_stala} to arg{5};
  246.     replace all "edge[" with "" in {_stala}
  247.     replace "]" with "" in {_stala}
  248.     set {_argumenty::*} to {_stala} split at "."
  249.     set {_blok} to {_argumenty::1} parsed as item
  250.     set {_wartosc.x} to {_argumenty::2} parsed as integer
  251.     set {_wartosc.y} to {_argumenty::3} parsed as integer
  252.     set {_wartosc.z} to {_argumenty::4} parsed as integer
  253.     set {_punkt.1} to block at location {_x}, {_y}, {_z} in world {_w}
  254.     set {_punkt.2} to block at location {_x}-1+{_wartosc.x}, {_y}, {_z} in world {_w}
  255.     set {_punkt.3} to block at location {_x}-1+{_wartosc.x}, {_y}, {_z}-1+{_wartosc.z} in world {_w}
  256.     set {_punkt.4} to block at location {_x}, {_y}, {_z}-1+{_wartosc.z} in world {_w}
  257.     set {_punkt.5} to block at location {_x}, {_y}-1+{_wartosc.y}, {_z} in world {_w}
  258.     set {_punkt.6} to block at location {_x}-1+{_wartosc.x}, {_y}-1+{_wartosc.y}, {_z} in world {_w}
  259.     set {_punkt.7} to block at location {_x}-1+{_wartosc.x}, {_y}-1+{_wartosc.y}, {_z}-1+{_wartosc.z} in world {_w}
  260.     set {_punkt.8} to block at location {_x}, {_y}-1+{_wartosc.y}, {_z}-1+{_wartosc.z} in world {_w}
  261.     loop blocks between {_punkt.1} and {_punkt.2}:
  262.         set loop-block to {_blok}
  263.     loop blocks between {_punkt.2} and {_punkt.3}:
  264.         set loop-block to {_blok}
  265.     loop blocks between {_punkt.3} and {_punkt.4}:
  266.         set loop-block to {_blok}
  267.     loop blocks between {_punkt.4} and {_punkt.1}:
  268.         set loop-block to {_blok}
  269.     loop blocks between {_punkt.1} and {_punkt.5}:
  270.         set loop-block to {_blok}
  271.     loop blocks between {_punkt.2} and {_punkt.6}:
  272.         set loop-block to {_blok}
  273.     loop blocks between {_punkt.3} and {_punkt.7}:
  274.         set loop-block to {_blok}
  275.     loop blocks between {_punkt.4} and {_punkt.8}:
  276.         set loop-block to {_blok}
  277.     loop blocks between {_punkt.5} and {_punkt.6}:
  278.         set loop-block to {_blok}
  279.     loop blocks between {_punkt.6} and {_punkt.7}:
  280.         set loop-block to {_blok}
  281.     loop blocks between {_punkt.7} and {_punkt.8}:
  282.         set loop-block to {_blok}
  283.     loop blocks between {_punkt.8} and {_punkt.5}:
  284.         set loop-block to {_blok}
  285.  
  286.  
  287. # PODŁOGA
  288. method "build.floor" {x and y and z and w and text}:
  289.     set {_x} to arg{1};
  290.     set {_y} to arg{2};
  291.     set {_z} to arg{3};
  292.     set {_w} to arg{4};
  293.     set {_stala} to arg{5};
  294.     replace all "floor[" with "" in {_stala}
  295.     replace "]" with "" in {_stala}
  296.     set {_argumenty::*} to {_stala} split at "."
  297.     set {_blok} to {_argumenty::1} parsed as item
  298.     set {_wartosc.x} to {_argumenty::2} parsed as integer
  299.     set {_wartosc.z} to {_argumenty::3} parsed as integer
  300.     loop {_wartosc.z} times:
  301.         set {_blok.1} to block at location {_x}, {_y}, {_z}-1+loop-number in world {_w}
  302.         set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}, {_z}-1+loop-number in world {_w}
  303.         loop blocks between {_blok.1} and {_blok.2}:
  304.             set loop-block to {_blok}
  305.  
  306.  
  307. # ŚCIANA
  308. method "build.wall" {x and y and z and w and text}:
  309.     set {_x} to arg{1};
  310.     set {_y} to arg{2};
  311.     set {_z} to arg{3};
  312.     set {_w} to arg{4};
  313.     set {_stala} to arg{5};
  314.     replace all "wall[" with "" in {_stala}
  315.     replace "]" with "" in {_stala}
  316.     set {_argumenty::*} to {_stala} split at "."
  317.     set {_blok} to {_argumenty::1} parsed as item
  318.     set {_wartosc.x} to {_argumenty::2} parsed as integer
  319.     set {_wartosc.y} to {_argumenty::3} parsed as integer
  320.     set {_kierunek} to {_argumenty::4} parsed as integer
  321.     loop {_wartosc.y} times:
  322.         set {_blok.1} to block at location {_x}, {_y}-1+loop-number, {_z} in world {_w}
  323.         if {_kierunek} is 0:
  324.             set {_blok.2} to block at location {_x}-1+{_wartosc.x}, {_y}-1+loop-number, {_z} in world {_w}
  325.         if {_kierunek} is 1:
  326.             set {_blok.2} to block at location {_x}, {_y}-1+loop-number, {_z}-1+{_wartosc.x} in world {_w}
  327.         loop blocks between {_blok.1} and {_blok.2}:
  328.             set loop-block to {_blok}
  329.  
  330.  
  331. # PROSTA
  332. method "build.line" {x and y and z and w and text}:
  333.     set {_x} to arg{1};
  334.     set {_y} to arg{2};
  335.     set {_z} to arg{3};
  336.     set {_w} to arg{4};
  337.     set {_stala} to arg{5};
  338.     replace all "line[" with "" in {_stala}
  339.     replace "]" with "" in {_stala}
  340.     set {_argumenty::*} to {_stala} split at "."
  341.     set {_blok} to {_argumenty::1} parsed as item
  342.     set {_wartosc.x} to {_argumenty::2} parsed as integer
  343.     set {_wartosc.y} to {_argumenty::3} parsed as integer
  344.     set {_wartosc.z} to {_argumenty::4} parsed as integer
  345.     set {_punkt.1} to block at location {_x}, {_y}, {_z} in world {_w}
  346.     set {_punkt.2} to block at location {_x}+{_wartosc.x}, {_y}+{_wartosc.y}, {_z}+{_wartosc.z} in world {_w}
  347.     loop blocks between {_punkt.1} and {_punkt.2}:
  348.         set loop-block to {_blok}
  349.  
  350.  
  351. # BUDYNEK ZE SCHEMATU
  352. method "build.build" {x and y and z and w and text}:
  353.     set {_x} to arg{1};
  354.     set {_y} to arg{2};
  355.     set {_z} to arg{3};
  356.     set {_w} to arg{4};
  357.     set {_stala} to arg{5};
  358.     replace all "build[" with "" in {_stala}
  359.     replace "]" with "" in {_stala}
  360.     if file "plugins/Skript/scripts/Anemonex/Builder/buildings/%{_stala}%.schema" exists:
  361.         function "build.rozpocznij" {{_x} and {_y} and {_z} and {_w} and {_stala}};
  362.  
  363.  
  364. # ZAPISYWANIE SZYBKIE
  365. method "save.quick" {loc1 and loc2 and file and world}:
  366.     set {_loc1} to arg{1};
  367.     set {_loc2} to arg{2};
  368.     set {_plik} to arg{3};
  369.     set {_w} to arg{4};
  370.     create file "plugins/Skript/scripts/Anemonex/Builder/buildings/%{_plik}%.schema"
  371.     set {_x1} to x-coordinate of {_loc1}
  372.     set {_y1} to y-coordinate of {_loc1}
  373.     set {_z1} to z-coordinate of {_loc1}
  374.     set {_x2} to x-coordinate of {_loc2}
  375.     set {_y2} to y-coordinate of {_loc2}
  376.     set {_z2} to z-coordinate of {_loc2}
  377.     if {_x2} is bigger than {_x1}:
  378.         set {_temp} to {_x2}
  379.         set {_x2} to {_x1}
  380.         set {_x1} to {_temp}
  381.     if {_y2} is bigger than {_y1}:
  382.         set {_temp} to {_y2}
  383.         set {_y2} to {_y1}
  384.         set {_y1} to {_temp}
  385.     if {_z2} is bigger than {_z1}:
  386.         set {_temp} to {_z2}
  387.         set {_z2} to {_z1}
  388.         set {_z1} to {_temp}
  389.     set {_x} to {_x1} - {_x2} + 1
  390.     set {_y} to {_y1} - {_y2} + 1
  391.     set {_z} to {_z1} - {_z2} + 1
  392.     loop {_x} times:
  393.         loop {_y} times:
  394.             loop {_z} times:
  395.                 set {_nowy.x} to {_x2} - 1 + loop-number-1
  396.                 set {_nowy.y} to {_y2} - 1 + loop-number-2
  397.                 set {_nowy.z} to {_z2} - 1 + loop-number-3
  398.                 set {_b} to id of block at location {_nowy.x}, {_nowy.y}, {_nowy.z} in world {_w}
  399.                 set {_m} to data value of block at location {_nowy.x}, {_nowy.y}, {_nowy.z} in world {_w}
  400.                 set {_wf} to "%{_b}%"
  401.                 if {_m} is not 0:
  402.                     set {_wf} to "%{_b}%:%{_m}%"
  403.                 wf "%loop-number-1 + 1 - 2%,%loop-number-2 + 1 - 2%,%loop-number-3 + 1 - 2% = %{_wf}%;" to "plugins/Skript/scripts/Anemonex/Builder/buildings/%{_plik}%.schema"
Advertisement
Add Comment
Please, Sign In to add comment