Fr0scik

Fr0stStone 0.3 Beta UPDATE! :)

Oct 21st, 2014
1,646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.39 KB | None | 0 0
  1. #   ################
  2. #   # AUTOR: Fr0st #
  3. #   ################
  4.  
  5. #   ################
  6. #   # WERSJA: 0.1a #
  7. #   ################
  8.  
  9. #   ################################################
  10. #   #             NIE ZEZWALAM NA:                 #
  11. #   # Używanie kodu mojego skryptu, sprzedawanie   #
  12. #   # skryptu, podszywanie sie pod autora,         #
  13. #   # używanie skryptu w plikach serwerowych,      #
  14. #   #                                              #
  15. #   #                                              #
  16. #   #                                              #
  17. #   #                                              #          
  18. #   ################################################
  19.  
  20. #   ################
  21. #   #   VARIABLES  #
  22. #   ################
  23.  
  24. variables:
  25.     {diamenty.%player%} = 0
  26.     {emeraldy.%player%} = 0
  27.     {zelazo.%player%} = 0
  28.     {zloto.%player%} = 0
  29.     {gunpowder.%player%} = 0
  30.     {enderpearl.%player%} = 0
  31.     {piasek.%player%} = 0
  32.     {wykopanystone.%player%} = 0
  33.     {redstone.%player%} = 0
  34.    
  35.  
  36.  
  37.  
  38. #   ################
  39. #   #    OPCJE     #
  40. #   ################
  41. #   # Konfiguracja #
  42. #   ################
  43. #   #      \/      #
  44.  
  45.  
  46. options:
  47.     fd: 1.5     # % wypadania diamentow ze stone
  48.     fe: 1.8     # % wypadania emeraldow ze stone
  49.     fg: 4.6     # % wypadania zlota ze stone
  50.     fi: 5.6     # % wypadania zelaza ze stone
  51.     fc: 9.6     # % wypadania węgla ze stone
  52.     fs: 9.6     # % wypadania piasku ze stone
  53.     fen: 1.6        # % wypadania perel endermana ze stone
  54.     fgun: 2.6       # % wypadania prochu ze stone
  55.     auth: &3Autor skryptu - &8&oFr0st
  56.     yd: 25 # Poziom na którym możemy wykopać diament
  57.     yem: 25 # Poziom na którym możemy wykopać emerald
  58.     yir: 40 # Poziom na którym możemy wykopać zelazo
  59.     ygold: 30 # Poziom na którym możemy wykopać zloto
  60.     yrdst: 30 # Poziom na którym możemy wykopać redstone
  61.    
  62.  
  63.  
  64. #   ################
  65. #   #     KOD      #
  66. #   ################
  67.  
  68.  
  69.  
  70. # Podstawowe komendy :)
  71.  
  72. # \/ - nie dotykaj
  73. command /stone [<player>]:
  74.     permission: fs.stone
  75.     permission message: &cNie masz uprawnien do tej komendy!
  76.     trigger:
  77.         open chest with 1 rows named "&8» &3Drop ze stone &8» " to arg 1
  78.         wait 1 tick
  79.         format slot 0 of player with 1 of diamond named "&8» &bDiamenty" with lore "&8» &3{@fd} &8procent" to be unstealable
  80.         format slot 1 of player with 1 of emerald named "&8» &aEmeraldy" with lore "&8» &3{@fe} &eprocent" to be unstealable
  81.         format slot 2 of player with 1 of gold ingot named "&8» &6Zloto" with lore "&8» &3{@fg} &eprocent" to be unstealable
  82.         format slot 3 of player with 1 of iron ingot named "&8» &8Zelazo" with lore "&8» &3{@fi} &8procent" to be unstealable
  83.         format slot 4 of player with 1 of coal named "&8» &0Wegiel" with lore "&8» &3{@fc} &8procent" to be unstealable
  84.         format slot 5 of player with 1 of sand named "&8» &ePiasek" with lore "&8» &3{@fs} &8procent" to be unstealable
  85.         format slot 6 of player with 1 of redstone named "&8» &4Redstone" with lore "&8» &30.5 &8procent" to be unstealable
  86.         format slot 7 of player with 1 of ender pearl named "&8» &5Perla endermana" with lore "&8» &3{@fen} &8procent" to be unstealable
  87.         format slot 8 of player with 1 of gunpowder named "&8» &7&lProch" with lore "&8» &3{@fgun} &8procent" to be unstealable
  88.        
  89. command /kamien:
  90.     permission: fs.kamien
  91.     permission message: &cNie masz uprawnien do tej komendy!
  92.     trigger:
  93.         execute player command "/stone %player%"
  94.        
  95. command /Fr0stStone <text>:
  96.     usage: &8/fr0ststone &c[argument]
  97.     permission: fs.admin
  98.     permission message: &cNie masz uprawnien do tej komendy!
  99.     trigger:
  100.         if arg 1 is not set:
  101.             send "&cPodaj argument!"
  102.         if arg 1 is not "reload" or "autor":
  103.             send "&cNie ma takiego argumentu!"
  104.         if arg 1 is "reload":
  105.             send "&3Restartowanie skryptu &8Fr0stStone..."
  106.             execute player command "/sk reload Fr0stStone"
  107.             wait 2 seconds
  108.             send "&aFr0stStone pomyslnie zrestartowany!"
  109.         if arg 1 is "autor":
  110.             send "{@auth}"
  111.  
  112.            
  113. command /statystyki [<text>]:
  114.     trigger:
  115.         if arg 1 is not set:
  116.             send "&3Wykopane &bDiamenty: &8%{diamenty.%player%}%"
  117.             send "&3Wykopane &eZloto: &8%{zloto.%player%}%"
  118.             send "&3Wykopane &8Zelazo: &8%{zelazo.%player%}%"
  119.             send "&3Wykopany &0Wegiel: &8%{wegiel.%player%}%"
  120.             send "&3Wykopane &aEmeraldy: &8%{emeraldy.%player%}%"
  121.             send "&3Wykopane &7Proch: &8%{gunpowder.%player%}%"
  122.             send "&3Wykopane &cRedstone: &8%{redstone.%player%}%"
  123.             send "&3Wykopane &5Ender Perly: &8%{redstone.%player%}%"
  124.             send "&3Wykopany &7Cobblestone: &8%{wykopanystone.%player%}%"
  125.         if arg 1 is player:
  126.             send "&8============================"
  127.             send "&3Statystyki kopania gracza: &8&o%arg 1%"
  128.             send "&3Wykopane &bDiamenty: &8%{diamenty.%player%}%"
  129.             send "&3Wykopane &eZloto: &8%{zloto.%player%}%"
  130.             send "&3Wykopane &8Zelazo: &8%{zelazo.%player%}%"
  131.             send "&3Wykopany &0Wegiel: &8%{wegiel.%player%}%"
  132.             send "&3Wykopane &aEmeraldy: &8%{emeraldy.%player%}%"
  133.             send "&3Wykopane &7Proch: &8%{gunpowder.%player%}%"
  134.             send "&3Wykopane &cRedstone: &8%{redstone.%player%}%"
  135.             send "&3Wykopane &5Ender Perly: &8%{redstone.%player%}%"
  136.             send "&3Wykopany &7Cobblestone: &8%{wykopanystone.%player%}%"
  137.    
  138. # Drop ze stone | Ustawianie zeby z rud diamentu itp. nie wypadaly diamenty itp.
  139.  
  140. on mine of diamond ore or emerald ore or iron ore or gold ore:
  141.         cancel event
  142.         set block to air
  143.         send " &8» &3Drop z tej rudy jest wylaczony!"
  144.         send " &8» &3Aby zobaczyc procent szans na drop wpisz &8/kamien&3!"
  145.         stop
  146.        
  147. # Główny kod
  148.  
  149.  
  150.    
  151. on mine of stone:
  152.     play raw sound "random.pop" at player with pitch 1 volume 10
  153.     drop 10 xp
  154.     if player's gamemode is survival:
  155.         add 1 to {wykopanystone.%player%}
  156.         if player's tool is stone pickaxe or iron pickaxe or gold pickaxe or diamond pickaxe:
  157.             chance of {@fi}%:
  158.                 if player's y-coordinate is smaller than {@yir}:
  159.                     give 1 iron ingot to the player
  160.                     add 1 to {zelazo.%player%}
  161.                     drop 10 xp
  162.             chance of {@fg}%:
  163.                 if player's y-coordinate is smaller than {@ygold}:
  164.                     give 1 gold ingot to the player
  165.                     add 1 to {gold.%player%}
  166.                     drop 5 xp
  167.             chance of {@fd}%:
  168.                 if player's y-coordinate is smaller than {@yd}:
  169.                     give 1 diamond to the player
  170.                     add 1 to {diamond.%player%}
  171.                     drop 4 xp
  172.             chance of {@fe}%:
  173.                 if player's y-coordinate is smaller than {@yem}:
  174.                     give 1 emerald to the player
  175.                     add 1 to {emerald.%player%}
  176.                     drop 4 xp
  177.             chance of 0.5%:
  178.                 if player's y-coordinate is smaller than {@yrdst}:
  179.                     give 4 redstone to the player
  180.                     add 1 to {redstone.%player%}
  181.                     drop 4 xp
  182.             chance of {@fgun}%:
  183.                 give 5 gunpowder to the player
  184.                 add 1 to {gunpowder.%player%}
  185.                 drop 5 xp
  186.             chance of {@fc}%:
  187.                 give 1 coal to the player
  188.                 add 1 to {wegiel.%player%}
  189.                 drop 13 xp
  190.             chance of {@fen}%:
  191.                 give 1 ender pearl to the player
  192.                 add 1 to {enderpearl.%player%}
  193.                 drop 5 xp
  194.             chance of {@fs}%:
  195.                 give 1 sand to the player
  196.                 add 1 to {piasek.%player%}
  197.                 drop 3 xp
  198.         if player's tool is a diamond pickaxe of fortune 1 or fortune 2 or fortune 3:
  199.             chance of {@fi}%:
  200.                 if player's y-coordinate is smaller than {@yir}:
  201.                     give a random number between 3 and 1 of iron ingot to the player
  202.                     add 1 to {zelazo.%player%}
  203.                     drop 10 xp
  204.             chance of {@fg}%:
  205.                 if player's y-coordinate is smaller than {@ygold}:
  206.                     give a random number between 3 and 1 of gold ingot to the player
  207.                     add 1 to {zloto.%player%}
  208.                     drop 5 xp
  209.             chance of {@fd}%:
  210.                 if player's y-coordinate is smaller than {@yd}:
  211.                     give a random number between 3 and 1 of diamond to the player
  212.                     add 1 to {diament.%player%}
  213.                     drop 4 xp
  214.             chance of {@fe}%:
  215.                 if player's y-coordinate is smaller than {@yem}:
  216.                     give a random number between 3 and 1 of emerald to the player
  217.                     add 1 to {emerald.%player%}
  218.                     drop 4 xp
  219.             chance of 0.5%:
  220.                 if player's y-coordinate is smaller than {@yrdst}:
  221.                     give a random number between 5 and 1 of redstone to the player
  222.                     add 1 to {redstone.%player%}
  223.                     drop 4 xp
  224.             chance of {@fgun}%:
  225.                 give a random number between 5 and 1 of gunpowder to the player
  226.                 add 1 to {gunpowder.%player%}
  227.                 drop 5 xp
  228.             chance of {@fc}%:
  229.                 give a random number between 5 and 1 of coal to the player
  230.                 add 1 to {wegiel.%player%}
  231.                 drop 13 xp
  232.             chance of {@fen}%:
  233.                 give a random number between 3 and 1 of ender pearl to the player
  234.                 add 1 to {enderpearl.%player%}
  235.                 drop 5 xp
  236.             chance of {@fs}%:
  237.                 give a random number between 3 and 1 of sand to the player
  238.                 add 1 to {piasek.%player%}
  239.                 drop 3 xp
Advertisement
Add Comment
Please, Sign In to add comment