2019-01-01 20:06:23 +00:00
|
|
|
MtMoonPokecenter_Script:
|
2015-02-07 10:43:08 +00:00
|
|
|
call Serial_TryEstablishingExternallyClockedConnection
|
2014-05-18 18:19:10 +00:00
|
|
|
jp EnableAutoTextBoxDrawing
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
MtMoonPokecenter_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const MtMoonPokecenterNurseText, TEXT_MTMOONPOKECENTER_NURSE
|
|
|
|
dw_const MtMoonPokecenterYoungsterText, TEXT_MTMOONPOKECENTER_YOUNGSTER
|
|
|
|
dw_const MtMoonPokecenterGentlemanText, TEXT_MTMOONPOKECENTER_GENTLEMAN
|
|
|
|
dw_const MtMoonPokecenterMagikarpSalesmanText, TEXT_MTMOONPOKECENTER_MAGIKARP_SALESMAN
|
|
|
|
dw_const MtMoonPokecenterClipboardText, TEXT_MTMOONPOKECENTER_CLIPBOARD
|
|
|
|
dw_const MtMoonPokecenterLinkReceptionistText, TEXT_MTMOONPOKECENTER_LINK_RECEPTIONIST
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
MtMoonPokecenterNurseText:
|
2020-07-16 16:32:19 +00:00
|
|
|
script_pokecenter_nurse
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
MtMoonPokecenterYoungsterText:
|
|
|
|
text_far _MtMoonPokecenterYoungsterText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
MtMoonPokecenterGentlemanText:
|
|
|
|
text_far _MtMoonPokecenterGentlemanText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
MtMoonPokecenterMagikarpSalesmanText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 01:32:02 +00:00
|
|
|
CheckEvent EVENT_BOUGHT_MAGIKARP, 1
|
2015-07-19 03:49:52 +00:00
|
|
|
jp c, .alreadyBoughtMagikarp
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .IGotADealText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, MONEY_BOX
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [wTextBoxID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextBoxID
|
|
|
|
call YesNoChoice
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
2015-07-19 03:49:52 +00:00
|
|
|
jp nz, .choseNo
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney], a
|
|
|
|
ldh [hMoney + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $5
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney + 1], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call HasEnoughMoney
|
2015-07-19 03:49:52 +00:00
|
|
|
jr nc, .enoughMoney
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, .NoMoneyText
|
2015-07-19 03:49:52 +00:00
|
|
|
jr .printText
|
|
|
|
.enoughMoney
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, MAGIKARP, 5
|
2014-05-18 18:19:10 +00:00
|
|
|
call GivePokemon
|
2015-07-19 03:49:52 +00:00
|
|
|
jr nc, .done
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2015-07-19 03:49:52 +00:00
|
|
|
ld [wPriceTemp], a
|
|
|
|
ld [wPriceTemp + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $5
|
2015-07-19 03:49:52 +00:00
|
|
|
ld [wPriceTemp + 1], a
|
|
|
|
ld hl, wPriceTemp + 2
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerMoney + 2
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $3
|
2014-06-16 20:57:26 +00:00
|
|
|
predef SubBCDPredef
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, MONEY_BOX
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [wTextBoxID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextBoxID
|
2015-07-21 01:32:02 +00:00
|
|
|
SetEvent EVENT_BOUGHT_MAGIKARP
|
2015-07-19 03:49:52 +00:00
|
|
|
jr .done
|
|
|
|
.choseNo
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .NoText
|
2015-07-19 03:49:52 +00:00
|
|
|
jr .printText
|
|
|
|
.alreadyBoughtMagikarp
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .NoRefundsText
|
2015-07-19 03:49:52 +00:00
|
|
|
.printText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2015-07-19 03:49:52 +00:00
|
|
|
.done
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.IGotADealText
|
|
|
|
text_far _MtMoonPokecenterMagikarpSalesmanIGotADealText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.NoText
|
|
|
|
text_far _MtMoonPokecenterMagikarpSalesmanNoText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
.NoMoneyText
|
2023-07-14 01:27:56 +00:00
|
|
|
text_far _MtMoonPokecenterMagikarpSalesmanNoMoneyText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.NoRefundsText
|
|
|
|
text_far _MtMoonPokecenterMagikarpSalesmanNoRefundsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
MtMoonPokecenterClipboardText:
|
|
|
|
text_far _MtMoonPokecenterClipboardText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
MtMoonPokecenterLinkReceptionistText:
|
2020-07-05 23:55:03 +00:00
|
|
|
script_cable_club_receptionist
|