MikolajGra

XRelog - special version :)

May 17th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.42 KB | None | 0 0
  1. #XRELOG - Skript by MikolajGra
  2.  
  3. #Licencja http://creativecommons.org/licenses/by-nc-nd/3.0/pl/legalcode z jednym wyjątkiem - pozwalam na edytowanie czasu walki i czasu bana
  4.  
  5. #KORZYSTAJĄC ZE SKRIPTU AKCEPTUJESZ LICENCJĘ.
  6. variables:
  7.     {walka.%player%} = false
  8.     {tag} = "&2[&4X&cRelog&2]"
  9.     {ban.%player%} = false
  10.     {xrelog.tag.uzycie.%player%} = false
  11. options:
  12.     wersja: 1.2
  13.     czas: 15 #Czas walki W SEKUNDACH!
  14.     czasbana: 10 #Czas bana W MINUTACH!
  15.     dostep: &4Blad: &cNie masz dostepu do tej komendy.
  16. on damage of a player:
  17.     if {walka.%victim%} is false:  
  18.         victim is a player:
  19.             attacker is a player:
  20.                 set {walka.%victim%} to true
  21.                 send "%{tag}% &cJestes w walce! &4Nie wylogowywuj sie!" to victim
  22.                 wait {@czas} seconds
  23.                 if {walka.%victim%} is true:
  24.                     send "%{tag}% &aJuz nie jestes w walce" to victim
  25.                     set {walka.%victim%} to false
  26.     if {walka.%attacker%} is false:
  27.         attacker is a player:
  28.             victim is a player:
  29.                 set {walka.%attacker%} to true
  30.                 send "%{tag}% &cJestes w walce! &4Nie wylogowywuj sie!" to attacker            
  31.                 wait {@czas} seconds
  32.                 if {walka.%attacker%} is true:
  33.                     send "%{tag}% &aJuz nie jestes w walce" to attacker
  34.                     set {walka.%attacker%} to false
  35. on quit:
  36.     if {walka.%player%} is true:
  37.         kill player
  38.         set {ban.%player%} to true
  39.         broadcast "%{tag}% &e%player% &cwylogowal sie podczas walki!"
  40.         wait {@czasbana} minutes
  41.         set {ban.%player%} to false
  42. command /xrelog [<text>] [<text>] [<text>]:
  43.     aliases: xr
  44.     trigger:
  45.         if argument 1 is "przestan":       
  46.             if argument 2 is not set:
  47.                 if player has permission "xrelog.przestan.ty" or "xrelog.*":
  48.                     if {walka.%player%} is true:
  49.                         set {walka.%player%} to false
  50.                         send "%{tag}% &aJuz nie jestes w walce - uzyles komende." to player
  51.                     else:
  52.                         send "%{tag}% &4Blad: &cNie jestes w walce!" to player
  53.                 else:
  54.                     send "%{tag}% {@dostep}" to player
  55.             else:
  56.                 if player has permission "xrelog.przestan.on" or "xrelog.*":
  57.                     if arg 2 parsed as player is set:
  58.                         if {walka.%arg-2%} is true:
  59.                             set {walka.%player%} to false
  60.                             send "%{tag}% &aGracz &e%arg-2% &ajuz nie jest w walce - uzyles komendy!"  to player
  61.                             send "%{tag}% &aJuz nie jestes w walce! - gracz &e%player% &auzyl komendy." to arg 2 parsed as player
  62.                         else:
  63.                             send "%{tag}% &4Blad: &cPodany gracz (&e%arg-2%&c) nie jest w walce!" to player
  64.                     else:
  65.                         send "%{tag}% &4Blad: &cPodany gracz (&e%arg-2%&c) jest offline." to player
  66.                 else:
  67.                     send "%{tag}% {@dostep}" to player
  68.         if argument 1 is "zacznij":
  69.             if argument 2 is not set:
  70.                 if player has permission "xrelog.zacznij.ty" or "xrelog.*":
  71.                     if {walka.%player%} is false:
  72.                         set {walka.%player%} to true
  73.                         send "%{tag}% &cJestes w walce! &4Nie wylogowywuj sie! - uzyles komendy." to player
  74.                         wait {@czas} seconds
  75.                         if {walka.%player%} is true:
  76.                             send "%{tag}% &aJuz nie jestes w walce - po wczesniejszym uzyciu komendy" to player
  77.                             set {walka.%player%} to false
  78.                     else:
  79.                         send "%{tag}% &4Blad: &cJestes w walce!" to player
  80.                 else:
  81.                     send "%{tag}% {@dostep}" to player
  82.             else:
  83.                 if player has permission "xrelog.zacznij.on" or "xrelog.*":
  84.                     if arg 2 parsed as player is set:
  85.                         if {walka.%arg-2%} is false:
  86.                             set {walka.%player%} to true
  87.                             send "%{tag}% &cGracz &e%arg-2% &cjest w walce - uzyles komendy!"  to player
  88.                             send "%{tag}% &cJestes w walce! &4Nie wylogowywuj sie! - gracz &e%player% &4uzyl komendy." to arg 2 parsed as player
  89.                             wait {@czas} seconds
  90.                             if {walka.%arg-2%} is true:
  91.                                 send "%{tag}% &aJuz nie jestes w walce - po wczesniejszym uzyciu komendy przez gracza %player%" to arg 2 parsed as player
  92.                                 send "%{tag}% &AGracz &e%arg-2%&a juz nie jest w walce - wczesniej uzyles komendy!" to player
  93.                                 set {walka.%arg-2%} to false
  94.                         else:
  95.                             send "%{tag}% &4Blad: &cPodany gracz (&e%arg-2%&c) jest w walce!" to player
  96.                     else:
  97.                         send "%{tag}% &4Blad: &cPodany gracz (&e%arg-2%&c) jest offline." to player
  98.                 else:
  99.                     send "%{tag}% {@dostep}" to player
  100.                    
  101.         if argument 1 is "tag":
  102.             if argument 2 is "zmien":
  103.                 if argument 3 is set:
  104.                     if player has permission "xrelog.tag.zmien":
  105.                         set {tag} to colored arg 3
  106.                         send "%{tag}% &aZmieniono tag!" to player
  107.                     else:
  108.                         send "%{tag}% {@dostep}" to player
  109.                 else:
  110.                     send "%{tag}% &4Blad: &cWpisz nowa nazwe tagu!" to player
  111.             if argument 2 is "przywroc":
  112.                 if argument 3 is not set:
  113.                     if player has permission "xrelog.tag.przywroc" or "xrelog.*":
  114.                         set {tag} to "&2[&4X&cRelog&2]"
  115.                         send "%{tag}% &aPrzywrocono tag!" to player
  116.                     else:
  117.                         send "%{tag}% {@dostep}" to player
  118.             else:
  119.                 if player has permission "xrelog.tag.przywroc" or "xrelog.tag.zmien" or "xrelog.*":
  120.                     send "%{tag}% &4Blad: &cBrakuje kilku argumentow! (przywroc, zmien)" to player
  121.         if argument 1 is "odbanuj":
  122.             if player has permission "xrelog.odbanuj" or "xrelog.*":
  123.                 if argument 2 is set:
  124.                     if {ban.%arg-2%} is true:
  125.                         set {ban.%arg-2%} to false
  126.                         send "%{tag}% &aPomyslnie odbanowales gracza &e%arg-2% &a!" to player
  127.                     else:
  128.                         send "%{tag}% &4Blad: &cPodany gracz (&e%arg-2%&c) nie jest zbanowany!" to player
  129.                 else:
  130.                     send "%{tag}% &4Blad: &cPodaj nazwe gracza!" to player
  131.             else:
  132.                 send "%{tag}% {@dostep}" to player
  133.         if argument 1 is "sprawdz":
  134.             if player has permission "xrelog.sprawdz" or "xrelog.*":
  135.                 if argument 2 is set:
  136.                     if argument 2 parsed as player is set:
  137.                         send "%{tag}% &cInformacje o graczu &e%arg-2%:" to player
  138.                         if {ban.%arg-2%} is true:
  139.                             send "&eZbanowany: &aTak" to player
  140.                         else:
  141.                             send "&eZbanowany: &cNie" to player
  142.                         if {walka.%arg-2%} is true:
  143.                             send "&eW walce: &aTak" to player
  144.                         else:
  145.                             send "&eW walce: &cNie" to player
  146.                     else:
  147.                         send "%{tag}% &4Blad: &cPodany gracz (&e%arg-2%&c) jest offline." to player
  148.                 if argument 2 is not set:
  149.                     send "%{tag}% &cInformacje o graczu &e%player%:" to player
  150.                     if {ban.%arg-2%} is true:
  151.                         send "&eZbanowany: &aTak" to player
  152.                     else:
  153.                         send "&eZbanowany: &cNie" to player
  154.                     if {walka.%arg-2%} is true:
  155.                         send "&eW walce: &aTak" to player
  156.                     else:
  157.                         send "&eW walce: &cNie" to player
  158.             else:
  159.                 send "%{tag}% {@dostep}" to player
  160.         if argument 1 is not "przestan" or "zacznij" or "tag" or "odbanuj" or "sprawdz":
  161.             if player has permission "xrelog.przestan.ty" or "xrelog.zacznij.ty" or "xrelog.tag.zmien" or "xrelog.tag.przywroc" or "xrelog.odbanuj" or "xrelog.sprawdz" or "xrelog.*":
  162.                 send "%{tag}% &4Blad: &cNieznana komenda." to player
  163.         if argument 1 is not set:
  164.             if player has permission "xrelog.przestan.ty" or "xrelog.zacznij.ty" or "xrelog.przestan.on" or "xrelog.zacznij.on" or "xrelog.tag.zmien" or "xrelog.tag.przywroc" or "xrelog.odbanuj" or "xrelog.sprawdz" or "xrelog.*":
  165.                 send "%{tag}% &4Blad: &cBrakuje kilku argumentow! (przestan, zacznij, tag, odbanuj, sprawdz)" to player                        
  166. on join:
  167.     if {ban.%player%} is true:
  168.         kick the player due to "%{tag}% &4Zostales zbanowany na &e{@czasbana} minut&4, poniewaz wylogowales sie podczas walki!"  
  169. on skript start:
  170.     send "&2&4X&cRelog&2 - skript by &aMikolajGra&2 wersja: {@wersja}" to the console      
  171. on command:
  172.     if {walka.%player%} is true:
  173.         if player has permission "xrelog.walka.komenda" or "xrelog.*":
  174.             stop
  175.         else:
  176.             cancel event
  177.             send "%{tag}% &4Nie mozesz uzywac tej komendy podczas walki!" to player
Advertisement
Add Comment
Please, Sign In to add comment