#skrypt FG-Holo by LloydPL #Wymagania: Skript, FunnySkAddon-Extended v1.7.1+ (Dla FG 4.4.0 FSA-E 1.8+), skRayFall, HolographicDisplays #pozwala on na stawianie dowolnej ilosci topek graczy i gildii oraz usuwanie ich #posiada on konfiguracje zrobiona w Options #zmiana komendy odradzana z powodu uzywania jej w kodzie #opis konfiguracji: #format-pl, format-gu - Zawieraja format wyswietlania danej topki #null-pl, null-gu - Zawieraja format wyswietlania danej topki gdy na danym miejscu nie ma żadnych gildii #zmienne dla format-* i null-*: # {POSITION} - miejsce w tabeli # {GUILD} - gildia gracza lub z topki # {TAG} - tag gildii gracza lub z topki # {POINTS} - punkty gracza lub gildii # {PLAYER} - gracz z topki (tylko w formacie gracza) # {NOTHING} - jesli nie chcesz aby nie bylo pustych miejsc w teli wpisz to w null-pl/gu #title-pl, title-gu - Tytul tanej topki #amount-pl, amount-gu - Ilosc miejsc danej topki #refresh-time - Czas odswiezania topki (w sekundach) options: format-pl: &a&l{POSITION} &7- [&f&l{TAG}&7] &6&l{PLAYER} &7(&d&l{POINTS}&7) title-pl: &c&lTopka graczy null-pl: &a{POSITION} &7- BRAK amount-pl: 10 format-gu: &a&l{POSITION} &7- [&f&l{TAG}&7] &6&l{GUILD} &7(&d&l{POINTS}&7) title-gu: &c&lTopka gildii null-gu: &a{POSITION} &7- BRAK amount-gu: 10 refresh-time: 200 tag: &7&l[&a&lFG&5&l-&6&lHolo&7&l] command /fgholo [] [] []: trigger: if player doesn't have permission "fgholotop.*": send "{@tag} &4Niewystarczajace uprawnienia!" stop if arg-1 is "player": if arg-2 is "place": set {_i} to 1 while {fgholotop::player-tops::%{_i}%} is set: set {_i} to {_i}+1 set {fgholotop::player-tops::%{_i}%} to {_i} set {fgholotop::player-tops::%{_i}%::loc} to location of player create holo object "" with id "fgholotop-pl-%{_i}%" at location of player execute console command "fgholo refresh" send "{@tag} &2Holo-Topka graczy o &eID %{_i}% &2zostala pomyslnie utworzona!" else if arg-2 is "delete": if arg-3 is not set: send "{@tag} &4ID Holo-Topki graczy nie zostalo wprowadzone!" stop if {fgholotop::player-tops::%arg-3%} is not set: send "{@tag} &4Holo-Topka graczy o &eID %arg-3% &4nie istnieje!" stop delete holo object "fgholotop-pl-%arg-3%" delete {fgholotop::player-tops::%arg-3%} delete {fgholotop::player-tops::%arg-3%::loc} send "{@tag} &2Holo-Topka graczy o &eID %arg-3% &2zostala pomyslnie usunieta!" else if arg-2 is "list": if size of {fgholotop::player-tops::*} = 0: send "{@tag} &2Brak Holo-Topek graczy!" stop send "{@tag} &2Lista Holo-Topek graczy:" loop {fgholotop::player-tops::*}: send "&eID: %loop-value% &7&lKoordy: &e&l%{fgholotop::player-tops::%loop-value%::loc}%" else: send "{@tag} &4Niepoprawny argument! Wpisz &e/fgholotop help &4aby uzyskac pomoc." else if arg-1 is "guild": if arg-2 is "place": set {_i} to 1 while {fgholotop::guild-tops::%{_i}%} is set: set {_i} to {_i}+1 set {fgholotop::guild-tops::%{_i}%} to {_i} set {fgholotop::guild-tops::%{_i}%::loc} to location of player create holo object "" with id "fgholotop-gu-%{_i}%" at location of player execute console command "fgholo refresh" send "{@tag} &2Holo-Topka gildii o &eID %{_i}% &2zostala pomyslnie utworzona!" else if arg-2 is "delete": if arg-3 is not set: send "{@tag} &4ID Holo-Topki gildii nie zostalo wprowadzone!" stop if {fgholotop::guild-tops::%arg-3%} is not set: send "{@tag} &4Holo-Topka gildii o &eID %arg-3% &4nie istnieje!" stop delete holo object "fgholotop-gu-%arg-3%" delete {fgholotop::guild-tops::%arg-3%} delete {fgholotop::guild-tops::%arg-3%::loc} send "{@tag} &2Holo-Topka gildii o &eID %arg-3% &2zostala pomyslnie usunieta!" else if arg-2 is "list": if size of {fgholotop::guild-tops::*} = 0: send "{@tag} &2Brak Holo-Topek gildii!" stop send "{@tag} &2Lista Holo-Topek gildii:" loop {fgholotop::guild-tops::*}: send "&eID: %loop-value% &7&lKoordy: &e&l%{fgholotop::guild-tops::%loop-value%::loc}%" else: send "{@tag} &4Niepoprawny argument! Wpisz &e/fgholotop help &4aby uzyskac pomoc." else if arg-1 is "refresh": update guild tops if size of {fgholotop::player-tops::*} > 0: if {@amount-pl} < 1: set {_am-p} to 1 else: set {_am-p} to {@amount-pl} set {_top-p} to "{@title-pl}" loop {_am-p} times: set {_ln} to loop-number set {_p} to "$NULL" set {_p} to player in position {_ln} if {_p} is "$NULL": if "{@null-pl}" is not "{NOTHING}": set {_top-p} to "%{_top-p}%;{@null-pl}" replace all "{POSITION}" in {_top-p} with "%loop-number%" else: set {_top-p} to "%{_top-p}%;{@format-pl}" replace all "{PLAYER}" in {_top-p} with "%{_p}%" replace all "{POSITION}" in {_top-p} with "%loop-number%" replace all "{POINTS}" in {_top-p} with "%{_p} points%" if {_p} guild is set: replace all "{GUILD}" in {_top-p} with "%{_p} guild%" replace all "{TAG}" in {_top-p} with "%({_p} guild) guild tag%" else: replace all "{GUILD}" in {_top-p} with "N/A" replace all "{TAG}" in {_top-p} with "N/A" loop {fgholotop::player-tops::*}: edit holo object "fgholotop-pl-%loop-index%" to {_top-p} if size of {fgholotop::guild-tops::*} > 0: if {@amount-gu} < 1: set {_am-g} to 1 else: set {_am-g} to {@amount-gu} set {_top-g} to "{@title-gu}" loop {_am-g} times: set {_ln} to loop-number set {_g} to "$NULL" set {_g} to guild in position {_ln} if {_g} is "$NULL": if "{@null-gu}" is not "{NOTHING}": set {_top-g} to "%{_top-g}%;{@null-gu}" replace all "{POSITION}" in {_top-g} with "%loop-number%" else: set {_top-g} to "%{_top-g}%;{@format-gu}" replace all "{POSITION}" in {_top-g} with "%loop-number%" replace all "{POINTS}" in {_top-g} with "%{_g} guild points%" replace all "{GUILD}" in {_top-g} with "%{_g}%" replace all "{TAG}" in {_top-g} with "%{_g} guild tag%" loop {fgholotop::guild-tops::*}: edit holo object "fgholotop-gu-%loop-index%" to {_top-g} if command executor is console: stop send "{@tag} &2Odswiezono Holo-Topki gildii i graczy!" else if arg-1 is "help": send "{@tag} &2Pomoc dotyczaca komend:" send "&6/fgholo [player/guild] place &7- &2Tworzy topke graczy/gildii w hologramach" send "&6/fgholo [player/guild] delete [ID] &7- &2Usuwa topke graczy/gildii w hologramach po podanym ID" send "&6/fgholo [player/guild] list &7- &2Wyswietla liste topek graczy/gildii w hologramach wraz z ich koordynatami i ID" send "&6/fgholo refresh &7- &2Odswieza topki gildii i graczy, konsola nie otrzymuje odpowiedzi" send "&6/fgholo author &7- &2Wyswietla informacje o autorze skryptu" send "&6/fgholo help &7- &2Wyswietla informacje dotyczace komend skryptu" else if arg-1 is "author": send "{@tag} &aAutorem skryptu na topki w hologramach jest &eLloydPL" else: send "{@tag} &4Niepoprawny argument! Wpisz &e/fgholo help &4aby uzyskac pomoc." on skript load: loop {fgholotop::player-tops::*}: create holo object "" with id "fgholotop-pl-%loop-value%" at {fgholotop::player-tops::%loop-index%::loc} loop {fgholotop::guild-tops::*}: create holo object "" with id "fgholotop-gu-%loop-value%" at {fgholotop::guild-tops::%loop-index%::loc} execute console command "fgholo refresh" every {@refresh-time} seconds: execute console command "fgholo refresh"