niccosaint

ThirstBar 1.3 (Skript)

Nov 25th, 2014
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 11.66 KB | None | 0 0
  1. # =================
  2. # ThirstBar by niccosaint
  3. # Zakazane:
  4. # - Usuwanie tresci o autorze!                
  5. # - Udostepnaniu skryptu innym!              
  6. # - Podszywanie sie pod autora!              
  7. # - Uzywanie kodu skryptu w swoich skryptach!
  8. # - Zarabianie na skrypcie!
  9. # - Dodawanie wlasnego kodu!
  10. # Dozwolone:
  11. # - Zmienianie configu na wlasne potrzeby
  12. # =================
  13. # Konfiguracja
  14. options:
  15. # Na jakich swiatach skrypt bedzie dzialal ?
  16.     world: "2033"
  17.     world2: "Survival"
  18. # Co ile sekund bedzie schodzilo pragnienie ?
  19.     cd: 30
  20. # Koniec konfigu
  21. # NIE DOTYKAC! xD
  22. on load:
  23.     set {nccore.working.thirst} to true
  24. on unload:
  25.     set {nccore.working.thirst} to false
  26. on join:
  27.     if {nccore.thirst.%player%} is not set:
  28.         set {nccore.thirst.%player%} to 100
  29. every {@cd} seconds:
  30.     loop all players in {@world} or {@world2}:
  31.         if gamemode of loop-player is not creative:
  32.             if {nccore.thirst.%loop-player%} > 100:
  33.                 if {nccore.thirst.%loop-player%} > 149:
  34.                     add -2 to {nccore.thirst.%loop-player%}
  35.                     if {nccore.working.blood} is true:
  36.                         loop 10 times:
  37.                             add 100 to {nccore.blood.%loop-player%}
  38.                             wait 1 second
  39.                     else:
  40.                         apply regeneration to loop-player for 10 seconds
  41.                 else:
  42.                     add -2 to {nccore.thirst.%loop-player%}
  43.                     if {nccore.working.blood} is true:
  44.                         loop 3 times:
  45.                             add 100 to {nccore.blood.%loop-player%}
  46.                             wait 1 second
  47.             if {nccore.thirst.%loop-player%} < 5:
  48.                 send "&3Wody..." to loop-player
  49.             if {nccore.thirst.%loop-player%} > 1:
  50.                 add -1 to {nccore.thirst.%loop-player%}
  51.             else:
  52.                 kill loop-player
  53.                 set {nccore.thirst.%loop-player%} to 100
  54. on drink:
  55.     if player is in {@world} or {@world2}:
  56.         if player's tool is water bottle named "&7Czysta woda":
  57.             add 10 to {nccore.thirst.%player%}
  58.         else if player's tool is water bottle:
  59.             add 5 to {nccore.thirst.%player%}
  60. on eat:
  61.     if player is in {@world} or {@world2}:
  62.         if player's tool is apple or melon:
  63.             add 2 to {nccore.thirst.%player%}
  64.         if player's tool is soup:
  65.             add 3 to {nccore.thirst.%player%}
  66.         if player's tool is carrot or potato:
  67.             add 1 to {nccore.thirst.%player%}
  68.         if player's tool is golden apple or enchanted golden apple:
  69.             add 10 to {nccore.thirst.%player%}         
  70.                    
  71. command /water [<text>]:
  72.     permission: water.admin
  73.     permission message: &4Brak dostepu
  74.     trigger:
  75.         if arg 1 is not set:
  76.             send "&6&m----------&6< &4ThirstBar by niccosaint &6>&6&m----------" to player
  77.             send "&b/water get &a- Otrzymaj butelke czystej wody" to player
  78.             send "&b/water refill &a- Zaspokoj pragnienie" to player
  79.             send "&6&m------------------------------------" to player
  80.         if arg 1 is "get":
  81.             give 1 water bottle named "&7Czysta woda" to player
  82.         if arg 1 is "refill":
  83.             set {nccore.thirst.%player%} to 100
  84. command /thirst [<player>] [<number>]:
  85.     trigger:
  86.         if arg 1 is not set:
  87.             if {nccore.thirst.%player%} > 5:
  88.                 if {nccore.thirst.%player%} > 10:
  89.                     if {nccore.thirst.%player%} > 15:
  90.                         if {nccore.thirst.%player%} > 20:
  91.                             if {nccore.thirst.%player%} > 25:
  92.                                 if {nccore.thirst.%player%} > 30:
  93.                                     if {nccore.thirst.%player%} > 35:
  94.                                         if {nccore.thirst.%player%} > 40:
  95.                                             if {nccore.thirst.%player%} > 45:
  96.                                                 if {nccore.thirst.%player%} > 50:
  97.                                                     if {nccore.thirst.%player%} > 55:
  98.                                                         if {nccore.thirst.%player%} > 60:
  99.                                                             if {nccore.thirst.%player%} > 65:
  100.                                                                 if {nccore.thirst.%player%} > 70:
  101.                                                                     if {nccore.thirst.%player%} > 75:
  102.                                                                         if {nccore.thirst.%player%} > 80:
  103.                                                                             if {nccore.thirst.%player%} > 85:
  104.                                                                                 if {nccore.thirst.%player%} > 90:
  105.                                                                                     if {nccore.thirst.%player%} > 95:
  106.                                                                                         if {nccore.thirst.%player%} >= 100:
  107.                                                                                             if {nccore.thirst.%player%} > 100:
  108.                                                                                                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  109.                                                                                                 send "&b|||||||&e&lFULL&b|||||||||&a+"
  110.                                                                                             else:
  111.                                                                                                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  112.                                                                                                 send "&b|||||||&e&lFULL&b|||||||||"
  113.                                                                                         else:
  114.                                                                                             send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  115.                                                                                             send "&b|||||||||||||||||||&0|"
  116.                                                                                     else:
  117.                                                                                         send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  118.                                                                                         send "&b||||||||||||||||||&0||"
  119.                                                                                 else:
  120.                                                                                     send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  121.                                                                                     send "&b|||||||||||||||||&0|||"
  122.                                                                             else:
  123.                                                                                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  124.                                                                                 send "&b||||||||||||||||&0||||"
  125.                                                                         else:
  126.                                                                             send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  127.                                                                             send "&b|||||||||||||||&0|||||"
  128.                                                                     else:
  129.                                                                         send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  130.                                                                         send "&3||||||||||||||&0||||||"
  131.                                                                 else:
  132.                                                                     send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  133.                                                                     send "&3|||||||||||||&0|||||||"
  134.                                                             else:
  135.                                                                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  136.                                                                 send "&3||||||||||||&0||||||||"
  137.                                                         else:
  138.                                                             send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  139.                                                             send "&3|||||||||||&0|||||||||"
  140.                                                     else:
  141.                                                         send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  142.                                                         send "&3|||||||||||&0|||||||||"
  143.                                                 else:
  144.                                                     send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  145.                                                     send "&3||||||||||&0||||||||||"
  146.                                             else:
  147.                                                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  148.                                                 send "&3|||||||||&0|||||||||||"
  149.                                         else:
  150.                                             send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  151.                                             send "&3||||||||&0||||||||||||"
  152.                                     else:
  153.                                         send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  154.                                         send "&3|||||||&0|||||||||||||"
  155.                                 else:
  156.                                     send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  157.                                     send "&3||||||&0||||||||||||||"
  158.                             else:
  159.                                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  160.                                 send "&3|||||&0|||||||||||||||"
  161.                         else:
  162.                             send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  163.                             send "&1||||&0||||||||||||||||"
  164.                     else:
  165.                         send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  166.                         send "&1|||&0||||||||||||&4ALERT"
  167.                 else:
  168.                     send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  169.                     send "&1||&0|||||||||||||&4ALERT"
  170.             else:
  171.                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  172.                 send "&1|&0||||||||||||||&4ALERT"
  173.         if arg 1 is set:
  174.             if {nccore.thirst.%arg 1%} > 5:
  175.                 if {nccore.thirst.%arg 1%} > 10:
  176.                     if {nccore.thirst.%arg 1%} > 15:
  177.                         if {nccore.thirst.%arg 1%} > 20:
  178.                             if {nccore.thirst.%arg 1%} > 25:
  179.                                 if {nccore.thirst.%arg 1%} > 30:
  180.                                     if {nccore.thirst.%arg 1%} > 35:
  181.                                         if {nccore.thirst.%arg 1%} > 40:
  182.                                             if {nccore.thirst.%arg 1%} > 45:
  183.                                                 if {nccore.thirst.%arg 1%} > 50:
  184.                                                     if {nccore.thirst.%arg 1%} > 55:
  185.                                                         if {nccore.thirst.%arg 1%} > 60:
  186.                                                             if {nccore.thirst.%arg 1%} > 65:
  187.                                                                 if {nccore.thirst.%arg 1%} > 70:
  188.                                                                     if {nccore.thirst.%arg 1%} > 75:
  189.                                                                         if {nccore.thirst.%arg 1%} > 80:
  190.                                                                             if {nccore.thirst.%arg 1%} > 85:
  191.                                                                                 if {nccore.thirst.%arg 1%} > 90:
  192.                                                                                     if {nccore.thirst.%arg 1%} > 95:
  193.                                                                                         if {nccore.thirst.%arg 1%} >= 100:
  194.                                                                                             if {nccore.thirst.%player%} > 100:
  195.                                                                                                 send "&3PRAGNIENIE / THIRST ( %sender% ) &a[%{nccore.thirst.%player%}%]"
  196.                                                                                                 send "&b|||||||&e&lFULL&b|||||||||&a+"
  197.                                                                                             else:
  198.                                                                                                 send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  199.                                                                                                 send "&b|||||||&e&lFULL&2|||||||||"
  200.                                                                                         else:
  201.                                                                                             send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  202.                                                                                             send "&b|||||||||||||||||||&0|"
  203.                                                                                     else:
  204.                                                                                         send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  205.                                                                                         send "&b||||||||||||||||||&0||"
  206.                                                                                 else:
  207.                                                                                     send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  208.                                                                                     send "&b|||||||||||||||||&0|||"
  209.                                                                             else:
  210.                                                                                 send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  211.                                                                                 send "&b||||||||||||||||&0||||"
  212.                                                                         else:
  213.                                                                             send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  214.                                                                             send "&b|||||||||||||||&0|||||"
  215.                                                                     else:
  216.                                                                         send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  217.                                                                         send "&3||||||||||||||&0||||||"
  218.                                                                 else:
  219.                                                                     send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  220.                                                                     send "&3|||||||||||||&0|||||||"
  221.                                                             else:
  222.                                                                 send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  223.                                                                 send "&3||||||||||||&0||||||||"
  224.                                                         else:
  225.                                                             send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  226.                                                             send "&3|||||||||||&0|||||||||"
  227.                                                     else:
  228.                                                         send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  229.                                                         send "&3|||||||||||&0|||||||||"
  230.                                                 else:
  231.                                                     send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  232.                                                     send "&3||||||||||&0||||||||||"
  233.                                             else:
  234.                                                 send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  235.                                                 send "&3|||||||||&0|||||||||||"
  236.                                         else:
  237.                                             send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  238.                                             send "&3||||||||&0||||||||||||"
  239.                                     else:
  240.                                         send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  241.                                         send "&3|||||||&0|||||||||||||"
  242.                                 else:
  243.                                     send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  244.                                     send "&3||||||&0||||||||||||||"
  245.                             else:
  246.                                 send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  247.                                 send "&3|||||&0|||||||||||||||"
  248.                         else:
  249.                             send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  250.                             send "&1||||&0||||||||||||||||"
  251.                     else:
  252.                         send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  253.                         send "&1|||&0||||||||||||&4ALERT"
  254.                 else:
  255.                     send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  256.                     send "&1||&0|||||||||||||&4ALERT"
  257.             else:
  258.                 send "&3PRAGNIENIE / THIRST ( %arg 1% ) &a[%{nccore.thirst.%arg 1%}%]"
  259.                 send "&1|&0||||||||||||||&4ALERT"
  260.             if arg 2 is set:
  261.                 if sender has permission "thirst.admin":
  262.                     set {nccore.thirst.%arg 1%} to arg 2
  263.                     send "&2Ustawiono poziom pragnienia %arg 1% do %arg 2%"
  264.                 else:
  265.                     send "&4Brak dostepu"
Advertisement
Add Comment
Please, Sign In to add comment