-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add A Pokemon Seller In Mauville Game Corner
Make Mauville Game Corner just like Celadon City and have a seller offering Pokemon in exchange for coins
Before making any changes, decide on which Pokemon you want sold (Kanto Starters are used for this example)
Then, decide the price of coins you want the mons to cost
(I entered these just after extern const u8 gText_MudkipDollAndPrice[]; but they can be entered anywhere as long as it before the final line of the file #endif // GUARD_STRINGS_H)
extern const u8 gText_BulbasaurMonAndPrice[];
extern const u8 gText_CharmanderMonAndPrice[];
extern const u8 gText_SquirtleMonAndPrice[];
(I entered these just after gText_MudkipDollAndPrice[] but they can be anywhere in the file)
const u8 gText_BulbasaurMonAndPrice[] = _("BULBASAUR{CLEAR_TO 0x48}9,500 COINS");
const u8 gText_CharmanderMonAndPrice[] = _("CHARMANDER{CLEAR_TO 0x48}9,500 COINS");
const u8 gText_SquirtleMonAndPrice[] = _("SQUIRTLE{CLEAR_TO 0x48}9,500 COINS");
select an unused #define
(I replaced #define MULTI_UNUSED_SSTIDAL_1 89 // replaced by CreateLilycoveSSTidalMultichoice)
replace with
#define MULTI_GAME_CORNER_MON 89 // Previously unused
in section static const struct MultichoiceListStruct sMultichoiceLists[] = (near the bottom of the file)
find the [MULTI_...] you replaced above.
(I replaced [MULTI_UNUSED_SSTIDAL_1] = MULTICHOICE(MultichoiceList_UnusedSSTidal1),)
replace with
[MULTI_GAME_CORNER_MON] = MULTICHOICE(MultichoiceList_Game_Corner_Mon),
search for the MULTICHOICE(MultichoiceList_...) you edited
(I replaced static const struct MenuAction MultichoiceList_UnusedSSTidal1[])
replace the entire part with:
static const struct MenuAction MultichoiceList_Game_Corner_Mon[] =
{
{gText_BulbasaurMonAndPrice},
{gText_CharmanderMonAndPrice},
{gText_SquirtleMonAndPrice},
{gText_Exit},
};
(or in your chosen scripts.inc file)
copy and paste to the end of the file
.set MON_COINS, 9500
GameCorner_EventScript_PrizeCornerMon::
lock
faceplayer
msgbox GameCorner_Text_ExchangeCoinsForMon, MSGBOX_DEFAULT
checkitem ITEM_COIN_CASE
goto_if_eq VAR_RESULT, TRUE, GameCorner_EventScript_ChooseMonMessage
release
end
GameCorner_EventScript_ChooseMonMessage::
message GameCorner_Text_WhichMon
waitmessage
setvar VAR_TEMP_1, 0
showcoinsbox 1, 1
goto GameCorner_EventScript_ChooseMonPrize
EventScript_ChooseMonPrize::
multichoice 12, 0, MULTI_GAME_CORNER_MON, FALSE
switch VAR_RESULT
case 0, GameCorner_EventScript_BuyBulbasaurMon
case 1, GameCorner_EventScript_BuyCharmanderMon
case 2, GameCorner_EventScript_BuySquirtleMon
case 3, GameCorner_EventScript_CancelMonSelect
goto GameCorner_EventScript_CancelMonSelect
end
GameCorner_EventScript_BuyBulbasaurMon::
call GameCorner_EventScript_PreBuyMon
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_BULBASAUR
givemon SPECIES_BULBASAUR 5, ITEM_MIRACLE_SEED
updatecoinsbox 1, 1
playse SE_SHOP
hidecoinsbox 0, 0
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, GameCorner_EventScript_ReceiveBulbasaurParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, GameCorner_EventScript_ReceiveBulbasaurPC
goto GameCorner_EventScript_NoRoomForMon
end
GameCorner_EventScript_BuyCharmanderMon::
call GameCorner_EventScript_PreBuyMon
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_CHARMANDER
givemon SPECIES_CHARMANDER 5, ITEM_CHARCOAL
updatecoinsbox 1, 1
playse SE_SHOP
hidecoinsbox 0, 0
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, GameCorner_EventScript_ReceiveCharmanderParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, GameCorner_EventScript_ReceiveCharmanderPC
goto GameCorner_EventScript_NoRoomForMon
end
GameCorner_EventScript_BuySquirtleMon::
call GameCorner_EventScript_PreBuyMon
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_SQUIRTLE
givemon SPECIES_SQUIRTLE 5, ITEM_MYSTIC_WATER
updatecoinsbox 1, 1
playse SE_SHOP
hidecoinsbox 0, 0
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, GameCorner_EventScript_ReceiveSquirtleParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, GameCorner_EventScript_ReceiveSquirtlePC
goto EventScript_NoRoomForMon
end
GameCorner_EventScript_PreBuyMon:
checkcoins VAR_TEMP_2
goto_if_lt VAR_TEMP_2, MON_COINS, GameCorner_EventScript_NotEnoughCoinsForMon
getpartysize
compare VAR_RESULT, 6
goto_if_eq VAR_RESULT, FALSE, GameCorner_EventScript_NoRoomForMon
removecoins MON_COINS
return
GameCorner_EventScript_ReceiveBulbasaurParty::
call GameCorner_EventScript_ReceivedBulbasaurFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, GameCorner_EventScript_FinishReceivingMon
call Common_EventScript_GetGiftMonPartySlot
call Common_EventScript_NameReceivedPartyMon
goto GameCorner_EventScript_FinishReceivingMon
end
GameCorner_EventScript_ReceiveCharmanderParty::
call GameCorner_EventScript_ReceivedCharmanderFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, GameCorner_EventScript_FinishReceivingMon
call Common_EventScript_GetGiftMonPartySlot
call Common_EventScript_NameReceivedPartyMon
goto GameCorner_EventScript_FinishReceivingMon
end
GameCorner_EventScript_ReceiveSquirtleParty::
call GameCorner_EventScript_ReceivedSquirtleFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, GameCorner_EventScript_FinishReceivingMon
call Common_EventScript_GetGiftMonPartySlot
call Common_EventScript_NameReceivedPartyMon
goto GameCorner_EventScript_FinishReceivingMon
end
GameCorner_EventScript_ReceiveBulbasaurPC::
call GameCorner_EventScript_ReceivedBulbasaurFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, GameCorner_EventScript_TransferMonToPC
call Common_EventScript_NameReceivedBoxMon
goto GameCorner_EventScript_TransferMonToPC
end
GameCorner_EventScript_ReceiveCharmanderPC::
call GameCorner_EventScript_ReceivedCharmanderFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, GameCorner_EventScript_TransferMonToPC
call Common_EventScript_NameReceivedBoxMon
goto GameCorner_EventScript_TransferMonToPC
end
GameCorner_EventScript_ReceiveSquirtlePC::
call GameCorner_EventScript_ReceivedSquirtleFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, GameCorner_EventScript_TransferMonToPC
call Common_EventScript_NameReceivedBoxMon
goto GameCorner_EventScript_TransferMonToPC
end
GameCorner_EventScript_ReceivedBulbasaurFanfare::
bufferspeciesname STR_VAR_2, SPECIES_BULBASAUR
playfanfare MUS_OBTAIN_ITEM
message GameCorner_Text_ReceivedMon
waitmessage
waitfanfare
bufferspeciesname STR_VAR_1, SPECIES_BULBASAUR
return
GameCorner_EventScript_ReceivedCharmanderFanfare::
bufferspeciesname STR_VAR_2, SPECIES_CHARMANDER
playfanfare MUS_OBTAIN_ITEM
message GameCorner_Text_ReceivedMon
waitmessage
waitfanfare
bufferspeciesname STR_VAR_1, SPECIES_CHARMANDER
return
GameCorner_EventScript_ReceivedSquirtleFanfare::
bufferspeciesname STR_VAR_2, SPECIES_SQUIRTLE
playfanfare MUS_OBTAIN_ITEM
message GameCorner_Text_ReceivedMon
waitmessage
waitfanfare
bufferspeciesname STR_VAR_1, SPECIES_SQUIRTLE
return
EventScript_TransferMonToPC::
call Common_EventScript_TransferredToPC
goto GameCorner_EventScript_FinishReceivingMon
end
GameCorner_EventScript_FinishReceivingMon::
msgbox GameCorner_Text_ComeBackSoon, MSGBOX_DEFAULT
release
end
GameCorner_EventScript_NotEnoughCoinsForMon::
msgbox GameCorner_Text_NotEnoughCoinsForMon, MSGBOX_DEFAULT
hidecoinsbox 0, 0
end
GameCorner_EventScript_NoRoomForMon::
msgbox GameCorner_Text_NoRoomForMon, MSGBOX_DEFAULT
hidecoinsbox 0, 0
end
GameCorner_EventScript_CancelMonSelect::
msgbox GameCorner_Text_CancelMonSelect, MSGBOX_DEFAULT
hidecoinsbox 0, 0
release
end
GameCorner_Text_CancelMonSelect:
.string "You don't want one?\p"
.string "No problemo.$"
GameCorner_Text_ExchangeCoinsForMon:
.string "You can exchange your COINS for\n"
.string "POKéMON here.$"
GameCorner_Text_WhichMon:
.string "Which one would you like?$"
GameCorner_Text_NotEnoughCoinsForMon:
.string "You don't have enough coins.\p"
.string "Go win some!$"
GameCorner_Text_NoRoomForMon:
.string "You don't have space left.\n"
.string "Make some room and come see me again!$"
GameCorner_Text_ReceivedMon:
.string "{PLAYER} received {STR_VAR_2}.$"
GameCorner_Text_ComeBackSoon:
.string "Come back again soon!$"
(PsychicM used to differentiate between normal sellers for purpose of this guide.
You can choose any OBJ_EVENT_GFX_* for the NPC
- open
MauvilleCity_GameCornerin Porymap - edit the map if you wish the NPC to appear behind the counter
- add a new NPC and assign it the script
GameCorner_EventScript_PrizeCornerMon - save and compile