#AxGuildCore - Skrypt na Skarbiec options: sciezkaCONF: AxGuildCore/AxSkarbiec/Config.yml on load: if yaml value "Config" from file "{@sciezkaCONF}" is not set: set yaml value "Config" from file "{@sciezkaCONF}" to true set yaml value "Wielkosc" from file "{@sciezkaCONF}" to 6 set yaml value "Nazwa Skarbca" from file "{@sciezkaCONF}" to "&6Skarbiec gildii" set yaml value "Nie masz gildi" from file "{@sciezkaCONF}" to "&6Nie posiadasz gildii!" set yaml value "Ktos juz otwiera" from file "{@sciezkaCONF}" to "&6Tylko 1 osoba moze otwierac skarbiec!" set yaml value "Nie ma tej gildii w bazie!" from file "{@sciezkaCONF}" to "&6Tej Gildii nie ma w bazie!" command /skarbiec []: permission: AxSkarbiec permission message: &cBrak uprawnien! trigger: if player has guild: set {_wielkosc} to yaml value "Wielkosc" from file "{@sciezkaCONF}" set {_nazwa} to yaml value "Nazwa Skarbca" from file "{@sciezkaCONF}" if {AxSkarbiec::g::%player guild tag%::otwarte} is not set: set {AxSkarbiec::g::%player guild tag%::otwarte} to false if {AxSkarbiec::g::%player guild tag%::itemy::*} is not set: add "air" parsed as item to {AxSkarbiec::g::%player guild tag%::itemy::*} if {AxSkarbiec::g::%player guild tag%::otwarte} is false: set {AxSkarbiec::g::%player guild tag%::otwarte} to true open chest with {_wielkosc} rows named "%{_nazwa}%" to player loop {AxSkarbiec::itemy::%player guild tag%::*}: set player's current inventory's slot loop-index parsed as integer to loop-value else: send "%yaml value ""Ktos juz otwiera"" from file ""{@sciezkaCONF}""%" else: send "%yaml value ""Nie masz gildi"" from file ""{@sciezkaCONF}""%" on inventory close: set {_nazwa} to yaml value "Nazwa Skarbca" from file "{@sciezkaCONF}" if inventory name of current inventory of player is "%{_nazwa}%": set {AxSkarbiec::g::%player guild tag%::otwarte} to false set {_wielkosc} to yaml value "Wielkosc" from file "{@sciezkaCONF}" clear {AxSkarbiec::itemy::%player guild tag%::*} loop 9*{_wielkosc} times: set {AxSkarbiec::itemy::%player guild tag%::%((loop-number)-1)%} to player's current inventory's slot ((loop-number)-1) on guild create: set {AxSkarbiec::itemy::%guild guild tag%::1} to "air" parsed as item on guild delete: clear {AxSkarbiec::itemy::%guild guild tag%::*}