Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on join:
- set "targi.options.ulepszenie" to "1" in yaml file "plugins/Skript/Profile/%{nick::%player%}%.yml"
- loop 27 times:
- set "targi.slot.%loop-number%" to "false" in yaml file "plugins/Skript/Profile/%{nick::%player%}%.yml"
- command /plecak [<text>]:
- trigger:
- if player has permission "VIP.DODATKI":
- set {_rows} to 6
- else:
- set {_u} to single value "targi.options.ulepszenie" get of "plugins/Skript/Profile/%{nick::%player%}%.yml"
- set {_rows} to {_u}
- open chest with {_rows} rows named "Plecak" to player
- wait 2 ticks
- set {_l::*} to configuration section "targi.slot" get of "plugins/Skript/Profile/%{nick::%player%}%.yml"
- loop {_l::*}:
- set {_c} to loop-value
- set {_c} to "%{_c}%" parsed as item
- set player's current inventory slot loop-index to {_c}
- send "&9Otworzono Plecak."
- on inventory close:
- if inventory name of player's current inventory is "Plecak":
- if player has permission "VIP.DODATKI":
- set {_rows} to 6
- else:
- set {_u} to single value "targi.options.ulepszenie" get of "plugins/Skript/Profile/%{nick::%player%}%.yml"
- set {_rows} to {_u}
- set {_x} to {_rows}*9
- loop {_x} times:
- set "targi.slot.%loop-number%" to "%player's current inventory slot {_x}%" in yaml file "plugins/Skript/Profile/%{nick::%player%}%.yml"
- send "&9Zamknieto plecak"
- on rightclick with flint:
- if player has permission "VIP.DODATKI":
- send "&7Masz &6VIP&7, twoj plecak jest juz ulepszony na maksymalny poziom!"
- stop
- if lore of event-item is "&dUlepsza twoj plecak do 2 paskow.":
- set {_u} to single value "targi.options.ulepszenie" get of "plugins/Skript/Profile/%{nick::%player%}%.yml"
- set {_rows} to {_u}
- if {_u} is 2:
- send "&7Twoj plecak juz jest ulepszony na 2 poziom!"
- else:
- remove 1 of event-item from player
- send "&7Ulepszyles swoj plecak!"
- set "targi.options.ulepszenie" to "2" in yaml file "plugins/Skript/Profile/%{nick::%player%}%.yml"
- stop
- if lore of event-item is "&dUlepsza twoj plecak do 3 paskow.":
- if {_u} is 3:
- send "&7Twoj plecak juz jest ulepszony na maksymalny poziom!"
- else:
- remove 1 of event-item from player
- send "&7Ulepszyles swoj plecak!"
- set "targi.options.ulepszenie" to "3" in yaml file "plugins/Skript/Profile/%{nick::%player%}%.yml"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement