Advertisement
watsp

farm

Sep 1st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.60 KB | None | 0 0
  1. variables:
  2. {cash:%player%} = 0
  3. {level:%player%} = 1
  4. {exp:%player%} = 0
  5. {reqexp:%player%} = 30
  6. {wheat:%player%} = 0
  7. {backpackmax:%player%} = 25
  8. {sell:%player%} = 1
  9. {upgradecost:%player%} = 40
  10. {skillpoint:%player%} = 0
  11. {reqskill:%player%} = 5
  12. {getexp:%player%} = 1
  13. {getwheat:%player%} = 1
  14. {skill.wheatcost:%player%} = 1
  15. {skill.sellcost:%player%} = 1
  16. {skill.expcost:%player%} = 1
  17.  
  18. aliases:
  19. notclops = 59:0-6
  20. wheatitem = 296
  21.  
  22. command /reset:
  23. permission: sk.admin
  24. trigger:
  25. set {cash:%player%} to 0
  26. set {level:%player%} to 1
  27. set {exp:%player%} to 0
  28. set {reqexp:%player%} to 30
  29. set {wheat:%player%} to 0
  30. set {backpackmax:%player%} to 25
  31. set {sell:%player%} to 1
  32. set {upgradecost:%player%} to 40
  33. set {skillpoint:%player%} to 0
  34. set {reqskill:%player%} to 5
  35. set {getexp:%player%} to 1
  36. set {getwheat:%player%} to 1
  37. set {skill.wheatcost:%player%} to 1
  38. set {skill.sellcost:%player%} to 1
  39. set {skill.expcost:%player%} to 1
  40.  
  41. on first join:
  42. broadcast "&d%player%さんが初参加しました!!"
  43. message "&dようこそ!Farming Cantoryへ!"
  44. message "&dまずは近くのエンチャントテーブルをクリックして、チュートリアルを受けましょう!"
  45. give 1 of diamond hoe named "&b最強の桑" with lore "&e普通の桑と変わらない!" to player
  46.  
  47. on join:
  48. message "&dおかえりなさい!Farming Cantoryへ!"
  49. broadcast "&d%player%さんが参加しました!"
  50.  
  51. on quit:
  52. broadcast "&d%player%さんが退出しました・・・"
  53.  
  54.  
  55. every 5 tick in "world":
  56. loop all players:
  57. set {_nextlevel} to ({level:%loop-player%} + 1)
  58. set {_reqexp} to ceil({reqexp:%loop-player%} * 1.25)
  59. show action bar from "&aLevel:&r%{level:%loop-player%}% &bExp:&r%{exp:%loop-player%}%/%{reqexp:%loop-player%}% &cCash:&r%{cash:%loop-player%}%&6G&r &dWheat:&r%{wheat:%loop-player%}%/%{backpackmax:%loop-player%}%" to loop-player
  60. if {exp:%loop-player%} >= {reqexp:%loop-player%}:
  61. send loop-player title "&dLevel Up!" with subtitle "&6%{level:%loop-player%}%→%{_nextlevel}%" for 3 seconds
  62. set {exp:%loop-player%} to 0
  63. add 1 to {level:%loop-player%}
  64. set {reqexp:%loop-player%} to {_reqexp}
  65. if {level:%loop-player%} is {reqskill:%loop-player%}:
  66. add 1 to {skillpoint:%loop-player%}
  67. add 5 to {reqskill:%loop-player%}
  68. send "&dレベルが5の倍数になったので、1SkillPointをゲットしました!" to loop-player
  69.  
  70.  
  71.  
  72. On break of ripe wheat:
  73. if {wheat:%player%} is {backpackmax:%player%}:
  74. message "&cバックパックが満杯です"
  75. cancel event
  76. stop
  77. add {getexp:%player%} to {exp:%player%}
  78. add {getwheat:%player%} to {wheat:%player%}
  79. set the event-block to crops
  80.  
  81. On break of notclops:
  82. cancel event
  83.  
  84. on rightclick on chest:
  85. block under the event-block is gold block
  86. cancel event
  87. send player title "&cSelled!" with subtitle "&6バックパックの小麦を売却しました" for 3 seconds
  88. add ({wheat:%player%} * {sell:%player%}) to {cash:%player%}
  89. set {wheat:%player%} to 0
  90.  
  91. on rightclick on chest:
  92. block under the event-block is diamond block
  93. cancel event
  94. wait 1 tick
  95. open chest with 3 rows named "&c&lバックパックの拡張" to player
  96. format slot 13 of player with chest named "&bバックパックの容量を拡張しますか?" with lore "&a&l%{backpackmax:%player%}%→%({backpackmax:%player%} + 15)% &eCost:&r%{upgradecost:%player%}%G" to act unstealable
  97. format slot 11 of player with light green wool block named "&aはい" to close then run [execute player command "bupgrade"]
  98. format slot 15 of player with red wool block named "&cいいえ" to close
  99.  
  100. on rightclick on chest:
  101. block under the event-block is iron block
  102. cancel event
  103. open chest with 1 rows named "&dBank" to player
  104. format slot 0 of player with gold nugget named "&e1G" with lore "&cクリックで変換!" to run [execute player command "getgold 1"]
  105. format slot 1 of player with gold ingot named "&e10G" with lore "&cクリックで変換!" to run [execute player command "getgold 10"]
  106. format slot 2 of player with gold block named "&e100G" with lore "&cクリックで変換!" to run [execute player command "getgold 100"]
  107. format slot 3 of player with emerald named "&e1000G" with lore "&cクリックで変換!" to run [execute player command "getgold 1000"]
  108. format slot 4 of player with emerald block named "&e10000G" with lore "&cクリックで変換!" to run [execute player command "getgold 10000"]
  109. format slot 5 of player with diamond named "&e100000G" with lore "&cクリックで変換!" to run [execute player command "getgold 100000"]
  110. format slot 6 of player with diamond block named "&e1000000G" with lore "&cクリックで変換!" to run [execute player command "getgold 1000000"]
  111.  
  112.  
  113.  
  114. on rightclick on chest:
  115. block under the event-block is emerald block
  116. cancel event
  117. open chest with 4 rows named "&6&lスキルポイント割り振り" to player
  118. format slot 4 of player with emerald block named "&a現在のスキルポイント:&d%{skillpoint:%player%}%SP" to act unstealable
  119. format slot 13 of player with exp bottle named "&c経験値量増加" with lore "&e現在値:&a%{getexp:%player%}%Lv||&bコスト:&d%{skill.expcost:%player%}%SP||&cクリックで割り振り" to close then run [execute player command "upgrade exp"]
  120. format slot 22 of player with wheatitem named "&c小麦獲得量増加" with lore "&e現在値:&a%{getwheat:%player%}%Lv||&bコスト:&d%{skill.wheatcost:%player%}%SP||&cクリックで割り振り" to close then run [execute player command "upgrade wheat"]
  121. format slot 31 of player with gold ingot named "&c売却価格増加" with lore "&e現在値:&a%{sell:%player%}%Lv||&bコスト:&d%{skill.sellcost:%player%}%SP||&cクリックで割り振り" to close then run [execute player command "upgrade sell"]
  122.  
  123. on rightclick on enchantment table:
  124. cancel event
  125. open chest with 1 rows named "&d&lFarming Cantoryのチュートリアル" to player
  126. format slot 0 of player with paper named "&cチュートリアルその1 「始まり」" with lore "&rまずは、近くにある小麦を桑でも素手でもいいので壊しましょう。" to act unstealable
  127. format slot 1 of player with paper named "&cチュートリアルその2 「何が起きる?」" with lore "&r次に、小麦を壊すと&eExp&rと&eWheat&rが手に入ります。||&rホットバーの上の&dWheat&rと書かれた数値を見てください。||&r左にあるのが現在のWheatの所持数です。||&rまた、右の数字はWheatを収納できる最大数を表しています。||&r初期状態では25個です。" to act unstealable
  128. format slot 2 of player with paper named "&cチュートリアルその3 「売却」" with lore "&r近くにある、&e金ブロックが下にあるチェスト&rまで行きましょう。||&rWheatが溜まっている状態で、そのチェストを右クリックすると||&r1Wheatにつき1Gもらうことができます。||&rWheatは消費します。" to act unstealable
  129. format slot 3 of player with paper named "&cチュートリアルその4 「経験」" with lore "&r次に、Wheatの欄の左から2番目を見て下さい。それがあなたの経験値です。||&r左は現在の経験値で、右は次のレベルまでの経験値の数を表しています。||&r5レベルごとに、&eSP(Skillpoint)&rが手に入ります。" to act unstealable
  130. format slot 4 of player with paper named "&cチュートリアルその5 「何ができる?」" with lore "&rこれまでで手に入れた、SPやGは何に使うのか説明します。||&rGは、バックパックの拡張や、建築資材の購入に使います。||&rバックパックは&eダイヤブロックの上のチェスト&rを開くと||&rバックパックの拡張ができます。||&rGはアイテムにしてトレードに使うこともできます。||&e鉄ブロックの上のチェスト&rで交換ができます。||&rSPは、スキルレベルを上げるのに使います。||&eエメラルドブロックの上のチェスト&rで振り分け画面が出ます。||&rスキルレベルを上げるのに必要なSPは、||&r振り分けるたびに増えるので注意です。" to act unstealable
  131. format slot 5 of player with paper named "&cチュートリアルその6 「建築」" with lore "&rそろそろ飽きてきたころだと思います。||&rそんなあなたに&e建築&rはいかがでしょうか?||&rスポーンの壁の外であり、かつ道の近くであれば自由に建築してOKです。||&r建築資材は近くの村人がアイテムのGと交換してくれます。" to act unstealable
  132. format slot 6 of player with book named "&cチュートリアル 最後" with lore "&rここまで読んでくれたなら、この先は自由です。||&rくれぐれも常識的な範囲内でお願いします" to act unstealable
  133.  
  134.  
  135.  
  136.  
  137.  
  138. command /upgrade <text>:
  139. trigger:
  140. if arg-1 is "exp":
  141. if {skillpoint:%player%} >= {skill.expcost:%player%}:
  142. add 1 to {getexp:%player%}
  143. message "&a経験値量増加がレベルアップしました!"
  144. add ({skill.expcost:%player%} * -1) to {skillpoint:%player%}
  145. add 1 to {skill.expcost:%player%}
  146. else:
  147. message "&c&lSkillPointが足りません"
  148. if arg-1 is "wheat":
  149. if {skillpoint:%player%} >= {skill.wheatcost:%player%}:
  150. add 1 to {getwheat:%player%}
  151. message "&a小麦獲得量増加がレベルアップしました!"
  152. add ({skill.wheatcost:%player%} * -1) to {skillpoint:%player%}
  153. add 1 to {skill.wheatcost:%player%}
  154. else:
  155. message "&c&lSkillPointが足りません"
  156. if arg-1 is "sell":
  157. if {skillpoint:%player%} >= {skill.sellcost:%player%}:
  158. add 1 to {sell:%player%}
  159. message "&a売却価格増加がレベルアップしました!"
  160. add ({skill.sellcost:%player%} * -1) to {skillpoint:%player%}
  161. add 1 to {skill.sellcost:%player%}
  162. else:
  163. message "&c&lSkillPointが足りません"
  164.  
  165. command /bupgrade:
  166. trigger:
  167. if {cash:%player%} >= {upgradecost:%player%}:
  168. add ({upgradecost:%player%} * -1) to {cash:%player%}
  169. add 15 to {backpackmax:%player%}
  170. set {upgradecost:%player%} to ceil({upgradecost:%player%} * 1.5)
  171. send player title "&aBackpack Upgraded!" with subtitle "&cバックパックが%{backpackmax:%player%}%に拡張されました!" for 3 seconds
  172. else:
  173. send player title "&cCashが足りません" for 3 seconds
  174.  
  175. command /setgold <number>:
  176. permission: sk.admin
  177. trigger:
  178. set {cash:%player%} to arg-1
  179.  
  180. command /getgold <number>:
  181. trigger:
  182. if arg-1 is 1:
  183. if {cash:%player%} >= 1:
  184. give 1 of gold nugget named "&61G" to player
  185. add -1 to {cash:%player%}
  186. else:
  187. message "&cCashが足りません!"
  188. if arg-1 is 10:
  189. if {cash:%player%} >= 10:
  190. give 1 of gold ingot named "&610G" to player
  191. add -10 to {cash:%player%}
  192. else:
  193. message "&cCashが足りません!"
  194. if arg-1 is 100:
  195. if {cash:%player%} >= 100:
  196. give 1 of gold block named "&6100G" to player
  197. add -100 to {cash:%player%}
  198. else:
  199. message "&cCashが足りません!"
  200. if arg-1 is 1000:
  201. if {cash:%player%} >= 1000:
  202. give 1 of emerald named "&61000G" to player
  203. add -1000 to {cash:%player%}
  204. else:
  205. message "&cCashが足りません!"
  206. if arg-1 is 10000:
  207. if {cash:%player%} >= 10000:
  208. give 1 of emerald block named "&610000G" to player
  209. add -10000 to {cash:%player%}
  210. else:
  211. message "&cCashが足りません!"
  212. if arg-1 is 100000:
  213. if {cash:%player%} >= 100000:
  214. give 1 of diamond named "&6100000G" to player
  215. add -100000 to {cash:%player%}
  216. else:
  217. message "&cCashが足りません!"
  218. if arg-1 is 1000000:
  219. if {cash:%player%} >= 1000000:
  220. give 1 of diamond block named "&61000000G" to player
  221. add -1000000 to {cash:%player%}
  222. else:
  223. message "&cCashが足りません!"
  224.  
  225. on rightclick holding a gold nugget:
  226. remove 1 gold nugget from the player
  227. add 1 to {cash:%player%}
  228.  
  229. on rightclick holding a gold ingot:
  230. remove 1 gold ingot from the player
  231. add 10 to {cash:%player%}
  232.  
  233. on rightclick holding a gold block:
  234. cancel event
  235. remove 1 gold block from the player
  236. add 100 to {cash:%player%}
  237.  
  238. on rightclick holding a emerald:
  239. remove 1 emerald from the player
  240. add 1000 to {cash:%player%}
  241.  
  242. on rightclick holding a emerald block:
  243. cancel event
  244. remove 1 emerald block from the player
  245. add 10000 to {cash:%player%}
  246.  
  247. on rightclick holding a diamond:
  248. remove 1 diamond from the player
  249. add 100000 to {cash:%player%}
  250.  
  251. on rightclick holding a diamond block:
  252. cancel event
  253. remove 1 diamond block from the player
  254. add 1000000 to {cash:%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement