Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. #------------------#
  2. # ガチャポンスクリプト #
  3. #------------------#
  4.  
  5. options:
  6. gatya.prefix: &6&l[&2&lガチャポン&6&l]&f
  7. gatya.name.1: ガチャ1の名前
  8. gatya.lore.1: ガチャ1の説明文
  9. gatya.cost.1: stone #アイテムのIDを入れる ※有料ガチャのコスト
  10.  
  11.  
  12. #-------------------------------------------------------------------------------------#
  13.  
  14. command /gatya give <player> <text> <text> <number>:
  15.  
  16. permission: gatya.admin
  17. trigger:
  18. if arg 2 is "weapon":
  19. if arg 3 is "free":
  20. give arg 4 of name tag named "&e{@gatya.name.1}&a[無料]" with lore "{@gatya.lore.1}" to arg 1
  21. send "{@gatya.prefix} : &b%player%&fが&b%arg 1%&fに『&e{@gatya.name.1}&a[無料]&f』をあげました!" to player and arg 1
  22. else if arg 3 is "charge":
  23. give arg 4 of name tag named "&e{@gatya.name.1}&c[有料]" with lore "{@gatya.lore.1}" to arg 1
  24. send "{@gatya.prefix} : &b%player%&fが&b%arg 1%&fに『&e{@gatya.name.1}&c[有料]&f』をあげました!" to player and arg 1
  25. on rightclick:
  26. held item is name tag
  27. if name of item is "&e{@gatya.name.1}&a[無料]":
  28. if lore of item is "{@gatya.lore.1}":
  29. remove 1 of held item from player
  30. set {_gatya} to random integer between 1 and 14
  31. if {_gatya} is between 1 and 5:
  32. give 1 of wooden sword to player
  33. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  34. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  35. else if {_gatya} is between 5 and 8:
  36. give 1 of stone sword to player
  37. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  38. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  39. else if {_gatya} is between 9 and 11:
  40. give 1 of iron sword to player
  41. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  42. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  43. else if {_gatya} is between 12 and 13:
  44. give 1 of golden sword to player
  45. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  46. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  47. else if {_gatya} is 14:
  48. give 1 of diamond sword to player
  49. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  50. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  51. else if name of item is "&e{@gatya.name.1}&c[有料]":
  52. if lore of item is "{@gatya.lore.1}":
  53. if player has 1 of {@gatya.cost.1}:
  54. remove 1 of held item from player
  55. remove 1 of {@gatya.cost.1} from player's inventory
  56. set {_gatya} to random integer between 1 and 14
  57. if {_gatya} is between 1 and 5:
  58. give 1 of wooden sword to player
  59. play "ENTITY_PAYER_LEVELUP" to player at volume 1
  60. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  61. else if {_gatya} is between 5 and 8:
  62. give 1 of stone sword to player
  63. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  64. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  65. else if {_gatya} is between 9 and 11:
  66. give 1 of iron sword to player
  67. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  68. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  69. else if {_gatya} is between 12 and 13:
  70. give 1 of golden sword to player
  71. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  72. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  73. else if {_gatya} is 14:
  74. give 1 of diamond sword to player
  75. play "ENTITY_PLAYER_LEVELUP" to player at volume 1
  76. send "{@gatya.prefix} : &e景品がインベントリに送られました" to player
  77. else:
  78. send "{@gatya.prefix} : &c必要コストを持っていません・・・" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement