Advertisement
Guest User

Skrzynka

a guest
Sep 26th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #=================#
  2. #     Skrzynki    #
  3. #=================#
  4. # Skrypt by Sp33dek1337 #
  5. #=================#
  6. #      Config     #
  7. #=================#
  8. options:
  9.        
  10.         #Szansa na dropnięcie klucza
  11.         chance: 0.5%
  12.         #Nazwa klucza
  13.         keyname: &6&lKlucz Do Magicznej Skrzyni
  14.         #Crafting skrzynki
  15.         1: gold block
  16.         2: enchanted golden apple
  17.         3: gold block
  18.         4: enchanted golden apple
  19.         5: chest
  20.         6: enchanted golden apple
  21.         7: gold block
  22.         8: gold block
  23.         9: gold block
  24.         #Nazwa skrzynki
  25.         chestname: &c&lMagiczna Skrzynia
  26.        
  27. #=================#
  28. #        Kod      #
  29. #=================#
  30.  
  31. on death:
  32.         if victim is a player:
  33.                 chance of {@chance}:
  34.                         give player a tripwire hook named "{@keyname}"
  35.                        
  36. on script load:
  37.         register new shaped recipe for chest named "{@chestname}" using {@1}, {@2}, {@3}, {@4}, {@5}, {@6}, {@7}, {@8}, {@9}
  38.        
  39. command /skrzynki [<text>] [<text>]:
  40.         trigger:
  41.                 if arg 1 is "give":
  42.                         if arg 2 is "key" or "klucz":
  43.                                 give player a name tag named "{@keyname}"
  44.                         if arg 2 is "skrzynka" or "chest":
  45.                                 give player a chest named "{@chestname}"
  46.                 else:
  47.                         send "&cPoprawne uzycie: '&2/skrzynki give key/klucz/skrzynka/chest&c'" to player
  48.                        
  49. on rightclick:
  50.         if player is holding a tripwire hook named "{@keyname}":
  51.                 if player has a chest named "{@chestname}":
  52.                         cancel event
  53.                         remove 1 chest named "{@chestname}" from the player
  54.                         remove 1 tripwire hook named "{@keyname}" from the player
  55.                         chance of 5%:
  56.                                 give player a diamond sword of sharpness 5
  57.                                 broadcast "&2Gracz %player% otworzyl skrzynie i wypadlo mu: &cMiecz ostrosc V!"
  58.                         chance of 5%:
  59.                                 give player a diamond pickaxe of efficiency 5
  60.                                 broadcast "&2Gracz %player% otworzyl skrzynie i wypadlo mu: &cKilof wydajnosc V"
  61.                         chance of 5%:
  62.                                 give player a diamond helmet of protection 4
  63.                                 broadcast "&2Gracz %player% otworzyl skrzynie i wypadlo mu: &cHelm Ochrona IV"
  64.                         chance of 5%:
  65.                                 give player a diamond chestplate of protection 4
  66.                                 broadcast "&2Gracz %player% otworzyl skrzynie i wypadlo mu: &cKlata Ochrona IV"
  67.                         chance of 5%:
  68.                                 give player a diamond boots of protection 4
  69.                                 broadcast "&2Gracz %player% otworzyl skrzynie i wypadlo mu: &cButy Ochrona IV"
  70.                         chance of 5%:
  71.                                 give player a diamond leggings of protection 4
  72.                                 broadcast "&2Gracz %player% otworzyl skrzynie i wypadlo mu: &cSpodnie Ochrona IV"
  73.                 else:
  74.                         cancel event
  75.         if player is holding a chest named "{@chestname}":
  76.                 cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement