Advertisement
kama6012

Gacha1

Jul 17th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. on load:
  2. #1つ目のリスト:パック番号
  3. #2つ目のリスト:カード番号
  4. set {Gacha.PackName::1} to "&a&lガチャ券"
  5. set {Gacha.IncludeItem::1::0} to 1 pumpkin named "&7[N]&6かぼ&r" with lore "&5---Lore---||&f普通の弱いカード||&5---効果---||&cATK:1500||&bSP:1||&f場に1匹まで出せる"
  6. set {Gacha.IncludeWeight::1::0} to 1750
  7. give a feather named "%{Gacha.PackName::1}%" to all players
  8.  
  9. on load:
  10. clear {Gacha.Gacha::*}
  11. wait 1 tick
  12. loop {Gacha.PackName::*}:
  13. set {Gacha.GachaLong::%loop-index-1%} to 0
  14. loop {Gacha.IncludeItem::%loop-index-1%::*}:
  15. loop {Gacha.IncludeWeight::%loop-index-1%::%loop-index-2%} times:
  16. set {Gacha.Gacha::%loop-index-1%::%{Gacha.GachaLong::%loop-index-1%}%} to {Gacha.IncludeItem::%loop-index-1%::%loop-index-2%}
  17. set {Gacha.GachaLong::%loop-index-1%} to {Gacha.GachaLong::%loop-index-1%} + 1
  18.  
  19. on right click holding feather:
  20. loop {Gacha.PackName::*}:
  21. loop-value is the name of event-item
  22. set {_Gacha.PackName%player%} to loop-index
  23. {_Gacha.PackName%player%} is set
  24. if player is not sneaking:
  25. set {_Gacha.Gacha.Chance} to random integer between 0 to {Gacha.GachaLong::%{_Gacha.PackName%player%}%} - 1
  26. give {Gacha.Gacha::%{_Gacha.PackName%player%}%::%{_Gacha.Gacha.Chance}%} to player
  27. wait 1 tick
  28. remove 1 of event-item from player
  29. else:
  30. if item amount of event-item is bigger than 63:
  31. loop 64 times:
  32. set {_Gacha.Gacha.Chance} to random integer between 0 to {Gacha.GachaLong::%{_Gacha.PackName%player%}%} - 1
  33. give {Gacha.Gacha::%{_Gacha.PackName%player%}%::%{_Gacha.Gacha.Chance}%} to player
  34. wait 1 tick
  35. remove 64 of event-item from player
  36. stop
  37. else:
  38. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement