Facebook
From Rzuffik, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 511
  1. options:
  2.         tag: &8[&3SejfRzuffik&8]
  3.         tag_raw: &9SejfRzuffik
  4.  
  5.         message_noperms: &cNie masz do tego uprawnien!
  6.         message_open: &eSejf zostal otworzony.
  7.         message_saved: &aPrzedmioty zostaly zapisane.
  8.         message_saving: &7Przedmioty sa wlasnie zapisywane.
  9.         message_password_incorrect: &cHaslo nie jest poprawne.
  10.         message_password_deleted: &aTwoje haslo zostalo usuniete.
  11.         message_password_new: &cMusisz podac nowe haslo.
  12.         message_password_saved: &aTwoje haslo zostalo zmienione na nowe.
  13.         message_reloading: &7Skrypt zostanie przeladowany.
  14.         message_reloaded: &aSkrypt zostal przeladowany.
  15.  
  16. variables:
  17.         {sejfRzuffik::%player%::password} = ""
  18.         {sejfRzuffik::%player%::stats::opened} = 0
  19.         {sejfRzuffik::%player%::stats::failed} = 0
  20.         {sejfRzuffik::%player%::stats::passChange} = 0
  21.  
  22. command /sejf [<text>] [<text>] [<text>]:
  23.         aliases: sejf, sc
  24.         trigger:
  25.                 if player has permission "sejfRzuffik.help" or "sejfRzuffik.*":
  26.                         if arg 1 is not set:
  27.                                 send "&2&m----------------------------------------------------"
  28.                                 send "&b                           &c&lSejf"
  29.                                 send "&7- &f/sejf otworz &7- Otwiera sejf"
  30.                                 send "&7- &f/sejf statystyki [gracz] &7- Statystyki"
  31.                                 if player has permission "sejfRzuffik.reload" or "sejfRzuffik.*":
  32.                                 send "&c&l                         by &4&lRzuffik"
  33.                                 send "&2&m----------------------------------------------------"
  34.                 else:
  35.                         send "{@tag} {@message_noperms}"
  36.  
  37.                 if arg 1 is "otworz":
  38.                         if player has permission "sejfRzuffik.open" or "sejfRzuffik.*":
  39.                                 if {sejfRzuffik::%player%::password} isn't "":
  40.                                         if arg 2 is "%{sejfRzuffik::%player%::password}%":
  41.                                                 send "{@tag} {@message_open}"
  42.                                                 add 1 to {sejfRzuffik::%player%::stats::opened}
  43.                                                 set {_p} to player
  44.                                                 open chest with 6 rows named "{@tag_raw} &r- %player%" to {_p}
  45.                                                 set {_slot} to 0
  46.                                                 loop 54 times:
  47.                                                         set slot {_slot} of {_p}'s current inventory to {sejfRzuffik::%{_slot}%::%{_p}%}
  48.                                                         add 1 to {_slot}
  49.                                                 set {sejfRzuffik::open::%player%} to true
  50.                                         else:
  51.                                                 send "{@tag} {@message_password_incorrect}"
  52.                                                 add 1 to {sejfRzuffik::%player%::stats::failed}
  53.                                 else:
  54.                                         send "{@tag} {@message_open}"
  55.                                         set {_p} to player
  56.                                         add 1 to {sejfRzuffik::%player%::stats::opened}
  57.                                         open chest with 6 rows named "{@tag_raw} &r- %player%" to {_p}
  58.                                         set {_slot} to 0
  59.                                         loop 54 times:
  60.                                                 set slot {_slot} of {_p}'s current inventory to {sejfRzuffik::%{_slot}%::%{_p}%}
  61.                                                 add 1 to {_slot}
  62.                                         set {sejfRzuffik::open::%player%} to true
  63.                         else:
  64.                                 send "{@tag} {@message_noperms}"
  65.                
  66.                 if arg 1 is "setpass":
  67.                         if player has permission "sejfRzuffik.setpass" or "sejfRzuffik.*":
  68.                                 if {sejfRzuffik::%player%::password} is "":
  69.                                         send "{@tag} {@message_password_saved}"
  70.                                         set {sejfRzuffik::%player%::password} to arg 2
  71.                                         add 1 to {sejfRzuffik::%player%::stats::passChange}
  72.                                 else:
  73.                                         if arg 2 is "%{sejfRzuffik::%player%::password}%":
  74.                                                 if arg 3 is set:
  75.                                                         set {sejfRzuffik::%player%::password} to arg 3
  76.                                                         send "{@tag} {@message_password_saved}"
  77.                                                         add 1 to {sejfRzuffik::%player%::stats::passChange}
  78.                                                 else:
  79.                                                         send "{@tag} {@message_password_new}"
  80.                                         else:
  81.                                                 send "{@tag} {@message_password_incorrect}"
  82.                         else:
  83.                                 send "{@tag} {@message_noperms}"
  84.  
  85.                 if arg 1 is "delpass":
  86.                         if player has permission "sejfRzuffik.delpass" or "sejfRzuffik.*":
  87.                                 if arg 2 is "%{sejfRzuffik::%player%::password}%":
  88.                                         set {sejfRzuffik::%player%::password} to ""
  89.                                         send "{@tag} {@message_password_deleted}"
  90.                                 else:
  91.                                         send "{@tag} {@message_password_incorrect}"
  92.                         else:
  93.                                 send "{@tag} {@message_noperms}"
  94.        
  95.                 if arg 1 is "statystyki":
  96.                         if player has permission "sejfAdmin.stats" or "sejfAdmin.*":
  97.                                 if arg 2 is set:
  98.                                         set {_opened} to "%{sejfRzuffik::%arg-2%::stats::opened}%"
  99.                                         set {_failed} to "%{sejfRzuffik::%arg-2%::stats::failed}%"
  100.                                         set {_passChange} to "%{sejfRzuffik::%arg-2%::stats::passChange}%"
  101.                                         replace all "<none>" with "0" in {_opened}
  102.                                         replace all "<none>" with "0" in {_failed}
  103.                                         replace all "<none>" with "0" in {_passChange}
  104.                                         send "&2&m----------------------------------------------------"
  105.                                         send "                  &eStatystyki: &9&l%arg-2%"
  106.                                         send "&e- &aOtworzonych sejfow: &7%{_opened}%"
  107.                                         send "&2&m----------------------------------------------------"
  108.                                 else:
  109.                                         set {_opened} to "%{sejfRzuffik::%player%::stats::opened}%"
  110.                                         set {_failed} to "%{sejfRzuffik::%player%::stats::failed}%"
  111.                                         set {_passChange} to "%{sejfRzuffik::%player%::stats::passChange}%"
  112.                                         replace all "<none>" with "0" in {_opened}
  113.                                         replace all "<none>" with "0" in {_failed}
  114.                                         replace all "<none>" with "0" in {_passChange}
  115.                                         send "&2&m----------------------------------------------------"
  116.                                         send "                  &eStatystyki: &9&l%player%"
  117.                                         send "&e- &aOtworzonych sejfow: &7%{sejfRzuffik::%player%::stats::opened}%"
  118.                                         send "&2&m----------------------------------------------------"
  119.                         else:
  120.                                 send "{@tag} {@message_noperms}"
  121.  
  122.                 if arg 1 is "reload":
  123.                         if player has permission "sejfRzuffik.reload" or "sejfRzuffik.*":
  124.                                 send "{@tag} {@message_reloading}"
  125.                                 execute console command "sk reload %script%"
  126.                                 send "{@tag} {@message_reloaded}"
  127.                         else:
  128.                                 send "{@tag} {@message_noperms}"
  129.  
  130. on inventory close:
  131.         if inventory name of player's current inventory is "{@tag_raw} &r- %player%":
  132.                 send "{@tag} {@message_saving}"
  133.                 delete {sejfRzuffik::open::%player%}
  134.                 set {_slot} to 0
  135.                 loop 54 times:
  136.                         set {sejfRzuffik::%{_slot}%::%player%} to slot {_slot} of player's current inventory
  137.                         add 1 to {_slot}
  138.                 send "{@tag} {@message_saved}"