LHemon412

advice.sk

Jul 20th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. options:
  2. path: "plugins\\Lemon\\Advice\\advices.yml"
  3.  
  4. command /giveadvice <text>:
  5. usage: /giveadvice <意見>
  6. trigger:
  7. if {最後提交意見::%player%} is set:
  8. set {_waited} to difference between {最後提交意見::%player%} and now
  9. if {_waited} is less than 3 minutes:
  10. set {_msg} to "&6意見 >> &c請等待 %difference between 3 minutes and {_waited}% 後再次提交意見"
  11. replace all "seconds" with "秒" in {_msg}
  12. replace all "second" with "秒" in {_msg}
  13. replace all "minutes" with "分鐘" in {_msg}
  14. replace all "minute" with "分鐘" in {_msg}
  15. replace all " and" with "" in {_msg}
  16. send {_msg}
  17. stop
  18. add "&c玩家 &e%player% &6> &e%arg-1%" to {玩家意見::*}
  19. send "&6意見 >> &e感謝您的意見!"
  20. send "&6意見 >> &c提出無意義或重複提交意見者將被懲罰,請勿以身試法"
  21. set {最後提交意見::%player%} to now
  22.  
  23. command /seeadvice <integer>:
  24. permission: op.oao
  25. usage: /seeadvice <頁數>
  26. trigger:
  27. if size of {玩家意見::*} is 0:
  28. send "&6意見 >> &e目前還沒有人提出意見"
  29. stop
  30. set {_highmf} to "%arg-1%0" parsed as integer
  31. set {_lowmf} to {_highmf} - 9 #1
  32. set {_pages} to ceil(size of {玩家意見::*} / 10) #1
  33. if {_pages} is smaller than arg-1:
  34. send "&6意見 >> &e最大頁數為 %{_pages}% !"
  35. if size of {玩家意見::*} is smaller than {_highmf}: #true
  36. set {_highmf} to size of {玩家意見::*} #1
  37. send "&6意見 >> &e頁 &a%arg-1%&8/&7%{_pages}%"
  38. if {_highmf} is {_lowmf}:
  39. send "%{玩家意見::1}%"
  40. else:
  41. set {_hihi} to {_highmf}
  42. while {_hihi} is bigger than or equal to {_lowmf}:
  43. send "%{玩家意見::%{_hihi}%}%"
  44. subtract 1 from {_hihi}
  45. send "&6意見 >> &e頁 &a%arg-1%&8/&7%{_pages}%"
  46.  
  47. on npc right click:
  48. player is op
  49. name of citizen event-number is "&e意見收集員-檸檬"
  50. #event-number is 537
  51. send "&6意見收集員-檸檬 >> &e指令 /giveadvice <意見> 可以向管理員們提出意見"
  52. send "&6意見收集員-檸檬 >> &e但只可以每 3 分鐘提交一次"
  53. send "&6意見收集員-檸檬 >> &e如果你提交無意義文字或者洗板的話會受懲罰,所以請勿以身試法哦!"
  54.  
  55. on enable:
  56. delete yaml list "advices" from file {@path}
  57. loop {玩家意見::*}:
  58. add uncoloured loop-value to yaml list "advices" of file {@path}
  59.  
  60. on disable:
  61. delete yaml list "advices" from file {@path}
  62. loop {玩家意見::*}:
  63. add uncoloured loop-value to yaml list "advices" of file {@path}
  64.  
  65. every 6 minutes:
  66. delete yaml list "advices" from file {@path}
  67. loop {玩家意見::*}:
  68. add uncoloured loop-value to yaml list "advices" of file {@path}
  69. #PAPAPA
Advertisement
Add Comment
Please, Sign In to add comment