Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.15 KB | None | 0 0
  1. #--------------------------------------------------------------------------------
  2. #
  3. # K2R skript
  4. # RPG LEVEL SYSTEM
  5. #
  6. # 使うとき俺にいってね必ず
  7. # 無断使用はやめてね DISCORD: k1Ok2R#5702
  8. #--------------------------------------------------------------------------------
  9. #
  10. #
  11. # configuration
  12. #
  13. #--------------------------------------------------------------------------------
  14. options:
  15. #---------------------------------------------------------------------------
  16. #-----------------------------------Logo------------------------------------
  17. #Logo will display before each message!
  18. logo: &8[&6System&8] &7&l|
  19. #---------------------------------------------------------------------------
  20.  
  21. #---------------------------------------------------------------------------
  22. #-----------------------------------Types-----------------------------------
  23. playerleveling: true
  24. #---------------------------------------------------------------------------
  25.  
  26. #---------------------------------------------------------------------------
  27. #---------------------------------PLeveling---------------------------------
  28. #PlayerLeveling (Reward uses vault!)
  29. xpforlvlup: 800
  30. lvlupreward: iron_ingot
  31. #---------------------------------------------------------------------------
  32.  
  33. #---------------------------------------------------------------------------
  34. #----------------------------------MaxLvL-----------------------------------
  35. maxlvl: 300 #MaxXp is used to mark max level of player (eg. 100 Bob[Lv100])
  36. #---------------------------------------------------------------------------
  37.  
  38. variables:
  39. {lvl.%player%} = 0
  40. {xp.%player%} = 0
  41. {sp.%player%} = 0
  42. {power.%player%} = 0
  43. {def.%player%} = 0
  44. {hp.%player%} = 0
  45. #-------------------------------------------------------
  46. # side bar
  47. #-------------------------------------------------------
  48.  
  49. every 2 second:
  50. loop all players:
  51. wipe loop-player's sidebar
  52. set name of sidebar of loop-player to "&3&l======&a&lRPGやぞ&3&l======"
  53. set score " &b&lLV: %{lvl.%loop-player%}%" in sidebar of loop-player to 10
  54. set score " &a&lEXP: %{xp.%loop-player%}%" in sidebar of loop-player to 9
  55. set score " &e&lSP: %{sp.%loop-player%}%" in sidebar of loop-player to 8
  56. set score " &e" in sidebar of loop-player to 7
  57. set score " &5&lお知らせ:" in sidebar of loop-player to 6
  58. set score " &a&lβテスト中" in sidebar of loop-player to 5
  59. set score " &a&lEXPが800になるとレベルが上がります" in sidebar of loop-player to 4
  60. set score " &3&l====================" in sidebar of loop-player to 3
  61. #------------------------------------------------------------
  62. # Player Leveling System
  63. #------------------------------------------------------------
  64.  
  65. on any movement:
  66. if {@playerleveling} is true:
  67. if {xp.%player%} is greater or equal to {@xpforlvlup}:
  68. if {lvl.%player%} is greater or equal to {@maxlvl}:
  69. stop
  70. else:
  71. remove {@xpforlvlup} from {xp.%player%}
  72. add 1 to {lvl.%player%}
  73. add 1 to {sp.%player%}
  74. send "{@logo} &e&lレベルUP!現在の&a&lLV: &b%{lvl.%player%}%" to player
  75. execute console command "/give %player% {@lvlupreward}"
  76. stop
  77.  
  78. command /pointstatus:
  79. trigger:
  80. open chest with 1 row named "§e§lステータス割り振り" to player
  81. wait 1 tick
  82. format slot 0 of player with iron sword named "§4力" with lore "§6%{power.%player%}%ポイント。攻撃力を上げます" to run [execute player command "statuspower"]
  83. format slot 1 of player with iron ingot named "§b守備" with lore "§6%{def.%player%}%ポイント。防御力を上げます" to run [execute player command "statusdef"]
  84. format slot 2 of player with apple named "§dHP" with lore "§6%{hp.%player%}%ポイント。HPを増やします" to run [execute player command "statushp"]
  85. format slot 8 of player with experience bottle named "§a残り%{sp.%player%}%ポイント" to close
  86.  
  87. command /statuspower:
  88. trigger:
  89. if {sp.%player%} = 0:
  90. message "§aスキルポイントがたりません" to player
  91. stop
  92. else:
  93. add -1 to {sp.%player%}
  94. add 1 to {power.%player%}
  95. message "§ePOWERに1SP割り振りました" to player
  96. execute player command "pointstatus"
  97.  
  98. command /statusdef:
  99. trigger:
  100. if {sp.%player%} = 0:
  101. message "§aスキルポイントがたりません" to player
  102. stop
  103. else:
  104. add -1 to {sp.%player%}
  105. add 1 to {def.%player%}
  106. message "§eDefに1SP割り振りました" to player
  107. execute player command "pointstatus"
  108.  
  109. command /statushp:
  110. trigger:
  111. if {sp.%player%} = 0:
  112. message "§aスキルポイントがたりません" to player
  113. stop
  114. else:
  115. add -1 to {sp.%player%}
  116. add 1 to {hp.%player%}
  117. message "§eHPに1SP割り振りました" to player
  118. execute player command "pointstatus"
  119.  
  120. command /playerstatus [<offline player>]:
  121. trigger:
  122. if arg-1 is not set:
  123. send "&e"
  124. send "&7&l-:=&6&l%player%&7&l=:-:=&b&lStatus&7&l=:-"
  125. send "&b&lLV: %{lvl.%player%}%"
  126. send "&a&lEXP: %{xp.%player%}%"
  127. send "&e&lSP: %{sp.%player%}%"
  128. send "&e"
  129. if arg-1 is set:
  130. send "&e"
  131. send "&7&l-:=&6&l%arg-1%&7&l=:-:=&b&lStatus&7&l=:-"
  132. send "&b&lLV: %{lvl.%arg-1%}%"
  133. send "&a&lEXP: %{xp.%arg-1%}%"
  134. send "&e&lSP: %{sp.%arg-1%}%"
  135. send "&e"
  136.  
  137. command /resetstatus [<offline player>]:
  138. permission: skript.k2r
  139. trigger:
  140. if arg-1 is not set:
  141. set {lvl.%player%} to 1
  142. set {xp.%player%} to 0
  143. set {sp.%player%} to 1
  144. set {power.%player%} to 0
  145. set {def.%player%} to 0
  146. set {hp.%player%} to 0
  147. send "%player%のステータスをリセットしました"
  148. execute console command "/effect %player% clear"
  149. if arg-1 is set:
  150. set {lvl.%arg-1%} to 1
  151. set {xp.%arg-1%} to 0
  152. set {sp.%arg-1%} to 1
  153. set {power.%arg-1%} to 0
  154. set {def.%arg-1%} to 0
  155. set {hp.%arg-1%} to 0
  156. execute console command "/effect %player% clear"
  157. send "%arg-1%のステータスをリセットしました"
  158.  
  159. #---------------------------------------------------------------------
  160. #
  161. #Power
  162. #
  163. #---------------------------------------------------------------------
  164. on any movement:
  165. if {@playerleveling} is true:
  166. if {power.%player%} is greater or equal to 1:
  167. apply strength 0 to the player for 9999 seconds
  168.  
  169. on any movement:
  170. if {@playerleveling} is true:
  171. if {power.%player%} is greater or equal to 10:
  172. apply strength 1 to the player for 9999 seconds
  173.  
  174. on any movement:
  175. if {@playerleveling} is true:
  176. if {power.%player%} is greater or equal to 20:
  177. apply strength 2 to the player for 9999 seconds
  178.  
  179. on any movement:
  180. if {@playerleveling} is true:
  181. if {power.%player%} is greater or equal to 30:
  182. apply strength 3 to the player for 9999 seconds
  183.  
  184. #---------------------------------------------------------------------
  185. #
  186. # def
  187. #
  188. #---------------------------------------------------------------------
  189. on any movement:
  190. if {@playerleveling} is true:
  191. if {def.%player%} is greater or equal to 1:
  192. apply resistance 0 to the player for 9999 seconds
  193.  
  194. on any movement:
  195. if {@playerleveling} is true:
  196. if {def.%player%} is greater or equal to 10:
  197. apply resistance 1 to the player for 9999 seconds
  198.  
  199. on any movement:
  200. if {@playerleveling} is true:
  201. if {def.%player%} is greater or equal to 20:
  202. apply resistance 2 to the player for 9999 seconds
  203.  
  204. on any movement:
  205. if {@playerleveling} is true:
  206. if {def.%player%} is greater or equal to 30:
  207. apply resistance 3 to the player for 9999 seconds
  208.  
  209. #---------------------------------------------------------------------
  210. #
  211. # HP
  212. #
  213. #---------------------------------------------------------------------
  214. on any movement:
  215. if {@playerleveling} is true:
  216. if {hp.%player%} is greater or equal to 1:
  217. apply health boost 0 to the player for 9999 seconds
  218.  
  219. on any movement:
  220. if {@playerleveling} is true:
  221. if {hp.%player%} is greater or equal to 10:
  222. apply health boost 1 to the player for 9999 seconds
  223.  
  224. on any movement:
  225. if {@playerleveling} is true:
  226. if {hp.%player%} is greater or equal to 20:
  227. apply health boost 2 to the player for 9999 seconds
  228.  
  229. on any movement:
  230. if {@playerleveling} is true:
  231. if {hp.%player%} is greater or equal to 30:
  232. apply health boost 3 to the player for 9999 seconds
  233.  
  234.  
  235.  
  236.  
  237. #---------------------------------------------------------------------
  238. #
  239. # モブ EXP 設定
  240. #
  241. #---------------------------------------------------------------------
  242. #zombie(モンスターのID): (EXP量)
  243.  
  244. options:
  245. zombie: 9
  246. skeleton: 15
  247. creeper: 18
  248. spider: 16
  249. enderman: 24
  250. witch: 18
  251. blaze: 25
  252. zombie pigman: 60
  253. slime: 3
  254.  
  255.  
  256.  
  257. on death of a zombie:
  258. if {@playerleveling} is true:
  259. if attacker is a player:
  260. add {@zombie} to {xp.%attacker%}
  261. send "&f&l[&e&l+&f&l]&b{@zombie}&3EXP" to the attacker
  262.  
  263. on death of a skeleton:
  264. if {@playerleveling} is true:
  265. if attacker is a player:
  266. add {@skeleton} to {xp.%attacker%}
  267. send "&f&l[&e&l+&f&l]&b{@skeleton}&3EXP" to the attacker
  268.  
  269. on death of a creeper:
  270. if {@playerleveling} is true:
  271. if attacker is a player:
  272. add {@creeper} to {xp.%attacker%}
  273. send "&f&l[&e&l+&f&l]&b{@creeper}&3EXP" to the attacker
  274.  
  275. on death of a spider:
  276. if {@playerleveling} is true:
  277. if attacker is a player:
  278. add {@spider} to {xp.%attacker%}
  279. send "&f&l[&e&l+&f&l]&b{@spider}&3EXP" to the attacker
  280.  
  281. on death of a enderman:
  282. if {@playerleveling} is true:
  283. if attacker is a player:
  284. add {@enderman} to {xp.%attacker%}
  285. send "&f&l[&e&l+&f&l]&b{@enderman}&3EXP" to the attacker
  286.  
  287. on death of a witch:
  288. if {@playerleveling} is true:
  289. if attacker is a player:
  290. add {@witch} to {xp.%attacker%}
  291. send "&f&l[&e&l+&f&l]&b{@witch}&3EXP" to the attacker
  292.  
  293. on death of a blaze:
  294. if {@playerleveling} is true:
  295. if attacker is a player:
  296. add {@blaze} to {xp.%attacker%}
  297. send "&f&l[&e&l+&f&l]&b{@blaze}&3EXP" to the attacker
  298.  
  299. on death of a zombie pigman:
  300. if {@playerleveling} is true:
  301. if attacker is a player:
  302. add {@zombie pigman} to {xp.%attacker%}
  303. send "&f&l[&e&l+&f&l]&b{@zombie pigman}&3EXP" to the attacker
  304.  
  305. on death of a slime:
  306. if {@playerleveling} is true:
  307. if attacker is a player:
  308. add {@slime} to {xp.%attacker%}
  309. send "&f&l[&e&l+&f&l]&b{@slime}&3EXP" to the attacker
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement