options: karabin: nether brick named "&aKarabin" maxpow: 64 listsize: 6 variables: {karabin::pow::%player%} = 16 {karabin::globalvar} = true on rightclick: if player's tool is {@karabin}: if {karabin::globalvar} is false: send "&cKarabin jest zablokowany dla wszystkich!" stop if {karabin::allowed::%player%} is set: shoot arrow from player with speed {karabin::pow::%player%} else if player has permission "karabin.*": shoot arrow from player with speed {karabin::pow::%player%} else if player has permission "karabin.bypass": shoot arrow from player with speed {karabin::pow::%player%} else: send "&cKarabin jest dla ciebie zablokowany lub nie masz permisji &ekarabin.bypass&c! Skontaktuj sie z administratorem jesli wierzysz ze to blad!" command /karabin [] [] []: aliases: kar trigger: if player does not have permission "karabin.*": send "&cNie masz permisji &ekarabin.*&c! Skontaktuj sie z administratorem jesli wierzysz ze to blad!" else: if arg-1 is "give": if arg-2 is set: give (arg-2 parsed as player) {@karabin} send "&aDales karabin dla &e%arg-2%&a!" send "&aOtrzymales karabin!" to (arg-2 parsed as player) else: if commandexecutor is player: give player {@karabin} send "&aOtrzymales karabin!" else: send "&cAby otrzymac karabin musisz byc graczem!" else if arg-1 is "setpow": set {_pow} to arg-2 parsed as integer if "%{_pow}%" is not arg-2: send "&cMoc musi byc liczba calkowita!" stop if {_pow} > {@maxpow}: set {_pow} to {@maxpow} if {_pow} < 1: set {_pow} to 1 if arg-3 is set: set {karabin::pow::%arg-3%} to {_pow} send "&aUstawiles moc karabinu gracza &e%arg-3% &ana &e%{karabin::pow::%arg-3%}%&a!" else: if commandexecutor is player: set {karabin::pow::%player%} to {_pow} send "&aUstawiles sile karabinu na &e%{karabin::pow::%player%}%&a!" else: send "&cAby ustawic moc swojego karabinu musisz byc graczem!" else if arg-1 is "pow": if arg-2 is set: send "&aSila karabinu gracza &e%arg-2%&7: &e%{karabin::pow::%arg-2%}%" else: if commandexecutor is player: send "&aSila karabinu&7: &e%{karabin::pow::%player%}%" else: send "&cAby sprawdzic moc swojego karabinu musisz byc graczem!" else if arg-1 is "allow": if arg-2 is set: if {karabin::allowed::%arg-2%} is not set: set {karabin::allowed::%arg-2%} to arg-2 send "&aPozwoliles graczowi &e%arg-2% &ana uzywanie karabinu!" stop send "&cGracz &e%arg-2% &cjuz moze uzywac karabinu!" else: send "&cPodaj gracza" else if arg-1 is "deny": if arg-2 is set: if {karabin::allowed::%arg-2%} is set: delete {karabin::allowed::%arg-2%} send "&aZabroniles graczowi &e%arg-2% &ana uzywanie karabinu!" stop send "&cGracz &e%arg-2% &cjuz nie mogl uzywac karabinu!" else: send "&cPodaj gracza" else if arg-1 is "list": if arg-2 is not set: set {_s} to 0 else if "%arg-2 parsed as integer%" is arg-2: set {_s} to arg-2 parsed as integer else: send "&cArgument nie jest liczba!" stop if {_s} > (round up ((size of {karabin::allowed::*}) / {@listsize})): set {_s} to (round up ((size of {karabin::allowed::*}) / {@listsize})) if {_s} <= 0: set {_s} to 1 loop {karabin::allowed::*}: add 1 to {_current} if {@listsize} <= {_max}: exit loop if ({_s}-1)*{@listsize} < {_current}: add 1 to {_max} add loop-value to {_l::*} #set {_l::*} to getListPart({_s}, {@listsize}, {karabin::allowed::*}) set {_i} to ({_s}-1)*{@listsize} send "&aStrona &e%{_s}%/%(round up ((size of {karabin::allowed::*}) / {@listsize}))% &alisty graczy (&e%size of {karabin::allowed::*}%&a) mogacych uzywac karabinu:" loop {_l::*}: if loop-value is set: add 1 to {_i} send "&7%{_i}%: &e%loop-value%" else if arg-1 is "block": if arg-2 is not set: send "&cPodaj &e2 &cargument! &7(&eon&7/&eoff&7)" stop if arg-2 is "on": set {karabin::globalvar} to false send "&aZablokowales mozliwosc uzywania karabinu!" else if arg-2 is "off": set {karabin::globalvar} to true send "&aOdblokowales mozliwosc uzywania karabinu!" else: send "&cMozliwe formy argumentu &e2 &c to &eon&7/&eoff&c!" else if arg-1 is "autor": send "&aAutorem skryptu jest &e_lloydpl_ &aaka. &ellazuli_" else: send "&aPomoc dot. komend &e/karabin&a:" send "&a/karabin give [/gracz] &7- &eDaje karabin wykonawcy komendy lub ustalonemu graczu" send "&a/karabin setpow [1-{@maxpow}] [/gracz] &7- &eUstawia moc karabinu wykonawcy komendy lub ustalonemu graczu" send "&a/karabin pow [/gracz] &7- &ePodaje moc karabinu wykonawcy komendy lub ustalonemu graczu" send "&a/karabin allow [gracz] &7- &eDaje graczowi uprawnienia do uzywania karabinu" send "&a/karabin deny [gracz] &7- &eZabiera graczowi uprawnienia do uzywania karabinu" send "&a/karabin list [/strona] &7- &ePokazuje liste graczy z uprawnieniami do uzywania karabinu" send "&a/karabin block [on/off] &7- &eWlacza/wylacza mozliwosc uzywania na serwerze przez wszystkich" send "&a/karabin autor &7- &ePokazuje autora skryptu"