options: alfabetU: "A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z" alfabetL: "a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z" nums: "0-1-2-3-4-5-6-7-8-9" function codeGen(g: integer) :: text: set {_lettU::*} to {@alfabetU} split at "-" set {_lettL::*} to {@alfabetL} split at "-" set {_nums::*} to {@nums} split at "-" loop 4 times: set {_b} to random element out of {_lettU::*} set {_s} to random element out of {_lettL::*} set {_i} to random element out of {_nums::*} if {_code} is not set: set {_code} to "%{_b}%%{_s}%%{_i}%" else: set {_code} to "%{_code}%%{_b}%%{_s}%%{_i}%" return {_code} command /kod [] [] []: trigger: if arg-1 is "gen" or "generuj" or "stworz": if player has permission "sdCode.admin": if arg-2 is set: if (arg-2 parsed as offline player) is online: give (arg-2 parsed as offline player) paper named "&6Przeszedles rekrutacje! Gratulujemy!" with lore "&cKod to %codeGen(0)%"