route11gateupstairs.asm 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. Route11GateUpstairsScript:
  2. jp DisableAutoTextBoxDrawing
  3. Route11GateUpstairsTextPointers:
  4. dw Route11GateUpstairsText1
  5. dw Route11GateUpstairsText2
  6. dw Route11GateUpstairsText3
  7. dw Route11GateUpstairsText4
  8. Route11GateUpstairsText1:
  9. TX_ASM
  10. xor a
  11. ld [wWhichTrade], a
  12. predef DoInGameTradeDialogue
  13. Route11GateUpstairsScriptEnd:
  14. jp TextScriptEnd
  15. Route11GateUpstairsText2:
  16. TX_ASM
  17. CheckEvent EVENT_GOT_ITEMFINDER, 1
  18. jr c, .asm_4949b
  19. ld a, 30 ; pokemon needed
  20. ld [hOaksAideRequirement], a
  21. ld a, ITEMFINDER ; oak's aide reward
  22. ld [hOaksAideRewardItem], a
  23. ld [wd11e], a
  24. call GetItemName
  25. ld h, d
  26. ld l, e
  27. ld de, wOaksAideRewardItemName
  28. ld bc, ITEM_NAME_LENGTH
  29. call CopyData
  30. predef OaksAideScript
  31. ld a, [hOaksAideResult]
  32. dec a
  33. jr nz, .asm_494a1
  34. SetEvent EVENT_GOT_ITEMFINDER
  35. .asm_4949b
  36. ld hl, Route11GateUpstairsText_494a3
  37. call PrintText
  38. .asm_494a1
  39. jr Route11GateUpstairsScriptEnd
  40. Route11GateUpstairsText_494a3:
  41. TX_FAR _Route11GateUpstairsText_494a3
  42. db "@"
  43. Route11GateUpstairsText3:
  44. TX_ASM
  45. ld a, [wSpriteStateData1 + 9]
  46. cp SPRITE_FACING_UP
  47. jp nz, GateUpstairsScript_PrintIfFacingUp
  48. CheckEvent EVENT_BEAT_ROUTE12_SNORLAX
  49. ld hl, BinocularsSnorlaxText
  50. jr z, .print
  51. ld hl, BinocularsNoSnorlaxText
  52. .print
  53. call PrintText
  54. jp TextScriptEnd
  55. BinocularsSnorlaxText:
  56. TX_FAR _BinocularsSnorlaxText
  57. db "@"
  58. BinocularsNoSnorlaxText:
  59. TX_FAR _BinocularsNoSnorlaxText
  60. db "@"
  61. Route11GateUpstairsText4:
  62. TX_ASM
  63. ld hl, Route11GateUpstairsText_494d5
  64. jp GateUpstairsScript_PrintIfFacingUp
  65. Route11GateUpstairsText_494d5:
  66. TX_FAR _Route11GateUpstairsText_494d5
  67. db "@"