7mm

Skript: Ultima

7mm
Aug 30th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.77 KB | None | 0 0
  1. on join:
  2. if {player.other.joined::%player%} is not set:
  3. set {player.other.joined::%player%} to false
  4. if {player.other.joined::%player%} is false:
  5. set {player.other.joined::%player%} to true
  6. command "..firstjoinevent %player%"
  7.  
  8. command /..refje <player>:
  9. trigger:
  10. set {player.other.joined::%player%} to false
  11.  
  12. on chat:
  13. if {player.opt.chatsendcancel::%player%} is true:
  14. cancel event
  15. message "&cError &7>> &c現在メッセージの送信を禁止されています"
  16. stop
  17. loop all players:
  18. {player.opt.chatloadcancel::%loop-player%} is true
  19. remove loop-player from chat recipients
  20.  
  21. every tick:
  22. loop all players:
  23. if {player.prm.hp::%loop-player%} is not set:
  24. set {player.prm.hp::%loop-player%} to 10
  25. if {player.prm.mp::%loop-player%} is not set:
  26. set {player.prm.mp::%loop-player%} to 3
  27. if {player.stat.hp::%loop-player%} is not set:
  28. set {player.stat.hp::%loop-player%} to 10
  29. if {player.stat.mp::%loop-player%} is not set:
  30. set {player.stat.mp::%loop-player%} to 3
  31. if {player.stat.hp::%loop-player%} > {player.prm.hp::%loop-player%}:
  32. set {player.stat.hp::%loop-player%} to {player.prm.hp::%loop-player%}
  33. if {player.stat.mp::%loop-player%} > {player.prm.mp::%loop-player%}:
  34. set {player.stat.mp::%loop-player%} to {player.prm.mp::%loop-player%}
  35.  
  36. if {player.prm.level::%loop-player%} is not set:
  37. set {player.prm.level::%loop-player%} to 1
  38. if {player.set.lvup::%loop-player%} is not set:
  39. set {player.set.lvup::%loop-player%} to 20
  40. if {player.set.lvup::%loop-player%} <= {player.stat.exp::%loop-player%}:
  41. remove {player.set.lvup::%loop-player%} from {player.stat.exp::%loop-player%}
  42. add 1 to {player.prm.level::%loop-player%}
  43. set {_lvupup} to ceil({player.prm.level::%loop-player%}/5)*5+5
  44. set {player.set.lvup::%loop-player%} to {player.set.lvup::%loop-player%}+{_lvupup}
  45. set {_getpp} to ceil(3+{player.prm.level::%loop-player%}/30)
  46. if {_getpp} > 100:
  47. set {_getpp} to 100
  48. add {_getpp} to {player.stat.pp::%loop-player%}
  49. add 1 to {player.stat.sp::%loop-player%}
  50. message "&c&l* &e&lLEVEL UP: &6&l%{player.prm.level::%loop-player%}% &c&l*" to loop-player
  51. message "&cGet: &6%{_getpp}%&cPP" to loop-player
  52. message "&bGet: &61&bSP" to loop-player
  53. message "&7Next LevelUp: &6%{player.set.lvup::%loop-player%}%&7EXP" to loop-player
  54.  
  55. command /help-u [<text>]:
  56. aliases: /h
  57. trigger:
  58. if arg 1 is not set:
  59. message "&7&l=== &e&lUltima Help &7&l==="
  60. message "&2/h stat &7>> &6ステータスについて"
  61. if arg 1 is "stat":
  62. message "&7&l=== &a&lステータスについて &7&l==="
  63. message "&4PP &7>> &4ParametersPoint(成長点) &7... &4STR,VIT,AGI,INT,LUCに振り分け可能なポイントです。"
  64. message ""
  65. message "&bHP &7>> &bHealthPoint(体力量) &7... &bダメージによって減少し、0になると死亡します。"
  66. message "&1PP振り分け不可 &7計算式 &n(STR^1.3+VIT^2)/2+10 (小数点以下切り捨て)"
  67. message "&aMP &7>> &aMagicPoint(魔力量) &7... &aスキルの行使に使用します。マイナスになるとダメージを受け始めます。"
  68. message "&1PP振り分け不可 &7計算式 &n(LUC^1.2+INT^1.8)/2+3 (小数点以下切り捨て)"
  69. message "&eAVO &7>> &eAvoidance(回避) &7... &e相手からの攻撃の回避率(攻撃失敗させる)に影響します。"
  70. message "&1PP振り分け不可 &7計算式 &n(INT^1.1+AGI^1.5)/2+3 (小数点以下切り捨て)"
  71. message ""
  72. message "&cSTR &7>> &cStrength(攻撃力) &7... &c相手への物理攻撃ダメージに影響します。"
  73. message "&5PP振り分け可能 &7HPに小影響"
  74. message "&dVIT &7>> &dVitality(生命力) &7... &d回復スキルの効果量などに影響します。"
  75. message "&5PP振り分け可能 &7HPに大影響"
  76. message "&6AGI &7>> &6AGI(敏捷性) &7... &6移動速度などに影響します。"
  77. message "&5PP振り分け可能 &7AVOに大影響"
  78. message "&9INT &7>> &9Intelligence(知力) &7... &9相手への魔法攻撃ダメージに影響します。"
  79. message "&5PP振り分け可能 &7MPに大影響 AVOに小影響"
  80. message "&2LUC &7>> &2Luck(幸運) &7... &2クリティカル成功率などに影響します。"
  81. message "&5PP振り分け可能 &7MPに小影響"
  82.  
  83. command /nowpp:
  84. trigger:
  85. message "&9残りPP&7:&6%{player.stat.pp::%player%}%"
  86.  
  87. command /..nowpp [<player>]:
  88. permission: ultima.nowpp
  89. trigger:
  90. set {_p} to arg 1
  91. if arg 1 is not set:
  92. set {_p} to player
  93. message "&9残りPP&7:&6%{player.stat.pp::%{_p}%}%" to {_p}
  94.  
  95. command /..firstjoinevent <player>:
  96. permission: ultima.firstjoinevent
  97. trigger:
  98. clear arg 1's inventory
  99. teleport arg 1 to location (100033.5, 108, 100030.5)
  100. command "spawnpoint %arg 1% 100000 102 99991"
  101. set gamemode of arg 1 to adventure
  102. set {player.opt.chatloadcancel::%arg 1%} to true
  103. set {player.opt.chatsendcancel::%arg 1%} to true
  104. loop 40 times:
  105. message "" to arg 1
  106. wait a tick
  107. wait 2 second
  108. message "&7>> &cあなたが、新しい来訪者ね?" to arg 1
  109. wait 3 second
  110. message "&7>> &c喜んで迎え入れましょう――" to arg 1
  111. wait 3 second
  112. message "&7>> &cようこそ &4""Ultima"" &cへ" to arg 1
  113. wait 5 tick
  114. set gamemode of arg 1 to spectator
  115. wait 10 tick
  116. set {_y} to 108
  117. set {_y!} to 0.6
  118. command "teleport %arg 1% ~ ~ ~ 90 0"
  119. loop 30 times:
  120. remove 0.02 from {_y!}
  121. add {_y!} to {_y}
  122. teleport arg 1 to location (100033.5, {_y}, 100030.5)
  123. wait a tick
  124. set {player.opt.chatloadcancel::%arg 1%} to false
  125. set {player.opt.chatsendcancel::%arg 1%} to false
  126. loop 45 times:
  127. teleport arg 1 to location (100033.5, {_y}, 100030.5)
  128. wait a tick
  129. command "teleport %arg 1% 100000 102 99991 ~ ~"
  130. set gamemode of arg 1 to adventure
  131. clear {player.set.next::%arg 1%}
  132. command "..tutorial %arg 1% 1"
  133.  
  134. command /..tutorial <player> <number> [<number>]:
  135. permission: ultima.tutorial
  136. trigger:
  137. if arg 2 is 1:
  138. message "&e案内人 &7>>"
  139. message "&7>> &aこんにちは、%arg 1%&aさん" to arg 1
  140. message "&7>> &aこれから事前設定とチュートリアルを開始します" to arg 1
  141. message "&7>> &aこのチュートリアルは基本的に&6/next&aで進めます" to arg 1
  142. message "&7>> &aでは、早速&6/next&aしてみましょう!" to arg 1
  143. set {player.set.next::%arg 1%} to "tutorial.1"
  144. if arg 2 is 2:
  145. message "&e案内人 &7>>"
  146. message "&7>> &aそんな感じですね!" to arg 1
  147. message "&7>> &aではまず事前設定から始めます" to arg 1
  148. message "&7>> &b・ストーリーパートを見ますか?" to arg 1
  149. message "&7>> &6/next 0 &eで見る &6/next 1 &eで見ない" to arg 1
  150. message "&7>> &aストーリーパートでは物語が綴られていきます" to arg 1
  151. message "&7>> &a見なくてもゲームの進行には影響ありません" to arg 1
  152. message "&7>> &aストーリーパートは数十秒から数分かかります" to arg 1
  153. set {player.set.next::%arg 1%} to "tutorial.2"
  154. if arg 2 is 3:
  155. message "&e案内人 &7>>"
  156. if arg 3 is 0:
  157. set {player.opt.playstory::%arg 1%} to true
  158. message "&7>> &b「見る」に設定しました!"
  159. if arg 3 is 1:
  160. set {player.opt.playstory::%arg 1%} to false
  161. message "&7>> &b「見ない」に設定しました!"
  162. message "&7>> &aこの設定は後から変更できます!"
  163. set {player.set.next::%arg 1%} to "tutorial.3"
  164.  
  165. command /next [<number>]:
  166. trigger:
  167. if {player.set.next::%player%} is "tutorial.1":
  168. command "..tutorial %player% 2"
  169. if {player.set.next::%player%} is "tutorial.2":
  170. if arg 1 is 0:
  171. command "..tutorial %player% 2 0"
  172. else if arg 1 is 1:
  173. command "..tutorial %player% 2 1"
  174. else:
  175. message "&7>> &c/next の後に数字を指定してください"
  176.  
  177. command /status:
  178. trigger:
  179. message ""
  180. message "&3&l&o[ S T A T U S ]"
  181. message "&6&lLevel&7: &6%{player.prm.level::%player%}% &a&lEXP&7: &a%{player.stat.exp::%player%}%&7/&a%{player.set.lvup::%player%}%"
  182. message "&b&lHP&7:&b%{player.stat.hp::%player%}%&7/&b%{player.prm.hp::%player%}%"
  183. message "&a&lMP&7:&a%{player.stat.mp::%player%}%&7/&a%{player.prm.mp::%player%}%"
  184. message "&e&lAVO&7:&e%{player.prm.avo::%player%}% &c&lSTR&7:&c%{player.prm.str::%player%}% &d&lVIT&7:&d%{player.prm.vit::%player%}%"
  185. message "&6&lAGI&7:&6%{player.prm.agi::%player%}% &9&lINT&7:&9%{player.prm.int::%player%}% &2&lLUC&7:&2%{player.prm.luc::%player%}%"
  186. message ""
  187.  
  188. command /..status [<player>]:
  189. permission: ultima.status
  190. trigger:
  191. set {_p} to arg 1
  192. if arg 1 is not set:
  193. set {_p} to player
  194. message "" to {_p}
  195. message "&3&l&o[ S T A T U S ]" to {_p}
  196. message "&6&lLevel&7: &6%{player.prm.level::%{_p}%}% &a&lEXP&7: &a%{player.stat.exp::%{_p}%}%&7/&a%{player.set.lvup::%{_p}%}%" to {_p}
  197. message "&b&lHP&7:&b%{player.stat.hp::%{_p}%}%&7/&b%{player.prm.hp::%{_p}%}%" to {_p}
  198. message "&a&lMP&7:&a%{player.stat.mp::%{_p}%}%&7/&a%{player.prm.mp::%{_p}%}%" to {_p}
  199. message "&e&lAVO&7:&e%{player.prm.avo::%{_p}%}% &c&lSTR&7:&c%{player.prm.str::%{_p}%}% &d&lVIT&7:&d%{player.prm.vit::%{_p}%}%" to {_p}
  200. message "&6&lAGI&7:&6%{player.prm.agi::%{_p}%}% &9&lINT&7:&9%{player.prm.int::%{_p}%}% &2&lLUC&7:&2%{player.prm.luc::%{_p}%}%" to {_p}
  201. message "" to {_p}
  202.  
  203. command /..statusreset [<player>]:
  204. permission: ultima.statusreset
  205. trigger:
  206. set {_p} to arg 1
  207. if arg 1 is not set:
  208. set {_p} to player
  209. set {player.prm.level::%{_p}%} to 1
  210. set {player.prm.hp::%{_p}%} to 10
  211. set {player.prm.mp::%{_p}%} to 3
  212. set {player.prm.avo::%{_p}%} to 3
  213. set {player.prm.str::%{_p}%} to 0
  214. set {player.prm.vit::%{_p}%} to 0
  215. set {player.prm.agi::%{_p}%} to 0
  216. set {player.prm.int::%{_p}%} to 0
  217. set {player.prm.luc::%{_p}%} to 0
  218. set {player.stat.pp::%{_p}%} to 10
  219. set {player.stat.exp::%{_p}%} to 0
  220. set {player.stat.sp::%{_p}%} to 0
  221. set {player.set.lvup::%{_p}%} to 20
  222. command "/alm %{_p}%"
  223.  
  224. command /allotment [<player>]:
  225. aliases: /alm
  226. trigger:
  227. set {_p} to arg 1
  228. if arg 1 is not set:
  229. set {_p} to player
  230. wait a tick
  231. open chest with 2 rows named "&6&lStatus" to {_p}
  232. wait a tick
  233. format slot 2 of {_p} with wool:14 named "&c&lSTR" with lore "&cStrength / 攻撃力 &7にPPを割り振る" to run "..allotment str %{_p}%"
  234. format slot 3 of {_p} with wool:2 named "&d&lVIT" with lore "&dVitality / 生命力 &7にPPを割り振る" to run "..allotment vit %{_p}%"
  235. format slot 4 of {_p} with wool:1 named "&6&lAGI" with lore "&6Agility / 俊敏性 &7にPPを割り振る" to run "..allotment agi %{_p}%"
  236. format slot 5 of {_p} with wool:9 named "&9&lINT" with lore "&9IntelliGence / 知力 &7にPPを割り振る" to run "..allotment int %{_p}%"
  237. format slot 6 of {_p} with wool:13 named "&2&lLUC" with lore "&2Luck / 幸運 &7にPPを割り振る" to run "..allotment luc %{_p}%"
  238. format slot 9 of {_p} with diamond named "&6&l残りPP量を確認" to run "..nowpp %{_p}%"
  239. format slot 12 of {_p} with wool:3 named "&b&lHP" with lore "&bHealthPoint / 体力||&7(STR^1.3+VIT^2)/2+10" to be unstealable
  240. format slot 13 of {_p} with wool:5 named "&a&lMP" with lore "&aMagicPoint / 魔力||&7(LUC^1.2+INT^1.8)/2+3" to be unstealable
  241. format slot 14 of {_p} with wool:4 named "&e&lAVO" with lore "&bAvoidance / 回避||&7(INT^1.1+AGI^1.5)/2+3" to be unstealable
  242. format slot 17 of {_p} with nether_star named "&3&lステータスを表示" to run "..status %{_p}%"
  243.  
  244. command /..allotment <text> [<player>]:
  245. permission: ultima.allotment
  246. trigger:
  247. set {_p} to arg 2
  248. if arg 2 is not set:
  249. set {_p} to player
  250. if {player.stat.pp::%{_p}%} < 1:
  251. message "&3[STATUS] &cPPが足りません" to {_p}
  252. stop
  253. if arg 1 is "str":
  254. remove 1 from {player.stat.pp::%{_p}%}
  255. add 1 to {player.prm.str::%{_p}%}
  256. message "&3[STATUS] &c攻撃力&7に1ポイント割り振りました&c(計%{player.prm.str::%{_p}%}%ポイント)" to {_p}
  257. if arg 1 is "vit":
  258. remove 1 from {player.stat.pp::%{_p}%}
  259. add 1 to {player.prm.vit::%{_p}%}
  260. message "&3[STATUS] &d生命力&7に1ポイント割り振りました&d(計%{player.prm.vit::%{_p}%}%ポイント)" to {_p}
  261. if arg 1 is "agi":
  262. remove 1 from {player.stat.pp::%{_p}%}
  263. add 1 to {player.prm.agi::%{_p}%}
  264. message "&3[STATUS] &6俊敏性&7に1ポイント割り振りました&6(計%{player.prm.agi::%{_p}%}%ポイント)" to {_p}
  265. if arg 1 is "int":
  266. remove 1 from {player.stat.pp::%{_p}%}
  267. add 1 to {player.prm.int::%{_p}%}
  268. message "&3[STATUS] &9知力&7に1ポイント割り振りました&9(計%{player.prm.int::%{_p}%}%ポイント)" to {_p}
  269. if arg 1 is "luc":
  270. remove 1 from {player.stat.pp::%{_p}%}
  271. add 1 to {player.prm.luc::%{_p}%}
  272. message "&3[STATUS] &2幸運&7に1ポイント割り振りました&2(計%{player.prm.luc::%{_p}%}%ポイント)" to {_p}
  273. command "..calc3stat %{_p}%"
  274.  
  275. command /..calc3stat [<player>]:
  276. permission: ultima.calc3stat
  277. trigger:
  278. set {_p} to arg 1
  279. if arg 1 is not set:
  280. set {_p} to player
  281. set {player.prm.hp::%{_p}%} to {player.prm.str::%{_p}%}^1.3+{player.prm.vit::%{_p}%}^2
  282. set {player.prm.hp::%{_p}%} to ceil({player.prm.hp::%{_p}%}/2)
  283. add 10 to {player.prm.hp::%{_p}%}
  284. set {player.prm.mp::%{_p}%} to {player.prm.luc::%{_p}%}^1.2+{player.prm.int::%{_p}%}^1.8
  285. set {player.prm.mp::%{_p}%} to ceil({player.prm.mp::%{_p}%}/2)
  286. add 3 to {player.prm.mp::%{_p}%}
  287. set {player.prm.avo::%{_p}%} to {player.prm.int::%{_p}%}^1.1+{player.prm.agi::%{_p}%}^1.5
  288. set {player.prm.avo::%{_p}%} to ceil({player.prm.avo::%{_p}%}/2)
  289. add 3 to {player.prm.avo::%{_p}%}
  290.  
  291. command /..giveexp <player> <number>:
  292. permission: ultima.giveexp
  293. trigger:
  294. message "&aGet: &6%arg 2%&aEXP" to arg 1
  295. add arg 2 to {player.stat.exp::%arg 1%}
  296.  
  297. command /..givelti <player> <number>:
  298. permission: ultima.giveexp
  299. trigger:
  300. message "&eGet: &6%arg 2%&eLti" to arg 1
  301. add arg 2 to {player.stat.lti::%arg 1%}
Advertisement
Add Comment
Please, Sign In to add comment