knugi

Untitled

Mar 13th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.14 KB | None | 0 0
  1. #ZROBIONE#
  2. # - zakladanie /do ulepszenia duzo
  3. # - usuwanie /do ulepszenia
  4. # - else if usuwanie ;c*
  5. #ogien sojusznicy
  6. #zakladanie gildii
  7. #tagi nad glowa
  8. #zapisy do plikow...
  9. #narazie tyle
  10. #tworzenie gildii zapis do pliku .yml
  11.  
  12. options:
  13. folder: plugins/Skript/scripts/foxGuilds
  14. wiad: plugins/Skript/scripts/foxGuilds/messages.yml
  15. cfg: plugins/Skript/scripts/foxGuilds/config.yml
  16. gildie: plugins/Skript/scripts/foxGuilds/gildie.yml
  17. users: plugins/Skript/scripts/foxGuilds/user.yml
  18. invited: plugins/Skript/scripts/foxGuilds/invited.yml
  19. urank: plugins/Skript/scripts/foxGuilds/urank.yml
  20.  
  21. on script load:
  22. if folder "{@folder}" doesn't exists:
  23. create folder "{@folder}"
  24. create file "{@cfg}"
  25. create file "{@gildie}"
  26. create file "{@wiad}"
  27. create file "{@users}"
  28. create file "{@invited}"
  29. create file "{@urank}"
  30. set "permissionVip" to "guilds.Vip" in yaml file "{@cfg}"
  31. set "startRank" to "1000" in yaml file "{@cfg}"
  32. set "bc.wGCreate" to "" in yaml file "{@wiad}"
  33. set "w.wGHelp" to "" in yaml file "{@wiad}"
  34. set "cfg.guildItems.1" to "32 diamonds" in yaml file "{@cfg}"
  35. set "cfg.guildItems.2" to "64 stone" in yaml file "{@cfg}"
  36. set "cfg.guildItemsVip.1" to "16 diamonds" in yaml file "{@cfg}"
  37. set "cfg.guildItemsVip.2" to "32 stone" in yaml file "{@cfg}"
  38.  
  39. command /gildia [<text>] [<text>] [<text>] [<text>]:
  40. aliases: g
  41. trigger:
  42. if arg 1 is not set:
  43. send "&e/gildia zaloz <tag> <nazwa> &7- zaklada gildie%nl%&e/gildia usun <tag> &7- usuwa gildie"
  44. stop
  45. if arg 1 is "zaloz":
  46. if arg 2 is set:
  47. if arg 2's length is bigger than 2:
  48. if arg 2's length is smaller than 5:
  49. if arg 3 is set:
  50. if arg 3's length is smaller or equal to 16:
  51. if arg 3's length is bigger than 6:
  52. if yaml path "users.%player%" in file "{@users}" doesn't exist:
  53. set {_g::*} to configuration section "gildia" get of "{@gildie}"
  54. loop {_g::*}:
  55. set {_tag} to single value "gildia.%loop-value%.tag" get of "{@gildie}"
  56. if "%{_tag}%" is "%arg 2%":
  57. send "&c* &7Gildia z podanym tagiem juz istnieje."
  58. stop
  59. loop {_g::*}:
  60. set {_nazwa} to single value "gildia.%loop-value%.nazwa" get of "{@gildie}"
  61. if "%{_nazwa}%" is "%arg 3%":
  62. send "&c* &7Taka nazwa gildi juz istnieje."
  63. stop
  64. set {_perm} to single value "permissionVip" get of "{@cfg}"
  65. if player doesn't have permission "%{_perm}%":
  66. set {_p::*} to configuration section "cfg.guildItems" get of "{@cfg}"
  67. loop {_p::*}:
  68. if "%all items in player's inventory%" doesn't contain "%loop-value%":
  69. send "&cNie posiadasz: &6%loop-value%"
  70. stop
  71. else:
  72. set {_p::*} to configuration section "cfg.guildItemsVip" get of "{@cfg}"
  73. loop {_p::*}:
  74. set {_i} to single value "cfg.guildItemsVip.%loop-index%" get of "{@cfg}"
  75. if "%all items in player's inventory%" doesn't contain "%{_i}%":
  76. send "&cNie posiadasz: &6%{_i}%"
  77. stop
  78. wait 10 tick
  79. set "gildia.%arg 2%.tag" to "%arg 2%" in yaml file "{@gildie}"
  80. set "gildia.%arg 2%.nazwa" to "%arg 3%" in yaml file "{@gildie}"
  81. set "gildia.%arg 2%.zalozyciel" to "%player%" in yaml file "{@gildie}"
  82. set "gildia.%arg 2%.lider" to "%player%" in yaml file "{@gildie}"
  83. set "users.%player%.nick" to "%player%" in yaml file "{@users}"
  84. set "users.%player%.gildia" to "%arg 2%" in yaml file "{@users}"
  85. add "%player%" to yaml list "gildia.%arg 2%.czlonkowie" from "foxGuilds/gildie.yml"
  86. broadcast "&aGracz &7%player% &astworzyl gildie o nazwie &7%arg 3% &a i tagu &7%arg 2%"
  87. else:
  88. send "&8>> &cPosiadasz juz gildie."
  89. stop
  90. else:
  91. send "&8>> &cNazwa gildii musi zawierac od 6 do 16 znakow."
  92. stop
  93. else:
  94. send "&8>> &cNazwa gildii musi zawierac od 6 do 16 znakow."
  95. stop
  96. else:
  97. send "&8>> &cPoprawne uzycie: &7/gildia zaloz <tag> <nazwa>"
  98. stop
  99. else:
  100. send "&8>> &cTag gildii musi zawierac od 3 do 4 znakow."
  101. stop
  102. else:
  103. send "&8>> &cTag gildii musi zawierac od 3 do 4 znakow."
  104. stop
  105. else:
  106. send "&8>> &cPoprawne uzycie: &7/gildia zaloz <tag> <nazwa>"
  107. stop
  108. if arg 1 is "usun":
  109. if arg 2 is set:
  110. set {_g::*} to configuration section "gildia" get of "{@gildie}"
  111. loop {_g::*}:
  112. set {_tag} to single value "gildia.%loop-value%.tag" get of "{@gildie}"
  113. if yaml path "gildia.%arg 2%" in file "{@gildie}" exists:
  114. if "%arg 2%" is "%{_tag}%":
  115. set {_zal} to single value "gildia.%loop-value%.zalozyciel" get of "{@gildie}"
  116. set {_lid} to single value "gildia.%loop-value%.lider" get of "{@gildie}"
  117. if "%player%" is "%{_lid}%" or "%{_zal}%":
  118. send "&8>> &aUsunales swoja gildie!"
  119. delete yaml value "gildia.%arg 2%" from file "foxGuilds/guilds.yml"
  120. delete yaml value "users.%player%" from file "foxGuilds/user.yml"
  121. stop
  122. else:
  123. send "&8>> &cNie masz uprawnien lidera/zalozyciela"
  124. stop
  125. else:
  126. send "&8>> &cPodana gildia nie instnieje."
  127. stop
  128. else:
  129. send "&8>> &cPodana gildia nie istnieje."
  130. stop
  131. else:
  132. send "&8>> &cPoprawne uzycie: &7/gildia usun <tag>"
  133. stop
  134. if arg 1 is "zapros":
  135. if arg 2 is set:
  136. set {_c} to arg 2 parsed as player
  137. if {_c} is online:
  138. if true is true: #Huehuehuehuehuehue Knugi To Chuj i Chuj Ci do Tego <3
  139. if yaml path "users.%{_c}%" in file "{@users}" doesn't exist:
  140. send "&aZapraszalny"
  141. #TODO cale zaproszenie
  142. else:
  143. send "7cma gildie"
  144. else:
  145. send "&8>> &cTen gracz nie jest online."
  146. stop
  147. else:
  148. send "&8>> &cMusisz podac nick gracza ktorego chcesz zaprosic."
  149. stop
  150. #EVENTY RANKINGOWE
  151. on join:
  152. if yaml path "ranking.%player%" in file "{@urank}" doesn't exist:
  153. set {_dt} to single value "startRank" get of "{@cfg}"
  154. set "ranking.%player%" to "%{_dt}%" in yaml file "{@urank}"
  155. send "&7Domyslny ranking ustawiony!"
Advertisement
Add Comment
Please, Sign In to add comment