Advertisement
pascal25565

Untitled

Jun 11th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.22 KB | None | 0 0
  1.  
  2. # _ _ _
  3. # / \ __| |_ ____ _ _ __ ___ ___ __| |
  4. # / _ \ / _` \ \ / / _` | '_ \ / __/ _ \/ _` |
  5. # / ___ \ (_| |\ V / (_| | | | | (_| __/ (_| |
  6. # /_/ \_\__,_| \_/ \__,_|_| |_|\___\___|\__,_|
  7. # _____ _ _
  8. # | ___| __(_) ___ _ __ __| |___
  9. # | |_ | '__| |/ _ \ '_ \ / _` / __|
  10. # | _|| | | | __/ | | | (_| \__ \
  11. # |_| |_| |_|\___|_| |_|\__,_|___/
  12.  
  13. # A PROJECT BY LEVENCE
  14.  
  15.  
  16. # License: GNU General Public License Version 3 (GPLv3)
  17.  
  18.  
  19. on join:
  20. delete {LastMSG::%player%}
  21. delete {_FriendsOnlineList::%player%::*}
  22. set {SpielerName.%player%} to player's name
  23. set {db_.UUID.%player%} to player
  24. set {LastOnlineFriends::%player%.Data} to now
  25. If {db_.FriendsAsk::%player%.Number} is bigger than 0:
  26. If {db_.FriendsAsk::%player%.Number} is bigger than 1:
  27. message "&4│ &cFreunde &4» &6Du hast &3%{db_.FriendsAsk::%player%.Number}% &6neue Freundschaftsanfragen"
  28. else:
  29. message "&4│ &cFreunde &4» &6Du hast &3%{db_.FriendsAsk::%player%.Number}% &6neue Freundschaftsanfrage"
  30. loop all players:
  31. loop {db_.Friends::%player%::*}:
  32. If loop-value-1 is loop-player:
  33. If {FriendsOptions::%loop-value-1%.Notify} is not set:
  34. send "&4│ &cFreunde &4» &a%player% ist nun online" to loop-player
  35. add loop-player to {_FriendsOnlineList::%player%::*}
  36. If {_FriendsOnlineList::%player%::*} is not set:
  37. message ""
  38. message "&4│ &cFreunde &4»"
  39. message "&4│ &6Online: &cNiemand :/"
  40. message ""
  41. message ""
  42. else:
  43. message ""
  44. message "&4│ &cFreunde &4»"
  45. message "&4│ &6Online: &a%{_FriendsOnlineList::%player%::*}%"
  46. message ""
  47. message ""
  48.  
  49. on load:
  50. delete {AlreadyLeft::*}
  51.  
  52. on quit:
  53. If {AlreadyLeft::%player%} is not set:
  54. set {AlreadyLeft::%player%} to "1"
  55. delete {LastMSG::%{db_.UUID.%{LastMSG::%player%}%}%}
  56. delete {LastMSG::%player%}
  57. set {LastOnlineFriends::%player%.Data} to now
  58. loop all players:
  59. loop {db_.Friends::%player%::*}:
  60. If loop-value-1 is loop-player:
  61. If {FriendsOptions::%loop-value-1%.Notify} is not set:
  62. send "&4│ &cFreunde &4» &c%player% ist nun offline" to loop-player
  63. wait 2 seconds
  64. delete {AlreadyLeft::%player%}
  65.  
  66. on damage:
  67. If attacker is a player:
  68. If victim is a player:
  69. If {FriendsNoDamage::%attacker%::%victim%} is set:
  70. cancel event
  71.  
  72. on inventory click:
  73. If inventory name of player's current inventory is "&6Freunde":
  74. cancel event
  75. set {_FriendsAsk5.%player%} to clicked slot
  76. set {_FriendsAsk5.%player%.Name} to name of slot {_FriendsAsk5.%player%} of player's current inventory
  77. replace all "&a" and "&8" in {_FriendsAsk5.%player%.Name} with ""
  78. If {db_.Friends::%player%::%{db_.UUID.%{_FriendsAsk5.%player%.Name}%}%} is set:
  79. set {FriendsCurrentShow::%player%} to {_FriendsAsk5.%player%.Name}
  80. make console execute command "/Friends:API %player% Options %{FriendsCurrentShow::%player%}% Open"
  81. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  82. else:
  83. If inventory name of player's current inventory contains "Annehmen?":
  84. cancel event
  85. If clicked slot is 0:
  86. set {_FriendsAsk3.%player%} to clicked slot
  87. set {_FriendsAsk3.%player%.Name} to name of slot {_FriendsAsk3.%player%} of player's current inventory
  88. If {_FriendsAsk3.%player%.Name} is "&a✔ Annehmen":
  89. make console execute command "/Friends:API %player% State %{FriendsCurrentShow::%player%}% Accept"
  90. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  91. close player's inventory
  92. If clicked slot is 8:
  93. set {_FriendsAsk3.%player%} to clicked slot
  94. set {_FriendsAsk3.%player%.Name} to name of slot {_FriendsAsk3.%player%} of player's current inventory
  95. If {_FriendsAsk3.%player%.Name} is "&4✖ Ablehnen":
  96. make console execute command "/Friends:API %player% State %{FriendsCurrentShow::%player%}% Deny"
  97. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  98. close player's inventory
  99. else:
  100. If inventory name of player's current inventory is "&cFreundschaftsanfragen":
  101. cancel event
  102. If clicked slot is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 or 26:
  103. set {_FriendsAsk2.%player%} to clicked slot
  104. set {_FriendsAsk2.%player%.Name} to name of slot {_FriendsAsk2.%player%} of player's current inventory
  105. set {_FriendsAsk2.%player%.Item} to type of slot {_FriendsAsk2.%player%} of player's current inventory
  106. If {_FriendsAsk2.%player%.Item} is player head:
  107. If {db_.FriendsAsk::%player%::List::%{db_.UUID.%{_FriendsAsk2.%player%.Name}%}%} is set:
  108. make console execute command "/Friends:API %player% State %{_FriendsAsk2.%player%.Name}% Open"
  109. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  110. set {FriendsCurrentShow::%player%} to {_FriendsAsk2.%player%.Name}
  111. else:
  112. If inventory name of player's current inventory contains "- Optionen":
  113. cancel event
  114. set {_FriendsAsk6.%player%} to clicked slot
  115. set {_FriendsAsk6.%player%.Name} to name of slot {_FriendsAsk6.%player%} of player's current inventory
  116. set {_FriendsAsk6.%player%.Item} to type of slot {_FriendsAsk6.%player%} of player's current inventory
  117. If {_FriendsAsk6.%player%.Name} is "&bZurück":
  118. If {_FriendsAsk6.%player%.Item} is slimeball:
  119. close player's inventory
  120. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  121. wait 1 tick
  122. make player execute command "/friends"
  123. If {_FriendsAsk6.%player%.Name} contains "&aDu fügst":
  124. If {_FriendsAsk6.%player%.Item} is light green wool:
  125. set {FriendsNoDamage::%player%::%{db_.UUID.%{FriendsCurrentShow::%player%}%}%} to {db_.UUID.%{FriendsCurrentShow::%player%}%}
  126. set slot 1 of player's current inventory to red wool named "&cDu fügst %{FriendsCurrentShow::%player%}% kein Schaden zu"
  127. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  128. If {_FriendsAsk6.%player%.Name} contains "&cDu fügst":
  129. If {_FriendsAsk6.%player%.Item} is red wool:
  130. delete {FriendsNoDamage::%player%::%{db_.UUID.%{FriendsCurrentShow::%player%}%}%}
  131. set slot 1 of player's current inventory to light green wool named "&aDu fügst %{FriendsCurrentShow::%player%}% Schaden zu"
  132. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  133. If {_FriendsAsk6.%player%.Name} is "&4Freund entfernen":
  134. If {_FriendsAsk6.%player%.Item} is red dye:
  135. #make console execute command "/playsound note.hat %player% ~0 ~0 ~0 10 1"
  136. make console execute command "/Friends:API %player% State %{FriendsCurrentShow::%player%}% Remove"
  137. make player execute command "/friends"
  138.  
  139. command /friends:API [<player>] [<text>] [<offlineplayer>] [<text>]:
  140. executable by: console
  141. trigger:
  142. If arg-2 is "Anfragen":
  143. #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
  144. open chest with 6 rows named "&cFreundschaftsanfragen" to arg-1
  145. loop {db_.FriendsAsk::%arg-1%::List::*}:
  146. If {db_.FriendsAsk::%arg-1%::List::%loop-value%} is not set:
  147. remove loop-value from {db_.FriendsAsk::%arg-1%::List::*}
  148. else:
  149. loop 27 times:
  150. If slot loop-number -1 of arg-1's current inventory is air:
  151. set {_FriendsAsk.%loop-value-1%.%arg-1%} to {SpielerName.%loop-value-1%} parsed as offline player
  152. format slot loop-number -1 of arg-1 with {_FriendsAsk.%loop-value-1%.%arg-1%}'s skull named "%{SpielerName.%loop-value-1%}%" to be unstealable
  153. stop loop
  154. If arg-2 is "Anfragen_Keine":
  155. #make console execute command "/playsound note.bass %arg-1% ~0 ~0 ~0 10 1"
  156. If arg-2 is "State":
  157. If arg-4 is "Open":
  158. set {_skull.%arg-1%} to "%arg-3%" parsed as offline player
  159. open chest with 1 row named "&e%arg-3% - Annehmen?" to arg-1
  160. format slot 0 of arg-1 with light green wool named "&a✔ Annehmen" to be unstealable
  161. format slot 4 of arg-1 with {_skull.%arg-1%}'s skull named "%arg-3%" to be unstealable
  162. format slot 8 of arg-1 with red wool named "&4✖ Ablehnen" to be unstealable
  163. If arg-4 is "Accept":
  164. If {db_.FriendsComplete::%arg-1%.Number} is smaller than 17:
  165. remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
  166. delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
  167. add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
  168. set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
  169. add 1 to {db_.FriendsComplete::%arg-1%.Number}
  170. set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
  171. #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
  172. send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
  173. loop all players:
  174. If "%arg-3%" is "%loop-player%":
  175. loop-player is not "%arg-1%"
  176. #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
  177. send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
  178. else:
  179. If arg-player does not have permission "AF.LimitBypass.1", "AF.LimitBypass.2" or "AF.LimitBypass.3":
  180. send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
  181. else:
  182. If {db_.FriendsComplete::%arg-1%.Number} is smaller than 24:
  183. remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
  184. delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
  185. add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
  186. set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
  187. add 1 to {db_.FriendsComplete::%arg-1%.Number}
  188. set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
  189. #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
  190. send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
  191. loop all players:
  192. If "%arg-3%" is "%loop-player%":
  193. loop-player is not "%arg-1%"
  194. #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
  195. send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
  196. else:
  197. If arg-player does not have permission "AF.LimitBypass.2" or "AF.LimitBypass.3":
  198. send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
  199. else:
  200. If {db_.FriendsComplete::%arg-1%.Number} is smaller than 29:
  201. remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
  202. delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
  203. add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
  204. set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
  205. add 1 to {db_.FriendsComplete::%arg-1%.Number}
  206. set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
  207. #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
  208. send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
  209. loop all players:
  210. If "%arg-3%" is "%loop-player%":
  211. loop-player is not "%arg-1%"
  212. #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
  213. send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
  214. else:
  215. If arg-player does not have permission "AF.LimitBypass.3":
  216. send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
  217. else:
  218. If {db_.FriendsComplete::%arg-1%.Number} is smaller than 35:
  219. remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
  220. delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
  221. add 1 to {db_.FriendsComplete::%{db_.UUID.%arg-3%}%.Number}
  222. set {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%} to {db_.UUID.%arg-3%}
  223. add 1 to {db_.FriendsComplete::%arg-1%.Number}
  224. set {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%} to arg-1
  225. #make console execute command "/playsound random.levelup %arg-1% ~0 ~0 ~0 10 1"
  226. send "&4│ &cFreunde &4» &aDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &aangenommen" to arg-1
  227. loop all players:
  228. If "%arg-3%" is "%loop-player%":
  229. loop-player is not "%arg-1%"
  230. #make console execute command "/playsound random.levelup %loop-player% ~0 ~0 ~0 10 1"
  231. send "&4│ &cFreunde &4» &6%arg-1% &ahat deine Freundschaftsanfrage angenommen" to loop-player
  232. else:
  233. send "&4│ &cFreunde &4» &cDu hast das maximale Limit an Freunden erreicht" to arg-1
  234.  
  235. If arg-4 is "Deny":
  236. remove 1 from {db_.FriendsAsk::%{db_.UUID.%arg-1%}%.Number}
  237. delete {db_.FriendsAsk::%arg-1%::List::%{db_.UUID.%arg-3%}%}
  238. send "&4│ &cFreunde &4» &cDu hast die Freundschaftsanfrage von &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &cabgelehnt" to arg-1
  239. loop all players:
  240. If "%arg-3%" is "%loop-player%":
  241. loop-player is not "%arg-1%"
  242. send "&4│ &cFreunde &4» &6%arg-1% &chat deine Freundschaftsanfrage abgelehnt" to loop-player
  243. If arg-4 is "Remove":
  244. remove 1 from {db_.Friends::%{db_.UUID.%arg-3%}%.Number}
  245. delete {db_.Friends::%{db_.UUID.%arg-3%}%::%arg-1%}
  246. remove 1 from {db_.Friends::%arg-1%.Number}
  247. delete {db_.Friends::%arg-1%::%{db_.UUID.%arg-3%}%}
  248. delete {db_.FriendsAsk::%{db_.UUID.%arg-1%}%::List::%arg-3%}
  249. delete {db_.FriendsAsk::%arg-3%::List::%{db_.UUID.%arg-1%}%}
  250. send "&4│ &cFreunde &4» &cDu hast &6%{SpielerName.%{db_.UUID.%arg-3%}%}% &cvon deiner Freundesliste entfernt" to arg-1
  251. loop all players:
  252. If "%arg-3%" is "%loop-player%":
  253. loop-player is not "%arg-1%"
  254. send "&4│ &cFreunde &4» &6%arg-1% &chat dich von seiner Freundesliste entfernt" to loop-player
  255. If arg-2 is "Options":
  256. If arg-4 is "Open":
  257. set {_skull.%arg-1%} to "%arg-3%" parsed as offline player
  258. open chest with 1 row named "&e%arg-3% - Optionen" to arg-1
  259. format slot 4 of arg-1 with {_skull.%arg-1%}'s skull named "%arg-3%" to be unstealable
  260. set slot 8 of arg-1's current inventory to slimeball named "&bZurück"
  261. set slot 7 of arg-1's current inventory to red dye named "&4Freund entfernen"
  262. If {FriendsNoDamage::%arg-1%::%{db_.UUID.%arg-3%}%} is not set:
  263. set slot 1 of arg-1's current inventory to light green wool named "&aDu fügst %arg-3% Schaden zu"
  264. else:
  265. set slot 1 of arg-1's current inventory to red wool named "&cDu fügst %arg-3% kein Schaden zu"
  266. If arg-4 is "Notify":
  267. If {FriendsOptions::%arg-1%.Notify} is not set:
  268. set {FriendsOptions::%arg-1%.Notify} to "1"
  269. format slot 51 of arg-1 with red wool named "&cDu siehst keine Online/Offline Nachrichten" to run "Friends:API %arg-1% Options null Notify"
  270. #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
  271. else:
  272. delete {FriendsOptions::%arg-1%.Notify}
  273. format slot 51 of arg-1 with light green wool named "&aDu siehst Online/Offline Nachrichten" to run "Friends:API %arg-1% Options null Notify"
  274. #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
  275. If arg-4 is "Message":
  276. If {FriendsOptions::%arg-1%.Message} is not set:
  277. set {FriendsOptions::%arg-1%.Message} to "1"
  278. format slot 52 of arg-1 with red wool named "&cDu erhältst keine privaten Nachrichten" to run "Friends:API %arg-1% Options null Message"
  279. #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
  280. else:
  281. delete {FriendsOptions::%arg-1%.Message}
  282. format slot 52 of arg-1 with light green wool named "&aDu erhältst private Nachrichten" to run "Friends:API %arg-1% Options null Message"
  283. #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
  284. If arg-4 is "Receive":
  285. If {FriendsOptions::%arg-1%.Receive} is not set:
  286. set {FriendsOptions::%arg-1%.Receive} to "1"
  287. format slot 53 of arg-1 with red wool named "&cDu erhältst keine Freundschaftsanfragen" to run "Friends:API %arg-1% Options null Receive"
  288. #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
  289. else:
  290. delete {FriendsOptions::%arg-1%.Receive}
  291. format slot 53 of arg-1 with light green wool named "&aDu erhältst Freundschaftsanfragen" to run "Friends:API %arg-1% Options null Receive"
  292. #make console execute command "/playsound note.hat %arg-1% ~0 ~0 ~0 10 1"
  293.  
  294. command /friends [<text>] [<text>]:
  295. aliases: f, friend
  296. executable by: player
  297. trigger:
  298. If arg-1 is not set:
  299. open chest with 6 rows named "&6Freunde" to player
  300. loop {db_.Friends::%player%::*}:
  301. delete {_FriendsOnline.%loop-value%.%player%}
  302. delete {_FriendsOffline.%loop-value%.%player%}
  303. If {db_.Friends::%player%::*} is set:
  304. loop {db_.Friends::%player%::*}:
  305. loop all players:
  306. If loop-value-1 is loop-player:
  307. set {_FriendsOnline.%loop-value-1%.%player%} to loop-value-1
  308. else:
  309. set {_FriendsOffline.%loop-value-1%.%player%} to loop-value-1
  310. If {_FriendsOnline.%loop-value%.%player%} is set:
  311. loop 36 times:
  312. If slot loop-number -1 of player's current inventory is air:
  313. set {_FriendsHead.%loop-value-1%.%player%} to {SpielerName.%{_FriendsOnline.%loop-value-1%.%player%}%} parsed as player
  314. set slot loop-number -1 of player's current inventory to {_FriendsHead.%loop-value-1%.%player%}'s skull named "&a%{SpielerName.%{_FriendsOnline.%loop-value-1%.%player%}%}%" with lore "&fOnline"
  315. stop loop
  316. else:
  317. loop 36 times:
  318. If slot loop-number -1 of player's current inventory is air:
  319. set slot loop-number -1 of player's current inventory to skeleton head named "&8%{SpielerName.%{_FriendsOffline.%loop-value-1%.%player%}%}%" with lore "&7Offline||&f&m------------------||&6 ⌚ Zuletzt Online:||&6 %{LastOnlineFriends::%{db_.UUID.%{SpielerName.%{_FriendsOffline.%loop-value-1%.%player%}%}%}%.Data}%"
  320. stop loop
  321. else:
  322. set slot 0 of player's current inventory to Map:2 named "&cDu hast noch keine Freunde. :(" with lore "&f&oHilfe unter /friends help"
  323. If {db_.FriendsAsk::%player%.Number} is not set:
  324. set {db_.FriendsAsk::%player%.Number} to 0
  325. If {db_.FriendsComplete::%player%.Number} is not set:
  326. set {db_.FriendsComplete::%player%.Number} to 0
  327. format slot 36 of player with black glass pane named " " to be unstealable
  328. format slot 37 of player with black glass pane named " " to be unstealable
  329. format slot 38 of player with black glass pane named " " to be unstealable
  330. format slot 39 of player with black glass pane named " " to be unstealable
  331. format slot 40 of player with black glass pane named " " to be unstealable
  332. format slot 41 of player with black glass pane named " " to be unstealable
  333. format slot 42 of player with black glass pane named " " to be unstealable
  334. format slot 43 of player with black glass pane named " " to be unstealable
  335. format slot 44 of player with black glass pane named " " to be unstealable
  336. If {db_.FriendsAsk::%player%.Number} is bigger than 0:
  337. format slot 45 of player with glowing ender chest named "&3Freundschaftsanfragen &f(%{db_.FriendsAsk::%player%.Number}%)" to run "Friends:API %player% Anfragen"
  338. else:
  339. format slot 45 of player with chest named "&3Freundschaftsanfragen &f(0)" to run "Friends:API %player% Anfragen_Keine"
  340. If {FriendsOptions::%player%.Notify} is not set:
  341. format slot 51 of player with light green wool named "&aDu siehst Online/Offline Nachrichten" to run "Friends:API %player% Options null Notify"
  342. else:
  343. format slot 51 of player with red wool named "&cDu siehst keine Online/Offline Nachrichten" to run "Friends:API %player% Options null Notify"
  344. If {FriendsOptions::%player%.Message} is not set:
  345. format slot 52 of player with light green wool named "&aDu erhältst private Nachrichten" to run "Friends:API %player% Options null Message"
  346. else:
  347. format slot 52 of player with red wool named "&cDu erhältst keine privaten Nachrichten" to run "Friends:API %player% Options null Message"
  348. If {FriendsOptions::%player%.Receive} is not set:
  349. format slot 53 of player with light green wool named "&aDu erhältst Freundschaftsanfragen" to run "Friends:API %player% Options null Receive"
  350. else:
  351. format slot 53 of player with red wool named "&cDu erhältst keine Freundschaftsanfragen" to run "Friends:API %player% Options null Receive"
  352. else:
  353. If arg-1 is not "add" or "remove" or "accept" or "deny" or "debug":
  354. message ""
  355. message "&4│ &cFreunde &4»"
  356. send "&4│ &fEinen Freund hinzufügen: &6/friends add <Name>"
  357. send "&4│ &fEinen Freund entfernen: &6/friends remove <Name>"
  358. send "&4│ &fEine Anfrage annehmen: &6/friends accept <Name>"
  359. send "&4│ &fEine Anfrage ablehnen: &6/friends deny <Name>"
  360. message ""
  361. else:
  362. If arg-1 is "add":
  363. If arg-2 is not set:
  364. message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
  365. else:
  366. If arg-2 is player:
  367. message "&4│ &cFreunde &4» &cDu kannst dir selber keine Freundschaftsanfrage senden"
  368. else:
  369. If {db_.UUID.%arg-2%} is not set:
  370. message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
  371. else:
  372. If {db_.Friends::%{db_.UUID.%arg-2%}%::%player%} is set:
  373. message "&4│ &cFreunde &4» &cDu bist schon mit diesem Spieler befreundet"
  374. else:
  375. If {db_.FriendsAsk::%player%::List::%{db_.UUID.%arg-2%}%} is set:
  376. message "&4│ &cFreunde &4» &cDieser Spieler hat dir schon eine Freundschaftsanfrage gesendet"
  377. else:
  378. If {db_.FriendsAsk::%{db_.UUID.%arg-2%}%::List::%player%} is set:
  379. message "&4│ &cFreunde &4» &cDu hast diesem Spieler schon eine Freundschaftsanfrage gesendet"
  380. else:
  381. If {FriendsOptions::%{db_.UUID.%arg-2%}%.Receive} is set:
  382. message "&4│ &cFreunde &4» &cDieser Spieler nimmt keine Freundschaftsanfragen an"
  383. else:
  384. If {db_.FriendsAsk::%{db_.UUID.%arg-2%}%.Number} is bigger than 26:
  385. message "&4│ &cFreunde &4» &cDieser Spieler hat das maximale Limit an Freundschaftsanfragen erreicht"
  386. else:
  387. add 1 to {db_.FriendsAsk::%{db_.UUID.%arg-2%}%.Number}
  388. set {db_.FriendsAsk::%{db_.UUID.%arg-2%}%::List::%player%} to player
  389. loop all players:
  390. If loop-player is arg-2:
  391. #make console execute command "/playsound tile.piston.out %loop-player% ~0 ~0 ~0 10 1"
  392. send "" to loop-player
  393. send "&4│ &cFreunde &4»" to loop-player
  394. send "&4│ &6Du hast eine Freundschaftsanfrage von &a%player% &6erhalten" to loop-player
  395. send "&4│ » &a✔ Annehmen"
  396. send "&4│ » &c✖ Ablehnen"
  397. send "" to loop-player
  398. message "&4│ &cFreunde &4» &6Du hast &a%arg-2% &6eine Freundschaftsanfrage gesendet"
  399. #make console execute command "/playsound tile.piston.out %player% ~0 ~0 ~0 10 1"
  400. If arg-1 is "remove":
  401. If arg-2 is not set:
  402. message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
  403. else:
  404. If arg-2 is player:
  405. message "&4│ &cFreunde &4» &cDu kannst dich nicht als Freund entfernen"
  406. else:
  407. If {db_.UUID.%arg-2%} is not set:
  408. message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
  409. else:
  410. If {db_.Friends::%player%::%{db_.UUID.%arg-2%}%} is not set:
  411. message "&4│ &cFreunde &4» &cDu bist nicht mit diesem Spieler befreundet"
  412. else:
  413. make console execute command "/Friends:API %player% State %arg-2% Remove"
  414. If arg-1 is "accept":
  415. If arg-2 is not set:
  416. message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
  417. else:
  418. If arg-2 is player:
  419. message "&4│ &cFreunde &4» &cDu kannst dich nicht selber als Freund akzeptieren"
  420. else:
  421. If {db_.UUID.%arg-2%} is not set:
  422. message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
  423. else:
  424. If {db_.FriendsAsk::%player%::List::%{db_.UUID.%arg-2%}%} is not set:
  425. message "&4│ &cFreunde &4» &cDieser Spieler hat dir keine Freundschaftsanfrage gesendet"
  426. else:
  427. make console execute command "/Friends:API %player% State %arg-2% Accept"
  428. If arg-1 is "deny":
  429. If arg-2 is not set:
  430. message "&4│ &cFreunde &4» &cBitte gebe einen Namen ein"
  431. else:
  432. If arg-2 is player:
  433. message "&4│ &cFreunde &4» &cDu kannst dich nicht selber als Freund ablehnen"
  434. else:
  435. If {db_.UUID.%arg-2%} is not set:
  436. message "&4│ &cFreunde &4» &cDieser Spieler war noch nie online"
  437. else:
  438. If {db_.FriendsAsk::%player%::List::%{db_.UUID.%arg-2%}%} is not set:
  439. message "&4│ &cFreunde &4» &cDieser Spieler hat dir keine Freundschaftsanfrage gesendet"
  440. else:
  441. make console execute command "/Friends:API %player% State %arg-2% Deny"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement