Advertisement
luckytyphlosion

lucky-esque ballmaking code

Dec 25th, 2016
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. BallMaking::
  2. pushhalfword PokeballTable
  3. writehalfword PokeballMenu
  4. jump BallMakingMain
  5.  
  6. BallMakingBasement::
  7. pushhalfword PokeballBasementTable
  8. writehalfword PokeballBasementMenu
  9.  
  10. BallMakingMain:
  11. opentext
  12. callasm _LoadFontsBattleExtra
  13. writetext ChoosePokeballText
  14. loadscrollingmenudata -1
  15. .ballMakingLoop
  16. scrollingmenu %10
  17. sif false, then
  18. pophalfwordvar
  19. closewindow
  20. closetext
  21. end
  22. sendif
  23.  
  24. pullhalfwordvar
  25. addvar -1
  26. loadarray -1, PokeballTableEntrySizeEnd - PokeballTable
  27.  
  28. readarray 1
  29. comparevartobyte BallMakingLevel
  30. sif false, then
  31. readarray 1
  32. writetext LowBallLevelText
  33. selse
  34. readarray 2
  35. itemtotext 0, 0
  36. copyvartobyte wCurItem
  37. takeitem ITEM_FROM_MEM
  38. sif false, then
  39. readarray 0
  40. writetext NotEnoughApricornsText
  41. selse
  42. readarray 1
  43. sif >, 49, then
  44. copybytetovar BallMakingLevel
  45. addvar -49
  46. copyvartobyte wScriptBuffer
  47. random
  48. comparevartobyte wScriptBuffer
  49. iftrue .madeSpecialBall ; basically a goto
  50. writetext BallFailText
  51. selse
  52. .madeSpecialBall
  53. readarray 0
  54. sif =, MASTER_BALL
  55. setevent EVENT_CRAFTED_MASTER_BALL
  56. verbosegiveitem ITEM_FROM_MEM, 1
  57. sif false, then
  58. readarray 2
  59. giveitem ITEM_FROM_MEM
  60. selse
  61. readarray 1
  62. divideop 0, 10
  63. giveballmakingEXP 0
  64. waitbutton
  65. sendif
  66. sendif
  67. sendif
  68. sendif
  69. jump .ballMakingLoop
  70.  
  71. PokeballTable:
  72. db POKE_BALL, 0, ORNGAPRICORN
  73. PokeballTableEntrySizeEnd:
  74. db GREAT_BALL, 4, CYANAPRICORN
  75. db ULTRA_BALL, 7, GREYAPRICORN
  76. db QUICK_BALL, 10, YLW_APRICORN
  77. db DUSK_BALL, 14, BLK_APRICORN
  78. db FAST_BALL, 18, RED_APRICORN
  79. db DIVE_BALL, 22, BLU_APRICORN
  80. db REPEAT_BALL, 26, PNK_APRICORN
  81. db TIMER_BALL, 30, WHT_APRICORN
  82. db FRIEND_BALL, 35, GRN_APRICORN
  83. db $ff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement