ref: 92e20d0c59bfa7c6fac99868f1c46b7a9a0e14f8
parent: 4ee88cd7628a08d0b49e60ec8080c45ef350dba1
author: IIMarckus <iimarckus@gmail.com>
date: Mon Jan 14 16:24:45 EST 2013
Add phone scripts for Mom, Bill, Elm, and unused.
--- a/main.asm
+++ b/main.asm
@@ -84276,7 +84276,298 @@
SECTION "bank2F",DATA,BANK[$2F]
-INCBIN "baserom.gbc",$BC000,$4000
+INCBIN "baserom.gbc",$bc000,$bcea5-$bc000
+
+UnusedPhoneScript: ; 0xbcea5
+ 3writetext BANK(UnusedPhoneText), UnusedPhoneText
+ end
+
+MomPhoneScript: ; 0xbceaa
+ checkbit1 $0040
+ iftrue .bcec5
+ checkbit1 $0041 ; if dude talked to you, then you left home without talking to mom
+ iftrue MomPhoneLectureScript
+ checkbit1 $001f
+ iftrue MomPhoneNoGymQuestScript
+ checkbit1 $001a
+ iftrue MomPhoneNoPokedexScript
+ 2jump MomPhoneNoPokemonScript
+
+.bcec5 ; 0xbcec5
+ checkbit1 $0007
+ iftrue MomPhoneHangUpScript
+ 3writetext BANK(MomPhoneGreetingText), MomPhoneGreetingText
+ keeptextopen
+ mapnametotext $0
+ checkcode $f
+ if_equal $1, UnknownScript_0xbcee7
+ if_equal $2, $4f27
+ 2jump UnknownScript_0xbcf2f
+
+UnknownScript_0xbcedf: ; 0xbcedf
+ 3writetext $6d, $4021
+ keeptextopen
+ 2jump UnknownScript_0xbcf37
+
+UnknownScript_0xbcee7: ; 0xbcee7
+ checkcode $c
+ if_equal GROUP_NEW_BARK_TOWN, .newbark
+ if_equal GROUP_CHERRYGROVE_CITY, .cherrygrove
+ if_equal GROUP_VIOLET_CITY, .violet
+ if_equal GROUP_AZALEA_TOWN, .azalea
+ if_equal GROUP_GOLDENROD_CITY, .goldenrod
+ 3writetext BANK(MomPhoneGenericAreaText), MomPhoneGenericAreaText
+ keeptextopen
+ 2jump UnknownScript_0xbcf37
+
+.newbark ; 0xbcf05
+ 3writetext BANK(MomPhoneNewBarkText), MomPhoneNewBarkText
+ keeptextopen
+ 2jump UnknownScript_0xbcf37
+
+.cherrygrove ; 0xbcf0d
+ 3writetext BANK(MomPhoneCherrygroveText), MomPhoneCherrygroveText
+ keeptextopen
+ 2jump UnknownScript_0xbcf37
+
+.violet ; 0xbcf15
+ displaylocation $7 ; sprout tower
+ 3call $3,$4edf
+.azalea ; 0xbcf1b
+ displaylocation $d ; slowpoke well
+ 3call $3,$4edf
+.goldenrod ; 0xbcf21
+ displaylocation $11 ; radio tower
+ 3call $3,$4edf
+ 3writetext $6d, $411c
+ keeptextopen
+ 2jump UnknownScript_0xbcf37
+
+UnknownScript_0xbcf2f: ; 0xbcf2f
+ 3writetext $6d, $4150
+ keeptextopen
+ 2jump UnknownScript_0xbcf37
+
+UnknownScript_0xbcf37: ; 0xbcf37
+ checkbit2 $0008
+ iffalse UnknownScript_0xbcf49
+ checkmoney $1, 0
+ if_equal $0, UnknownScript_0xbcf55
+ 2jump UnknownScript_0xbcf63
+
+UnknownScript_0xbcf49: ; 0xbcf49
+ checkmoney $1, 0
+ if_equal $0, UnknownScript_0xbcf79
+ 2jump UnknownScript_0xbcf6e
+
+UnknownScript_0xbcf55: ; 0xbcf55
+ readmoney $1, $0
+ 3writetext $6d, $41a7
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ 2jump MomPhoneWontSaveMoneyScript
+
+UnknownScript_0xbcf63: ; 0xbcf63
+ 3writetext $6d, $41ea
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ 2jump MomPhoneWontSaveMoneyScript
+
+UnknownScript_0xbcf6e: ; 0xbcf6e
+ 3writetext $6d, $420d
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ 2jump MomPhoneWontSaveMoneyScript
+
+UnknownScript_0xbcf79: ; 0xbcf79
+ readmoney $1, $0
+ 3writetext $6d, $4249
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ 2jump MomPhoneWontSaveMoneyScript
+
+MomPhoneSaveMoneyScript: ; 0xbcf87
+ setbit2 $0008
+ 3writetext $6d, $4289
+ keeptextopen
+ 2jump MomPhoneHangUpScript
+
+MomPhoneWontSaveMoneyScript: ; 0xbcf92
+ clearbit2 $0008
+ 3writetext BANK(MomPhoneWontSaveMoneyText), MomPhoneWontSaveMoneyText
+ keeptextopen
+ 2jump MomPhoneHangUpScript
+
+MomPhoneHangUpScript: ; 0xbcf9d
+ 3writetext BANK(MomPhoneHangUpText), MomPhoneHangUpText
+ end
+
+MomPhoneNoPokemonScript: ; 0xbcfa2
+ 3writetext BANK(MomPhoneNoPokemonText), MomPhoneNoPokemonText
+ end
+
+MomPhoneNoPokedexScript: ; 0xbcfa7
+ 3writetext BANK(MomPhoneNoPokedexText), MomPhoneNoPokedexText
+ end
+
+MomPhoneNoGymQuestScript: ; 0xbcfac
+ 3writetext BANK(MomPhoneNoGymQuestText), MomPhoneNoGymQuestText
+ end
+
+MomPhoneLectureScript: ; 0xbcfb1
+ setbit1 $0040
+ setbit2 $0009
+ specialphonecall $0000
+ 3writetext BANK(MomPhoneLectureText), MomPhoneLectureText
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ 2jump MomPhoneWontSaveMoneyScript
+
+BillPhoneScript1: ; 0xbcfc5
+ checktime $2
+ iftrue .daygreet
+ checktime $4
+ iftrue .nitegreet
+ 3writetext BANK(BillPhoneMornGreetingText), BillPhoneMornGreetingText
+ keeptextopen
+ 2jump .main
+
+.daygreet ; 0xbcfd7
+ 3writetext BANK(BillPhoneDayGreetingText), BillPhoneDayGreetingText
+ keeptextopen
+ 2jump .main
+
+.nitegreet ; 0xbcfdf
+ 3writetext BANK(BillPhoneNiteGreetingText), BillPhoneNiteGreetingText
+ keeptextopen
+ 2jump .main
+
+.main ; 0xbcfe7
+ 3writetext BANK(BillPhoneGeneriText), BillPhoneGeneriText
+ keeptextopen
+ checkcode $10
+ RAM2MEM $0
+ if_equal $0, .full
+ if_greater_than $6, .nearlyfull
+ 3writetext BANK(BillPhoneNotFullText), BillPhoneNotFullText
+ end
+
+.nearlyfull ; 0xbcffd
+ 3writetext BANK(BillPhoneNearlyFullText), BillPhoneNearlyFullText
+ end
+
+.full ; 0xbd002
+ 3writetext BANK(BillPhoneFullText), BillPhoneFullText
+ end
+
+BillPhoneScript2: ; 0xbd007
+ 3writetext BANK(BillPhoneNewlyFullText), BillPhoneNewlyFullText
+ closetext
+ end
+
+ElmPhoneScript1: ; 0xbd00d
+ checkcode $14
+ if_equal $1, .pokerus
+ checkbit1 $0055
+ iftrue .discovery
+ checkbit1 $002d
+ iffalse .next
+ checkbit1 $0054
+ iftrue .egghatched
+.next
+ checkbit1 $002d
+ iftrue .eggunhatched
+ checkbit1 $0701
+ iftrue .assistant
+ checkbit1 $001f
+ iftrue .checkingegg
+ checkbit1 $0043
+ iftrue .stolen
+ checkbit1 $001e
+ iftrue .sawmrpokemon
+ 3writetext BANK(ElmPhoneStartText), ElmPhoneStartText
+ end
+
+.sawmrpokemon ; 0xbd048
+ 3writetext BANK(ElmPhoneSawMrPokemonText), ElmPhoneSawMrPokemonText
+ end
+
+.stolen ; 0xbd04d
+ 3writetext BANK(ElmPhonePokemonStolenText), ElmPhonePokemonStolenText
+ end
+
+.checkingegg ; 0xbd052
+ 3writetext BANK(ElmPhoneCheckingEggText), ElmPhoneCheckingEggText
+ end
+
+.assistant ; 0xbd057
+ 3writetext BANK(ElmPhoneAssistantText), ElmPhoneAssistantText
+ end
+
+.eggunhatched ; 0xbd05c
+ 3writetext BANK(ElmPhoneEggUnhatchedText), ElmPhoneEggUnhatchedText
+ end
+
+.egghatched ; 0xbd061
+ 3writetext BANK(ElmPhoneEggHatchedText), ElmPhoneEggHatchedText
+ setbit1 $0077
+ end
+
+.discovery ; 0xbd069
+ random $2
+ if_equal $0, .nextdiscovery
+ 3writetext BANK(ElmPhoneDiscovery1Text), ElmPhoneDiscovery1Text
+ end
+
+.nextdiscovery ; 0xbd074
+ 3writetext BANK(ElmPhoneDiscovery2Text), ElmPhoneDiscovery2Text
+ end
+
+.pokerus ; 0xbd079
+ 3writetext BANK(ElmPhonePokerusText), ElmPhonePokerusText
+ specialphonecall $0000
+ end
+
+ElmPhoneScript2: ; 0xbd081
+ checkcode $14
+ if_equal $2, .disaster
+ if_equal $3, .assistant
+ if_equal $4, .rocket
+ if_equal $5, .gift
+ if_equal $8, .gift
+ 3writetext BANK(ElmPhonePokerusText), ElmPhonePokerusText
+ specialphonecall $0000
+ end
+
+.disaster ; 0xbd09f
+ 3writetext BANK(ElmPhoneDisasterText), ElmPhoneDisasterText
+ specialphonecall $0000
+ setbit1 $0043
+ end
+
+.assistant ; 0xbd0aa
+ 3writetext BANK(ElmPhoneEggAssistantText), ElmPhoneEggAssistantText
+ specialphonecall $0000
+ clearbit1 $0700
+ setbit1 $0701
+ end
+
+.rocket ; 0xbd0b8
+ 3writetext BANK(ElmPhoneRocketText), ElmPhoneRocketText
+ specialphonecall $0000
+ end
+
+.gift ; 0xbd0c0
+ 3writetext BANK(ElmPhoneGiftText), ElmPhoneGiftText
+ specialphonecall $0000
+ end
+
+.unused ; 0xbd0c8
+ 3writetext BANK(ElmPhoneUnusedText), ElmPhoneUnusedText
+ specialphonecall $0000
+ end
+
+INCBIN "baserom.gbc",$bd0d0,$c0000-$bd0fa
SECTION "bank30",DATA,BANK[$30]
--- a/text/phone/bill.asm
+++ b/text/phone/bill.asm
@@ -1,4 +1,4 @@
-UnknownText_0x1b4427: ; 0x1b4427
+BillPhoneMornGreetingText: ; 0x1b4427
db $0, "Good morning!", $51
db "This is the #-", $4f
db "MON STORAGE SYSTEM", $51
@@ -5,7 +5,7 @@
db "ADMINISTRATION", $4f
db "SERVICE.", $57
-UnknownText_0x1b4470: ; 0x1b4470
+BillPhoneDayGreetingText: ; 0x1b4470
db $0, "Good day!", $51
db "This is the #-", $4f
db "MON STORAGE SYSTEM", $51
@@ -12,7 +12,7 @@
db "ADMINISTRATION", $4f
db "SERVICE.", $57
-UnknownText_0x1b44b5: ; 0x1b44b5
+BillPhoneNiteGreetingText: ; 0x1b44b5
db $0, "Good evening!", $51
db "This is the #-", $4f
db "MON STORAGE SYSTEM", $51
@@ -19,7 +19,7 @@
db "ADMINISTRATION", $4f
db "SERVICE.", $57
-UnknownText_0x1b44fe: ; 0x1b44fe
+BillPhoneGeneriText: ; 0x1b44fe
db $0, "Who's calling?", $51
db $14, ", is it?", $4f
db "Hang on a sec…", $51
@@ -26,7 +26,7 @@
db $56, $4f
db $56, $57
-UnknownText_0x1b452a: ; 0x1b452a
+BillPhoneNotFullText: ; 0x1b452a
db $0, "Thanks for", $4f
db "waiting!", $51
db $14, ", your BOX", $4f
@@ -37,7 +37,7 @@
db "Get out there and", $4f
db "fill it up!", $57
-UnknownText_0x1b4587: ; 0x1b4587
+BillPhoneNearlyFullText: ; 0x1b4587
db $0, "Thanks for", $4f
db "waiting!", $51
db $14, ", your BOX", $4f
@@ -48,7 +48,7 @@
db "Maybe you should", $4f
db "switch your BOX.", $57
-UnknownText_0x1b45ed: ; 0x1b45ed
+BillPhoneFullText: ; 0x1b45ed
db $0, "Thanks for", $4f
db "waiting!", $51
db $14, ", your BOX", $4f
@@ -58,7 +58,7 @@
db "you want to catch", $4f
db "more #MON.", $57
-UnknownText_0x1b4652: ; 0x1b4652
+BillPhoneNewlyFullText: ; 0x1b4652
db $0, "Hi, ", $14, "?", $4f
db "It's me, BILL!", $51
db "Thanks for using", $4f
--- a/text/phone/elm.asm
+++ b/text/phone/elm.asm
@@ -1,4 +1,4 @@
-UnknownText_0x1b46fc: ; 0x1b46fc
+ElmPhoneStartText: ; 0x1b46fc
db $0, "Hello, ", $14, "?", $51
db "Try not to overdo", $4f
db "it.", $51
@@ -6,13 +6,13 @@
db "your #MON if", $55
db "they are hurt.", $57
-UnknownText_0x1b4749: ; 0x1b4749
+ElmPhoneSawMrPokemonText: ; 0x1b4749
db $0, "Hello, ", $14, "?", $51
db "Did you meet MR.", $4f
db "#MON? Great!", $55
db "Come back safely!", $57
-UnknownText_0x1b4784: ; 0x1b4784
+ElmPhonePokemonStolenText: ; 0x1b4784
db $0, $14, "? I'm very", $4f
db "upset now.", $51
db "We had a #MON", $4f
@@ -20,7 +20,7 @@
db "How could anyone", $4f
db "do that?", $57
-UnknownText_0x1b47d5: ; 0x1b47d5
+ElmPhoneCheckingEggText: ; 0x1b47d5
db $0, "Hello, ", $14, "?", $51
db "We're checking the", $4f
db "EGG now. It does", $51
@@ -27,7 +27,7 @@
db "appear to be a", $4f
db "#MON EGG.", $57
-UnknownText_0x1b481c: ; 0x1b481c
+ElmPhoneAssistantText: ; 0x1b481c
db $0, "Hello, ", $14, "?", $51
db "Did you see my", $4f
db "assistant? He's at", $51
@@ -34,7 +34,7 @@
db "the #MON CENTER", $4f
db "in VIOLET CITY.", $57
-UnknownText_0x1b4868: ; 0x1b4868
+ElmPhoneEggUnhatchedText: ; 0x1b4868
db $0, "Hello, ", $14, "?", $51
db "How's the EGG? Has", $4f
db "anything changed?", $51
@@ -41,7 +41,7 @@
db "If anything hap-", $4f
db "pens, please call.", $57
-UnknownText_0x1b48bb: ; 0x1b48bb
+ElmPhoneEggHatchedText: ; 0x1b48bb
db $0, "Hello, ", $14, "?", $4f
db "How is the EGG?", $51
db "What? It hatched?", $4f
@@ -50,7 +50,7 @@
db "Please come show", $4f
db "me now!", $57
-UnknownText_0x1b491f: ; 0x1b491f
+ElmPhoneDiscovery1Text: ; 0x1b491f
db $0, "Hello, ", $14, "?", $51
db "I just made a new", $4f
db "discovery.", $51
@@ -59,7 +59,7 @@
db "hatch depends on", $4f
db "the #MON.", $57
-UnknownText_0x1b4982: ; 0x1b4982
+ElmPhoneDiscovery2Text: ; 0x1b4982
db $0, "Hello, ", $14, "?", $51
db "It's still a", $4f
db "mystery what kinds", $51
@@ -68,7 +68,7 @@
db "We're investigat-", $4f
db "ing that now.", $57
-UnknownText_0x1b49e7: ; 0x1b49e7
+ElmPhonePokerusText: ; 0x1b49e7
db $0, "Hello, ", $14, "?", $51
db "I discovered an", $4f
db "odd thing.", $51
@@ -91,7 +91,7 @@
db "nothing to worry", $55
db "about. Bye!", $57
-UnknownText_0x1b4b17: ; 0x1b4b17
+ElmPhoneDisasterText: ; 0x1b4b17
db $0, "H-hello? ", $14, "?", $4f
db "It's a disaster!", $51
db "Uh, um, it's just", $4f
@@ -101,7 +101,7 @@
db "Please get back", $4f
db "here now!", $57
-UnknownText_0x1b4b87: ; 0x1b4b87
+ElmPhoneEggAssistantText: ; 0x1b4b87
db $0, "Hello, ", $14, "? We", $4f
db "discovered some-", $51
db "thing about the", $4f
@@ -112,7 +112,7 @@
db "Could you talk to", $55
db "him?", $57
-UnknownText_0x1b4c06: ; 0x1b4c06
+ElmPhoneRocketText: ; 0x1b4c06
db $0, $14, ", how are", $4f
db "things going?", $51
db "I called because", $4f
@@ -131,7 +131,7 @@
db "Sorry to bug you.", $4f
db "Take care!", $57
-UnknownText_0x1b4d09: ; 0x1b4d09
+ElmPhoneGiftText: ; 0x1b4d09
db $0, "Hello, ", $14, "?", $51
db "I have something", $4f
db "here for you.", $51
@@ -139,7 +139,7 @@
db "my LAB?", $51
db "See you later!", $57
-UnknownText_0x1b4d5d: ; 0x1b4d5d
+ElmPhoneUnusedText: ; 0x1b4d5d
db $0, "Hello, ", $14, "?", $4f
db "How's it going?", $51
db "I got ahold of", $4f
--- a/text/phone/mom.asm
+++ b/text/phone/mom.asm
@@ -1,4 +1,4 @@
-UnknownText_0x1b4000: ; 0x1b4000
+MomPhoneGreetingText: ; 0x1b4000
db $0, "Hello?", $51
db "Oh, hi, ", $52, "!", $4f
db "Working hard?", $57
@@ -15,7 +15,7 @@
db "is? Did you go", $4f
db "take a look?", $57
-UnknownText_0x1b406b: ; 0x1b406b
+MomPhoneGenericAreaText: ; 0x1b406b
db $0, "Really, you're in", $4f
db "@"
TX_RAM $d099
@@ -24,7 +24,7 @@
db "there. That's kind", $55
db "of neat, ", $52, ".", $57
-UnknownText_0x1b40b1: ; 0x1b40b1
+MomPhoneNewBarkText: ; 0x1b40b1
db $0, "What? You're in", $4f
db "@"
TX_RAM $d099
@@ -32,7 +32,7 @@
db "Come see your MOM", $4f
db "sometime!", $57
-UnknownText_0x1b40e4: ; 0x1b40e4
+MomPhoneCherrygroveText: ; 0x1b40e4
db $0, "You're visiting", $4f
db "@"
TX_RAM $d099
@@ -86,22 +86,22 @@
db $0, "OK. I'll save your", $4f
db "money.", $57
-UnknownText_0x1b42a3: ; 0x1b42a3
+MomPhoneWontSaveMoneyText: ; 0x1b42a3
db $0, "OK. I won't save", $4f
db "your money.", $57
-UnknownText_0x1b42c0: ; 0x1b42c0
+MomPhoneHangUpText: ; 0x1b42c0
db $0, $52, ", keep it", $4f
db "up! I'm rooting", $55
db "for you, baby!", $57
-UnknownText_0x1b42ea: ; 0x1b42ea
+MomPhoneNoPokemonText: ; 0x1b42ea
db $0, "Hello?", $51
db "Oh, hi, ", $52, "!", $4f
db "Wasn't PROF.ELM", $55
db "waiting for you?", $57
-UnknownText_0x1b431d: ; 0x1b431d
+MomPhoneNoPokedexText: ; 0x1b431d
db $0, "Hello?", $51
db "Oh, hi, ", $52, "!", $4f
db "You're on a big", $51
@@ -108,7 +108,7 @@
db "mission for PROF.", $4f
db "ELM? Be good!", $57
-UnknownText_0x1b435f: ; 0x1b435f
+MomPhoneNoGymQuestText: ; 0x1b435f
db $0, "Hello?", $51
db "Hi, ", $52, "! If", $4f
db "you're done with", $51
@@ -115,7 +115,7 @@
db "your errand come", $4f
db "on home, dear.", $57
-UnknownText_0x1b43a1: ; 0x1b43a1
+MomPhoneLectureText: ; 0x1b43a1
db $0, "Hello?", $51
db "…… ", $52, "?", $4f
db "I heard from PROF.", $51
--- a/text/phone/trainers1.asm
+++ b/text/phone/trainers1.asm
@@ -1556,5 +1556,5 @@
db $0, " is", $55
db "looking good!", $57
-UnknownText_0x1b7624: ; 0x1b7624
+UnusedPhoneText: ; 0x1b7624
db $0, "Good morning.", $57