patison234

Top3Heads

Apr 17th, 2014
665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.77 KB | None | 0 0
  1. # # # # # # # # # # # # # # # #
  2. # Script by PatisonPlayGames  #
  3. # Name: Top3Heads             #
  4. # Version: 2.1                #
  5. # Skript: 2.0.2/2.1           #
  6. # # # # # # # # # # # # # # # #
  7.  
  8.  
  9.  
  10. #=============================================#
  11. #  Licencja Top3Heads by PatisonPlayGames!    #
  12. # + Nie zezwalam na:                          #
  13. # - Usuwanie tresci o autorze!                #
  14. # - Udostepnaniu skryptu innym!               #
  15. # - Podszywanie sie pod autora!               #
  16. # - Uzywanie kodu skryptu w swoich skryptach! #
  17. # - Zarabianie na skrypcie!                   #
  18. # + Zezwalam na:                              #
  19. # - Dodawanie kodu na swoja potrzebe!         #
  20. # - Modyfikowanie wiadomosci!                 #
  21. #=============================================#
  22.  
  23.  
  24. options:
  25.    
  26.    
  27.     # Tag wyświetlany przed wiadomosciami skryptu:
  28.     tag: &7[&6Top3Heads&7] 
  29.    
  30.     # W która strone ma głowa się patrzec (pólnoc - 16 , poludnie  8 , wschod 20 , zachod 12)
  31.     compass: 8
  32.    
  33.     # Po jakim czasie głowy mają sie odświezac
  34.     time: 5
  35.    
  36.     # W jakich jednostack ma byc liczony czas!
  37.     time-span: minutes
  38.    
  39.     #Wiadomosc przy braku permission.
  40.     permission: &cNie masz uprawnien do tej komendy!
  41.    
  42.     # Skroty do komendy:
  43.     aliasy: heads , top, top3
  44.    
  45.    
  46.    
  47. command /top3heads [<text>] [<text>] [<text>]:
  48.     aliases: {@aliasy}
  49.     trigger:
  50.         if arg 1 is "setloc" or "ustaw":
  51.             if player has permission "top3heads.setloc" or "top3heads.*":
  52.                 set {_arg2} to argument 2 parsed as integer
  53.                 if {_arg2} is 1 or 2 or 3:
  54.                     set {top3heads.location.x::%arg 2%} to x coord of player
  55.                     set {top3heads.location.y::%arg 2%} to y coord of player
  56.                     set {top3heads.location.z::%arg 2%} to z coord of player
  57.                     set {top3heads.location::%arg 2%} to location of player
  58.                     set {top3heads.location.sign::%arg 2%} to location of targeted block
  59.                     send " {@tag} &aUstawiono lokacje glowy na miejscu &8%arg 2%"
  60.                     stop
  61.             else:
  62.                 send "{@tag} {@permission}"
  63.                 stop
  64.         if arg 1 is "setsign" or "sign":
  65.             if player has permission "top3heads.sign" or "top3heads.*":
  66.                 set {_arg2} to argument 2 parsed as integer
  67.                 if {_arg2} is 1 or 2 or 3: 
  68.                     set {top3heads.location.sign::%arg 2%} to location of targeted block
  69.                     send "{@tag} &aUstawiono lokacje tabliczki na miejscu &8%arg 2%"
  70.                     stop
  71.             else:
  72.                 send "{@tag} {@permission}"
  73.                 stop
  74.         if arg 1 is "reload":
  75.             if player has permission "top3heads.reload" or "top3heads.*":
  76.                 execute console command "/sk reload %script%"
  77.                 send "{@tag} &cPrzeladowano ....."
  78.                 stop
  79.             else:
  80.                 send "{@tag} {@permission}"
  81.                 stop
  82.                
  83.                
  84.                
  85. every {@time} {@time-span}:
  86.     execute console command "/top"
  87.     loop 3 times:
  88.         set block at {top3heads.location::%loop-number%} to air
  89.         execute console command "/setblock %{top3heads.location.x::%loop-number%}% %{top3heads.location.y::%loop-number%}% %{top3heads.location.z::%loop-number%}% minecraft:skull 1 replace {ExtraType:%{top::%loop-number%}%,SkullType:3,Rot:{@compass}}"
  90.         set line 1 of block at {top3heads.location.sign::%loop-number%} to "%{top::%loop-number%}%"
  91.         set line 2 of block at {top3heads.location.sign::%loop-number%} to "%{toppkt::%loop-number%}%"
  92.  
  93.  
  94.  
  95.  
  96. on join:
  97.     {smierci::%player%} is not set:
  98.         set {smierci::%player%} to "0 %player%"
  99.  
  100.  
  101. on death of player:
  102.         attacker is a player
  103.         {smierci::%player%} is not set:
  104.                 set {smierci::%player%} to "0 %player%"
  105.         set {_l::*} to {smierci::%player%} split at " "
  106.         set {_l::1} to {_l::1} parsed as integer
  107.         add 1 to {_l::1}
  108.         set {smierci::%player%} to "%{_l::1}% %player%"
  109.  
  110. command /top:
  111.     executable by: console
  112.     trigger:
  113.         loop {smierci::*}:
  114.             set {_l::*} to loop-value split at " "
  115.             add {_l::1} parsed as integer to {_v::*}
  116.             add {_l::2} to {_n::*}
  117.         set {_num} to size of {_v::*}
  118.         loop {_num} times:
  119.             loop {_v::*}:
  120.                 {_v.%loop-number%} is not set:
  121.                     set {_v.%loop-number%} to loop-value
  122.                     set {_n.%loop-number%} to loop-index
  123.                 loop-value is greater than {_v.%loop-number%}:
  124.                     set {_v.%loop-number%} to loop-value
  125.                     set {_n.%loop-number%} to loop-index
  126.             remove {_v.%loop-number%} from {_v::*}
  127.         loop {_num} times:
  128.             loop-number is less than or equal to 3:
  129.                 loop-number is 1:
  130.                     set {top::1} to "%{_n::%{_n.%loop-number%}%}%"
  131.                     set {toppkt::1} to {_v.%loop-number%}
  132.                 loop-number is 2:
  133.                     set {top::2} to "%{_n::%{_n.%loop-number%}%}%"
  134.                     set {toppkt::2} to {_v.%loop-number%}
  135.                 loop-number is 3:
  136.                     set {top::3} to "%{_n::%{_n.%loop-number%}%}%"
  137.                     set {toppkt::3} to {_v.%loop-number%}              
  138.                 send " &f%loop-number%. &7%{_n::%{_n.%loop-number%}%}% (&f%{_v.%loop-number%}%&7)"
  139.         {_num} is less than 3:
  140.             set {_r} to {_num}
  141.             loop 3 - {_num} times:
  142.                 add 1 to {_r}
  143.                 send " &f%{_r}%. &7brak"
Advertisement
Add Comment
Please, Sign In to add comment