Sync event.inc and scrcmd.c

This commit is contained in:
GriffinR
2022-08-09 12:57:49 -04:00
parent d6d5290099
commit acb480f1c1
78 changed files with 1364 additions and 1148 deletions
+691 -486
View File
File diff suppressed because it is too large Load Diff
+17 -17
View File
@@ -73,16 +73,16 @@ gSpecialVars::
.align 2 .align 2
gStdScripts:: gStdScripts::
.4byte Std_ObtainItem .4byte Std_ObtainItem @ STD_OBTAIN_ITEM
.4byte Std_FindItem .4byte Std_FindItem @ STD_FIND_ITEM
.4byte Std_MsgboxNPC .4byte Std_MsgboxNPC @ MSGBOX_NPC
.4byte Std_MsgboxSign .4byte Std_MsgboxSign @ MSGBOX_SIGN
.4byte Std_MsgboxDefault .4byte Std_MsgboxDefault @ MSGBOX_DEFAULT
.4byte Std_MsgboxYesNo .4byte Std_MsgboxYesNo @ MSGBOX_YESNO
.4byte Std_MsgboxAutoclose .4byte Std_MsgboxAutoclose @ MSGBOX_AUTOCLOSE
.4byte Std_ObtainDecoration .4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION
.4byte Std_PutItemAway .4byte Std_PutItemAway @ STD_PUT_ITEM_AWAY
.4byte Std_ReceivedItem .4byte Std_ReceivedItem @ STD_RECEIVED_ITEM
gStdScriptsEnd:: gStdScriptsEnd::
.include "data/maps/BattleColosseum_2P/scripts.inc" .include "data/maps/BattleColosseum_2P/scripts.inc"
@@ -1112,7 +1112,7 @@ EventScript_ChangePokemonNickname::
@ Unused @ Unused
EventScript_HandOverItem:: EventScript_HandOverItem::
getitemname 0, VAR_0x8004 bufferitemname STR_VAR_1, VAR_0x8004
playfanfare MUS_OBTAIN_TMHM playfanfare MUS_OBTAIN_TMHM
message Text_HandedOverItem message Text_HandedOverItem
waitmessage waitmessage
@@ -1264,7 +1264,7 @@ VermilionCity_PokemonCenter_1F_EventScript_ExplainVSSeeker::
.include "data/scripts/white_out.inc" .include "data/scripts/white_out.inc"
Std_PutItemAway:: Std_PutItemAway::
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 bufferitemnameplural STR_VAR_2, VAR_0x8000, VAR_0x8001
checkitemtype VAR_0x8000 checkitemtype VAR_0x8000
call EventScript_BufferPutAwayPocketName call EventScript_BufferPutAwayPocketName
msgbox Text_PutItemAway msgbox Text_PutItemAway
@@ -1280,23 +1280,23 @@ EventScript_BufferPutAwayPocketName::
end end
EventScript_BufferPutAwayPocketItems:: EventScript_BufferPutAwayPocketItems::
getstdstring 2, STDSTRING_ITEMS_POCKET bufferstdstring STR_VAR_3, STDSTRING_ITEMS_POCKET
return return
EventScript_BufferPutAwayPocketKeyItems:: EventScript_BufferPutAwayPocketKeyItems::
getstdstring 2, STDSTRING_KEY_ITEMS_POCKET bufferstdstring STR_VAR_3, STDSTRING_KEY_ITEMS_POCKET
return return
EventScript_BufferPutAwayPocketPokeBalls:: EventScript_BufferPutAwayPocketPokeBalls::
getstdstring 2, STDSTRING_POKEBALLS_POCKET bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS_POCKET
return return
EventScript_BufferPutAwayPocketTMCase:: EventScript_BufferPutAwayPocketTMCase::
getstdstring 2, STDSTRING_TM_CASE bufferstdstring STR_VAR_3, STDSTRING_TM_CASE
return return
EventScript_BufferPutAwayPocketBerryPouch:: EventScript_BufferPutAwayPocketBerryPouch::
getstdstring 2, STDSTRING_BERRY_POUCH bufferstdstring STR_VAR_3, STDSTRING_BERRY_POUCH
return return
.include "data/scripts/seagallop.inc" .include "data/scripts/seagallop.inc"
+3 -3
View File
@@ -71,9 +71,9 @@ BirthIsland_Exterior_EventScript_NotSolved3::
BirthIsland_Exterior_EventScript_Deoxys:: BirthIsland_Exterior_EventScript_Deoxys::
addobject LOCALID_DEOXYS addobject LOCALID_DEOXYS
waitse waitse
setfieldeffectarg 0, LOCALID_DEOXYS_ROCK setfieldeffectargument 0, LOCALID_DEOXYS_ROCK
setfieldeffectarg 1, 56 setfieldeffectargument 1, 56
setfieldeffectarg 2, 2 setfieldeffectargument 2, 2
dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK
playbgm MUS_ENCOUNTER_DEOXYS, 0 playbgm MUS_ENCOUNTER_DEOXYS, 0
waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK
@@ -27,7 +27,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveeParty::
message CeladonCity_Condominiums_RoofRoom_Text_ObtainedAnEevee message CeladonCity_Condominiums_RoofRoom_Text_ObtainedAnEevee
waitmessage waitmessage
waitfanfare waitfanfare
getspeciesname 0, SPECIES_EEVEE bufferspeciesname STR_VAR_1, SPECIES_EEVEE
msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_SetGotEevee goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_SetGotEevee
@@ -42,7 +42,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveePC::
message CeladonCity_Condominiums_RoofRoom_Text_ObtainedAnEevee message CeladonCity_Condominiums_RoofRoom_Text_ObtainedAnEevee
waitmessage waitmessage
waitfanfare waitfanfare
getspeciesname 0, SPECIES_EEVEE bufferspeciesname STR_VAR_1, SPECIES_EEVEE
msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_TransferEeveeToPC goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_TransferEeveeToPC
@@ -141,8 +141,8 @@ CeladonCity_DepartmentStore_Roof_EventScript_GiveLemonade::
end end
CeladonCity_DepartmentStore_Roof_EventScript_GiveDrink:: CeladonCity_DepartmentStore_Roof_EventScript_GiveDrink::
getitemname 0, VAR_0x8008 bufferitemname STR_VAR_1, VAR_0x8008
getitemname 1, VAR_0x8009 bufferitemname STR_VAR_2, VAR_0x8009
removeitem VAR_0x8008, 1 removeitem VAR_0x8008, 1
checkitemspace VAR_0x8009, 1 checkitemspace VAR_0x8009, 1
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
@@ -267,8 +267,8 @@ CeladonCity_DepartmentStore_Roof_EventScript_TryBuyDrink::
call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneySodaPop call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneySodaPop
compare VAR_TEMP_1, 2 compare VAR_TEMP_1, 2
call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyLemonade call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyLemonade
updatemoneybox 0, 0, 0 updatemoneybox
getitemname 0, VAR_TEMP_0 bufferitemname STR_VAR_1, VAR_TEMP_0
playse SE_VEND playse SE_VEND
msgbox CeladonCity_DepartmentStore_Roof_Text_DrinkCanPoppedOut msgbox CeladonCity_DepartmentStore_Roof_Text_DrinkCanPoppedOut
additem VAR_TEMP_0 additem VAR_TEMP_0
@@ -292,6 +292,6 @@ CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForDrink::
end end
CeladonCity_DepartmentStore_Roof_EventScript_ExitVendingMachine:: CeladonCity_DepartmentStore_Roof_EventScript_ExitVendingMachine::
hidemoneybox 0, 0 hidemoneybox
releaseall releaseall
end end
+5 -5
View File
@@ -70,7 +70,7 @@ CeladonCity_GameCorner_EventScript_Buy50Coins::
end end
CeladonCity_GameCorner_EventScript_BoughtCoins:: CeladonCity_GameCorner_EventScript_BoughtCoins::
updatemoneybox 0, 0, 0 updatemoneybox
updatecoinsbox 0, 5 updatecoinsbox 0, 5
playse SE_SHOP playse SE_SHOP
msgbox CeladonCity_GameCorner_Text_HereAreYourCoins msgbox CeladonCity_GameCorner_Text_HereAreYourCoins
@@ -78,7 +78,7 @@ CeladonCity_GameCorner_EventScript_BoughtCoins::
end end
CeladonCity_GameCorner_EventScript_ClerkEnd:: CeladonCity_GameCorner_EventScript_ClerkEnd::
hidemoneybox 0, 0 hidemoneybox
hidecoinsbox 0, 5 hidecoinsbox 0, 5
release release
end end
@@ -256,9 +256,9 @@ CeladonCity_GameCorner_EventScript_SlotMachine::
msgbox CeladonCity_GameCorner_Text_SlotMachineWantToPlay, MSGBOX_YESNO msgbox CeladonCity_GameCorner_Text_SlotMachineWantToPlay, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CeladonCity_GameCorner_EventScript_DontPlaySlotMachine goto_if_eq CeladonCity_GameCorner_EventScript_DontPlaySlotMachine
setfieldeffectarg 0, 255 setfieldeffectargument 0, 255
setfieldeffectarg 1, 10 setfieldeffectargument 1, 10
setfieldeffectarg 2, 14 setfieldeffectargument 2, 14
dofieldeffect FLDEFF_SMILEY_FACE_ICON dofieldeffect FLDEFF_SMILEY_FACE_ICON
waitfieldeffect FLDEFF_SMILEY_FACE_ICON waitfieldeffect FLDEFF_SMILEY_FACE_ICON
specialvar VAR_RESULT, GetRandomSlotMachineId specialvar VAR_RESULT, GetRandomSlotMachineId
@@ -104,7 +104,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_Porygon::
end end
CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeMon:: CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeMon::
getspeciesname 0, VAR_TEMP_1 bufferspeciesname STR_VAR_1, VAR_TEMP_1
msgbox CeladonCity_GameCorner_PrizeRoom_Text_YouWantPrize, MSGBOX_YESNO msgbox CeladonCity_GameCorner_PrizeRoom_Text_YouWantPrize, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange
@@ -213,7 +213,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins::
CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty:: CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty::
removecoins VAR_TEMP_2 removecoins VAR_TEMP_2
updatecoinsbox 0, 5 updatecoinsbox 0, 5
getspeciesname 0, VAR_TEMP_1 bufferspeciesname STR_VAR_1, VAR_TEMP_1
playfanfare MUS_LEVEL_UP playfanfare MUS_LEVEL_UP
message Text_PlayerObtainedTheMon message Text_PlayerObtainedTheMon
waitmessage waitmessage
@@ -227,7 +227,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty::
CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonPC:: CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonPC::
removecoins VAR_TEMP_2 removecoins VAR_TEMP_2
updatecoinsbox 0, 5 updatecoinsbox 0, 5
getspeciesname 0, VAR_TEMP_1 bufferspeciesname STR_VAR_1, VAR_TEMP_1
playfanfare MUS_LEVEL_UP playfanfare MUS_LEVEL_UP
message Text_PlayerObtainedTheMon message Text_PlayerObtainedTheMon
waitmessage waitmessage
@@ -271,35 +271,35 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ChoosePrizeTM::
CeladonCity_GameCorner_PrizeRoom_EventScript_TM13:: CeladonCity_GameCorner_PrizeRoom_EventScript_TM13::
setvar VAR_TEMP_1, ITEM_TM13 setvar VAR_TEMP_1, ITEM_TM13
setvar VAR_TEMP_2, 4000 setvar VAR_TEMP_2, 4000
getmovename 1, MOVE_ICE_BEAM buffermovename STR_VAR_2, MOVE_ICE_BEAM
goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM
end end
CeladonCity_GameCorner_PrizeRoom_EventScript_TM23:: CeladonCity_GameCorner_PrizeRoom_EventScript_TM23::
setvar VAR_TEMP_1, ITEM_TM23 setvar VAR_TEMP_1, ITEM_TM23
setvar VAR_TEMP_2, 3500 setvar VAR_TEMP_2, 3500
getmovename 1, MOVE_IRON_TAIL buffermovename STR_VAR_2, MOVE_IRON_TAIL
goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM
end end
CeladonCity_GameCorner_PrizeRoom_EventScript_TM24:: CeladonCity_GameCorner_PrizeRoom_EventScript_TM24::
setvar VAR_TEMP_1, ITEM_TM24 setvar VAR_TEMP_1, ITEM_TM24
setvar VAR_TEMP_2, 4000 setvar VAR_TEMP_2, 4000
getmovename 1, MOVE_THUNDERBOLT buffermovename STR_VAR_2, MOVE_THUNDERBOLT
goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM
end end
CeladonCity_GameCorner_PrizeRoom_EventScript_TM30:: CeladonCity_GameCorner_PrizeRoom_EventScript_TM30::
setvar VAR_TEMP_1, ITEM_TM30 setvar VAR_TEMP_1, ITEM_TM30
setvar VAR_TEMP_2, 4500 setvar VAR_TEMP_2, 4500
getmovename 1, MOVE_SHADOW_BALL buffermovename STR_VAR_2, MOVE_SHADOW_BALL
goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM
end end
CeladonCity_GameCorner_PrizeRoom_EventScript_TM35:: CeladonCity_GameCorner_PrizeRoom_EventScript_TM35::
setvar VAR_TEMP_1, ITEM_TM35 setvar VAR_TEMP_1, ITEM_TM35
setvar VAR_TEMP_2, 4000 setvar VAR_TEMP_2, 4000
getmovename 1, MOVE_FLAMETHROWER buffermovename STR_VAR_2, MOVE_FLAMETHROWER
goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM
end end
@@ -311,7 +311,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM::
end end
CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeItem:: CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeItem::
getitemname 0, VAR_TEMP_1 bufferitemname STR_VAR_1, VAR_TEMP_1
msgbox CeladonCity_GameCorner_PrizeRoom_Text_YouWantPrize, MSGBOX_YESNO msgbox CeladonCity_GameCorner_PrizeRoom_Text_YouWantPrize, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange
@@ -319,7 +319,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeItem::
end end
CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize:: CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize::
getitemname 0, VAR_TEMP_1 bufferitemname STR_VAR_1, VAR_TEMP_1
checkcoins VAR_RESULT checkcoins VAR_RESULT
compare VAR_RESULT, VAR_TEMP_2 compare VAR_RESULT, VAR_TEMP_2
goto_if_lt CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins goto_if_lt CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins
+1 -1
View File
@@ -24,7 +24,7 @@ CeruleanCity_BikeShop_EventScript_TryPurchaseBicycle::
CeruleanCity_BikeShop_EventScript_ClerkGoodbye:: CeruleanCity_BikeShop_EventScript_ClerkGoodbye::
msgbox CeruleanCity_BikeShop_Text_ThankYouComeAgain msgbox CeruleanCity_BikeShop_Text_ThankYouComeAgain
hidemoneybox 0, 0 hidemoneybox
release release
end end
+1 -1
View File
@@ -32,7 +32,7 @@ CeruleanCity_House3_EventScript_DeclineTrade::
end end
CeruleanCity_House3_EventScript_NotRequestedMon:: CeruleanCity_House3_EventScript_NotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_ThisIsntMon msgbox Trade_Text_ThisIsntMon
release release
end end
+11 -11
View File
@@ -57,77 +57,77 @@ CeruleanCity_House5_EventScript_ChooseExchangeItem::
end end
CeruleanCity_House5_EventScript_EnergyPowder:: CeruleanCity_House5_EventScript_EnergyPowder::
getitemname 0, ITEM_ENERGY_POWDER bufferitemname STR_VAR_1, ITEM_ENERGY_POWDER
setvar VAR_0x8008, ITEM_ENERGY_POWDER setvar VAR_0x8008, ITEM_ENERGY_POWDER
setvar VAR_0x8009, 50 setvar VAR_0x8009, 50
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_EnergyRoot:: CeruleanCity_House5_EventScript_EnergyRoot::
getitemname 0, ITEM_ENERGY_ROOT bufferitemname STR_VAR_1, ITEM_ENERGY_ROOT
setvar VAR_0x8008, ITEM_ENERGY_ROOT setvar VAR_0x8008, ITEM_ENERGY_ROOT
setvar VAR_0x8009, 80 setvar VAR_0x8009, 80
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_HealPowder:: CeruleanCity_House5_EventScript_HealPowder::
getitemname 0, ITEM_HEAL_POWDER bufferitemname STR_VAR_1, ITEM_HEAL_POWDER
setvar VAR_0x8008, ITEM_HEAL_POWDER setvar VAR_0x8008, ITEM_HEAL_POWDER
setvar VAR_0x8009, 50 setvar VAR_0x8009, 50
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_RevivalHerb:: CeruleanCity_House5_EventScript_RevivalHerb::
getitemname 0, ITEM_REVIVAL_HERB bufferitemname STR_VAR_1, ITEM_REVIVAL_HERB
setvar VAR_0x8008, ITEM_REVIVAL_HERB setvar VAR_0x8008, ITEM_REVIVAL_HERB
setvar VAR_0x8009, 300 setvar VAR_0x8009, 300
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_Protein:: CeruleanCity_House5_EventScript_Protein::
getitemname 0, ITEM_PROTEIN bufferitemname STR_VAR_1, ITEM_PROTEIN
setvar VAR_0x8008, ITEM_PROTEIN setvar VAR_0x8008, ITEM_PROTEIN
setvar VAR_0x8009, 1000 setvar VAR_0x8009, 1000
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_Iron:: CeruleanCity_House5_EventScript_Iron::
getitemname 0, ITEM_IRON bufferitemname STR_VAR_1, ITEM_IRON
setvar VAR_0x8008, ITEM_IRON setvar VAR_0x8008, ITEM_IRON
setvar VAR_0x8009, 1000 setvar VAR_0x8009, 1000
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_Carbos:: CeruleanCity_House5_EventScript_Carbos::
getitemname 0, ITEM_CARBOS bufferitemname STR_VAR_1, ITEM_CARBOS
setvar VAR_0x8008, ITEM_CARBOS setvar VAR_0x8008, ITEM_CARBOS
setvar VAR_0x8009, 1000 setvar VAR_0x8009, 1000
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_Calcium:: CeruleanCity_House5_EventScript_Calcium::
getitemname 0, ITEM_CALCIUM bufferitemname STR_VAR_1, ITEM_CALCIUM
setvar VAR_0x8008, ITEM_CALCIUM setvar VAR_0x8008, ITEM_CALCIUM
setvar VAR_0x8009, 1000 setvar VAR_0x8009, 1000
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_Zinc:: CeruleanCity_House5_EventScript_Zinc::
getitemname 0, ITEM_ZINC bufferitemname STR_VAR_1, ITEM_ZINC
setvar VAR_0x8008, ITEM_ZINC setvar VAR_0x8008, ITEM_ZINC
setvar VAR_0x8009, 1000 setvar VAR_0x8009, 1000
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_HPUp:: CeruleanCity_House5_EventScript_HPUp::
getitemname 0, ITEM_HP_UP bufferitemname STR_VAR_1, ITEM_HP_UP
setvar VAR_0x8008, ITEM_HP_UP setvar VAR_0x8008, ITEM_HP_UP
setvar VAR_0x8009, 1000 setvar VAR_0x8009, 1000
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
end end
CeruleanCity_House5_EventScript_PPUp:: CeruleanCity_House5_EventScript_PPUp::
getitemname 0, ITEM_PP_UP bufferitemname STR_VAR_1, ITEM_PP_UP
setvar VAR_0x8008, ITEM_PP_UP setvar VAR_0x8008, ITEM_PP_UP
setvar VAR_0x8009, 3000 setvar VAR_0x8009, 3000
goto CeruleanCity_House5_EventScript_ExchangePowderForItem goto CeruleanCity_House5_EventScript_ExchangePowderForItem
@@ -32,7 +32,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineTrade::
end end
CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NotRequestedMon:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_WhatThatsNoMon msgbox Trade_Text_WhatThatsNoMon
release release
end end
@@ -148,8 +148,8 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilDomeAmber::
end end
CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil::
getspeciesname 0, SPECIES_OMANYTE bufferspeciesname STR_VAR_1, SPECIES_OMANYTE
getitemname 1, ITEM_HELIX_FOSSIL bufferitemname STR_VAR_2, ITEM_HELIX_FOSSIL
msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil
@@ -163,8 +163,8 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil::
end end
CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil::
getspeciesname 0, SPECIES_KABUTO bufferspeciesname STR_VAR_1, SPECIES_KABUTO
getitemname 1, ITEM_DOME_FOSSIL bufferitemname STR_VAR_2, ITEM_DOME_FOSSIL
msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil
@@ -178,8 +178,8 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil::
end end
CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowOldAmber:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowOldAmber::
getspeciesname 0, SPECIES_AERODACTYL bufferspeciesname STR_VAR_1, SPECIES_AERODACTYL
getitemname 1, ITEM_OLD_AMBER bufferitemname STR_VAR_2, ITEM_OLD_AMBER
msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil
@@ -213,7 +213,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveRevivedMon::
CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte::
setvar VAR_TEMP_1, SPECIES_OMANYTE setvar VAR_TEMP_1, SPECIES_OMANYTE
getspeciesname 0, SPECIES_OMANYTE bufferspeciesname STR_VAR_1, SPECIES_OMANYTE
msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife
givemon SPECIES_OMANYTE, 5, ITEM_NONE givemon SPECIES_OMANYTE, 5, ITEM_NONE
compare VAR_RESULT, 2 compare VAR_RESULT, 2
@@ -227,7 +227,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte::
CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto::
setvar VAR_TEMP_1, SPECIES_KABUTO setvar VAR_TEMP_1, SPECIES_KABUTO
getspeciesname 0, SPECIES_KABUTO bufferspeciesname STR_VAR_1, SPECIES_KABUTO
msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife
givemon SPECIES_KABUTO, 5, ITEM_NONE givemon SPECIES_KABUTO, 5, ITEM_NONE
compare VAR_RESULT, 2 compare VAR_RESULT, 2
@@ -241,7 +241,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto::
CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl::
setvar VAR_TEMP_1, SPECIES_AERODACTYL setvar VAR_TEMP_1, SPECIES_AERODACTYL
getspeciesname 0, SPECIES_AERODACTYL bufferspeciesname STR_VAR_1, SPECIES_AERODACTYL
msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife
givemon SPECIES_AERODACTYL, 5, ITEM_NONE givemon SPECIES_AERODACTYL, 5, ITEM_NONE
compare VAR_RESULT, 2 compare VAR_RESULT, 2
@@ -32,7 +32,7 @@ CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonDeclineTrade::
end end
CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonNotRequestedMon:: CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonNotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_ThisIsntMon msgbox Trade_Text_ThisIsntMon
release release
end end
@@ -79,7 +79,7 @@ CinnabarIsland_PokemonLab_Lounge_EventScript_NormaDeclineTrade::
end end
CinnabarIsland_PokemonLab_Lounge_EventScript_NormaNotRequestedMon:: CinnabarIsland_PokemonLab_Lounge_EventScript_NormaNotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_ThisIsNoMon msgbox Trade_Text_ThisIsNoMon
release release
end end
@@ -62,7 +62,7 @@ FiveIsland_ResortGorgeous_House_EventScript_ShowRequestedMon::
call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerEast call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerEast
compare VAR_FACING, DIR_WEST compare VAR_FACING, DIR_WEST
call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerWest call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerWest
moveobjectoffscreen LOCALID_BUTLER copyobjectxytoperm LOCALID_BUTLER
msgbox FiveIsland_ResortGorgeous_House_Text_ButlerPleaseAcceptThisAsHerThanks msgbox FiveIsland_ResortGorgeous_House_Text_ButlerPleaseAcceptThisAsHerThanks
giveitem VAR_RESORT_GORGEOUS_REWARD giveitem VAR_RESORT_GORGEOUS_REWARD
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
@@ -45,12 +45,12 @@ FiveIsland_WaterLabyrinth_EventScript_TryGiveEgg::
@ If the player has a Togepi/Togetic from this game (assumed to be the one the man gave you) then comment on it @ If the player has a Togepi/Togetic from this game (assumed to be the one the man gave you) then comment on it
@ Otherwise make normal comment @ Otherwise make normal comment
FiveIsland_WaterLabyrinth_EventScript_PostEggComment:: FiveIsland_WaterLabyrinth_EventScript_PostEggComment::
getspeciesname 1, SPECIES_TOGEPI bufferspeciesname STR_VAR_2, SPECIES_TOGEPI
setvar VAR_0x8004, SPECIES_TOGEPI setvar VAR_0x8004, SPECIES_TOGEPI
specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq FiveIsland_WaterLabyrinth_EventScript_MonDaisyComment goto_if_eq FiveIsland_WaterLabyrinth_EventScript_MonDaisyComment
getspeciesname 1, SPECIES_TOGETIC bufferspeciesname STR_VAR_2, SPECIES_TOGETIC
setvar VAR_0x8004, SPECIES_TOGETIC setvar VAR_0x8004, SPECIES_TOGETIC
specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
+14 -14
View File
@@ -72,9 +72,9 @@ FuchsiaCity_EventScript_ChanseySign::
lockall lockall
setvar VAR_0x8004, SPECIES_CHANSEY setvar VAR_0x8004, SPECIES_CHANSEY
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_CHANSEY, 10, 3 showmonpic SPECIES_CHANSEY, 10, 3
msgbox FuchsiaCity_Text_ChanseySign msgbox FuchsiaCity_Text_ChanseySign
erasemonpic hidemonpic
releaseall releaseall
end end
@@ -82,9 +82,9 @@ FuchsiaCity_EventScript_VoltorbSign::
lockall lockall
setvar VAR_0x8004, SPECIES_VOLTORB setvar VAR_0x8004, SPECIES_VOLTORB
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_VOLTORB, 10, 3 showmonpic SPECIES_VOLTORB, 10, 3
msgbox FuchsiaCity_Text_VoltorbSign msgbox FuchsiaCity_Text_VoltorbSign
erasemonpic hidemonpic
releaseall releaseall
end end
@@ -92,9 +92,9 @@ FuchsiaCity_EventScript_KangaskhanSign::
lockall lockall
setvar VAR_0x8004, SPECIES_KANGASKHAN setvar VAR_0x8004, SPECIES_KANGASKHAN
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_KANGASKHAN, 10, 3 showmonpic SPECIES_KANGASKHAN, 10, 3
msgbox FuchsiaCity_Text_KangaskhanSign msgbox FuchsiaCity_Text_KangaskhanSign
erasemonpic hidemonpic
releaseall releaseall
end end
@@ -102,9 +102,9 @@ FuchsiaCity_EventScript_SlowpokeSign::
lockall lockall
setvar VAR_0x8004, SPECIES_SLOWPOKE setvar VAR_0x8004, SPECIES_SLOWPOKE
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_SLOWPOKE, 10, 3 showmonpic SPECIES_SLOWPOKE, 10, 3
msgbox FuchsiaCity_Text_SlowpokeSign msgbox FuchsiaCity_Text_SlowpokeSign
erasemonpic hidemonpic
releaseall releaseall
end end
@@ -112,9 +112,9 @@ FuchsiaCity_EventScript_LaprasSign::
lockall lockall
setvar VAR_0x8004, SPECIES_LAPRAS setvar VAR_0x8004, SPECIES_LAPRAS
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_LAPRAS, 10, 3 showmonpic SPECIES_LAPRAS, 10, 3
msgbox FuchsiaCity_Text_LaprasSign msgbox FuchsiaCity_Text_LaprasSign
erasemonpic hidemonpic
releaseall releaseall
end end
@@ -123,17 +123,17 @@ FuchsiaCity_EventScript_FossilMonSign::
goto_if_set FLAG_GOT_DOME_FOSSIL, FuchsiaCity_EventScript_OmanyteSign goto_if_set FLAG_GOT_DOME_FOSSIL, FuchsiaCity_EventScript_OmanyteSign
setvar VAR_0x8004, SPECIES_KABUTO setvar VAR_0x8004, SPECIES_KABUTO
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_KABUTO, 10, 3 showmonpic SPECIES_KABUTO, 10, 3
msgbox FuchsiaCity_Text_KabutoSign msgbox FuchsiaCity_Text_KabutoSign
erasemonpic hidemonpic
releaseall releaseall
end end
FuchsiaCity_EventScript_OmanyteSign:: FuchsiaCity_EventScript_OmanyteSign::
setvar VAR_0x8004, SPECIES_OMANYTE setvar VAR_0x8004, SPECIES_OMANYTE
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_OMANYTE, 10, 3 showmonpic SPECIES_OMANYTE, 10, 3
msgbox FuchsiaCity_Text_OmanyteSign msgbox FuchsiaCity_Text_OmanyteSign
erasemonpic hidemonpic
releaseall releaseall
end end
@@ -117,7 +117,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone::
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney
removemoney 500, 0 removemoney 500, 0
updatemoneybox 0, 0, 0 updatemoneybox
msgbox FuchsiaCity_SafariZone_Entrance_Text_ThatllBe500WeOnlyUseSpecialBalls msgbox FuchsiaCity_SafariZone_Entrance_Text_ThatllBe500WeOnlyUseSpecialBalls
textcolor 3 textcolor 3
playfanfare MUS_LEVEL_UP playfanfare MUS_LEVEL_UP
@@ -126,7 +126,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone::
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
msgbox FuchsiaCity_SafariZone_Entrance_Text_CallYouOnPAWhenYouRunOut msgbox FuchsiaCity_SafariZone_Entrance_Text_CallYouOnPAWhenYouRunOut
closemessage closemessage
hidemoneybox 0, 0 hidemoneybox
compare VAR_TEMP_2, 0 compare VAR_TEMP_2, 0
call_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneMid call_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneMid
compare VAR_TEMP_2, 1 compare VAR_TEMP_2, 1
@@ -172,7 +172,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney::
FuchsiaCity_SafariZone_Entrance_EventScript_ForcePlayerBack:: FuchsiaCity_SafariZone_Entrance_EventScript_ForcePlayerBack::
closemessage closemessage
hidemoneybox 0, 0 hidemoneybox
applymovement OBJ_EVENT_ID_PLAYER, FuchsiaCity_SafariZone_Entrance_Movement_ForceBack applymovement OBJ_EVENT_ID_PLAYER, FuchsiaCity_SafariZone_Entrance_Movement_ForceBack
waitmovement 0 waitmovement 0
releaseall releaseall
+2 -2
View File
@@ -67,7 +67,7 @@ MtMoon_B2F_EventScript_DomeFossil::
delay 10 delay 10
applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToHelixFossil applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToHelixFossil
waitmovement 0 waitmovement 0
moveobjectoffscreen LOCALID_MIGUEL copyobjectxytoperm LOCALID_MIGUEL
textcolor 0 textcolor 0
playfanfare MUS_OBTAIN_KEY_ITEM playfanfare MUS_OBTAIN_KEY_ITEM
message MtMoon_B2F_Text_ThenThisFossilIsMine message MtMoon_B2F_Text_ThenThisFossilIsMine
@@ -99,7 +99,7 @@ MtMoon_B2F_EventScript_HelixFossil::
delay 10 delay 10
applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToDomeFossil applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToDomeFossil
waitmovement 0 waitmovement 0
moveobjectoffscreen LOCALID_MIGUEL copyobjectxytoperm LOCALID_MIGUEL
textcolor 0 textcolor 0
playfanfare MUS_OBTAIN_KEY_ITEM playfanfare MUS_OBTAIN_KEY_ITEM
message MtMoon_B2F_Text_ThenThisFossilIsMine message MtMoon_B2F_Text_ThenThisFossilIsMine
+3 -3
View File
@@ -59,8 +59,8 @@ PalletTown_EventScript_OakRatingScene::
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006 copyvar VAR_0x8009, VAR_0x8006
getnumberstring 0, VAR_0x8008 buffernumberstring STR_VAR_1, VAR_0x8008
getnumberstring 1, VAR_0x8009 buffernumberstring STR_VAR_2, VAR_0x8009
compare VAR_0x8009, 60 compare VAR_0x8009, 60
goto_if_lt PalletTown_EventScript_NotEnoughMonsForNationalDex goto_if_lt PalletTown_EventScript_NotEnoughMonsForNationalDex
msgbox PalletTown_Text_CaughtXImpressiveFollowMe msgbox PalletTown_Text_CaughtXImpressiveFollowMe
@@ -356,7 +356,7 @@ PalletTown_EventScript_SignLady::
call_if_eq PalletTown_EventScript_SignLadyMoveOutOfWayRight call_if_eq PalletTown_EventScript_SignLadyMoveOutOfWayRight
compare VAR_FACING, DIR_EAST compare VAR_FACING, DIR_EAST
call_if_ne PalletTown_EventScript_SignLadyMoveOutOfWayLeft call_if_ne PalletTown_EventScript_SignLadyMoveOutOfWayLeft
moveobjectoffscreen 1 copyobjectxytoperm LOCALID_SIGN_LADY
setflag FLAG_TEMP_2 setflag FLAG_TEMP_2
release release
end end
@@ -852,8 +852,8 @@ PalletTown_ProfessorOaksLab_EventScript_RatePokedexOrTryGiveBalls::
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006 copyvar VAR_0x8009, VAR_0x8006
getnumberstring 0, VAR_0x8008 buffernumberstring STR_VAR_1, VAR_0x8008
getnumberstring 1, VAR_0x8009 buffernumberstring STR_VAR_2, VAR_0x8009
compare VAR_0x8009, 1 @ Player only has starter compare VAR_0x8009, 1 @ Player only has starter
goto_if_eq PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls goto_if_eq PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls
goto PalletTown_ProfessorOaksLab_EventScript_RatePokedex goto PalletTown_ProfessorOaksLab_EventScript_RatePokedex
@@ -1169,7 +1169,7 @@ PalletTown_ProfessorOaksLab_EventScript_BulbasaurBall::
PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice:: PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice::
applymovement LOCALID_PROF_OAK, Movement_FaceRight applymovement LOCALID_PROF_OAK, Movement_FaceRight
waitmovement 0 waitmovement 0
drawmonpic PLAYER_STARTER_SPECIES, 10, 3 showmonpic PLAYER_STARTER_SPECIES, 10, 3
textcolor 0 textcolor 0
compare PLAYER_STARTER_NUM, 0 compare PLAYER_STARTER_NUM, 0
goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmBulbasaur goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmBulbasaur
@@ -1204,12 +1204,12 @@ PalletTown_ProfessorOaksLab_EventScript_ConfirmCharmander::
end end
PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter:: PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter::
erasemonpic hidemonpic
release release
end end
PalletTown_ProfessorOaksLab_EventScript_ChoseStarter:: PalletTown_ProfessorOaksLab_EventScript_ChoseStarter::
erasemonpic hidemonpic
removeobject VAR_LAST_TALKED removeobject VAR_LAST_TALKED
msgbox PalletTown_ProfessorOaksLab_Text_OakThisMonIsEnergetic msgbox PalletTown_ProfessorOaksLab_Text_OakThisMonIsEnergetic
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
@@ -1217,7 +1217,7 @@ PalletTown_ProfessorOaksLab_EventScript_ChoseStarter::
setflag FLAG_PALLET_LADY_NOT_BLOCKING_SIGN setflag FLAG_PALLET_LADY_NOT_BLOCKING_SIGN
givemon PLAYER_STARTER_SPECIES, 5, ITEM_NONE givemon PLAYER_STARTER_SPECIES, 5, ITEM_NONE
copyvar VAR_STARTER_MON, PLAYER_STARTER_NUM copyvar VAR_STARTER_MON, PLAYER_STARTER_NUM
getspeciesname 0, PLAYER_STARTER_SPECIES bufferspeciesname STR_VAR_1, PLAYER_STARTER_SPECIES
message PalletTown_ProfessorOaksLab_Text_ReceivedMonFromOak message PalletTown_ProfessorOaksLab_Text_ReceivedMonFromOak
waitmessage waitmessage
playfanfare MUS_OBTAIN_KEY_ITEM playfanfare MUS_OBTAIN_KEY_ITEM
@@ -1268,7 +1268,7 @@ PalletTown_ProfessorOaksLab_EventScript_RivalTakesStarter::
msgbox PalletTown_ProfessorOaksLab_Text_RivalIllTakeThisOneThen msgbox PalletTown_ProfessorOaksLab_Text_RivalIllTakeThisOneThen
removeobject RIVAL_STARTER_ID removeobject RIVAL_STARTER_ID
textcolor 3 textcolor 3
getspeciesname 0, RIVAL_STARTER_SPECIES bufferspeciesname STR_VAR_1, RIVAL_STARTER_SPECIES
message PalletTown_ProfessorOaksLab_Text_RivalReceivedMonFromOak message PalletTown_ProfessorOaksLab_Text_RivalReceivedMonFromOak
waitmessage waitmessage
playfanfare MUS_OBTAIN_KEY_ITEM playfanfare MUS_OBTAIN_KEY_ITEM
+4 -4
View File
@@ -71,7 +71,7 @@ PewterCity_Museum_1F_EventScript_EntranceTrigger::
goto_if_eq PewterCity_Museum_1F_EventScript_TryPayForTicket goto_if_eq PewterCity_Museum_1F_EventScript_TryPayForTicket
msgbox PewterCity_Museum_1F_Text_ComeAgain msgbox PewterCity_Museum_1F_Text_ComeAgain
closemessage closemessage
hidemoneybox 0, 0 hidemoneybox
applymovement OBJ_EVENT_ID_PLAYER, PewterCity_Museum_1F_Movement_ForcePlayerExit applymovement OBJ_EVENT_ID_PLAYER, PewterCity_Museum_1F_Movement_ForcePlayerExit
waitmovement 0 waitmovement 0
releaseall releaseall
@@ -90,11 +90,11 @@ PewterCity_Museum_1F_EventScript_TryPayForTicket::
call_if_eq PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight call_if_eq PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight
playse SE_SHOP playse SE_SHOP
removemoney 50, 0 removemoney 50, 0
updatemoneybox 0, 0, 0 updatemoneybox
waitse waitse
msgbox PewterCity_Museum_1F_Text_Right50YThankYou msgbox PewterCity_Museum_1F_Text_Right50YThankYou
setvar VAR_MAP_SCENE_PEWTER_CITY_MUSEUM_1F, 1 setvar VAR_MAP_SCENE_PEWTER_CITY_MUSEUM_1F, 1
hidemoneybox 0, 0 hidemoneybox
releaseall releaseall
end end
@@ -116,7 +116,7 @@ PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight::
PewterCity_Museum_1F_EventScript_NotEnoughMoney:: PewterCity_Museum_1F_EventScript_NotEnoughMoney::
msgbox PewterCity_Museum_1F_Text_DontHaveEnoughMoney msgbox PewterCity_Museum_1F_Text_DontHaveEnoughMoney
closemessage closemessage
hidemoneybox 0, 0 hidemoneybox
applymovement OBJ_EVENT_ID_PLAYER, PewterCity_Museum_1F_Movement_ForcePlayerExit applymovement OBJ_EVENT_ID_PLAYER, PewterCity_Museum_1F_Movement_ForcePlayerExit
waitmovement 0 waitmovement 0
releaseall releaseall
@@ -79,7 +79,7 @@ PokemonLeague_ChampionsRoom_EventScript_EnterRoom::
waitmovement 0 waitmovement 0
delay 25 delay 25
specialvar VAR_RESULT, GetStarterSpecies specialvar VAR_RESULT, GetStarterSpecies
getspeciesname 0, VAR_RESULT bufferspeciesname STR_VAR_1, VAR_RESULT
msgbox PokemonLeague_ChampionsRoom_Text_OakCongratulations msgbox PokemonLeague_ChampionsRoom_Text_OakCongratulations
applymovement LOCALID_PROF_OAK, Movement_WalkInPlaceFastestRight applymovement LOCALID_PROF_OAK, Movement_WalkInPlaceFastestRight
applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestLeft applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestLeft
+1 -1
View File
@@ -10,7 +10,7 @@ Route1_EventScript_MartClerk::
checkitemspace ITEM_POTION, 1 checkitemspace ITEM_POTION, 1
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq EventScript_BagIsFull goto_if_eq EventScript_BagIsFull
getitemname 1, ITEM_POTION bufferitemname STR_VAR_2, ITEM_POTION
playfanfare MUS_LEVEL_UP playfanfare MUS_LEVEL_UP
message Text_ObtainedTheX message Text_ObtainedTheX
waitmessage waitmessage
@@ -39,7 +39,7 @@ Route10_PokemonCenter_1F_EventScript_Aide::
goto_if_eq Aide_EventScript_DeclineCheckMons goto_if_eq Aide_EventScript_DeclineCheckMons
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
getnumberstring 2, VAR_0x8006 buffernumberstring STR_VAR_3, VAR_0x8006
call Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo call Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo
compare VAR_0x8006, REQUIRED_OWNED_MONS compare VAR_0x8006, REQUIRED_OWNED_MONS
goto_if_lt Aide_EventScript_HaventCaughtEnough goto_if_lt Aide_EventScript_HaventCaughtEnough
@@ -59,6 +59,6 @@ Route10_PokemonCenter_1F_EventScript_AlreadyGotEverstone::
end end
Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo:: Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo::
getnumberstring 0, REQUIRED_OWNED_MONS buffernumberstring STR_VAR_1, REQUIRED_OWNED_MONS
getitemname 1, ITEM_EVERSTONE bufferitemname STR_VAR_2, ITEM_EVERSTONE
return return
@@ -46,7 +46,7 @@ Route11_EastEntrance_2F_EventScript_DeclineTrade::
end end
Route11_EastEntrance_2F_EventScript_NotRequestedMon:: Route11_EastEntrance_2F_EventScript_NotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_WhatThatsNoMon msgbox Trade_Text_WhatThatsNoMon
release release
end end
@@ -66,7 +66,7 @@ Route11_EastEntrance_2F_EventScript_Aide::
goto_if_eq Aide_EventScript_DeclineCheckMons goto_if_eq Aide_EventScript_DeclineCheckMons
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
getnumberstring 2, VAR_0x8006 buffernumberstring STR_VAR_3, VAR_0x8006
call Route11_EastEntrance_2F_EventScript_GetAideRequestInfo call Route11_EastEntrance_2F_EventScript_GetAideRequestInfo
compare VAR_0x8006, REQUIRED_CAUGHT_MONS compare VAR_0x8006, REQUIRED_CAUGHT_MONS
goto_if_lt Aide_EventScript_HaventCaughtEnough goto_if_lt Aide_EventScript_HaventCaughtEnough
@@ -86,6 +86,6 @@ Route11_EastEntrance_2F_EventScript_AlreadyGotItemfinder::
end end
Route11_EastEntrance_2F_EventScript_GetAideRequestInfo:: Route11_EastEntrance_2F_EventScript_GetAideRequestInfo::
getnumberstring 0, REQUIRED_CAUGHT_MONS buffernumberstring STR_VAR_1, REQUIRED_CAUGHT_MONS
getitemname 1, ITEM_ITEMFINDER bufferitemname STR_VAR_2, ITEM_ITEMFINDER
return return
@@ -6,10 +6,10 @@ Route15_WestEntrance_2F_MapScripts::
Route15_WestEntrance_2F_EventScript_LeftBinoculars:: Route15_WestEntrance_2F_EventScript_LeftBinoculars::
lockall lockall
msgbox Route15_WestEntrance_2F_Text_LargeShiningBird msgbox Route15_WestEntrance_2F_Text_LargeShiningBird
drawmonpic SPECIES_ARTICUNO, 10, 3 showmonpic SPECIES_ARTICUNO, 10, 3
delay 20 delay 20
waitbuttonpress waitbuttonpress
erasemonpic hidemonpic
setvar VAR_0x8004, SPECIES_ARTICUNO setvar VAR_0x8004, SPECIES_ARTICUNO
special SetSeenMon special SetSeenMon
releaseall releaseall
@@ -29,7 +29,7 @@ Route15_WestEntrance_2F_EventScript_Aide::
goto_if_eq Aide_EventScript_DeclineCheckMons goto_if_eq Aide_EventScript_DeclineCheckMons
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
getnumberstring 2, VAR_0x8006 buffernumberstring STR_VAR_3, VAR_0x8006
call Route15_WestEntrance_2F_EventScript_GetAideRequestInfo call Route15_WestEntrance_2F_EventScript_GetAideRequestInfo
compare VAR_0x8006, REQUIRED_CAUGHT_MONS compare VAR_0x8006, REQUIRED_CAUGHT_MONS
goto_if_lt Aide_EventScript_HaventCaughtEnough goto_if_lt Aide_EventScript_HaventCaughtEnough
@@ -49,6 +49,6 @@ Route15_WestEntrance_2F_EventScript_AlreadyGotExpShare::
end end
Route15_WestEntrance_2F_EventScript_GetAideRequestInfo:: Route15_WestEntrance_2F_EventScript_GetAideRequestInfo::
getnumberstring 0, REQUIRED_CAUGHT_MONS buffernumberstring STR_VAR_1, REQUIRED_CAUGHT_MONS
getitemname 1, ITEM_EXP_SHARE bufferitemname STR_VAR_2, ITEM_EXP_SHARE
return return
@@ -29,7 +29,7 @@ Route16_NorthEntrance_2F_EventScript_Aide::
goto_if_eq Aide_EventScript_DeclineCheckMons goto_if_eq Aide_EventScript_DeclineCheckMons
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
getnumberstring 2, VAR_0x8006 buffernumberstring STR_VAR_3, VAR_0x8006
call Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo call Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo
compare VAR_0x8006, REQUIRED_CAUGHT_MONS compare VAR_0x8006, REQUIRED_CAUGHT_MONS
goto_if_lt Aide_EventScript_HaventCaughtEnough goto_if_lt Aide_EventScript_HaventCaughtEnough
@@ -49,6 +49,6 @@ Route16_NorthEntrance_2F_EventScript_AlreadyGotAmuletCoin::
end end
Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo:: Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo::
getnumberstring 0, REQUIRED_CAUGHT_MONS buffernumberstring STR_VAR_1, REQUIRED_CAUGHT_MONS
getitemname 1, ITEM_AMULET_COIN bufferitemname STR_VAR_2, ITEM_AMULET_COIN
return return
@@ -36,7 +36,7 @@ Route18_EastEntrance_2F_EventScript_DeclineTrade::
end end
Route18_EastEntrance_2F_EventScript_NotRequestedMon:: Route18_EastEntrance_2F_EventScript_NotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_WhatThatsNoMon msgbox Trade_Text_WhatThatsNoMon
release release
end end
+2 -2
View File
@@ -5,7 +5,7 @@ Route22_NorthEntrance_EventScript_BoulderBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 1 setvar VAR_TEMP_1, 1
getstdstring 0, STDSTRING_BOULDER_BADGE bufferstdstring STR_VAR_1, STDSTRING_BOULDER_BADGE
goto Route22_NorthEntrance_EventScript_BadgeGuard goto Route22_NorthEntrance_EventScript_BadgeGuard
end end
@@ -13,6 +13,6 @@ Route22_NorthEntrance_EventScript_BoulderBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 1 setvar VAR_TEMP_1, 1
setvar VAR_0x8009, 1 setvar VAR_0x8009, 1
getstdstring 0, STDSTRING_BOULDER_BADGE bufferstdstring STR_VAR_1, STDSTRING_BOULDER_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
+14 -14
View File
@@ -23,7 +23,7 @@ Route23_EventScript_CascadeBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 2 setvar VAR_TEMP_1, 2
getstdstring 0, STDSTRING_CASCADE_BADGE bufferstdstring STR_VAR_1, STDSTRING_CASCADE_BADGE
goto Route23_EventScript_BadgeGuard goto Route23_EventScript_BadgeGuard
end end
@@ -31,7 +31,7 @@ Route23_EventScript_ThunderBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 3 setvar VAR_TEMP_1, 3
getstdstring 0, STDSTRING_THUNDER_BADGE bufferstdstring STR_VAR_1, STDSTRING_THUNDER_BADGE
goto Route23_EventScript_BadgeGuard goto Route23_EventScript_BadgeGuard
end end
@@ -39,7 +39,7 @@ Route23_EventScript_RainbowBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 4 setvar VAR_TEMP_1, 4
getstdstring 0, STDSTRING_RAINBOW_BADGE bufferstdstring STR_VAR_1, STDSTRING_RAINBOW_BADGE
goto Route23_EventScript_BadgeGuard goto Route23_EventScript_BadgeGuard
end end
@@ -47,7 +47,7 @@ Route23_EventScript_SoulBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 5 setvar VAR_TEMP_1, 5
getstdstring 0, STDSTRING_SOUL_BADGE bufferstdstring STR_VAR_1, STDSTRING_SOUL_BADGE
goto Route23_EventScript_BadgeGuard goto Route23_EventScript_BadgeGuard
end end
@@ -55,7 +55,7 @@ Route23_EventScript_MarshBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 6 setvar VAR_TEMP_1, 6
getstdstring 0, STDSTRING_MARSH_BADGE bufferstdstring STR_VAR_1, STDSTRING_MARSH_BADGE
goto Route23_EventScript_BadgeGuard goto Route23_EventScript_BadgeGuard
end end
@@ -63,7 +63,7 @@ Route23_EventScript_VolcanoBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 7 setvar VAR_TEMP_1, 7
getstdstring 0, STDSTRING_VOLCANO_BADGE bufferstdstring STR_VAR_1, STDSTRING_VOLCANO_BADGE
goto Route23_EventScript_BadgeGuard goto Route23_EventScript_BadgeGuard
end end
@@ -71,7 +71,7 @@ Route23_EventScript_EarthBadgeGuard::
lock lock
faceplayer faceplayer
setvar VAR_TEMP_1, 8 setvar VAR_TEMP_1, 8
getstdstring 0, STDSTRING_EARTH_BADGE bufferstdstring STR_VAR_1, STDSTRING_EARTH_BADGE
goto Route23_EventScript_BadgeGuard goto Route23_EventScript_BadgeGuard
end end
@@ -79,7 +79,7 @@ Route23_EventScript_CascadeBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 2 setvar VAR_TEMP_1, 2
setvar VAR_0x8009, LOCALID_CASCADE_BADGE_GUARD setvar VAR_0x8009, LOCALID_CASCADE_BADGE_GUARD
getstdstring 0, STDSTRING_CASCADE_BADGE bufferstdstring STR_VAR_1, STDSTRING_CASCADE_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
@@ -87,7 +87,7 @@ Route23_EventScript_ThunderBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 3 setvar VAR_TEMP_1, 3
setvar VAR_0x8009, LOCALID_THUNDER_BADGE_GUARD setvar VAR_0x8009, LOCALID_THUNDER_BADGE_GUARD
getstdstring 0, STDSTRING_THUNDER_BADGE bufferstdstring STR_VAR_1, STDSTRING_THUNDER_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
@@ -95,7 +95,7 @@ Route23_EventScript_RainbowBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 4 setvar VAR_TEMP_1, 4
setvar VAR_0x8009, LOCALID_RAINBOW_BADGE_GUARD setvar VAR_0x8009, LOCALID_RAINBOW_BADGE_GUARD
getstdstring 0, STDSTRING_RAINBOW_BADGE bufferstdstring STR_VAR_1, STDSTRING_RAINBOW_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
@@ -103,7 +103,7 @@ Route23_EventScript_SoulBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 5 setvar VAR_TEMP_1, 5
setvar VAR_0x8009, LOCALID_SOUL_BADGE_GUARD setvar VAR_0x8009, LOCALID_SOUL_BADGE_GUARD
getstdstring 0, STDSTRING_SOUL_BADGE bufferstdstring STR_VAR_1, STDSTRING_SOUL_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
@@ -111,7 +111,7 @@ Route23_EventScript_MarshBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 6 setvar VAR_TEMP_1, 6
setvar VAR_0x8009, LOCALID_MARSH_BADGE_GUARD setvar VAR_0x8009, LOCALID_MARSH_BADGE_GUARD
getstdstring 0, STDSTRING_MARSH_BADGE bufferstdstring STR_VAR_1, STDSTRING_MARSH_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
@@ -119,7 +119,7 @@ Route23_EventScript_VolcanoBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 7 setvar VAR_TEMP_1, 7
setvar VAR_0x8009, LOCALID_VOLCANO_BADGE_GUARD setvar VAR_0x8009, LOCALID_VOLCANO_BADGE_GUARD
getstdstring 0, STDSTRING_VOLCANO_BADGE bufferstdstring STR_VAR_1, STDSTRING_VOLCANO_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
@@ -127,7 +127,7 @@ Route23_EventScript_EarthBadgeGuardTrigger::
lockall lockall
setvar VAR_TEMP_1, 8 setvar VAR_TEMP_1, 8
setvar VAR_0x8009, LOCALID_EARTH_BADGE_GUARD setvar VAR_0x8009, LOCALID_EARTH_BADGE_GUARD
getstdstring 0, STDSTRING_EARTH_BADGE bufferstdstring STR_VAR_1, STDSTRING_EARTH_BADGE
goto Route23_EventScript_BadgeGuardTrigger goto Route23_EventScript_BadgeGuardTrigger
end end
+8 -8
View File
@@ -258,36 +258,36 @@ Route25_SeaCottage_EventScript_BillsMonList::
end end
Route25_SeaCottage_EventScript_ViewEevee:: Route25_SeaCottage_EventScript_ViewEevee::
drawmonpic SPECIES_EEVEE, 10, 3 showmonpic SPECIES_EEVEE, 10, 3
waitbuttonpress waitbuttonpress
erasemonpic hidemonpic
setvar VAR_0x8004, SPECIES_EEVEE setvar VAR_0x8004, SPECIES_EEVEE
special SetSeenMon special SetSeenMon
goto Route25_SeaCottage_EventScript_BillsMonList goto Route25_SeaCottage_EventScript_BillsMonList
end end
Route25_SeaCottage_EventScript_ViewFlareon:: Route25_SeaCottage_EventScript_ViewFlareon::
drawmonpic SPECIES_FLAREON, 10, 3 showmonpic SPECIES_FLAREON, 10, 3
waitbuttonpress waitbuttonpress
erasemonpic hidemonpic
setvar VAR_0x8004, SPECIES_FLAREON setvar VAR_0x8004, SPECIES_FLAREON
special SetSeenMon special SetSeenMon
goto Route25_SeaCottage_EventScript_BillsMonList goto Route25_SeaCottage_EventScript_BillsMonList
end end
Route25_SeaCottage_EventScript_ViewJolteon:: Route25_SeaCottage_EventScript_ViewJolteon::
drawmonpic SPECIES_JOLTEON, 10, 3 showmonpic SPECIES_JOLTEON, 10, 3
waitbuttonpress waitbuttonpress
erasemonpic hidemonpic
setvar VAR_0x8004, SPECIES_JOLTEON setvar VAR_0x8004, SPECIES_JOLTEON
special SetSeenMon special SetSeenMon
goto Route25_SeaCottage_EventScript_BillsMonList goto Route25_SeaCottage_EventScript_BillsMonList
end end
Route25_SeaCottage_EventScript_ViewVaporeon:: Route25_SeaCottage_EventScript_ViewVaporeon::
drawmonpic SPECIES_VAPOREON, 10, 3 showmonpic SPECIES_VAPOREON, 10, 3
waitbuttonpress waitbuttonpress
erasemonpic hidemonpic
setvar VAR_0x8004, SPECIES_VAPOREON setvar VAR_0x8004, SPECIES_VAPOREON
special SetSeenMon special SetSeenMon
goto Route25_SeaCottage_EventScript_BillsMonList goto Route25_SeaCottage_EventScript_BillsMonList
+3 -3
View File
@@ -13,7 +13,7 @@ Route2_EastBuilding_EventScript_Aide::
goto_if_eq Aide_EventScript_DeclineCheckMons goto_if_eq Aide_EventScript_DeclineCheckMons
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
getnumberstring 2, VAR_0x8006 buffernumberstring STR_VAR_3, VAR_0x8006
call Route2_EastBuilding_EventScript_GetAideRequestInfo call Route2_EastBuilding_EventScript_GetAideRequestInfo
compare VAR_0x8006, REQUIRED_SEEN_MONS compare VAR_0x8006, REQUIRED_SEEN_MONS
goto_if_lt Aide_EventScript_HaventCaughtEnough goto_if_lt Aide_EventScript_HaventCaughtEnough
@@ -33,8 +33,8 @@ Route2_EastBuilding_EventScript_AlreadyGotHM05::
end end
Route2_EastBuilding_EventScript_GetAideRequestInfo:: Route2_EastBuilding_EventScript_GetAideRequestInfo::
getnumberstring 0, REQUIRED_SEEN_MONS buffernumberstring STR_VAR_1, REQUIRED_SEEN_MONS
getitemname 1, ITEM_HM05 bufferitemname STR_VAR_2, ITEM_HM05
return return
Route2_EastBuilding_EventScript_Rocker:: Route2_EastBuilding_EventScript_Rocker::
+1 -1
View File
@@ -32,7 +32,7 @@ Route2_House_EventScript_DeclineTrade::
end end
Route2_House_EventScript_NotRequestedMon:: Route2_House_EventScript_NotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_WhatThatsNoMon msgbox Trade_Text_WhatThatsNoMon
release release
end end
@@ -66,7 +66,7 @@ Route4_PokemonCenter_1F_EventScript_BuyMagikarpParty::
goto_if_eq Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp goto_if_eq Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp
call EventScript_GetGiftMonPartySlot call EventScript_GetGiftMonPartySlot
fadescreen FADE_TO_BLACK fadescreen FADE_TO_BLACK
hidemoneybox 0, 0 hidemoneybox
special ChangePokemonNickname special ChangePokemonNickname
waitstate waitstate
goto Route4_PokemonCenter_1F_EventScript_BoughtMagikarp goto Route4_PokemonCenter_1F_EventScript_BoughtMagikarp
@@ -78,7 +78,7 @@ Route4_PokemonCenter_1F_EventScript_BuyMagikarpPC::
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq Route4_PokemonCenter_1F_EventScript_TransferMagikarpCloseMoneyBox goto_if_eq Route4_PokemonCenter_1F_EventScript_TransferMagikarpCloseMoneyBox
fadescreen FADE_TO_BLACK fadescreen FADE_TO_BLACK
hidemoneybox 0, 0 hidemoneybox
special ChangeBoxPokemonNickname special ChangeBoxPokemonNickname
waitstate waitstate
lock lock
@@ -97,7 +97,7 @@ Route4_PokemonCenter_1F_EventScript_TransferMagikarp::
end end
Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp:: Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp::
hidemoneybox 0, 0 hidemoneybox
goto Route4_PokemonCenter_1F_EventScript_BoughtMagikarp goto Route4_PokemonCenter_1F_EventScript_BoughtMagikarp
end end
@@ -108,23 +108,23 @@ Route4_PokemonCenter_1F_EventScript_BoughtMagikarp::
Route4_PokemonCenter_1F_EventScript_PayForMagikarp:: Route4_PokemonCenter_1F_EventScript_PayForMagikarp::
removemoney MAGIKARP_PRICE, 0 removemoney MAGIKARP_PRICE, 0
updatemoneybox 0, 0, 0 updatemoneybox
playfanfare MUS_LEVEL_UP playfanfare MUS_LEVEL_UP
message Route4_PokemonCenter_1F_Text_PaidOutrageouslyForMagikarp message Route4_PokemonCenter_1F_Text_PaidOutrageouslyForMagikarp
waitmessage waitmessage
waitfanfare waitfanfare
getspeciesname 0, SPECIES_MAGIKARP bufferspeciesname STR_VAR_1, SPECIES_MAGIKARP
return return
Route4_PokemonCenter_1F_EventScript_DeclineMagikarp:: Route4_PokemonCenter_1F_EventScript_DeclineMagikarp::
msgbox Route4_PokemonCenter_1F_Text_OnlyDoingThisAsFavorToYou msgbox Route4_PokemonCenter_1F_Text_OnlyDoingThisAsFavorToYou
hidemoneybox 0, 0 hidemoneybox
release release
end end
Route4_PokemonCenter_1F_EventScript_NotEnoughMoney:: Route4_PokemonCenter_1F_EventScript_NotEnoughMoney::
msgbox Route4_PokemonCenter_1F_Text_YoullNeedMoreMoney msgbox Route4_PokemonCenter_1F_Text_YoullNeedMoreMoney
hidemoneybox 0, 0 hidemoneybox
release release
end end
@@ -136,7 +136,7 @@ Route4_PokemonCenter_1F_EventScript_AlreadyBoughtMagikarp::
Route4_PokemonCenter_1F_EventScript_NoRoomForMagikarp:: Route4_PokemonCenter_1F_EventScript_NoRoomForMagikarp::
textcolor 0 textcolor 0
msgbox Route4_PokemonCenter_1F_Text_NoRoomForMorePokemon msgbox Route4_PokemonCenter_1F_Text_NoRoomForMorePokemon
hidemoneybox 0, 0 hidemoneybox
release release
end end
+2 -2
View File
@@ -8,8 +8,8 @@ SSAnne_2F_Room1_EventScript_Gentleman::
waitmessage waitmessage
setvar VAR_0x8004, SPECIES_SNORLAX setvar VAR_0x8004, SPECIES_SNORLAX
special SetSeenMon special SetSeenMon
drawmonpic SPECIES_SNORLAX, 10, 3 showmonpic SPECIES_SNORLAX, 10, 3
waitbuttonpress waitbuttonpress
erasemonpic hidemonpic
release release
end end
+7 -7
View File
@@ -23,7 +23,7 @@ SaffronCity_Dojo_EventScript_HitmonleeBall::
lock lock
faceplayer faceplayer
goto_if_set FLAG_GOT_HITMON_FROM_DOJO, SaffronCity_Dojo_EventScript_AlreadyGotHitmon goto_if_set FLAG_GOT_HITMON_FROM_DOJO, SaffronCity_Dojo_EventScript_AlreadyGotHitmon
drawmonpic SPECIES_HITMONLEE, 10, 3 showmonpic SPECIES_HITMONLEE, 10, 3
setvar VAR_TEMP_1, SPECIES_HITMONLEE setvar VAR_TEMP_1, SPECIES_HITMONLEE
applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp
waitmovement 0 waitmovement 0
@@ -32,7 +32,7 @@ SaffronCity_Dojo_EventScript_HitmonleeBall::
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
compare VAR_RESULT, YES compare VAR_RESULT, YES
goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon
erasemonpic hidemonpic
release release
end end
@@ -45,7 +45,7 @@ SaffronCity_Dojo_EventScript_HitmonchanBall::
lock lock
faceplayer faceplayer
goto_if_set FLAG_GOT_HITMON_FROM_DOJO, SaffronCity_Dojo_EventScript_AlreadyGotHitmon goto_if_set FLAG_GOT_HITMON_FROM_DOJO, SaffronCity_Dojo_EventScript_AlreadyGotHitmon
drawmonpic SPECIES_HITMONCHAN, 10, 3 showmonpic SPECIES_HITMONCHAN, 10, 3
setvar VAR_TEMP_1, SPECIES_HITMONCHAN setvar VAR_TEMP_1, SPECIES_HITMONCHAN
applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp
waitmovement 0 waitmovement 0
@@ -54,12 +54,12 @@ SaffronCity_Dojo_EventScript_HitmonchanBall::
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
compare VAR_RESULT, YES compare VAR_RESULT, YES
goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon
erasemonpic hidemonpic
release release
end end
SaffronCity_Dojo_EventScript_GiveHitmon:: SaffronCity_Dojo_EventScript_GiveHitmon::
erasemonpic hidemonpic
givemon VAR_TEMP_1, 25, ITEM_NONE givemon VAR_TEMP_1, 25, ITEM_NONE
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq SaffronCity_Dojo_EventScript_ReceivedHitmonParty goto_if_eq SaffronCity_Dojo_EventScript_ReceivedHitmonParty
@@ -72,7 +72,7 @@ SaffronCity_Dojo_EventScript_GiveHitmon::
SaffronCity_Dojo_EventScript_ReceivedHitmonParty:: SaffronCity_Dojo_EventScript_ReceivedHitmonParty::
removeobject VAR_LAST_TALKED removeobject VAR_LAST_TALKED
getspeciesname 0, VAR_TEMP_1 bufferspeciesname STR_VAR_1, VAR_TEMP_1
playfanfare MUS_LEVEL_UP playfanfare MUS_LEVEL_UP
message SaffronCity_Dojo_Text_ReceivedMonFromKarateMaster message SaffronCity_Dojo_Text_ReceivedMonFromKarateMaster
waitmessage waitmessage
@@ -88,7 +88,7 @@ SaffronCity_Dojo_EventScript_ReceivedHitmonParty::
SaffronCity_Dojo_EventScript_ReceivedHitmonPC:: SaffronCity_Dojo_EventScript_ReceivedHitmonPC::
removeobject VAR_LAST_TALKED removeobject VAR_LAST_TALKED
getspeciesname 0, VAR_TEMP_1 bufferspeciesname STR_VAR_1, VAR_TEMP_1
playfanfare MUS_LEVEL_UP playfanfare MUS_LEVEL_UP
message SaffronCity_Dojo_Text_ReceivedMonFromKarateMaster message SaffronCity_Dojo_Text_ReceivedMonFromKarateMaster
waitmessage waitmessage
@@ -40,7 +40,7 @@ SevenIsland_House_Room1_EventScript_OldWomanCommentOnBattle::
waitmovement 0 waitmovement 0
applymovement LOCALID_OLD_WOMAN, SevenIsland_House_Room1_Movement_OldWomanWalkBehindPlayer applymovement LOCALID_OLD_WOMAN, SevenIsland_House_Room1_Movement_OldWomanWalkBehindPlayer
waitmovement 0 waitmovement 0
moveobjectoffscreen LOCALID_OLD_WOMAN copyobjectxytoperm LOCALID_OLD_WOMAN
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp
waitmovement 0 waitmovement 0
compare VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 1 compare VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 1
+2 -2
View File
@@ -145,7 +145,7 @@ SilphCo_7F_EventScript_ReceiveLaprasParty::
message SilphCo_7F_Text_ObtainedLaprasFromEmployee message SilphCo_7F_Text_ObtainedLaprasFromEmployee
waitmessage waitmessage
waitfanfare waitfanfare
getspeciesname 0, SPECIES_LAPRAS bufferspeciesname STR_VAR_1, SPECIES_LAPRAS
msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq SilphCo_7F_EventScript_EndReceiveLapras goto_if_eq SilphCo_7F_EventScript_EndReceiveLapras
@@ -160,7 +160,7 @@ SilphCo_7F_EventScript_ReceiveLaprasPC::
message SilphCo_7F_Text_ObtainedLaprasFromEmployee message SilphCo_7F_Text_ObtainedLaprasFromEmployee
waitmessage waitmessage
waitfanfare waitfanfare
getspeciesname 0, SPECIES_LAPRAS bufferspeciesname STR_VAR_1, SPECIES_LAPRAS
msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq SilphCo_7F_EventScript_LaprasTransferredToPC goto_if_eq SilphCo_7F_EventScript_LaprasTransferredToPC
@@ -28,7 +28,7 @@ UndergroundPath_NorthEntrance_EventScript_DeclineTrade::
end end
UndergroundPath_NorthEntrance_EventScript_NotRequestedMon:: UndergroundPath_NorthEntrance_EventScript_NotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox Trade_Text_ThisIsNoMon msgbox Trade_Text_ThisIsNoMon
release release
end end
+1 -1
View File
@@ -28,7 +28,7 @@ VermilionCity_House2_EventScript_DeclineTrade::
end end
VermilionCity_House2_EventScript_NotRequestedMon:: VermilionCity_House2_EventScript_NotRequestedMon::
getspeciesname 0, VAR_0x8009 bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox VermilionCity_House2_Text_ThisIsNoMon msgbox VermilionCity_House2_Text_ThisIsNoMon
release release
end end
+3 -1
View File
@@ -1,3 +1,5 @@
.set LOCALID_BOULDER, 5
VictoryRoad_1F_MapScripts:: VictoryRoad_1F_MapScripts::
map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_1F_OnLoad map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_1F_OnLoad
map_script MAP_SCRIPT_ON_TRANSITION, VictoryRoad_1F_OnTransition map_script MAP_SCRIPT_ON_TRANSITION, VictoryRoad_1F_OnTransition
@@ -26,7 +28,7 @@ VictoryRoad_1F_EventScript_FloorSwitch::
playse SE_ICE_BREAK playse SE_ICE_BREAK
special DrawWholeMapView special DrawWholeMapView
waitse waitse
moveobjectoffscreen 5 copyobjectxytoperm LOCALID_BOULDER
setvar VAR_MAP_SCENE_VICTORY_ROAD_1F, 100 setvar VAR_MAP_SCENE_VICTORY_ROAD_1F, 100
releaseall releaseall
end end
+5 -2
View File
@@ -1,3 +1,6 @@
.set LOCALID_BOULDER1, 11
.set LOCALID_BOULDER2, 12
VictoryRoad_2F_MapScripts:: VictoryRoad_2F_MapScripts::
map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_2F_OnLoad map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_2F_OnLoad
.byte 0 .byte 0
@@ -28,7 +31,7 @@ VictoryRoad_2F_EventScript_FloorSwitch1::
playse SE_ICE_BREAK playse SE_ICE_BREAK
special DrawWholeMapView special DrawWholeMapView
waitse waitse
moveobjectoffscreen 11 copyobjectxytoperm LOCALID_BOULDER1
setvar VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER1, 100 setvar VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER1, 100
releaseall releaseall
end end
@@ -46,7 +49,7 @@ VictoryRoad_2F_EventScript_FloorSwitch2::
playse SE_ICE_BREAK playse SE_ICE_BREAK
special DrawWholeMapView special DrawWholeMapView
waitse waitse
moveobjectoffscreen 12 copyobjectxytoperm LOCALID_BOULDER2
setvar VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2, 100 setvar VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2, 100
releaseall releaseall
end end
+5 -2
View File
@@ -1,3 +1,6 @@
.set LOCALID_BOULDER1, 7
.set LOCALID_BOULDER2, 10
VictoryRoad_3F_MapScripts:: VictoryRoad_3F_MapScripts::
map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_3F_OnLoad map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_3F_OnLoad
.byte 0 .byte 0
@@ -21,8 +24,8 @@ VictoryRoad_3F_EventScript_FloorSwitch::
playse SE_ICE_BREAK playse SE_ICE_BREAK
special DrawWholeMapView special DrawWholeMapView
waitse waitse
moveobjectoffscreen 7 copyobjectxytoperm LOCALID_BOULDER1
moveobjectoffscreen 10 copyobjectxytoperm LOCALID_BOULDER2
setvar VAR_MAP_SCENE_VICTORY_ROAD_3F, 100 setvar VAR_MAP_SCENE_VICTORY_ROAD_3F, 100
releaseall releaseall
end end
+2 -2
View File
@@ -21,7 +21,7 @@ MysteryEventScript_StampCard::
setorcopyvar VAR_RESULT, 0 setorcopyvar VAR_RESULT, 0
specialvar VAR_0x8009, BattleCardAction specialvar VAR_0x8009, BattleCardAction
subvar VAR_0x8008, VAR_0x8009 subvar VAR_0x8008, VAR_0x8009
getnumberstring 0, VAR_0x8008 buffernumberstring STR_VAR_1, VAR_0x8008
lock lock
faceplayer faceplayer
vmessage sText_MysteryGiftStampCard vmessage sText_MysteryGiftStampCard
@@ -39,7 +39,7 @@ sText_MysteryGiftStampCard:
MysteryEventScript_SurfPichu:: MysteryEventScript_SurfPichu::
setvaddress MysteryEventScript_SurfPichu setvaddress MysteryEventScript_SurfPichu
vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible
gotoram returnram
SurfPichu_GiveIfPossible: SurfPichu_GiveIfPossible:
specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount
+213 -213
View File
@@ -1,219 +1,219 @@
.align 2 .align 2
gScriptCmdTable:: gScriptCmdTable::
.4byte ScrCmd_nop .4byte ScrCmd_nop @ 0x00
.4byte ScrCmd_nop1 .4byte ScrCmd_nop1 @ 0x01
.4byte ScrCmd_end .4byte ScrCmd_end @ 0x02
.4byte ScrCmd_return .4byte ScrCmd_return @ 0x03
.4byte ScrCmd_call .4byte ScrCmd_call @ 0x04
.4byte ScrCmd_goto .4byte ScrCmd_goto @ 0x05
.4byte ScrCmd_goto_if .4byte ScrCmd_goto_if @ 0x06
.4byte ScrCmd_call_if .4byte ScrCmd_call_if @ 0x07
.4byte ScrCmd_gotostd .4byte ScrCmd_gotostd @ 0x08
.4byte ScrCmd_callstd .4byte ScrCmd_callstd @ 0x09
.4byte ScrCmd_gotostd_if .4byte ScrCmd_gotostd_if @ 0x0a
.4byte ScrCmd_callstd_if .4byte ScrCmd_callstd_if @ 0x0b
.4byte ScrCmd_gotoram .4byte ScrCmd_returnram @ 0x0c
.4byte ScrCmd_killscript .4byte ScrCmd_endram @ 0x0d
.4byte ScrCmd_setmysteryeventstatus .4byte ScrCmd_setmysteryeventstatus @ 0x0e
.4byte ScrCmd_loadword .4byte ScrCmd_loadword @ 0x0f
.4byte ScrCmd_loadbyte .4byte ScrCmd_loadbyte @ 0x10
.4byte ScrCmd_writebytetoaddr .4byte ScrCmd_setptr @ 0x11
.4byte ScrCmd_loadbytefromaddr .4byte ScrCmd_loadbytefromptr @ 0x12
.4byte ScrCmd_setptrbyte .4byte ScrCmd_setptrbyte @ 0x13
.4byte ScrCmd_copylocal .4byte ScrCmd_copylocal @ 0x14
.4byte ScrCmd_copybyte .4byte ScrCmd_copybyte @ 0x15
.4byte ScrCmd_setvar .4byte ScrCmd_setvar @ 0x16
.4byte ScrCmd_addvar .4byte ScrCmd_addvar @ 0x17
.4byte ScrCmd_subvar .4byte ScrCmd_subvar @ 0x18
.4byte ScrCmd_copyvar .4byte ScrCmd_copyvar @ 0x19
.4byte ScrCmd_setorcopyvar .4byte ScrCmd_setorcopyvar @ 0x1a
.4byte ScrCmd_compare_local_to_local .4byte ScrCmd_compare_local_to_local @ 0x1b
.4byte ScrCmd_compare_local_to_value .4byte ScrCmd_compare_local_to_value @ 0x1c
.4byte ScrCmd_compare_local_to_addr .4byte ScrCmd_compare_local_to_ptr @ 0x1d
.4byte ScrCmd_compare_addr_to_local .4byte ScrCmd_compare_ptr_to_local @ 0x1e
.4byte ScrCmd_compare_addr_to_value .4byte ScrCmd_compare_ptr_to_value @ 0x1f
.4byte ScrCmd_compare_addr_to_addr .4byte ScrCmd_compare_ptr_to_ptr @ 0x20
.4byte ScrCmd_compare_var_to_value .4byte ScrCmd_compare_var_to_value @ 0x21
.4byte ScrCmd_compare_var_to_var .4byte ScrCmd_compare_var_to_var @ 0x22
.4byte ScrCmd_callnative .4byte ScrCmd_callnative @ 0x23
.4byte ScrCmd_gotonative .4byte ScrCmd_gotonative @ 0x24
.4byte ScrCmd_special .4byte ScrCmd_special @ 0x25
.4byte ScrCmd_specialvar .4byte ScrCmd_specialvar @ 0x26
.4byte ScrCmd_waitstate .4byte ScrCmd_waitstate @ 0x27
.4byte ScrCmd_delay .4byte ScrCmd_delay @ 0x28
.4byte ScrCmd_setflag .4byte ScrCmd_setflag @ 0x29
.4byte ScrCmd_clearflag .4byte ScrCmd_clearflag @ 0x2a
.4byte ScrCmd_checkflag .4byte ScrCmd_checkflag @ 0x2b
.4byte ScrCmd_initclock .4byte ScrCmd_initclock @ 0x2c
.4byte ScrCmd_dodailyevents .4byte ScrCmd_dotimebasedevents @ 0x2d
.4byte ScrCmd_gettime .4byte ScrCmd_gettime @ 0x2e
.4byte ScrCmd_playse .4byte ScrCmd_playse @ 0x2f
.4byte ScrCmd_waitse .4byte ScrCmd_waitse @ 0x30
.4byte ScrCmd_playfanfare .4byte ScrCmd_playfanfare @ 0x31
.4byte ScrCmd_waitfanfare .4byte ScrCmd_waitfanfare @ 0x32
.4byte ScrCmd_playbgm .4byte ScrCmd_playbgm @ 0x33
.4byte ScrCmd_savebgm .4byte ScrCmd_savebgm @ 0x34
.4byte ScrCmd_fadedefaultbgm .4byte ScrCmd_fadedefaultbgm @ 0x35
.4byte ScrCmd_fadenewbgm .4byte ScrCmd_fadenewbgm @ 0x36
.4byte ScrCmd_fadeoutbgm .4byte ScrCmd_fadeoutbgm @ 0x37
.4byte ScrCmd_fadeinbgm .4byte ScrCmd_fadeinbgm @ 0x38
.4byte ScrCmd_warp .4byte ScrCmd_warp @ 0x39
.4byte ScrCmd_warpsilent .4byte ScrCmd_warpsilent @ 0x3a
.4byte ScrCmd_warpdoor .4byte ScrCmd_warpdoor @ 0x3b
.4byte ScrCmd_warphole .4byte ScrCmd_warphole @ 0x3c
.4byte ScrCmd_warpteleport .4byte ScrCmd_warpteleport @ 0x3d
.4byte ScrCmd_setwarp .4byte ScrCmd_setwarp @ 0x3e
.4byte ScrCmd_setdynamicwarp .4byte ScrCmd_setdynamicwarp @ 0x3f
.4byte ScrCmd_setdivewarp .4byte ScrCmd_setdivewarp @ 0x40
.4byte ScrCmd_setholewarp .4byte ScrCmd_setholewarp @ 0x41
.4byte ScrCmd_getplayerxy .4byte ScrCmd_getplayerxy @ 0x42
.4byte ScrCmd_getpartysize .4byte ScrCmd_getpartysize @ 0x43
.4byte ScrCmd_additem .4byte ScrCmd_additem @ 0x44
.4byte ScrCmd_removeitem .4byte ScrCmd_removeitem @ 0x45
.4byte ScrCmd_checkitemspace .4byte ScrCmd_checkitemspace @ 0x46
.4byte ScrCmd_checkitem .4byte ScrCmd_checkitem @ 0x47
.4byte ScrCmd_checkitemtype .4byte ScrCmd_checkitemtype @ 0x48
.4byte ScrCmd_addpcitem .4byte ScrCmd_addpcitem @ 0x49
.4byte ScrCmd_checkpcitem .4byte ScrCmd_checkpcitem @ 0x4a
.4byte ScrCmd_givedecoration .4byte ScrCmd_adddecoration @ 0x4b
.4byte ScrCmd_takedecoration .4byte ScrCmd_removedecoration @ 0x4c
.4byte ScrCmd_checkdecor .4byte ScrCmd_checkdecor @ 0x4d
.4byte ScrCmd_checkdecorspace .4byte ScrCmd_checkdecorspace @ 0x4e
.4byte ScrCmd_applymovement .4byte ScrCmd_applymovement @ 0x4f
.4byte ScrCmd_applymovement_at .4byte ScrCmd_applymovementat @ 0x50
.4byte ScrCmd_waitmovement .4byte ScrCmd_waitmovement @ 0x51
.4byte ScrCmd_waitmovement_at .4byte ScrCmd_waitmovementat @ 0x52
.4byte ScrCmd_removeobject .4byte ScrCmd_removeobject @ 0x53
.4byte ScrCmd_removeobject_at .4byte ScrCmd_removeobjectat @ 0x54
.4byte ScrCmd_addobject .4byte ScrCmd_addobject @ 0x55
.4byte ScrCmd_addobject_at .4byte ScrCmd_addobjectat @ 0x56
.4byte ScrCmd_setobjectxy .4byte ScrCmd_setobjectxy @ 0x57
.4byte ScrCmd_showobject_at .4byte ScrCmd_showobjectat @ 0x58
.4byte ScrCmd_hideobject_at .4byte ScrCmd_hideobjectat @ 0x59
.4byte ScrCmd_faceplayer .4byte ScrCmd_faceplayer @ 0x5a
.4byte ScrCmd_turnobject .4byte ScrCmd_turnobject @ 0x5b
.4byte ScrCmd_trainerbattle .4byte ScrCmd_trainerbattle @ 0x5c
.4byte ScrCmd_dotrainerbattle .4byte ScrCmd_dotrainerbattle @ 0x5d
.4byte ScrCmd_gotopostbattlescript .4byte ScrCmd_gotopostbattlescript @ 0x5e
.4byte ScrCmd_gotobeatenscript .4byte ScrCmd_gotobeatenscript @ 0x5f
.4byte ScrCmd_checktrainerflag .4byte ScrCmd_checktrainerflag @ 0x60
.4byte ScrCmd_settrainerflag .4byte ScrCmd_settrainerflag @ 0x61
.4byte ScrCmd_cleartrainerflag .4byte ScrCmd_cleartrainerflag @ 0x62
.4byte ScrCmd_setobjectxyperm .4byte ScrCmd_setobjectxyperm @ 0x63
.4byte ScrCmd_moveobjectoffscreen .4byte ScrCmd_copyobjectxytoperm @ 0x64
.4byte ScrCmd_setobjectmovementtype .4byte ScrCmd_setobjectmovementtype @ 0x65
.4byte ScrCmd_waitmessage .4byte ScrCmd_waitmessage @ 0x66
.4byte ScrCmd_message .4byte ScrCmd_message @ 0x67
.4byte ScrCmd_closemessage .4byte ScrCmd_closemessage @ 0x68
.4byte ScrCmd_lockall .4byte ScrCmd_lockall @ 0x69
.4byte ScrCmd_lock .4byte ScrCmd_lock @ 0x6a
.4byte ScrCmd_releaseall .4byte ScrCmd_releaseall @ 0x6b
.4byte ScrCmd_release .4byte ScrCmd_release @ 0x6c
.4byte ScrCmd_waitbuttonpress .4byte ScrCmd_waitbuttonpress @ 0x6d
.4byte ScrCmd_yesnobox .4byte ScrCmd_yesnobox @ 0x6e
.4byte ScrCmd_multichoice .4byte ScrCmd_multichoice @ 0x6f
.4byte ScrCmd_multichoicedefault .4byte ScrCmd_multichoicedefault @ 0x70
.4byte ScrCmd_multichoicegrid .4byte ScrCmd_multichoicegrid @ 0x71
.4byte ScrCmd_drawbox .4byte ScrCmd_drawbox @ 0x72
.4byte ScrCmd_erasebox .4byte ScrCmd_erasebox @ 0x73
.4byte ScrCmd_drawboxtext .4byte ScrCmd_drawboxtext @ 0x74
.4byte ScrCmd_showmonpic .4byte ScrCmd_showmonpic @ 0x75
.4byte ScrCmd_hidemonpic .4byte ScrCmd_hidemonpic @ 0x76
.4byte ScrCmd_showcontestwinner .4byte ScrCmd_showcontestpainting @ 0x77
.4byte ScrCmd_braillemessage .4byte ScrCmd_braillemessage @ 0x78
.4byte ScrCmd_givemon .4byte ScrCmd_givemon @ 0x79
.4byte ScrCmd_giveegg .4byte ScrCmd_giveegg @ 0x7a
.4byte ScrCmd_setmonmove .4byte ScrCmd_setmonmove @ 0x7b
.4byte ScrCmd_checkpartymove .4byte ScrCmd_checkpartymove @ 0x7c
.4byte ScrCmd_bufferspeciesname .4byte ScrCmd_bufferspeciesname @ 0x7d
.4byte ScrCmd_bufferleadmonspeciesname .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e
.4byte ScrCmd_bufferpartymonnick .4byte ScrCmd_bufferpartymonnick @ 0x7f
.4byte ScrCmd_bufferitemname .4byte ScrCmd_bufferitemname @ 0x80
.4byte ScrCmd_bufferdecorationname .4byte ScrCmd_bufferdecorationname @ 0x81
.4byte ScrCmd_buffermovename .4byte ScrCmd_buffermovename @ 0x82
.4byte ScrCmd_buffernumberstring .4byte ScrCmd_buffernumberstring @ 0x83
.4byte ScrCmd_bufferstdstring .4byte ScrCmd_bufferstdstring @ 0x84
.4byte ScrCmd_bufferstring .4byte ScrCmd_bufferstring @ 0x85
.4byte ScrCmd_pokemart .4byte ScrCmd_pokemart @ 0x86
.4byte ScrCmd_pokemartdecoration .4byte ScrCmd_pokemartdecoration @ 0x87
.4byte ScrCmd_pokemartdecoration2 .4byte ScrCmd_pokemartdecoration2 @ 0x88
.4byte ScrCmd_playslotmachine .4byte ScrCmd_playslotmachine @ 0x8
.4byte ScrCmd_setberrytree .4byte ScrCmd_setberrytree @ 0x8a
.4byte ScrCmd_choosecontestmon .4byte ScrCmd_choosecontestmon @ 0x8b
.4byte ScrCmd_startcontest .4byte ScrCmd_startcontest @ 0x8c
.4byte ScrCmd_showcontestresults .4byte ScrCmd_showcontestresults @ 0x8d
.4byte ScrCmd_contestlinktransfer .4byte ScrCmd_contestlinktransfer @ 0x8e
.4byte ScrCmd_random .4byte ScrCmd_random @ 0x8f
.4byte ScrCmd_addmoney .4byte ScrCmd_addmoney @ 0x90
.4byte ScrCmd_removemoney .4byte ScrCmd_removemoney @ 0x91
.4byte ScrCmd_checkmoney .4byte ScrCmd_checkmoney @ 0x92
.4byte ScrCmd_showmoneybox .4byte ScrCmd_showmoneybox @ 0x93
.4byte ScrCmd_hidemoneybox .4byte ScrCmd_hidemoneybox @ 0x94
.4byte ScrCmd_updatemoneybox .4byte ScrCmd_updatemoneybox @ 0x95
.4byte ScrCmd_getpricereduction .4byte ScrCmd_getpokenewsactive @ 0x96
.4byte ScrCmd_fadescreen .4byte ScrCmd_fadescreen @ 0x97
.4byte ScrCmd_fadescreenspeed .4byte ScrCmd_fadescreenspeed @ 0x98
.4byte ScrCmd_setflashradius .4byte ScrCmd_setflashlevel @ 0x99
.4byte ScrCmd_animateflash .4byte ScrCmd_animateflash @ 0x9a
.4byte ScrCmd_messageautoscroll .4byte ScrCmd_messageautoscroll @ 0x9b
.4byte ScrCmd_dofieldeffect .4byte ScrCmd_dofieldeffect @ 0x9c
.4byte ScrCmd_setfieldeffectarg .4byte ScrCmd_setfieldeffectargument @ 0x9d
.4byte ScrCmd_waitfieldeffect .4byte ScrCmd_waitfieldeffect @ 0x9e
.4byte ScrCmd_setrespawn .4byte ScrCmd_setrespawn @ 0x9f
.4byte ScrCmd_checkplayergender .4byte ScrCmd_checkplayergender @ 0xa0
.4byte ScrCmd_playmoncry .4byte ScrCmd_playmoncry @ 0xa1
.4byte ScrCmd_setmetatile .4byte ScrCmd_setmetatile @ 0xa2
.4byte ScrCmd_resetweather .4byte ScrCmd_resetweather @ 0xa3
.4byte ScrCmd_setweather .4byte ScrCmd_setweather @ 0xa4
.4byte ScrCmd_doweather .4byte ScrCmd_doweather @ 0xa5
.4byte ScrCmd_setstepcallback .4byte ScrCmd_setstepcallback @ 0xa6
.4byte ScrCmd_setmaplayoutindex .4byte ScrCmd_setmaplayoutindex @ 0xa7
.4byte ScrCmd_setobjectpriority .4byte ScrCmd_setobjectsubpriority @ 0xa8
.4byte ScrCmd_resetobjectpriority .4byte ScrCmd_resetobjectsubpriority @ 0xa9
.4byte ScrCmd_createvobject .4byte ScrCmd_createvobject @ 0xaa
.4byte ScrCmd_turnvobject .4byte ScrCmd_turnvobject @ 0xab
.4byte ScrCmd_opendoor .4byte ScrCmd_opendoor @ 0xac
.4byte ScrCmd_closedoor .4byte ScrCmd_closedoor @ 0xad
.4byte ScrCmd_waitdooranim .4byte ScrCmd_waitdooranim @ 0xae
.4byte ScrCmd_setdooropen .4byte ScrCmd_setdooropen @ 0xaf
.4byte ScrCmd_setdoorclosed .4byte ScrCmd_setdoorclosed @ 0xb0
.4byte ScrCmd_addelevmenuitem .4byte ScrCmd_addelevmenuitem @ 0xb1
.4byte ScrCmd_showelevmenu .4byte ScrCmd_showelevmenu @ 0xb2
.4byte ScrCmd_checkcoins .4byte ScrCmd_checkcoins @ 0xb3
.4byte ScrCmd_addcoins .4byte ScrCmd_addcoins @ 0xb4
.4byte ScrCmd_removecoins .4byte ScrCmd_removecoins @ 0xb5
.4byte ScrCmd_setwildbattle .4byte ScrCmd_setwildbattle @ 0xb6
.4byte ScrCmd_dowildbattle .4byte ScrCmd_dowildbattle @ 0xb7
.4byte ScrCmd_setvaddress .4byte ScrCmd_setvaddress @ 0xb8
.4byte ScrCmd_vgoto .4byte ScrCmd_vgoto @ 0xb9
.4byte ScrCmd_vcall .4byte ScrCmd_vcall @ 0xba
.4byte ScrCmd_vgoto_if .4byte ScrCmd_vgoto_if @ 0xbb
.4byte ScrCmd_vcall_if .4byte ScrCmd_vcall_if @ 0xbc
.4byte ScrCmd_vmessage .4byte ScrCmd_vmessage @ 0xbd
.4byte ScrCmd_vloadword .4byte ScrCmd_vbuffermessage @ 0xbe
.4byte ScrCmd_vbufferstring .4byte ScrCmd_vbufferstring @ 0xbf
.4byte ScrCmd_showcoinsbox .4byte ScrCmd_showcoinsbox @ 0xc0
.4byte ScrCmd_hidecoinsbox .4byte ScrCmd_hidecoinsbox @ 0xc1
.4byte ScrCmd_updatecoinsbox .4byte ScrCmd_updatecoinsbox @ 0xc2
.4byte ScrCmd_incrementgamestat .4byte ScrCmd_incrementgamestat @ 0xc3
.4byte ScrCmd_setescapewarp .4byte ScrCmd_setescapewarp @ 0xc4
.4byte ScrCmd_waitmoncry .4byte ScrCmd_waitmoncry @ 0xc5
.4byte ScrCmd_bufferboxname .4byte ScrCmd_bufferboxname @ 0xc6
.4byte ScrCmd_textcolor .4byte ScrCmd_textcolor @ 0xc7
.4byte ScrCmd_loadhelp .4byte ScrCmd_loadhelp @ 0xc8
.4byte ScrCmd_unloadhelp .4byte ScrCmd_unloadhelp @ 0xc9
.4byte ScrCmd_signmsg .4byte ScrCmd_signmsg @ 0xca
.4byte ScrCmd_normalmsg .4byte ScrCmd_normalmsg @ 0xcb
.4byte ScrCmd_comparestattoword .4byte ScrCmd_comparestattoword @ 0xcc
.4byte ScrCmd_setmoneventlegal .4byte ScrCmd_setmoneventlegal @ 0xcd
.4byte ScrCmd_checkmoneventlegal .4byte ScrCmd_checkmoneventlegal @ 0xce
.4byte ScrCmd_execram .4byte ScrCmd_trywondercardscript @ 0xcf
.4byte ScrCmd_setworldmapflag .4byte ScrCmd_setworldmapflag @ 0xd0
.4byte ScrCmd_warpteleport2 .4byte ScrCmd_warpspinenter @ 0xd1
.4byte ScrCmd_setmonmetlocation .4byte ScrCmd_setmonmetlocation @ 0xd2
.4byte ScrCmd_getbraillestringwidth .4byte ScrCmd_getbraillestringwidth @ 0xd3
.4byte ScrCmd_bufferitemnameplural .4byte ScrCmd_bufferitemnameplural @ 0xd4
gScriptCmdTableEnd:: gScriptCmdTableEnd::
.4byte ScrCmd_nop .4byte ScrCmd_nop
+7 -7
View File
@@ -16,7 +16,7 @@ EventScript_HideMysteryGiftMan::
CableClub_EventScript_MysteryGiftMan:: CableClub_EventScript_MysteryGiftMan::
goto_if_questlog EventScript_ReleaseEnd goto_if_questlog EventScript_ReleaseEnd
special QuestLog_CutRecording special QuestLog_CutRecording
execram trywondercardscript
@ Unused @ Unused
EventScript_MysteryGiftThankYou:: EventScript_MysteryGiftThankYou::
@@ -323,7 +323,7 @@ CableClub_EventScript_EnterColosseum::
waitdooranim waitdooranim
applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom
waitmovement 0 waitmovement 0
hideobject OBJ_EVENT_ID_PLAYER, 0 hideobjectat OBJ_EVENT_ID_PLAYER, 0
closedoor 9, 1 closedoor 9, 1
waitdooranim waitdooranim
release release
@@ -432,7 +432,7 @@ CableClub_EventScript_EnterTradeCenter::
waitdooranim waitdooranim
applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom
waitmovement 0 waitmovement 0
hideobject OBJ_EVENT_ID_PLAYER, 0 hideobjectat OBJ_EVENT_ID_PLAYER, 0
closedoor 9, 1 closedoor 9, 1
waitdooranim waitdooranim
release release
@@ -831,12 +831,12 @@ CableClub_EventScript_EnterUnionRoom::
waitdooranim waitdooranim
applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom
waitmovement 0 waitmovement 0
hideobject OBJ_EVENT_ID_PLAYER, 0 hideobjectat OBJ_EVENT_ID_PLAYER, 0
closedoor 5, 1 closedoor 5, 1
waitdooranim waitdooranim
special Script_ResetUnionRoomTrade special Script_ResetUnionRoomTrade
special SetCableClubWarp special SetCableClubWarp
warpteleport2 MAP_UNION_ROOM, 255, 7, 11 warpspinenter MAP_UNION_ROOM, 255, 7, 11
waitstate waitstate
special UnionRoomSpecial special UnionRoomSpecial
waitstate waitstate
@@ -1137,7 +1137,7 @@ CableClub_EventScript_EnterWirelessLinkRoom::
waitdooranim waitdooranim
applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom
waitmovement 0 waitmovement 0
hideobject OBJ_EVENT_ID_PLAYER, 0 hideobjectat OBJ_EVENT_ID_PLAYER, 0
closedoor 9, 1 closedoor 9, 1
waitdooranim waitdooranim
release release
@@ -1331,7 +1331,7 @@ CableClub_EventScript_EnterMinigame::
closemessage closemessage
applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterMinigameRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterMinigameRoom
waitmovement 0 waitmovement 0
hideobject OBJ_EVENT_ID_PLAYER, 0 hideobjectat OBJ_EVENT_ID_PLAYER, 0
release release
waitstate waitstate
end end
+4 -4
View File
@@ -19,7 +19,7 @@ Route5_PokemonDayCare_EventScript_TryGiveMon::
goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneMonInParty goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneMonInParty
msgbox Route5_PokemonDayCare_Text_WhichMonShouldIRaise msgbox Route5_PokemonDayCare_Text_WhichMonShouldIRaise
fadescreen FADE_TO_BLACK fadescreen FADE_TO_BLACK
hidemoneybox 0, 0 hidemoneybox
special ChooseSendDaycareMon special ChooseSendDaycareMon
waitstate waitstate
showmoneybox 0, 0, 0 showmoneybox 0, 0, 0
@@ -91,11 +91,11 @@ Route5_PokemonDayCare_EventScript_RetrieveMon::
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
specialvar VAR_RESULT, TakePokemonFromRoute5Daycare specialvar VAR_RESULT, TakePokemonFromRoute5Daycare
special SubtractMoneyFromVar0x8005 special SubtractMoneyFromVar0x8005
updatemoneybox 0, 0, 0 updatemoneybox
copyvar VAR_0x8008, VAR_RESULT copyvar VAR_0x8008, VAR_RESULT
getpartysize getpartysize
subvar VAR_RESULT, 1 subvar VAR_RESULT, 1
getpartymonname 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT
copyvar VAR_RESULT, VAR_0x8008 copyvar VAR_RESULT, VAR_0x8008
msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon
textcolor 3 textcolor 3
@@ -113,7 +113,7 @@ Route5_PokemonDayCare_EventScript_NoRoomInParty::
end end
Route5_PokemonDayCare_EventScript_CloseMoneyBox:: Route5_PokemonDayCare_EventScript_CloseMoneyBox::
hidemoneybox 0, 0 hidemoneybox
release release
end end
+15 -15
View File
@@ -5,9 +5,9 @@ EventScript_CutTree::
checkpartymove MOVE_CUT checkpartymove MOVE_CUT
compare VAR_RESULT, PARTY_SIZE compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantCutTree goto_if_eq EventScript_CantCutTree
setfieldeffectarg 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT
getpartymonname 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT
getmovename 1, MOVE_CUT buffermovename STR_VAR_2, MOVE_CUT
msgbox Text_CutTreeDown, MSGBOX_YESNO msgbox Text_CutTreeDown, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq EventScript_DontCutTree goto_if_eq EventScript_DontCutTree
@@ -65,9 +65,9 @@ EventScript_RockSmash::
checkpartymove MOVE_ROCK_SMASH checkpartymove MOVE_ROCK_SMASH
compare VAR_RESULT, PARTY_SIZE compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantSmashRock goto_if_eq EventScript_CantSmashRock
setfieldeffectarg 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT
getpartymonname 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT
getmovename 1, MOVE_ROCK_SMASH buffermovename STR_VAR_2, MOVE_ROCK_SMASH
msgbox Text_UseRockSmash, MSGBOX_YESNO msgbox Text_UseRockSmash, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq EventScript_DontSmashRock goto_if_eq EventScript_DontSmashRock
@@ -129,7 +129,7 @@ EventScript_StrengthBoulder::
checkpartymove MOVE_STRENGTH checkpartymove MOVE_STRENGTH
compare VAR_RESULT, PARTY_SIZE compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantMoveBoulder goto_if_eq EventScript_CantMoveBoulder
setfieldeffectarg 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT
msgbox Text_UseStrength, MSGBOX_YESNO msgbox Text_UseStrength, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq EventScript_DontUseStrength goto_if_eq EventScript_DontUseStrength
@@ -188,8 +188,8 @@ EventScript_Waterfall::
checkpartymove MOVE_WATERFALL checkpartymove MOVE_WATERFALL
compare VAR_RESULT, PARTY_SIZE compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_WaterCrashingDown goto_if_eq EventScript_WaterCrashingDown
getpartymonname 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectarg 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT
msgbox Text_UseWaterfall, MSGBOX_YESNO msgbox Text_UseWaterfall, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq EventScript_EndWaterfall goto_if_eq EventScript_EndWaterfall
@@ -222,9 +222,9 @@ EventScript_DeepWater::
checkpartymove MOVE_DIVE checkpartymove MOVE_DIVE
compare VAR_RESULT, PARTY_SIZE compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_MayGoUnderwater goto_if_eq EventScript_MayGoUnderwater
getpartymonname 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectarg 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT
setfieldeffectarg 1, 1 setfieldeffectargument 1, 1
msgbox Text_SeaIsDeepUseDive, MSGBOX_YESNO msgbox Text_SeaIsDeepUseDive, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq EventScript_EndDive goto_if_eq EventScript_EndDive
@@ -245,9 +245,9 @@ EventScript_TrySurface::
checkpartymove MOVE_DIVE checkpartymove MOVE_DIVE
compare VAR_RESULT, PARTY_SIZE compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantSurface goto_if_eq EventScript_CantSurface
getpartymonname 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectarg 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT
setfieldeffectarg 1, 1 setfieldeffectargument 1, 1
msgbox Text_LightFilteringUseDive, MSGBOX_YESNO msgbox Text_LightFilteringUseDive, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq EventScript_EndSurface goto_if_eq EventScript_EndSurface
+1 -1
View File
@@ -1,4 +1,4 @@
EventScript_FldEffFlash:: EventScript_FldEffFlash::
animateflash 0 animateflash 0
setflashradius 0 setflashlevel 0
end end
+1 -1
View File
@@ -455,7 +455,7 @@ TwoIsland_CapeBrink_House_EventScript_StarterTutor::
faceplayer faceplayer
goto_if_set FLAG_LEARNED_ALL_MOVES_AT_CAPE_BRINK, CapeBrinkTutor_EventScript_TaughtAllMoves goto_if_set FLAG_LEARNED_ALL_MOVES_AT_CAPE_BRINK, CapeBrinkTutor_EventScript_TaughtAllMoves
goto_if_set FLAG_TEMP_2, CapeBrinkTutor_EventScript_MoveJustTaught goto_if_set FLAG_TEMP_2, CapeBrinkTutor_EventScript_MoveJustTaught
getfirstpartymonname 0 bufferleadmonspeciesname STR_VAR_1
msgbox Text_UltimateMoveThatMon msgbox Text_UltimateMoveThatMon
specialvar VAR_RESULT, CapeBrinkGetMoveToTeachLeadPokemon specialvar VAR_RESULT, CapeBrinkGetMoveToTeachLeadPokemon
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
+17 -17
View File
@@ -17,7 +17,7 @@ Std_ObtainItem::
return return
EventScript_ObtainItemMessage:: EventScript_ObtainItemMessage::
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 bufferitemnameplural STR_VAR_2, VAR_0x8000, VAR_0x8001
checkitemtype VAR_0x8000 checkitemtype VAR_0x8000
call EventScript_BufferPocketNameTryFanfare call EventScript_BufferPocketNameTryFanfare
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
@@ -36,31 +36,31 @@ EventScript_BufferPocketNameTryFanfare::
end end
EventScript_BufferItemsPocket:: EventScript_BufferItemsPocket::
getstdstring 2, STDSTRING_ITEMS_POCKET bufferstdstring STR_VAR_3, STDSTRING_ITEMS_POCKET
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
EventScript_BufferKeyItemsPocket:: EventScript_BufferKeyItemsPocket::
getstdstring 2, STDSTRING_KEY_ITEMS_POCKET bufferstdstring STR_VAR_3, STDSTRING_KEY_ITEMS_POCKET
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
EventScript_BufferPokeBallsPocket:: EventScript_BufferPokeBallsPocket::
getstdstring 2, STDSTRING_POKEBALLS_POCKET bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS_POCKET
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
EventScript_BufferTMCase:: EventScript_BufferTMCase::
getstdstring 2, STDSTRING_TM_CASE bufferstdstring STR_VAR_3, STDSTRING_TM_CASE
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedTMHM call_if_eq EventScript_PlayFanfareObtainedTMHM
return return
EventScript_BufferBerryPouch:: EventScript_BufferBerryPouch::
getstdstring 2, STDSTRING_BERRY_POUCH bufferstdstring STR_VAR_3, STDSTRING_BERRY_POUCH
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
@@ -86,13 +86,13 @@ EventScript_PlayFanfareObtainedTMHM::
return return
Std_ObtainDecoration:: Std_ObtainDecoration::
adddecor VAR_0x8000 adddecoration VAR_0x8000
copyvar VAR_0x8007, VAR_RESULT copyvar VAR_0x8007, VAR_RESULT
call EventScript_ObtainDecorMessage call EventScript_ObtainDecorMessage
return return
EventScript_ObtainDecorMessage:: EventScript_ObtainDecorMessage::
getdecorname 1, VAR_0x8000 bufferdecorationname STR_VAR_2, VAR_0x8000
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
call_if_eq EventScript_ObtainedDecor call_if_eq EventScript_ObtainedDecor
compare VAR_0x8007, FALSE compare VAR_0x8007, FALSE
@@ -120,7 +120,7 @@ Std_FindItem::
copyvar VAR_0x8005, VAR_0x8001 copyvar VAR_0x8005, VAR_0x8001
checkitemspace VAR_0x8000, VAR_0x8001 checkitemspace VAR_0x8000, VAR_0x8001
copyvar VAR_0x8007, VAR_RESULT copyvar VAR_0x8007, VAR_RESULT
getitemname 1, VAR_0x8000 bufferitemname STR_VAR_2, VAR_0x8000
checkitemtype VAR_0x8000 checkitemtype VAR_0x8000
call EventScript_BufferPocketNameTryFanfare call EventScript_BufferPocketNameTryFanfare
compare VAR_0x8007, TRUE compare VAR_0x8007, TRUE
@@ -174,7 +174,7 @@ EventScript_HiddenItemScript::
EventScript_TryPickUpHiddenItem:: EventScript_TryPickUpHiddenItem::
additem VAR_0x8005, VAR_0x8006 additem VAR_0x8005, VAR_0x8006
copyvar VAR_0x8007, VAR_RESULT copyvar VAR_0x8007, VAR_RESULT
getitemname 1, VAR_0x8005 bufferitemname STR_VAR_2, VAR_0x8005
checkitemtype VAR_0x8005 checkitemtype VAR_0x8005
call EventScript_BufferPocketNameTryFanfare call EventScript_BufferPocketNameTryFanfare
return return
@@ -196,12 +196,12 @@ EventScript_FoundSingleItem::
return return
EventScript_FoundCoins:: EventScript_FoundCoins::
getnumberstring 0, VAR_0x8006 buffernumberstring STR_VAR_1, VAR_0x8006
message Text_FoundXCoins message Text_FoundXCoins
return return
EventScript_FoundMultipleItems:: EventScript_FoundMultipleItems::
getnumberstring 0, VAR_0x8006 buffernumberstring STR_VAR_1, VAR_0x8006
message Text_FoundXItems message Text_FoundXItems
return return
@@ -219,7 +219,7 @@ EventScript_TryPickUpHiddenCoins::
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq EventScript_HiddenCoinsButCaseIsFull goto_if_eq EventScript_HiddenCoinsButCaseIsFull
addcoins VAR_0x8006 addcoins VAR_0x8006
getstdstring 1, STDSTRING_COINS bufferstdstring STR_VAR_2, STDSTRING_COINS
call EventScript_PlayFanfareObtainedItem call EventScript_PlayFanfareObtainedItem
call EventScript_FoundCoins call EventScript_FoundCoins
waitfanfare waitfanfare
@@ -230,8 +230,8 @@ EventScript_TryPickUpHiddenCoins::
end end
EventScript_HiddenCoinsButCaseIsFull:: EventScript_HiddenCoinsButCaseIsFull::
getnumberstring 0, VAR_0x8006 buffernumberstring STR_VAR_1, VAR_0x8006
getstdstring 1, STDSTRING_COINS bufferstdstring STR_VAR_2, STDSTRING_COINS
msgbox Text_FoundXCoins msgbox Text_FoundXCoins
msgbox Text_CoinCaseIsFull msgbox Text_CoinCaseIsFull
setvar VAR_RESULT, 0 setvar VAR_RESULT, 0
@@ -239,8 +239,8 @@ EventScript_HiddenCoinsButCaseIsFull::
end end
EventScript_NoCaseForHiddenCoins:: EventScript_NoCaseForHiddenCoins::
getnumberstring 0, VAR_0x8006 buffernumberstring STR_VAR_1, VAR_0x8006
getstdstring 1, STDSTRING_COINS bufferstdstring STR_VAR_2, STDSTRING_COINS
msgbox Text_FoundXCoins msgbox Text_FoundXCoins
msgbox Text_NothingToPutThemIn msgbox Text_NothingToPutThemIn
setvar VAR_RESULT, 0 setvar VAR_RESULT, 0
+4 -4
View File
@@ -13,8 +13,8 @@ EventScript_NameReceivedBoxMon::
return return
EventScript_TransferredToPC:: EventScript_TransferredToPC::
bufferboxname 0, VAR_PC_BOX_TO_SEND_MON bufferboxname STR_VAR_1, VAR_PC_BOX_TO_SEND_MON
getspeciesname 1, VAR_TEMP_1 bufferspeciesname STR_VAR_2, VAR_TEMP_1
call_if_unset FLAG_SYS_NOT_SOMEONES_PC, EventScript_TransferredSomeonesPC call_if_unset FLAG_SYS_NOT_SOMEONES_PC, EventScript_TransferredSomeonesPC
call_if_set FLAG_SYS_NOT_SOMEONES_PC, EventScript_TransferredBillsPC call_if_set FLAG_SYS_NOT_SOMEONES_PC, EventScript_TransferredBillsPC
return return
@@ -28,7 +28,7 @@ EventScript_TransferredSomeonesPC::
EventScript_TransferredSomeonesPCBoxFull:: EventScript_TransferredSomeonesPCBoxFull::
specialvar VAR_RESULT, GetPCBoxToSendMon specialvar VAR_RESULT, GetPCBoxToSendMon
bufferboxname 2, VAR_RESULT bufferboxname STR_VAR_3, VAR_RESULT
msgbox Text_MonSentToBoxSomeonesBoxFull msgbox Text_MonSentToBoxSomeonesBoxFull
return return
@@ -41,6 +41,6 @@ EventScript_TransferredBillsPC::
EventScript_TransferredBillsPCBoxFull:: EventScript_TransferredBillsPCBoxFull::
specialvar VAR_RESULT, GetPCBoxToSendMon specialvar VAR_RESULT, GetPCBoxToSendMon
bufferboxname 2, VAR_RESULT bufferboxname STR_VAR_3, VAR_RESULT
msgbox Text_MonSentToBoxBillsBoxFull msgbox Text_MonSentToBoxBillsBoxFull
return return
+4 -4
View File
@@ -43,8 +43,8 @@ PokedexRating_EventScript_Rate::
copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006 copyvar VAR_0x8009, VAR_0x8006
copyvar VAR_0x800A, VAR_RESULT copyvar VAR_0x800A, VAR_RESULT
getnumberstring 0, VAR_0x8008 @ Num Kanto Seen buffernumberstring STR_VAR_1, VAR_0x8008 @ Num Kanto Seen
getnumberstring 1, VAR_0x8009 @ Num Kanto Caught buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Kanto Caught
msgbox PokedexRating_Text_SeenXOwnedY msgbox PokedexRating_Text_SeenXOwnedY
call_if_unset FLAG_OAKS_RATING_IS_VIA_PC, PokedexRating_EventScript_SetTextColor call_if_unset FLAG_OAKS_RATING_IS_VIA_PC, PokedexRating_EventScript_SetTextColor
call PokedexRating_EventScript_ShowRatingMsg call PokedexRating_EventScript_ShowRatingMsg
@@ -54,8 +54,8 @@ PokedexRating_EventScript_Rate::
specialvar VAR_RESULT, GetPokedexCount specialvar VAR_RESULT, GetPokedexCount
copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006 copyvar VAR_0x8009, VAR_0x8006
getnumberstring 0, VAR_0x8008 @ Num National Seen buffernumberstring STR_VAR_1, VAR_0x8008 @ Num National Seen
getnumberstring 1, VAR_0x8009 @ Num National Caught buffernumberstring STR_VAR_2, VAR_0x8009 @ Num National Caught
msgbox PokedexRating_Text_NationalDexSeenXOwnedY msgbox PokedexRating_Text_NationalDexSeenXOwnedY
specialvar VAR_RESULT, HasAllMons specialvar VAR_RESULT, HasAllMons
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
+1 -1
View File
@@ -90,7 +90,7 @@ EventScript_ChooseDestFromIslandVermilionAllowed::
EventScript_SailToDest:: EventScript_SailToDest::
specialvar VAR_RESULT, GetSeagallopNumber specialvar VAR_RESULT, GetSeagallopNumber
getnumberstring 0, VAR_RESULT buffernumberstring STR_VAR_1, VAR_RESULT
compare VAR_0x8004, SEAGALLOP_VERMILION_CITY compare VAR_0x8004, SEAGALLOP_VERMILION_CITY
goto_if_eq EventScript_DepartingVermilion goto_if_eq EventScript_DepartingVermilion
compare VAR_0x8004, SEAGALLOP_VERMILION_CITY compare VAR_0x8004, SEAGALLOP_VERMILION_CITY
+1 -1
View File
@@ -9,7 +9,7 @@ EventScript_MonFlewAway::
fadescreen FADE_TO_BLACK fadescreen FADE_TO_BLACK
removeobject VAR_LAST_TALKED removeobject VAR_LAST_TALKED
fadescreen FADE_FROM_BLACK fadescreen FADE_FROM_BLACK
getspeciesname 0, VAR_0x8004 bufferspeciesname STR_VAR_1, VAR_0x8004
msgbox Text_MonFlewAway msgbox Text_MonFlewAway
release release
end end
+2 -2
View File
@@ -3,8 +3,8 @@ EventScript_UseSurf::
checkpartymove MOVE_SURF checkpartymove MOVE_SURF
compare VAR_RESULT, PARTY_SIZE compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_UseSurfEnd goto_if_eq EventScript_UseSurfEnd
getpartymonname 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectarg 0, VAR_RESULT setfieldeffectargument 0, VAR_RESULT
lockall lockall
msgbox Text_WantToSurf, MSGBOX_YESNO msgbox Text_WantToSurf, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
+8 -8
View File
@@ -18,7 +18,7 @@ EventScript_TryDoNormalTrainerBattle::
goto EventScript_DoTrainerBattle goto EventScript_DoTrainerBattle
EventScript_NoTrainerBattle:: EventScript_NoTrainerBattle::
ontrainerbattleend gotopostbattlescript
EventScript_TryDoDoubleTrainerBattle:: EventScript_TryDoDoubleTrainerBattle::
lock lock
@@ -42,15 +42,15 @@ EventScript_NotEnoughMonsForDoubleBattle::
end end
EventScript_NoDoubleTrainerBattle:: EventScript_NoDoubleTrainerBattle::
ontrainerbattleend gotopostbattlescript
EventScript_DoNoIntroTrainerBattle:: EventScript_DoNoIntroTrainerBattle::
applymovement VAR_LAST_TALKED, Movement_RevealTrainer applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0 waitmovement 0
special PlayTrainerEncounterMusic special PlayTrainerEncounterMusic
goto_if_questlog EventScript_EndQuestLogBattle goto_if_questlog EventScript_EndQuestLogBattle
battlebegin dotrainerbattle
ontrainerbattleend gotopostbattlescript
EventScript_TryDoRematchBattle:: EventScript_TryDoRematchBattle::
call EventScript_RevealTrainer call EventScript_RevealTrainer
@@ -69,7 +69,7 @@ EventScript_TryDoRematchBattle::
end end
EventScript_NoRematchBattle:: EventScript_NoRematchBattle::
ontrainerbattleend gotopostbattlescript
EventScript_TryDoDoubleRematchBattle:: EventScript_TryDoDoubleRematchBattle::
specialvar VAR_RESULT, IsTrainerReadyForRematch specialvar VAR_RESULT, IsTrainerReadyForRematch
@@ -90,7 +90,7 @@ EventScript_TryDoDoubleRematchBattle::
end end
EventScript_NoDoubleRematchBattle:: EventScript_NoDoubleRematchBattle::
ontrainerbattleend gotopostbattlescript
EventScript_NotEnoughMonsForDoubleRematchBattle:: EventScript_NotEnoughMonsForDoubleRematchBattle::
special ShowTrainerCantBattleSpeech special ShowTrainerCantBattleSpeech
@@ -117,7 +117,7 @@ EventScript_DoTrainerBattle::
waitmessage waitmessage
waitbuttonpress waitbuttonpress
goto_if_questlog EventScript_EndQuestLogBattle goto_if_questlog EventScript_EndQuestLogBattle
battlebegin dotrainerbattle
specialvar VAR_RESULT, GetTrainerBattleMode specialvar VAR_RESULT, GetTrainerBattleMode
compare VAR_RESULT, TRAINER_BATTLE_SINGLE compare VAR_RESULT, TRAINER_BATTLE_SINGLE
goto_if_eq EventScript_EndTrainerBattle goto_if_eq EventScript_EndTrainerBattle
@@ -134,7 +134,7 @@ EventScript_EndTrainerBattle::
end end
EventScript_EndTrainerBattleContinueScript:: EventScript_EndTrainerBattleContinueScript::
ontrainerbattleendgoto gotobeatenscript
EventScript_EndQuestLogBattle:: EventScript_EndQuestLogBattle::
special SetBattledTrainerFlag special SetBattledTrainerFlag
+4 -4
View File
@@ -11,7 +11,7 @@ CeladonCity_GameCorner_EventScript_PhotoPrinter::
goto_if_eq CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto goto_if_eq CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto
playse SE_SHOP playse SE_SHOP
removemoney 50, 0 removemoney 50, 0
updatemoneybox 0, 0, 0 updatemoneybox
waitse waitse
message CeladonCity_GameCorner_Text_ChoosePrintType message CeladonCity_GameCorner_Text_ChoosePrintType
waitmessage waitmessage
@@ -51,18 +51,18 @@ CeladonCity_GameCorner_EventScript_PrintPhoto::
delay 60 delay 60
special UpdateTrainerCardPhotoIcons special UpdateTrainerCardPhotoIcons
msgbox CeladonCity_GameCorner_Text_PrintIsReadyCheckTrainerCard msgbox CeladonCity_GameCorner_Text_PrintIsReadyCheckTrainerCard
hidemoneybox 0, 0 hidemoneybox
releaseall releaseall
end end
CeladonCity_GameCorner_EventScript_DeclinePhoto:: CeladonCity_GameCorner_EventScript_DeclinePhoto::
hidemoneybox 0, 0 hidemoneybox
releaseall releaseall
end end
CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto:: CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto::
msgbox CeladonCity_GameCorner_Text_DontHaveEnoughMoney msgbox CeladonCity_GameCorner_Text_DontHaveEnoughMoney
hidemoneybox 0, 0 hidemoneybox
releaseall releaseall
end end
+1 -1
View File
@@ -297,7 +297,7 @@ TrainerTower_Roof_EventScript_ReceivePrize:
message Text_ObtainedTheX message Text_ObtainedTheX
waitfanfare waitfanfare
waitmessage waitmessage
getstdstring 2, STDSTRING_ITEMS_POCKET bufferstdstring STR_VAR_3, STDSTRING_ITEMS_POCKET
msgbox Text_PutItemAway msgbox Text_PutItemAway
call EventScript_RestorePrevTextColor call EventScript_RestorePrevTextColor
goto TrainerTower_Roof_EventScript_CheckFinalTime goto TrainerTower_Roof_EventScript_CheckFinalTime
+4
View File
@@ -12,4 +12,8 @@
#define MAP(map) MAP_GROUP(map), MAP_NUM(map) #define MAP(map) MAP_GROUP(map), MAP_NUM(map)
// Used to indicate an invalid warp id, for dummy warps or when a warp should
// use the given coordinates rather than the coordinates of a target warp.
#define WARP_ID_NONE (-1)
#endif // GUARD_CONSTANTS_MAPS_H #endif // GUARD_CONSTANTS_MAPS_H
+4 -4
View File
@@ -3,10 +3,10 @@
#include "global.h" #include "global.h"
bool8 NativeScript_WaitPlayerStopMoving(void); bool8 IsFreezePlayerFinished(void);
void ScriptFreezeObjectEvents(void); void FreezeObjects_WaitForPlayer(void);
bool8 NativeScript_WaitPlayerAndTargetNPCStopMoving(void); bool8 IsFreezeSelectedObjectAndPlayerFinished(void);
void LockSelectedObjectEvent(void); void FreezeObjects_WaitForPlayerAndSelected(void);
void ClearPlayerHeldMovementAndUnfreezeObjectEvents(void); void ClearPlayerHeldMovementAndUnfreezeObjectEvents(void);
bool8 walkrun_is_standing_still(void); bool8 walkrun_is_standing_still(void);
void UnionRoom_UnlockPlayerAndChatPartner(void); void UnionRoom_UnlockPlayerAndChatPartner(void);
+5 -5
View File
@@ -76,7 +76,7 @@ void SetSpritePosToOffsetMapCoords(s16 *, s16 *, s16, s16);
void ObjectEventClearHeldMovement(struct ObjectEvent *); void ObjectEventClearHeldMovement(struct ObjectEvent *);
void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *); void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *);
void SpawnObjectEventsInView(s16, s16); void SpawnObjectEventsInView(s16, s16);
u8 sprite_new(u8, u8, s16, s16, u8, u8); u8 CreateVirtualObject(u8, u8, s16, s16, u8, u8);
u8 AddPseudoObjectEvent(u16, SpriteCallback, s16, s16, u8); u8 AddPseudoObjectEvent(u16, SpriteCallback, s16, s16, u8);
u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup); u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup);
int SpawnSpecialObjectEventParameterized(u8, u8, u8, s16, s16, u8); int SpawnSpecialObjectEventParameterized(u8, u8, u8, s16, s16, u8);
@@ -88,11 +88,11 @@ void ObjectEventTurn(struct ObjectEvent *, u8);
void ObjectEventTurnByLocalIdAndMap(u8, u8, u8, u8); void ObjectEventTurnByLocalIdAndMap(u8, u8, u8, u8);
void ObjectEventForceSetHeldMovement(struct ObjectEvent *, u8); void ObjectEventForceSetHeldMovement(struct ObjectEvent *, u8);
const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8); const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8);
void ShowOrHideObjectByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 state); void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, u8 state);
void FreeAndReserveObjectSpritePalettes(void); void FreeAndReserveObjectSpritePalettes(void);
void SetObjectPositionByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y); void SetObjectPositionByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
void UnfixObjectPriorityByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup); void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup);
void SetObjectPriorityByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority); void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority);
void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup); void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup);
void ShiftObjectEventCoords(struct ObjectEvent *, s16, s16); void ShiftObjectEventCoords(struct ObjectEvent *, s16, s16);
void TryOverrideObjectEventTemplateCoords(u8, u8, u8); void TryOverrideObjectEventTemplateCoords(u8, u8, u8);
@@ -138,7 +138,7 @@ bool8 UpdateWalkSlowerAnim(struct Sprite *sprite);
void SetJumpSpriteData(struct Sprite *, u8, u8, u8); void SetJumpSpriteData(struct Sprite *, u8, u8, u8);
u8 DoJumpSpriteMovement(struct Sprite *); u8 DoJumpSpriteMovement(struct Sprite *);
u8 DoJumpSpecialSpriteMovement(struct Sprite *); u8 DoJumpSpecialSpriteMovement(struct Sprite *);
void TurnObjectEvent(u8, u8); void TurnVirtualObject(u8, u8);
const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId); const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId);
u8 GetFirstInactiveObjectEventId(void); u8 GetFirstInactiveObjectEventId(void);
u8 GetCollisionFlagsAtCoords(struct ObjectEvent * objectEvent, s16 x, s16 y, u8 direction); u8 GetCollisionFlagsAtCoords(struct ObjectEvent * objectEvent, s16 x, s16 y, u8 direction);
+2 -2
View File
@@ -113,11 +113,11 @@ extern struct Weather *const gWeatherPtr;
void FadeScreen(u8 mode, s8 delay); void FadeScreen(u8 mode, s8 delay);
void SetSav1Weather(u32); void SetSavedWeather(u32);
u8 GetSav1Weather(void); u8 GetSav1Weather(void);
void DoCurrentWeather(void); void DoCurrentWeather(void);
void SetSav1WeatherFromCurrMapHeader(void); void SetSavedWeatherFromCurrMapHeader(void);
void SlightlyDarkenPalsInWeather(u16 *, u16 *, u32); void SlightlyDarkenPalsInWeather(u16 *, u16 *, u32);
void PlayRainStoppingSoundEffect(void); void PlayRainStoppingSoundEffect(void);
bool8 IsWeatherNotFadingIn(void); bool8 IsWeatherNotFadingIn(void);
+8
View File
@@ -12,6 +12,14 @@
#define MAX_MAP_DATA_SIZE 0x2800 #define MAX_MAP_DATA_SIZE 0x2800
#define VIRTUAL_MAP_SIZE (MAX_MAP_DATA_SIZE) #define VIRTUAL_MAP_SIZE (MAX_MAP_DATA_SIZE)
// Map coordinates are offset by 7 when using the map
// buffer because it needs to load sufficient border
// metatiles to fill the player's view (the player has
// 7 metatiles of view horizontally in either direction).
#define MAP_OFFSET 7
#define MAP_OFFSET_W (MAP_OFFSET * 2 + 1)
#define MAP_OFFSET_H (MAP_OFFSET * 2)
extern struct BackupMapLayout VMap; extern struct BackupMapLayout VMap;
extern const struct MapLayout Route1_Layout; extern const struct MapLayout Route1_Layout;
+3 -3
View File
@@ -60,8 +60,8 @@ extern u8 gLocalLinkPlayerId;
void IncrementGameStat(u8 index); void IncrementGameStat(u8 index);
void Overworld_SetMapObjTemplateCoords(u8, s16, s16); void SetObjEventTemplateCoords(u8, s16, s16);
void Overworld_SetObjEventTemplateMovementType(u8, u8); void SetObjEventTemplateMovementType(u8, u8);
void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
@@ -77,7 +77,7 @@ u8 IsMapTypeOutdoors(u8 mapType);
void Overworld_ClearSavedMusic(void); void Overworld_ClearSavedMusic(void);
bool32 Overworld_MusicCanOverrideMapMusic(u16 song); bool32 Overworld_MusicCanOverrideMapMusic(u16 song);
void Overworld_SetFlashLevel(s32 a1); void SetFlashLevel(s32 a1);
u8 Overworld_GetFlashLevel(void); u8 Overworld_GetFlashLevel(void);
void Overworld_SetSavedMusic(u16); void Overworld_SetSavedMusic(u16);
+1 -1
View File
@@ -61,7 +61,7 @@ bool8 InitRamScript(u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objec
const u8 *GetRamScript(u8 objectId, const u8 *script); const u8 *GetRamScript(u8 objectId, const u8 *script);
bool32 ValidateRamScript(void); bool32 ValidateRamScript(void);
void MEventSetRamScript(u8 * script, u16 scriptSize); void MEventSetRamScript(u8 * script, u16 scriptSize);
u8 * sub_8069E48(void); u8 * GetSavedRamScriptIfValid(void);
void RegisterQuestLogInput(u8 var); void RegisterQuestLogInput(u8 var);
void ClearMsgBoxCancelableState(void); void ClearMsgBoxCancelableState(void);
void SetQuestLogInputIsDpadFlag(void); void SetQuestLogInputIsDpadFlag(void);
+1 -1
View File
@@ -13,7 +13,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3);
bool8 CreatePCMenu(void); bool8 CreatePCMenu(void);
void ScriptMenu_DisplayPCStartupPrompt(void); void ScriptMenu_DisplayPCStartupPrompt(void);
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); bool8 (*ScriptMenu_HidePokemonPic(void))(void);
void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void); void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void);
void PicboxCancel(void); void PicboxCancel(void);
+1 -1
View File
@@ -169,7 +169,7 @@ enum {
FONT_3, FONT_3,
FONT_4, FONT_4,
FONT_5, FONT_5,
FONT_6, FONT_BRAILLE,
}; };
enum enum
+4 -4
View File
@@ -23,7 +23,7 @@ void Task_WaitPlayerStopMoving(u8 taskId)
} }
} }
bool8 NativeScript_WaitPlayerStopMoving(void) bool8 IsFreezePlayerFinished(void)
{ {
if (FuncIsActiveTask(Task_WaitPlayerStopMoving)) if (FuncIsActiveTask(Task_WaitPlayerStopMoving))
return FALSE; return FALSE;
@@ -34,7 +34,7 @@ bool8 NativeScript_WaitPlayerStopMoving(void)
} }
} }
void ScriptFreezeObjectEvents(void) void FreezeObjects_WaitForPlayer(void)
{ {
FreezeObjectEvents(); FreezeObjectEvents();
CreateTask(Task_WaitPlayerStopMoving, 80); CreateTask(Task_WaitPlayerStopMoving, 80);
@@ -60,7 +60,7 @@ void Task_WaitPlayerAndTargetNPCStopMoving(u8 taskId)
DestroyTask(taskId); DestroyTask(taskId);
} }
bool8 NativeScript_WaitPlayerAndTargetNPCStopMoving(void) bool8 IsFreezeSelectedObjectAndPlayerFinished(void)
{ {
if (FuncIsActiveTask(Task_WaitPlayerAndTargetNPCStopMoving)) if (FuncIsActiveTask(Task_WaitPlayerAndTargetNPCStopMoving))
return FALSE; return FALSE;
@@ -71,7 +71,7 @@ bool8 NativeScript_WaitPlayerAndTargetNPCStopMoving(void)
} }
} }
void LockSelectedObjectEvent(void) void FreezeObjects_WaitForPlayerAndSelected(void)
{ {
u8 taskId; u8 taskId;
+5 -5
View File
@@ -1715,7 +1715,7 @@ u8 AddPseudoObjectEvent(u16 graphicsId, SpriteCallback callback, s16 x, s16 y, u
return spriteId; return spriteId;
} }
u8 sprite_new(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction) u8 CreateVirtualObject(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction)
{ {
u8 spriteId; u8 spriteId;
struct Sprite *sprite; struct Sprite *sprite;
@@ -2069,7 +2069,7 @@ static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *objectEvent)
} }
} }
void ShowOrHideObjectByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 state) void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, u8 state)
{ {
u8 objectEventId; u8 objectEventId;
@@ -2099,7 +2099,7 @@ void EnableObjectGroundEffectsByXY(s16 x, s16 y)
} }
} }
void SetObjectPriorityByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority) void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority)
{ {
u8 objectEventId; u8 objectEventId;
struct ObjectEvent *objectEvent; struct ObjectEvent *objectEvent;
@@ -2114,7 +2114,7 @@ void SetObjectPriorityByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 sub
} }
} }
void UnfixObjectPriorityByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup)
{ {
u8 objectEventId; u8 objectEventId;
struct ObjectEvent *objectEvent; struct ObjectEvent *objectEvent;
@@ -9252,7 +9252,7 @@ static int GetObjectEventSpriteId(u8 objectEventId)
return MAX_SPRITES; return MAX_SPRITES;
} }
void TurnObjectEvent(u8 objectEventId, u8 direction) void TurnVirtualObject(u8 objectEventId, u8 direction)
{ {
u8 animNum; u8 animNum;
u8 spriteId = GetObjectEventSpriteId(objectEventId); u8 spriteId = GetObjectEventSpriteId(objectEventId);
+1 -1
View File
@@ -2419,7 +2419,7 @@ static void MoveDeoxysObject(u8 num)
else else
gFieldEffectArguments[5] = 5; gFieldEffectArguments[5] = 5;
FieldEffectStart(FLDEFF_MOVE_DEOXYS_ROCK); FieldEffectStart(FLDEFF_MOVE_DEOXYS_ROCK);
Overworld_SetMapObjTemplateCoords(1, sDeoxysCoords[num][0], sDeoxysCoords[num][1]); SetObjEventTemplateCoords(1, sDeoxysCoords[num][0], sDeoxysCoords[num][1]);
} }
static void Task_WaitDeoxysFieldEffect(u8 taskId) static void Task_WaitDeoxysFieldEffect(u8 taskId)
+4 -4
View File
@@ -6,7 +6,7 @@
static u8 TranslateWeatherNum(u8 weather); static u8 TranslateWeatherNum(u8 weather);
static void UpdateRainCounter(u8 newWeather, u8 oldWeather); static void UpdateRainCounter(u8 newWeather, u8 oldWeather);
void SetSav1Weather(u32 weather) void SetSavedWeather(u32 weather)
{ {
u8 oldWeather = gSaveBlock1Ptr->weather; u8 oldWeather = gSaveBlock1Ptr->weather;
gSaveBlock1Ptr->weather = TranslateWeatherNum(weather); gSaveBlock1Ptr->weather = TranslateWeatherNum(weather);
@@ -18,7 +18,7 @@ u8 GetSav1Weather(void)
return gSaveBlock1Ptr->weather; return gSaveBlock1Ptr->weather;
} }
void SetSav1WeatherFromCurrMapHeader(void) void SetSavedWeatherFromCurrMapHeader(void)
{ {
u8 oldWeather = gSaveBlock1Ptr->weather; u8 oldWeather = gSaveBlock1Ptr->weather;
gSaveBlock1Ptr->weather = TranslateWeatherNum(gMapHeader.weather); gSaveBlock1Ptr->weather = TranslateWeatherNum(gMapHeader.weather);
@@ -27,13 +27,13 @@ void SetSav1WeatherFromCurrMapHeader(void)
void SetWeather(u32 weather) void SetWeather(u32 weather)
{ {
SetSav1Weather(weather); SetSavedWeather(weather);
SetNextWeather(GetSav1Weather()); SetNextWeather(GetSav1Weather());
} }
void SetWeather_Unused(u32 weather) void SetWeather_Unused(u32 weather)
{ {
SetSav1Weather(weather); SetSavedWeather(weather);
SetCurrentAndNextWeather(GetSav1Weather()); SetCurrentAndNextWeather(GetSav1Weather());
} }
+1 -1
View File
@@ -251,7 +251,7 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr)
break; break;
case 28: case 28:
AGB_ASSERT_EX(cmd->flag == FALSE && cmd->parameter == NULL, ABSPATH("mevent_server.c"), 517); AGB_ASSERT_EX(cmd->flag == FALSE && cmd->parameter == NULL, ABSPATH("mevent_server.c"), 517);
svr->sendBuffer1 = sub_8069E48(); svr->sendBuffer1 = GetSavedRamScriptIfValid();
break; break;
case 29: case 29:
mevent_srv_common_init_send(svr, 0x1b, cmd->parameter, cmd->flag); mevent_srv_common_init_send(svr, 0x1b, cmd->parameter, cmd->flag);
+6 -6
View File
@@ -438,7 +438,7 @@ static void LoadSaveblockObjEventScripts(void)
} }
} }
void Overworld_SetMapObjTemplateCoords(u8 localId, s16 x, s16 y) void SetObjEventTemplateCoords(u8 localId, s16 x, s16 y)
{ {
int i; int i;
struct ObjectEventTemplate * savObjTemplates = gSaveBlock1Ptr->objectEventTemplates; struct ObjectEventTemplate * savObjTemplates = gSaveBlock1Ptr->objectEventTemplates;
@@ -453,7 +453,7 @@ void Overworld_SetMapObjTemplateCoords(u8 localId, s16 x, s16 y)
} }
} }
void Overworld_SetObjEventTemplateMovementType(u8 localId, u8 movementType) void SetObjEventTemplateMovementType(u8 localId, u8 movementType)
{ {
s32 i; s32 i;
@@ -756,7 +756,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum)
ResetCyclingRoadChallengeData(); ResetCyclingRoadChallengeData();
RestartWildEncounterImmunitySteps(); RestartWildEncounterImmunitySteps();
MapResetTrainerRematches(mapGroup, mapNum); MapResetTrainerRematches(mapGroup, mapNum);
SetSav1WeatherFromCurrMapHeader(); SetSavedWeatherFromCurrMapHeader();
ChooseAmbientCrySpecies(); ChooseAmbientCrySpecies();
SetDefaultFlashLevel(); SetDefaultFlashLevel();
Overworld_ClearSavedMusic(); Overworld_ClearSavedMusic();
@@ -791,7 +791,7 @@ static void LoadMapFromWarp(bool32 unused)
ResetCyclingRoadChallengeData(); ResetCyclingRoadChallengeData();
RestartWildEncounterImmunitySteps(); RestartWildEncounterImmunitySteps();
MapResetTrainerRematches(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum); MapResetTrainerRematches(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum);
SetSav1WeatherFromCurrMapHeader(); SetSavedWeatherFromCurrMapHeader();
ChooseAmbientCrySpecies(); ChooseAmbientCrySpecies();
if (isOutdoors) if (isOutdoors)
FlagClear(FLAG_SYS_FLASH_ACTIVE); FlagClear(FLAG_SYS_FLASH_ACTIVE);
@@ -813,7 +813,7 @@ static void sub_80559A8(void)
LoadObjEventTemplatesFromHeader(); LoadObjEventTemplatesFromHeader();
isOutdoors = IsMapTypeOutdoors(gMapHeader.mapType); isOutdoors = IsMapTypeOutdoors(gMapHeader.mapType);
TrySetMapSaveWarpStatus(); TrySetMapSaveWarpStatus();
SetSav1WeatherFromCurrMapHeader(); SetSavedWeatherFromCurrMapHeader();
ChooseAmbientCrySpecies(); ChooseAmbientCrySpecies();
SetDefaultFlashLevel(); SetDefaultFlashLevel();
sub_8110920(); sub_8110920();
@@ -956,7 +956,7 @@ static void SetDefaultFlashLevel(void)
gSaveBlock1Ptr->flashLevel = gMaxFlashLevel; gSaveBlock1Ptr->flashLevel = gMaxFlashLevel;
} }
void Overworld_SetFlashLevel(s32 flashLevel) void SetFlashLevel(s32 flashLevel)
{ {
if (flashLevel < 0 || flashLevel > gMaxFlashLevel) if (flashLevel < 0 || flashLevel > gMaxFlashLevel)
flashLevel = 0; flashLevel = 0;
+2 -2
View File
@@ -439,7 +439,7 @@ void CreateGroupMemberObjectsInvisible(u8 * sprite_ids, s32 group)
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
{ {
s32 obj_id = 5 * group + i; s32 obj_id = 5 * group + i;
sprite_ids[obj_id] = sprite_new(OBJ_EVENT_GFX_MAN, obj_id - 0x38, sUnionPartnerCoords[group][0] + sFacingDirectionOffsets[i][0], sUnionPartnerCoords[group][1] + sFacingDirectionOffsets[i][1], 3, 1); sprite_ids[obj_id] = CreateVirtualObject(OBJ_EVENT_GFX_MAN, obj_id - 0x38, sUnionPartnerCoords[group][0] + sFacingDirectionOffsets[i][0], sUnionPartnerCoords[group][1] + sFacingDirectionOffsets[i][1], 3, 1);
RfuUnionObjectToggleInvisibility(obj_id - 0x38, TRUE); RfuUnionObjectToggleInvisibility(obj_id - 0x38, TRUE);
} }
} }
@@ -653,7 +653,7 @@ bool32 RfuUnionTool_GetGroupAndMemberInFrontOfPlayer(struct UnkStruct_Main0 *mai
static void UnionPartnerObjectSetFacing(s32 member, s32 group, u8 direction) static void UnionPartnerObjectSetFacing(s32 member, s32 group, u8 direction)
{ {
TurnObjectEvent(5 * group - 0x38 + member, direction); TurnVirtualObject(5 * group - 0x38 + member, direction);
} }
void UpdateUnionGroupMemberFacing(u32 member, u32 group, struct UnkStruct_Main0 *main0_p) void UpdateUnionGroupMemberFacing(u32 member, u32 group, struct UnkStruct_Main0 *main0_p)
+149 -158
View File
@@ -9,6 +9,7 @@
#include "field_screen_effect.h" #include "field_screen_effect.h"
#include "quest_log.h" #include "quest_log.h"
#include "map_preview_screen.h" #include "map_preview_screen.h"
#include "fieldmap.h"
#include "field_weather.h" #include "field_weather.h"
#include "field_tasks.h" #include "field_tasks.h"
#include "field_fadetransition.h" #include "field_fadetransition.h"
@@ -34,6 +35,7 @@
#include "fieldmap.h" #include "fieldmap.h"
#include "field_door.h" #include "field_door.h"
#include "constants/event_objects.h" #include "constants/event_objects.h"
#include "constants/maps.h"
#include "constants/sound.h" #include "constants/sound.h"
extern u16 (*const gSpecials[])(void); extern u16 (*const gSpecials[])(void);
@@ -44,12 +46,12 @@ extern const u8 *const gStdScriptsEnd[];
static bool8 ScriptContext_NextCommandEndsScript(struct ScriptContext * ctx); static bool8 ScriptContext_NextCommandEndsScript(struct ScriptContext * ctx);
static u8 ScriptContext_GetQuestLogInput(struct ScriptContext * ctx); static u8 ScriptContext_GetQuestLogInput(struct ScriptContext * ctx);
static EWRAM_DATA ptrdiff_t gVScriptOffset = 0; static EWRAM_DATA ptrdiff_t sAddressOffset = 0; // For relative addressing in vgoto etc., used by saved scripts (e.g. Mystery Event)
static EWRAM_DATA u8 sQuestLogWaitButtonPressTimer = 0; static EWRAM_DATA u8 sQuestLogWaitButtonPressTimer = 0;
static EWRAM_DATA u16 sPauseCounter = 0; static EWRAM_DATA u16 sPauseCounter = 0;
static EWRAM_DATA u16 sMovingNpcId = 0; static EWRAM_DATA u16 sMovingNpcId = 0;
static EWRAM_DATA u16 sMovingNpcMapBank = 0; static EWRAM_DATA u16 sMovingNpcMapGroup = 0;
static EWRAM_DATA u16 sMovingNpcMapId = 0; static EWRAM_DATA u16 sMovingNpcMapNum = 0;
static EWRAM_DATA u16 sFieldEffectScriptId = 0; static EWRAM_DATA u16 sFieldEffectScriptId = 0;
struct ScriptContext * sQuestLogScriptContextPtr; struct ScriptContext * sQuestLogScriptContextPtr;
@@ -95,7 +97,7 @@ bool8 ScrCmd_gotonative(struct ScriptContext * ctx)
bool8 ScrCmd_special(struct ScriptContext * ctx) bool8 ScrCmd_special(struct ScriptContext * ctx)
{ {
u16 (*const *specialPtr)(void) = gSpecials + ScriptReadHalfword(ctx); u16 (*const *specialPtr)(void) = &gSpecials[ScriptReadHalfword(ctx)];
if (specialPtr < gSpecialsEnd) if (specialPtr < gSpecialsEnd)
(*specialPtr)(); (*specialPtr)();
else else
@@ -106,7 +108,7 @@ bool8 ScrCmd_special(struct ScriptContext * ctx)
bool8 ScrCmd_specialvar(struct ScriptContext * ctx) bool8 ScrCmd_specialvar(struct ScriptContext * ctx)
{ {
u16 * varPtr = GetVarPointer(ScriptReadHalfword(ctx)); u16 * varPtr = GetVarPointer(ScriptReadHalfword(ctx));
u16 (*const *specialPtr)(void) = gSpecials + ScriptReadHalfword(ctx); u16 (*const *specialPtr)(void) = &gSpecials[ScriptReadHalfword(ctx)];
if (specialPtr < gSpecialsEnd) if (specialPtr < gSpecialsEnd)
*varPtr = (*specialPtr)(); *varPtr = (*specialPtr)();
else else
@@ -170,28 +172,28 @@ bool8 ScrCmd_setvaddress(struct ScriptContext * ctx)
u32 addr1 = (u32)ctx->scriptPtr - 1; u32 addr1 = (u32)ctx->scriptPtr - 1;
u32 addr2 = ScriptReadWord(ctx); u32 addr2 = ScriptReadWord(ctx);
gVScriptOffset = addr2 - addr1; sAddressOffset = addr2 - addr1;
return FALSE; return FALSE;
} }
bool8 ScrCmd_vgoto(struct ScriptContext * ctx) bool8 ScrCmd_vgoto(struct ScriptContext * ctx)
{ {
const u8 * scrptr = (const u8 *)ScriptReadWord(ctx); const u8 * scrptr = (const u8 *)ScriptReadWord(ctx);
ScriptJump(ctx, scrptr - gVScriptOffset); ScriptJump(ctx, scrptr - sAddressOffset);
return FALSE; return FALSE;
} }
bool8 ScrCmd_vcall(struct ScriptContext * ctx) bool8 ScrCmd_vcall(struct ScriptContext * ctx)
{ {
const u8 * scrptr = (const u8 *)ScriptReadWord(ctx); const u8 * scrptr = (const u8 *)ScriptReadWord(ctx);
ScriptCall(ctx, scrptr - gVScriptOffset); ScriptCall(ctx, scrptr - sAddressOffset);
return FALSE; return FALSE;
} }
bool8 ScrCmd_vgoto_if(struct ScriptContext * ctx) bool8 ScrCmd_vgoto_if(struct ScriptContext * ctx)
{ {
u8 condition = ScriptReadByte(ctx); u8 condition = ScriptReadByte(ctx);
const u8 * scrptr = (const u8 *)ScriptReadWord(ctx) - gVScriptOffset; const u8 * scrptr = (const u8 *)ScriptReadWord(ctx) - sAddressOffset;
if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) if (sScriptConditionTable[condition][ctx->comparisonResult] == 1)
ScriptJump(ctx, scrptr); ScriptJump(ctx, scrptr);
return FALSE; return FALSE;
@@ -200,7 +202,7 @@ bool8 ScrCmd_vgoto_if(struct ScriptContext * ctx)
bool8 ScrCmd_vcall_if(struct ScriptContext * ctx) bool8 ScrCmd_vcall_if(struct ScriptContext * ctx)
{ {
u8 condition = ScriptReadByte(ctx); u8 condition = ScriptReadByte(ctx);
const u8 * scrptr = (const u8 *)ScriptReadWord(ctx) - gVScriptOffset; const u8 * scrptr = (const u8 *)ScriptReadWord(ctx) - sAddressOffset;
if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) if (sScriptConditionTable[condition][ctx->comparisonResult] == 1)
ScriptCall(ctx, scrptr); ScriptCall(ctx, scrptr);
return FALSE; return FALSE;
@@ -209,7 +211,7 @@ bool8 ScrCmd_vcall_if(struct ScriptContext * ctx)
bool8 ScrCmd_gotostd(struct ScriptContext * ctx) bool8 ScrCmd_gotostd(struct ScriptContext * ctx)
{ {
u8 stdIdx = ScriptReadByte(ctx); u8 stdIdx = ScriptReadByte(ctx);
const u8 *const * script = gStdScripts + stdIdx; const u8 *const * script = &gStdScripts[stdIdx];
if (script < gStdScriptsEnd) if (script < gStdScriptsEnd)
ScriptJump(ctx, *script); ScriptJump(ctx, *script);
return FALSE; return FALSE;
@@ -218,7 +220,7 @@ bool8 ScrCmd_gotostd(struct ScriptContext * ctx)
bool8 ScrCmd_callstd(struct ScriptContext * ctx) bool8 ScrCmd_callstd(struct ScriptContext * ctx)
{ {
u8 stdIdx = ScriptReadByte(ctx); u8 stdIdx = ScriptReadByte(ctx);
const u8 *const * script = gStdScripts + stdIdx; const u8 *const * script = &gStdScripts[stdIdx];
if (script < gStdScriptsEnd) if (script < gStdScriptsEnd)
ScriptCall(ctx, *script); ScriptCall(ctx, *script);
return FALSE; return FALSE;
@@ -250,13 +252,13 @@ bool8 ScrCmd_callstd_if(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_gotoram(struct ScriptContext * ctx) bool8 ScrCmd_returnram(struct ScriptContext * ctx)
{ {
ScriptJump(ctx, gRAMScriptPtr); ScriptJump(ctx, gRAMScriptPtr);
return FALSE; return FALSE;
} }
bool8 ScrCmd_killscript(struct ScriptContext * ctx) bool8 ScrCmd_endram(struct ScriptContext * ctx)
{ {
ClearRamScript(); ClearRamScript();
StopScript(ctx); StopScript(ctx);
@@ -269,9 +271,9 @@ bool8 ScrCmd_setmysteryeventstatus(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_execram(struct ScriptContext * ctx) bool8 ScrCmd_trywondercardscript(struct ScriptContext * ctx)
{ {
const u8 * script = sub_8069E48(); const u8 * script = GetSavedRamScriptIfValid();
if (script != NULL) if (script != NULL)
{ {
gRAMScriptPtr = ctx->scriptPtr; gRAMScriptPtr = ctx->scriptPtr;
@@ -282,19 +284,19 @@ bool8 ScrCmd_execram(struct ScriptContext * ctx)
bool8 ScrCmd_loadword(struct ScriptContext * ctx) bool8 ScrCmd_loadword(struct ScriptContext * ctx)
{ {
u8 which = ScriptReadByte(ctx); u8 index = ScriptReadByte(ctx);
ctx->data[which] = ScriptReadWord(ctx); ctx->data[index] = ScriptReadWord(ctx);
return FALSE; return FALSE;
} }
bool8 ScrCmd_loadbytefromaddr(struct ScriptContext * ctx) bool8 ScrCmd_loadbytefromptr(struct ScriptContext * ctx)
{ {
u8 which = ScriptReadByte(ctx); u8 index = ScriptReadByte(ctx);
ctx->data[which] = *(const u8 *)ScriptReadWord(ctx); ctx->data[index] = *(const u8 *)ScriptReadWord(ctx);
return FALSE; return FALSE;
} }
bool8 ScrCmd_writebytetoaddr(struct ScriptContext * ctx) bool8 ScrCmd_setptr(struct ScriptContext * ctx)
{ {
u8 value = ScriptReadByte(ctx); u8 value = ScriptReadByte(ctx);
*(u8 *)ScriptReadWord(ctx) = value; *(u8 *)ScriptReadWord(ctx) = value;
@@ -303,23 +305,23 @@ bool8 ScrCmd_writebytetoaddr(struct ScriptContext * ctx)
bool8 ScrCmd_loadbyte(struct ScriptContext * ctx) bool8 ScrCmd_loadbyte(struct ScriptContext * ctx)
{ {
u8 which = ScriptReadByte(ctx); u8 index = ScriptReadByte(ctx);
ctx->data[which] = ScriptReadByte(ctx); ctx->data[index] = ScriptReadByte(ctx);
return FALSE; return FALSE;
} }
bool8 ScrCmd_setptrbyte(struct ScriptContext * ctx) bool8 ScrCmd_setptrbyte(struct ScriptContext * ctx)
{ {
u8 which = ScriptReadByte(ctx); u8 index = ScriptReadByte(ctx);
*(u8 *)ScriptReadWord(ctx) = ctx->data[which]; *(u8 *)ScriptReadWord(ctx) = ctx->data[index];
return FALSE; return FALSE;
} }
bool8 ScrCmd_copylocal(struct ScriptContext * ctx) bool8 ScrCmd_copylocal(struct ScriptContext * ctx)
{ {
u8 whichDst = ScriptReadByte(ctx); u8 destIndex = ScriptReadByte(ctx);
u8 whichSrc = ScriptReadByte(ctx); u8 srcIndex = ScriptReadByte(ctx);
ctx->data[whichDst] = ctx->data[whichSrc]; ctx->data[destIndex] = ctx->data[srcIndex];
return FALSE; return FALSE;
} }
@@ -352,69 +354,67 @@ bool8 ScrCmd_setorcopyvar(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
u8 compare_012(u16 left, u16 right) static u8 Compare(u16 a, u16 b)
{ {
if (left < right) if (a < b)
return 0; return 0;
else if (left == right) else if (a == b)
return 1; return 1;
else else
return 2; return 2;
} }
// comparelocaltolocal
bool8 ScrCmd_compare_local_to_local(struct ScriptContext * ctx) bool8 ScrCmd_compare_local_to_local(struct ScriptContext * ctx)
{ {
const u8 value1 = ctx->data[ScriptReadByte(ctx)]; const u8 value1 = ctx->data[ScriptReadByte(ctx)];
const u8 value2 = ctx->data[ScriptReadByte(ctx)]; const u8 value2 = ctx->data[ScriptReadByte(ctx)];
ctx->comparisonResult = compare_012(value1, value2); ctx->comparisonResult = Compare(value1, value2);
return FALSE; return FALSE;
} }
// comparelocaltoimm
bool8 ScrCmd_compare_local_to_value(struct ScriptContext * ctx) bool8 ScrCmd_compare_local_to_value(struct ScriptContext * ctx)
{ {
const u8 value1 = ctx->data[ScriptReadByte(ctx)]; const u8 value1 = ctx->data[ScriptReadByte(ctx)];
const u8 value2 = ScriptReadByte(ctx); const u8 value2 = ScriptReadByte(ctx);
ctx->comparisonResult = compare_012(value1, value2); ctx->comparisonResult = Compare(value1, value2);
return FALSE; return FALSE;
} }
bool8 ScrCmd_compare_local_to_addr(struct ScriptContext * ctx) bool8 ScrCmd_compare_local_to_ptr(struct ScriptContext * ctx)
{ {
const u8 value1 = ctx->data[ScriptReadByte(ctx)]; const u8 value1 = ctx->data[ScriptReadByte(ctx)];
const u8 value2 = *(const u8 *)ScriptReadWord(ctx); const u8 value2 = *(const u8 *)ScriptReadWord(ctx);
ctx->comparisonResult = compare_012(value1, value2); ctx->comparisonResult = Compare(value1, value2);
return FALSE; return FALSE;
} }
bool8 ScrCmd_compare_addr_to_local(struct ScriptContext * ctx) bool8 ScrCmd_compare_ptr_to_local(struct ScriptContext * ctx)
{ {
const u8 value1 = *(const u8 *)ScriptReadWord(ctx); const u8 value1 = *(const u8 *)ScriptReadWord(ctx);
const u8 value2 = ctx->data[ScriptReadByte(ctx)]; const u8 value2 = ctx->data[ScriptReadByte(ctx)];
ctx->comparisonResult = compare_012(value1, value2); ctx->comparisonResult = Compare(value1, value2);
return FALSE; return FALSE;
} }
bool8 ScrCmd_compare_addr_to_value(struct ScriptContext * ctx) bool8 ScrCmd_compare_ptr_to_value(struct ScriptContext * ctx)
{ {
const u8 value1 = *(const u8 *)ScriptReadWord(ctx); const u8 value1 = *(const u8 *)ScriptReadWord(ctx);
const u8 value2 = ScriptReadByte(ctx); const u8 value2 = ScriptReadByte(ctx);
ctx->comparisonResult = compare_012(value1, value2); ctx->comparisonResult = Compare(value1, value2);
return FALSE; return FALSE;
} }
bool8 ScrCmd_compare_addr_to_addr(struct ScriptContext * ctx) bool8 ScrCmd_compare_ptr_to_ptr(struct ScriptContext * ctx)
{ {
const u8 value1 = *(const u8 *)ScriptReadWord(ctx); const u8 value1 = *(const u8 *)ScriptReadWord(ctx);
const u8 value2 = *(const u8 *)ScriptReadWord(ctx); const u8 value2 = *(const u8 *)ScriptReadWord(ctx);
ctx->comparisonResult = compare_012(value1, value2); ctx->comparisonResult = Compare(value1, value2);
return FALSE; return FALSE;
} }
@@ -423,7 +423,7 @@ bool8 ScrCmd_compare_var_to_value(struct ScriptContext * ctx)
const u16 value1 = *GetVarPointer(ScriptReadHalfword(ctx)); const u16 value1 = *GetVarPointer(ScriptReadHalfword(ctx));
const u16 value2 = ScriptReadHalfword(ctx); const u16 value2 = ScriptReadHalfword(ctx);
ctx->comparisonResult = compare_012(value1, value2); ctx->comparisonResult = Compare(value1, value2);
return FALSE; return FALSE;
} }
@@ -432,10 +432,11 @@ bool8 ScrCmd_compare_var_to_var(struct ScriptContext * ctx)
const u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx)); const u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx));
const u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx)); const u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx));
ctx->comparisonResult = compare_012(*ptr1, *ptr2); ctx->comparisonResult = Compare(*ptr1, *ptr2);
return FALSE; return FALSE;
} }
// Note: addvar doesn't support adding from a variable in vanilla.
bool8 ScrCmd_addvar(struct ScriptContext * ctx) bool8 ScrCmd_addvar(struct ScriptContext * ctx)
{ {
u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx)); u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx));
@@ -521,7 +522,7 @@ bool8 ScrCmd_checkpcitem(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_givedecoration(struct ScriptContext * ctx) bool8 ScrCmd_adddecoration(struct ScriptContext * ctx)
{ {
u32 decorId = VarGet(ScriptReadHalfword(ctx)); u32 decorId = VarGet(ScriptReadHalfword(ctx));
@@ -529,7 +530,7 @@ bool8 ScrCmd_givedecoration(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_takedecoration(struct ScriptContext * ctx) bool8 ScrCmd_removedecoration(struct ScriptContext * ctx)
{ {
u32 decorId = VarGet(ScriptReadHalfword(ctx)); u32 decorId = VarGet(ScriptReadHalfword(ctx));
@@ -607,11 +608,9 @@ bool8 ScrCmd_animateflash(struct ScriptContext * ctx)
return TRUE; return TRUE;
} }
bool8 ScrCmd_setflashradius(struct ScriptContext * ctx) bool8 ScrCmd_setflashlevel(struct ScriptContext * ctx)
{ {
u16 flashLevel = VarGet(ScriptReadHalfword(ctx)); SetFlashLevel(VarGet(ScriptReadHalfword(ctx)));
Overworld_SetFlashLevel(flashLevel);
return FALSE; return FALSE;
} }
@@ -642,9 +641,7 @@ bool8 ScrCmd_fadescreenspeed(struct ScriptContext * ctx)
static bool8 RunPauseTimer(void) static bool8 RunPauseTimer(void)
{ {
sPauseCounter--; if (--sPauseCounter == 0)
if (sPauseCounter == 0)
return TRUE; return TRUE;
else else
return FALSE; return FALSE;
@@ -666,7 +663,7 @@ bool8 ScrCmd_initclock(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_dodailyevents(struct ScriptContext * ctx) bool8 ScrCmd_dotimebasedevents(struct ScriptContext * ctx)
{ {
// DoTimeBasedEvents(); // DoTimeBasedEvents();
return FALSE; return FALSE;
@@ -688,13 +685,13 @@ bool8 ScrCmd_setweather(struct ScriptContext * ctx)
{ {
u16 weather = VarGet(ScriptReadHalfword(ctx)); u16 weather = VarGet(ScriptReadHalfword(ctx));
SetSav1Weather(weather); SetSavedWeather(weather);
return FALSE; return FALSE;
} }
bool8 ScrCmd_resetweather(struct ScriptContext * ctx) bool8 ScrCmd_resetweather(struct ScriptContext * ctx)
{ {
SetSav1WeatherFromCurrMapHeader(); SetSavedWeatherFromCurrMapHeader();
return FALSE; return FALSE;
} }
@@ -768,10 +765,10 @@ bool8 ScrCmd_warphole(struct ScriptContext * ctx)
u16 y; u16 y;
PlayerGetDestCoords(&x, &y); PlayerGetDestCoords(&x, &y);
if (mapGroup == 0xFF && mapNum == 0xFF) if (mapGroup == MAP_GROUP(UNDEFINED) && mapNum == MAP_NUM(UNDEFINED))
SetWarpDestinationToFixedHoleWarp(x - 7, y - 7); SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET);
else else
SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7); SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, x - MAP_OFFSET, y - MAP_OFFSET);
DoFallWarp(); DoFallWarp();
ResetInitialPlayerAvatarState(); ResetInitialPlayerAvatarState();
return TRUE; return TRUE;
@@ -791,7 +788,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext * ctx)
return TRUE; return TRUE;
} }
bool8 ScrCmd_warpteleport2(struct ScriptContext * ctx) bool8 ScrCmd_warpspinenter(struct ScriptContext * ctx)
{ {
u8 mapGroup = ScriptReadByte(ctx); u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx);
@@ -922,11 +919,11 @@ bool8 ScrCmd_waitfanfare(struct ScriptContext * ctx)
bool8 ScrCmd_playbgm(struct ScriptContext * ctx) bool8 ScrCmd_playbgm(struct ScriptContext * ctx)
{ {
u16 songId = ScriptReadHalfword(ctx); u16 songId = ScriptReadHalfword(ctx);
bool8 val = ScriptReadByte(ctx); bool8 save = ScriptReadByte(ctx);
if (QL_IS_PLAYBACK_STATE) if (QL_IS_PLAYBACK_STATE)
return FALSE; return FALSE;
if (val == TRUE) if (save == TRUE)
Overworld_SetSavedMusic(songId); Overworld_SetSavedMusic(songId);
PlayNewMapMusic(songId); PlayNewMapMusic(songId);
return FALSE; return FALSE;
@@ -992,7 +989,7 @@ bool8 ScrCmd_applymovement(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_applymovement_at(struct ScriptContext * ctx) bool8 ScrCmd_applymovementat(struct ScriptContext * ctx)
{ {
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
const void *movementScript = (const void *)ScriptReadWord(ctx); const void *movementScript = (const void *)ScriptReadWord(ctx);
@@ -1006,7 +1003,7 @@ bool8 ScrCmd_applymovement_at(struct ScriptContext * ctx)
static bool8 WaitForMovementFinish(void) static bool8 WaitForMovementFinish(void)
{ {
return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapId, sMovingNpcMapBank); return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapNum, sMovingNpcMapGroup);
} }
bool8 ScrCmd_waitmovement(struct ScriptContext * ctx) bool8 ScrCmd_waitmovement(struct ScriptContext * ctx)
@@ -1015,13 +1012,13 @@ bool8 ScrCmd_waitmovement(struct ScriptContext * ctx)
if (localId != 0) if (localId != 0)
sMovingNpcId = localId; sMovingNpcId = localId;
sMovingNpcMapBank = gSaveBlock1Ptr->location.mapGroup; sMovingNpcMapGroup = gSaveBlock1Ptr->location.mapGroup;
sMovingNpcMapId = gSaveBlock1Ptr->location.mapNum; sMovingNpcMapNum = gSaveBlock1Ptr->location.mapNum;
SetupNativeScript(ctx, WaitForMovementFinish); SetupNativeScript(ctx, WaitForMovementFinish);
return TRUE; return TRUE;
} }
bool8 ScrCmd_waitmovement_at(struct ScriptContext * ctx) bool8 ScrCmd_waitmovementat(struct ScriptContext * ctx)
{ {
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapBank; u8 mapBank;
@@ -1031,8 +1028,8 @@ bool8 ScrCmd_waitmovement_at(struct ScriptContext * ctx)
sMovingNpcId = localId; sMovingNpcId = localId;
mapBank = ScriptReadByte(ctx); mapBank = ScriptReadByte(ctx);
mapId = ScriptReadByte(ctx); mapId = ScriptReadByte(ctx);
sMovingNpcMapBank = mapBank; sMovingNpcMapGroup = mapBank;
sMovingNpcMapId = mapId; sMovingNpcMapNum = mapId;
SetupNativeScript(ctx, WaitForMovementFinish); SetupNativeScript(ctx, WaitForMovementFinish);
return TRUE; return TRUE;
} }
@@ -1045,7 +1042,7 @@ bool8 ScrCmd_removeobject(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_removeobject_at(struct ScriptContext * ctx) bool8 ScrCmd_removeobjectat(struct ScriptContext * ctx)
{ {
u16 objectId = VarGet(ScriptReadHalfword(ctx)); u16 objectId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx); u8 mapGroup = ScriptReadByte(ctx);
@@ -1063,7 +1060,7 @@ bool8 ScrCmd_addobject(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_addobject_at(struct ScriptContext * ctx) bool8 ScrCmd_addobjectat(struct ScriptContext * ctx)
{ {
u16 objectId = VarGet(ScriptReadHalfword(ctx)); u16 objectId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx); u8 mapGroup = ScriptReadByte(ctx);
@@ -1089,11 +1086,11 @@ bool8 ScrCmd_setobjectxyperm(struct ScriptContext * ctx)
u16 x = VarGet(ScriptReadHalfword(ctx)); u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx));
Overworld_SetMapObjTemplateCoords(localId, x, y); SetObjEventTemplateCoords(localId, x, y);
return FALSE; return FALSE;
} }
bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext * ctx) bool8 ScrCmd_copyobjectxytoperm(struct ScriptContext * ctx)
{ {
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
@@ -1101,44 +1098,44 @@ bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_showobject_at(struct ScriptContext * ctx) bool8 ScrCmd_showobjectat(struct ScriptContext * ctx)
{ {
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx); u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx);
ShowOrHideObjectByLocalIdAndMap(localId, mapNum, mapGroup, 0); SetObjectInvisibility(localId, mapNum, mapGroup, FALSE);
return FALSE; return FALSE;
} }
bool8 ScrCmd_hideobject_at(struct ScriptContext * ctx) bool8 ScrCmd_hideobjectat(struct ScriptContext * ctx)
{ {
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx); u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx);
ShowOrHideObjectByLocalIdAndMap(localId, mapNum, mapGroup, 1); SetObjectInvisibility(localId, mapNum, mapGroup, TRUE);
return FALSE; return FALSE;
} }
bool8 ScrCmd_setobjectpriority(struct ScriptContext * ctx) bool8 ScrCmd_setobjectsubpriority(struct ScriptContext * ctx)
{ {
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx); u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx);
u8 priority = ScriptReadByte(ctx); u8 priority = ScriptReadByte(ctx);
SetObjectPriorityByLocalIdAndMap(localId, mapNum, mapGroup, priority + 83); SetObjectSubpriority(localId, mapNum, mapGroup, priority + 83);
return FALSE; return FALSE;
} }
bool8 ScrCmd_resetobjectpriority(struct ScriptContext * ctx) bool8 ScrCmd_resetobjectsubpriority(struct ScriptContext * ctx)
{ {
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx); u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx);
UnfixObjectPriorityByLocalIdAndMap(localId, mapNum, mapGroup); ResetObjectSubpriority(localId, mapNum, mapGroup);
return FALSE; return FALSE;
} }
@@ -1166,32 +1163,34 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext * ctx)
u16 localId = VarGet(ScriptReadHalfword(ctx)); u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 movementType = ScriptReadByte(ctx); u8 movementType = ScriptReadByte(ctx);
Overworld_SetObjEventTemplateMovementType(localId, movementType); SetObjEventTemplateMovementType(localId, movementType);
return FALSE; return FALSE;
} }
bool8 ScrCmd_createvobject(struct ScriptContext * ctx) bool8 ScrCmd_createvobject(struct ScriptContext * ctx)
{ {
u8 graphicsId = ScriptReadByte(ctx); u8 graphicsId = ScriptReadByte(ctx);
u8 v2 = ScriptReadByte(ctx); u8 virtualObjId = ScriptReadByte(ctx);
u16 x = VarGet(ScriptReadHalfword(ctx)); u16 x = VarGet(ScriptReadHalfword(ctx));
u32 y = VarGet(ScriptReadHalfword(ctx)); u32 y = VarGet(ScriptReadHalfword(ctx));
u8 elevation = ScriptReadByte(ctx); u8 elevation = ScriptReadByte(ctx);
u8 direction = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx);
sprite_new(graphicsId, v2, x, y, elevation, direction); CreateVirtualObject(graphicsId, virtualObjId, x, y, elevation, direction);
return FALSE; return FALSE;
} }
bool8 ScrCmd_turnvobject(struct ScriptContext * ctx) bool8 ScrCmd_turnvobject(struct ScriptContext * ctx)
{ {
u8 v1 = ScriptReadByte(ctx); u8 virtualObjId = ScriptReadByte(ctx);
u8 direction = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx);
TurnObjectEvent(v1, direction); TurnVirtualObject(virtualObjId, direction);
return FALSE; return FALSE;
} }
// lockall freezes all object events except the player immediately.
// The player is frozen after waiting for their current movement to finish.
bool8 ScrCmd_lockall(struct ScriptContext * ctx) bool8 ScrCmd_lockall(struct ScriptContext * ctx)
{ {
if (IsUpdateLinkStateCBActive()) if (IsUpdateLinkStateCBActive())
@@ -1200,8 +1199,8 @@ bool8 ScrCmd_lockall(struct ScriptContext * ctx)
} }
else else
{ {
ScriptFreezeObjectEvents(); FreezeObjects_WaitForPlayer();
SetupNativeScript(ctx, NativeScript_WaitPlayerStopMoving); SetupNativeScript(ctx, IsFreezePlayerFinished);
return TRUE; return TRUE;
} }
} }
@@ -1216,13 +1215,13 @@ bool8 ScrCmd_lock(struct ScriptContext * ctx)
{ {
if (gObjectEvents[gSelectedObjectEvent].active) if (gObjectEvents[gSelectedObjectEvent].active)
{ {
LockSelectedObjectEvent(); FreezeObjects_WaitForPlayerAndSelected();
SetupNativeScript(ctx, NativeScript_WaitPlayerAndTargetNPCStopMoving); SetupNativeScript(ctx, IsFreezeSelectedObjectAndPlayerFinished);
} }
else else
{ {
ScriptFreezeObjectEvents(); FreezeObjects_WaitForPlayer();
SetupNativeScript(ctx, NativeScript_WaitPlayerStopMoving); SetupNativeScript(ctx, IsFreezePlayerFinished);
} }
return TRUE; return TRUE;
} }
@@ -1429,7 +1428,7 @@ bool8 ScrCmd_multichoice(struct ScriptContext * ctx)
u8 left = ScriptReadByte(ctx); u8 left = ScriptReadByte(ctx);
u8 top = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx);
u8 multichoiceId = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx);
u8 ignoreBPress = ScriptReadByte(ctx); bool8 ignoreBPress = ScriptReadByte(ctx);
if (ScriptMenu_Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE) if (ScriptMenu_Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE)
{ {
@@ -1448,7 +1447,7 @@ bool8 ScrCmd_multichoicedefault(struct ScriptContext * ctx)
u8 top = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx);
u8 multichoiceId = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx);
u8 defaultChoice = ScriptReadByte(ctx); u8 defaultChoice = ScriptReadByte(ctx);
u8 ignoreBPress = ScriptReadByte(ctx); bool8 ignoreBPress = ScriptReadByte(ctx);
if (ScriptMenu_MultichoiceWithDefault(left, top, multichoiceId, ignoreBPress, defaultChoice) == TRUE) if (ScriptMenu_MultichoiceWithDefault(left, top, multichoiceId, ignoreBPress, defaultChoice) == TRUE)
{ {
@@ -1478,7 +1477,7 @@ bool8 ScrCmd_multichoicegrid(struct ScriptContext * ctx)
u8 top = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx);
u8 multichoiceId = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx);
u8 numColumns = ScriptReadByte(ctx); u8 numColumns = ScriptReadByte(ctx);
u8 ignoreBPress = ScriptReadByte(ctx); bool8 ignoreBPress = ScriptReadByte(ctx);
if (ScriptMenu_MultichoiceGrid(left, top, multichoiceId, ignoreBPress, numColumns) == TRUE) if (ScriptMenu_MultichoiceGrid(left, top, multichoiceId, ignoreBPress, numColumns) == TRUE)
{ {
@@ -1498,7 +1497,7 @@ bool8 ScrCmd_erasebox(struct ScriptContext * ctx)
u8 right = ScriptReadByte(ctx); u8 right = ScriptReadByte(ctx);
u8 bottom = ScriptReadByte(ctx); u8 bottom = ScriptReadByte(ctx);
// MenuZeroFillWindowRect(left, top, right, bottom); // Menu_EraseWindowRect(left, top, right, bottom);
return FALSE; return FALSE;
} }
@@ -1507,7 +1506,7 @@ bool8 ScrCmd_drawboxtext(struct ScriptContext * ctx)
// u8 left = ScriptReadByte(ctx); // u8 left = ScriptReadByte(ctx);
// u8 top = ScriptReadByte(ctx); // u8 top = ScriptReadByte(ctx);
// u8 multichoiceId = ScriptReadByte(ctx); // u8 multichoiceId = ScriptReadByte(ctx);
// u8 ignoreBPress = ScriptReadByte(ctx); // bool8 ignoreBPress = ScriptReadByte(ctx);
/*if (Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE) /*if (Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE)
{ {
@@ -1530,7 +1529,9 @@ bool8 ScrCmd_showmonpic(struct ScriptContext * ctx)
bool8 ScrCmd_hidemonpic(struct ScriptContext * ctx) bool8 ScrCmd_hidemonpic(struct ScriptContext * ctx)
{ {
bool8 (*func)(void) = ScriptMenu_GetPicboxWaitFunc(); // The hide function returns a pointer to a function
// that returns true once the pic is hidden
bool8 (*func)(void) = ScriptMenu_HidePokemonPic();
if (func == NULL) if (func == NULL)
return FALSE; return FALSE;
@@ -1538,18 +1539,18 @@ bool8 ScrCmd_hidemonpic(struct ScriptContext * ctx)
return TRUE; return TRUE;
} }
bool8 ScrCmd_showcontestwinner(struct ScriptContext * ctx) bool8 ScrCmd_showcontestpainting(struct ScriptContext * ctx)
{ {
u8 v1 = ScriptReadByte(ctx); u8 contestWinnerId = ScriptReadByte(ctx);
/* /*
if (v1) // Artist's painting is temporary and already has its data loaded
sub_812FDA8(v1); if (contestWinnerId != CONTEST_WINNER_ARTIST)
ShowContestWinner(); SetContestWinnerForPainting(contestWinnerId);
ScriptContext1_Stop();
return TRUE;
*/
ShowContestPainting();
ScriptContext1_Stop()
return TRUE;
*/
return FALSE; return FALSE;
} }
@@ -1561,7 +1562,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext * ctx)
LoadStdWindowFrameGfx(); LoadStdWindowFrameGfx();
DrawDialogueFrame(0, 1); DrawDialogueFrame(0, 1);
AddTextPrinterParameterized(0, FONT_6, ptr, 0, 1, 0, NULL); AddTextPrinterParameterized(0, FONT_BRAILLE, ptr, 0, 1, 0, NULL);
return FALSE; return FALSE;
} }
@@ -1571,15 +1572,15 @@ bool8 ScrCmd_getbraillestringwidth(struct ScriptContext * ctx)
if (ptr == NULL) if (ptr == NULL)
ptr = (u8 *)ctx->data[0]; ptr = (u8 *)ctx->data[0];
gSpecialVar_0x8004 = GetStringWidth(FONT_6, ptr, -1); gSpecialVar_0x8004 = GetStringWidth(FONT_BRAILLE, ptr, -1);
return FALSE; return FALSE;
} }
bool8 ScrCmd_vmessage(struct ScriptContext * ctx) bool8 ScrCmd_vmessage(struct ScriptContext * ctx)
{ {
u32 v1 = ScriptReadWord(ctx); u32 msg = ScriptReadWord(ctx);
ShowFieldMessage((u8 *)(v1 - gVScriptOffset)); ShowFieldMessage((u8 *)(msg - sAddressOffset));
return FALSE; return FALSE;
} }
@@ -1629,8 +1630,8 @@ bool8 ScrCmd_bufferitemname(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
const u8 gUnknown_83A72A0[] = _("S"); static const u8 sText_S[] = _("S");
const u8 gUnknown_83A72A2[] = _("IES"); static const u8 sText_IES[] = _("IES");
bool8 ScrCmd_bufferitemnameplural(struct ScriptContext * ctx) bool8 ScrCmd_bufferitemnameplural(struct ScriptContext * ctx)
{ {
@@ -1640,15 +1641,15 @@ bool8 ScrCmd_bufferitemnameplural(struct ScriptContext * ctx)
CopyItemName(itemId, sScriptStringVars[stringVarIndex]); CopyItemName(itemId, sScriptStringVars[stringVarIndex]);
if (itemId == ITEM_POKE_BALL && quantity >= 2) if (itemId == ITEM_POKE_BALL && quantity >= 2)
StringAppend(sScriptStringVars[stringVarIndex], gUnknown_83A72A0); StringAppend(sScriptStringVars[stringVarIndex], sText_S);
else if (itemId >= ITEM_CHERI_BERRY && itemId < ITEM_ENIGMA_BERRY && quantity >= 2) else if (itemId >= FIRST_BERRY_INDEX && itemId < LAST_BERRY_INDEX && quantity >= 2)
{ {
u16 strlength = StringLength(sScriptStringVars[stringVarIndex]); u16 strlength = StringLength(sScriptStringVars[stringVarIndex]);
if (strlength != 0) if (strlength != 0)
{ {
u8 * endptr = sScriptStringVars[stringVarIndex] + strlength; u8 * endptr = sScriptStringVars[stringVarIndex] + strlength;
endptr[-1] = EOS; endptr[-1] = EOS;
StringAppend(sScriptStringVars[stringVarIndex], gUnknown_83A72A2); StringAppend(sScriptStringVars[stringVarIndex], sText_IES);
} }
} }
@@ -1676,10 +1677,10 @@ bool8 ScrCmd_buffermovename(struct ScriptContext * ctx)
bool8 ScrCmd_buffernumberstring(struct ScriptContext * ctx) bool8 ScrCmd_buffernumberstring(struct ScriptContext * ctx)
{ {
u8 stringVarIndex = ScriptReadByte(ctx); u8 stringVarIndex = ScriptReadByte(ctx);
u16 v1 = VarGet(ScriptReadHalfword(ctx)); u16 num = VarGet(ScriptReadHalfword(ctx));
u8 v2 = CountDigits(v1); u8 numDigits = CountDigits(num);
ConvertIntToDecimalStringN(sScriptStringVars[stringVarIndex], v1, 0, v2); ConvertIntToDecimalStringN(sScriptStringVars[stringVarIndex], num, STR_CONV_MODE_LEFT_ALIGN, numDigits);
return FALSE; return FALSE;
} }
@@ -1692,17 +1693,6 @@ bool8 ScrCmd_bufferstdstring(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
/*
bool8 ScrCmd_buffercontesttype(struct ScriptContext * ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
u16 index = VarGet(ScriptReadHalfword(ctx));
sub_818E868(sScriptStringVars[stringVarIndex], index);
return FALSE;
}
*/
bool8 ScrCmd_bufferstring(struct ScriptContext * ctx) bool8 ScrCmd_bufferstring(struct ScriptContext * ctx)
{ {
u8 stringVarIndex = ScriptReadByte(ctx); u8 stringVarIndex = ScriptReadByte(ctx);
@@ -1712,9 +1702,9 @@ bool8 ScrCmd_bufferstring(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_vloadword(struct ScriptContext * ctx) bool8 ScrCmd_vbuffermessage(struct ScriptContext * ctx)
{ {
const u8 *ptr = (u8 *)(ScriptReadWord(ctx) - gVScriptOffset); const u8 *ptr = (u8 *)(ScriptReadWord(ctx) - sAddressOffset);
StringExpandPlaceholders(gStringVar4, ptr); StringExpandPlaceholders(gStringVar4, ptr);
return FALSE; return FALSE;
@@ -1725,7 +1715,7 @@ bool8 ScrCmd_vbufferstring(struct ScriptContext * ctx)
u8 stringVarIndex = ScriptReadByte(ctx); u8 stringVarIndex = ScriptReadByte(ctx);
u32 addr = ScriptReadWord(ctx); u32 addr = ScriptReadWord(ctx);
const u8 *src = (u8 *)(addr - gVScriptOffset); const u8 *src = (u8 *)(addr - sAddressOffset);
u8 *dest = sScriptStringVars[stringVarIndex]; u8 *dest = sScriptStringVars[stringVarIndex];
StringCopy(dest, src); StringCopy(dest, src);
return FALSE; return FALSE;
@@ -1964,6 +1954,7 @@ bool8 ScrCmd_pokemartdecoration(struct ScriptContext * ctx)
return TRUE; return TRUE;
} }
// Changes clerk dialogue slightly from above. See MART_TYPE_DECOR2
bool8 ScrCmd_pokemartdecoration2(struct ScriptContext * ctx) bool8 ScrCmd_pokemartdecoration2(struct ScriptContext * ctx)
{ {
const void *ptr = (void *)ScriptReadWord(ctx); const void *ptr = (void *)ScriptReadWord(ctx);
@@ -1989,13 +1980,13 @@ bool8 ScrCmd_setberrytree(struct ScriptContext * ctx)
// u8 growthStage = ScriptReadByte(ctx); // u8 growthStage = ScriptReadByte(ctx);
// //
// if (berry == 0) // if (berry == 0)
// PlantBerryTree(treeId, 0, growthStage, FALSE); // PlantBerryTree(treeId, berry, growthStage, FALSE);
// else // else
// PlantBerryTree(treeId, berry, growthStage, FALSE); // PlantBerryTree(treeId, berry, growthStage, FALSE);
return FALSE; return FALSE;
} }
bool8 ScrCmd_getpricereduction(struct ScriptContext * ctx) bool8 ScrCmd_getpokenewsactive(struct ScriptContext * ctx)
{ {
// u16 value = VarGet(ScriptReadHalfword(ctx)); // u16 value = VarGet(ScriptReadHalfword(ctx));
// //
@@ -2005,7 +1996,7 @@ bool8 ScrCmd_getpricereduction(struct ScriptContext * ctx)
bool8 ScrCmd_choosecontestmon(struct ScriptContext * ctx) bool8 ScrCmd_choosecontestmon(struct ScriptContext * ctx)
{ {
// sub_81B9404(); // ChooseContestMon();
ScriptContext1_Stop(); ScriptContext1_Stop();
return TRUE; return TRUE;
} }
@@ -2013,7 +2004,7 @@ bool8 ScrCmd_choosecontestmon(struct ScriptContext * ctx)
bool8 ScrCmd_startcontest(struct ScriptContext * ctx) bool8 ScrCmd_startcontest(struct ScriptContext * ctx)
{ {
// sub_80F840C(); // StartContest();
// ScriptContext1_Stop(); // ScriptContext1_Stop();
// return TRUE; // return TRUE;
return FALSE; return FALSE;
@@ -2021,7 +2012,7 @@ bool8 ScrCmd_startcontest(struct ScriptContext * ctx)
bool8 ScrCmd_showcontestresults(struct ScriptContext * ctx) bool8 ScrCmd_showcontestresults(struct ScriptContext * ctx)
{ {
// sub_80F8484(); // ShowContestResults();
// ScriptContext1_Stop(); // ScriptContext1_Stop();
// return TRUE; // return TRUE;
return FALSE; return FALSE;
@@ -2029,7 +2020,7 @@ bool8 ScrCmd_showcontestresults(struct ScriptContext * ctx)
bool8 ScrCmd_contestlinktransfer(struct ScriptContext * ctx) bool8 ScrCmd_contestlinktransfer(struct ScriptContext * ctx)
{ {
// sub_80F84C4(gSpecialVar_ContestCategory); // ContestLinkTransfer(gSpecialVar_ContestCategory);
// ScriptContext1_Stop(); // ScriptContext1_Stop();
// return TRUE; // return TRUE;
return FALSE; return FALSE;
@@ -2044,7 +2035,7 @@ bool8 ScrCmd_dofieldeffect(struct ScriptContext * ctx)
return FALSE; return FALSE;
} }
bool8 ScrCmd_setfieldeffectarg(struct ScriptContext * ctx) bool8 ScrCmd_setfieldeffectargument(struct ScriptContext * ctx)
{ {
u8 argNum = ScriptReadByte(ctx); u8 argNum = ScriptReadByte(ctx);
@@ -2101,11 +2092,11 @@ bool8 ScrCmd_setmetatile(struct ScriptContext * ctx)
u16 x = VarGet(ScriptReadHalfword(ctx)); u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx));
u16 tileId = VarGet(ScriptReadHalfword(ctx)); u16 tileId = VarGet(ScriptReadHalfword(ctx));
u16 v8 = VarGet(ScriptReadHalfword(ctx)); bool16 isImpassable = VarGet(ScriptReadHalfword(ctx));
x += 7; x += MAP_OFFSET;
y += 7; y += MAP_OFFSET;
if (!v8) if (!isImpassable)
MapGridSetMetatileIdAt(x, y, tileId); MapGridSetMetatileIdAt(x, y, tileId);
else else
MapGridSetMetatileIdAt(x, y, tileId | METATILE_COLLISION_MASK); MapGridSetMetatileIdAt(x, y, tileId | METATILE_COLLISION_MASK);
@@ -2117,8 +2108,8 @@ bool8 ScrCmd_opendoor(struct ScriptContext * ctx)
u16 x = VarGet(ScriptReadHalfword(ctx)); u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx));
x += 7; x += MAP_OFFSET;
y += 7; y += MAP_OFFSET;
PlaySE(GetDoorSoundEffect(x, y)); PlaySE(GetDoorSoundEffect(x, y));
FieldAnimateDoorOpen(x, y); FieldAnimateDoorOpen(x, y);
return FALSE; return FALSE;
@@ -2129,8 +2120,8 @@ bool8 ScrCmd_closedoor(struct ScriptContext * ctx)
u16 x = VarGet(ScriptReadHalfword(ctx)); u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx));
x += 7; x += MAP_OFFSET;
y += 7; y += MAP_OFFSET;
FieldAnimateDoorClose(x, y); FieldAnimateDoorClose(x, y);
return FALSE; return FALSE;
} }
@@ -2154,8 +2145,8 @@ bool8 ScrCmd_setdooropen(struct ScriptContext * ctx)
u16 x = VarGet(ScriptReadHalfword(ctx)); u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx));
x += 7; x += MAP_OFFSET;
y += 7; y += MAP_OFFSET;
FieldSetDoorOpened(x, y); FieldSetDoorOpened(x, y);
return FALSE; return FALSE;
} }
@@ -2165,8 +2156,8 @@ bool8 ScrCmd_setdoorclosed(struct ScriptContext * ctx)
u16 x = VarGet(ScriptReadHalfword(ctx)); u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx));
x += 7; x += MAP_OFFSET;
y += 7; y += MAP_OFFSET;
FieldSetDoorClosed(x, y); FieldSetDoorClosed(x, y);
return FALSE; return FALSE;
} }
@@ -2202,9 +2193,9 @@ bool8 ScrCmd_addcoins(struct ScriptContext * ctx)
u16 coins = VarGet(ScriptReadHalfword(ctx)); u16 coins = VarGet(ScriptReadHalfword(ctx));
if (AddCoins(coins) == TRUE) if (AddCoins(coins) == TRUE)
gSpecialVar_Result = 0; gSpecialVar_Result = FALSE;
else else
gSpecialVar_Result = 1; gSpecialVar_Result = TRUE;
return FALSE; return FALSE;
} }
@@ -2213,9 +2204,9 @@ bool8 ScrCmd_removecoins(struct ScriptContext * ctx)
u16 coins = VarGet(ScriptReadHalfword(ctx)); u16 coins = VarGet(ScriptReadHalfword(ctx));
if (RemoveCoins(coins) == TRUE) if (RemoveCoins(coins) == TRUE)
gSpecialVar_Result = 0; gSpecialVar_Result = FALSE;
else else
gSpecialVar_Result = 1; gSpecialVar_Result = TRUE;
return FALSE; return FALSE;
} }
+1 -1
View File
@@ -523,7 +523,7 @@ bool32 ValidateRamScript(void)
return TRUE; return TRUE;
} }
u8 *sub_8069E48(void) u8 *GetSavedRamScriptIfValid(void)
{ {
struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data;
if (!ValidateReceivedWonderCard()) if (!ValidateReceivedWonderCard())
+1 -1
View File
@@ -1048,7 +1048,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y)
return TRUE; return TRUE;
} }
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) bool8 (*ScriptMenu_HidePokemonPic(void))(void)
{ {
u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic);
if (taskId == 0xFF) if (taskId == 0xFF)
+1 -1
View File
@@ -4657,7 +4657,7 @@ static void HandleCancelTrade(bool32 unlockObjs)
static void UR_EnableScriptContext2AndFreezeObjectEvents(void) static void UR_EnableScriptContext2AndFreezeObjectEvents(void)
{ {
ScriptContext2_Enable(); ScriptContext2_Enable();
ScriptFreezeObjectEvents(); FreezeObjects_WaitForPlayer();
} }
static u8 GetSinglePartnerSpriteGenderParam(s32 linkPlayer) static u8 GetSinglePartnerSpriteGenderParam(s32 linkPlayer)