Anteks12345

Pet manager

Apr 20th, 2014
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.52 KB | None | 0 0
  1. #▒█▀▀█ █▀▀ ▀▀█▀▀
  2. #▒█▄▄█ █▀▀ ░░█░░
  3. #▒█░░░ ▀▀▀ ░░▀░░
  4. #
  5. #█▀▄▀█ █▀▀█ █▀▀▄ █▀▀█ █▀▀▀ █▀▀ █▀▀█
  6. #█░▀░█ █▄▄█ █░░█ █▄▄█ █░▀█ █▀▀ █▄▄▀
  7. #▀░░░▀ ▀░░▀ ▀░░▀ ▀░░▀ ▀▀▀▀ ▀▀▀ ▀░▀▀
  8. #
  9. # Parrot © 2014
  10. #
  11. # Wersja 1.2 beta
  12.  
  13. #
  14. #
  15. #            Update-Checker
  16. #
  17. #
  18.  
  19. on script load:
  20.     set {_v} to "1.2"
  21.     set {_vp} to text from url "http://pastebin.com/raw.php?i=SBtiptyk"
  22.     if "%{_v}%" is not "%{_vp}%":
  23.         broadcast " "
  24.         broadcast " "
  25.         broadcast "&4Nowa wersja skryptu &6PetManager &4zostala wydana!"
  26.         broadcast "&4Pobierz ja na &6http://pastebin.com/raw.php?i=JfGaarnJ"
  27.         broadcast " "
  28.         broadcast " "
  29.  
  30. #
  31. #                              
  32. #            Lapanie            
  33. #                              
  34. #
  35.  
  36. on rightclick on a entity:
  37.     if player's tool is spawn egg named "&4&lPoke&f&lBall":
  38.         remove 1 spawn egg from player's inventory
  39.         send "&7[&6*&7] Mob &6%clicked entity% &7zostal schowany!"
  40.         kill the clicked entity
  41.         if name of clicked entity is not set:
  42.             give spawn egg named "&bMob - &6%clicked entity%" to the player
  43.         else:
  44.             give spawn egg named "&bMob - &6%clicked entity%" with lore "%name of clicked entity%" to the player
  45.            
  46. #
  47. #                              
  48. #         Przywracanie          
  49. #                              
  50. #
  51.  
  52. on rightclick with spawn egg:
  53.     if name of player's tool is "&4&lPoke&f&lBall":
  54.         cancel event
  55.     else:
  56.         set {_n} to name of player's tool
  57.         set {_l} to lore of player's tool
  58.         replace all "|" with "" in {_l}
  59.         replace all "&bMob - &6" with "" in {_n}
  60.         if {_n} is "pig":
  61.             spawn 1 pig at the target block
  62.             set name of spawned entity to {_l}
  63.         if {_n} is "chicken":
  64.             spawn 1 chicken at the target block
  65.             set name of spawned entity to {_l}
  66.         if {_n} is "cow":
  67.             spawn 1 cow at the target block
  68.             set name of spawned entity to {_l}
  69.         if {_n} is "horse":
  70.             spawn 1 horse at the target block
  71.             set name of spawned entity to {_l}
  72.         if {_n} is "Sheep":
  73.             spawn 1 Sheep at the target block
  74.             set name of spawned entity to {_l}
  75.            
  76. #
  77. #                              
  78. #        Lapanie zombie        
  79. #                              
  80. #
  81.  
  82. on rightclick with Rotten Flesh on a zombie:
  83.     if name of clicked entity is not set:
  84.         add 1 to {lapanie.%player%}
  85.         remove 1 rotten flesh from player
  86.         if {lapanie.%player%} is more than 19:
  87.             send "&7[&6*&7] &aProces lapania zombie zakonczony sukcesem!"
  88.             set name of clicked entity to "&6%player%"
  89.             apply fire resistance to the clicked entity for 999 days
  90.             set {lapanie.%player%} to 0
  91.         else:
  92.             send "&7[&6*&7] Postep w lapaniu zombie: &a%{lapanie.%player%}%/20"
  93.     else:
  94.         send "&7[&6*&7] Ten zombie juz jest zlapany!"
  95.        
  96. #
  97. #                              
  98. #    Ochrona psow i kotow      
  99. #                              
  100. #
  101.  
  102. on rightclick with name tag:
  103.     if clicked entity is wolf or ocelot:
  104.         if name of clicked entity is set:
  105.             cancel event
  106.             send "&7[&6*&7] Ten pupil juz do kogos nalezy!"
  107.         else:
  108.             send "&7[&6*&7] Teraz to twoj pupil :)"
  109.             set name of clicked entity to "&6%player%"
  110.            
  111. #
  112. #                              
  113. #        Leczenie zombie        
  114. #                              
  115. #
  116.  
  117. on rightclick with steak on a zombie:
  118.     if name of clicked entity is set:
  119.         if name of clicked entity is "&6%player%":
  120.             remove 1 steak from player
  121.             heal clicked entity
  122.             send "&7[&6*&7] Zombie zostal uleczony!"
  123.         else:
  124.             send "&7[&6*&7] To nie twoj zombie"
  125.     else:
  126.         send "&7[&6*&7] Ten zombie nie nalezy do nikogo wiec nie mozesz go uleczyc!"
  127.         damage player by 1 heart
  128.        
  129. #
  130. #                              
  131. #           Obrazenia          
  132. #                              
  133. #
  134.  
  135. on damage:
  136.     if victim is player:
  137.         if attacker is zombie:
  138.             set {_v} to "&6%victim%"
  139.             if "%{_v}%" is attacker's name:
  140.                 cancel event
  141.     if attacker is player:
  142.         if victim is wolf or ocelot:
  143.             if victim's name is set:
  144.                 set {_v} to victim's name
  145.                 replace all "&6" with "" in {_v}
  146.                 set {_a} to attacker's name
  147.                 if "%{_v}%" is not "%{_a}%":
  148.                     send "&7[&6*&7] Nie mozesz bic nie swojego pupila!"
  149.                    
  150. #
  151. #                              
  152. #           Crafting            
  153. #                              
  154. #
  155.  
  156. on script load:
  157.     register new shaped recipe for spawn egg named "&4&lPoke&f&lBall" using none, rose red, none, none, egg, none, none, bone meal, none
Advertisement
Add Comment
Please, Sign In to add comment