Quaczi

QRegister

Aug 26th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. on script load:
  2. if file "plugins/QRegister/config.yml" doesn't exists:
  3. send "&e&oQ&6&lRegister&8> &cNie znaleziono pliku konfiguracyjnego." to console
  4. send "&e&oQ&6&lRegister&8> &aTworzenie trwa..." to console
  5. create file "plugins/QRegister/config.yml"
  6. send "&e&oQ&6&lRegister&8> &aStworzono plik konfiguracyjny." to console
  7. set "Prefix" to "&eQ&6Register&8 »" in yaml file "plugins/QRegister/config.yml"
  8. set "Suffix" to "&e&o&l." in yaml file "plugins/QRegister/config.yml"
  9. set "NazwaGUI" to "&3Wybierz swoja plec" in yaml file "plugins/QRegister/config.yml"
  10. set "WybierzPlec" to "&aNie wybrales plci. Aby to zrobic nacisnij na ta wiadomosc." in yaml file "plugins/QRegister/config.yml"
  11. set "Wybrano" to "&2Wybrales plec &6&o_PLEC_" in yaml file "plugins/QRegister/config.yml"
  12. set "Chat" to "_RANGA_ _PLEC_ _NICK_&6: &e&o_CZAT_" in yaml file "plugins/QRegister/config.yml"
  13. set "Chlopak" to "&8[&9C&8]" in yaml file "plugins/QRegister/config.yml"
  14. set "Dziewczyna" to "&8[&dD&8]" in yaml file "plugins/QRegister/config.yml"
  15. set {tag2} to single value "Prefix" get of "plugins/QRegister/config.yml" parsed as text
  16. set {prefix} to colored {tag2}
  17. set {suf2} to single value "Suffix" get of "plugins/QRegister/config.yml" parsed as text
  18. set {suffix} to colored {suf2}
  19. set {set} to single value "WybierzPlec" get of "plugins/QRegister/config.yml" parsed as text
  20. set {gui} to single value "NazwaGUI" get of "plugins/QRegister/config.yml" parsed as text
  21. set {wyb} to single value "Wybrano" get of "plugins/QRegister/config.yml" parsed as text
  22. set {chlo} to single value "Chlopak" get of "plugins/QRegister/config.yml" parsed as text
  23. set {dzie} to single value "Dziewczyna" get of "plugins/QRegister/config.yml" parsed as text
  24.  
  25. on join:
  26. if {sex::%player%} is not set:
  27. wait 10 ticks
  28. send "%{prefix}% %{set}%%{suffix}%" to player
  29.  
  30.  
  31. command /plec [<text>]:
  32. trigger:
  33. if arg is "c" or "d" or "chlopak" or "dziewczyna":
  34. if arg is "c" or "chlopak":
  35. set {sex::%player%} to "c"
  36. set {_wiad} to {wyb}
  37. set {_pl} to {chlo}
  38. replace all "_Plec_" in {_wiad} with "%{_pl}%"
  39. send "%{prefix}% %{_wiad}%%{suffix}%"
  40. if arg is "d" or "dziewczyna":
  41. set {sex::%player%} to "d"
  42. set {_wiad} to {wyb}
  43. set {_pl} to {dzie}
  44. replace all "_Plec_" in {_wiad} with "%{_pl}%"
  45. send "%{prefix}% %{_wiad}%%{suffix}%"
  46. if arg is not set:
  47. send "%{prefix}% %{set}%%{suffix}%"
  48.  
  49.  
  50. on chat:
  51. cancel event
  52. if {sex::%player%} is not set:
  53. send "%{prefix}% %{set}%%{suffix}%"
  54. execute player command "qregister"
  55. stop
  56. if {sex::%player%} is set:
  57. set {chat.%player%} to single value "Chat" get of "plugins/QRegister/config.yml" parsed as text
  58. replace all "_NICK_" in {chat.%player%} with "%player%"
  59. replace all "_CZAT_" in {chat.%player%} with "%message%"
  60. replace all "_RANGA_" in {chat.%player%} with "%colored player's prefix%"
  61. if {sex::%player%} is "c" or "chlopak":
  62. set {sexpref::%player%} to "%{chlo}%"
  63. if {sex::%player%} is "d" or "dziewczyna":
  64. set {sexpref::%player%} to "%{dzie}%"
  65. replace all "_PLEC_" in {chat.%player%} with "%{sexpref::%player%}%"
  66. broadcast "%{chat.%player%}%"
  67. stop
Advertisement
Add Comment
Please, Sign In to add comment