7mm

Skript: AnimA-PvP/Main

7mm
May 4th, 2018
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.12 KB | None | 0 0
  1. on skript load:
  2. execute console command "/gamerule randomTickSpeed 0"
  3. execute console command "/gamerule spawnRadius 0"
  4. execute console command "/gamerule reducedDebugInfo false"
  5.  
  6. command /donate [<player>] [<integer>]:
  7. executable by: console
  8. trigger:
  9. broadcast "&7&l@ &6%arg 1%&eさんが&d%arg 2%RC&6寄付&eしてくれました!"
  10. message "&7&l@ &6&l寄付ありがとう!" to arg 1
  11. add arg 2 to {stat.donate-amount.%player%}
  12.  
  13. on first join:
  14. execute player command "/shelp"
  15.  
  16. on join:
  17. execute console command "/item %player%"
  18. execute console command "/tp %player% 16 4 16"
  19.  
  20. on respawn:
  21. execute console command "/tp %player% 16 4 16"
  22. set {stat.death.%player%} to false
  23.  
  24. every tick:
  25. loop all players:
  26. execute console command "/sbstat %loop-player%"
  27. execute console command "/entitydata @e {AttackTime:0}"
  28. set slot 6 of loop-player to steak
  29.  
  30. if {stat.tpcool-ffa.%loop-player%} is more than 0:
  31. remove 1 from {stat.tpcool-ffa.%loop-player%}
  32.  
  33. set {true} to true
  34. if {sub.101.%loop-player%} is not set:
  35. set {sub.101.%loop-player%} to false
  36. if {sub.301.%loop-player%} is not set:
  37. set {sub.301.%loop-player%} to false
  38. if {sub.401.%loop-player%} is not set:
  39. set {sub.401.%loop-player%} to false
  40.  
  41. if {stat.charge.%loop-player%} is not set:
  42. set {stat.charge.%loop-player%} to 1
  43. if {stat.charge.%loop-player%} is more than 1:
  44. remove 1 from {stat.charge.%loop-player%}
  45.  
  46. if {stat.health.%loop-player%} is not set:
  47. set {stat.health.%loop-player%} to 100
  48. if {stat.soul-amount.%loop-player%} is not set:
  49. set {stat.soul-amount.%loop-player%} to 20
  50.  
  51. if {stat.death.%loop-player%} is not set:
  52. set {stat.death.%loop-player%} to false
  53. if {stat.health.%loop-player%} <= 0:
  54. {stat.death.%loop-player%} is false
  55. set {_lost} to ceil({stat.soul-amount.%loop-player%}/2)
  56. set {stat.health.%loop-player%} to 100
  57. set {stat.soul-amount.%loop-player%} to {_lost}
  58. if {stat.soul-amount.%loop-player%} < 0:
  59. set {stat.soul-amount.%loop-player%} to 0
  60. message "&7&l> &c&lDead!" to loop-player
  61. if {_lost} < 0:
  62. message "&7&l> &breset soul." to loop-player
  63. execute console command "/kill %loop-player%"
  64. stop
  65. message "&7&l> &b%{_lost}% soul(s) lost." to loop-player
  66. execute console command "/kill %loop-player%"
  67. set {stat.death.%loop-player%} to true
  68.  
  69. if {stat.health.%loop-player%} < 100:
  70. add 1 to {stat.health-heal.%loop-player%}
  71. if {stat.health-heal.%loop-player%} >= 8:
  72. add 1 to {stat.health.%loop-player%}
  73. set {stat.health-heal.%loop-player%} to 0
  74. if {stat.health.%loop-player%} = 100:
  75. set {stat.health-heal.%loop-player%} to 0
  76. if {stat.health.%loop-player%} > 100:
  77. set {stat.health.%loop-player%} to 100
  78.  
  79. if {stat.soul-amount.%loop-player%} is less than 0:
  80. execute console command "/effect %loop-player% slowness 2 0"
  81. if {stat.soul-amount.%loop-player%} is less than -3:
  82. execute console command "/effect %loop-player% slowness 2 1"
  83. if {stat.soul-amount.%loop-player%} is less than -6:
  84. execute console command "/effect %loop-player% blindness 2 0"
  85. if {stat.soul-amount.%loop-player%} is less than -9:
  86. damage loop-player by 1
  87. if {stat.soul-amount.%loop-player%} is less than -12:
  88. damage loop-player by 3
  89. if {stat.soul-amount.%loop-player%} is less than -15:
  90. execute console command "/effect %loop-player% slowness 2 3"
  91. if {stat.soul-amount.%loop-player%} is less than -18:
  92. damage loop-player by 20
  93.  
  94. if {stat.soul-amount.%loop-player%} < 20:
  95. add 1 to {stat.soul-heal.%loop-player%}
  96. if {stat.soul-heal.%loop-player%} >= 80:
  97. add 1 to {stat.soul-amount.%loop-player%}
  98. set {stat.soul-heal.%loop-player%} to 0
  99. if {stat.soul-amount.%loop-player%} = 20:
  100. set {stat.soul-heal.%loop-player%} to 0
  101. if {stat.soul-amount.%loop-player%} > 20:
  102. set {stat.soul-amount.%loop-player%} to 20
  103.  
  104. #set {var::*} to the 1st line of player's tool's lore parsed as "%text% %number% %text% %number%"
  105. #set the 1st line of player's tool's lore to "&rCooldown %{var::2}-1% %{var::3}% %{var::4}%"
  106.  
  107. on damage:
  108. if {sub.101.%attacker%} is true:
  109. add random integer between 0 to 4 to {_damage}
  110. set damage to {_damage}
  111. else if {true} is true:
  112. if name of attacker's held item is "&eベーシックソード":
  113. repair tool of attacker
  114. {sub.101.%attacker%} is false
  115. {sub.301.%attacker%} is false
  116. {sub.401.%attacker%} is false
  117. if {stat.charge.%attacker%} is more than 1:
  118. set {_damage} to 7
  119. if {stat.charge.%attacker%} is 1:
  120. set {_damage} to 28
  121. set {stat.charge.%attacker%} to 20
  122. else:
  123. set {_damage} to damage
  124. remove {_damage} from {stat.health.%victim%}
  125. if damage is more than 9999999999999999:
  126. if attacker is player:
  127. victim is player
  128. broadcast "&e&lKill &7&l- &6%attacker% &7&l> &d%victim%"
  129. set {_bonus} to 20-{stat.soul-amount.%attacker%}
  130. set {_bonus} to ceil({_bonus}/2)
  131. message "&7&l> &6&lKill Bonus: %{_bonus}% Soul(s)" to attacker
  132. add {_bonus} to {stat.soul-amount.%attacker%}
  133. stop
  134. message "&7&l> &a%{_damage}% Damage!" to attacker
  135. message "&7&l> &c%{_damage}% Damage!" to victim
  136. victim is player
  137. set damage to 0
  138.  
  139. every tick:
  140. loop all players:
  141. set {stat.rightclick.%loop-player%} to false
  142.  
  143. command /sbstat <player>:
  144. permission: skript.admin
  145. trigger:
  146. wipe arg 1's sidebar
  147. set name of sidebar of arg 1 to "&e&l-Status-"
  148. set score "&dHP: &f&l%{stat.health.%arg 1%}%" in sidebar of arg 1 to 2
  149. set score "&bSoul: &f&l%{stat.soul-amount.%arg 1%}%" in sidebar of arg 1 to 1
  150.  
  151. command /setstat [<player>] [<text>] [<text>]:
  152. permission: skript.admin
  153. trigger:
  154. if arg 2 is "soul":
  155. set {stat.soul-amount.%arg 1%} to arg 3 parsed as integer
  156. message "&7&l## &a%arg 1%のsoulを%arg 3%に設定しました"
  157. if arg 2 is "health":
  158. set {stat.health.%arg 1%} to arg 3 parsed as integer
  159. message "&7&l## &a%arg 1%のhealthを%arg 3%に設定しました"
  160. if arg 2 is "soul-h":
  161. set {stat.soul-heal.%arg 1%} to arg 3 parsed as integer
  162. message "&7&l## &a%arg 1%のsoul-healを%arg 3%に設定しました"
  163. if arg 2 is "health-h":
  164. set {stat.health-heal.%arg 1%} to arg 3 parsed as integer
  165. message "&7&l## &a%arg 1%のhealth-healを%arg 3%に設定しました"
  166.  
  167. on shoot:
  168. if {sub.101.%shooter%} is true:
  169. loop entities in radius 1 of projectile:
  170. loop-entity is a snowball
  171. push loop-entity upwards at speed random number between 0.05 to 0.1
  172. while true:
  173. if loop-entity is on ground:
  174. set {sub.101.%shooter%} to false
  175. exit loop
  176. else if {sub.101.%shooter%} is false:
  177. exit loop
  178. wait a tick
  179.  
  180. command /sub [<player>] [<number>] [<boolean>]:
  181. permission: skript.admin
  182. trigger:
  183. #100番台はデバフ(投擲)
  184. if arg 2 is 101:
  185. if arg 3 is true:
  186. remove 2 from {stat.soul-amount.%arg 1%}
  187. set {sub.101.%arg 1%} to true
  188. shoot an snowball from arg-1 at speed 3
  189. #200番台はデバフ(周囲)
  190. #300番台はバフ(自分)
  191. if arg 2 is 301:
  192. if {sub.301.%arg 1%} is true:
  193. message "&7&l! &cこのスキルは連続使用できません"
  194. stop
  195. if arg 3 is true:
  196. remove 14 from {stat.soul-amount.%arg 1%}
  197. set {sub.301.%arg 1%} to true
  198. apply slowness 16 to arg 1 for 30 ticks
  199. wait 30 ticks
  200. add 80 to {stat.health.%arg 1%}
  201. message "&7&l> &a80P Healing!" to arg 1
  202. set {sub.301.%arg 1%} to false
  203. #400番台は移動系
  204. if arg 2 is 401:
  205. if {sub.401.%arg 1%} is true:
  206. message "&7&l! &cこのスキルは連続使用できません"
  207. stop
  208. if arg 3 is true:
  209. remove 10 from {stat.soul-amount.%arg 1%}
  210. push arg-1 upwards at speed 1.2
  211. push arg-1 forwards at speed 0.4
  212. set {sub.401.%arg 1%} to true
  213. wait a tick
  214. while true:
  215. if arg 1 is on ground:
  216. set {sub.401.%arg 1%} to false
  217. loop all entities in radius 4 of player:
  218. set {_difference} to loop-entity's y-coordinate
  219. remove arg-1's y-coordinate from {_difference}
  220. set {_difference} to abs({_difference})
  221. {_difference} < 1
  222. make arg 1 damage loop-entity by 60
  223. exit loop
  224. wait a tick
  225.  
  226. command /setsub [<player>] [<integer>]:
  227. permission: skript.admin
  228. trigger:
  229. if arg 2 is not set:
  230. stop
  231. set {stat.subset.%arg 1%} to arg 2
  232. if arg 2 is 0:
  233. set {stat.subactmes.0.%arg 1%} to "&bスキル未セットです"
  234. set {stat.subactmes.1.%arg 1%} to "&eスキル未セットです"
  235. set {stat.subactmes.2.%arg 1%} to "&cスキル未セットです"
  236. if arg 2 is 1:
  237. set {stat.subactmes.0.%arg 1%} to "&d&l[スロウネスボール]&7&l[ヒーリング][スプリングショック] "
  238. set {stat.subactmes.1.%arg 1%} to "&7&l[スロウネスボール]&b&l[ヒーリング]&7&l[スプリングショック]"
  239. set {stat.subactmes.2.%arg 1%} to "&7&l[スロウネスボール][ヒーリング]&e&l[スプリングショック]"
  240.  
  241. on drop:
  242. add 1 to {stat.subselect.%player%}
  243. if {stat.subselect.%player%} is 3:
  244. set {stat.subselect.%player%} to 0
  245. cancel event
  246.  
  247. on rightclick:
  248. if player is holding a clock named "&6&lサーバー&d&lメニュー":
  249. execute console command "/menu %player%"
  250. stop
  251. if player is holding a dye:4 named "&b&lテレポート&a&lメニュー":
  252. execute console command "/menu %player% teleport"
  253. stop
  254. if {stat.subset.%player%} is 1:
  255. if {stat.subselect.%player%} is 0:
  256. execute console command "/sub %player% 101 true"
  257. if {stat.subselect.%player%} is 1:
  258. execute console command "/sub %player% 301 true"
  259. if {stat.subselect.%player%} is 2:
  260. execute console command "/sub %player% 401 true"
  261.  
  262. every tick:
  263. loop all players:
  264. set action bar of loop-player to coloured "%{stat.subactmes.%{stat.subselect.%loop-player%}%.%loop-player%}%"
  265.  
  266. on damage:
  267. if {sub.101.%attacker%} is true:
  268. apply slowness 3 to victim for 2 seconds
  269. message "&7&l> &aスロウネスボールが%victim%にヒットしました" to attacker
  270. message "&7&l> &cスロウネスボールを%attacker%に当てられました" to victim
  271. set {sub.101.%attacker%} to false
  272.  
  273. command /main [<player>] [<number>]:
  274. permission: skript.admin
  275. trigger:
  276. if arg 2 is 0:
  277. execute console command "/item %arg 1%"
  278. execute console command "/setsub %arg 1% 0"
  279. wait 2 tick
  280. set slot 4 of arg 1 to nether_star named "&7武器をセットしてください"
  281. message "&7&l## &aリセットしました"
  282. if arg 2 is 1:
  283. execute console command "/item %arg 1%"
  284. execute console command "/setsub %arg 1% 1"
  285. wait 2 tick
  286. set slot 4 of arg 1 to stone_sword named "&eベーシックソード" with lore "&6タイプ: &eソード||&c攻撃力: &e28(7[20])"
  287. message "&7&l## &a武器を変更しました"
  288.  
  289. command /item [<player>]:
  290. trigger:
  291. if arg 1 is not set:
  292. set {_user} to player
  293. if arg 1 is set:
  294. set {_user} to arg 1
  295. wait a tick
  296. set slot 0 of {_user} to air
  297. set slot 1 of {_user} to air
  298. set slot 2 of {_user} to air
  299. set slot 3 of {_user} to clock named "&6&lサーバー&d&lメニュー"
  300. set slot 4 of {_user} to air
  301. set slot 5 of {_user} to dye:4 named "&b&lテレポート&a&lメニュー"
  302. set slot 6 of {_user} to air
  303. set slot 7 of {_user} to air
  304. set slot 8 of {_user} to air
  305.  
  306. command /menu [<player>] [<text>]:
  307. trigger:
  308. if arg 1 is not set:
  309. set {_user} to player
  310. if arg 1 is set:
  311. set {_user} to arg 1
  312. if arg 2 is "main":
  313. open chest with 1 rows named "&6&lサーバー&d&lメニュー" to {_user}
  314. wait a tick
  315. format slot 2 of {_user} with iron_sword named "&c&l武&9&l器&c&l変&9&l更" to run "menu %{_user}% weapon"
  316. format slot 6 of {_user} with dye:4 named "&b&lテレポート&a&lメニュー" to run "menu %{_user}% teleport"
  317. if arg 2 is not set:
  318. open chest with 1 rows named "&6&lサーバー&d&lメニュー" to {_user}
  319. wait a tick
  320. format slot 2 of {_user} with iron_sword named "&c&l武&9&l器&c&l変&9&l更" to run "menu %{_user}% weapon"
  321. format slot 6 of {_user} with dye:4 named "&b&lテレポート&a&lメニュー" to run "menu %{_user}% teleport"
  322. if arg 2 is "weapon":
  323. open chest with 1 rows named "&c&l武&9&l器&c&l変&9&l更" to {_user}
  324. wait a tick
  325. format slot 0 of {_user} with barrier named "&c武器リセット" to run "main %{_user}% 0"
  326. format slot 4 of {_user} with stone_sword named "&eベーシックソード" to run "main %{_user}% 1"
  327. format slot 8 of {_user} with arrow named "&b戻る" to run "menu %{_user}%"
  328. if arg 2 is "teleport":
  329. open chest with 1 rows named "&b&lテレポート&a&lメニュー" to {_user}
  330. wait a tick
  331. format slot 2 of {_user} with iron_block named "&bロビー" to run "tp %{_user}% 16 4 16"
  332. format slot 6 of {_user} with grass named "&aFFA" to run "stp %{_user}% ffa"
  333. format slot 8 of {_user} with arrow named "&b戻る" to run "menu %{_user}%"
  334.  
  335. command /stp [<player>] [<text>]:
  336. permission: skript.admin
  337. trigger:
  338. if arg 2 is "ffa":
  339. if {stat.tpcool-ffa.%arg 1%} is more than 0:
  340. message "&7&l! &cクールタイム中です" to arg 1
  341. stop
  342. set {_random-x} to random integer between 49 to 94
  343. set {_random-z} to random integer between 49 to 94
  344. execute console command "/tp %arg 1% %{_random-x}% 4 %{_random-z}%"
  345. set {stat.tpcool-ffa.%arg 1%} to 1200
  346.  
  347. command /svv:
  348. trigger:
  349. message "&7&l@ &fServer Version"
  350. message "&7&l@ &f0.1.1 / OBT &7(Open Beta Test)"
  351.  
  352. command /shelp:
  353. trigger:
  354. message "&7&l@ &6&lサーバーヘルプ"
  355. message "&7&l@ &e&n/////コマンド説明/////"
  356. message "&7&l@ &e/item でホットバーのアイテムが復活します"
  357. message "&7&l@ &e/menu でメニューを出すこともできます"
  358. message "&7&l@ &e/shelp で再びこのヘルプを出せます"
  359. message "&7&l@ &a&n/////システム説明/////"
  360. message "&7&l@ &aメニューからは武器変更やテレポートが可能です"
  361. message "&7&l@ &a武器はサーバー内通貨で購入が可能(な予定)です"
  362. message "&7&l@ &a武器にはサブスキルがそれぞれ3つ設定されています"
  363. message "&7&l@ &aサブスキルは右クリックで使用ができ、"
  364. message "&7&l@ &a使うサブスキルはQキー(ドロップキー)で変更できます"
  365. message "&7&l@ &6&lTキー(チャットキー)で全文見てね"
Advertisement
Add Comment
Please, Sign In to add comment