Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /osiagniecia [<text>] [<text>]:
- trigger:
- if {Osiagniecia::gracz::%player%::pkt} is not set:
- set {Osiagniecia::gracz::%player%::pkt} to 0
- if {Osiagniecia::MaxPkt} is not set:
- set {Osiagniecia::MaxPkt} to 0
- delete {Osiagniecia::lista::*}
- add "Kill", "SKill" and "Chest" to {Osiagniecia::lista::*}
- add 10, 20, 30 ,40 and 50 to {Osiagniecia::lista::Kill::*}
- add 11, 22, 33 ,44 and 55 to {Osiagniecia::lista::SKill::*}
- add 12, 24, 36 ,48 and 60 to {Osiagniecia::lista::Chest::*}
- if arg 1 is "add":
- if arg 2 is set:
- add 10 to {osiagniecia::gracz::%player%::lista::kill::%arg 2%::ilosc}
- send "dodane"
- if arg 1 is "debuge":
- send "OK"
- delete {Osiagniecia::*}
- if arg 1 is not set:
- open chest with 4 rows named "&9---===&f[&4&l Osiagniecia &f]&9===---" to player
- wait a tick
- set {_item} to red stained glass pane
- add 0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 15, 13, 11, 9, 18, 19, 21, 23, 25, 26, 35, 33, 32, 30, 29 and 27 to {_list::*}
- loop {_list::*}:
- set slot loop-value of player's current inventory to orange stained glass pane named "&a"
- while inventory name of player's current inventory contains "&9---===&f[&4&l Osiagniecia &f]&9===---":
- set slot 10 of player's current inventory to stone sword named "&e&l[&5&l Kill &e&l]"
- set slot 12 of player's current inventory to diamond sword named "&e&l[&5&l SKill &e&l]"
- set slot 14 of player's current inventory to chest named "&e&l[&5&l Chest &e&l]"
- set slot 31 of player's current inventory to Fire charge named "&e&l[&5&l Punkty %{Osiagniecia::gracz::%player%::pkt}%/%{Osiagniecia::MaxPkt}% &e&l]"
- add 1 to {_start}
- set slot {_list::%{_start}%} of player's current inventory to {_item} named "&a"
- if {_start} = size of {_list::*}:
- set {_start} to 0
- add 1 to {_loop}
- set {_old} to {_item}
- if {_loop} = 1:
- set {_item} to orange stained glass pane
- if {_loop} = 2:
- set {_item} to yellow stained glass pane
- if {_loop} = 3:
- set {_item} to light green stained glass pane
- if {_loop} = 4:
- set {_item} to green stained glass pane
- if {_loop} = 5:
- set {_item} to blue stained glass pane
- if {_loop} = 6:
- set {_item} to purple stained glass pane
- if {_loop} = 7:
- set {_item} to magenta stained glass pane
- if {_loop} = 8:
- set {_item} to cyan stained glass pane
- if {_loop} = 9:
- set {_item} to light blue stained glass pane
- if {_loop} = 10:
- set {_item} to white stained glass pane
- if {_loop} = 11:
- set {_item} to gray stained glass pane
- if {_loop} = 12:
- set {_item} to black stained glass pane
- else if {_loop} > 12:
- set {_loop} to 0
- wait 3 ticks
- if arg 2 is set:
- set {_strona} to arg 2
- set {_strona} to {_strona} parsed as integer
- set {_stronaSign} to {_strona}+1
- loop {Osiagniecia::lista::*}:
- set {_NameOsiagniecia} to loop-value
- if arg 1 is "%{_NameOsiagniecia}%":
- open chest with 4 rows named "&9---===&f[&4&l Osiagniecia - %{_NameOsiagniecia}% (%{_strona}%) &f]&9===---" to player
- wait a tick
- set slot 34 of player's current inventory to Sign named "&e&l[&5&l Strona %{_stronaSign}% &e&l]"
- set slot 35 of player's current inventory to barrier named "&e&l[&5&l Wroc &e&l]"
- set {_itemsPerPage} to 34
- set {_index} to ({_page}-1)*{_itemsPerPage}+1
- set {_maxIndex} to {_strona}*{_itemsPerPage}+1
- while {_doWhile}:
- if {_index} is smaller than {_maxIndex}:
- if loop-value-1 is "Kill":
- set {_lore} to "Zabij"
- if loop-value-1 is "SKill":
- set {_lore} to "Zabij nie zginac"
- if loop-value-1 is "Chest":
- set {_lore} to "Otworz"
- if {Osiagniecia::lista::%{_NameOsiagniecia}%::%{_index}%} is set:
- if {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_index}%::status} is not set:
- set slot {_index}-1 of player's current inventory to white stained glass pane named "&9&l%{_NameOsiagniecia}% &e&l- &e&l[&5&l %{_index}% &e&l]" with lore "&e&l[&5&l %{_lore}% %{Osiagniecia::lista::%{_NameOsiagniecia}%::%{_index}%}% &e&l]"
- if "%{osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_index}%::status}%" is "Start":
- set slot {_index}-1 of player's current inventory to green stained glass pane named "&9&l%{_NameOsiagniecia}% &e&l- &e&l[&5&l %{_index}% &e&l]" with lore "&e&l[&5&l %{_lore}% %{osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_index}%::ilosc}%/%{Osiagniecia::lista::%{_NameOsiagniecia}%::%{_index}%}% - &aW trakcje &e&l]"
- if "%{osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_index}%::status}%" is "zakonczone":
- set slot {_index}-1 of player's current inventory to red stained glass pane named "&e&l[&5&l %{_lore}% %{Osiagniecia::lista::%{_NameOsiagniecia}%::%{_index}%}% - &aZakonczone &e&l]"
- else:
- exit loop
- else:
- exit loop
- On mor.Inventory Click:
- if inventory name of player's current inventory is set:
- if inventory name of player's current inventory is not "container.crafting":
- cancel event
- if event-item's name is "&e&l[&5&l Wroc &e&l]":
- make player execute command "/osiagniecia"
- if inventory name of player's current inventory is "&9---===&f[&4&l Osiagniecia &f]&9===---":
- loop {Osiagniecia::lista::*}:
- set {_NameOsiagniecia} to loop-value
- set {_stronaSign} to event-item's name
- replace all "&e&l[&5&l Strona " with "" in {_stronaSign}
- replace all " &e&l]" with "" in {_stronaSign}
- set {_stronaSign} to {_stronaSign} parsed as integer
- if event-item's name is "&e&l[&5&l %{_NameOsiagniecia}% &e&l]":
- make player execute command "/osiagniecia %{_NameOsiagniecia}% 1"
- stop
- loop {Osiagniecia::lista::*}:
- set {_NameOsiagniecia} to loop-value
- set {_strona} to inventory name of player's current inventory
- replace all "&9---===&f[&4&l Osiagniecia - %{_NameOsiagniecia}% (" with "" in {_strona}
- replace all ") &f]&9===---" with "" in {_strona}
- if inventory name of player's current inventory is "&9---===&f[&4&l Osiagniecia - %{_NameOsiagniecia}% (%{_strona}%) &f]&9===---":
- if event-item is sign:
- set {_stronaSign} to event-item's name
- replace all "&e&l[&5&l Strona " with "" in {_stronaSign}
- replace all " &e&l]" with "" in {_stronaSign}
- set {_stronaSign} to {_stronaSign} parsed as integer
- if event-item's name is "&e&l[&5&l Strona %{_stronaSign}% &e&l]":
- make player execute command "/osiagniecia %{_NameOsiagniecia}% %{_stronaSign}%"
- stop
- set {_name} to event-item's name
- replace all "&9&lKill &e&l- &e&l[&5&l " with "" in {_name}
- replace all " &e&l]" with "" in {_name}
- set {_name} to {_name} parsed as integer
- if {_name} is set:
- if {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::wykonane} is not set:
- if {_name} is 1:
- set {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::wykonane} to 1
- else:
- send "Musisz wykonac pierwsze osiagniecie ( &9&l%{_NameOsiagniecia}% &e&l- &e&l[&5&l 1 &e&l] )"
- stop
- if {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::wykonane} is set:
- if {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::wykonane} is {_name}:
- if {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_name}%::status} is not set:
- set {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_name}%::status} to "Start"
- set {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_name}%::ilosc} to 0
- make player execute command "/osiagniecia %{_NameOsiagniecia}%"
- stop
- if {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_name}%::status} is "Start":
- if {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_name}%::ilosc} is greater than or equal to {Osiagniecia::lista::%{_NameOsiagniecia}%::%{_name}%}:
- set {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_name}%::status} to "zakonczone"
- delete {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::%{_name}%::ilosc}
- add 1 to {osiagniecia::gracz::%player%::lista::%{_NameOsiagniecia}%::wykonane}
- make player execute command "/osiagniecia %{_NameOsiagniecia}%"
- else:
- send "Musisz wykonac poprzednie osiagniecie"
Advertisement
Add Comment
Please, Sign In to add comment