Guest User

mEffects

a guest
Jan 24th, 2015
1,380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.26 KB | None | 0 0
  1. options:
  2.     cena-speed-I: 300
  3.     cena-speed-II: 400
  4.     cena-speed-III: 500
  5. #========================#
  6.     cena-fire-I: 350
  7.     cena-fire-II: 450
  8.     cena-fire-III: 550
  9. #========================#
  10.     cena-regeneration-I: 500
  11.     cena-regeneration-II: 650
  12.     cena-regeneration-III: 750
  13. #=========================#
  14.     cena-night-I: 700
  15.     cena-night-II: 850
  16.     cena-night-III: 950
  17. #=========================#
  18.     cena-efekt-koxa: 2500
  19. #=========================#
  20.     cena-haste-I: 1000
  21.     cena-haste-II: 2000
  22.     cena-haste-III: 2500
  23.  
  24.  
  25. command /efekty:
  26.     trigger:
  27.         execute console command "sklep-efekty %player% strona-1"
  28.  
  29. command /sklep-efekty [<player>] [<text>]:
  30.     trigger:
  31.         if sender is console:
  32.             if arg 2 is "strona-1":
  33.                 wait 2 tick
  34.                 open chest with 3 rows named "&e&lSklep Efekty" to player-arg
  35.                 wait 1 tick
  36.                 format slot 11 of player-arg with 1 of potion of:8258 named "&cPotki Szybkosci" with lore "&6Speed: &bI-III" to run "sklep-efekty %player-arg% strona-2-szybkosc"
  37.                 format slot 12 of player-arg with 1 of potion of:8259 named "&cPotki Odpornosci Na Ogien" with lore "&6Fire Resistance &bI-III" to run "sklep-efekty %player-arg% strona-3-ogien"
  38.                 format slot 13 of player-arg with 1 of potion of:8193 named "&cPotki Regeneracji" with lore "&6Regeneration &bI-III" to run "sklep-efekty %player-arg% strona-4-regeneracja"
  39.                 format slot 14 of player-arg with 1 of potion of:8262 named "&cPotki Widzenia W Ciemnosci" with lore "&6Night Vision &bI-III" to run "sklep-efekty %player-arg% strona-5-widzenie"
  40.                 format slot 15 of player-arg with 1 of enchanted golden apple named "&cEfekt Koxa" with lore "&6Cena: &b{@cena-efekt-koxa}" to run "sklep-efekty %player-arg% kox"
  41.                 format slot 22 of player-arg with 1 of beacon named "&cEfekt Haste" with lore "&6Haste &bI-III" to run "sklep-efekty %player-arg% strona-6-haste"
  42.                 format slot 26 of player-arg with 1 of book named "&cAutor" with lore "&6mati770ka" to be unstealable
  43.             if arg 2 is "strona-2-szybkosc":
  44.                 wait 2 tick
  45.                 open chest with 3 rows named "&e&lSzybkosc I-III" to player-arg
  46.                 wait 1 tick
  47.                 format slot 12 of player-arg with 1 of water bottle named "&cSpeed I" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-speed-I}" to run "sklep-efekty %player-arg% speed1"
  48.                 format slot 13 of player-arg with 1 of water bottle named "&cSpeed II" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-speed-II}" to run "sklep-efekty %player-arg% speed2"
  49.                 format slot 14 of player-arg with 1 water bottle named "&cSpeed III" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-speed-III}" to run "sklep-efekty %player-arg% speed3"
  50.                 format slot 26 of player-arg with 1 of arrow named "&aPowrot" to run "sklep-efekty %player-arg% strona-1"
  51.             if arg 2 is "strona-3-ogien":
  52.                 wait 2 tick
  53.                 open chest with 3 rows named "&e&lOdpornosc Ogien I-III" to player-arg
  54.                 wait 1 tick
  55.                 format slot 12 of player-arg with 1 of water bottle named "&cFire Resistance I" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-fire-I}" to run "sklep-efekty %player-arg% fire1"
  56.                 format slot 13 of player-arg with 1 of water bottle named "&cFire Resistance II" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-fire-II}" to run "sklep-efekty %player-arg% fire2"
  57.                 format slot 14 of player-arg with 1 of water bottle named "&cFire Resistance III" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-fire-III}" to run "sklep-efekty %player-arg% fire3"
  58.                 format slot 26 of player-arg with 1 of arrow named "&aPowrot" to run "sklep-efekty %player-arg% strona-1"
  59.             if arg 2 is "strona-4-regeneracja":
  60.                 wait 2 tick
  61.                 open chest with 3 rows named "&e&lRegeneracja I-III" to player-arg
  62.                 wait 1 tick
  63.                 format slot 12 of player-arg with 1 of water bottle named "&cRegeneration I" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-regeneration-I}" to run "sklep-efekty %player-arg% regeneration1"
  64.                 format slot 13 of player-arg with 1 of water bottle named "&cRegeneration II" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-regeneration-II}" to run "sklep-efekty %player-arg% regeneration2"
  65.                 format slot 14 of player-arg with 1 of water bottle named "&cRegeneration III" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-regeneration-III}" to run "sklep-efekty %player-arg% regeneration3"
  66.                 format slot 26 of player-arg with 1 of arrow named "&aPowrot" to run "sklep-efekty %player-arg% strona-1"
  67.             if arg 2 is "strona-5-widzenie":
  68.                 wait 2 tick
  69.                 open chest with 3 rows named "&e&lWidzenie W Ciemnosci I-III" to player-arg
  70.                 wait 1 tick
  71.                 format slot 12 of player-arg with 1 of water bottle named "&cNight Vision I" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-night-I}" to run "sklep-efekty %player-arg% night1"
  72.                 format slot 13 of player-arg with 1 of water bottle named "&cNight Vision II" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-night-II}" to run "sklep-efekty %player-arg% night2"
  73.                 format slot 14 of player-arg with 1 of water bottle named "&cNight Vision III" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-night-III}" to run "sklep-efekty %player-arg% night3"
  74.                 format slot 26 of player-arg with 1 of arrow named "&aPowrot" to run "sklep-efekty %player-arg% strona-1"
  75.             if arg 2 is "strona-6-haste":
  76.                 wait 2 tick
  77.                 open chest with 3 rows named "&e&lHaste I-III" to player-arg
  78.                 wait 1 tick
  79.                 format slot 12 of player-arg with 1 of water bottle named "&cHaste I" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-haste-I}" to run "sklep-efekty %player-arg% haste1"
  80.                 format slot 13 of player-arg with 1 of water bottle named "&cHaste II" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-haste-II}" to run "sklep-efekty %player-arg% haste2"
  81.                 format slot 14 of player-arg with 1 of water bottle named "&cHaste III" with lore "&6Czas: &b5 Minut||&6Cena: &b{@cena-haste-III}" to run "sklep-efekty %player-arg% haste3"
  82.                 format slot 26 of player-arg with 1 of arrow named "&aPowrot" to run "sklep-efekty %player-arg% strona-1"
  83.             if arg 2 is "speed1":
  84.                 if player-arg's balance is bigger than or equal to {@cena-speed-I}:
  85.                     remove speed from player-arg
  86.                     apply speed 1 to player-arg for 5 minutes
  87.                     subtract {@cena-speed-I} from player-arg's balance
  88.                     send "&cZakupiles Efekt: &eSpeed I" to player-arg
  89.                 else:
  90.                     send "&cNie posiadasz &6{@cena-speed-I}$" to player-arg
  91.             if arg 2 is "speed2":
  92.                 if player-arg's balance is bigger than or equal to {@cena-speed-II}:
  93.                     remove speed from player-arg
  94.                     apply speed 2 to player-arg for 5 minutes
  95.                     subtract {@cena-speed-II} from player-arg's balance
  96.                     send "&cZakupiles Efekt: &eSpeed II" to player-arg
  97.                 else:
  98.                     send "&cNie posiadasz &6{@cena-speed-II}$" to player-arg
  99.             if arg 2 is "speed3":
  100.                 if player-arg's balance is bigger than or equal to {@cena-speed-III}:
  101.                     remove speed from player-arg
  102.                     apply speed 3 to player-arg for 5 minutes
  103.                     subtract {@cena-speed-III} from player-arg's balance
  104.                     send "&cZakupiles Efekt: &eSpeed III" to player-arg
  105.                 else:
  106.                     send "&cNie posiadasz &6{@cena-speed-III}$" to player-arg
  107.             if arg 2 is "fire1":
  108.                 if player-arg's balance is bigger than or equal to {@cena-fire-I}:
  109.                     remove fire resistance from player-arg
  110.                     apply fire resistance 1 to player-arg for 5 minutes
  111.                     subtract {@cena-fire-I} from player-arg's balance
  112.                     send "&cZakupiles Efekt: &eFire Resistance I" to player-arg
  113.                 else:
  114.                     send "&cNie posiadasz &6{@cena-fire-I}$" to player-arg
  115.             if arg 2 is "fire2":
  116.                 if player-arg's balance is bigger than or equal to {@cena-fire-II}:
  117.                     remove fire resistance from player-arg
  118.                     apply fire resistance 2 to player-arg for 5 minutes
  119.                     subtract {@cena-fire-II} from player-arg's balance
  120.                     send "&cZakupiles Efekt: &eFire Resistance II" to player-arg
  121.                 else:
  122.                     send "&cNie posiadasz &6{@cena-fire-II}$" to player-arg
  123.             if arg 2 is "fire3":
  124.                 if player-arg's balance is bigger than or equal to {@cena-fire-III}:
  125.                     remove fire resistance from player-arg
  126.                     apply fire resistance 3 to player-arg for 5 minutes
  127.                     subtract {@cena-fire-III} from player-arg's balance
  128.                     send "&cZakupiles Efekt: &eFire Resistance III" to player-arg
  129.                 else:
  130.                     send "&cNie posiadasz &6{@cena-fire-III}$" to player-arg
  131.             if arg 2 is "regeneration1":
  132.                 if player-arg's balance is bigger than or equal to {@cena-regeneration-I}:
  133.                     remove regeneration from player-arg
  134.                     apply regeneration 1 to player-arg for 5 minutes
  135.                     subtract {@cena-regeneration-I} from player-arg's balance
  136.                     send "&cZakupiles Efekt: &eRegeneration I" to player-arg
  137.                 else:
  138.                     send "&cNie posiadasz &6{@cena-regeneration-I}$" to player-arg
  139.             if arg 2 is "regeneration2":
  140.                 if player-arg's balance is bigger than or equal to {@cena-regeneration-II}:
  141.                     remove regeneration from player-arg
  142.                     apply regeneration 2 to player-arg for 5 minutes
  143.                     subtract {@cena-regeneration-II} from player-arg's balance
  144.                     send "&cZakupiles Efekt: &eRegeneration II" to player-arg
  145.                 else:
  146.                     send "&cNie posiadasz &6{@cena-regeneration-II}$" to player-arg
  147.             if arg 2 is "regeneration3":
  148.                 if player-arg's balance is bigger than or equal to {@cena-regeneration-III}:
  149.                     remove regeneration from player-arg
  150.                     apply regeneration 3 to player-arg for 5 minutes
  151.                     subtract {@cena-regeneration-III} from player-arg's balance
  152.                     send "&cZakupiles Efekt: &eRegeneration III" to player-arg
  153.                 else:
  154.                     send "&cNie posiadasz &6{@cena-regeneration-III}$" to player-arg
  155.             if arg 2 is "night1":
  156.                 if player-arg's balance is bigger than or equal to {@cena-night-I}:
  157.                     remove night vision from player-arg
  158.                     apply night vision 1 to player-arg for 5 minutes
  159.                     subtract {@cena-night-I} from player-arg's balance
  160.                     send "&cZakupiles Efekt: &eNight Vision I" to player-arg
  161.                 else:
  162.                     send "&cNie posiadasz &6{@cena-night-I}$" to player-arg
  163.             if arg 2 is "night2":
  164.                 if player-arg's balance is bigger than or equal to {@cena-night-II}:
  165.                     remove night vision from player-arg
  166.                     apply night vision 2 to player-arg for 5 minutes
  167.                     subtract {@cena-night-II} from player-arg's balance
  168.                     send "&cZakupiles Efekt: &eNight Vision II" to player-arg
  169.                 else:
  170.                     send "&cNie posiadasz &6{@cena-night-II}$" to player-arg
  171.             if arg 2 is "night3":
  172.                 if player-arg's balance is bigger than or equal to {@cena-night-III}:
  173.                     remove night vision from player-arg
  174.                     apply night vision 3 to player-arg for 5 minutes
  175.                     subtract {@cena-night-III} from player-arg's balance
  176.                     send "&cZakupiles Efekt: &eNight Vision III" to player-arg
  177.                 else:
  178.                     send "&cNie posiadasz &6{@cena-night-III}$" to player-arg
  179.             if arg 2 is "kox":
  180.                 if player-arg's balance is bigger than or equal to {@cena-efekt-koxa}:
  181.                     remove absorption or regeneration or resistance or fire resistance from player-arg
  182.                     apply absorption to player-arg for 2 minutes
  183.                     apply regeneration to player-arg for 30 seconds
  184.                     apply resistance and fire resistance to player-arg for 5 minutes
  185.                     subtract {@cena-efekt-koxa} from player-arg's balance
  186.                     send "&cZakupiles Efekt: &eKox" to player-arg
  187.                     create timed bar with text "&e%player-arg% &cZakupil Efekt &b&lKoxa" to all players for 7 seconds
  188.                 else:
  189.                     send "&cNie posiadasz &6{@cena-efekt-koxa}$" to player-arg
  190.             if arg 2 is "haste1":
  191.                 if player-arg's balance is bigger than or equal to {@cena-haste-I}:
  192.                     remove haste from player-arg
  193.                     apply haste 1 to player-arg for 5 minutes
  194.                     subtract {@cena-haste-I} from player-arg's balance
  195.                     send "&cZakupiles Efekt: &eHaste I" to player-arg
  196.                 else:
  197.                     send "&cNie posiadasz &6{@cena-haste-I}$" to player-arg
  198.             if arg 2 is "haste2":
  199.                 if player-arg's balance is bigger than or equal to {@cena-haste-II}:
  200.                     remove haste from player-arg
  201.                     apply haste 2 to player-arg for 5 minutes
  202.                     subtract {@cena-haste-II} from player-arg's balance
  203.                     send "&cZakupiles Efekt: &eHaste II" to player-arg
  204.                 else:
  205.                     send "&cNie posiadasz &6{@cena-haste-II}$" to player-arg
  206.             if arg 2 is "haste3":
  207.                 if player-arg's balance is bigger than or equal to {@cena-haste-III}:
  208.                     remove haste from player-arg
  209.                     apply haste 3 to player-arg for 5 minutes
  210.                     subtract {@cena-haste-III} from player-arg's balance
  211.                     send "&cZakupiles Efekt: &eHaste III" to player-arg
  212.                 else:
  213.                     send "&cNie posiadasz &6{@cena-haste-III}$" to player-arg
  214.         else:
  215.             send "&cKomenda wykonywalna tylko w Consoli"
Advertisement
Add Comment
Please, Sign In to add comment