Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- path: "plugins\\Lemon\\Advice\\advices.yml"
- command /giveadvice <text>:
- usage: /giveadvice <意見>
- trigger:
- if {最後提交意見::%player%} is set:
- set {_waited} to difference between {最後提交意見::%player%} and now
- if {_waited} is less than 3 minutes:
- set {_msg} to "&6意見 >> &c請等待 %difference between 3 minutes and {_waited}% 後再次提交意見"
- replace all "seconds" with "秒" in {_msg}
- replace all "second" with "秒" in {_msg}
- replace all "minutes" with "分鐘" in {_msg}
- replace all "minute" with "分鐘" in {_msg}
- replace all " and" with "" in {_msg}
- send {_msg}
- stop
- add "&c玩家 &e%player% &6> &e%arg-1%" to {玩家意見::*}
- send "&6意見 >> &e感謝您的意見!"
- send "&6意見 >> &c提出無意義或重複提交意見者將被懲罰,請勿以身試法"
- set {最後提交意見::%player%} to now
- command /seeadvice <integer>:
- permission: op.oao
- usage: /seeadvice <頁數>
- trigger:
- if size of {玩家意見::*} is 0:
- send "&6意見 >> &e目前還沒有人提出意見"
- stop
- set {_highmf} to "%arg-1%0" parsed as integer
- set {_lowmf} to {_highmf} - 9 #1
- set {_pages} to ceil(size of {玩家意見::*} / 10) #1
- if {_pages} is smaller than arg-1:
- send "&6意見 >> &e最大頁數為 %{_pages}% !"
- if size of {玩家意見::*} is smaller than {_highmf}: #true
- set {_highmf} to size of {玩家意見::*} #1
- send "&6意見 >> &e頁 &a%arg-1%&8/&7%{_pages}%"
- if {_highmf} is {_lowmf}:
- send "%{玩家意見::1}%"
- else:
- set {_hihi} to {_highmf}
- while {_hihi} is bigger than or equal to {_lowmf}:
- send "%{玩家意見::%{_hihi}%}%"
- subtract 1 from {_hihi}
- send "&6意見 >> &e頁 &a%arg-1%&8/&7%{_pages}%"
- on npc right click:
- player is op
- name of citizen event-number is "&e意見收集員-檸檬"
- #event-number is 537
- send "&6意見收集員-檸檬 >> &e指令 /giveadvice <意見> 可以向管理員們提出意見"
- send "&6意見收集員-檸檬 >> &e但只可以每 3 分鐘提交一次"
- send "&6意見收集員-檸檬 >> &e如果你提交無意義文字或者洗板的話會受懲罰,所以請勿以身試法哦!"
- on enable:
- delete yaml list "advices" from file {@path}
- loop {玩家意見::*}:
- add uncoloured loop-value to yaml list "advices" of file {@path}
- on disable:
- delete yaml list "advices" from file {@path}
- loop {玩家意見::*}:
- add uncoloured loop-value to yaml list "advices" of file {@path}
- every 6 minutes:
- delete yaml list "advices" from file {@path}
- loop {玩家意見::*}:
- add uncoloured loop-value to yaml list "advices" of file {@path}
- #PAPAPA
Advertisement
Add Comment
Please, Sign In to add comment