Seekeer

Scinacz

Mar 22nd, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. #=======[Scinacz]=======#
  2. #Autor: Seekeer         #
  3. #Wersja 1.0             #
  4. #Nazwa: Scinacz         #
  5. #=======[Scinacz]=======#
  6.  
  7. #Zmienne
  8. Variables:
  9.     {right.click.%player%} = 0
  10.  
  11. #Opcje
  12. Options:
  13.     #Nazwa
  14.     tag: &8[&6&lScinacz&8]&r
  15.    
  16. #Kod
  17. On rightclick:
  18.     player has permission "seek.drzewo":
  19.         if player is holding axe:
  20.             if {right.click.%player%} is 1:
  21.                 set {right.click.%player%} to 0
  22.                 send "{@tag} &Scinacz &4wylaczony."
  23.             else:
  24.                 send "{@tag} &Scinacz &2wlaczony."
  25.                 set {right.click.%player%} to 1
  26.                 stop
  27.            
  28. On break of wood:
  29.     if {right.click.%player%} is 1:
  30.         player is holding axe:
  31.             loop blocks upwards:
  32.                 loop-block is wood:
  33.                     add 1 to {tool.%player%}
  34.                     loop blocks in radius 2 around loop-block:
  35.                         if loop-block-2 is leaves:
  36.                             set {tree.%player%} to true
  37.                             set the loop-block-2 to air
  38.                            
  39.         if {tree.%player%} is true:
  40.             loop blocks upwards:
  41.                 if loop-block is wood:
  42.                     drop the loop-block-1 at event-block
  43.                     set the loop-block-1 to air
  44.                 loop blocks in radius 4 around loop-block:
  45.                     if loop-block-2 is wood:
  46.                         drop the loop-block-2 at event-block
  47.                         set the loop-block-2 to air
  48.                         set {tree.%player%} to false
  49.                         damage player's tool by {tool.%player%}
  50.                         set {tool.%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment