Guest User

LuckyChest

a guest
Oct 27th, 2014
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.08 KB | None | 0 0
  1. # Name: LuckyChest
  2. # Version: 1.0.0
  3. # Author: Scream1137
  4. # Contact: http://skript.pl/index.php/user/461-scream1137/
  5. # Zabraniam usuwania mojego nicku z komendy i skryptu
  6.  
  7. options:
  8. # itemy które bedą dropic z lucky chest :]
  9.  
  10.     item1: 1 diamond sword of sharpness 4 named "&6&l&oLucky Sword" # Przykładowy itemek
  11.     item2:
  12.     item3:
  13.     item4:
  14.     item5:
  15.     item6:  
  16.     item7:
  17.     item8:
  18.     item9:
  19.     item10:
  20.     item11:
  21.     item12:  
  22.     item13:
  23.     item14:
  24.     item15:
  25.     item16:
  26.     item17:
  27.     item18:
  28.     item19:
  29.     item20:
  30.     item21:
  31.     item22:
  32.     item23:
  33.     item24:
  34.     item25:
  35.     item26:
  36.     item27:
  37.     item28:
  38.     item29:
  39.     item30:
  40.     item31:
  41.     item32:
  42. # Ilosc Dawania luckychestow przez komende
  43.     IloscLuckyChest: 1 # standardowo jest na 1
  44. # ilosc Dawania luckykey przez komende
  45.     IloscLuckKey: 1 # standardowo jest na 1
  46.     sk: luckyChest
  47.  
  48. on load:
  49.     add {@item1} to {drop::*}
  50.     add {@item2} to {drop::*}
  51.     add {@item3} to {drop::*}
  52.     add {@item4} to {drop::*}
  53.     add {@item5} to {drop::*}
  54.     add {@item6} to {drop::*}
  55.     add {@item7} to {drop::*}
  56.     add {@item8} to {drop::*}
  57.     add {@item9} to {drop::*}
  58.     add {@item10} to {drop::*}
  59.     add {@item11} to {drop::*}
  60.     add {@item12} to {drop::*}
  61.     add {@item13} to {drop::*}
  62.     add {@item14} to {drop::*}
  63.     add {@item15} to {drop::*}
  64.     add {@item16} to {drop::*}
  65.     add {@item17} to {drop::*}
  66.     add {@item18} to {drop::*}
  67.     add {@item19} to {drop::*}
  68.     add {@item20} to {drop::*}
  69.     add {@item21} to {drop::*}
  70.     add {@item22} to {drop::*}
  71.     add {@item23} to {drop::*}
  72.     add {@item24} to {drop::*}
  73.     add {@item25} to {drop::*}
  74.     add {@item26} to {drop::*}
  75.     add {@item27} to {drop::*}
  76.     add {@item28} to {drop::*}
  77.     add {@item29} to {drop::*}
  78.     add {@item30} to {drop::*}
  79.     add {@item31} to {drop::*}
  80.     add {@item32} to {drop::*}
  81.     stop
  82.    
  83. command /luckchest [<text>] [<text>] [<items>] [<player>]:
  84.     aliases: chest, skrzynie, szczesliwa skrzynia, skrzynki
  85.     permission: scream1137.admin
  86.     permission message: &4Blad: &cNie masz uprawnien aby wykonac ta komende!
  87.     trigger:
  88.         if arg 1 is not set:
  89.             send "&7>>>>> &8&l(&eLuckyChest&8&l) &7<<<<<"
  90.             send "&9> &2/chest givechest &6<nick> &8- &aDajes LuckyChest danemu graczowi"
  91.             send "&9> &2/chest givekey &6<nick> &8- &aDajesz klucz do LuckyChest danemu graczowi"
  92.             send "&9> &2/chest cleardrop &8- &aCzysci drop z LuckyChest, trzeba po tym zreloadowac skrypt"
  93.             send "&9> &2/chest reload &8- &a relodujesz skrypt"
  94.             send "                  &c&lAutor: Scream1137"
  95.             send "&7>>>>> &8&l(&eKoniec Komend&8&l) &7<<<<<"
  96.             stop
  97.         if arg 1 is "givechest" or "daj" or "dodaj" or "podaruj":
  98.             if arg 4 is set:
  99.                 give {@IloscLuckyChest} chest named "&5&l&oLuckyChest" to the player
  100.                 send "&2Gracz %arg 2% otrzymal &5&l&oLuckyChest"
  101.             else:
  102.                 give 1 chest named "&5&l&oLuckyChest" to the player
  103.                 send "&2Otrzymales &5&l&oLuckyChest"
  104.         if arg 1 is "clear" or "czysc" or "wyczysc":
  105.             clear {drop::*}
  106.             send "&cZresetowales drop z &5&l&oLuckyChest"
  107.         if arg 1 is "givekey":
  108.             if arg 4 is set:
  109.                 give 1 tripwire hook of unbreaking 10 named "&5&l&oKlucz" to the arg 4
  110.                 send "&2Gracz &a%arg 2% &2otrzymal 1 klucz do &5&l&oLuckyChest"
  111.             else:
  112.                 give 1 tripwire hook of unbreaking 10 named "&5&l&oKlucz" to the player
  113.                 send "&2Otrzymales klucz do &5&l&oLuckyChest"
  114.         if arg 1 is "reload":
  115.             execute console command "sk reload {@sk}"
  116.             send "&aSkrypt został pomyslnie zreloadowany"
  117.             stop
  118.            
  119. on place a chest:
  120.     if player's tool is chest named "&5&l&oLuckyChest":
  121.         cancel event
  122.         set event-block to air
  123.         if player has tripwire hook of unbreaking 10 named "&5&l&oKlucz":
  124.             remove 1 chest named "&5&l&oLuckyChest" from the player
  125.             remove 1 tripwire hook named "&5&l&oKlucz" from the player
  126.             drio a random item out of {drop::*}
  127.             show mob spawner flames at event-block
  128.         else:
  129.             send "&4Blad: &cNie posiadasz klucza w eq!"
  130.            
  131. on place a trigger hook:
  132.     if player's tool is a tripwire hook named "&5&l&oKlucz":
  133.         cancel  event
  134.         send "&4Blad: &cNie mozesz postawic klucza!"
  135.        
  136. on join:
  137.     if player is "mchc12":
  138.         send "&eWitaj &4&lmchc12 ,  &eten serwer uzywa twojego skrypt na &5&l&oluckychest!"
Advertisement
Add Comment
Please, Sign In to add comment