henry900326

Untitled

Nov 17th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.43 KB | None | 0 0
  1. #on damage:
  2. # if victim's name contains "Lv":
  3. # if victim isn't a player:
  4. # set {_uncolorname} to uncolored name of victim
  5. # if {怪物防禦::%{_uncolorname}%} is set:
  6. # if {怪物防禦::%{_uncolorname}%} is smaller than or equal to damage*2:
  7. # set damage to damage - {怪物防禦::%{_uncolorname}%} * 0.5
  8. # stop
  9. # else:
  10. # set damage to 0.5
  11. # stop
  12. #on damage:
  13. # if attacker is a player:
  14. # if victim isn't a player:
  15. # if victim's name contains "Lv":
  16. # set {_UUID} to UUID of victim
  17. # set "怪物生命" to "%victim's max health%" in yaml file "Monsters/%{_UUID}%.yml"#儲存怪物最大生命
  18. # set {_NewDamage} to damage
  19. # set {_NewDamage} to {_NewDamage} parsed as integer
  20. # set {_DamageList} to single value "%attacker%" get of "Monsters/%{_UUID}%.yml"#獲取傷害表
  21. # set {_DamageList} to {_DamageList} parsed as integer
  22. # set {_DamageList} to "%{_DamageList} + {_NewDamage}%" parsed as integer
  23. # set "%attacker%" to "%{_DamageList}%" in yaml file "Monsters/%{_UUID}%.yml"#儲存傷害表
  24.  
  25.  
  26. command /serverexpset [<number>]:
  27. trigger:
  28. player is an op
  29. if arg-1 is not set:
  30. send "&e[系統] &7現在伺服器經驗倍率為: &a&l%{伺服器經驗倍率}%"
  31. stop
  32. set {伺服器經驗倍率} to arg-1
  33. command /servermoneyset [<number>]:
  34. trigger:
  35. player is an op
  36. if arg-1 is not set:
  37. send "&e[系統] &7現在伺服器金幣倍率為: &a&l%{伺服器金幣倍率}%"
  38. stop
  39. set {伺服器金幣倍率} to arg-1
  40.  
  41.  
  42. on death:
  43. if attacker is a player:
  44. set {_name} to name of victim
  45. set {_uncolorname} to uncolored name of victim
  46. set {_l} to uncolored name of victim
  47. set {_l} to regex replace "[^0-9]" with "" in "%{_l}%"
  48. set {_l} to "%{_l}%" parsed as integer
  49. set {_差距} to difference between {玩家資料.%attacker%::玩家等級} and {_l}
  50. if {_差距} < 0:
  51. set {_差距} to {_差距}*-1
  52. if {_差距} > 40:
  53. send "&6擊殺 >> &e您打敗了%{_name}%&e,但由於等差大於40故此無法獲得任何經驗與金錢" to attacker
  54. stop
  55. if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
  56. set {_數據處理::*} to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
  57. set {_msg} to 0
  58. loop {_數據處理::*}:
  59. if "%loop-value%" contains "%{_uncolorname}%":
  60. set {_getit.%loop-value%::*} to split "%loop-value%" at ":"
  61. set {_integer} to {_getit.%loop-value%::2} parsed as integer
  62. set {_VIP加成} to 0
  63. set {_加倍卷} to 0
  64. if {玩家資料.%attacker%::高級會員} is set:
  65. set {_VIP加成} to 0.15
  66. if {經驗加倍倍率::%attacker%} is set:
  67. set {_加倍卷} to {經驗加倍倍率::%attacker%}-1
  68. set {_integerEXP} to ({_integer} * {伺服器經驗倍率}) + ({_integer} * {_VIP加成}) + ({_integer} * {_加倍卷}) + ({_integer} * {BUFF.祈禱倍率::%attacker%}/100) + ({_integer} * {公會經驗加成.%attacker%}*3/100)
  69. set {_integerEXP} to round({_integerEXP})
  70. if {玩家資料.%attacker%::目前經驗值} is set:
  71. add {_integerEXP} to {玩家資料.%attacker%::目前經驗值}
  72. set {_msg} to "&a%{_integerEXP}% &eEXP"
  73. exit loop
  74. if yaml path "怪物掉落錢" in file "plugins/MONSTEREXP/config.yml" exists:
  75. set {_數據處理2::*} to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
  76. set {_msg1} to 0
  77. loop {_數據處理2::*}:
  78. if "%loop-value%" contains "%{_uncolorname}%":
  79. set {_getit.%loop-value%.2::*} to split "%loop-value%" at ":"
  80. set {_integer2} to {_getit.%loop-value%.2::2} parsed as integer
  81. set {_VIP加成} to 0
  82. set {_加倍卷} to 0
  83. if {玩家資料.%attacker%::高級會員} is set:
  84. set {_VIP加成} to 0.2
  85. set {_integerMONEY} to ({_integer2} * {伺服器金幣倍率}) + ({_integer2} * {_VIP加成}) + ({_integer2} * {公會金幣加成.%attacker%}*2/100)
  86. set {_integerMONEY} to round({_integerMONEY})
  87. if {玩家資料.%attacker%::金錢} is set:
  88. add {_integerMONEY} to {玩家資料.%attacker%::金錢}
  89. set {_msg1} to "&6%{_integerMONEY}% &e塊錢"
  90. exit loop
  91. set {_x} to a random integer between -30 and 30
  92. set {_z} to a random integer between -30 and 30
  93. set {_x} to {_x} / 10
  94. set {_z} to {_z} / 10
  95. if {擊殺訊息::%attacker%} isn't set:
  96. if "%{_msg1}%" isn't "0":
  97. if "%{_msg}%" isn't "0":
  98. send "&6擊殺 >> &e您打敗了%{_name}%&e,獲得了 %{_msg}% &e和 %{_msg1}%" to attacker
  99. else:
  100. send "&6擊殺 >> &e您打敗了%{_name}%&e,獲得了%{_msg1}%" to attacker
  101. else if "%{_msg}%" isn't "0":
  102. send "&6擊殺 >> &e您打敗了%{_name}%&e,獲得了%{_msg}%" to attacker
  103. command /killmsg:
  104. trigger:
  105. if {擊殺訊息::%player%} is set:
  106. send "&6擊殺 >> &e您已將擊殺訊息開啟"
  107. delete {擊殺訊息::%player%}
  108. stop
  109. else:
  110. send "&6擊殺 >> &e您已將擊殺訊息關閉,重登或再打一次指令將恢復擊殺訊息"
  111. set {擊殺訊息::%player%} to 1
  112. stop
  113. on join:
  114. delete {擊殺訊息::%player%}
  115. on quit:
  116. delete {擊殺訊息::%player%}
  117. #on death:
  118. # if attacker is a player:
  119. # if victim isn't a player:
  120. # if victim's name contains "Lv":
  121. # set {_name} to name of victim#下面全部範圍內 name of victim取代成 {_name}
  122. # set {_UUID} to UUID of victim#下面全部範圍內 name of victim取代成 {_name}
  123. # set {_uncolorname} to uncolored name of victim
  124. # loop 1000 times:
  125. # if {_uncolorname} contains "%1001 - loop-number%":
  126. # set {_lvl} to 1001 - loop-number
  127. # exit loop
  128. # loop all players:
  129. # set {_gettotal.%loop-player%} to single value "%loop-player%" get of "Monsters/%{_UUID}%.yml"
  130. # set {_gettotal.%loop-player%} to {_gettotal.%loop-player%} parsed as integer
  131. # set {_gettotal2.%loop-player%} to single value "怪物生命" get of "Monsters/%{_UUID}%.yml"
  132. # set {_gettotal2.%loop-player%} to {_gettotal2.%loop-player%} parsed as integer
  133. # set {_how} to {_gettotal.%loop-player%} / {_gettotal2.%loop-player%}
  134. # if {_name} don't contain "boss":
  135. # if {_gettotal.%loop-player%} is more than or equal to 0.1:
  136. # set {_how} to 1
  137. # if {組隊系統::%loop-player%} isn't set:
  138. # if {_how} is more than or equal to 1:
  139. # set {_how} to 1
  140. # if {_how} isn't smaller than or equal to 0:
  141. # set {_a} to loop-player
  142. # set {_double} to 1 + {玩家資料.%{_a}%::經驗卷倍率}
  143. # if {玩家資料.%{_a}%::VIP} is set:
  144. # set {_double} to {_double} + 0.3
  145. # add round({經驗怪物::%{_uncolorname}%} * {_double} * {_how}) to {玩家資料.%{_a}%::目前經驗值}
  146. # set {_did} to {玩家資料.%{_a}%::等級} + 12
  147. # send "&a【系統】 &a&l獲得經驗值 %round({經驗怪物::%{_uncolorname}%} * {_double} * {_how})%。" to {_a}
  148. # else if {組隊系統::%loop-player%} is set:
  149. # set {_a} to loop-player
  150. # set {_double} to 1 + {玩家資料.%{_a}%::經驗卷}
  151. # if {玩家資料.%{_a}%::VIP} is set:
  152. # set {_double} to {_double} + 0.3
  153. # add round({經驗怪物::%{_uncolorname}%} * {_double} * {_how}) to {玩家資料.%{_a}%::目前經驗值}
  154. # set {_did} to {玩家資料.%{_a}%::等級} + 12
  155. # send "&a【系統】 &a&l獲得經驗值 %round({經驗怪物::%{_uncolorname}%} * {_double} * {_how})%。" to {_a}
  156. # set {_ok} to 0
  157. # loop {組隊系統::%loop-player%::*}:
  158. # set {_online} to loop-index parsed as offlineplayer
  159. # if {_online} is online:
  160. # add 1 to {_ok}
  161. # set {_ok} to {_ok} / 2
  162. # loop {組隊系統::%loop-player%::*}:
  163. # set {_online} to loop-index parsed as offlineplayer
  164. # if {_online} is online:
  165. # set {_a} to {_online}
  166. # set {_did} to {玩家資料.%{_a}%::等級} + 12
  167. # if {_did} is smaller than or equal to {_lvl}:
  168. # send "&a【系統】 &a&l獲得經驗值 0。&7&l(等級低過%{_name}%&7&l無法獲得經驗)" to {_a}
  169. # #send "&a【系統】 &a&l獲得經驗值 0。&7&l(等級低過%{_name}%&7&l無法獲得經驗)" to {_a}
  170. # else:
  171. # set {_double} to 0.5 + {玩家資料.%{_a}%::經驗卷倍率}
  172. # if {玩家資料.%{_a}%::VIP} is set:
  173. # set {_double} to {_double} + 0.15
  174. # set {_omga} to round({經驗怪物::%{_uncolorname}%} * {_double} / {_maths})
  175. # add {_omga} to {玩家資料.%{_a}%::目前經驗值}
  176. # send "&a【系統】 &a&l獲得經驗值 %{_omga}%。" to {_a}
  177. # #send "&a【系統】 &a&l獲得經驗值 %round(({經驗怪物::%{_uncolorname}%} * {_double} / {_maths} - round({經驗怪物::%{_uncolorname}%} * {_double} / {_maths} * 0.08)) * {_how})%。" to {_a}
  178. # if {_gettotal.%loop-player%} is more than or equal to {_gettotal2.%loop-player%}:
  179. # set {_gettotal.%loop-player%} to {_gettotal.%loop-player%} - {_gettotal2.%loop-player%}
  180. # else:
  181. # set {_gettotal.%loop-player%} to 0
  182. # delete app "Monsters/%{_UUID}%.yml"
  183. command /expset [<text>] [<number>]:
  184. trigger:
  185. if player doesn't have permission "op.oao":
  186. execute console command "/warn %player% 該玩家使用管理員指令因此警告一隻。"
  187. stop trigger
  188. if arg-1 is set:
  189. if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
  190. set {_數據處理::*} to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
  191. loop {_數據處理::*}:
  192. if "%loop-value%" contains "%arg-1%":
  193. remove loop-value from {_數據處理::*}
  194. exit loop
  195. if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
  196. delete yml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
  197. if arg-2 is set:
  198. add "%arg-1%:%arg-2%" to {_數據處理::*}
  199. send "&f已&9設置&f該怪物額外經驗"
  200. else:
  201. send "&f已&c移除&f該怪物額外經驗"
  202. loop {_數據處理::*}:
  203. add "%loop-value%" to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
  204. else if arg-1 isn't set:
  205. if yaml path "怪物經驗值" in file "plugins/MONSTEREXP/config.yml" exists:
  206. set {_數據處理::*} to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
  207. loop {_數據處理::*}:
  208. set {_getit.%loop-value%::*} to split "%loop-value%" at ":"
  209. set {_name} to {_getit.%loop-value%::1}
  210. set {_exp} to {_getit.%loop-value%::2}
  211. send "%{_name}% - %{_exp}%"
  212. send "&a你要用 /expset 怪物名稱 可獲得經驗值 ——來設定經驗"
  213. send "只要怪物名字有你起的名字,就會獲得額外設置的經驗。"
  214. on load:
  215. loop {經驗怪物::*}:
  216. add "%loop-index%:%loop-value%" to skutil yaml list "怪物經驗值" from file "plugins/MONSTEREXP/config.yml"
  217. delete {經驗怪物::*}
  218. loop {金錢怪物::*}:
  219. add "%loop-index%:%loop-value%" to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
  220. delete {金錢怪物::*}
  221. command /moneyset [<text>] [<number>]:
  222. trigger:
  223. if player doesn't have permission "op.oao":
  224. execute console command "/warn %player% 該玩家使用管理員指令因此警告一隻。"
  225. stop trigger
  226. if arg-1 is set:
  227. if yaml path "怪物掉落錢" in file "plugins/MONSTEREXP/config.yml" exists:
  228. set {_數據處理::*} to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
  229. loop {_數據處理::*}:
  230. if "%loop-value%" contains "%arg-1%":
  231. remove loop-value from {_數據處理::*}
  232. exit loop
  233. if yaml path "怪物掉落錢" in file "plugins/MONSTEREXP/config.yml" exists:
  234. delete yml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
  235. if arg-2 is set:
  236. add "%arg-1%:%arg-2%" to {_數據處理::*}
  237. send "&f已&9設置&f該怪物額外經驗"
  238. else:
  239. send "&f已&c移除&f該怪物額外經驗"
  240. loop {_數據處理::*}:
  241. add "%loop-value%" to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
  242. else if arg-1 isn't set:
  243. if yaml path "怪物掉落錢" in file "plugins/MONSTEREXP/config.yml" exists:
  244. set {_數據處理::*} to skutil yaml list "怪物掉落錢" from file "plugins/MONSTEREXP/config.yml"
  245. loop {_數據處理::*}:
  246. set {_getit.%loop-value%::*} to split "%loop-value%" at ":"
  247. set {_name} to {_getit.%loop-value%::1}
  248. set {_exp} to {_getit.%loop-value%::2}
  249. send "%{_name}% - %{_exp}%"
  250. send "&a你要用 /moneyset 怪物名稱 可獲得金錢 ——來設定金錢"
  251. send "只要怪物名字有你起的名字,就會獲得額外設置的金錢。"
Advertisement
Add Comment
Please, Sign In to add comment