#include stditems.rbh
#include stdpoke.rbh
//---------------
#org 0x16E459
lock
faceplayer
setvar LASTRESULT 0x0 //clear last result
checkflag 0x2EE //check if Aerodactyl has been revived
if 0x1 call 0x816E87D //if revived, check if a story fossil was revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E873 //if a story fossil and Aerodactyl were revived, end script
compare 0x406A 0x2
if 0x1 goto 0x816E712
compare 0x406A 0x1
if 0x1 goto 0x816E708
call 0x816E4C8 //check if Helix Fossil is in inventory
compare LASTRESULT 0x1
if 0x1 goto 0x816E520 //if yes go to check if Old Amber and ask which (if any) of those two to revive
call 0x816E4E0 //check if Dome Fossil is in inventory
compare LASTRESULT 0x1
if 0x1 goto 0x816E562 //if yes, go to check if old Amber and ask which (if any) of the two to revive.
call 0x816E4F8 //check if Old amber is picked up and not revived.
compare LASTRESULT 0x1
if 0x1 goto 0x816E5A4 //if so, ask whether to revive old Amber
msgbox 0x819A25E MSG_KEEPOPEN //"Hiya!\pI am important doctor.\nYes..."
goto 0x816E516
//---------------
#org 0x16E87D
checkflag 0x273 //if we got helix fossil
if 0x1 goto 0x816E895 //return 1 if in inventory, else 0
checkflag 0x272 //if we got dome fossil
if 0x1 goto 0x816E8A4 //return 1 if in inventory, else 0
goto 0x816E510 //else return 0
//---------------
#org 0x16E873
msgbox 0x819A4BD MSG_KEEPOPEN //"Aiyah!\nYou come again!"
release
end
//---------------
#org 0x16E712
compare 0x4069 0x1
if 0x1 goto 0x816E734
compare 0x4069 0x2
if 0x1 goto 0x816E779
compare 0x4069 0x3
if 0x1 goto 0x816E7BE
end
//---------------
#org 0x16E708
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
release
end
//---------------
#org 0x16E4C8
checkflag 0x273 //was helix fossil picked up
if 0x0 goto 0x816E510 //if not
checkflag 0x2ED //or if already revived
if 0x1 goto 0x816E510 //return 0
setvar LASTRESULT 0x1 //
return //else return has Helix Fossil
//---------------
#org 0x16E520
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
call 0x816E4F8 //check if old amber is picked up and not revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E5D6 //if so, go here
multichoice 0x0 0x0 0x15 0x0 //ask if Helix fossil or none
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E644 //if Helix Fossil revive it
compare 0x8000 0x1
if 0x1 goto 0x816E516 //if no, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516 //else, end script
end
//---------------
#org 0x16E4E0
checkflag 0x272 //was dome fossil picked up
if 0x0 goto 0x816E510 //if not
checkflag 0x2EC //or if already revived
if 0x1 goto 0x816E510 //return 0
setvar LASTRESULT 0x1
return //else return has Dome Fossil
//---------------
#org 0x16E562
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
call 0x816E4F8 //check if Old Amber is picked up and not revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E60D //if so go to Dome and Amber choice
multichoice 0x0 0x0 0x16 0x0 //revive Dome?
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0 //if Dome
if 0x1 goto 0x816E682 //go to Dome revive
compare 0x8000 0x1 //
if 0x1 goto 0x816E516
compare 0x8000 0x7F
if 0x1 goto 0x816E516
end
//---------------
#org 0x16E4F8
checkflag 0x25E //was Old Amber picked up
if 0x0 goto 0x816E510 //if not
checkflag 0x2EE //or if already revived
if 0x1 goto 0x816E510 //return 0
setvar LASTRESULT 0x1
return //else return has Old Amber
//---------------
#org 0x16E5A4
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
multichoice 0x0 0x0 0x17 0x0 //ask whether to revive old Amber
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E6C0 //if Old Amber, revive it
compare 0x8000 0x1
if 0x1 goto 0x816E516 //if none, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516 //else end script
end
//---------------
#org 0x16E516
msgbox 0x819A2F0 MSG_KEEPOPEN //"No!\nIs too bad!"
release
end
//---------------
#org 0x16E895
checkflag 0x2ED //check if Helix Fossil is revived
if 0x0 goto 0x816E510 //if not revived, return 0
setvar LASTRESULT 0x1
return //else return story fossil revived
//---------------
#org 0x16E8A4
checkflag 0x2EC //check if Dome Fossil is revived
if 0x0 goto 0x816E510 //if not revived, return 0
setvar LASTRESULT 0x1
return //else return story fossil revived
//---------------
#org 0x16E510
setvar LASTRESULT 0x0
return
//---------------
#org 0x16E734
setvar 0x4001 0x8A
bufferpokemon 0x0 PKMN_OMANYTE
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_OMANYTE 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2ED
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end
//---------------
#org 0x16E779
setvar 0x4001 0x8C
bufferpokemon 0x0 PKMN_KABUTO
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_KABUTO 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2EC
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end
//---------------
#org 0x16E7BE
setvar 0x4001 0x8E
bufferpokemon 0x0 PKMN_AERODACTYL
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_AERODACTYL 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2EE
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end
//---------------
#org 0x16E5D6
multichoice 0x0 0x0 0x18 0x0 //ask if Helix Fossil or Old Amber
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E644 //if Helix fossil, revive it.
compare 0x8000 0x1
if 0x1 goto 0x816E6C0 //if Old Amber, revive it
compare 0x8000 0x2
if 0x1 goto 0x816E516 //if none, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516 //else end script
end
//---------------
#org 0x16E644
bufferpokemon 0x0 PKMN_OMANYTE
bufferitem 0x1 ITEM_HELIXFOSSIL
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_HELIXFOSSIL 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x1
release
end
//---------------
#org 0x16E60D
multichoice 0x0 0x0 0x19 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E682
compare 0x8000 0x1
if 0x1 goto 0x816E6C0
compare 0x8000 0x2
if 0x1 goto 0x816E516
compare 0x8000 0x7F
if 0x1 goto 0x816E516
end
//---------------
#org 0x16E682
bufferpokemon 0x0 PKMN_KABUTO
bufferitem 0x1 ITEM_DOMEFOSSIL
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_DOMEFOSSIL 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x2
release
end
//---------------
#org 0x16E6C0
bufferpokemon 0x0 PKMN_AERODACTYL
bufferitem 0x1 ITEM_OLDAMBER
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_OLDAMBER 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x3
release
end
//---------------
#org 0x1A9258
textcolor 0x3
msgbox 0x81A5E0D MSG_KEEPOPEN //"There's no more room for POKéMON!\..."
release
end
//---------------
#org 0x16E803
textcolor 0x3
fanfare 0x101
preparemsg 0x819A37A //"[player] received the [buffer1]\nf..."
waitmsg
waitfanfare
setvar 0x406A 0x0
msgbox 0x81A5683 MSG_YESNO //"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E871
call 0x81A8C03
call 0x81A74C7
goto 0x816E871
//---------------
#org 0x16E837
textcolor 0x3
fanfare 0x101
preparemsg 0x819A37A //"[player] received the [buffer1]\nf..."
waitmsg
waitfanfare
setvar 0x406A 0x0
msgbox 0x81A5683 MSG_YESNO //"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E866
call 0x81A8C0F
goto 0x816E866
//---------------
#org 0x16E6FE
msgbox 0x819A4BD MSG_KEEPOPEN //"Aiyah!\nYou come again!"
release
end
//---------------
#org 0x16E871
release
end
//---------------
#org 0x1A8C03
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
return
//---------------
#org 0x1A74C7
fadescreen 0x1
special 0x9E
waitstate
return
//---------------
#org 0x16E866
call 0x81A8C18
goto 0x816E871
//---------------
#org 0x1A8C0F
fadescreen 0x1
special 0x166
waitstate
lock
faceplayer
return
//---------------
#org 0x1A8C18
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call 0x81A8C33
checkflag 0x834
if 0x1 call 0x81A8C5E
return
//---------------
#org 0x1A8C33
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C4C
msgbox 0x81A5CCD MSG_KEEPOPEN //"[buffer2] was transferred to\nSome..."
return
//---------------
#org 0x1A8C5E
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C77
msgbox 0x81A5D0D MSG_KEEPOPEN //"[buffer2] was transferred to\nBILL..."
return
//---------------
#org 0x1A8C4C
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D4A MSG_KEEPOPEN //"BOX ["][buffer3]" on\nSomeone's PC..."
return
//---------------
#org 0x1A8C77
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D8D MSG_KEEPOPEN //"BOX ["][buffer3]" on\nBILL'S PC wa..."
return
//---------
// Strings
//---------
#org 0x19A25E
= Hiya!\pI am important doctor.\nYes, very much so, indeed.\pHere, I study rare POKéMON fossils.\nAll the time, I study.\pYou!\nHave you a fossil for me?
#org 0x19A4BD
= Aiyah!\nYou come again!
#org 0x19A487
= I take a little time!\nYou go for walk a little while!
#org 0x19A2F0
= No!\nIs too bad!
#org 0x19A32B
= You late.\nWhere were you?\pYour fossil is back to life!\nIt was [buffer1] like I think!
#org 0x19A3B0
= Oh!\nThat is [buffer2], it is!\pIt is fossil of [buffer1],\na POKéMON that is already extinct!\pMy Resurrection Machine will make\nthat POKéMON live again!
#org 0x19A439
= So!\nYou hurry and give me that!\p\c\h06Á[player] handed over the\n[buffer2] to the weird doctor.
#org 0x1A5E0D
= There's no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan't accept any more!
#org 0x19A37A
= [player] received the [buffer1]\nfrom the doctor.
#org 0x1A5683
= Do you want to give a nickname to\nthis [buffer1]?
#org 0x1A5CCD
= [buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBOX ["][buffer1]."
#org 0x1A5D0D
= [buffer2] was transferred to\nBILL'S PC.\pIt was placed in \nBOX ["][buffer1]."
#org 0x1A5D4A
= BOX ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."
#org 0x1A5D8D
= BOX ["][buffer3]" on\nBILL'S PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."