mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Give/Take to Add/Remove for silent script macros
This commit is contained in:
parent
e497fc64e3
commit
c19289596d
@ -476,7 +476,7 @@
|
||||
.endm
|
||||
|
||||
@ Removes quantity of item index from the player's Bag.
|
||||
.macro takeitem index:req, quantity=1
|
||||
.macro removeitem index:req, quantity=1
|
||||
.byte 0x45
|
||||
.2byte \index
|
||||
.2byte \quantity
|
||||
@ -503,7 +503,7 @@
|
||||
.endm
|
||||
|
||||
@ Adds a quantity amount of item index to the player's PC. Both arguments can be variables.
|
||||
.macro givepcitem index:req, quantity:req
|
||||
.macro addpcitem index:req, quantity:req
|
||||
.byte 0x49
|
||||
.2byte \index
|
||||
.2byte \quantity
|
||||
@ -523,7 +523,7 @@
|
||||
.endm
|
||||
|
||||
@ Removes a decoration from the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.)
|
||||
.macro takedecoration decoration:req
|
||||
.macro removedecoration decoration:req
|
||||
.byte 0x4c
|
||||
.2byte \decoration
|
||||
.endm
|
||||
@ -1050,14 +1050,14 @@
|
||||
.endm
|
||||
|
||||
@ If check is 0x00, this command adds value to the player's money.
|
||||
.macro givemoney value:req, check:req
|
||||
.macro addmoney value:req, check:req
|
||||
.byte 0x90
|
||||
.4byte \value
|
||||
.byte \check
|
||||
.endm
|
||||
|
||||
@ If check is 0x00, this command subtracts value from the player's money.
|
||||
.macro takemoney value:req, check:req
|
||||
.macro removemoney value:req, check:req
|
||||
.byte 0x91
|
||||
.4byte \value
|
||||
.byte \check
|
||||
@ -1281,12 +1281,12 @@
|
||||
.2byte \out
|
||||
.endm
|
||||
|
||||
.macro givecoins count:req
|
||||
.macro addcoins count:req
|
||||
.byte 0xb4
|
||||
.2byte \count
|
||||
.endm
|
||||
|
||||
.macro takecoins count:req
|
||||
.macro removecoins count:req
|
||||
.byte 0xb5
|
||||
.2byte \count
|
||||
.endm
|
||||
|
@ -823,7 +823,7 @@ Common_EventScript_PlayerHandedOverTheItem:: @ 82723E4
|
||||
message gText_PlayerHandedOverTheItem
|
||||
waitmessage
|
||||
waitfanfare
|
||||
takeitem VAR_0x8004, 1
|
||||
removeitem VAR_0x8004
|
||||
return
|
||||
|
||||
.include "data/scripts/elite_four.inc"
|
||||
|
@ -32,7 +32,7 @@ AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor:: @ 8237DC8
|
||||
goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked
|
||||
msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT
|
||||
playse SE_PIN
|
||||
takeitem ITEM_STORAGE_KEY, 1
|
||||
removeitem ITEM_STORAGE_KEY
|
||||
setflag FLAG_USED_STORAGE_KEY
|
||||
call AbandonedShip_Corridors_B1F_EventScript_UnlockStorageRoom
|
||||
special DrawWholeMapView
|
||||
|
@ -58,7 +58,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: @ 8238A19
|
||||
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked
|
||||
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
|
||||
playse SE_PIN
|
||||
takeitem ITEM_ROOM_1_KEY, 1
|
||||
removeitem ITEM_ROOM_1_KEY
|
||||
setflag FLAG_USED_ROOM_1_KEY
|
||||
call AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom1
|
||||
special DrawWholeMapView
|
||||
@ -73,7 +73,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: @ 8238A50
|
||||
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked
|
||||
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
|
||||
playse SE_PIN
|
||||
takeitem ITEM_ROOM_2_KEY, 1
|
||||
removeitem ITEM_ROOM_2_KEY, 1
|
||||
setflag FLAG_USED_ROOM_2_KEY
|
||||
call AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom2
|
||||
special DrawWholeMapView
|
||||
@ -88,7 +88,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: @ 8238A87
|
||||
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked
|
||||
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
|
||||
playse SE_PIN
|
||||
takeitem ITEM_ROOM_4_KEY, 1
|
||||
removeitem ITEM_ROOM_4_KEY
|
||||
setflag FLAG_USED_ROOM_4_KEY
|
||||
call AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom4
|
||||
special DrawWholeMapView
|
||||
@ -103,7 +103,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door:: @ 8238ABE
|
||||
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked
|
||||
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
|
||||
playse SE_PIN
|
||||
takeitem ITEM_ROOM_6_KEY, 1
|
||||
removeitem ITEM_ROOM_6_KEY
|
||||
setflag FLAG_USED_ROOM_6_KEY
|
||||
call AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom6
|
||||
special DrawWholeMapView
|
||||
|
@ -42,7 +42,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMove:: @ 820140C
|
||||
compare VAR_0x8004, 0
|
||||
goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon
|
||||
msgbox FallarborTown_MoveRelearnersHouse_Text_HandedOverHeartScale, MSGBOX_DEFAULT
|
||||
takeitem ITEM_HEART_SCALE, 1
|
||||
removeitem ITEM_HEART_SCALE, 1
|
||||
goto FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale
|
||||
end
|
||||
|
||||
|
@ -113,16 +113,16 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade:: @ 8220313
|
||||
checkmoney 350, 0
|
||||
return
|
||||
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_TakeMoneyFreshWater:: @ 822031A
|
||||
takemoney 200, 0
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater:: @ 822031A
|
||||
removemoney 200, 0
|
||||
return
|
||||
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_TakeMoneySodaPop:: @ 8220321
|
||||
takemoney 300, 0
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop:: @ 8220321
|
||||
removemoney 300, 0
|
||||
return
|
||||
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_TakeMoneyLemonade:: @ 8220328
|
||||
takemoney 350, 0
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade:: @ 8220328
|
||||
removemoney 350, 0
|
||||
return
|
||||
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: @ 822032F
|
||||
@ -138,11 +138,11 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: @ 822032F
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
|
||||
compare VAR_TEMP_1, 0
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_TakeMoneyFreshWater
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater
|
||||
compare VAR_TEMP_1, 1
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_TakeMoneySodaPop
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop
|
||||
compare VAR_TEMP_1, 2
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_TakeMoneyLemonade
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade
|
||||
updatemoneybox 0, 0
|
||||
bufferitemname 0, VAR_TEMP_0
|
||||
playse SE_JIHANKI
|
||||
|
@ -89,7 +89,7 @@ MauvilleCity_BikeShop_EventScript_KeepBike:: @ 820ECE5
|
||||
MauvilleCity_BikeShop_EventScript_SwitchAcroForMach:: @ 820ECEF
|
||||
incrementgamestat GAME_STAT_TRADED_BIKES
|
||||
msgbox MauvilleCity_BikeShop_Text_ExchangedAcroForMach, MSGBOX_DEFAULT
|
||||
takeitem ITEM_ACRO_BIKE, 1
|
||||
removeitem ITEM_ACRO_BIKE
|
||||
giveitem ITEM_MACH_BIKE
|
||||
goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes
|
||||
end
|
||||
@ -97,7 +97,7 @@ MauvilleCity_BikeShop_EventScript_SwitchAcroForMach:: @ 820ECEF
|
||||
MauvilleCity_BikeShop_EventScript_SwitchMachForAcro:: @ 820ED10
|
||||
incrementgamestat GAME_STAT_TRADED_BIKES
|
||||
msgbox MauvilleCity_BikeShop_Text_ExchangedMachForAcro, MSGBOX_DEFAULT
|
||||
takeitem ITEM_MACH_BIKE, 1
|
||||
removeitem ITEM_MACH_BIKE
|
||||
giveitem ITEM_ACRO_BIKE
|
||||
goto MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes
|
||||
end
|
||||
|
@ -49,8 +49,8 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins:: @ 820FC33
|
||||
checkmoney COINS_PRICE_50, 0
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney
|
||||
givecoins 50
|
||||
takemoney COINS_PRICE_50, 0
|
||||
addcoins 50
|
||||
removemoney COINS_PRICE_50, 0
|
||||
updatemoneybox 0, 0
|
||||
updatecoinsbox 1, 6
|
||||
playse SE_REGI
|
||||
@ -67,8 +67,8 @@ MauvilleCity_GameCorner_EventScript_Buy500Coins:: @ 820FC75
|
||||
checkmoney COINS_PRICE_500, 0
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney
|
||||
givecoins 500
|
||||
takemoney COINS_PRICE_500, 0
|
||||
addcoins 500
|
||||
removemoney COINS_PRICE_500, 0
|
||||
updatemoneybox 0, 0
|
||||
updatecoinsbox 1, 6
|
||||
playse SE_REGI
|
||||
@ -169,7 +169,7 @@ MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll:: @ 820FDCB
|
||||
checkdecorspace DECOR_TREECKO_DOLL
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll
|
||||
takecoins DOLL_COINS
|
||||
removecoins DOLL_COINS
|
||||
adddecoration DECOR_TREECKO_DOLL
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -185,7 +185,7 @@ MauvilleCity_GameCorner_EventScript_BuyTorchicDoll:: @ 820FE05
|
||||
checkdecorspace DECOR_TORCHIC_DOLL
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll
|
||||
takecoins DOLL_COINS
|
||||
removecoins DOLL_COINS
|
||||
adddecoration DECOR_TORCHIC_DOLL
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -201,7 +201,7 @@ MauvilleCity_GameCorner_EventScript_BuyMudkipDoll:: @ 820FE3F
|
||||
checkdecorspace DECOR_MUDKIP_DOLL
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll
|
||||
takecoins DOLL_COINS
|
||||
removecoins DOLL_COINS
|
||||
adddecoration DECOR_MUDKIP_DOLL
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -309,7 +309,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM32:: @ 820FFDD
|
||||
checkitemspace ITEM_TM32, 1
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
|
||||
takecoins TM32_COINS
|
||||
removecoins TM32_COINS
|
||||
additem ITEM_TM32
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -324,7 +324,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM29:: @ 8210017
|
||||
checkitemspace ITEM_TM29, 1
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
|
||||
takecoins TM29_COINS
|
||||
removecoins TM29_COINS
|
||||
additem ITEM_TM29
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -339,7 +339,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM35:: @ 8210051
|
||||
checkitemspace ITEM_TM35, 1
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
|
||||
takecoins TM35_COINS
|
||||
removecoins TM35_COINS
|
||||
additem ITEM_TM35
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -354,7 +354,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM24:: @ 821008B
|
||||
checkitemspace ITEM_TM24, 1
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
|
||||
takecoins TM24_COINS
|
||||
removecoins TM24_COINS
|
||||
additem ITEM_TM24
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -369,7 +369,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM13:: @ 82100C5
|
||||
checkitemspace ITEM_TM13, 1
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
|
||||
takecoins TM13_COINS
|
||||
removecoins TM13_COINS
|
||||
additem ITEM_TM13
|
||||
updatecoinsbox 1, 1
|
||||
playse SE_REGI
|
||||
@ -479,7 +479,7 @@ MauvilleCity_GameCorner_EventScript_TryGive20Coins:: @ 821023D
|
||||
compare VAR_TEMP_1, 1 @ Only give 20 coins if player has no coins
|
||||
goto_if_ge MauvilleCity_GameCorner_EventScript_PokefanMNormal
|
||||
setflag FLAG_RECEIVED_20_COINS
|
||||
givecoins 20
|
||||
addcoins 20
|
||||
msgbox MauvilleCity_GameCorner_Text_LuckOnlyLastSoLongTakeCoins, MSGBOX_DEFAULT
|
||||
playse SE_REGI
|
||||
goto MauvilleCity_GameCorner_EventScript_PokefanMNormal
|
||||
|
@ -27,7 +27,7 @@ MauvilleCity_House2_EventScript_AskToTradeForHarborMail:: @ 8210C82
|
||||
|
||||
MauvilleCity_House2_EventScript_AcceptTrade:: @ 8210CB8
|
||||
msgbox MauvilleCity_House2_Text_IllTradeYouCoinCase, MSGBOX_DEFAULT
|
||||
takeitem ITEM_HARBOR_MAIL, 1
|
||||
removeitem ITEM_HARBOR_MAIL, 1
|
||||
giveitem ITEM_COIN_CASE
|
||||
setflag FLAG_RECEIVED_COIN_CASE
|
||||
goto MauvilleCity_House2_EventScript_ReceivedCoinCase
|
||||
|
@ -110,7 +110,7 @@ MtChimney_EventScript_LavaCookieLady:: @ 822EEF3
|
||||
msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT
|
||||
checkitemspace ITEM_LAVA_COOKIE, 1
|
||||
compare VAR_RESULT, TRUE
|
||||
call_if_eq MtChimney_EventScript_TakeMoney
|
||||
call_if_eq MtChimney_EventScript_RemoveMoney
|
||||
giveitem ITEM_LAVA_COOKIE
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq MtChimney_EventScript_BagIsFull
|
||||
@ -124,8 +124,8 @@ MtChimney_EventScript_BagIsFull:: @ 822EF51
|
||||
release
|
||||
end
|
||||
|
||||
MtChimney_EventScript_TakeMoney:: @ 822EF5E
|
||||
takemoney 200, 0
|
||||
MtChimney_EventScript_RemoveMoney:: @ 822EF5E
|
||||
removemoney 200, 0
|
||||
updatemoneybox 0, 0
|
||||
return
|
||||
|
||||
|
@ -54,7 +54,7 @@ Route109_SeashoreHouse_EventScript_BuySodaPop:: @ 8269484
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace
|
||||
msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT
|
||||
takemoney 300, 0
|
||||
removemoney 300, 0
|
||||
updatemoneybox 0, 0
|
||||
giveitem ITEM_SODA_POP
|
||||
hidemoneybox
|
||||
|
@ -66,7 +66,7 @@ Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: @ 822BC48
|
||||
goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney
|
||||
playse SE_REGI
|
||||
msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT
|
||||
takemoney 500, 0
|
||||
removemoney 500, 0
|
||||
updatemoneybox 0, 0
|
||||
msgbox Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls, MSGBOX_DEFAULT
|
||||
playfanfare MUS_FANFA4
|
||||
|
@ -258,7 +258,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: @ 8270EC0
|
||||
end
|
||||
|
||||
Route124_DivingTreasureHuntersHouse_EventScript_TradeShard:: @ 8270F01
|
||||
takeitem VAR_0x8008, 1
|
||||
removeitem VAR_0x8008
|
||||
giveitem VAR_0x8009
|
||||
msgbox Route124_DivingTreasureHuntersHouse_Text_ItsADeal, MSGBOX_DEFAULT
|
||||
call Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards
|
||||
|
@ -96,7 +96,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil:: @ 8211933
|
||||
RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil:: @ 8211974
|
||||
bufferitemname 0, ITEM_ROOT_FOSSIL
|
||||
msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT
|
||||
takeitem ITEM_ROOT_FOSSIL, 1
|
||||
removeitem ITEM_ROOT_FOSSIL, 1
|
||||
setvar VAR_FOSSIL_RESURRECTION_STATE, 1
|
||||
setvar VAR_WHICH_FOSSIL_REVIVED, 1
|
||||
release
|
||||
@ -121,7 +121,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil:: @ 8211991
|
||||
RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil:: @ 82119D2
|
||||
bufferitemname 0, ITEM_CLAW_FOSSIL
|
||||
msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT
|
||||
takeitem ITEM_CLAW_FOSSIL, 1
|
||||
removeitem ITEM_CLAW_FOSSIL, 1
|
||||
setvar VAR_FOSSIL_RESURRECTION_STATE, 1
|
||||
setvar VAR_WHICH_FOSSIL_REVIVED, 2
|
||||
release
|
||||
|
@ -35,8 +35,8 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert:: @ 8236DD9
|
||||
compare VAR_RESULT, 2
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell
|
||||
msgbox ShoalCave_LowTideEntranceRoom_Text_MakeShellBellRightAway, MSGBOX_DEFAULT
|
||||
takeitem ITEM_SHOAL_SALT, 4
|
||||
takeitem ITEM_SHOAL_SHELL, 4
|
||||
removeitem ITEM_SHOAL_SALT, 4
|
||||
removeitem ITEM_SHOAL_SHELL, 4
|
||||
giveitem ITEM_SHELL_BELL
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||
|
@ -361,7 +361,7 @@ SlateportCity_Harbor_EventScript_DeepSeaTooth:: @ 820CD7B
|
||||
giveitem ITEM_DEEP_SEA_TOOTH
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||
takeitem ITEM_SCANNER, 1
|
||||
removeitem ITEM_SCANNER
|
||||
msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT
|
||||
setflag FLAG_EXCHANGED_SCANNER
|
||||
goto SlateportCity_Harbor_EventScript_TradedScanner
|
||||
@ -374,7 +374,7 @@ SlateportCity_Harbor_EventScript_DeepSeaScale:: @ 820CDBB
|
||||
giveitem ITEM_DEEP_SEA_SCALE
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||
takeitem ITEM_SCANNER, 1
|
||||
removeitem ITEM_SCANNER
|
||||
msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT
|
||||
setflag FLAG_EXCHANGED_SCANNER
|
||||
goto SlateportCity_Harbor_EventScript_TradedScanner
|
||||
|
@ -36,7 +36,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee:: @ 820ADE8
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney
|
||||
playse SE_REGI
|
||||
takemoney 50, 0
|
||||
removemoney 50, 0
|
||||
updatemoneybox 0, 0
|
||||
msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT
|
||||
setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1
|
||||
|
@ -68,15 +68,15 @@ gScriptCmdTable:: @ 81DB67C
|
||||
.4byte ScrCmd_setholewarp
|
||||
.4byte ScrCmd_getplayerxy
|
||||
.4byte ScrCmd_getpartysize
|
||||
.4byte ScrCmd_giveitem
|
||||
.4byte ScrCmd_takeitem
|
||||
.4byte ScrCmd_additem
|
||||
.4byte ScrCmd_removeitem
|
||||
.4byte ScrCmd_checkitemspace
|
||||
.4byte ScrCmd_checkitem
|
||||
.4byte ScrCmd_checkitemtype
|
||||
.4byte ScrCmd_givepcitem
|
||||
.4byte ScrCmd_addpcitem
|
||||
.4byte ScrCmd_checkpcitem
|
||||
.4byte ScrCmd_givedecoration
|
||||
.4byte ScrCmd_takedecoration
|
||||
.4byte ScrCmd_adddecoration
|
||||
.4byte ScrCmd_removedecoration
|
||||
.4byte ScrCmd_checkdecor
|
||||
.4byte ScrCmd_checkdecorspace
|
||||
.4byte ScrCmd_applymovement
|
||||
@ -144,8 +144,8 @@ gScriptCmdTable:: @ 81DB67C
|
||||
.4byte ScrCmd_showcontestresults
|
||||
.4byte ScrCmd_contestlinktransfer
|
||||
.4byte ScrCmd_random
|
||||
.4byte ScrCmd_givemoney
|
||||
.4byte ScrCmd_takemoney
|
||||
.4byte ScrCmd_addmoney
|
||||
.4byte ScrCmd_removemoney
|
||||
.4byte ScrCmd_checkmoney
|
||||
.4byte ScrCmd_showmoneybox
|
||||
.4byte ScrCmd_hidemoneybox
|
||||
@ -180,8 +180,8 @@ gScriptCmdTable:: @ 81DB67C
|
||||
.4byte ScrCmd_addelevmenuitem
|
||||
.4byte ScrCmd_showelevmenu
|
||||
.4byte ScrCmd_checkcoins
|
||||
.4byte ScrCmd_givecoins
|
||||
.4byte ScrCmd_takecoins
|
||||
.4byte ScrCmd_addcoins
|
||||
.4byte ScrCmd_removecoins
|
||||
.4byte ScrCmd_setwildbattle
|
||||
.4byte ScrCmd_dowildbattle
|
||||
.4byte ScrCmd_setvaddress
|
||||
|
@ -45,7 +45,7 @@ BerryTree_EventScript_ChooseBerryToPlant:: @ 8274393
|
||||
waitstate
|
||||
compare VAR_ITEM_ID, 0
|
||||
goto_if_eq BerryTree_EventScript_CancelPlanting
|
||||
takeitem VAR_ITEM_ID, 1
|
||||
removeitem VAR_ITEM_ID
|
||||
call BerryTree_EventScript_PlantBerry
|
||||
|
||||
BerryTree_EventScript_CancelPlanting:: @ 82743AF
|
||||
|
@ -6,7 +6,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y);
|
||||
void HideCoinsWindow(void);
|
||||
u16 GetCoins(void);
|
||||
void SetCoins(u16 coinAmount);
|
||||
bool8 GiveCoins(u16 toAdd);
|
||||
bool8 TakeCoins(u16 toSub);
|
||||
bool8 AddCoins(u16 toAdd);
|
||||
bool8 RemoveCoins(u16 toSub);
|
||||
|
||||
#endif // GUARD_COINS_H
|
||||
|
@ -48,7 +48,7 @@ void SetCoins(u16 coinAmount)
|
||||
gSaveBlock1Ptr->coins = coinAmount ^ gSaveBlock2Ptr->encryptionKey;
|
||||
}
|
||||
|
||||
bool8 GiveCoins(u16 toAdd)
|
||||
bool8 AddCoins(u16 toAdd)
|
||||
{
|
||||
u16 newAmount;
|
||||
u16 ownedCoins = GetCoins();
|
||||
@ -70,7 +70,7 @@ bool8 GiveCoins(u16 toAdd)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 TakeCoins(u16 toSub)
|
||||
bool8 RemoveCoins(u16 toSub)
|
||||
{
|
||||
u16 ownedCoins = GetCoins();
|
||||
if (ownedCoins >= toSub)
|
||||
|
22
src/scrcmd.c
22
src/scrcmd.c
@ -486,7 +486,7 @@ bool8 ScrCmd_random(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_giveitem(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_additem(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
@ -495,7 +495,7 @@ bool8 ScrCmd_giveitem(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_takeitem(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_removeitem(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u32 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
@ -530,7 +530,7 @@ bool8 ScrCmd_checkitemtype(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_givepcitem(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_addpcitem(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 itemId = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 quantity = VarGet(ScriptReadHalfword(ctx));
|
||||
@ -548,7 +548,7 @@ bool8 ScrCmd_checkpcitem(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_givedecoration(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_adddecoration(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
@ -556,7 +556,7 @@ bool8 ScrCmd_givedecoration(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_takedecoration(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_removedecoration(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 decorId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
@ -1726,7 +1726,7 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_givemoney(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_addmoney(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 amount = ScriptReadWord(ctx);
|
||||
u8 ignore = ScriptReadByte(ctx);
|
||||
@ -1736,7 +1736,7 @@ bool8 ScrCmd_givemoney(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_takemoney(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_removemoney(struct ScriptContext *ctx)
|
||||
{
|
||||
u32 amount = ScriptReadWord(ctx);
|
||||
u8 ignore = ScriptReadByte(ctx);
|
||||
@ -2127,22 +2127,22 @@ bool8 ScrCmd_checkcoins(struct ScriptContext *ctx)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_givecoins(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_addcoins(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 coins = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
if (GiveCoins(coins) == TRUE)
|
||||
if (AddCoins(coins) == TRUE)
|
||||
gSpecialVar_Result = 0;
|
||||
else
|
||||
gSpecialVar_Result = 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_takecoins(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_removecoins(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 coins = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
if (TakeCoins(coins) == TRUE)
|
||||
if (RemoveCoins(coins) == TRUE)
|
||||
gSpecialVar_Result = 0;
|
||||
else
|
||||
gSpecialVar_Result = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user