From acb480f1c158ba9382b145c64ecd0d908c863b98 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 12:57:49 -0400 Subject: [PATCH 1/7] Sync event.inc and scrcmd.c --- asm/macros/event.inc | 1177 ++++++++++------- data/event_scripts.s | 34 +- data/maps/BirthIsland_Exterior/scripts.inc | 6 +- .../scripts.inc | 4 +- .../scripts.inc | 10 +- data/maps/CeladonCity_GameCorner/scripts.inc | 10 +- .../scripts.inc | 20 +- data/maps/CeruleanCity_BikeShop/scripts.inc | 2 +- data/maps/CeruleanCity_House3/scripts.inc | 2 +- data/maps/CeruleanCity_House5/scripts.inc | 22 +- .../scripts.inc | 20 +- .../scripts.inc | 4 +- .../scripts.inc | 2 +- .../FiveIsland_WaterLabyrinth/scripts.inc | 4 +- data/maps/FuchsiaCity/scripts.inc | 28 +- .../scripts.inc | 6 +- data/maps/MtMoon_B2F/scripts.inc | 4 +- data/maps/PalletTown/scripts.inc | 6 +- .../PalletTown_ProfessorOaksLab/scripts.inc | 14 +- data/maps/PewterCity_Museum_1F/scripts.inc | 8 +- .../PokemonLeague_ChampionsRoom/scripts.inc | 2 +- data/maps/Route1/scripts.inc | 2 +- .../maps/Route10_PokemonCenter_1F/scripts.inc | 6 +- data/maps/Route11_EastEntrance_2F/scripts.inc | 8 +- data/maps/Route15_WestEntrance_2F/scripts.inc | 10 +- .../maps/Route16_NorthEntrance_2F/scripts.inc | 6 +- data/maps/Route18_EastEntrance_2F/scripts.inc | 2 +- data/maps/Route22_NorthEntrance/scripts.inc | 4 +- data/maps/Route23/scripts.inc | 28 +- data/maps/Route25_SeaCottage/scripts.inc | 16 +- data/maps/Route2_EastBuilding/scripts.inc | 6 +- data/maps/Route2_House/scripts.inc | 2 +- data/maps/Route4_PokemonCenter_1F/scripts.inc | 16 +- data/maps/SSAnne_2F_Room1/scripts.inc | 4 +- data/maps/SaffronCity_Dojo/scripts.inc | 14 +- data/maps/SevenIsland_House_Room1/scripts.inc | 2 +- data/maps/SilphCo_7F/scripts.inc | 4 +- .../UndergroundPath_NorthEntrance/scripts.inc | 2 +- data/maps/VermilionCity_House2/scripts.inc | 2 +- data/maps/VictoryRoad_1F/scripts.inc | 4 +- data/maps/VictoryRoad_2F/scripts.inc | 7 +- data/maps/VictoryRoad_3F/scripts.inc | 7 +- data/mystery_event_msg.s | 4 +- data/script_cmd_table.inc | 426 +++--- data/scripts/cable_club.inc | 14 +- data/scripts/day_care.inc | 8 +- data/scripts/field_moves.inc | 30 +- data/scripts/flash.inc | 2 +- data/scripts/move_tutors.inc | 2 +- data/scripts/obtain_item.inc | 34 +- data/scripts/pc_transfer.inc | 8 +- data/scripts/pokedex_rating.inc | 8 +- data/scripts/seagallop.inc | 2 +- data/scripts/static_pokemon.inc | 2 +- data/scripts/surf.inc | 4 +- data/scripts/trainer_battle.inc | 16 +- data/scripts/trainer_card.inc | 8 +- data/scripts/trainer_tower.inc | 2 +- include/constants/maps.h | 4 + include/event_object_lock.h | 8 +- include/event_object_movement.h | 10 +- include/field_weather.h | 4 +- include/fieldmap.h | 8 + include/overworld.h | 6 +- include/script.h | 2 +- include/script_menu.h | 2 +- include/text.h | 2 +- src/event_object_lock.c | 8 +- src/event_object_movement.c | 10 +- src/field_specials.c | 2 +- src/field_weather_util.c | 8 +- src/mevent_server.c | 2 +- src/overworld.c | 12 +- src/rfu_union_tool.c | 4 +- src/scrcmd.c | 307 +++-- src/script.c | 2 +- src/script_menu.c | 2 +- src/union_room.c | 2 +- 78 files changed, 1364 insertions(+), 1148 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index ef1b077de..c79f10a6b 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -44,88 +44,102 @@ .4byte \destination .endm - @ Jumps to the standard function at index function. + @ Jumps to the script in gStdScripts at index function. .macro gotostd function:req .byte 0x08 .byte \function .endm - @ Calls the standard function at index function. + @ Callstd ids + STD_OBTAIN_ITEM = 0 + STD_FIND_ITEM = 1 + + MSGBOX_NPC = 2 + MSGBOX_SIGN = 3 + MSGBOX_DEFAULT = 4 + MSGBOX_YESNO = 5 + MSGBOX_AUTOCLOSE = 6 + + STD_OBTAIN_DECORATION = 7 + STD_PUT_ITEM_AWAY = 8 + STD_RECEIVED_ITEM = 9 + + @ Calls the script in gStdScripts at index function. .macro callstd function:req .byte 0x09 .byte \function .endm - @ If the result of the last comparison matches condition (see Comparison operators), jumps to the standard function at index function. + @ If the result of the last comparison matches condition (see Comparison operators), jumps to the script in gStdScripts at index function. .macro gotostd_if condition:req, function:req .byte 0x0a .byte \condition .byte \function .endm - @ If the result of the last comparison matches condition (see Comparison operators), calls the standard function at index function. + @ If the result of the last comparison matches condition (see Comparison operators), calls the script in gStdScripts at index function. .macro callstd_if condition:req, function:req .byte 0x0b .byte \condition .byte \function .endm - @ Executes a script stored in a default RAM location. - .macro gotoram + @ Equivalent to the 'return' command for a RAM script. + .macro returnram .byte 0x0c .endm - @ Terminates script execution and "resets the script RAM". - .macro killscript + @ Equivalent to the 'end' command for a RAM script. + .macro endram .byte 0x0d .endm - @ Sets mystery event status + @ Sets the Mystery Event script status (MEVENT_STATUS_*). .macro setmysteryeventstatus value:req .byte 0x0e .byte \value .endm - @ Sets the specified script bank to immediate value. - .macro loadword destination:req, value:req + @ Sets the value at the specified script data index to a fixed 4-byte value. + .macro loadword destIndex:req, value:req .byte 0x0f - .byte \destination + .byte \destIndex .4byte \value .endm - @ Sets the specified script bank to immediate value. - .macro loadbyte destination:req, value:req + @ Sets the value at the specified script data index to a fixed byte value. + .macro loadbyte destIndex:req, value:req .byte 0x10 - .byte \destination + .byte \destIndex .byte \value .endm - @ Sets the byte at offset to value. - .macro writebytetoaddr value:req, offset:req + @ Sets the value at the specified pointer. + .macro setptr value:req, ptr:req .byte 0x11 .byte \value - .4byte \offset + .4byte \ptr .endm - @ Copies the byte value at source into the specified script bank. - .macro loadbytefromaddr destination:req, source:req + @ Sets the value at the specified script data index to the value at pointer 'source'. + .macro loadbytefromptr destIndex:req, source:req .byte 0x12 - .byte \destination + .byte \destIndex .4byte \source .endm - @ Not sure. Judging from XSE's description I think it takes the least-significant byte in bank source and writes it to destination. - .macro setptrbyte source:req, destination:req + @ Sets the value at pointer 'destination' to the contents of the script data at 'srcIndex'. + .macro setptrbyte srcIndex:req, destination:req .byte 0x13 - .byte \source + .byte \srcIndex .4byte \destination .endm - @ Copies the contents of bank source into bank destination. - .macro copylocal destination:req, source:req + @ Copies the contents of the script data from one index to another. + .macro copylocal destIndex:req, srcIndex:req .byte 0x14 - .byte \destination - .byte \source + .byte \destIndex + .byte \srcIndex .endm @ Copies the byte at source to destination, replacing whatever byte was previously there. @@ -170,56 +184,64 @@ .2byte \source .endm - @ Compares the values of script banks a and b, after forcing the values to bytes. - .macro compare_local_to_local byte1:req, byte2:req + @ Compares the values of the script data at indexes 'local1' and 'local2'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_local_to_local local1:req, local2:req .byte 0x1b - .byte \byte1 - .byte \byte2 + .byte \local1 + .byte \local2 .endm - @ Compares the least-significant byte of the value of script bank a to a fixed byte value (b). - .macro compare_local_to_value a:req, b:req + @ Compares the value of the script data at index 'local' to a fixed value. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_local_to_value local:req, value:req .byte 0x1c - .byte \a - .byte \b + .byte \local + .byte \value .endm - @ Compares the least-significant byte of the value of script bank a to the byte located at offset b. - .macro compare_local_to_addr a:req, b:req + @ Compares the value of the script data at index 'local' to the value at 'ptr' + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_local_to_ptr local:req, ptr:req .byte 0x1d - .byte \a - .4byte \b + .byte \local + .4byte \ptr .endm - @ Compares the byte located at offset a to the least-significant byte of the value of script bank b. - .macro compare_addr_to_local a:req, b:req + @ Compares the value at 'ptr' to the value of the script data at index 'local'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_ptr_to_local ptr:req, local:req .byte 0x1e - .4byte \a - .byte \b + .4byte \ptr + .byte \local .endm - @ Compares the byte located at offset a to a fixed byte value (b). - .macro compare_addr_to_value a:req, b:req + @ Compares the value at 'ptr' to a fixed value. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_ptr_to_value ptr:req, value:req .byte 0x1f - .4byte \a - .byte \b + .4byte \ptr + .byte \value .endm - @ Compares the byte located at offset a to the byte located at offset b. - .macro compare_addr_to_addr a:req, b:req + @ Compares the value at 'ptr1' to the value at 'ptr2'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_ptr_to_ptr ptr1:req, ptr2:req .byte 0x20 - .4byte \a - .4byte \b + .4byte \ptr1 + .4byte \ptr2 .endm - @ Compares the value of `var` to a fixed word value (b). + @ Compares the value of 'var' to a fixed value. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if .macro compare_var_to_value var:req, value:req .byte 0x21 .2byte \var .2byte \value .endm - @ Compares the value of `var` to the value of `var2`. + @ Compares the value of 'var1' to the value of 'var2'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if .macro compare_var_to_var var1:req, var2:req .byte 0x22 .2byte \var1 @@ -227,7 +249,7 @@ .endm @ Generic compare macro which attempts to deduce argument types based on their values - @ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8014 are considered event variable identifiers + @ Any values between VARS_START to VARS_END and SPECIAL_VARS_START to SPECIAL_VARS_END are considered event variable identifiers .macro compare var:req, arg:req .if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END)) compare_var_to_var \var, \arg @@ -236,90 +258,95 @@ .endif .endm - @ Calls the native C function stored at `func`. + @ Calls the native C function stored at func. .macro callnative func:req .byte 0x23 .4byte \func .endm - @ Replaces the script with the function stored at `func`. Execution returns to the bytecode script when func returns TRUE. + @ Replaces the script with the function stored at func. Execution returns to the bytecode script when func returns TRUE. .macro gotonative func:req .byte 0x24 .4byte \func .endm - @ Calls a special function; that is, a piece of ASM code designed for use by scripts and listed in a table of pointers. + @ Calls a function listed in the table in data/specials.inc. .macro special function:req .byte 0x25 .2byte SPECIAL_\function .endm - @ Calls a special function. That function's output (if any) will be written to the variable you specify. + @ Calls a function listed in the table in data/specials.inc. + @ That function's output (if any) will be written to the variable specified by 'output'. .macro specialvar output:req, function:req .byte 0x26 .2byte \output .2byte SPECIAL_\function .endm - @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock state, the script will remain blocked indefinitely (essentially a hang). + @ Blocks script execution until a command or C code manually unblocks it. Generally used with specific + @ commands and specials. Calling EnableBothScriptContexts for instance will allow execution to continue. .macro waitstate .byte 0x27 .endm - @ Blocks script execution for time (frames? milliseconds?). - .macro delay time:req + @ Blocks script execution for frames. (Pokemon Emerald runs at just shy of 60 frames per second.) + .macro delay frames:req .byte 0x28 - .2byte \time + .2byte \frames .endm - @ Sets a to 1. - .macro setflag a:req + @ Sets flag to TRUE. + .macro setflag flag:req .byte 0x29 - .2byte \a + .2byte \flag .endm - @ Sets a to 0. - .macro clearflag a:req + @ Sets flag to FALSE. + .macro clearflag flag:req .byte 0x2a - .2byte \a + .2byte \flag .endm - @ Compares a to 1. - .macro checkflag a:req + @ Compares flag to TRUE and stores the result in comparisonResult to be used by goto_if, etc + @ See additional _if_unset and _if_set macros + .macro checkflag flag:req .byte 0x2b - .2byte \a + .2byte \flag .endm - @ In FireRed, this command is a nop. - .macro initclock hour:req minute:req + @ In FRLG, this command is a nop. In RSE, initializes the RTC's local time offset to the given hour and minute. + .macro initclock hour:req, minute:req .byte 0x2c + .2byte \hour + .2byte \minute .endm - @ In FireRed, this command is a nop. - .macro dodailyevents + @ In FRLG, this command is a nop. In RSE, updates local time using the RTC and runs time based events. + .macro dotimebasedevents .byte 0x2d .endm - @ Resets the values of variables VAR_0x8000, VAR_0x8001, and VAR_0x8002. + @ Sets the values of variables VAR_0x8000, VAR_0x8001, and VAR_0x8002 to 0. In RSE, they'd get the current hour, minute, and second respectively. .macro gettime .byte 0x2e .endm - @ Plays the specified (sound_number) sound. Only one sound may play at a time, with newer ones interrupting older ones. - .macro playse sound_number:req + @ Plays the specified sound. Only one sound may play at a time, with newer ones interrupting older ones. + .macro playse song:req .byte 0x2f - .2byte \sound_number + .2byte \song .endm - @ Blocks script execution until the currently-playing sound (triggered by sound) finishes playing. + @ Blocks script execution until the currently-playing sound (triggered by playse) finishes playing. .macro waitse .byte 0x30 .endm - @ Plays the specified (fanfare_number) fanfare. - .macro playfanfare fanfare_number:req + @ Plays the fanfare specified by the song number. If the specified song is not a fanfare it will instead play the first song in sFanfares. + .macro playfanfare song:req .byte 0x31 - .2byte \fanfare_number + .2byte \song .endm @ Blocks script execution until all currently-playing fanfares finish. @@ -327,17 +354,19 @@ .byte 0x32 .endm - @ Plays the specified (song_number) song. The byte is apparently supposed to be 0x00. - .macro playbgm song_number:req, unknown:req + @ Plays the specified song. If save_song is TRUE, the + @ specified song will be saved as if savebgm was called with it. + .macro playbgm song:req, save_song:req .byte 0x33 - .2byte \song_number - .byte \unknown + .2byte \song + .byte \save_song .endm - @ Plays the specified (song_number) song. - .macro savebgm song_number:req + @ Saves the specified song to be played later. Saved music may be played when Overworld_PlaySpecialMapMusic is called. This occurs on + @ exiting most warps. + .macro savebgm song:req .byte 0x34 - .2byte \song_number + .2byte \song .endm @ Crossfades the currently-playing song into the map's default song. @@ -345,10 +374,10 @@ .byte 0x35 .endm - @ Crossfades the currently-playng song into the specified (song_number) song. - .macro fadenewbgm song_number:req + @ Crossfades the currently-playing song into the specified song. + .macro fadenewbgm song:req .byte 0x36 - .2byte \song_number + .2byte \song .endm @ Fades out the currently-playing song. @@ -357,91 +386,126 @@ .byte \speed .endm - @ Fades the currently-playing song back in. + @ Fades the previously-playing song back in. .macro fadeinbgm speed:req .byte 0x38 .byte \speed .endm - @ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF, then the player will instead be sent to (x, y) on the map. - .macro warp map:req, warp:req, x:req, y:req + @ Helper macro for warp commands that formats their arguments. + @ It allows warp macros to either provide 1. a valid id for which warp location to use, + @ or 2. a pair of x/y coordinates to use. Both may be provided but at least one will be + @ ignored by SetPlayerCoordsFromWarp. If none are provided it will use dummy arguments, + @ and the warp will send the player to the center of the map. + @ Examples of valid inputs for a warp command: + @ - warp MAP, x, y + @ - warp MAP, warpId + @ - warp MAP + @ - warp MAP, warpId, x, y + .macro formatwarp map:req, a, b, c + map \map + .ifb \a @ No arguments provided, use dummy warpId and coords. + .byte WARP_ID_NONE + .2byte -1 @ x + .2byte -1 @ y + .else + .ifb \b @ Only one argument provided, treat it as a warpId and use dummy coords. + .byte \a @ warpId + .2byte -1 @ x + .2byte -1 @ y + .else + .ifb \c @ Only two arguments provided, treat them as a coord pair and use dummy warpId. + .byte WARP_ID_NONE + .2byte \a @ x + .2byte \b @ y + .else @ All three arguments provided. Output them and let the warp sort out which to use. + .byte \a @ warpId + .2byte \b @ x + .2byte \c @ y + .endif + .endif + .endif + .endm + + @ Warps the player to the specified map. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warp map:req, a, b, c .byte 0x39 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ Clone of warp that does not play a sound effect. - .macro warpsilent map:req, warp:req, x:req, y:req + @ Warps the player to the specified map without playing a sound effect. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpsilent map:req, a, b, c .byte 0x3a - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ Clone of warp that uses "a walking effect". - .macro warpdoor map:req, warp:req, x:req, y:req + @ Warps the player to the specified map and plays a door opening animation before stepping upwards into it. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpdoor map:req, a, b, c .byte 0x3b - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ Warps the player to another map using a hole animation. + @ Warps the player to another map using a hole animation. If the specified map is MAP_UNDEFINED it will instead + @ use the map set by setholewarp. In either case the target coordinates on the destination map will be the + @ player's current position. .macro warphole map:req .byte 0x3c map \map .endm - @ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E.[source] - .macro warpteleport map:req, warp:req, x:req, y:req + @ Warps the player to the specified map using a teleport effect. Effect is similar to warpspinenter but + @ this warp has a fade out first and doesn't maintain the original facing direction. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpteleport map:req, a, b, c .byte 0x3d - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ Clone of warp. Used by an (unused?) Safari Zone script to return the player to the gatehouse and end the Safari Game. - .macro setwarp map:req, warp:req, x:req, y:req + @ Sets the warp destination to be used later. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setwarp map:req, a, b, c .byte 0x3e - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ Sets a default warp place. If a warp tries to send the player to Warp 127 on Map 127.127, they will instead be sent here. Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). - .macro setdynamicwarp map:req, warp:req, x:req, y:req + @ Sets the dynamic warp destination. Warps with a destination map of MAP_NONE will target this destination. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setdynamicwarp map:req, a, b, c .byte 0x3f - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ Clone of warp3, except that this writes data to different offsets... - .macro setdivewarp map:req, warp:req, x:req, y:req + @ Sets the destination that diving or emerging from a dive will take the player to. Note that this only + @ applies if the current map does not have a dive/emerge connection. If it does have a corresponding + @ map connection then that map and the player's current coordinates will be used as the destination instead. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setdivewarp map:req, a, b, c .byte 0x40 - map \map - .byte \warp - .2byte \x - .2byte \x + formatwarp \map, \a, \b, \c .endm - @ Clone of warp3, except that this writes data to different offsets... - .macro setholewarp map:req, warp:req, x:req, y:req + @ Sets the destination that falling into a hole will take the player to. + @ While it does accept and set the x/y coordinates and warpId, they are ultimately ignored. + @ This is only used to set the map the player should fall to. The exact location on the + @ map to fall to is determined by warphole. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setholewarp map:req, a=0, b=0, c .byte 0x41 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ Retrieves the player's zero-indexed X- and Y-coordinates in the map, and stores them in the specified variables. + @ Retrieves the player's zero-indexed x- and y-coordinates in the map, and stores them in the specified variables. .macro getplayerxy x:req, y:req .byte 0x42 .2byte \x @@ -453,171 +517,181 @@ .byte 0x43 .endm - @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE. - .macro additem index:req, quantity=1 + @ Attempts to add quantity of the specified item to the player's Bag. If the player has enough room, the item will + @ be added and VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE. + .macro additem itemId:req, quantity=1 .byte 0x44 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Removes quantity of item index from the player's Bag. - .macro removeitem index:req, quantity=1 + @ Removes quantity of the specified item from the player's Bag. If the player has fewer than 'quantity' in their bag + @ then none will be removed and VAR_RESULT will be set to FALSE. Otherwise it will be set to TRUE. + .macro removeitem itemId:req, quantity=1 .byte 0x45 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room. - .macro checkitemspace index:req, quantity:req + @ Checks if the player has enough space in their Bag to hold quantity more of the specified item. Sets VAR_RESULT to + @ TRUE if there is room, or FALSE is there is no room. + .macro checkitemspace itemId:req, quantity=1 .byte 0x46 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has enough of the item, or FALSE if they have fewer than quantity of the item. - .macro checkitem index:req, quantity:req + @ Checks if the player has quantity or more of the specified item in their Bag. Sets VAR_RESULT to TRUE if the player has + @ enough of the item, or FALSE if they have fewer than quantity of the item. + .macro checkitem itemId:req, quantity=1 .byte 0x47 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE). - .macro checkitemtype index:req + @ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. + @ This is used to show the name of the proper Bag pocket when the player receives an item via callstd. + .macro checkitemtype itemId:req .byte 0x48 - .2byte \index + .2byte \itemId .endm - @ Adds a quantity amount of item index to the player's PC. Both arguments can be variables. - .macro addpcitem index:req, quantity:req + @ Adds quantity of the specified item to the player's PC. + .macro addpcitem itemId:req, quantity=1 .byte 0x49 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Checks for quantity amount of item index in the player's PC. Both arguments can be variables. - .macro checkpcitem index:req, quantity:req + @ Checks for quantity of the specified item in the player's PC. + .macro checkpcitem itemId:req, quantity=1 .byte 0x4a - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro adddecor decoration:req + @ In FRLG, this command is a nop. In RSE, adds a decoration to the player's PC. + .macro adddecoration decoration:req .byte 0x4b .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro removedecor decoration:req + @ In FRLG, this command is a nop. In RSE, removes a decoration from the player's PC. + .macro removedecoration decoration:req .byte 0x4c .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro hasdecor decoration:req + @ In FRLG, this command is a nop. In RSE, checks for decoration in the player's PC. + .macro checkdecor decoration:req .byte 0x4d .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro checkdecor decoration:req + @ In FRLG, this command is a nop. In RSE, checks if the player has enough space in their PC to hold the decoration. + .macro checkdecorspace decoration:req .byte 0x4e .2byte \decoration .endm - @ Applies the movement data at movements to the specified (index) Object. Also closes any standard message boxes that are still open. - @ If no map is specified, then the current map is used. - .macro applymovement index:req, movements:req, mapGroup, mapNum - .ifb \mapGroup + @ Applies the movement data at movements to the specified (localId) object. If no map is specified, then the current map is used. + .macro applymovement localId:req, movements:req, map + .ifb \map .byte 0x4f - .2byte \index + .2byte \localId .4byte \movements .else + @ Really only useful if the object has followed from one map to another (e.g. Wally during the catching event). .byte 0x50 - .2byte \index + .2byte \localId .4byte \movements - .byte \mapGroup - .byte \mapNum + map \map .endif .endm - @ Blocks script execution until the movements being applied to the specified (index) Object finish. If the specified Object is 0x0000, then the command will block script execution until all Objects affected by applymovement finish their movements. If the specified Object is not currently being manipulated with applymovement, then this command does nothing. + @ Blocks script execution until the movements being applied to the specified (localId) object finish. + @ If localId is 0, then the id of the last-moved object will be used instead. If the specified object + @ is not currently being manipulated with applymovement, then this command does nothing. @ If no map is specified, then the current map is used. - .macro waitmovement index:req, mapGroup, mapNum - .ifb \mapGroup + .macro waitmovement localId:req, map + .ifb \map .byte 0x51 - .2byte \index + .2byte \localId .else .byte 0x52 - .2byte \index - .byte \mapGroup - .byte \mapNum + .2byte \localId + map \map .endif .endm - @ Attempts to hide the specified (localId) Object on the specified (map_group, map_num) map, by setting its visibility flag if it has a valid one. If the Object does not have a valid visibility flag, this command does nothing. + @ Attempts to despawn the specified (localId) object on the specified map. + @ It also sets the object's visibility flag if it has one. @ If no map is specified, then the current map is used. - .macro removeobject localId:req, mapGroup, mapNum - .ifb \mapGroup + .macro removeobject localId:req, map + .ifb \map .byte 0x53 .2byte \localId .else .byte 0x54 .2byte \localId - .byte \mapGroup - .byte \mapNum + map \map .endif .endm - .macro addobject localId:req, mapGroup, mapNum - .ifb \mapGroup + @ Attempts to spawn the specified (localId) object the specified map. + @ Note that unlike removeobject this does not modify the object's flag. + @ If no map is specified, then the current map is used. + .macro addobject localId:req, map + .ifb \map .byte 0x55 .2byte \localId .else .byte 0x56 .2byte \localId - .byte \mapGroup - .byte \mapNum + map \map .endif .endm - @ Sets the specified (index) Object's position on the current map. - .macro setobjectxy index:req, x:req, y:req + @ Sets the specified (localId) object's position on the current map. + .macro setobjectxy localId:req, x:req, y:req .byte 0x57 - .2byte \index + .2byte \localId .2byte \x .2byte \y .endm - .macro showobject index:req, map:req + @ Sets the specified object's invisibility to FALSE. + .macro showobjectat localId:req, map:req .byte 0x58 - .2byte \index + .2byte \localId map \map .endm - .macro hideobject index:req, map:req + @ Sets the specified object's invisibility to TRUE. + .macro hideobjectat localId:req, map:req .byte 0x59 - .2byte \index + .2byte \localId map \map .endm - @ If the script was called by an Object, then that Object will turn to face toward the metatile that the player is standing on. + @ Turns the currently selected object (if there is one) to face the player. .macro faceplayer .byte 0x5a .endm - .macro turnobject index:req, direction:req + @ Turns the specified object in the specified direction. + .macro turnobject localId:req, direction:req .byte 0x5b - .2byte \index + .2byte \localId .byte \direction .endm - @ If the Trainer flag for Trainer index is not set, this command does absolutely nothing. - .macro trainerbattle type:req, trainer:req, word:req, pointer1:req, pointer2, pointer3, pointer4 + @ Configures the arguments for a trainer battle, then jumps to the appropriate script in scripts/trainer_battle.inc + .macro trainerbattle type:req, trainer:req, local_id:req, pointer1:req, pointer2, pointer3, pointer4 .byte 0x5c .byte \type .2byte \trainer - .2byte \word + .2byte \local_id .if \type == TRAINER_BATTLE_SINGLE .4byte \pointer1 @ text .4byte \pointer2 @ text @@ -660,8 +734,8 @@ NO_MUSIC = FALSE - @ Starts a single trainer battle, takes a trainer, intro text, loss text, and an optional event script - @ when used with an event script, you can also pass in an optional flag to disable music + @ Starts a single trainer battle. Takes a trainer, intro text, loss text, and an optional event script. + @ When used with an event script, you can also pass in an optional flag to disable music .macro trainerbattle_single trainer:req, intro_text:req, lose_text:req, event_script=FALSE, music=TRUE .if \event_script == FALSE trainerbattle TRAINER_BATTLE_SINGLE, \trainer, 0, \intro_text, \lose_text @@ -672,8 +746,8 @@ .endif .endm - @ Starts a double trainer battle, takes a trainer, intro text, loss text, text for when you have too few pokemon - @ and an optional event script, when used with an event script you can pass in an optional flag to disable music + @ Starts a double trainer battle. Takes a trainer, intro text, loss text, text for when you have too few pokemon + @ and an optional event script. When used with an event script you can pass in an optional flag to disable music .macro trainerbattle_double trainer:req, intro_text:req, lose_text:req, not_enough_pkmn_text:req, event_script=FALSE, music=TRUE .if \event_script == FALSE trainerbattle TRAINER_BATTLE_DOUBLE, \trainer, 0, \intro_text, \lose_text, \not_enough_pkmn_text @@ -689,12 +763,12 @@ trainerbattle TRAINER_BATTLE_REMATCH, \trainer, 0, \intro_text, \lose_text .endm - @ Starts a rematch double battle, takes a trainer, intro text, loss text, and text for when you have too few pokemon + @ Starts a rematch double battle. Takes a trainer, intro text, loss text, and text for when you have too few pokemon .macro trainerbattle_rematch_double trainer:req, intro_text:req, lose_text:req, not_enough_pkmn_text:req trainerbattle TRAINER_BATTLE_REMATCH_DOUBLE, \trainer, 0, \intro_text, \lose_text, \not_enough_pkmn_text .endm - @ Starts a trainer battle, skipping intro text, takes a trainer and loss text + @ Starts a trainer battle, skipping intro text. Takes a trainer and loss text .macro trainerbattle_no_intro trainer:req, lose_text:req trainerbattle TRAINER_BATTLE_SINGLE_NO_INTRO_TEXT, \trainer, 0, \lose_text .endm @@ -704,412 +778,491 @@ trainerbattle TRAINER_BATTLE_EARLY_RIVAL, \trainer, \flags, \defeat_text, \victory_text .endm - @ Starts a trainer battle using the battle information stored in RAM (usually by trainerbattle, which actually calls this command behind-the-scenes), and blocks script execution until the battle finishes. - .macro battlebegin + @ Starts a trainer battle using the battle information stored in RAM (usually by the scripts in trainer_battle.inc, which + @ are run by trainerbattle), and blocks script execution until the battle finishes. + .macro dotrainerbattle .byte 0x5d .endm - .macro ontrainerbattleend + @ Goes to address after the trainerbattle command (called by the battle functions, see battle_setup.c) + .macro gotopostbattlescript .byte 0x5e .endm - .macro ontrainerbattleendgoto + @ Goes to address specified in the trainerbattle command (called by the battle functions, see battle_setup.c) + .macro gotobeatenscript .byte 0x5f .endm - @ Compares Flag (trainer + 0x500) to 1. (If the flag is set, then the trainer has been defeated by the player.) + @ Checks if the trainer has been defeated by the player (by comparing the flag 'trainer + TRAINER_FLAGS_START' to TRUE). .macro checktrainerflag trainer:req .byte 0x60 .2byte \trainer .endm - @ Sets Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) + @ Sets the trainer flag (trainer + TRAINER_FLAGS_START) to TRUE (defeated). .macro settrainerflag trainer:req .byte 0x61 .2byte \trainer .endm - @ Clears Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) + @ Sets the trainer flag (trainer + TRAINER_FLAGS_START) to FALSE (not defeated). .macro cleartrainerflag trainer:req .byte 0x62 .2byte \trainer .endm - .macro setobjectxyperm index:req, x:req, y:req + @ Sets the coordinates of an object's template, so that if the sprite goes off screen + @ it'll still be there when it comes back on screen. + .macro setobjectxyperm localId:req, x:req, y:req .byte 0x63 - .2byte \index + .2byte \localId .2byte \x .2byte \y .endm - .macro moveobjectoffscreen index:req + @ Copies a live object event's xy position to its template, so that if the sprite goes off screen + @ it'll still be there when it comes back on screen. + .macro copyobjectxytoperm localId:req .byte 0x64 - .2byte \index + .2byte \localId .endm - .macro setobjectmovementtype word:req, byte:req + @ Sets the movement type (MOVEMENT_TYPE_*) for an object's template. + .macro setobjectmovementtype localId:req, movementType:req .byte 0x65 - .2byte \word - .byte \byte + .2byte \localId + .byte \movementType .endm - @ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the box and its text have been fully drawn. + @ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the + @ box and its text have been fully drawn. .macro waitmessage .byte 0x66 .endm - @ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as a pointer to the text. (You can use loadpointer to place a string pointer in a script bank.) + @ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at + @ that offset will be loaded and used. If text is NULL, then the value of script data 0 will be treated as + @ a pointer to the text. The 'loadword 0' in msgbox sets this value, for instance. .macro message text:req .byte 0x67 .4byte \text .endm - @ Holds the current message box open until the player presses a key. The message box is then closed. + @ Closes the current message box. .macro closemessage .byte 0x68 .endm - @ Ceases movement for all Objects on-screen. + @ Freezes all objects immediately except the player. The player is frozen once their movement is finished. .macro lockall .byte 0x69 .endm - @ If the script was called by an Object, then that Object's movement will cease. + @ Freezes all objects immediately except the player and the selected object. The player and selected object are frozen once their movement is finished. .macro lock .byte 0x6a .endm - @ Resumes normal movement for all Objects on-screen, and closes any standard message boxes that are still open. + @ Resumes normal movement for all objects on-screen, and closes any standard message boxes that are still open. .macro releaseall .byte 0x6b .endm - @ If the script was called by an Object, then that Object's movement will resume. This command also closes any standard message boxes that are still open. + @ Resumes normal movement for the selected object (if there is one) and the player. Also closes any standard message boxes that are still open. .macro release .byte 0x6c .endm - @ Blocks script execution until the player presses any key. + @ Blocks script execution until the player presses the A or B button. .macro waitbuttonpress .byte 0x6d .endm - @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in VAR_RESULT as NO (0) or YES (1). Pressing B is equivalent to answering NO + @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. + @ Their selection is stored in VAR_RESULT as NO (0) or YES (1). Pressing B is equivalent to answering NO .macro yesnobox x:req, y:req .byte 0x6e .byte \x .byte \y .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. - .macro multichoice x:req, y:req, list:req, b:req + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. + @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId. + @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. + .macro multichoice x:req, y:req, multichoiceId:req, ignoreBPress:req .byte 0x6f .byte \x .byte \y - .byte \list - .byte \b + .byte \multichoiceId + .byte \ignoreBPress .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. - .macro multichoicedefault x:req, y:req, list:req, default:req, b:req + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. + @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId. + @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0. + @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. + .macro multichoicedefault x:req, y:req, multichoiceId:req, default:req, ignoreBPress:req .byte 0x70 .byte \x .byte \y - .byte \list + .byte \multichoiceId .byte \default - .byte \b + .byte \ignoreBPress .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The per_row argument determines how many list items will be shown on a single row of the box. - .macro multichoicegrid x:req, y:req, list:req, per_row:req, b:req + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. + @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId. + @ The per_row argument determines how many list items will be shown on a single row of the box. + @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. + .macro multichoicegrid x:req, y:req, multichoiceId:req, per_row:req, ignoreBPress:req .byte 0x71 .byte \x .byte \y - .byte \list + .byte \multichoiceId .byte \per_row - .byte \b + .byte \ignoreBPress .endm + @ In FRLG, this command is a nop. .macro drawbox .byte 0x72 .endm - .macro erasebox byte1:req, byte2:req, byte3:req, byte4:req + @ In FRLG, this command is a nop. Still consumes parameters. + .macro erasebox left:req, top:req, right:req, bottom:req .byte 0x73 - .byte \byte1 - .byte \byte2 - .byte \byte3 - .byte \byte4 + .byte \left + .byte \top + .byte \right + .byte \bottom .endm - .macro drawboxtext + @ In FRLG, this command is a nop. Still consumes parameters. + .macro drawboxtext left:req, top:req, multichoiceId:req, ignoreBPress:req .byte 0x74 + .byte \left + .byte \top + .byte \multichoiceId + .byte \ignoreBPress .endm - @ Displays a box containing the front sprite for the specified (species) Pokemon species. - .macro drawmonpic species:req, x:req, y:req + @ Displays a box containing the front sprite for the specified Pokemon species and plays its cry. + .macro showmonpic species:req, x:req, y:req .byte 0x75 .2byte \species .byte \x .byte \y .endm - @ Hides all boxes displayed with drawmonpic. - .macro erasemonpic + @ Hides the box displayed by showmonpic. + .macro hidemonpic .byte 0x76 .endm - @ Draws an image of the winner of the contest. In FireRed, this command is a nop. (The argument is discarded.) - .macro drawcontestwinner a:req + @ In FRLG, this command is a nop. In RSE, draws an image of the winner of the contest. winnerId is any CONTEST_WINNER_* constant. + .macro showcontestpainting winnerId:req .byte 0x77 - .byte \a + .byte \winnerId .endm - @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille characters. + @ Displays the given string as braille text in a standard message box. The string should use the .braille directive + @ to convert text to braille, and be preceded by brailleformat. The brailleformat data is skipped over (in RS, these + @ bytes determined the box's size and position, but in Emerald these are calculated automatically). .macro braillemessage text:req .byte 0x78 .4byte \text .endm - @ Gives the player one of the specified (species) Pokemon at level level holding item. The trailing 0s are unused parameters - .macro givemon species:req, level:req, item:req + @ Formatting for the braille window, to be put at the start of a pointer used by braillemessage. + .macro brailleformat winLeft:req, winTop:req, winRight:req, winBottom:req, textLeft:req, textTop:req + .byte \winLeft + .byte \winTop + .byte \winRight + .byte \winBottom + .byte \textLeft + .byte \textTop + .endm + + @ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters. + @ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome. + .macro givemon species:req, level:req, item=ITEM_NONE .byte 0x79 .2byte \species .byte \level .2byte \item - .4byte 0x0 - .4byte 0x0 + .4byte 0 + .4byte 0 .byte 0 .endm + @ Gives the player an Egg of the specified species. + @ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome. .macro giveegg species:req .byte 0x7a .2byte \species .endm - .macro setmonmove byte1:req, byte2:req, word:req + @ Replaces the move at 'slot' of the Pokémon in the player's party at 'partyIndex' with the specified move. + @ If a value greater than PARTY_SIZE is given for partyIndex it will use the last Pokémon in the party instead. + @ Note that this means in vanilla a value equal to PARTY_SIZE for partyIndex will go out of bounds. + .macro setmonmove partyIndex:req, slot:req, move:req .byte 0x7b - .byte \byte1 - .byte \byte2 - .2byte \word + .byte \partyIndex + .byte \slot + .2byte \move .endm - @ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, VAR_RESULT is set to the (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE. VAR_0x8004 is also set to this Pokemon's species. - .macro checkpartymove index:req + @ Checks if at least one Pokemon in the player's party knows the specified move. If so, VAR_RESULT is set to the + @ (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE. + @ VAR_0x8004 is also set to this Pokemon's species. + .macro checkpartymove move:req .byte 0x7c - .2byte \index + .2byte \move .endm - @ Writes the name of the Pokemon at index species to the specified buffer. - .macro getspeciesname out:req, species:req + @ Converts STR_VAR_1, STR_VAR_2, or STR_VAR_3 to its corresponding index into sScriptStringVars (0, 1, or 2). + @ If given anything else it will output it directly. + @ Note: Because the STR_VAR_# arguments given to this macro are not part of a processed string they are not + @ replaced with their charmap values, they are just passed as the literal characters "STR_VAR_#". + .macro stringvar id:req + .if \id == STR_VAR_1 + .byte 0 + .elseif \id == STR_VAR_2 + .byte 1 + .elseif \id == STR_VAR_3 + .byte 2 + .else + .byte \id + .endif + .endm + + @ Writes the name of the given Pokemon species to the specified buffer. + .macro bufferspeciesname stringVarId:req, species:req .byte 0x7d - .byte \out + stringvar \stringVarId .2byte \species .endm - @ Writes the name of the species of the first Pokémon in the player's party to the specified buffer. - .macro getfirstpartymonname out:req + @ Writes the name of the species of the first Pokemon in the player's party to the specified buffer. + .macro bufferleadmonspeciesname stringVarId:req .byte 0x7e - .byte \out + stringvar \stringVarId .endm - @ Writes the nickname of the Pokemon in slot slot (zero-indexed) of the player's party to the specified buffer. If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. - .macro getpartymonname out:req, slot:req + @ Writes the nickname of the Pokemon in 'slot' (zero-indexed) of the player's party to the specified buffer. + @ If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. + .macro bufferpartymonnick stringVarId:req, slot:req .byte 0x7f - .byte \out + stringvar \stringVarId .2byte \slot .endm - @ Writes the name of the item at index item to the specified buffer. If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. - .macro getitemname out:req, item:req + @ Writes the name of the specified item to the specified buffer. If itemId is >= ITEMS_COUNT, + @ then the name of ITEM_NONE ("????????") is buffered instead. + .macro bufferitemname stringVarId:req, item:req .byte 0x80 - .byte \out + stringvar \stringVarId .2byte \item .endm - @ Writes the name of the decoration at index decoration to the specified buffer. In FireRed, this command is a nop. - .macro getdecorname out:req, decoration:req + @ In FRLG, this command is a nop. In RSE, writes the name of the specified decoration to the specified buffer. + .macro bufferdecorationname stringVarId:req, decoration:req .byte 0x81 - .byte \out + stringvar \stringVarId .2byte \decoration .endm - @ Writes the name of the move at index move to the specified buffer. - .macro getmovename out:req, move:req + @ Writes the name of the specified move to the specified buffer. + .macro buffermovename stringVarId:req, move:req .byte 0x82 - .byte \out + stringvar \stringVarId .2byte \move .endm @ Converts the value of input to a decimal string, and writes that string to the specified buffer. - .macro getnumberstring out:req, input:req + .macro buffernumberstring stringVarId:req, input:req .byte 0x83 - .byte \out + stringvar \stringVarId .2byte \input .endm - @ Writes the standard string identified by index to the specified buffer. This command has no protections in place at all, so specifying an invalid standard string (e.x. 0x2B) can and usually will cause data corruption. - .macro getstdstring out:req, index:req + @ Writes the given standard string (STDSTRING_*) to the specified buffer. Invalid std string ids are not handled. + .macro bufferstdstring stringVarId:req, index:req .byte 0x84 - .byte \out + stringvar \stringVarId .2byte \index .endm - @ Copies the string at offset to the specified buffer. - .macro getstring out:req, offset:req + @ Copies the string at the given pointer to the specified buffer. + .macro bufferstring stringVarId:req, text:req .byte 0x85 - .byte \out - .4byte \offset + stringvar \stringVarId + .4byte \text .endm @ Opens the Pokemart system, offering the specified products for sale. + @ Products should be a list of .2byte item values preceded by an .align 2 .macro pokemart products:req .byte 0x86 .4byte \products .endm @ Opens the Pokemart system and treats the list of items as decorations. - .macro pokemartdecor products:req + @ Products should be a list of .2byte decoration values preceded by an .align 2 + .macro pokemartdecoration products:req .byte 0x87 .4byte \products .endm - @ Apparent clone of pokemart. - .macro pokemartbp products:req + @ Identical to pokemartdecoration, but with slight changes to the clerk dialogue. See uses of MART_TYPE_DECOR2. + .macro pokemartdecoration2 products:req .byte 0x88 .4byte \products .endm - @ Starts up the slot machine minigame. - .macro playslotmachine word:req + @ Starts up the slot machine minigame. id is a SLOT_MACHINE_* value that influences probabilities of certain reel outcomes. + .macro playslotmachine id:req .byte 0x89 - .2byte \word + .2byte \id .endm - @ In FireRed, this command is a nop. - .macro plantberrytree + @ In FRLG, this command is a nop. In RSE, sets a berry tree's berry and growth stage. + .macro setberrytree treeId:req, berry:req, growthStage:req .byte 0x8a + .byte \treeId + .byte \berry + .byte \growthStage .endm - @ In FireRed, this command sets the byte at 0x03000EA8 to 0x01. I do not know what that means. - .macro choosecontestpkmn + @ In FRLG, this command is a nop. In RSE, opens the party menu to select a Pokemon for a contest. + .macro choosecontestmon .byte 0x8b .endm - @ In FireRed, this command is a nop. + @ In FRLG, this command is a nop. In RSE, starts the appeals round of a contest. .macro startcontest .byte 0x8c .endm - @ In FireRed, this command is a nop. + @ In FRLG, this command is a nop. In RSE, shows the results screen of a contest. .macro showcontestresults .byte 0x8d .endm - @ In FireRed, this command is a nop. + @ In FRLG, this command is a nop. In RSE, starts communication to initialize a link contest. .macro contestlinktransfer .byte 0x8e .endm - @ Stores a random integer between 0 and limit in VAR_RESULT. + @ Stores a random integer between 0 and limit (exclusive of limit) in VAR_RESULT. .macro random limit:req .byte 0x8f .2byte \limit .endm - @ If check is 0x00, this command adds value to the player's money. - .macro addmoney value:req, check:req + @ Adds value to the player's money. If adding 'value' money would exceed MAX_MONEY, the player's money is set to MAX_MONEY. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro addmoney value:req, disable=0 .byte 0x90 .4byte \value - .byte \check + .byte \disable .endm - @ If check is 0x00, this command subtracts value from the player's money. - .macro removemoney value:req, check:req + @ Subtracts value from the player's money. If the player has less than 'value' money, their money is set to 0. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro removemoney value:req, disable=0 .byte 0x91 .4byte \value - .byte \check + .byte \disable .endm - @ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player has enough money, or FALSE if they do not. - .macro checkmoney value:req, check:req + @ Checks if the player has money >= value. VAR_RESULT is set to TRUE if the player has enough money, or FALSE if they do not. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro checkmoney value:req, disable=0 .byte 0x92 .4byte \value - .byte \check + .byte \disable .endm - @ Spawns a secondary box showing how much money the player has. - .macro showmoneybox x:req, y:req, check:req + @ Creates a window showing how much money the player has. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro showmoneybox x:req, y:req, disable=0 .byte 0x93 .byte \x .byte \y - .byte \check + .byte \disable .endm - @ Hides the secondary box spawned by showmoney. - @ The two arguments are unused. - @ They are retained here for backwards compatibility with Ruby/Sapphire. - .macro hidemoneybox x:req, y:req + @ Destroys the window created by showmoneybox. Consumption of the x and y arguments was dummied out. + .macro hidemoneybox .byte 0x94 - .byte \x - .byte \y + .byte 0 @ \x + .byte 0 @ \y .endm - @ Updates the secondary box spawned by showmoney. Consumes but does not use arguments. - .macro updatemoneybox x:req, y:req, check:req + @ Updates the window created by showmoneybox. Consumption of the x and y arguments was dummied out. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro updatemoneybox disable=0 .byte 0x95 - .byte \x - .byte \y - .byte \check + .byte 0 @ \x + .byte 0 @ \y + .byte \disable .endm - @ In FireRed, this command is a nop. - .macro getpricereduction + @ In FRLG, this command is a nop. In RSE, gets whether the effects of the specified PokeNews program are active. + .macro getpokenewsactive newsKind:req .byte 0x96 + .2byte \newsKind .endm - @ Fades the screen to black or back, using the specified effect. Effect 0x00 fades in, and effect 0x01 fades out. I don't know if other effects exist. - .macro fadescreen effect:req + @ Fades the screen to and from black and white. Modes are FADE_(TO/FROM)_(WHITE/BLACK) + .macro fadescreen mode:req .byte 0x97 - .byte \effect + .byte \mode .endm - @ Fades the screen to and from black and white. Mode 0x00 fades from black, mode 0x01 fades out to black, mode 0x2 fades in from white, and mode 0x3 fades out to white. Other modes may exist. - .macro fadescreenspeed effect:req, speed:req + @ Fades the screen to and from black and white. Modes are FADE_(TO/FROM)_(WHITE/BLACK) + .macro fadescreenspeed mode:req, speed:req .byte 0x98 - .byte \effect + .byte \mode .byte \speed .endm - .macro setflashradius word:req + @ Sets the flash level. A level of 0 is fully bright, a level of 1 is the largest flash radius, a level + @ of 7 is the smallest flash radius, a level of 8 is fully black. + .macro setflashlevel level:req .byte 0x99 - .2byte \word + .2byte \level .endm - .macro animateflash byte:req + @ Animates the flash radius from its current size to the size it would be at the specified level. + @ Note that this does not actually change the current flash level. It's typically used just before a setflashlevel. + .macro animateflash level:req .byte 0x9a - .byte \byte + .byte \level .endm - .macro messageautoscroll pointer:req + @ Automatically scrolls through the message without player input and at a fixed speed. + .macro messageautoscroll text:req .byte 0x9b - .4byte \pointer + .4byte \text .endm - @ Executes the specified field move animation. + @ Executes the specified field effect animation (FLDEFF_*). .macro dofieldeffect animation:req .byte 0x9c .2byte \animation .endm - @ Sets up the field effect argument argument with the value value. - .macro setfieldeffectarg argument:req, param:req + @ Sets the field effect argument at index 'argNum' to 'value.' + .macro setfieldeffectargument argNum:req, value:req .byte 0x9d - .byte \argument - .2byte \param + .byte \argNum + .2byte \value .endm - @ Blocks script execution until all playing field move animations complete. + @ Blocks script execution until all playing field effect animations complete. .macro waitfieldeffect animation:req .byte 0x9e .2byte \animation @@ -1121,25 +1274,26 @@ .2byte \heallocation .endm - @ Checks the player's gender. If male, then MALE (0) is stored in VAR_RESULT. If female, then FEMALE (1) is stored in VAR_RESULT. + @ Checks the player's gender. Stores the result (MALE (0) or FEMALE (1)) in VAR_RESULT. .macro checkplayergender .byte 0xa0 .endm - @ Plays the specified (species) Pokemon's cry. You can use waitcry to block script execution until the sound finishes. - .macro playmoncry species:req, effect:req + @ Plays the cry of the given species. Mode is any CRY_MODE_* constant. + @ You can use waitmoncry to block script execution until the cry finishes. + .macro playmoncry species:req, mode:req .byte 0xa1 .2byte \species - .2byte \effect + .2byte \mode .endm - @ Changes the metatile at (x, y) on the current map. - .macro setmetatile x:req, y:req, metatile_number:req, tile_attrib:req + @ Set the metatile at (x, y) on the current map to the given metatile and impassability. + .macro setmetatile x:req, y:req, metatileId:req, impassable:req .byte 0xa2 .2byte \x .2byte \y - .2byte \metatile_number - .2byte \tile_attrib + .2byte \metatileId + .2byte \impassable .endm @ Queues a weather change to the default weather for the map. @@ -1158,54 +1312,62 @@ .byte 0xa5 .endm - @ This command manages cases in which maps have tiles that change state when stepped on (specifically, cracked/breakable floors). - .macro setstepcallback subroutine:req + @ Enables the overworld task specified by stepCbId (STEP_CB_*). Only 1 can be active at a time. See src/field_tasks.c for more. + .macro setstepcallback stepCbId:req .byte 0xa6 - .byte \subroutine + .byte \stepCbId .endm + @ Sets the current map layout to the one specified by index (LAYOUT_*). + @ This should be done before the layout is loaded, typically in the ON_TRANSITION map script. .macro setmaplayoutindex index:req .byte 0xa7 .2byte \index .endm - .macro setobjectpriority index:req, map:req, priority:req + @ Sets the specified object's sprite's subpriority, and sets fixedPriority to TRUE. + @ Only used to hide the player and Briney behind the boat. + .macro setobjectsubpriority localId:req, map:req, subpriority:req .byte 0xa8 - .2byte \index + .2byte \localId map \map - .byte \priority + .byte \subpriority .endm - .macro resetobjectpriority index:req, map:req + @ Sets the specified object's fixedPriority to FALSE. Does not change the subpriority field. + .macro resetobjectsubpriority localId:req, map:req .byte 0xa9 - .2byte \index + .2byte \localId map \map .endm - .macro createvobject sprite:req, byte2:req, x:req, y:req, elevation:req, direction:req + @ Creates a sprite with object graphics. Used when creating large groups of static NPCs that exceed the object event limit. + @ The specified id can be used to refer to the sprite again later with turnvobject. + .macro createvobject graphicsId:req, id:req, x:req, y:req, elevation=3, direction=DIR_SOUTH .byte 0xaa - .byte \sprite - .byte \byte2 + .byte \graphicsId + .byte \id .2byte \x .2byte \y .byte \elevation .byte \direction .endm - .macro turnvobject index:req, direction:req + @ Turns a sprite created with createvobject. + .macro turnvobject id:req, direction:req .byte 0xab - .byte \index + .byte \id .byte \direction .endm - @ Opens the door metatile at (X, Y) with an animation. + @ Opens the door metatile at (x, y) with an animation. .macro opendoor x:req, y:req .byte 0xac .2byte \x .2byte \y .endm - @ Closes the door metatile at (X, Y) with an animation. + @ Closes the door metatile at (x, y) with an animation. .macro closedoor x:req, y:req .byte 0xad .2byte \x @@ -1217,47 +1379,58 @@ .byte 0xae .endm - @ Sets the door tile at (x, y) to be open without an animation. + @ Sets the door metatile at (x, y) to be open without an animation. .macro setdooropen x:req, y:req .byte 0xaf .2byte \x .2byte \y .endm - @ Sets the door tile at (x, y) to be closed without an animation. - .macro setdoorclosed2 x:req, y:req + @ Sets the door metatile at (x, y) to be closed without an animation. + .macro setdoorclosed x:req, y:req .byte 0xb0 .2byte \x .2byte \y .endm - @ In Emerald, this command consumes its parameters and does nothing. In FireRed, this command is a nop. - .macro addelevmenuitem + @ In FRLG, this command is a nop. It is implemented but unused in Ruby/Sapphire. + .macro addelevmenuitem a:req, b:req, c:req, d:req .byte 0xb1 + .byte \a + .2byte \b + .2byte \c + .2byte \d .endm - @ In FireRed and Emerald, this command is a nop. + @ In FRLG, this command is a nop. It is implemented but unused in Ruby/Sapphire. .macro showelevmenu .byte 0xb2 .endm + @ Gets the number of coins the player has and stores it in the variable 'out'. .macro checkcoins out:req .byte 0xb3 .2byte \out .endm + @ Gives 'count' coins to the player, up to a total of MAX_COINS. + @ If the player already has MAX_COINS then VAR_RESULT is set to TRUE, otherwise it is set to FALSE. .macro addcoins count:req .byte 0xb4 .2byte \count .endm - .macro removecoins word:req + @ Takes 'count' coins from the player. + @ If the player has fewer than 'count' coins then no coins are taken and VAR_RESULT is set to TRUE. + @ Otherwise VAR_RESULT is set to FALSE. + .macro removecoins count:req .byte 0xb5 - .2byte \word + .2byte \count .endm - @ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect normal wild battles. You start the prepared battle with dowildbattle. - .macro setwildbattle species:req, level:req, item:req + @ Prepares to start a wild battle against a 'species' at 'level' holding 'item'. Running this command will not affect + @ normal wild battles. You start the prepared battle with dowildbattle. + .macro setwildbattle species:req, level:req, item=ITEM_NONE .byte 0xb6 .2byte \species .byte \level @@ -1269,83 +1442,90 @@ .byte 0xb7 .endm - .macro setvaddress long:req + @ Sets a relative address to be used by the other vcommands as part of a Mystery Gift script. + .macro setvaddress pointer:req .byte 0xb8 - .4byte \long + .4byte \pointer .endm - .macro vgoto pointer:req + @ Equivalent to goto using the relative address set by setvaddress. + .macro vgoto destination:req .byte 0xb9 - .4byte \pointer + .4byte \destination .endm - .macro vcall pointer:req + @ Equivalent to call using the relative address set by setvaddress. + .macro vcall destination:req .byte 0xba - .4byte \pointer + .4byte \destination .endm - .macro vgoto_if byte:req, pointer:req + @ Equivalent to goto_if using the relative address set by setvaddress. + .macro vgoto_if condition:req, destination:req .byte 0xbb - .byte \byte - .4byte \pointer + .byte \condition + .4byte \destination .endm - .macro vcall_if byte:req, pointer:req + @ Equivalent to call_if using the relative address set by setvaddress. + .macro vcall_if condition:req, destination:req .byte 0xbc - .byte \byte - .4byte \pointer + .byte \condition + .4byte \destination .endm - .macro vmessage pointer:req + @ Equivalent to message using the relative address set by setvaddress. + .macro vmessage text:req .byte 0xbd - .4byte \pointer + .4byte \text .endm - .macro vloadptr pointer:req + @ Expands the given text at the pointer (- the relative address set by setvaddress) into gStringVar4 + .macro vbuffermessage text:req .byte 0xbe - .4byte \pointer + .4byte \text .endm - .macro vbufferstring byte:req, pointer:req + @ Equivalent to bufferstring using the relative address set by setvaddress. + .macro vbufferstring stringVarIndex:req, text:req .byte 0xbf - .byte \byte - .4byte \pointer + stringvar \stringVarIndex + .4byte \text .endm - @ Spawns a secondary box showing how many Coins the player has. + @ Create a window showing how many Coins the player has. .macro showcoinsbox x:req, y:req .byte 0xc0 .byte \x .byte \y .endm - @ Hides the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + @ Destroys the window created by showcoins. It consumes its arguments but doesn't use them. .macro hidecoinsbox x:req, y:req .byte 0xc1 .byte \x .byte \y .endm - @ Updates the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + @ Updates the window created by showcoins. It consumes its arguments but doesn't use them. .macro updatecoinsbox x:req, y:req .byte 0xc2 .byte \x .byte \y .endm - @ Increases the value of the specified game stat by 1. The stat's value will not be allowed to exceed 0x00FFFFFF. + @ Increases the value of the specified game stat by 1. The maximum value of a stat is 0xFFFFFF. See include/constants/game_stat.h .macro incrementgamestat stat:req .byte 0xc3 .byte \stat .endm @ Sets the destination that using an Escape Rope or Dig will take the player to. - .macro setescapewarp map:req, warp:req, x:req, y:req + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setescapewarp map:req, a, b, c .byte 0xc4 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Blocks script execution until cry finishes. @@ -1353,10 +1533,10 @@ .byte 0xc5 .endm - @ Writes the name of the specified (box) PC box to the specified buffer. - .macro bufferboxname out:req, box:req + @ Writes the name of the specified PC box to the specified buffer. + .macro bufferboxname stringVarId:req, box:req .byte 0xc6 - .byte \out + stringvar \stringVarId .2byte \box .endm @@ -1394,21 +1574,22 @@ .4byte \value .endm - @ Sets the Pokemon in the specified slot of the player party's eventLegal bit. + @ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party. .macro setmoneventlegal slot:req .byte 0xcd .2byte \slot .endm - @ Checks if the Pokemon in the specified slot of the player's party has its eventLegal bit set. If it isn't set, + @ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, @ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE. .macro checkmoneventlegal slot:req .byte 0xce .2byte \slot .endm - @ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the offset specified by the pointer at 0x020375C0. - .macro execram + @ Jumps to the ram script saved from a Wonder Card. If there is no valid saved Wonder Card or if the + @ ram script is invalid then this does nothing. + .macro trywondercardscript .byte 0xcf .endm @@ -1418,13 +1599,13 @@ .2byte \worldmapflag .endm - @ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source] - .macro warpteleport2 map:req, warp:req, x:req, y:req + @ Warps the player to the specified map using a teleport effect. Effect is similar to warpteleport, but + @ this warp has no fade out and maintains the original facing direction. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpspinenter map:req, a, b, c .byte 0xd1 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Changes the location where the player caught the Pokemon in the specified slot of their party. @@ -1439,9 +1620,12 @@ .4byte \pointer .endm - .macro bufferitemnameplural out:req, item:req, quantity:req + @ Writes the name of the specified item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL + @ and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). + @ If the specified item is >= ITEMS_COUNT then the name of ITEM_NONE ("????????") is buffered instead. + .macro bufferitemnameplural stringVarId:req, item:req, quantity:req .byte 0xd4 - .byte \out + stringvar \stringVarId .2byte \item .2byte \quantity .endm @@ -1459,28 +1643,48 @@ goto_if TRUE, \dest .endm - .macro goto_if_lt dest:req @ LESS THAN - goto_if 0, \dest - .endm - - .macro goto_if_eq dest:req @ EQUAL - goto_if 1, \dest + @ Allows 'compare' followed by a conditional goto/call to be combined into a single statement. + @ The following are examples of the two acceptable formats this facilitates: + @ compare VAR_RESULT, TRUE + @ goto_if_eq MyScript + @ - or - + @ goto_if_eq VAR_RESULT, TRUE, MyScript + @ + @ The first two arguments to this macro are the base command, e.g. 'goto_if 1' for goto_if_eq. + @ The remaining arguments 'a, b, c' depend on the format: + @ For a single statement, 'a' and 'b' are the values to compare and 'c' is the destination pointer. + @ For a statement preceded by a compare, 'a' is the destination pointer and 'b/c' are not provided. + .macro trycompare jump:req, condition:req, a:req, b, c + .ifnb \c + compare \a, \b + \jump \condition, \c + .else + \jump \condition, \a + .endif .endm - .macro goto_if_gt dest:req @ GREATER THAN - goto_if 2, \dest + .macro goto_if_lt a:req, b, c @ LESS THAN + trycompare goto_if, 0, \a, \b, \c .endm - .macro goto_if_le dest:req @ LESS THAN OR EQUAL - goto_if 3, \dest + .macro goto_if_eq a:req, b, c @ EQUAL + trycompare goto_if, 1, \a, \b, \c .endm - .macro goto_if_ge dest:req @ GREATER THAN OR EQUAL - goto_if 4, \dest + .macro goto_if_gt a:req, b, c @ GREATER THAN + trycompare goto_if, 2, \a, \b, \c .endm - .macro goto_if_ne dest:req @ NOT EQUAL - goto_if 5, \dest + .macro goto_if_le a:req, b, c @ LESS THAN OR EQUAL + trycompare goto_if, 3, \a, \b, \c + .endm + + .macro goto_if_ge a:req, b, c @ GREATER THAN OR EQUAL + trycompare goto_if, 4, \a, \b, \c + .endm + + .macro goto_if_ne a:req, b, c @ NOT EQUAL + trycompare goto_if, 5, \a, \b, \c .endm .macro call_if_unset flag:req, dest:req @@ -1493,36 +1697,36 @@ call_if TRUE, \dest .endm - .macro call_if_lt dest:req @ LESS THAN - call_if 0, \dest - .endm - - .macro call_if_eq dest:req @ EQUAL - call_if 1, \dest + .macro call_if_lt a:req, b, c @ LESS THAN + trycompare call_if, 0, \a, \b, \c .endm - .macro call_if_gt dest:req @ GREATER THAN - call_if 2, \dest + .macro call_if_eq a:req, b, c @ EQUAL + trycompare call_if, 1, \a, \b, \c .endm - .macro call_if_le dest:req @ LESS THAN OR EQUAL - call_if 3, \dest + .macro call_if_gt a:req, b, c @ GREATER THAN + trycompare call_if, 2, \a, \b, \c .endm - .macro call_if_ge dest:req @ GREATER THAN OR EQUAL - call_if 4, \dest + .macro call_if_le a:req, b, c @ LESS THAN OR EQUAL + trycompare call_if, 3, \a, \b, \c .endm - .macro call_if_ne dest:req @ NOT EQUAL - call_if 5, \dest + .macro call_if_ge a:req, b, c @ GREATER THAN OR EQUAL + trycompare call_if, 4, \a, \b, \c .endm - .macro vgoto_if_eq dest:req - vgoto_if TRUE, \dest + .macro call_if_ne a:req, b, c @ NOT EQUAL + trycompare call_if, 5, \a, \b, \c .endm - .macro vgoto_if_ne dest:req - vgoto_if FALSE, \dest + .macro vgoto_if_eq a:req, b, c + trycompare vgoto_if, TRUE, \a, \b, \c + .endm + + .macro vgoto_if_ne a:req, b, c + trycompare vgoto_if, FALSE, \a, \b, \c .endm .macro vgoto_if_set flag:req, dest:req @@ -1564,34 +1768,27 @@ goto_if_eq \dest .endm + YES = 1 + NO = 0 + + @ Buffers the given text and calls the relevant standard message script (see gStdScripts). .macro msgbox text:req, type=MSGBOX_DEFAULT loadword 0, \text callstd \type .endm - @ Callstd ids - STD_OBTAIN_ITEM = 0 - STD_FIND_ITEM = 1 - - MSGBOX_NPC = 2 - MSGBOX_SIGN = 3 - MSGBOX_DEFAULT = 4 - MSGBOX_YESNO = 5 - MSGBOX_AUTOCLOSE = 6 - - STD_OBTAIN_DECOR = 7 - STD_PUT_ITEM_AWAY = 8 - STD_RECEIVED_ITEM = 9 - - YES = 1 - NO = 0 - + @ Gives 'amount' of the specified 'item' to the player and prints a message with fanfare. + @ If the player doesn't have space for all the items then as many are added as possible, the + @ message indicates there is no room, and VAR_RESULT is set to FALSE. + @ Otherwise VAR_RESULT is set to TRUE, and the message indicates they have received the item(s). .macro giveitem item:req, amount=1 setorcopyvar VAR_0x8000, \item setorcopyvar VAR_0x8001, \amount callstd STD_OBTAIN_ITEM .endm + @ For picking up items in the overworld. Similar to giveitem, but with different language and + @ sets the flag of the last-talked to object (the item the player picked up). .macro finditem item:req, amount=1 setorcopyvar VAR_0x8000, \item setorcopyvar VAR_0x8001, \amount @@ -1641,3 +1838,11 @@ getbraillestringwidth \text call EventScript_BrailleCursorWaitButton .endm + + @ Creates an "event legal" Pokémon for an encounter + .macro seteventmon species:req, level:req, item=ITEM_NONE + setvar VAR_0x8004, \species + setvar VAR_0x8005, \level + setvar VAR_0x8006, \item + special CreateEventLegalEnemyMon + .endm diff --git a/data/event_scripts.s b/data/event_scripts.s index 004f61131..bfe879183 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -73,16 +73,16 @@ gSpecialVars:: .align 2 gStdScripts:: - .4byte Std_ObtainItem - .4byte Std_FindItem - .4byte Std_MsgboxNPC - .4byte Std_MsgboxSign - .4byte Std_MsgboxDefault - .4byte Std_MsgboxYesNo - .4byte Std_MsgboxAutoclose - .4byte Std_ObtainDecoration - .4byte Std_PutItemAway - .4byte Std_ReceivedItem + .4byte Std_ObtainItem @ STD_OBTAIN_ITEM + .4byte Std_FindItem @ STD_FIND_ITEM + .4byte Std_MsgboxNPC @ MSGBOX_NPC + .4byte Std_MsgboxSign @ MSGBOX_SIGN + .4byte Std_MsgboxDefault @ MSGBOX_DEFAULT + .4byte Std_MsgboxYesNo @ MSGBOX_YESNO + .4byte Std_MsgboxAutoclose @ MSGBOX_AUTOCLOSE + .4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION + .4byte Std_PutItemAway @ STD_PUT_ITEM_AWAY + .4byte Std_ReceivedItem @ STD_RECEIVED_ITEM gStdScriptsEnd:: .include "data/maps/BattleColosseum_2P/scripts.inc" @@ -1112,7 +1112,7 @@ EventScript_ChangePokemonNickname:: @ Unused EventScript_HandOverItem:: - getitemname 0, VAR_0x8004 + bufferitemname STR_VAR_1, VAR_0x8004 playfanfare MUS_OBTAIN_TMHM message Text_HandedOverItem waitmessage @@ -1264,7 +1264,7 @@ VermilionCity_PokemonCenter_1F_EventScript_ExplainVSSeeker:: .include "data/scripts/white_out.inc" Std_PutItemAway:: - bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 + bufferitemnameplural STR_VAR_2, VAR_0x8000, VAR_0x8001 checkitemtype VAR_0x8000 call EventScript_BufferPutAwayPocketName msgbox Text_PutItemAway @@ -1280,23 +1280,23 @@ EventScript_BufferPutAwayPocketName:: end EventScript_BufferPutAwayPocketItems:: - getstdstring 2, STDSTRING_ITEMS_POCKET + bufferstdstring STR_VAR_3, STDSTRING_ITEMS_POCKET return EventScript_BufferPutAwayPocketKeyItems:: - getstdstring 2, STDSTRING_KEY_ITEMS_POCKET + bufferstdstring STR_VAR_3, STDSTRING_KEY_ITEMS_POCKET return EventScript_BufferPutAwayPocketPokeBalls:: - getstdstring 2, STDSTRING_POKEBALLS_POCKET + bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS_POCKET return EventScript_BufferPutAwayPocketTMCase:: - getstdstring 2, STDSTRING_TM_CASE + bufferstdstring STR_VAR_3, STDSTRING_TM_CASE return EventScript_BufferPutAwayPocketBerryPouch:: - getstdstring 2, STDSTRING_BERRY_POUCH + bufferstdstring STR_VAR_3, STDSTRING_BERRY_POUCH return .include "data/scripts/seagallop.inc" diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 9c42fd3c1..3c0bd7681 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -71,9 +71,9 @@ BirthIsland_Exterior_EventScript_NotSolved3:: BirthIsland_Exterior_EventScript_Deoxys:: addobject LOCALID_DEOXYS waitse - setfieldeffectarg 0, LOCALID_DEOXYS_ROCK - setfieldeffectarg 1, 56 - setfieldeffectarg 2, 2 + setfieldeffectargument 0, LOCALID_DEOXYS_ROCK + setfieldeffectargument 1, 56 + setfieldeffectargument 2, 2 dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK playbgm MUS_ENCOUNTER_DEOXYS, 0 waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK diff --git a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc index 079e461af..0a2208b66 100644 --- a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc +++ b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc @@ -27,7 +27,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveeParty:: message CeladonCity_Condominiums_RoofRoom_Text_ObtainedAnEevee waitmessage waitfanfare - getspeciesname 0, SPECIES_EEVEE + bufferspeciesname STR_VAR_1, SPECIES_EEVEE msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_SetGotEevee @@ -42,7 +42,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveePC:: message CeladonCity_Condominiums_RoofRoom_Text_ObtainedAnEevee waitmessage waitfanfare - getspeciesname 0, SPECIES_EEVEE + bufferspeciesname STR_VAR_1, SPECIES_EEVEE msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_TransferEeveeToPC diff --git a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc index 14d250852..16e9df340 100644 --- a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc +++ b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc @@ -141,8 +141,8 @@ CeladonCity_DepartmentStore_Roof_EventScript_GiveLemonade:: end CeladonCity_DepartmentStore_Roof_EventScript_GiveDrink:: - getitemname 0, VAR_0x8008 - getitemname 1, VAR_0x8009 + bufferitemname STR_VAR_1, VAR_0x8008 + bufferitemname STR_VAR_2, VAR_0x8009 removeitem VAR_0x8008, 1 checkitemspace VAR_0x8009, 1 compare VAR_RESULT, FALSE @@ -267,8 +267,8 @@ CeladonCity_DepartmentStore_Roof_EventScript_TryBuyDrink:: call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneySodaPop compare VAR_TEMP_1, 2 call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyLemonade - updatemoneybox 0, 0, 0 - getitemname 0, VAR_TEMP_0 + updatemoneybox + bufferitemname STR_VAR_1, VAR_TEMP_0 playse SE_VEND msgbox CeladonCity_DepartmentStore_Roof_Text_DrinkCanPoppedOut additem VAR_TEMP_0 @@ -292,6 +292,6 @@ CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForDrink:: end CeladonCity_DepartmentStore_Roof_EventScript_ExitVendingMachine:: - hidemoneybox 0, 0 + hidemoneybox releaseall end diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index 60c541af3..8cd7ca69b 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -70,7 +70,7 @@ CeladonCity_GameCorner_EventScript_Buy50Coins:: end CeladonCity_GameCorner_EventScript_BoughtCoins:: - updatemoneybox 0, 0, 0 + updatemoneybox updatecoinsbox 0, 5 playse SE_SHOP msgbox CeladonCity_GameCorner_Text_HereAreYourCoins @@ -78,7 +78,7 @@ CeladonCity_GameCorner_EventScript_BoughtCoins:: end CeladonCity_GameCorner_EventScript_ClerkEnd:: - hidemoneybox 0, 0 + hidemoneybox hidecoinsbox 0, 5 release end @@ -256,9 +256,9 @@ CeladonCity_GameCorner_EventScript_SlotMachine:: msgbox CeladonCity_GameCorner_Text_SlotMachineWantToPlay, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CeladonCity_GameCorner_EventScript_DontPlaySlotMachine - setfieldeffectarg 0, 255 - setfieldeffectarg 1, 10 - setfieldeffectarg 2, 14 + setfieldeffectargument 0, 255 + setfieldeffectargument 1, 10 + setfieldeffectargument 2, 14 dofieldeffect FLDEFF_SMILEY_FACE_ICON waitfieldeffect FLDEFF_SMILEY_FACE_ICON specialvar VAR_RESULT, GetRandomSlotMachineId diff --git a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc index 8070c752c..544eb4a93 100644 --- a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc +++ b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc @@ -104,7 +104,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_Porygon:: end 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 compare VAR_RESULT, NO goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange @@ -213,7 +213,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins:: CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty:: removecoins VAR_TEMP_2 updatecoinsbox 0, 5 - getspeciesname 0, VAR_TEMP_1 + bufferspeciesname STR_VAR_1, VAR_TEMP_1 playfanfare MUS_LEVEL_UP message Text_PlayerObtainedTheMon waitmessage @@ -227,7 +227,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty:: CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonPC:: removecoins VAR_TEMP_2 updatecoinsbox 0, 5 - getspeciesname 0, VAR_TEMP_1 + bufferspeciesname STR_VAR_1, VAR_TEMP_1 playfanfare MUS_LEVEL_UP message Text_PlayerObtainedTheMon waitmessage @@ -271,35 +271,35 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ChoosePrizeTM:: CeladonCity_GameCorner_PrizeRoom_EventScript_TM13:: setvar VAR_TEMP_1, ITEM_TM13 setvar VAR_TEMP_2, 4000 - getmovename 1, MOVE_ICE_BEAM + buffermovename STR_VAR_2, MOVE_ICE_BEAM goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM end CeladonCity_GameCorner_PrizeRoom_EventScript_TM23:: setvar VAR_TEMP_1, ITEM_TM23 setvar VAR_TEMP_2, 3500 - getmovename 1, MOVE_IRON_TAIL + buffermovename STR_VAR_2, MOVE_IRON_TAIL goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM end CeladonCity_GameCorner_PrizeRoom_EventScript_TM24:: setvar VAR_TEMP_1, ITEM_TM24 setvar VAR_TEMP_2, 4000 - getmovename 1, MOVE_THUNDERBOLT + buffermovename STR_VAR_2, MOVE_THUNDERBOLT goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM end CeladonCity_GameCorner_PrizeRoom_EventScript_TM30:: setvar VAR_TEMP_1, ITEM_TM30 setvar VAR_TEMP_2, 4500 - getmovename 1, MOVE_SHADOW_BALL + buffermovename STR_VAR_2, MOVE_SHADOW_BALL goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM end CeladonCity_GameCorner_PrizeRoom_EventScript_TM35:: setvar VAR_TEMP_1, ITEM_TM35 setvar VAR_TEMP_2, 4000 - getmovename 1, MOVE_FLAMETHROWER + buffermovename STR_VAR_2, MOVE_FLAMETHROWER goto CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM end @@ -311,7 +311,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM:: end 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 compare VAR_RESULT, NO goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange @@ -319,7 +319,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeItem:: end CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize:: - getitemname 0, VAR_TEMP_1 + bufferitemname STR_VAR_1, VAR_TEMP_1 checkcoins VAR_RESULT compare VAR_RESULT, VAR_TEMP_2 goto_if_lt CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins diff --git a/data/maps/CeruleanCity_BikeShop/scripts.inc b/data/maps/CeruleanCity_BikeShop/scripts.inc index d20038d1f..931ee7b12 100644 --- a/data/maps/CeruleanCity_BikeShop/scripts.inc +++ b/data/maps/CeruleanCity_BikeShop/scripts.inc @@ -24,7 +24,7 @@ CeruleanCity_BikeShop_EventScript_TryPurchaseBicycle:: CeruleanCity_BikeShop_EventScript_ClerkGoodbye:: msgbox CeruleanCity_BikeShop_Text_ThankYouComeAgain - hidemoneybox 0, 0 + hidemoneybox release end diff --git a/data/maps/CeruleanCity_House3/scripts.inc b/data/maps/CeruleanCity_House3/scripts.inc index d0e4fda5e..23268dbfe 100644 --- a/data/maps/CeruleanCity_House3/scripts.inc +++ b/data/maps/CeruleanCity_House3/scripts.inc @@ -32,7 +32,7 @@ CeruleanCity_House3_EventScript_DeclineTrade:: end CeruleanCity_House3_EventScript_NotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_ThisIsntMon release end diff --git a/data/maps/CeruleanCity_House5/scripts.inc b/data/maps/CeruleanCity_House5/scripts.inc index bebc51077..5eaac5b59 100644 --- a/data/maps/CeruleanCity_House5/scripts.inc +++ b/data/maps/CeruleanCity_House5/scripts.inc @@ -57,77 +57,77 @@ CeruleanCity_House5_EventScript_ChooseExchangeItem:: end CeruleanCity_House5_EventScript_EnergyPowder:: - getitemname 0, ITEM_ENERGY_POWDER + bufferitemname STR_VAR_1, ITEM_ENERGY_POWDER setvar VAR_0x8008, ITEM_ENERGY_POWDER setvar VAR_0x8009, 50 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_EnergyRoot:: - getitemname 0, ITEM_ENERGY_ROOT + bufferitemname STR_VAR_1, ITEM_ENERGY_ROOT setvar VAR_0x8008, ITEM_ENERGY_ROOT setvar VAR_0x8009, 80 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_HealPowder:: - getitemname 0, ITEM_HEAL_POWDER + bufferitemname STR_VAR_1, ITEM_HEAL_POWDER setvar VAR_0x8008, ITEM_HEAL_POWDER setvar VAR_0x8009, 50 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_RevivalHerb:: - getitemname 0, ITEM_REVIVAL_HERB + bufferitemname STR_VAR_1, ITEM_REVIVAL_HERB setvar VAR_0x8008, ITEM_REVIVAL_HERB setvar VAR_0x8009, 300 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_Protein:: - getitemname 0, ITEM_PROTEIN + bufferitemname STR_VAR_1, ITEM_PROTEIN setvar VAR_0x8008, ITEM_PROTEIN setvar VAR_0x8009, 1000 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_Iron:: - getitemname 0, ITEM_IRON + bufferitemname STR_VAR_1, ITEM_IRON setvar VAR_0x8008, ITEM_IRON setvar VAR_0x8009, 1000 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_Carbos:: - getitemname 0, ITEM_CARBOS + bufferitemname STR_VAR_1, ITEM_CARBOS setvar VAR_0x8008, ITEM_CARBOS setvar VAR_0x8009, 1000 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_Calcium:: - getitemname 0, ITEM_CALCIUM + bufferitemname STR_VAR_1, ITEM_CALCIUM setvar VAR_0x8008, ITEM_CALCIUM setvar VAR_0x8009, 1000 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_Zinc:: - getitemname 0, ITEM_ZINC + bufferitemname STR_VAR_1, ITEM_ZINC setvar VAR_0x8008, ITEM_ZINC setvar VAR_0x8009, 1000 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_HPUp:: - getitemname 0, ITEM_HP_UP + bufferitemname STR_VAR_1, ITEM_HP_UP setvar VAR_0x8008, ITEM_HP_UP setvar VAR_0x8009, 1000 goto CeruleanCity_House5_EventScript_ExchangePowderForItem end CeruleanCity_House5_EventScript_PPUp:: - getitemname 0, ITEM_PP_UP + bufferitemname STR_VAR_1, ITEM_PP_UP setvar VAR_0x8008, ITEM_PP_UP setvar VAR_0x8009, 3000 goto CeruleanCity_House5_EventScript_ExchangePowderForItem diff --git a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc index 6f81a5407..f3e905b95 100644 --- a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc @@ -32,7 +32,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineTrade:: end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_WhatThatsNoMon release end @@ -148,8 +148,8 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilDomeAmber:: end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil:: - getspeciesname 0, SPECIES_OMANYTE - getitemname 1, ITEM_HELIX_FOSSIL + bufferspeciesname STR_VAR_1, SPECIES_OMANYTE + bufferitemname STR_VAR_2, ITEM_HELIX_FOSSIL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil @@ -163,8 +163,8 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil:: end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil:: - getspeciesname 0, SPECIES_KABUTO - getitemname 1, ITEM_DOME_FOSSIL + bufferspeciesname STR_VAR_1, SPECIES_KABUTO + bufferitemname STR_VAR_2, ITEM_DOME_FOSSIL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil @@ -178,8 +178,8 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil:: end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowOldAmber:: - getspeciesname 0, SPECIES_AERODACTYL - getitemname 1, ITEM_OLD_AMBER + bufferspeciesname STR_VAR_1, SPECIES_AERODACTYL + bufferitemname STR_VAR_2, ITEM_OLD_AMBER msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil @@ -213,7 +213,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveRevivedMon:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte:: setvar VAR_TEMP_1, SPECIES_OMANYTE - getspeciesname 0, SPECIES_OMANYTE + bufferspeciesname STR_VAR_1, SPECIES_OMANYTE msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife givemon SPECIES_OMANYTE, 5, ITEM_NONE compare VAR_RESULT, 2 @@ -227,7 +227,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto:: setvar VAR_TEMP_1, SPECIES_KABUTO - getspeciesname 0, SPECIES_KABUTO + bufferspeciesname STR_VAR_1, SPECIES_KABUTO msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife givemon SPECIES_KABUTO, 5, ITEM_NONE compare VAR_RESULT, 2 @@ -241,7 +241,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto:: CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl:: setvar VAR_TEMP_1, SPECIES_AERODACTYL - getspeciesname 0, SPECIES_AERODACTYL + bufferspeciesname STR_VAR_1, SPECIES_AERODACTYL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife givemon SPECIES_AERODACTYL, 5, ITEM_NONE compare VAR_RESULT, 2 diff --git a/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc index 45d2a11c0..fa4f456a6 100644 --- a/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc @@ -32,7 +32,7 @@ CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonDeclineTrade:: end CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonNotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_ThisIsntMon release end @@ -79,7 +79,7 @@ CinnabarIsland_PokemonLab_Lounge_EventScript_NormaDeclineTrade:: end CinnabarIsland_PokemonLab_Lounge_EventScript_NormaNotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_ThisIsNoMon release end diff --git a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc index 9b42f9966..8c799e14a 100644 --- a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc +++ b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc @@ -62,7 +62,7 @@ FiveIsland_ResortGorgeous_House_EventScript_ShowRequestedMon:: call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerEast compare VAR_FACING, DIR_WEST call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerWest - moveobjectoffscreen LOCALID_BUTLER + copyobjectxytoperm LOCALID_BUTLER msgbox FiveIsland_ResortGorgeous_House_Text_ButlerPleaseAcceptThisAsHerThanks giveitem VAR_RESORT_GORGEOUS_REWARD compare VAR_RESULT, FALSE diff --git a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc index eb5febc8c..a7c37cbfd 100644 --- a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc +++ b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc @@ -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 @ Otherwise make normal comment FiveIsland_WaterLabyrinth_EventScript_PostEggComment:: - getspeciesname 1, SPECIES_TOGEPI + bufferspeciesname STR_VAR_2, SPECIES_TOGEPI setvar VAR_0x8004, SPECIES_TOGEPI specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID compare VAR_RESULT, TRUE goto_if_eq FiveIsland_WaterLabyrinth_EventScript_MonDaisyComment - getspeciesname 1, SPECIES_TOGETIC + bufferspeciesname STR_VAR_2, SPECIES_TOGETIC setvar VAR_0x8004, SPECIES_TOGETIC specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID compare VAR_RESULT, TRUE diff --git a/data/maps/FuchsiaCity/scripts.inc b/data/maps/FuchsiaCity/scripts.inc index 67192553e..f50aa66bc 100644 --- a/data/maps/FuchsiaCity/scripts.inc +++ b/data/maps/FuchsiaCity/scripts.inc @@ -72,9 +72,9 @@ FuchsiaCity_EventScript_ChanseySign:: lockall setvar VAR_0x8004, SPECIES_CHANSEY special SetSeenMon - drawmonpic SPECIES_CHANSEY, 10, 3 + showmonpic SPECIES_CHANSEY, 10, 3 msgbox FuchsiaCity_Text_ChanseySign - erasemonpic + hidemonpic releaseall end @@ -82,9 +82,9 @@ FuchsiaCity_EventScript_VoltorbSign:: lockall setvar VAR_0x8004, SPECIES_VOLTORB special SetSeenMon - drawmonpic SPECIES_VOLTORB, 10, 3 + showmonpic SPECIES_VOLTORB, 10, 3 msgbox FuchsiaCity_Text_VoltorbSign - erasemonpic + hidemonpic releaseall end @@ -92,9 +92,9 @@ FuchsiaCity_EventScript_KangaskhanSign:: lockall setvar VAR_0x8004, SPECIES_KANGASKHAN special SetSeenMon - drawmonpic SPECIES_KANGASKHAN, 10, 3 + showmonpic SPECIES_KANGASKHAN, 10, 3 msgbox FuchsiaCity_Text_KangaskhanSign - erasemonpic + hidemonpic releaseall end @@ -102,9 +102,9 @@ FuchsiaCity_EventScript_SlowpokeSign:: lockall setvar VAR_0x8004, SPECIES_SLOWPOKE special SetSeenMon - drawmonpic SPECIES_SLOWPOKE, 10, 3 + showmonpic SPECIES_SLOWPOKE, 10, 3 msgbox FuchsiaCity_Text_SlowpokeSign - erasemonpic + hidemonpic releaseall end @@ -112,9 +112,9 @@ FuchsiaCity_EventScript_LaprasSign:: lockall setvar VAR_0x8004, SPECIES_LAPRAS special SetSeenMon - drawmonpic SPECIES_LAPRAS, 10, 3 + showmonpic SPECIES_LAPRAS, 10, 3 msgbox FuchsiaCity_Text_LaprasSign - erasemonpic + hidemonpic releaseall end @@ -123,17 +123,17 @@ FuchsiaCity_EventScript_FossilMonSign:: goto_if_set FLAG_GOT_DOME_FOSSIL, FuchsiaCity_EventScript_OmanyteSign setvar VAR_0x8004, SPECIES_KABUTO special SetSeenMon - drawmonpic SPECIES_KABUTO, 10, 3 + showmonpic SPECIES_KABUTO, 10, 3 msgbox FuchsiaCity_Text_KabutoSign - erasemonpic + hidemonpic releaseall end FuchsiaCity_EventScript_OmanyteSign:: setvar VAR_0x8004, SPECIES_OMANYTE special SetSeenMon - drawmonpic SPECIES_OMANYTE, 10, 3 + showmonpic SPECIES_OMANYTE, 10, 3 msgbox FuchsiaCity_Text_OmanyteSign - erasemonpic + hidemonpic releaseall end diff --git a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc index e58fc0c65..00a22853b 100644 --- a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc +++ b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc @@ -117,7 +117,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone:: compare VAR_RESULT, FALSE goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney removemoney 500, 0 - updatemoneybox 0, 0, 0 + updatemoneybox msgbox FuchsiaCity_SafariZone_Entrance_Text_ThatllBe500WeOnlyUseSpecialBalls textcolor 3 playfanfare MUS_LEVEL_UP @@ -126,7 +126,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone:: call EventScript_RestorePrevTextColor msgbox FuchsiaCity_SafariZone_Entrance_Text_CallYouOnPAWhenYouRunOut closemessage - hidemoneybox 0, 0 + hidemoneybox compare VAR_TEMP_2, 0 call_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneMid compare VAR_TEMP_2, 1 @@ -172,7 +172,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney:: FuchsiaCity_SafariZone_Entrance_EventScript_ForcePlayerBack:: closemessage - hidemoneybox 0, 0 + hidemoneybox applymovement OBJ_EVENT_ID_PLAYER, FuchsiaCity_SafariZone_Entrance_Movement_ForceBack waitmovement 0 releaseall diff --git a/data/maps/MtMoon_B2F/scripts.inc b/data/maps/MtMoon_B2F/scripts.inc index 7b2ca76ae..cb4fb4b40 100644 --- a/data/maps/MtMoon_B2F/scripts.inc +++ b/data/maps/MtMoon_B2F/scripts.inc @@ -67,7 +67,7 @@ MtMoon_B2F_EventScript_DomeFossil:: delay 10 applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToHelixFossil waitmovement 0 - moveobjectoffscreen LOCALID_MIGUEL + copyobjectxytoperm LOCALID_MIGUEL textcolor 0 playfanfare MUS_OBTAIN_KEY_ITEM message MtMoon_B2F_Text_ThenThisFossilIsMine @@ -99,7 +99,7 @@ MtMoon_B2F_EventScript_HelixFossil:: delay 10 applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToDomeFossil waitmovement 0 - moveobjectoffscreen LOCALID_MIGUEL + copyobjectxytoperm LOCALID_MIGUEL textcolor 0 playfanfare MUS_OBTAIN_KEY_ITEM message MtMoon_B2F_Text_ThenThisFossilIsMine diff --git a/data/maps/PalletTown/scripts.inc b/data/maps/PalletTown/scripts.inc index f6a1777ab..6aedb3871 100644 --- a/data/maps/PalletTown/scripts.inc +++ b/data/maps/PalletTown/scripts.inc @@ -59,8 +59,8 @@ PalletTown_EventScript_OakRatingScene:: specialvar VAR_RESULT, GetPokedexCount copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8009, VAR_0x8006 - getnumberstring 0, VAR_0x8008 - getnumberstring 1, VAR_0x8009 + buffernumberstring STR_VAR_1, VAR_0x8008 + buffernumberstring STR_VAR_2, VAR_0x8009 compare VAR_0x8009, 60 goto_if_lt PalletTown_EventScript_NotEnoughMonsForNationalDex msgbox PalletTown_Text_CaughtXImpressiveFollowMe @@ -356,7 +356,7 @@ PalletTown_EventScript_SignLady:: call_if_eq PalletTown_EventScript_SignLadyMoveOutOfWayRight compare VAR_FACING, DIR_EAST call_if_ne PalletTown_EventScript_SignLadyMoveOutOfWayLeft - moveobjectoffscreen 1 + copyobjectxytoperm LOCALID_SIGN_LADY setflag FLAG_TEMP_2 release end diff --git a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc index 1d6fbfbeb..a862f2fd4 100644 --- a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc +++ b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc @@ -852,8 +852,8 @@ PalletTown_ProfessorOaksLab_EventScript_RatePokedexOrTryGiveBalls:: specialvar VAR_RESULT, GetPokedexCount copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8009, VAR_0x8006 - getnumberstring 0, VAR_0x8008 - getnumberstring 1, VAR_0x8009 + buffernumberstring STR_VAR_1, VAR_0x8008 + buffernumberstring STR_VAR_2, VAR_0x8009 compare VAR_0x8009, 1 @ Player only has starter goto_if_eq PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls goto PalletTown_ProfessorOaksLab_EventScript_RatePokedex @@ -1169,7 +1169,7 @@ PalletTown_ProfessorOaksLab_EventScript_BulbasaurBall:: PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice:: applymovement LOCALID_PROF_OAK, Movement_FaceRight waitmovement 0 - drawmonpic PLAYER_STARTER_SPECIES, 10, 3 + showmonpic PLAYER_STARTER_SPECIES, 10, 3 textcolor 0 compare PLAYER_STARTER_NUM, 0 goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmBulbasaur @@ -1204,12 +1204,12 @@ PalletTown_ProfessorOaksLab_EventScript_ConfirmCharmander:: end PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter:: - erasemonpic + hidemonpic release end PalletTown_ProfessorOaksLab_EventScript_ChoseStarter:: - erasemonpic + hidemonpic removeobject VAR_LAST_TALKED msgbox PalletTown_ProfessorOaksLab_Text_OakThisMonIsEnergetic call EventScript_RestorePrevTextColor @@ -1217,7 +1217,7 @@ PalletTown_ProfessorOaksLab_EventScript_ChoseStarter:: setflag FLAG_PALLET_LADY_NOT_BLOCKING_SIGN givemon PLAYER_STARTER_SPECIES, 5, ITEM_NONE copyvar VAR_STARTER_MON, PLAYER_STARTER_NUM - getspeciesname 0, PLAYER_STARTER_SPECIES + bufferspeciesname STR_VAR_1, PLAYER_STARTER_SPECIES message PalletTown_ProfessorOaksLab_Text_ReceivedMonFromOak waitmessage playfanfare MUS_OBTAIN_KEY_ITEM @@ -1268,7 +1268,7 @@ PalletTown_ProfessorOaksLab_EventScript_RivalTakesStarter:: msgbox PalletTown_ProfessorOaksLab_Text_RivalIllTakeThisOneThen removeobject RIVAL_STARTER_ID textcolor 3 - getspeciesname 0, RIVAL_STARTER_SPECIES + bufferspeciesname STR_VAR_1, RIVAL_STARTER_SPECIES message PalletTown_ProfessorOaksLab_Text_RivalReceivedMonFromOak waitmessage playfanfare MUS_OBTAIN_KEY_ITEM diff --git a/data/maps/PewterCity_Museum_1F/scripts.inc b/data/maps/PewterCity_Museum_1F/scripts.inc index d73ae856c..ad72bfbe4 100644 --- a/data/maps/PewterCity_Museum_1F/scripts.inc +++ b/data/maps/PewterCity_Museum_1F/scripts.inc @@ -71,7 +71,7 @@ PewterCity_Museum_1F_EventScript_EntranceTrigger:: goto_if_eq PewterCity_Museum_1F_EventScript_TryPayForTicket msgbox PewterCity_Museum_1F_Text_ComeAgain closemessage - hidemoneybox 0, 0 + hidemoneybox applymovement OBJ_EVENT_ID_PLAYER, PewterCity_Museum_1F_Movement_ForcePlayerExit waitmovement 0 releaseall @@ -90,11 +90,11 @@ PewterCity_Museum_1F_EventScript_TryPayForTicket:: call_if_eq PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight playse SE_SHOP removemoney 50, 0 - updatemoneybox 0, 0, 0 + updatemoneybox waitse msgbox PewterCity_Museum_1F_Text_Right50YThankYou setvar VAR_MAP_SCENE_PEWTER_CITY_MUSEUM_1F, 1 - hidemoneybox 0, 0 + hidemoneybox releaseall end @@ -116,7 +116,7 @@ PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight:: PewterCity_Museum_1F_EventScript_NotEnoughMoney:: msgbox PewterCity_Museum_1F_Text_DontHaveEnoughMoney closemessage - hidemoneybox 0, 0 + hidemoneybox applymovement OBJ_EVENT_ID_PLAYER, PewterCity_Museum_1F_Movement_ForcePlayerExit waitmovement 0 releaseall diff --git a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc index 1c9558459..8accc5502 100644 --- a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc +++ b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc @@ -79,7 +79,7 @@ PokemonLeague_ChampionsRoom_EventScript_EnterRoom:: waitmovement 0 delay 25 specialvar VAR_RESULT, GetStarterSpecies - getspeciesname 0, VAR_RESULT + bufferspeciesname STR_VAR_1, VAR_RESULT msgbox PokemonLeague_ChampionsRoom_Text_OakCongratulations applymovement LOCALID_PROF_OAK, Movement_WalkInPlaceFastestRight applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestLeft diff --git a/data/maps/Route1/scripts.inc b/data/maps/Route1/scripts.inc index 90bc0327b..cd8a3cfaa 100644 --- a/data/maps/Route1/scripts.inc +++ b/data/maps/Route1/scripts.inc @@ -10,7 +10,7 @@ Route1_EventScript_MartClerk:: checkitemspace ITEM_POTION, 1 compare VAR_RESULT, FALSE goto_if_eq EventScript_BagIsFull - getitemname 1, ITEM_POTION + bufferitemname STR_VAR_2, ITEM_POTION playfanfare MUS_LEVEL_UP message Text_ObtainedTheX waitmessage diff --git a/data/maps/Route10_PokemonCenter_1F/scripts.inc b/data/maps/Route10_PokemonCenter_1F/scripts.inc index 5cbe2e973..ad106810b 100644 --- a/data/maps/Route10_PokemonCenter_1F/scripts.inc +++ b/data/maps/Route10_PokemonCenter_1F/scripts.inc @@ -39,7 +39,7 @@ Route10_PokemonCenter_1F_EventScript_Aide:: goto_if_eq Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount - getnumberstring 2, VAR_0x8006 + buffernumberstring STR_VAR_3, VAR_0x8006 call Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo compare VAR_0x8006, REQUIRED_OWNED_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough @@ -59,6 +59,6 @@ Route10_PokemonCenter_1F_EventScript_AlreadyGotEverstone:: end Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo:: - getnumberstring 0, REQUIRED_OWNED_MONS - getitemname 1, ITEM_EVERSTONE + buffernumberstring STR_VAR_1, REQUIRED_OWNED_MONS + bufferitemname STR_VAR_2, ITEM_EVERSTONE return diff --git a/data/maps/Route11_EastEntrance_2F/scripts.inc b/data/maps/Route11_EastEntrance_2F/scripts.inc index e59125e42..51baa1f53 100644 --- a/data/maps/Route11_EastEntrance_2F/scripts.inc +++ b/data/maps/Route11_EastEntrance_2F/scripts.inc @@ -46,7 +46,7 @@ Route11_EastEntrance_2F_EventScript_DeclineTrade:: end Route11_EastEntrance_2F_EventScript_NotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_WhatThatsNoMon release end @@ -66,7 +66,7 @@ Route11_EastEntrance_2F_EventScript_Aide:: goto_if_eq Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount - getnumberstring 2, VAR_0x8006 + buffernumberstring STR_VAR_3, VAR_0x8006 call Route11_EastEntrance_2F_EventScript_GetAideRequestInfo compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough @@ -86,6 +86,6 @@ Route11_EastEntrance_2F_EventScript_AlreadyGotItemfinder:: end Route11_EastEntrance_2F_EventScript_GetAideRequestInfo:: - getnumberstring 0, REQUIRED_CAUGHT_MONS - getitemname 1, ITEM_ITEMFINDER + buffernumberstring STR_VAR_1, REQUIRED_CAUGHT_MONS + bufferitemname STR_VAR_2, ITEM_ITEMFINDER return diff --git a/data/maps/Route15_WestEntrance_2F/scripts.inc b/data/maps/Route15_WestEntrance_2F/scripts.inc index 9b74877b8..e799ca57d 100644 --- a/data/maps/Route15_WestEntrance_2F/scripts.inc +++ b/data/maps/Route15_WestEntrance_2F/scripts.inc @@ -6,10 +6,10 @@ Route15_WestEntrance_2F_MapScripts:: Route15_WestEntrance_2F_EventScript_LeftBinoculars:: lockall msgbox Route15_WestEntrance_2F_Text_LargeShiningBird - drawmonpic SPECIES_ARTICUNO, 10, 3 + showmonpic SPECIES_ARTICUNO, 10, 3 delay 20 waitbuttonpress - erasemonpic + hidemonpic setvar VAR_0x8004, SPECIES_ARTICUNO special SetSeenMon releaseall @@ -29,7 +29,7 @@ Route15_WestEntrance_2F_EventScript_Aide:: goto_if_eq Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount - getnumberstring 2, VAR_0x8006 + buffernumberstring STR_VAR_3, VAR_0x8006 call Route15_WestEntrance_2F_EventScript_GetAideRequestInfo compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough @@ -49,6 +49,6 @@ Route15_WestEntrance_2F_EventScript_AlreadyGotExpShare:: end Route15_WestEntrance_2F_EventScript_GetAideRequestInfo:: - getnumberstring 0, REQUIRED_CAUGHT_MONS - getitemname 1, ITEM_EXP_SHARE + buffernumberstring STR_VAR_1, REQUIRED_CAUGHT_MONS + bufferitemname STR_VAR_2, ITEM_EXP_SHARE return diff --git a/data/maps/Route16_NorthEntrance_2F/scripts.inc b/data/maps/Route16_NorthEntrance_2F/scripts.inc index 57ef19ea4..63f7c7c8a 100644 --- a/data/maps/Route16_NorthEntrance_2F/scripts.inc +++ b/data/maps/Route16_NorthEntrance_2F/scripts.inc @@ -29,7 +29,7 @@ Route16_NorthEntrance_2F_EventScript_Aide:: goto_if_eq Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount - getnumberstring 2, VAR_0x8006 + buffernumberstring STR_VAR_3, VAR_0x8006 call Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough @@ -49,6 +49,6 @@ Route16_NorthEntrance_2F_EventScript_AlreadyGotAmuletCoin:: end Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo:: - getnumberstring 0, REQUIRED_CAUGHT_MONS - getitemname 1, ITEM_AMULET_COIN + buffernumberstring STR_VAR_1, REQUIRED_CAUGHT_MONS + bufferitemname STR_VAR_2, ITEM_AMULET_COIN return diff --git a/data/maps/Route18_EastEntrance_2F/scripts.inc b/data/maps/Route18_EastEntrance_2F/scripts.inc index edf1eafe1..814d9e0d0 100644 --- a/data/maps/Route18_EastEntrance_2F/scripts.inc +++ b/data/maps/Route18_EastEntrance_2F/scripts.inc @@ -36,7 +36,7 @@ Route18_EastEntrance_2F_EventScript_DeclineTrade:: end Route18_EastEntrance_2F_EventScript_NotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_WhatThatsNoMon release end diff --git a/data/maps/Route22_NorthEntrance/scripts.inc b/data/maps/Route22_NorthEntrance/scripts.inc index b21257306..b98823c78 100644 --- a/data/maps/Route22_NorthEntrance/scripts.inc +++ b/data/maps/Route22_NorthEntrance/scripts.inc @@ -5,7 +5,7 @@ Route22_NorthEntrance_EventScript_BoulderBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 1 - getstdstring 0, STDSTRING_BOULDER_BADGE + bufferstdstring STR_VAR_1, STDSTRING_BOULDER_BADGE goto Route22_NorthEntrance_EventScript_BadgeGuard end @@ -13,6 +13,6 @@ Route22_NorthEntrance_EventScript_BoulderBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 1 setvar VAR_0x8009, 1 - getstdstring 0, STDSTRING_BOULDER_BADGE + bufferstdstring STR_VAR_1, STDSTRING_BOULDER_BADGE goto Route23_EventScript_BadgeGuardTrigger end diff --git a/data/maps/Route23/scripts.inc b/data/maps/Route23/scripts.inc index 45a33ac4d..03d576bc1 100644 --- a/data/maps/Route23/scripts.inc +++ b/data/maps/Route23/scripts.inc @@ -23,7 +23,7 @@ Route23_EventScript_CascadeBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 2 - getstdstring 0, STDSTRING_CASCADE_BADGE + bufferstdstring STR_VAR_1, STDSTRING_CASCADE_BADGE goto Route23_EventScript_BadgeGuard end @@ -31,7 +31,7 @@ Route23_EventScript_ThunderBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 3 - getstdstring 0, STDSTRING_THUNDER_BADGE + bufferstdstring STR_VAR_1, STDSTRING_THUNDER_BADGE goto Route23_EventScript_BadgeGuard end @@ -39,7 +39,7 @@ Route23_EventScript_RainbowBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 4 - getstdstring 0, STDSTRING_RAINBOW_BADGE + bufferstdstring STR_VAR_1, STDSTRING_RAINBOW_BADGE goto Route23_EventScript_BadgeGuard end @@ -47,7 +47,7 @@ Route23_EventScript_SoulBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 5 - getstdstring 0, STDSTRING_SOUL_BADGE + bufferstdstring STR_VAR_1, STDSTRING_SOUL_BADGE goto Route23_EventScript_BadgeGuard end @@ -55,7 +55,7 @@ Route23_EventScript_MarshBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 6 - getstdstring 0, STDSTRING_MARSH_BADGE + bufferstdstring STR_VAR_1, STDSTRING_MARSH_BADGE goto Route23_EventScript_BadgeGuard end @@ -63,7 +63,7 @@ Route23_EventScript_VolcanoBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 7 - getstdstring 0, STDSTRING_VOLCANO_BADGE + bufferstdstring STR_VAR_1, STDSTRING_VOLCANO_BADGE goto Route23_EventScript_BadgeGuard end @@ -71,7 +71,7 @@ Route23_EventScript_EarthBadgeGuard:: lock faceplayer setvar VAR_TEMP_1, 8 - getstdstring 0, STDSTRING_EARTH_BADGE + bufferstdstring STR_VAR_1, STDSTRING_EARTH_BADGE goto Route23_EventScript_BadgeGuard end @@ -79,7 +79,7 @@ Route23_EventScript_CascadeBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 2 setvar VAR_0x8009, LOCALID_CASCADE_BADGE_GUARD - getstdstring 0, STDSTRING_CASCADE_BADGE + bufferstdstring STR_VAR_1, STDSTRING_CASCADE_BADGE goto Route23_EventScript_BadgeGuardTrigger end @@ -87,7 +87,7 @@ Route23_EventScript_ThunderBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 3 setvar VAR_0x8009, LOCALID_THUNDER_BADGE_GUARD - getstdstring 0, STDSTRING_THUNDER_BADGE + bufferstdstring STR_VAR_1, STDSTRING_THUNDER_BADGE goto Route23_EventScript_BadgeGuardTrigger end @@ -95,7 +95,7 @@ Route23_EventScript_RainbowBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 4 setvar VAR_0x8009, LOCALID_RAINBOW_BADGE_GUARD - getstdstring 0, STDSTRING_RAINBOW_BADGE + bufferstdstring STR_VAR_1, STDSTRING_RAINBOW_BADGE goto Route23_EventScript_BadgeGuardTrigger end @@ -103,7 +103,7 @@ Route23_EventScript_SoulBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 5 setvar VAR_0x8009, LOCALID_SOUL_BADGE_GUARD - getstdstring 0, STDSTRING_SOUL_BADGE + bufferstdstring STR_VAR_1, STDSTRING_SOUL_BADGE goto Route23_EventScript_BadgeGuardTrigger end @@ -111,7 +111,7 @@ Route23_EventScript_MarshBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 6 setvar VAR_0x8009, LOCALID_MARSH_BADGE_GUARD - getstdstring 0, STDSTRING_MARSH_BADGE + bufferstdstring STR_VAR_1, STDSTRING_MARSH_BADGE goto Route23_EventScript_BadgeGuardTrigger end @@ -119,7 +119,7 @@ Route23_EventScript_VolcanoBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 7 setvar VAR_0x8009, LOCALID_VOLCANO_BADGE_GUARD - getstdstring 0, STDSTRING_VOLCANO_BADGE + bufferstdstring STR_VAR_1, STDSTRING_VOLCANO_BADGE goto Route23_EventScript_BadgeGuardTrigger end @@ -127,7 +127,7 @@ Route23_EventScript_EarthBadgeGuardTrigger:: lockall setvar VAR_TEMP_1, 8 setvar VAR_0x8009, LOCALID_EARTH_BADGE_GUARD - getstdstring 0, STDSTRING_EARTH_BADGE + bufferstdstring STR_VAR_1, STDSTRING_EARTH_BADGE goto Route23_EventScript_BadgeGuardTrigger end diff --git a/data/maps/Route25_SeaCottage/scripts.inc b/data/maps/Route25_SeaCottage/scripts.inc index 83173399c..182aec7e7 100644 --- a/data/maps/Route25_SeaCottage/scripts.inc +++ b/data/maps/Route25_SeaCottage/scripts.inc @@ -258,36 +258,36 @@ Route25_SeaCottage_EventScript_BillsMonList:: end Route25_SeaCottage_EventScript_ViewEevee:: - drawmonpic SPECIES_EEVEE, 10, 3 + showmonpic SPECIES_EEVEE, 10, 3 waitbuttonpress - erasemonpic + hidemonpic setvar VAR_0x8004, SPECIES_EEVEE special SetSeenMon goto Route25_SeaCottage_EventScript_BillsMonList end Route25_SeaCottage_EventScript_ViewFlareon:: - drawmonpic SPECIES_FLAREON, 10, 3 + showmonpic SPECIES_FLAREON, 10, 3 waitbuttonpress - erasemonpic + hidemonpic setvar VAR_0x8004, SPECIES_FLAREON special SetSeenMon goto Route25_SeaCottage_EventScript_BillsMonList end Route25_SeaCottage_EventScript_ViewJolteon:: - drawmonpic SPECIES_JOLTEON, 10, 3 + showmonpic SPECIES_JOLTEON, 10, 3 waitbuttonpress - erasemonpic + hidemonpic setvar VAR_0x8004, SPECIES_JOLTEON special SetSeenMon goto Route25_SeaCottage_EventScript_BillsMonList end Route25_SeaCottage_EventScript_ViewVaporeon:: - drawmonpic SPECIES_VAPOREON, 10, 3 + showmonpic SPECIES_VAPOREON, 10, 3 waitbuttonpress - erasemonpic + hidemonpic setvar VAR_0x8004, SPECIES_VAPOREON special SetSeenMon goto Route25_SeaCottage_EventScript_BillsMonList diff --git a/data/maps/Route2_EastBuilding/scripts.inc b/data/maps/Route2_EastBuilding/scripts.inc index e602b4fc0..60d995140 100644 --- a/data/maps/Route2_EastBuilding/scripts.inc +++ b/data/maps/Route2_EastBuilding/scripts.inc @@ -13,7 +13,7 @@ Route2_EastBuilding_EventScript_Aide:: goto_if_eq Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount - getnumberstring 2, VAR_0x8006 + buffernumberstring STR_VAR_3, VAR_0x8006 call Route2_EastBuilding_EventScript_GetAideRequestInfo compare VAR_0x8006, REQUIRED_SEEN_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough @@ -33,8 +33,8 @@ Route2_EastBuilding_EventScript_AlreadyGotHM05:: end Route2_EastBuilding_EventScript_GetAideRequestInfo:: - getnumberstring 0, REQUIRED_SEEN_MONS - getitemname 1, ITEM_HM05 + buffernumberstring STR_VAR_1, REQUIRED_SEEN_MONS + bufferitemname STR_VAR_2, ITEM_HM05 return Route2_EastBuilding_EventScript_Rocker:: diff --git a/data/maps/Route2_House/scripts.inc b/data/maps/Route2_House/scripts.inc index 9ddb1e292..c252e38b3 100644 --- a/data/maps/Route2_House/scripts.inc +++ b/data/maps/Route2_House/scripts.inc @@ -32,7 +32,7 @@ Route2_House_EventScript_DeclineTrade:: end Route2_House_EventScript_NotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_WhatThatsNoMon release end diff --git a/data/maps/Route4_PokemonCenter_1F/scripts.inc b/data/maps/Route4_PokemonCenter_1F/scripts.inc index 0f32e6f43..f7a37ac6e 100644 --- a/data/maps/Route4_PokemonCenter_1F/scripts.inc +++ b/data/maps/Route4_PokemonCenter_1F/scripts.inc @@ -66,7 +66,7 @@ Route4_PokemonCenter_1F_EventScript_BuyMagikarpParty:: goto_if_eq Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp call EventScript_GetGiftMonPartySlot fadescreen FADE_TO_BLACK - hidemoneybox 0, 0 + hidemoneybox special ChangePokemonNickname waitstate goto Route4_PokemonCenter_1F_EventScript_BoughtMagikarp @@ -78,7 +78,7 @@ Route4_PokemonCenter_1F_EventScript_BuyMagikarpPC:: compare VAR_RESULT, NO goto_if_eq Route4_PokemonCenter_1F_EventScript_TransferMagikarpCloseMoneyBox fadescreen FADE_TO_BLACK - hidemoneybox 0, 0 + hidemoneybox special ChangeBoxPokemonNickname waitstate lock @@ -97,7 +97,7 @@ Route4_PokemonCenter_1F_EventScript_TransferMagikarp:: end Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp:: - hidemoneybox 0, 0 + hidemoneybox goto Route4_PokemonCenter_1F_EventScript_BoughtMagikarp end @@ -108,23 +108,23 @@ Route4_PokemonCenter_1F_EventScript_BoughtMagikarp:: Route4_PokemonCenter_1F_EventScript_PayForMagikarp:: removemoney MAGIKARP_PRICE, 0 - updatemoneybox 0, 0, 0 + updatemoneybox playfanfare MUS_LEVEL_UP message Route4_PokemonCenter_1F_Text_PaidOutrageouslyForMagikarp waitmessage waitfanfare - getspeciesname 0, SPECIES_MAGIKARP + bufferspeciesname STR_VAR_1, SPECIES_MAGIKARP return Route4_PokemonCenter_1F_EventScript_DeclineMagikarp:: msgbox Route4_PokemonCenter_1F_Text_OnlyDoingThisAsFavorToYou - hidemoneybox 0, 0 + hidemoneybox release end Route4_PokemonCenter_1F_EventScript_NotEnoughMoney:: msgbox Route4_PokemonCenter_1F_Text_YoullNeedMoreMoney - hidemoneybox 0, 0 + hidemoneybox release end @@ -136,7 +136,7 @@ Route4_PokemonCenter_1F_EventScript_AlreadyBoughtMagikarp:: Route4_PokemonCenter_1F_EventScript_NoRoomForMagikarp:: textcolor 0 msgbox Route4_PokemonCenter_1F_Text_NoRoomForMorePokemon - hidemoneybox 0, 0 + hidemoneybox release end diff --git a/data/maps/SSAnne_2F_Room1/scripts.inc b/data/maps/SSAnne_2F_Room1/scripts.inc index 183c71528..06292bc3c 100644 --- a/data/maps/SSAnne_2F_Room1/scripts.inc +++ b/data/maps/SSAnne_2F_Room1/scripts.inc @@ -8,8 +8,8 @@ SSAnne_2F_Room1_EventScript_Gentleman:: waitmessage setvar VAR_0x8004, SPECIES_SNORLAX special SetSeenMon - drawmonpic SPECIES_SNORLAX, 10, 3 + showmonpic SPECIES_SNORLAX, 10, 3 waitbuttonpress - erasemonpic + hidemonpic release end diff --git a/data/maps/SaffronCity_Dojo/scripts.inc b/data/maps/SaffronCity_Dojo/scripts.inc index 2cc0b23bc..126c2a6c5 100644 --- a/data/maps/SaffronCity_Dojo/scripts.inc +++ b/data/maps/SaffronCity_Dojo/scripts.inc @@ -23,7 +23,7 @@ SaffronCity_Dojo_EventScript_HitmonleeBall:: lock faceplayer 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 applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp waitmovement 0 @@ -32,7 +32,7 @@ SaffronCity_Dojo_EventScript_HitmonleeBall:: call EventScript_RestorePrevTextColor compare VAR_RESULT, YES goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon - erasemonpic + hidemonpic release end @@ -45,7 +45,7 @@ SaffronCity_Dojo_EventScript_HitmonchanBall:: lock faceplayer 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 applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp waitmovement 0 @@ -54,12 +54,12 @@ SaffronCity_Dojo_EventScript_HitmonchanBall:: call EventScript_RestorePrevTextColor compare VAR_RESULT, YES goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon - erasemonpic + hidemonpic release end SaffronCity_Dojo_EventScript_GiveHitmon:: - erasemonpic + hidemonpic givemon VAR_TEMP_1, 25, ITEM_NONE compare VAR_RESULT, 0 goto_if_eq SaffronCity_Dojo_EventScript_ReceivedHitmonParty @@ -72,7 +72,7 @@ SaffronCity_Dojo_EventScript_GiveHitmon:: SaffronCity_Dojo_EventScript_ReceivedHitmonParty:: removeobject VAR_LAST_TALKED - getspeciesname 0, VAR_TEMP_1 + bufferspeciesname STR_VAR_1, VAR_TEMP_1 playfanfare MUS_LEVEL_UP message SaffronCity_Dojo_Text_ReceivedMonFromKarateMaster waitmessage @@ -88,7 +88,7 @@ SaffronCity_Dojo_EventScript_ReceivedHitmonParty:: SaffronCity_Dojo_EventScript_ReceivedHitmonPC:: removeobject VAR_LAST_TALKED - getspeciesname 0, VAR_TEMP_1 + bufferspeciesname STR_VAR_1, VAR_TEMP_1 playfanfare MUS_LEVEL_UP message SaffronCity_Dojo_Text_ReceivedMonFromKarateMaster waitmessage diff --git a/data/maps/SevenIsland_House_Room1/scripts.inc b/data/maps/SevenIsland_House_Room1/scripts.inc index e2e8c4e6b..fda16db24 100644 --- a/data/maps/SevenIsland_House_Room1/scripts.inc +++ b/data/maps/SevenIsland_House_Room1/scripts.inc @@ -40,7 +40,7 @@ SevenIsland_House_Room1_EventScript_OldWomanCommentOnBattle:: waitmovement 0 applymovement LOCALID_OLD_WOMAN, SevenIsland_House_Room1_Movement_OldWomanWalkBehindPlayer waitmovement 0 - moveobjectoffscreen LOCALID_OLD_WOMAN + copyobjectxytoperm LOCALID_OLD_WOMAN applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 compare VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 1 diff --git a/data/maps/SilphCo_7F/scripts.inc b/data/maps/SilphCo_7F/scripts.inc index cce9193ae..353ed43af 100644 --- a/data/maps/SilphCo_7F/scripts.inc +++ b/data/maps/SilphCo_7F/scripts.inc @@ -145,7 +145,7 @@ SilphCo_7F_EventScript_ReceiveLaprasParty:: message SilphCo_7F_Text_ObtainedLaprasFromEmployee waitmessage waitfanfare - getspeciesname 0, SPECIES_LAPRAS + bufferspeciesname STR_VAR_1, SPECIES_LAPRAS msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SilphCo_7F_EventScript_EndReceiveLapras @@ -160,7 +160,7 @@ SilphCo_7F_EventScript_ReceiveLaprasPC:: message SilphCo_7F_Text_ObtainedLaprasFromEmployee waitmessage waitfanfare - getspeciesname 0, SPECIES_LAPRAS + bufferspeciesname STR_VAR_1, SPECIES_LAPRAS msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SilphCo_7F_EventScript_LaprasTransferredToPC diff --git a/data/maps/UndergroundPath_NorthEntrance/scripts.inc b/data/maps/UndergroundPath_NorthEntrance/scripts.inc index 207055dc7..64a7ba916 100644 --- a/data/maps/UndergroundPath_NorthEntrance/scripts.inc +++ b/data/maps/UndergroundPath_NorthEntrance/scripts.inc @@ -28,7 +28,7 @@ UndergroundPath_NorthEntrance_EventScript_DeclineTrade:: end UndergroundPath_NorthEntrance_EventScript_NotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox Trade_Text_ThisIsNoMon release end diff --git a/data/maps/VermilionCity_House2/scripts.inc b/data/maps/VermilionCity_House2/scripts.inc index 51ff9a355..a6c960685 100644 --- a/data/maps/VermilionCity_House2/scripts.inc +++ b/data/maps/VermilionCity_House2/scripts.inc @@ -28,7 +28,7 @@ VermilionCity_House2_EventScript_DeclineTrade:: end VermilionCity_House2_EventScript_NotRequestedMon:: - getspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox VermilionCity_House2_Text_ThisIsNoMon release end diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index 9c3f748bb..f9d118b09 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -1,3 +1,5 @@ +.set LOCALID_BOULDER, 5 + VictoryRoad_1F_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_1F_OnLoad map_script MAP_SCRIPT_ON_TRANSITION, VictoryRoad_1F_OnTransition @@ -26,7 +28,7 @@ VictoryRoad_1F_EventScript_FloorSwitch:: playse SE_ICE_BREAK special DrawWholeMapView waitse - moveobjectoffscreen 5 + copyobjectxytoperm LOCALID_BOULDER setvar VAR_MAP_SCENE_VICTORY_ROAD_1F, 100 releaseall end diff --git a/data/maps/VictoryRoad_2F/scripts.inc b/data/maps/VictoryRoad_2F/scripts.inc index 46d259144..738c62818 100644 --- a/data/maps/VictoryRoad_2F/scripts.inc +++ b/data/maps/VictoryRoad_2F/scripts.inc @@ -1,3 +1,6 @@ +.set LOCALID_BOULDER1, 11 +.set LOCALID_BOULDER2, 12 + VictoryRoad_2F_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_2F_OnLoad .byte 0 @@ -28,7 +31,7 @@ VictoryRoad_2F_EventScript_FloorSwitch1:: playse SE_ICE_BREAK special DrawWholeMapView waitse - moveobjectoffscreen 11 + copyobjectxytoperm LOCALID_BOULDER1 setvar VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER1, 100 releaseall end @@ -46,7 +49,7 @@ VictoryRoad_2F_EventScript_FloorSwitch2:: playse SE_ICE_BREAK special DrawWholeMapView waitse - moveobjectoffscreen 12 + copyobjectxytoperm LOCALID_BOULDER2 setvar VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2, 100 releaseall end diff --git a/data/maps/VictoryRoad_3F/scripts.inc b/data/maps/VictoryRoad_3F/scripts.inc index 6348480b7..6a6ba11b7 100644 --- a/data/maps/VictoryRoad_3F/scripts.inc +++ b/data/maps/VictoryRoad_3F/scripts.inc @@ -1,3 +1,6 @@ +.set LOCALID_BOULDER1, 7 +.set LOCALID_BOULDER2, 10 + VictoryRoad_3F_MapScripts:: map_script MAP_SCRIPT_ON_LOAD, VictoryRoad_3F_OnLoad .byte 0 @@ -21,8 +24,8 @@ VictoryRoad_3F_EventScript_FloorSwitch:: playse SE_ICE_BREAK special DrawWholeMapView waitse - moveobjectoffscreen 7 - moveobjectoffscreen 10 + copyobjectxytoperm LOCALID_BOULDER1 + copyobjectxytoperm LOCALID_BOULDER2 setvar VAR_MAP_SCENE_VICTORY_ROAD_3F, 100 releaseall end diff --git a/data/mystery_event_msg.s b/data/mystery_event_msg.s index af7048be3..78c2e05f0 100644 --- a/data/mystery_event_msg.s +++ b/data/mystery_event_msg.s @@ -21,7 +21,7 @@ MysteryEventScript_StampCard:: setorcopyvar VAR_RESULT, 0 specialvar VAR_0x8009, BattleCardAction subvar VAR_0x8008, VAR_0x8009 - getnumberstring 0, VAR_0x8008 + buffernumberstring STR_VAR_1, VAR_0x8008 lock faceplayer vmessage sText_MysteryGiftStampCard @@ -39,7 +39,7 @@ sText_MysteryGiftStampCard: MysteryEventScript_SurfPichu:: setvaddress MysteryEventScript_SurfPichu vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible - gotoram + returnram SurfPichu_GiveIfPossible: specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 11449b86f..0a9535ae9 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -1,219 +1,219 @@ .align 2 gScriptCmdTable:: - .4byte ScrCmd_nop - .4byte ScrCmd_nop1 - .4byte ScrCmd_end - .4byte ScrCmd_return - .4byte ScrCmd_call - .4byte ScrCmd_goto - .4byte ScrCmd_goto_if - .4byte ScrCmd_call_if - .4byte ScrCmd_gotostd - .4byte ScrCmd_callstd - .4byte ScrCmd_gotostd_if - .4byte ScrCmd_callstd_if - .4byte ScrCmd_gotoram - .4byte ScrCmd_killscript - .4byte ScrCmd_setmysteryeventstatus - .4byte ScrCmd_loadword - .4byte ScrCmd_loadbyte - .4byte ScrCmd_writebytetoaddr - .4byte ScrCmd_loadbytefromaddr - .4byte ScrCmd_setptrbyte - .4byte ScrCmd_copylocal - .4byte ScrCmd_copybyte - .4byte ScrCmd_setvar - .4byte ScrCmd_addvar - .4byte ScrCmd_subvar - .4byte ScrCmd_copyvar - .4byte ScrCmd_setorcopyvar - .4byte ScrCmd_compare_local_to_local - .4byte ScrCmd_compare_local_to_value - .4byte ScrCmd_compare_local_to_addr - .4byte ScrCmd_compare_addr_to_local - .4byte ScrCmd_compare_addr_to_value - .4byte ScrCmd_compare_addr_to_addr - .4byte ScrCmd_compare_var_to_value - .4byte ScrCmd_compare_var_to_var - .4byte ScrCmd_callnative - .4byte ScrCmd_gotonative - .4byte ScrCmd_special - .4byte ScrCmd_specialvar - .4byte ScrCmd_waitstate - .4byte ScrCmd_delay - .4byte ScrCmd_setflag - .4byte ScrCmd_clearflag - .4byte ScrCmd_checkflag - .4byte ScrCmd_initclock - .4byte ScrCmd_dodailyevents - .4byte ScrCmd_gettime - .4byte ScrCmd_playse - .4byte ScrCmd_waitse - .4byte ScrCmd_playfanfare - .4byte ScrCmd_waitfanfare - .4byte ScrCmd_playbgm - .4byte ScrCmd_savebgm - .4byte ScrCmd_fadedefaultbgm - .4byte ScrCmd_fadenewbgm - .4byte ScrCmd_fadeoutbgm - .4byte ScrCmd_fadeinbgm - .4byte ScrCmd_warp - .4byte ScrCmd_warpsilent - .4byte ScrCmd_warpdoor - .4byte ScrCmd_warphole - .4byte ScrCmd_warpteleport - .4byte ScrCmd_setwarp - .4byte ScrCmd_setdynamicwarp - .4byte ScrCmd_setdivewarp - .4byte ScrCmd_setholewarp - .4byte ScrCmd_getplayerxy - .4byte ScrCmd_getpartysize - .4byte ScrCmd_additem - .4byte ScrCmd_removeitem - .4byte ScrCmd_checkitemspace - .4byte ScrCmd_checkitem - .4byte ScrCmd_checkitemtype - .4byte ScrCmd_addpcitem - .4byte ScrCmd_checkpcitem - .4byte ScrCmd_givedecoration - .4byte ScrCmd_takedecoration - .4byte ScrCmd_checkdecor - .4byte ScrCmd_checkdecorspace - .4byte ScrCmd_applymovement - .4byte ScrCmd_applymovement_at - .4byte ScrCmd_waitmovement - .4byte ScrCmd_waitmovement_at - .4byte ScrCmd_removeobject - .4byte ScrCmd_removeobject_at - .4byte ScrCmd_addobject - .4byte ScrCmd_addobject_at - .4byte ScrCmd_setobjectxy - .4byte ScrCmd_showobject_at - .4byte ScrCmd_hideobject_at - .4byte ScrCmd_faceplayer - .4byte ScrCmd_turnobject - .4byte ScrCmd_trainerbattle - .4byte ScrCmd_dotrainerbattle - .4byte ScrCmd_gotopostbattlescript - .4byte ScrCmd_gotobeatenscript - .4byte ScrCmd_checktrainerflag - .4byte ScrCmd_settrainerflag - .4byte ScrCmd_cleartrainerflag - .4byte ScrCmd_setobjectxyperm - .4byte ScrCmd_moveobjectoffscreen - .4byte ScrCmd_setobjectmovementtype - .4byte ScrCmd_waitmessage - .4byte ScrCmd_message - .4byte ScrCmd_closemessage - .4byte ScrCmd_lockall - .4byte ScrCmd_lock - .4byte ScrCmd_releaseall - .4byte ScrCmd_release - .4byte ScrCmd_waitbuttonpress - .4byte ScrCmd_yesnobox - .4byte ScrCmd_multichoice - .4byte ScrCmd_multichoicedefault - .4byte ScrCmd_multichoicegrid - .4byte ScrCmd_drawbox - .4byte ScrCmd_erasebox - .4byte ScrCmd_drawboxtext - .4byte ScrCmd_showmonpic - .4byte ScrCmd_hidemonpic - .4byte ScrCmd_showcontestwinner - .4byte ScrCmd_braillemessage - .4byte ScrCmd_givemon - .4byte ScrCmd_giveegg - .4byte ScrCmd_setmonmove - .4byte ScrCmd_checkpartymove - .4byte ScrCmd_bufferspeciesname - .4byte ScrCmd_bufferleadmonspeciesname - .4byte ScrCmd_bufferpartymonnick - .4byte ScrCmd_bufferitemname - .4byte ScrCmd_bufferdecorationname - .4byte ScrCmd_buffermovename - .4byte ScrCmd_buffernumberstring - .4byte ScrCmd_bufferstdstring - .4byte ScrCmd_bufferstring - .4byte ScrCmd_pokemart - .4byte ScrCmd_pokemartdecoration - .4byte ScrCmd_pokemartdecoration2 - .4byte ScrCmd_playslotmachine - .4byte ScrCmd_setberrytree - .4byte ScrCmd_choosecontestmon - .4byte ScrCmd_startcontest - .4byte ScrCmd_showcontestresults - .4byte ScrCmd_contestlinktransfer - .4byte ScrCmd_random - .4byte ScrCmd_addmoney - .4byte ScrCmd_removemoney - .4byte ScrCmd_checkmoney - .4byte ScrCmd_showmoneybox - .4byte ScrCmd_hidemoneybox - .4byte ScrCmd_updatemoneybox - .4byte ScrCmd_getpricereduction - .4byte ScrCmd_fadescreen - .4byte ScrCmd_fadescreenspeed - .4byte ScrCmd_setflashradius - .4byte ScrCmd_animateflash - .4byte ScrCmd_messageautoscroll - .4byte ScrCmd_dofieldeffect - .4byte ScrCmd_setfieldeffectarg - .4byte ScrCmd_waitfieldeffect - .4byte ScrCmd_setrespawn - .4byte ScrCmd_checkplayergender - .4byte ScrCmd_playmoncry - .4byte ScrCmd_setmetatile - .4byte ScrCmd_resetweather - .4byte ScrCmd_setweather - .4byte ScrCmd_doweather - .4byte ScrCmd_setstepcallback - .4byte ScrCmd_setmaplayoutindex - .4byte ScrCmd_setobjectpriority - .4byte ScrCmd_resetobjectpriority - .4byte ScrCmd_createvobject - .4byte ScrCmd_turnvobject - .4byte ScrCmd_opendoor - .4byte ScrCmd_closedoor - .4byte ScrCmd_waitdooranim - .4byte ScrCmd_setdooropen - .4byte ScrCmd_setdoorclosed - .4byte ScrCmd_addelevmenuitem - .4byte ScrCmd_showelevmenu - .4byte ScrCmd_checkcoins - .4byte ScrCmd_addcoins - .4byte ScrCmd_removecoins - .4byte ScrCmd_setwildbattle - .4byte ScrCmd_dowildbattle - .4byte ScrCmd_setvaddress - .4byte ScrCmd_vgoto - .4byte ScrCmd_vcall - .4byte ScrCmd_vgoto_if - .4byte ScrCmd_vcall_if - .4byte ScrCmd_vmessage - .4byte ScrCmd_vloadword - .4byte ScrCmd_vbufferstring - .4byte ScrCmd_showcoinsbox - .4byte ScrCmd_hidecoinsbox - .4byte ScrCmd_updatecoinsbox - .4byte ScrCmd_incrementgamestat - .4byte ScrCmd_setescapewarp - .4byte ScrCmd_waitmoncry - .4byte ScrCmd_bufferboxname - .4byte ScrCmd_textcolor - .4byte ScrCmd_loadhelp - .4byte ScrCmd_unloadhelp - .4byte ScrCmd_signmsg - .4byte ScrCmd_normalmsg - .4byte ScrCmd_comparestattoword - .4byte ScrCmd_setmoneventlegal - .4byte ScrCmd_checkmoneventlegal - .4byte ScrCmd_execram - .4byte ScrCmd_setworldmapflag - .4byte ScrCmd_warpteleport2 - .4byte ScrCmd_setmonmetlocation - .4byte ScrCmd_getbraillestringwidth - .4byte ScrCmd_bufferitemnameplural + .4byte ScrCmd_nop @ 0x00 + .4byte ScrCmd_nop1 @ 0x01 + .4byte ScrCmd_end @ 0x02 + .4byte ScrCmd_return @ 0x03 + .4byte ScrCmd_call @ 0x04 + .4byte ScrCmd_goto @ 0x05 + .4byte ScrCmd_goto_if @ 0x06 + .4byte ScrCmd_call_if @ 0x07 + .4byte ScrCmd_gotostd @ 0x08 + .4byte ScrCmd_callstd @ 0x09 + .4byte ScrCmd_gotostd_if @ 0x0a + .4byte ScrCmd_callstd_if @ 0x0b + .4byte ScrCmd_returnram @ 0x0c + .4byte ScrCmd_endram @ 0x0d + .4byte ScrCmd_setmysteryeventstatus @ 0x0e + .4byte ScrCmd_loadword @ 0x0f + .4byte ScrCmd_loadbyte @ 0x10 + .4byte ScrCmd_setptr @ 0x11 + .4byte ScrCmd_loadbytefromptr @ 0x12 + .4byte ScrCmd_setptrbyte @ 0x13 + .4byte ScrCmd_copylocal @ 0x14 + .4byte ScrCmd_copybyte @ 0x15 + .4byte ScrCmd_setvar @ 0x16 + .4byte ScrCmd_addvar @ 0x17 + .4byte ScrCmd_subvar @ 0x18 + .4byte ScrCmd_copyvar @ 0x19 + .4byte ScrCmd_setorcopyvar @ 0x1a + .4byte ScrCmd_compare_local_to_local @ 0x1b + .4byte ScrCmd_compare_local_to_value @ 0x1c + .4byte ScrCmd_compare_local_to_ptr @ 0x1d + .4byte ScrCmd_compare_ptr_to_local @ 0x1e + .4byte ScrCmd_compare_ptr_to_value @ 0x1f + .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 + .4byte ScrCmd_compare_var_to_value @ 0x21 + .4byte ScrCmd_compare_var_to_var @ 0x22 + .4byte ScrCmd_callnative @ 0x23 + .4byte ScrCmd_gotonative @ 0x24 + .4byte ScrCmd_special @ 0x25 + .4byte ScrCmd_specialvar @ 0x26 + .4byte ScrCmd_waitstate @ 0x27 + .4byte ScrCmd_delay @ 0x28 + .4byte ScrCmd_setflag @ 0x29 + .4byte ScrCmd_clearflag @ 0x2a + .4byte ScrCmd_checkflag @ 0x2b + .4byte ScrCmd_initclock @ 0x2c + .4byte ScrCmd_dotimebasedevents @ 0x2d + .4byte ScrCmd_gettime @ 0x2e + .4byte ScrCmd_playse @ 0x2f + .4byte ScrCmd_waitse @ 0x30 + .4byte ScrCmd_playfanfare @ 0x31 + .4byte ScrCmd_waitfanfare @ 0x32 + .4byte ScrCmd_playbgm @ 0x33 + .4byte ScrCmd_savebgm @ 0x34 + .4byte ScrCmd_fadedefaultbgm @ 0x35 + .4byte ScrCmd_fadenewbgm @ 0x36 + .4byte ScrCmd_fadeoutbgm @ 0x37 + .4byte ScrCmd_fadeinbgm @ 0x38 + .4byte ScrCmd_warp @ 0x39 + .4byte ScrCmd_warpsilent @ 0x3a + .4byte ScrCmd_warpdoor @ 0x3b + .4byte ScrCmd_warphole @ 0x3c + .4byte ScrCmd_warpteleport @ 0x3d + .4byte ScrCmd_setwarp @ 0x3e + .4byte ScrCmd_setdynamicwarp @ 0x3f + .4byte ScrCmd_setdivewarp @ 0x40 + .4byte ScrCmd_setholewarp @ 0x41 + .4byte ScrCmd_getplayerxy @ 0x42 + .4byte ScrCmd_getpartysize @ 0x43 + .4byte ScrCmd_additem @ 0x44 + .4byte ScrCmd_removeitem @ 0x45 + .4byte ScrCmd_checkitemspace @ 0x46 + .4byte ScrCmd_checkitem @ 0x47 + .4byte ScrCmd_checkitemtype @ 0x48 + .4byte ScrCmd_addpcitem @ 0x49 + .4byte ScrCmd_checkpcitem @ 0x4a + .4byte ScrCmd_adddecoration @ 0x4b + .4byte ScrCmd_removedecoration @ 0x4c + .4byte ScrCmd_checkdecor @ 0x4d + .4byte ScrCmd_checkdecorspace @ 0x4e + .4byte ScrCmd_applymovement @ 0x4f + .4byte ScrCmd_applymovementat @ 0x50 + .4byte ScrCmd_waitmovement @ 0x51 + .4byte ScrCmd_waitmovementat @ 0x52 + .4byte ScrCmd_removeobject @ 0x53 + .4byte ScrCmd_removeobjectat @ 0x54 + .4byte ScrCmd_addobject @ 0x55 + .4byte ScrCmd_addobjectat @ 0x56 + .4byte ScrCmd_setobjectxy @ 0x57 + .4byte ScrCmd_showobjectat @ 0x58 + .4byte ScrCmd_hideobjectat @ 0x59 + .4byte ScrCmd_faceplayer @ 0x5a + .4byte ScrCmd_turnobject @ 0x5b + .4byte ScrCmd_trainerbattle @ 0x5c + .4byte ScrCmd_dotrainerbattle @ 0x5d + .4byte ScrCmd_gotopostbattlescript @ 0x5e + .4byte ScrCmd_gotobeatenscript @ 0x5f + .4byte ScrCmd_checktrainerflag @ 0x60 + .4byte ScrCmd_settrainerflag @ 0x61 + .4byte ScrCmd_cleartrainerflag @ 0x62 + .4byte ScrCmd_setobjectxyperm @ 0x63 + .4byte ScrCmd_copyobjectxytoperm @ 0x64 + .4byte ScrCmd_setobjectmovementtype @ 0x65 + .4byte ScrCmd_waitmessage @ 0x66 + .4byte ScrCmd_message @ 0x67 + .4byte ScrCmd_closemessage @ 0x68 + .4byte ScrCmd_lockall @ 0x69 + .4byte ScrCmd_lock @ 0x6a + .4byte ScrCmd_releaseall @ 0x6b + .4byte ScrCmd_release @ 0x6c + .4byte ScrCmd_waitbuttonpress @ 0x6d + .4byte ScrCmd_yesnobox @ 0x6e + .4byte ScrCmd_multichoice @ 0x6f + .4byte ScrCmd_multichoicedefault @ 0x70 + .4byte ScrCmd_multichoicegrid @ 0x71 + .4byte ScrCmd_drawbox @ 0x72 + .4byte ScrCmd_erasebox @ 0x73 + .4byte ScrCmd_drawboxtext @ 0x74 + .4byte ScrCmd_showmonpic @ 0x75 + .4byte ScrCmd_hidemonpic @ 0x76 + .4byte ScrCmd_showcontestpainting @ 0x77 + .4byte ScrCmd_braillemessage @ 0x78 + .4byte ScrCmd_givemon @ 0x79 + .4byte ScrCmd_giveegg @ 0x7a + .4byte ScrCmd_setmonmove @ 0x7b + .4byte ScrCmd_checkpartymove @ 0x7c + .4byte ScrCmd_bufferspeciesname @ 0x7d + .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e + .4byte ScrCmd_bufferpartymonnick @ 0x7f + .4byte ScrCmd_bufferitemname @ 0x80 + .4byte ScrCmd_bufferdecorationname @ 0x81 + .4byte ScrCmd_buffermovename @ 0x82 + .4byte ScrCmd_buffernumberstring @ 0x83 + .4byte ScrCmd_bufferstdstring @ 0x84 + .4byte ScrCmd_bufferstring @ 0x85 + .4byte ScrCmd_pokemart @ 0x86 + .4byte ScrCmd_pokemartdecoration @ 0x87 + .4byte ScrCmd_pokemartdecoration2 @ 0x88 + .4byte ScrCmd_playslotmachine @ 0x8 + .4byte ScrCmd_setberrytree @ 0x8a + .4byte ScrCmd_choosecontestmon @ 0x8b + .4byte ScrCmd_startcontest @ 0x8c + .4byte ScrCmd_showcontestresults @ 0x8d + .4byte ScrCmd_contestlinktransfer @ 0x8e + .4byte ScrCmd_random @ 0x8f + .4byte ScrCmd_addmoney @ 0x90 + .4byte ScrCmd_removemoney @ 0x91 + .4byte ScrCmd_checkmoney @ 0x92 + .4byte ScrCmd_showmoneybox @ 0x93 + .4byte ScrCmd_hidemoneybox @ 0x94 + .4byte ScrCmd_updatemoneybox @ 0x95 + .4byte ScrCmd_getpokenewsactive @ 0x96 + .4byte ScrCmd_fadescreen @ 0x97 + .4byte ScrCmd_fadescreenspeed @ 0x98 + .4byte ScrCmd_setflashlevel @ 0x99 + .4byte ScrCmd_animateflash @ 0x9a + .4byte ScrCmd_messageautoscroll @ 0x9b + .4byte ScrCmd_dofieldeffect @ 0x9c + .4byte ScrCmd_setfieldeffectargument @ 0x9d + .4byte ScrCmd_waitfieldeffect @ 0x9e + .4byte ScrCmd_setrespawn @ 0x9f + .4byte ScrCmd_checkplayergender @ 0xa0 + .4byte ScrCmd_playmoncry @ 0xa1 + .4byte ScrCmd_setmetatile @ 0xa2 + .4byte ScrCmd_resetweather @ 0xa3 + .4byte ScrCmd_setweather @ 0xa4 + .4byte ScrCmd_doweather @ 0xa5 + .4byte ScrCmd_setstepcallback @ 0xa6 + .4byte ScrCmd_setmaplayoutindex @ 0xa7 + .4byte ScrCmd_setobjectsubpriority @ 0xa8 + .4byte ScrCmd_resetobjectsubpriority @ 0xa9 + .4byte ScrCmd_createvobject @ 0xaa + .4byte ScrCmd_turnvobject @ 0xab + .4byte ScrCmd_opendoor @ 0xac + .4byte ScrCmd_closedoor @ 0xad + .4byte ScrCmd_waitdooranim @ 0xae + .4byte ScrCmd_setdooropen @ 0xaf + .4byte ScrCmd_setdoorclosed @ 0xb0 + .4byte ScrCmd_addelevmenuitem @ 0xb1 + .4byte ScrCmd_showelevmenu @ 0xb2 + .4byte ScrCmd_checkcoins @ 0xb3 + .4byte ScrCmd_addcoins @ 0xb4 + .4byte ScrCmd_removecoins @ 0xb5 + .4byte ScrCmd_setwildbattle @ 0xb6 + .4byte ScrCmd_dowildbattle @ 0xb7 + .4byte ScrCmd_setvaddress @ 0xb8 + .4byte ScrCmd_vgoto @ 0xb9 + .4byte ScrCmd_vcall @ 0xba + .4byte ScrCmd_vgoto_if @ 0xbb + .4byte ScrCmd_vcall_if @ 0xbc + .4byte ScrCmd_vmessage @ 0xbd + .4byte ScrCmd_vbuffermessage @ 0xbe + .4byte ScrCmd_vbufferstring @ 0xbf + .4byte ScrCmd_showcoinsbox @ 0xc0 + .4byte ScrCmd_hidecoinsbox @ 0xc1 + .4byte ScrCmd_updatecoinsbox @ 0xc2 + .4byte ScrCmd_incrementgamestat @ 0xc3 + .4byte ScrCmd_setescapewarp @ 0xc4 + .4byte ScrCmd_waitmoncry @ 0xc5 + .4byte ScrCmd_bufferboxname @ 0xc6 + .4byte ScrCmd_textcolor @ 0xc7 + .4byte ScrCmd_loadhelp @ 0xc8 + .4byte ScrCmd_unloadhelp @ 0xc9 + .4byte ScrCmd_signmsg @ 0xca + .4byte ScrCmd_normalmsg @ 0xcb + .4byte ScrCmd_comparestattoword @ 0xcc + .4byte ScrCmd_setmoneventlegal @ 0xcd + .4byte ScrCmd_checkmoneventlegal @ 0xce + .4byte ScrCmd_trywondercardscript @ 0xcf + .4byte ScrCmd_setworldmapflag @ 0xd0 + .4byte ScrCmd_warpspinenter @ 0xd1 + .4byte ScrCmd_setmonmetlocation @ 0xd2 + .4byte ScrCmd_getbraillestringwidth @ 0xd3 + .4byte ScrCmd_bufferitemnameplural @ 0xd4 gScriptCmdTableEnd:: .4byte ScrCmd_nop diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 4774025e8..dec8d1cb6 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -16,7 +16,7 @@ EventScript_HideMysteryGiftMan:: CableClub_EventScript_MysteryGiftMan:: goto_if_questlog EventScript_ReleaseEnd special QuestLog_CutRecording - execram + trywondercardscript @ Unused EventScript_MysteryGiftThankYou:: @@ -323,7 +323,7 @@ CableClub_EventScript_EnterColosseum:: waitdooranim applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobject OBJ_EVENT_ID_PLAYER, 0 + hideobjectat OBJ_EVENT_ID_PLAYER, 0 closedoor 9, 1 waitdooranim release @@ -432,7 +432,7 @@ CableClub_EventScript_EnterTradeCenter:: waitdooranim applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobject OBJ_EVENT_ID_PLAYER, 0 + hideobjectat OBJ_EVENT_ID_PLAYER, 0 closedoor 9, 1 waitdooranim release @@ -831,12 +831,12 @@ CableClub_EventScript_EnterUnionRoom:: waitdooranim applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobject OBJ_EVENT_ID_PLAYER, 0 + hideobjectat OBJ_EVENT_ID_PLAYER, 0 closedoor 5, 1 waitdooranim special Script_ResetUnionRoomTrade special SetCableClubWarp - warpteleport2 MAP_UNION_ROOM, 255, 7, 11 + warpspinenter MAP_UNION_ROOM, 255, 7, 11 waitstate special UnionRoomSpecial waitstate @@ -1137,7 +1137,7 @@ CableClub_EventScript_EnterWirelessLinkRoom:: waitdooranim applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterLinkRoom waitmovement 0 - hideobject OBJ_EVENT_ID_PLAYER, 0 + hideobjectat OBJ_EVENT_ID_PLAYER, 0 closedoor 9, 1 waitdooranim release @@ -1331,7 +1331,7 @@ CableClub_EventScript_EnterMinigame:: closemessage applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerEnterMinigameRoom waitmovement 0 - hideobject OBJ_EVENT_ID_PLAYER, 0 + hideobjectat OBJ_EVENT_ID_PLAYER, 0 release waitstate end diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index febf7aa28..e227cbf52 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -19,7 +19,7 @@ Route5_PokemonDayCare_EventScript_TryGiveMon:: goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneMonInParty msgbox Route5_PokemonDayCare_Text_WhichMonShouldIRaise fadescreen FADE_TO_BLACK - hidemoneybox 0, 0 + hidemoneybox special ChooseSendDaycareMon waitstate showmoneybox 0, 0, 0 @@ -91,11 +91,11 @@ Route5_PokemonDayCare_EventScript_RetrieveMon:: setvar VAR_0x8004, 0 specialvar VAR_RESULT, TakePokemonFromRoute5Daycare special SubtractMoneyFromVar0x8005 - updatemoneybox 0, 0, 0 + updatemoneybox copyvar VAR_0x8008, VAR_RESULT getpartysize subvar VAR_RESULT, 1 - getpartymonname 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT copyvar VAR_RESULT, VAR_0x8008 msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon textcolor 3 @@ -113,7 +113,7 @@ Route5_PokemonDayCare_EventScript_NoRoomInParty:: end Route5_PokemonDayCare_EventScript_CloseMoneyBox:: - hidemoneybox 0, 0 + hidemoneybox release end diff --git a/data/scripts/field_moves.inc b/data/scripts/field_moves.inc index 74a93e8af..80e8ba366 100644 --- a/data/scripts/field_moves.inc +++ b/data/scripts/field_moves.inc @@ -5,9 +5,9 @@ EventScript_CutTree:: checkpartymove MOVE_CUT compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantCutTree - setfieldeffectarg 0, VAR_RESULT - getpartymonname 0, VAR_RESULT - getmovename 1, MOVE_CUT + setfieldeffectargument 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT + buffermovename STR_VAR_2, MOVE_CUT msgbox Text_CutTreeDown, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_DontCutTree @@ -65,9 +65,9 @@ EventScript_RockSmash:: checkpartymove MOVE_ROCK_SMASH compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantSmashRock - setfieldeffectarg 0, VAR_RESULT - getpartymonname 0, VAR_RESULT - getmovename 1, MOVE_ROCK_SMASH + setfieldeffectargument 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT + buffermovename STR_VAR_2, MOVE_ROCK_SMASH msgbox Text_UseRockSmash, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_DontSmashRock @@ -129,7 +129,7 @@ EventScript_StrengthBoulder:: checkpartymove MOVE_STRENGTH compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantMoveBoulder - setfieldeffectarg 0, VAR_RESULT + setfieldeffectargument 0, VAR_RESULT msgbox Text_UseStrength, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_DontUseStrength @@ -188,8 +188,8 @@ EventScript_Waterfall:: checkpartymove MOVE_WATERFALL compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_WaterCrashingDown - getpartymonname 0, VAR_RESULT - setfieldeffectarg 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT + setfieldeffectargument 0, VAR_RESULT msgbox Text_UseWaterfall, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_EndWaterfall @@ -222,9 +222,9 @@ EventScript_DeepWater:: checkpartymove MOVE_DIVE compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_MayGoUnderwater - getpartymonname 0, VAR_RESULT - setfieldeffectarg 0, VAR_RESULT - setfieldeffectarg 1, 1 + bufferpartymonnick STR_VAR_1, VAR_RESULT + setfieldeffectargument 0, VAR_RESULT + setfieldeffectargument 1, 1 msgbox Text_SeaIsDeepUseDive, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_EndDive @@ -245,9 +245,9 @@ EventScript_TrySurface:: checkpartymove MOVE_DIVE compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantSurface - getpartymonname 0, VAR_RESULT - setfieldeffectarg 0, VAR_RESULT - setfieldeffectarg 1, 1 + bufferpartymonnick STR_VAR_1, VAR_RESULT + setfieldeffectargument 0, VAR_RESULT + setfieldeffectargument 1, 1 msgbox Text_LightFilteringUseDive, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_EndSurface diff --git a/data/scripts/flash.inc b/data/scripts/flash.inc index 38b6db6cf..c30887d30 100644 --- a/data/scripts/flash.inc +++ b/data/scripts/flash.inc @@ -1,4 +1,4 @@ EventScript_FldEffFlash:: animateflash 0 - setflashradius 0 + setflashlevel 0 end diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index c1b5e4bab..711f6a5a3 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -455,7 +455,7 @@ TwoIsland_CapeBrink_House_EventScript_StarterTutor:: faceplayer goto_if_set FLAG_LEARNED_ALL_MOVES_AT_CAPE_BRINK, CapeBrinkTutor_EventScript_TaughtAllMoves goto_if_set FLAG_TEMP_2, CapeBrinkTutor_EventScript_MoveJustTaught - getfirstpartymonname 0 + bufferleadmonspeciesname STR_VAR_1 msgbox Text_UltimateMoveThatMon specialvar VAR_RESULT, CapeBrinkGetMoveToTeachLeadPokemon compare VAR_RESULT, FALSE diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index e4f49c9f6..87eace4e5 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -17,7 +17,7 @@ Std_ObtainItem:: return EventScript_ObtainItemMessage:: - bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 + bufferitemnameplural STR_VAR_2, VAR_0x8000, VAR_0x8001 checkitemtype VAR_0x8000 call EventScript_BufferPocketNameTryFanfare compare VAR_0x8007, TRUE @@ -36,31 +36,31 @@ EventScript_BufferPocketNameTryFanfare:: end EventScript_BufferItemsPocket:: - getstdstring 2, STDSTRING_ITEMS_POCKET + bufferstdstring STR_VAR_3, STDSTRING_ITEMS_POCKET compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferKeyItemsPocket:: - getstdstring 2, STDSTRING_KEY_ITEMS_POCKET + bufferstdstring STR_VAR_3, STDSTRING_KEY_ITEMS_POCKET compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferPokeBallsPocket:: - getstdstring 2, STDSTRING_POKEBALLS_POCKET + bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS_POCKET compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferTMCase:: - getstdstring 2, STDSTRING_TM_CASE + bufferstdstring STR_VAR_3, STDSTRING_TM_CASE compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedTMHM return EventScript_BufferBerryPouch:: - getstdstring 2, STDSTRING_BERRY_POUCH + bufferstdstring STR_VAR_3, STDSTRING_BERRY_POUCH compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return @@ -86,13 +86,13 @@ EventScript_PlayFanfareObtainedTMHM:: return Std_ObtainDecoration:: - adddecor VAR_0x8000 + adddecoration VAR_0x8000 copyvar VAR_0x8007, VAR_RESULT call EventScript_ObtainDecorMessage return EventScript_ObtainDecorMessage:: - getdecorname 1, VAR_0x8000 + bufferdecorationname STR_VAR_2, VAR_0x8000 compare VAR_0x8007, TRUE call_if_eq EventScript_ObtainedDecor compare VAR_0x8007, FALSE @@ -120,7 +120,7 @@ Std_FindItem:: copyvar VAR_0x8005, VAR_0x8001 checkitemspace VAR_0x8000, VAR_0x8001 copyvar VAR_0x8007, VAR_RESULT - getitemname 1, VAR_0x8000 + bufferitemname STR_VAR_2, VAR_0x8000 checkitemtype VAR_0x8000 call EventScript_BufferPocketNameTryFanfare compare VAR_0x8007, TRUE @@ -174,7 +174,7 @@ EventScript_HiddenItemScript:: EventScript_TryPickUpHiddenItem:: additem VAR_0x8005, VAR_0x8006 copyvar VAR_0x8007, VAR_RESULT - getitemname 1, VAR_0x8005 + bufferitemname STR_VAR_2, VAR_0x8005 checkitemtype VAR_0x8005 call EventScript_BufferPocketNameTryFanfare return @@ -196,12 +196,12 @@ EventScript_FoundSingleItem:: return EventScript_FoundCoins:: - getnumberstring 0, VAR_0x8006 + buffernumberstring STR_VAR_1, VAR_0x8006 message Text_FoundXCoins return EventScript_FoundMultipleItems:: - getnumberstring 0, VAR_0x8006 + buffernumberstring STR_VAR_1, VAR_0x8006 message Text_FoundXItems return @@ -219,7 +219,7 @@ EventScript_TryPickUpHiddenCoins:: compare VAR_RESULT, FALSE goto_if_eq EventScript_HiddenCoinsButCaseIsFull addcoins VAR_0x8006 - getstdstring 1, STDSTRING_COINS + bufferstdstring STR_VAR_2, STDSTRING_COINS call EventScript_PlayFanfareObtainedItem call EventScript_FoundCoins waitfanfare @@ -230,8 +230,8 @@ EventScript_TryPickUpHiddenCoins:: end EventScript_HiddenCoinsButCaseIsFull:: - getnumberstring 0, VAR_0x8006 - getstdstring 1, STDSTRING_COINS + buffernumberstring STR_VAR_1, VAR_0x8006 + bufferstdstring STR_VAR_2, STDSTRING_COINS msgbox Text_FoundXCoins msgbox Text_CoinCaseIsFull setvar VAR_RESULT, 0 @@ -239,8 +239,8 @@ EventScript_HiddenCoinsButCaseIsFull:: end EventScript_NoCaseForHiddenCoins:: - getnumberstring 0, VAR_0x8006 - getstdstring 1, STDSTRING_COINS + buffernumberstring STR_VAR_1, VAR_0x8006 + bufferstdstring STR_VAR_2, STDSTRING_COINS msgbox Text_FoundXCoins msgbox Text_NothingToPutThemIn setvar VAR_RESULT, 0 diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc index 76df5f0ed..ae23eace5 100644 --- a/data/scripts/pc_transfer.inc +++ b/data/scripts/pc_transfer.inc @@ -13,8 +13,8 @@ EventScript_NameReceivedBoxMon:: return EventScript_TransferredToPC:: - bufferboxname 0, VAR_PC_BOX_TO_SEND_MON - getspeciesname 1, VAR_TEMP_1 + bufferboxname STR_VAR_1, VAR_PC_BOX_TO_SEND_MON + bufferspeciesname STR_VAR_2, VAR_TEMP_1 call_if_unset FLAG_SYS_NOT_SOMEONES_PC, EventScript_TransferredSomeonesPC call_if_set FLAG_SYS_NOT_SOMEONES_PC, EventScript_TransferredBillsPC return @@ -28,7 +28,7 @@ EventScript_TransferredSomeonesPC:: EventScript_TransferredSomeonesPCBoxFull:: specialvar VAR_RESULT, GetPCBoxToSendMon - bufferboxname 2, VAR_RESULT + bufferboxname STR_VAR_3, VAR_RESULT msgbox Text_MonSentToBoxSomeonesBoxFull return @@ -41,6 +41,6 @@ EventScript_TransferredBillsPC:: EventScript_TransferredBillsPCBoxFull:: specialvar VAR_RESULT, GetPCBoxToSendMon - bufferboxname 2, VAR_RESULT + bufferboxname STR_VAR_3, VAR_RESULT msgbox Text_MonSentToBoxBillsBoxFull return diff --git a/data/scripts/pokedex_rating.inc b/data/scripts/pokedex_rating.inc index 1e537f131..808659b08 100644 --- a/data/scripts/pokedex_rating.inc +++ b/data/scripts/pokedex_rating.inc @@ -43,8 +43,8 @@ PokedexRating_EventScript_Rate:: copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8009, VAR_0x8006 copyvar VAR_0x800A, VAR_RESULT - getnumberstring 0, VAR_0x8008 @ Num Kanto Seen - getnumberstring 1, VAR_0x8009 @ Num Kanto Caught + buffernumberstring STR_VAR_1, VAR_0x8008 @ Num Kanto Seen + buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Kanto Caught msgbox PokedexRating_Text_SeenXOwnedY call_if_unset FLAG_OAKS_RATING_IS_VIA_PC, PokedexRating_EventScript_SetTextColor call PokedexRating_EventScript_ShowRatingMsg @@ -54,8 +54,8 @@ PokedexRating_EventScript_Rate:: specialvar VAR_RESULT, GetPokedexCount copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8009, VAR_0x8006 - getnumberstring 0, VAR_0x8008 @ Num National Seen - getnumberstring 1, VAR_0x8009 @ Num National Caught + buffernumberstring STR_VAR_1, VAR_0x8008 @ Num National Seen + buffernumberstring STR_VAR_2, VAR_0x8009 @ Num National Caught msgbox PokedexRating_Text_NationalDexSeenXOwnedY specialvar VAR_RESULT, HasAllMons compare VAR_RESULT, FALSE diff --git a/data/scripts/seagallop.inc b/data/scripts/seagallop.inc index fc82f71e3..d64ed41e7 100644 --- a/data/scripts/seagallop.inc +++ b/data/scripts/seagallop.inc @@ -90,7 +90,7 @@ EventScript_ChooseDestFromIslandVermilionAllowed:: EventScript_SailToDest:: specialvar VAR_RESULT, GetSeagallopNumber - getnumberstring 0, VAR_RESULT + buffernumberstring STR_VAR_1, VAR_RESULT compare VAR_0x8004, SEAGALLOP_VERMILION_CITY goto_if_eq EventScript_DepartingVermilion compare VAR_0x8004, SEAGALLOP_VERMILION_CITY diff --git a/data/scripts/static_pokemon.inc b/data/scripts/static_pokemon.inc index 38b5d0c07..ea443ea3e 100644 --- a/data/scripts/static_pokemon.inc +++ b/data/scripts/static_pokemon.inc @@ -9,7 +9,7 @@ EventScript_MonFlewAway:: fadescreen FADE_TO_BLACK removeobject VAR_LAST_TALKED fadescreen FADE_FROM_BLACK - getspeciesname 0, VAR_0x8004 + bufferspeciesname STR_VAR_1, VAR_0x8004 msgbox Text_MonFlewAway release end diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc index 13d46e028..43a64b3fe 100644 --- a/data/scripts/surf.inc +++ b/data/scripts/surf.inc @@ -3,8 +3,8 @@ EventScript_UseSurf:: checkpartymove MOVE_SURF compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_UseSurfEnd - getpartymonname 0, VAR_RESULT - setfieldeffectarg 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT + setfieldeffectargument 0, VAR_RESULT lockall msgbox Text_WantToSurf, MSGBOX_YESNO compare VAR_RESULT, NO diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index 657b56b96..ca774d982 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -18,7 +18,7 @@ EventScript_TryDoNormalTrainerBattle:: goto EventScript_DoTrainerBattle EventScript_NoTrainerBattle:: - ontrainerbattleend + gotopostbattlescript EventScript_TryDoDoubleTrainerBattle:: lock @@ -42,15 +42,15 @@ EventScript_NotEnoughMonsForDoubleBattle:: end EventScript_NoDoubleTrainerBattle:: - ontrainerbattleend + gotopostbattlescript EventScript_DoNoIntroTrainerBattle:: applymovement VAR_LAST_TALKED, Movement_RevealTrainer waitmovement 0 special PlayTrainerEncounterMusic goto_if_questlog EventScript_EndQuestLogBattle - battlebegin - ontrainerbattleend + dotrainerbattle + gotopostbattlescript EventScript_TryDoRematchBattle:: call EventScript_RevealTrainer @@ -69,7 +69,7 @@ EventScript_TryDoRematchBattle:: end EventScript_NoRematchBattle:: - ontrainerbattleend + gotopostbattlescript EventScript_TryDoDoubleRematchBattle:: specialvar VAR_RESULT, IsTrainerReadyForRematch @@ -90,7 +90,7 @@ EventScript_TryDoDoubleRematchBattle:: end EventScript_NoDoubleRematchBattle:: - ontrainerbattleend + gotopostbattlescript EventScript_NotEnoughMonsForDoubleRematchBattle:: special ShowTrainerCantBattleSpeech @@ -117,7 +117,7 @@ EventScript_DoTrainerBattle:: waitmessage waitbuttonpress goto_if_questlog EventScript_EndQuestLogBattle - battlebegin + dotrainerbattle specialvar VAR_RESULT, GetTrainerBattleMode compare VAR_RESULT, TRAINER_BATTLE_SINGLE goto_if_eq EventScript_EndTrainerBattle @@ -134,7 +134,7 @@ EventScript_EndTrainerBattle:: end EventScript_EndTrainerBattleContinueScript:: - ontrainerbattleendgoto + gotobeatenscript EventScript_EndQuestLogBattle:: special SetBattledTrainerFlag diff --git a/data/scripts/trainer_card.inc b/data/scripts/trainer_card.inc index 933d7b800..6ba90358b 100644 --- a/data/scripts/trainer_card.inc +++ b/data/scripts/trainer_card.inc @@ -11,7 +11,7 @@ CeladonCity_GameCorner_EventScript_PhotoPrinter:: goto_if_eq CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto playse SE_SHOP removemoney 50, 0 - updatemoneybox 0, 0, 0 + updatemoneybox waitse message CeladonCity_GameCorner_Text_ChoosePrintType waitmessage @@ -51,18 +51,18 @@ CeladonCity_GameCorner_EventScript_PrintPhoto:: delay 60 special UpdateTrainerCardPhotoIcons msgbox CeladonCity_GameCorner_Text_PrintIsReadyCheckTrainerCard - hidemoneybox 0, 0 + hidemoneybox releaseall end CeladonCity_GameCorner_EventScript_DeclinePhoto:: - hidemoneybox 0, 0 + hidemoneybox releaseall end CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto:: msgbox CeladonCity_GameCorner_Text_DontHaveEnoughMoney - hidemoneybox 0, 0 + hidemoneybox releaseall end diff --git a/data/scripts/trainer_tower.inc b/data/scripts/trainer_tower.inc index 70a15b3ec..3c54a90c4 100644 --- a/data/scripts/trainer_tower.inc +++ b/data/scripts/trainer_tower.inc @@ -297,7 +297,7 @@ TrainerTower_Roof_EventScript_ReceivePrize: message Text_ObtainedTheX waitfanfare waitmessage - getstdstring 2, STDSTRING_ITEMS_POCKET + bufferstdstring STR_VAR_3, STDSTRING_ITEMS_POCKET msgbox Text_PutItemAway call EventScript_RestorePrevTextColor goto TrainerTower_Roof_EventScript_CheckFinalTime diff --git a/include/constants/maps.h b/include/constants/maps.h index 395b07f46..57cc1d078 100644 --- a/include/constants/maps.h +++ b/include/constants/maps.h @@ -12,4 +12,8 @@ #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 diff --git a/include/event_object_lock.h b/include/event_object_lock.h index b7beeb070..43ce97173 100644 --- a/include/event_object_lock.h +++ b/include/event_object_lock.h @@ -3,10 +3,10 @@ #include "global.h" -bool8 NativeScript_WaitPlayerStopMoving(void); -void ScriptFreezeObjectEvents(void); -bool8 NativeScript_WaitPlayerAndTargetNPCStopMoving(void); -void LockSelectedObjectEvent(void); +bool8 IsFreezePlayerFinished(void); +void FreezeObjects_WaitForPlayer(void); +bool8 IsFreezeSelectedObjectAndPlayerFinished(void); +void FreezeObjects_WaitForPlayerAndSelected(void); void ClearPlayerHeldMovementAndUnfreezeObjectEvents(void); bool8 walkrun_is_standing_still(void); void UnionRoom_UnlockPlayerAndChatPartner(void); diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 10ee23172..b59fb209b 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -76,7 +76,7 @@ void SetSpritePosToOffsetMapCoords(s16 *, s16 *, s16, s16); void ObjectEventClearHeldMovement(struct ObjectEvent *); void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *); 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 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup); int SpawnSpecialObjectEventParameterized(u8, u8, u8, s16, s16, u8); @@ -88,11 +88,11 @@ void ObjectEventTurn(struct ObjectEvent *, u8); void ObjectEventTurnByLocalIdAndMap(u8, u8, u8, u8); void ObjectEventForceSetHeldMovement(struct ObjectEvent *, 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 SetObjectPositionByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y); -void UnfixObjectPriorityByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup); -void SetObjectPriorityByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority); +void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup); +void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority); void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup); void ShiftObjectEventCoords(struct ObjectEvent *, s16, s16); void TryOverrideObjectEventTemplateCoords(u8, u8, u8); @@ -138,7 +138,7 @@ bool8 UpdateWalkSlowerAnim(struct Sprite *sprite); void SetJumpSpriteData(struct Sprite *, u8, u8, u8); u8 DoJumpSpriteMovement(struct Sprite *); u8 DoJumpSpecialSpriteMovement(struct Sprite *); -void TurnObjectEvent(u8, u8); +void TurnVirtualObject(u8, u8); const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId); u8 GetFirstInactiveObjectEventId(void); u8 GetCollisionFlagsAtCoords(struct ObjectEvent * objectEvent, s16 x, s16 y, u8 direction); diff --git a/include/field_weather.h b/include/field_weather.h index 7bb7b2677..77308d135 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -113,11 +113,11 @@ extern struct Weather *const gWeatherPtr; void FadeScreen(u8 mode, s8 delay); -void SetSav1Weather(u32); +void SetSavedWeather(u32); u8 GetSav1Weather(void); void DoCurrentWeather(void); -void SetSav1WeatherFromCurrMapHeader(void); +void SetSavedWeatherFromCurrMapHeader(void); void SlightlyDarkenPalsInWeather(u16 *, u16 *, u32); void PlayRainStoppingSoundEffect(void); bool8 IsWeatherNotFadingIn(void); diff --git a/include/fieldmap.h b/include/fieldmap.h index 1dcc5d793..91e976294 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -12,6 +12,14 @@ #define MAX_MAP_DATA_SIZE 0x2800 #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 const struct MapLayout Route1_Layout; diff --git a/include/overworld.h b/include/overworld.h index 90db48772..56e656f07 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -60,8 +60,8 @@ extern u8 gLocalLinkPlayerId; void IncrementGameStat(u8 index); -void Overworld_SetMapObjTemplateCoords(u8, s16, s16); -void Overworld_SetObjEventTemplateMovementType(u8, u8); +void SetObjEventTemplateCoords(u8, s16, s16); +void SetObjEventTemplateMovementType(u8, u8); void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); @@ -77,7 +77,7 @@ u8 IsMapTypeOutdoors(u8 mapType); void Overworld_ClearSavedMusic(void); bool32 Overworld_MusicCanOverrideMapMusic(u16 song); -void Overworld_SetFlashLevel(s32 a1); +void SetFlashLevel(s32 a1); u8 Overworld_GetFlashLevel(void); void Overworld_SetSavedMusic(u16); diff --git a/include/script.h b/include/script.h index acb2d55e3..cd3268181 100644 --- a/include/script.h +++ b/include/script.h @@ -61,7 +61,7 @@ bool8 InitRamScript(u8 *script, u16 scriptSize, u8 mapGroup, u8 mapNum, u8 objec const u8 *GetRamScript(u8 objectId, const u8 *script); bool32 ValidateRamScript(void); void MEventSetRamScript(u8 * script, u16 scriptSize); -u8 * sub_8069E48(void); +u8 * GetSavedRamScriptIfValid(void); void RegisterQuestLogInput(u8 var); void ClearMsgBoxCancelableState(void); void SetQuestLogInputIsDpadFlag(void); diff --git a/include/script_menu.h b/include/script_menu.h index 006ce5578..3b62f459e 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -13,7 +13,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3); bool8 CreatePCMenu(void); void ScriptMenu_DisplayPCStartupPrompt(void); -bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); +bool8 (*ScriptMenu_HidePokemonPic(void))(void); void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void); void PicboxCancel(void); diff --git a/include/text.h b/include/text.h index d0c7f8f54..a20da3b10 100644 --- a/include/text.h +++ b/include/text.h @@ -169,7 +169,7 @@ enum { FONT_3, FONT_4, FONT_5, - FONT_6, + FONT_BRAILLE, }; enum diff --git a/src/event_object_lock.c b/src/event_object_lock.c index 073e243a1..e9adbb680 100644 --- a/src/event_object_lock.c +++ b/src/event_object_lock.c @@ -23,7 +23,7 @@ void Task_WaitPlayerStopMoving(u8 taskId) } } -bool8 NativeScript_WaitPlayerStopMoving(void) +bool8 IsFreezePlayerFinished(void) { if (FuncIsActiveTask(Task_WaitPlayerStopMoving)) return FALSE; @@ -34,7 +34,7 @@ bool8 NativeScript_WaitPlayerStopMoving(void) } } -void ScriptFreezeObjectEvents(void) +void FreezeObjects_WaitForPlayer(void) { FreezeObjectEvents(); CreateTask(Task_WaitPlayerStopMoving, 80); @@ -60,7 +60,7 @@ void Task_WaitPlayerAndTargetNPCStopMoving(u8 taskId) DestroyTask(taskId); } -bool8 NativeScript_WaitPlayerAndTargetNPCStopMoving(void) +bool8 IsFreezeSelectedObjectAndPlayerFinished(void) { if (FuncIsActiveTask(Task_WaitPlayerAndTargetNPCStopMoving)) return FALSE; @@ -71,7 +71,7 @@ bool8 NativeScript_WaitPlayerAndTargetNPCStopMoving(void) } } -void LockSelectedObjectEvent(void) +void FreezeObjects_WaitForPlayerAndSelected(void) { u8 taskId; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 919ca99c2..acf21293b 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1715,7 +1715,7 @@ u8 AddPseudoObjectEvent(u16 graphicsId, SpriteCallback callback, s16 x, s16 y, u 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; 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; @@ -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; 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; struct ObjectEvent *objectEvent; @@ -9252,7 +9252,7 @@ static int GetObjectEventSpriteId(u8 objectEventId) return MAX_SPRITES; } -void TurnObjectEvent(u8 objectEventId, u8 direction) +void TurnVirtualObject(u8 objectEventId, u8 direction) { u8 animNum; u8 spriteId = GetObjectEventSpriteId(objectEventId); diff --git a/src/field_specials.c b/src/field_specials.c index 0f8093e8e..731807d2e 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -2419,7 +2419,7 @@ static void MoveDeoxysObject(u8 num) else gFieldEffectArguments[5] = 5; 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) diff --git a/src/field_weather_util.c b/src/field_weather_util.c index 459071736..abf3c9fec 100644 --- a/src/field_weather_util.c +++ b/src/field_weather_util.c @@ -6,7 +6,7 @@ static u8 TranslateWeatherNum(u8 weather); static void UpdateRainCounter(u8 newWeather, u8 oldWeather); -void SetSav1Weather(u32 weather) +void SetSavedWeather(u32 weather) { u8 oldWeather = gSaveBlock1Ptr->weather; gSaveBlock1Ptr->weather = TranslateWeatherNum(weather); @@ -18,7 +18,7 @@ u8 GetSav1Weather(void) return gSaveBlock1Ptr->weather; } -void SetSav1WeatherFromCurrMapHeader(void) +void SetSavedWeatherFromCurrMapHeader(void) { u8 oldWeather = gSaveBlock1Ptr->weather; gSaveBlock1Ptr->weather = TranslateWeatherNum(gMapHeader.weather); @@ -27,13 +27,13 @@ void SetSav1WeatherFromCurrMapHeader(void) void SetWeather(u32 weather) { - SetSav1Weather(weather); + SetSavedWeather(weather); SetNextWeather(GetSav1Weather()); } void SetWeather_Unused(u32 weather) { - SetSav1Weather(weather); + SetSavedWeather(weather); SetCurrentAndNextWeather(GetSav1Weather()); } diff --git a/src/mevent_server.c b/src/mevent_server.c index b304fa09b..7d4929195 100644 --- a/src/mevent_server.c +++ b/src/mevent_server.c @@ -251,7 +251,7 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr) break; case 28: AGB_ASSERT_EX(cmd->flag == FALSE && cmd->parameter == NULL, ABSPATH("mevent_server.c"), 517); - svr->sendBuffer1 = sub_8069E48(); + svr->sendBuffer1 = GetSavedRamScriptIfValid(); break; case 29: mevent_srv_common_init_send(svr, 0x1b, cmd->parameter, cmd->flag); diff --git a/src/overworld.c b/src/overworld.c index e010de6b1..6c1420418 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -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; 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; @@ -756,7 +756,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum) ResetCyclingRoadChallengeData(); RestartWildEncounterImmunitySteps(); MapResetTrainerRematches(mapGroup, mapNum); - SetSav1WeatherFromCurrMapHeader(); + SetSavedWeatherFromCurrMapHeader(); ChooseAmbientCrySpecies(); SetDefaultFlashLevel(); Overworld_ClearSavedMusic(); @@ -791,7 +791,7 @@ static void LoadMapFromWarp(bool32 unused) ResetCyclingRoadChallengeData(); RestartWildEncounterImmunitySteps(); MapResetTrainerRematches(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum); - SetSav1WeatherFromCurrMapHeader(); + SetSavedWeatherFromCurrMapHeader(); ChooseAmbientCrySpecies(); if (isOutdoors) FlagClear(FLAG_SYS_FLASH_ACTIVE); @@ -813,7 +813,7 @@ static void sub_80559A8(void) LoadObjEventTemplatesFromHeader(); isOutdoors = IsMapTypeOutdoors(gMapHeader.mapType); TrySetMapSaveWarpStatus(); - SetSav1WeatherFromCurrMapHeader(); + SetSavedWeatherFromCurrMapHeader(); ChooseAmbientCrySpecies(); SetDefaultFlashLevel(); sub_8110920(); @@ -956,7 +956,7 @@ static void SetDefaultFlashLevel(void) gSaveBlock1Ptr->flashLevel = gMaxFlashLevel; } -void Overworld_SetFlashLevel(s32 flashLevel) +void SetFlashLevel(s32 flashLevel) { if (flashLevel < 0 || flashLevel > gMaxFlashLevel) flashLevel = 0; diff --git a/src/rfu_union_tool.c b/src/rfu_union_tool.c index 21d095a9e..d6c1c411e 100644 --- a/src/rfu_union_tool.c +++ b/src/rfu_union_tool.c @@ -439,7 +439,7 @@ void CreateGroupMemberObjectsInvisible(u8 * sprite_ids, s32 group) for (i = 0; i < 5; 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); } } @@ -653,7 +653,7 @@ bool32 RfuUnionTool_GetGroupAndMemberInFrontOfPlayer(struct UnkStruct_Main0 *mai 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) diff --git a/src/scrcmd.c b/src/scrcmd.c index 823593623..7bc654d13 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -9,6 +9,7 @@ #include "field_screen_effect.h" #include "quest_log.h" #include "map_preview_screen.h" +#include "fieldmap.h" #include "field_weather.h" #include "field_tasks.h" #include "field_fadetransition.h" @@ -34,6 +35,7 @@ #include "fieldmap.h" #include "field_door.h" #include "constants/event_objects.h" +#include "constants/maps.h" #include "constants/sound.h" extern u16 (*const gSpecials[])(void); @@ -44,12 +46,12 @@ extern const u8 *const gStdScriptsEnd[]; static bool8 ScriptContext_NextCommandEndsScript(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 u16 sPauseCounter = 0; static EWRAM_DATA u16 sMovingNpcId = 0; -static EWRAM_DATA u16 sMovingNpcMapBank = 0; -static EWRAM_DATA u16 sMovingNpcMapId = 0; +static EWRAM_DATA u16 sMovingNpcMapGroup = 0; +static EWRAM_DATA u16 sMovingNpcMapNum = 0; static EWRAM_DATA u16 sFieldEffectScriptId = 0; struct ScriptContext * sQuestLogScriptContextPtr; @@ -95,7 +97,7 @@ bool8 ScrCmd_gotonative(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) (*specialPtr)(); else @@ -106,7 +108,7 @@ bool8 ScrCmd_special(struct ScriptContext * ctx) bool8 ScrCmd_specialvar(struct ScriptContext * ctx) { u16 * varPtr = GetVarPointer(ScriptReadHalfword(ctx)); - u16 (*const *specialPtr)(void) = gSpecials + ScriptReadHalfword(ctx); + u16 (*const *specialPtr)(void) = &gSpecials[ScriptReadHalfword(ctx)]; if (specialPtr < gSpecialsEnd) *varPtr = (*specialPtr)(); else @@ -170,28 +172,28 @@ bool8 ScrCmd_setvaddress(struct ScriptContext * ctx) u32 addr1 = (u32)ctx->scriptPtr - 1; u32 addr2 = ScriptReadWord(ctx); - gVScriptOffset = addr2 - addr1; + sAddressOffset = addr2 - addr1; return FALSE; } bool8 ScrCmd_vgoto(struct ScriptContext * ctx) { const u8 * scrptr = (const u8 *)ScriptReadWord(ctx); - ScriptJump(ctx, scrptr - gVScriptOffset); + ScriptJump(ctx, scrptr - sAddressOffset); return FALSE; } bool8 ScrCmd_vcall(struct ScriptContext * ctx) { const u8 * scrptr = (const u8 *)ScriptReadWord(ctx); - ScriptCall(ctx, scrptr - gVScriptOffset); + ScriptCall(ctx, scrptr - sAddressOffset); return FALSE; } bool8 ScrCmd_vgoto_if(struct ScriptContext * 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) ScriptJump(ctx, scrptr); return FALSE; @@ -200,7 +202,7 @@ bool8 ScrCmd_vgoto_if(struct ScriptContext * ctx) bool8 ScrCmd_vcall_if(struct ScriptContext * 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) ScriptCall(ctx, scrptr); return FALSE; @@ -209,7 +211,7 @@ bool8 ScrCmd_vcall_if(struct ScriptContext * ctx) bool8 ScrCmd_gotostd(struct ScriptContext * ctx) { u8 stdIdx = ScriptReadByte(ctx); - const u8 *const * script = gStdScripts + stdIdx; + const u8 *const * script = &gStdScripts[stdIdx]; if (script < gStdScriptsEnd) ScriptJump(ctx, *script); return FALSE; @@ -218,7 +220,7 @@ bool8 ScrCmd_gotostd(struct ScriptContext * ctx) bool8 ScrCmd_callstd(struct ScriptContext * ctx) { u8 stdIdx = ScriptReadByte(ctx); - const u8 *const * script = gStdScripts + stdIdx; + const u8 *const * script = &gStdScripts[stdIdx]; if (script < gStdScriptsEnd) ScriptCall(ctx, *script); return FALSE; @@ -250,13 +252,13 @@ bool8 ScrCmd_callstd_if(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_gotoram(struct ScriptContext * ctx) +bool8 ScrCmd_returnram(struct ScriptContext * ctx) { ScriptJump(ctx, gRAMScriptPtr); return FALSE; } -bool8 ScrCmd_killscript(struct ScriptContext * ctx) +bool8 ScrCmd_endram(struct ScriptContext * ctx) { ClearRamScript(); StopScript(ctx); @@ -269,9 +271,9 @@ bool8 ScrCmd_setmysteryeventstatus(struct ScriptContext * ctx) 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) { gRAMScriptPtr = ctx->scriptPtr; @@ -282,19 +284,19 @@ bool8 ScrCmd_execram(struct ScriptContext * ctx) bool8 ScrCmd_loadword(struct ScriptContext * ctx) { - u8 which = ScriptReadByte(ctx); - ctx->data[which] = ScriptReadWord(ctx); + u8 index = ScriptReadByte(ctx); + ctx->data[index] = ScriptReadWord(ctx); return FALSE; } -bool8 ScrCmd_loadbytefromaddr(struct ScriptContext * ctx) +bool8 ScrCmd_loadbytefromptr(struct ScriptContext * ctx) { - u8 which = ScriptReadByte(ctx); - ctx->data[which] = *(const u8 *)ScriptReadWord(ctx); + u8 index = ScriptReadByte(ctx); + ctx->data[index] = *(const u8 *)ScriptReadWord(ctx); return FALSE; } -bool8 ScrCmd_writebytetoaddr(struct ScriptContext * ctx) +bool8 ScrCmd_setptr(struct ScriptContext * ctx) { u8 value = ScriptReadByte(ctx); *(u8 *)ScriptReadWord(ctx) = value; @@ -303,23 +305,23 @@ bool8 ScrCmd_writebytetoaddr(struct ScriptContext * ctx) bool8 ScrCmd_loadbyte(struct ScriptContext * ctx) { - u8 which = ScriptReadByte(ctx); - ctx->data[which] = ScriptReadByte(ctx); + u8 index = ScriptReadByte(ctx); + ctx->data[index] = ScriptReadByte(ctx); return FALSE; } bool8 ScrCmd_setptrbyte(struct ScriptContext * ctx) { - u8 which = ScriptReadByte(ctx); - *(u8 *)ScriptReadWord(ctx) = ctx->data[which]; + u8 index = ScriptReadByte(ctx); + *(u8 *)ScriptReadWord(ctx) = ctx->data[index]; return FALSE; } bool8 ScrCmd_copylocal(struct ScriptContext * ctx) { - u8 whichDst = ScriptReadByte(ctx); - u8 whichSrc = ScriptReadByte(ctx); - ctx->data[whichDst] = ctx->data[whichSrc]; + u8 destIndex = ScriptReadByte(ctx); + u8 srcIndex = ScriptReadByte(ctx); + ctx->data[destIndex] = ctx->data[srcIndex]; return FALSE; } @@ -352,69 +354,67 @@ bool8 ScrCmd_setorcopyvar(struct ScriptContext * ctx) return FALSE; } -u8 compare_012(u16 left, u16 right) +static u8 Compare(u16 a, u16 b) { - if (left < right) + if (a < b) return 0; - else if (left == right) + else if (a == b) return 1; else return 2; } -// comparelocaltolocal bool8 ScrCmd_compare_local_to_local(struct ScriptContext * ctx) { const u8 value1 = ctx->data[ScriptReadByte(ctx)]; const u8 value2 = ctx->data[ScriptReadByte(ctx)]; - ctx->comparisonResult = compare_012(value1, value2); + ctx->comparisonResult = Compare(value1, value2); return FALSE; } -// comparelocaltoimm bool8 ScrCmd_compare_local_to_value(struct ScriptContext * ctx) { const u8 value1 = ctx->data[ScriptReadByte(ctx)]; const u8 value2 = ScriptReadByte(ctx); - ctx->comparisonResult = compare_012(value1, value2); + ctx->comparisonResult = Compare(value1, value2); 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 value2 = *(const u8 *)ScriptReadWord(ctx); - ctx->comparisonResult = compare_012(value1, value2); + ctx->comparisonResult = Compare(value1, value2); 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 value2 = ctx->data[ScriptReadByte(ctx)]; - ctx->comparisonResult = compare_012(value1, value2); + ctx->comparisonResult = Compare(value1, value2); 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 value2 = ScriptReadByte(ctx); - ctx->comparisonResult = compare_012(value1, value2); + ctx->comparisonResult = Compare(value1, value2); 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 value2 = *(const u8 *)ScriptReadWord(ctx); - ctx->comparisonResult = compare_012(value1, value2); + ctx->comparisonResult = Compare(value1, value2); return FALSE; } @@ -423,7 +423,7 @@ bool8 ScrCmd_compare_var_to_value(struct ScriptContext * ctx) const u16 value1 = *GetVarPointer(ScriptReadHalfword(ctx)); const u16 value2 = ScriptReadHalfword(ctx); - ctx->comparisonResult = compare_012(value1, value2); + ctx->comparisonResult = Compare(value1, value2); return FALSE; } @@ -432,10 +432,11 @@ bool8 ScrCmd_compare_var_to_var(struct ScriptContext * ctx) const u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx)); const u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx)); - ctx->comparisonResult = compare_012(*ptr1, *ptr2); + ctx->comparisonResult = Compare(*ptr1, *ptr2); return FALSE; } +// Note: addvar doesn't support adding from a variable in vanilla. bool8 ScrCmd_addvar(struct ScriptContext * ctx) { u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx)); @@ -521,7 +522,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)); @@ -529,7 +530,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)); @@ -607,11 +608,9 @@ bool8 ScrCmd_animateflash(struct ScriptContext * ctx) return TRUE; } -bool8 ScrCmd_setflashradius(struct ScriptContext * ctx) +bool8 ScrCmd_setflashlevel(struct ScriptContext * ctx) { - u16 flashLevel = VarGet(ScriptReadHalfword(ctx)); - - Overworld_SetFlashLevel(flashLevel); + SetFlashLevel(VarGet(ScriptReadHalfword(ctx))); return FALSE; } @@ -642,9 +641,7 @@ bool8 ScrCmd_fadescreenspeed(struct ScriptContext * ctx) static bool8 RunPauseTimer(void) { - sPauseCounter--; - - if (sPauseCounter == 0) + if (--sPauseCounter == 0) return TRUE; else return FALSE; @@ -666,7 +663,7 @@ bool8 ScrCmd_initclock(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_dodailyevents(struct ScriptContext * ctx) +bool8 ScrCmd_dotimebasedevents(struct ScriptContext * ctx) { // DoTimeBasedEvents(); return FALSE; @@ -688,13 +685,13 @@ bool8 ScrCmd_setweather(struct ScriptContext * ctx) { u16 weather = VarGet(ScriptReadHalfword(ctx)); - SetSav1Weather(weather); + SetSavedWeather(weather); return FALSE; } bool8 ScrCmd_resetweather(struct ScriptContext * ctx) { - SetSav1WeatherFromCurrMapHeader(); + SetSavedWeatherFromCurrMapHeader(); return FALSE; } @@ -768,10 +765,10 @@ bool8 ScrCmd_warphole(struct ScriptContext * ctx) u16 y; PlayerGetDestCoords(&x, &y); - if (mapGroup == 0xFF && mapNum == 0xFF) - SetWarpDestinationToFixedHoleWarp(x - 7, y - 7); + if (mapGroup == MAP_GROUP(UNDEFINED) && mapNum == MAP_NUM(UNDEFINED)) + SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET); else - SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7); + SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, x - MAP_OFFSET, y - MAP_OFFSET); DoFallWarp(); ResetInitialPlayerAvatarState(); return TRUE; @@ -791,7 +788,7 @@ bool8 ScrCmd_warpteleport(struct ScriptContext * ctx) return TRUE; } -bool8 ScrCmd_warpteleport2(struct ScriptContext * ctx) +bool8 ScrCmd_warpspinenter(struct ScriptContext * ctx) { u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); @@ -922,11 +919,11 @@ bool8 ScrCmd_waitfanfare(struct ScriptContext * ctx) bool8 ScrCmd_playbgm(struct ScriptContext * ctx) { u16 songId = ScriptReadHalfword(ctx); - bool8 val = ScriptReadByte(ctx); + bool8 save = ScriptReadByte(ctx); if (QL_IS_PLAYBACK_STATE) return FALSE; - if (val == TRUE) + if (save == TRUE) Overworld_SetSavedMusic(songId); PlayNewMapMusic(songId); return FALSE; @@ -992,7 +989,7 @@ bool8 ScrCmd_applymovement(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_applymovement_at(struct ScriptContext * ctx) +bool8 ScrCmd_applymovementat(struct ScriptContext * ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); const void *movementScript = (const void *)ScriptReadWord(ctx); @@ -1006,7 +1003,7 @@ bool8 ScrCmd_applymovement_at(struct ScriptContext * ctx) static bool8 WaitForMovementFinish(void) { - return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapId, sMovingNpcMapBank); + return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapNum, sMovingNpcMapGroup); } bool8 ScrCmd_waitmovement(struct ScriptContext * ctx) @@ -1015,13 +1012,13 @@ bool8 ScrCmd_waitmovement(struct ScriptContext * ctx) if (localId != 0) sMovingNpcId = localId; - sMovingNpcMapBank = gSaveBlock1Ptr->location.mapGroup; - sMovingNpcMapId = gSaveBlock1Ptr->location.mapNum; + sMovingNpcMapGroup = gSaveBlock1Ptr->location.mapGroup; + sMovingNpcMapNum = gSaveBlock1Ptr->location.mapNum; SetupNativeScript(ctx, WaitForMovementFinish); return TRUE; } -bool8 ScrCmd_waitmovement_at(struct ScriptContext * ctx) +bool8 ScrCmd_waitmovementat(struct ScriptContext * ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapBank; @@ -1031,8 +1028,8 @@ bool8 ScrCmd_waitmovement_at(struct ScriptContext * ctx) sMovingNpcId = localId; mapBank = ScriptReadByte(ctx); mapId = ScriptReadByte(ctx); - sMovingNpcMapBank = mapBank; - sMovingNpcMapId = mapId; + sMovingNpcMapGroup = mapBank; + sMovingNpcMapNum = mapId; SetupNativeScript(ctx, WaitForMovementFinish); return TRUE; } @@ -1045,7 +1042,7 @@ bool8 ScrCmd_removeobject(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_removeobject_at(struct ScriptContext * ctx) +bool8 ScrCmd_removeobjectat(struct ScriptContext * ctx) { u16 objectId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); @@ -1063,7 +1060,7 @@ bool8 ScrCmd_addobject(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_addobject_at(struct ScriptContext * ctx) +bool8 ScrCmd_addobjectat(struct ScriptContext * ctx) { u16 objectId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); @@ -1089,11 +1086,11 @@ bool8 ScrCmd_setobjectxyperm(struct ScriptContext * ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - Overworld_SetMapObjTemplateCoords(localId, x, y); + SetObjEventTemplateCoords(localId, x, y); return FALSE; } -bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext * ctx) +bool8 ScrCmd_copyobjectxytoperm(struct ScriptContext * ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); @@ -1101,44 +1098,44 @@ bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_showobject_at(struct ScriptContext * ctx) +bool8 ScrCmd_showobjectat(struct ScriptContext * ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); - ShowOrHideObjectByLocalIdAndMap(localId, mapNum, mapGroup, 0); + SetObjectInvisibility(localId, mapNum, mapGroup, FALSE); return FALSE; } -bool8 ScrCmd_hideobject_at(struct ScriptContext * ctx) +bool8 ScrCmd_hideobjectat(struct ScriptContext * ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); - ShowOrHideObjectByLocalIdAndMap(localId, mapNum, mapGroup, 1); + SetObjectInvisibility(localId, mapNum, mapGroup, TRUE); return FALSE; } -bool8 ScrCmd_setobjectpriority(struct ScriptContext * ctx) +bool8 ScrCmd_setobjectsubpriority(struct ScriptContext * ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); u8 priority = ScriptReadByte(ctx); - SetObjectPriorityByLocalIdAndMap(localId, mapNum, mapGroup, priority + 83); + SetObjectSubpriority(localId, mapNum, mapGroup, priority + 83); return FALSE; } -bool8 ScrCmd_resetobjectpriority(struct ScriptContext * ctx) +bool8 ScrCmd_resetobjectsubpriority(struct ScriptContext * ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); - UnfixObjectPriorityByLocalIdAndMap(localId, mapNum, mapGroup); + ResetObjectSubpriority(localId, mapNum, mapGroup); return FALSE; } @@ -1166,32 +1163,34 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext * ctx) u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 movementType = ScriptReadByte(ctx); - Overworld_SetObjEventTemplateMovementType(localId, movementType); + SetObjEventTemplateMovementType(localId, movementType); return FALSE; } bool8 ScrCmd_createvobject(struct ScriptContext * ctx) { u8 graphicsId = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); + u8 virtualObjId = ScriptReadByte(ctx); u16 x = VarGet(ScriptReadHalfword(ctx)); u32 y = VarGet(ScriptReadHalfword(ctx)); u8 elevation = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx); - sprite_new(graphicsId, v2, x, y, elevation, direction); + CreateVirtualObject(graphicsId, virtualObjId, x, y, elevation, direction); return FALSE; } bool8 ScrCmd_turnvobject(struct ScriptContext * ctx) { - u8 v1 = ScriptReadByte(ctx); + u8 virtualObjId = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx); - TurnObjectEvent(v1, direction); + TurnVirtualObject(virtualObjId, direction); 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) { if (IsUpdateLinkStateCBActive()) @@ -1200,8 +1199,8 @@ bool8 ScrCmd_lockall(struct ScriptContext * ctx) } else { - ScriptFreezeObjectEvents(); - SetupNativeScript(ctx, NativeScript_WaitPlayerStopMoving); + FreezeObjects_WaitForPlayer(); + SetupNativeScript(ctx, IsFreezePlayerFinished); return TRUE; } } @@ -1216,13 +1215,13 @@ bool8 ScrCmd_lock(struct ScriptContext * ctx) { if (gObjectEvents[gSelectedObjectEvent].active) { - LockSelectedObjectEvent(); - SetupNativeScript(ctx, NativeScript_WaitPlayerAndTargetNPCStopMoving); + FreezeObjects_WaitForPlayerAndSelected(); + SetupNativeScript(ctx, IsFreezeSelectedObjectAndPlayerFinished); } else { - ScriptFreezeObjectEvents(); - SetupNativeScript(ctx, NativeScript_WaitPlayerStopMoving); + FreezeObjects_WaitForPlayer(); + SetupNativeScript(ctx, IsFreezePlayerFinished); } return TRUE; } @@ -1429,7 +1428,7 @@ bool8 ScrCmd_multichoice(struct ScriptContext * ctx) u8 left = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx); - u8 ignoreBPress = ScriptReadByte(ctx); + bool8 ignoreBPress = ScriptReadByte(ctx); if (ScriptMenu_Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE) { @@ -1448,7 +1447,7 @@ bool8 ScrCmd_multichoicedefault(struct ScriptContext * ctx) u8 top = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx); u8 defaultChoice = ScriptReadByte(ctx); - u8 ignoreBPress = ScriptReadByte(ctx); + bool8 ignoreBPress = ScriptReadByte(ctx); if (ScriptMenu_MultichoiceWithDefault(left, top, multichoiceId, ignoreBPress, defaultChoice) == TRUE) { @@ -1478,7 +1477,7 @@ bool8 ScrCmd_multichoicegrid(struct ScriptContext * ctx) u8 top = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx); u8 numColumns = ScriptReadByte(ctx); - u8 ignoreBPress = ScriptReadByte(ctx); + bool8 ignoreBPress = ScriptReadByte(ctx); if (ScriptMenu_MultichoiceGrid(left, top, multichoiceId, ignoreBPress, numColumns) == TRUE) { @@ -1498,7 +1497,7 @@ bool8 ScrCmd_erasebox(struct ScriptContext * ctx) u8 right = ScriptReadByte(ctx); u8 bottom = ScriptReadByte(ctx); - // MenuZeroFillWindowRect(left, top, right, bottom); + // Menu_EraseWindowRect(left, top, right, bottom); return FALSE; } @@ -1507,7 +1506,7 @@ bool8 ScrCmd_drawboxtext(struct ScriptContext * ctx) // u8 left = ScriptReadByte(ctx); // u8 top = ScriptReadByte(ctx); // u8 multichoiceId = ScriptReadByte(ctx); -// u8 ignoreBPress = ScriptReadByte(ctx); +// bool8 ignoreBPress = ScriptReadByte(ctx); /*if (Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE) { @@ -1530,7 +1529,9 @@ bool8 ScrCmd_showmonpic(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) return FALSE; @@ -1538,18 +1539,18 @@ bool8 ScrCmd_hidemonpic(struct ScriptContext * ctx) return TRUE; } -bool8 ScrCmd_showcontestwinner(struct ScriptContext * ctx) +bool8 ScrCmd_showcontestpainting(struct ScriptContext * ctx) { - u8 v1 = ScriptReadByte(ctx); - + u8 contestWinnerId = ScriptReadByte(ctx); /* - if (v1) - sub_812FDA8(v1); - ShowContestWinner(); - ScriptContext1_Stop(); - return TRUE; - */ + // Artist's painting is temporary and already has its data loaded + if (contestWinnerId != CONTEST_WINNER_ARTIST) + SetContestWinnerForPainting(contestWinnerId); + ShowContestPainting(); + ScriptContext1_Stop() + return TRUE; + */ return FALSE; } @@ -1561,7 +1562,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext * ctx) LoadStdWindowFrameGfx(); DrawDialogueFrame(0, 1); - AddTextPrinterParameterized(0, FONT_6, ptr, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_BRAILLE, ptr, 0, 1, 0, NULL); return FALSE; } @@ -1571,15 +1572,15 @@ bool8 ScrCmd_getbraillestringwidth(struct ScriptContext * ctx) if (ptr == NULL) ptr = (u8 *)ctx->data[0]; - gSpecialVar_0x8004 = GetStringWidth(FONT_6, ptr, -1); + gSpecialVar_0x8004 = GetStringWidth(FONT_BRAILLE, ptr, -1); return FALSE; } bool8 ScrCmd_vmessage(struct ScriptContext * ctx) { - u32 v1 = ScriptReadWord(ctx); + u32 msg = ScriptReadWord(ctx); - ShowFieldMessage((u8 *)(v1 - gVScriptOffset)); + ShowFieldMessage((u8 *)(msg - sAddressOffset)); return FALSE; } @@ -1629,8 +1630,8 @@ bool8 ScrCmd_bufferitemname(struct ScriptContext * ctx) return FALSE; } -const u8 gUnknown_83A72A0[] = _("S"); -const u8 gUnknown_83A72A2[] = _("IES"); +static const u8 sText_S[] = _("S"); +static const u8 sText_IES[] = _("IES"); bool8 ScrCmd_bufferitemnameplural(struct ScriptContext * ctx) { @@ -1640,15 +1641,15 @@ bool8 ScrCmd_bufferitemnameplural(struct ScriptContext * ctx) CopyItemName(itemId, sScriptStringVars[stringVarIndex]); if (itemId == ITEM_POKE_BALL && quantity >= 2) - StringAppend(sScriptStringVars[stringVarIndex], gUnknown_83A72A0); - else if (itemId >= ITEM_CHERI_BERRY && itemId < ITEM_ENIGMA_BERRY && quantity >= 2) + StringAppend(sScriptStringVars[stringVarIndex], sText_S); + else if (itemId >= FIRST_BERRY_INDEX && itemId < LAST_BERRY_INDEX && quantity >= 2) { u16 strlength = StringLength(sScriptStringVars[stringVarIndex]); if (strlength != 0) { u8 * endptr = sScriptStringVars[stringVarIndex] + strlength; 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) { u8 stringVarIndex = ScriptReadByte(ctx); - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u8 v2 = CountDigits(v1); + u16 num = VarGet(ScriptReadHalfword(ctx)); + u8 numDigits = CountDigits(num); - ConvertIntToDecimalStringN(sScriptStringVars[stringVarIndex], v1, 0, v2); + ConvertIntToDecimalStringN(sScriptStringVars[stringVarIndex], num, STR_CONV_MODE_LEFT_ALIGN, numDigits); return FALSE; } @@ -1692,17 +1693,6 @@ bool8 ScrCmd_bufferstdstring(struct ScriptContext * ctx) 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) { u8 stringVarIndex = ScriptReadByte(ctx); @@ -1712,9 +1702,9 @@ bool8 ScrCmd_bufferstring(struct ScriptContext * ctx) 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); return FALSE; @@ -1725,7 +1715,7 @@ bool8 ScrCmd_vbufferstring(struct ScriptContext * ctx) u8 stringVarIndex = ScriptReadByte(ctx); u32 addr = ScriptReadWord(ctx); - const u8 *src = (u8 *)(addr - gVScriptOffset); + const u8 *src = (u8 *)(addr - sAddressOffset); u8 *dest = sScriptStringVars[stringVarIndex]; StringCopy(dest, src); return FALSE; @@ -1964,6 +1954,7 @@ bool8 ScrCmd_pokemartdecoration(struct ScriptContext * ctx) return TRUE; } +// Changes clerk dialogue slightly from above. See MART_TYPE_DECOR2 bool8 ScrCmd_pokemartdecoration2(struct ScriptContext * ctx) { const void *ptr = (void *)ScriptReadWord(ctx); @@ -1989,13 +1980,13 @@ bool8 ScrCmd_setberrytree(struct ScriptContext * ctx) // u8 growthStage = ScriptReadByte(ctx); // // if (berry == 0) -// PlantBerryTree(treeId, 0, growthStage, FALSE); +// PlantBerryTree(treeId, berry, growthStage, FALSE); // else // PlantBerryTree(treeId, berry, growthStage, FALSE); return FALSE; } -bool8 ScrCmd_getpricereduction(struct ScriptContext * ctx) +bool8 ScrCmd_getpokenewsactive(struct ScriptContext * ctx) { // u16 value = VarGet(ScriptReadHalfword(ctx)); // @@ -2005,7 +1996,7 @@ bool8 ScrCmd_getpricereduction(struct ScriptContext * ctx) bool8 ScrCmd_choosecontestmon(struct ScriptContext * ctx) { -// sub_81B9404(); +// ChooseContestMon(); ScriptContext1_Stop(); return TRUE; } @@ -2013,7 +2004,7 @@ bool8 ScrCmd_choosecontestmon(struct ScriptContext * ctx) bool8 ScrCmd_startcontest(struct ScriptContext * ctx) { -// sub_80F840C(); +// StartContest(); // ScriptContext1_Stop(); // return TRUE; return FALSE; @@ -2021,7 +2012,7 @@ bool8 ScrCmd_startcontest(struct ScriptContext * ctx) bool8 ScrCmd_showcontestresults(struct ScriptContext * ctx) { -// sub_80F8484(); +// ShowContestResults(); // ScriptContext1_Stop(); // return TRUE; return FALSE; @@ -2029,7 +2020,7 @@ bool8 ScrCmd_showcontestresults(struct ScriptContext * ctx) bool8 ScrCmd_contestlinktransfer(struct ScriptContext * ctx) { -// sub_80F84C4(gSpecialVar_ContestCategory); +// ContestLinkTransfer(gSpecialVar_ContestCategory); // ScriptContext1_Stop(); // return TRUE; return FALSE; @@ -2044,7 +2035,7 @@ bool8 ScrCmd_dofieldeffect(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_setfieldeffectarg(struct ScriptContext * ctx) +bool8 ScrCmd_setfieldeffectargument(struct ScriptContext * ctx) { u8 argNum = ScriptReadByte(ctx); @@ -2101,11 +2092,11 @@ bool8 ScrCmd_setmetatile(struct ScriptContext * ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); u16 tileId = VarGet(ScriptReadHalfword(ctx)); - u16 v8 = VarGet(ScriptReadHalfword(ctx)); + bool16 isImpassable = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; - if (!v8) + x += MAP_OFFSET; + y += MAP_OFFSET; + if (!isImpassable) MapGridSetMetatileIdAt(x, y, tileId); else MapGridSetMetatileIdAt(x, y, tileId | METATILE_COLLISION_MASK); @@ -2117,8 +2108,8 @@ bool8 ScrCmd_opendoor(struct ScriptContext * ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; PlaySE(GetDoorSoundEffect(x, y)); FieldAnimateDoorOpen(x, y); return FALSE; @@ -2129,8 +2120,8 @@ bool8 ScrCmd_closedoor(struct ScriptContext * ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; FieldAnimateDoorClose(x, y); return FALSE; } @@ -2154,8 +2145,8 @@ bool8 ScrCmd_setdooropen(struct ScriptContext * ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; FieldSetDoorOpened(x, y); return FALSE; } @@ -2165,8 +2156,8 @@ bool8 ScrCmd_setdoorclosed(struct ScriptContext * ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; FieldSetDoorClosed(x, y); return FALSE; } @@ -2202,9 +2193,9 @@ bool8 ScrCmd_addcoins(struct ScriptContext * ctx) u16 coins = VarGet(ScriptReadHalfword(ctx)); if (AddCoins(coins) == TRUE) - gSpecialVar_Result = 0; + gSpecialVar_Result = FALSE; else - gSpecialVar_Result = 1; + gSpecialVar_Result = TRUE; return FALSE; } @@ -2213,9 +2204,9 @@ bool8 ScrCmd_removecoins(struct ScriptContext * ctx) u16 coins = VarGet(ScriptReadHalfword(ctx)); if (RemoveCoins(coins) == TRUE) - gSpecialVar_Result = 0; + gSpecialVar_Result = FALSE; else - gSpecialVar_Result = 1; + gSpecialVar_Result = TRUE; return FALSE; } diff --git a/src/script.c b/src/script.c index 08ae42deb..1592170cd 100644 --- a/src/script.c +++ b/src/script.c @@ -523,7 +523,7 @@ bool32 ValidateRamScript(void) return TRUE; } -u8 *sub_8069E48(void) +u8 *GetSavedRamScriptIfValid(void) { struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; if (!ValidateReceivedWonderCard()) diff --git a/src/script_menu.c b/src/script_menu.c index 384881982..d59ed07f7 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -1048,7 +1048,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) return TRUE; } -bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) +bool8 (*ScriptMenu_HidePokemonPic(void))(void) { u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); if (taskId == 0xFF) diff --git a/src/union_room.c b/src/union_room.c index cadc00181..cc7df613a 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -4657,7 +4657,7 @@ static void HandleCancelTrade(bool32 unlockObjs) static void UR_EnableScriptContext2AndFreezeObjectEvents(void) { ScriptContext2_Enable(); - ScriptFreezeObjectEvents(); + FreezeObjects_WaitForPlayer(); } static u8 GetSinglePartnerSpriteGenderParam(s32 linkPlayer) From 8e7dd94ecaabf7b2a808402c0d186ada9eb55a7e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 15:19:49 -0400 Subject: [PATCH 2/7] Drop some optional script command arguments --- data/event_scripts.s | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 26 +++++++++---------- data/maps/CeladonCity_GameCorner/scripts.inc | 10 +++---- .../scripts.inc | 22 ++++++++-------- data/maps/CeladonCity_Gym/scripts.inc | 2 +- data/maps/CeladonCity_Restaurant/scripts.inc | 2 +- data/maps/CeruleanCave_B1F/scripts.inc | 2 +- data/maps/CeruleanCity/scripts.inc | 2 +- data/maps/CeruleanCity_BikeShop/scripts.inc | 2 +- data/maps/CeruleanCity_Gym/scripts.inc | 2 +- data/maps/CinnabarIsland_Gym/scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 6 ++--- .../FiveIsland_LostCave_Room10/scripts.inc | 2 +- .../FiveIsland_MemorialPillar/scripts.inc | 4 +-- data/maps/FuchsiaCity_Gym/scripts.inc | 2 +- data/maps/FuchsiaCity_House2/scripts.inc | 2 +- .../scripts.inc | 8 +++--- .../maps/FuchsiaCity_WardensHouse/scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/MtEmber_Summit/scripts.inc | 2 +- data/maps/OneIsland/scripts.inc | 2 +- data/maps/OneIsland_Harbor/scripts.inc | 2 +- .../OneIsland_PokemonCenter_1F/scripts.inc | 6 ++--- data/maps/PalletTown/scripts.inc | 4 +-- .../PalletTown_ProfessorOaksLab/scripts.inc | 6 ++--- data/maps/PalletTown_RivalsHouse/scripts.inc | 2 +- data/maps/PewterCity_Gym/scripts.inc | 2 +- data/maps/PewterCity_Museum_1F/scripts.inc | 8 +++--- .../PokemonLeague_ChampionsRoom/scripts.inc | 2 +- data/maps/PokemonTower_6F/scripts.inc | 2 +- data/maps/PokemonTower_7F/scripts.inc | 2 +- data/maps/PowerPlant/scripts.inc | 6 ++--- data/maps/Route1/scripts.inc | 2 +- .../maps/Route10_PokemonCenter_1F/scripts.inc | 2 +- data/maps/Route11_EastEntrance_2F/scripts.inc | 2 +- data/maps/Route12/scripts.inc | 2 +- data/maps/Route12_FishingHouse/scripts.inc | 2 +- .../maps/Route12_NorthEntrance_2F/scripts.inc | 2 +- data/maps/Route15_WestEntrance_2F/scripts.inc | 2 +- data/maps/Route16/scripts.inc | 2 +- data/maps/Route16_House/scripts.inc | 2 +- .../maps/Route16_NorthEntrance_2F/scripts.inc | 2 +- data/maps/Route24/scripts.inc | 4 +-- data/maps/Route25_SeaCottage/scripts.inc | 2 +- data/maps/Route2_EastBuilding/scripts.inc | 2 +- data/maps/Route4_PokemonCenter_1F/scripts.inc | 8 +++--- data/maps/Route5_SouthEntrance/scripts.inc | 2 +- data/maps/Route6_NorthEntrance/scripts.inc | 2 +- data/maps/Route7_EastEntrance/scripts.inc | 2 +- data/maps/Route8_WestEntrance/scripts.inc | 6 ++--- data/maps/SSAnne_Exterior/scripts.inc | 2 +- data/maps/SafariZone_SecretHouse/scripts.inc | 2 +- .../SaffronCity_CopycatsHouse_2F/scripts.inc | 2 +- data/maps/SaffronCity_Dojo/scripts.inc | 2 +- data/maps/SaffronCity_Gym/scripts.inc | 2 +- .../SaffronCity_MrPsychicsHouse/scripts.inc | 2 +- data/maps/SeafoamIslands_B3F/scripts.inc | 2 +- data/maps/SeafoamIslands_B4F/scripts.inc | 2 +- data/maps/SevenIsland_House_Room1/scripts.inc | 2 +- data/maps/SevenIsland_House_Room2/scripts.inc | 2 +- data/maps/SilphCo_11F/scripts.inc | 2 +- data/maps/SilphCo_7F/scripts.inc | 2 +- data/maps/ThreeIsland/scripts.inc | 2 +- data/maps/ThreeIsland_BerryForest/scripts.inc | 6 ++--- data/maps/TrainerTower_Elevator/scripts.inc | 4 +-- data/maps/TwoIsland_House/scripts.inc | 4 +-- .../TwoIsland_JoyfulGameCorner/scripts.inc | 4 +-- data/maps/VermilionCity/scripts.inc | 4 +-- data/maps/VermilionCity_Gym/scripts.inc | 2 +- data/maps/VermilionCity_House1/scripts.inc | 2 +- .../VermilionCity_PokemonFanClub/scripts.inc | 2 +- data/maps/ViridianCity_Gym/scripts.inc | 2 +- data/scripts/cable_club.inc | 8 +++--- data/scripts/day_care.inc | 4 +-- data/scripts/hole.inc | 2 +- data/scripts/move_tutors.inc | 2 +- data/scripts/safari_zone.inc | 4 +-- data/scripts/trainer_card.inc | 6 ++--- data/scripts/trainer_tower.inc | 4 +-- data/scripts/white_out.inc | 2 +- 82 files changed, 144 insertions(+), 144 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index bfe879183..1e3ef3d8e 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1117,7 +1117,7 @@ EventScript_HandOverItem:: message Text_HandedOverItem waitmessage waitfanfare - removeitem VAR_0x8004, 1 + removeitem VAR_0x8004 return .include "data/scripts/pokemon_league.inc" diff --git a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc index 0a2208b66..46e824cf0 100644 --- a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc +++ b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc @@ -11,7 +11,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_EeveeBall:: lock faceplayer setvar VAR_TEMP_1, SPECIES_EEVEE - givemon SPECIES_EEVEE, 25, ITEM_NONE + givemon SPECIES_EEVEE, 25 compare VAR_RESULT, 0 goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveeParty compare VAR_RESULT, 1 diff --git a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc index 16e9df340..fd44f54e6 100644 --- a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc +++ b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc @@ -14,13 +14,13 @@ CeladonCity_DepartmentStore_Roof_EventScript_ThirstyGirl:: CeladonCity_DepartmentStore_Roof_EventScript_CheckPlayerHasDrinks:: setvar VAR_TEMP_1, 0 - checkitem ITEM_FRESH_WATER, 1 + checkitem ITEM_FRESH_WATER compare VAR_RESULT, TRUE call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_SetHasFreshWater - checkitem ITEM_SODA_POP, 1 + checkitem ITEM_SODA_POP compare VAR_RESULT, TRUE call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_SetHasSodaPop - checkitem ITEM_LEMONADE, 1 + checkitem ITEM_LEMONADE compare VAR_RESULT, TRUE call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_SetHasLemonade return @@ -143,8 +143,8 @@ CeladonCity_DepartmentStore_Roof_EventScript_GiveLemonade:: CeladonCity_DepartmentStore_Roof_EventScript_GiveDrink:: bufferitemname STR_VAR_1, VAR_0x8008 bufferitemname STR_VAR_2, VAR_0x8009 - removeitem VAR_0x8008, 1 - checkitemspace VAR_0x8009, 1 + removeitem VAR_0x8008 + checkitemspace VAR_0x8009 compare VAR_RESULT, FALSE goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForReward additem VAR_0x8009 @@ -210,7 +210,7 @@ CeladonCity_DepartmentStore_Roof_EventScript_VendingMachine:: lockall message CeladonCity_DepartmentStore_Roof_Text_VendingMachineWhatDoesItHave waitmessage - showmoneybox 0, 0, 0 + showmoneybox 0, 0 goto CeladonCity_DepartmentStore_Roof_EventScript_ChooseDrink end @@ -227,38 +227,38 @@ CeladonCity_DepartmentStore_Roof_EventScript_ChooseDrink:: CeladonCity_DepartmentStore_Roof_EventScript_BuyFreshWater:: setvar VAR_TEMP_0, ITEM_FRESH_WATER - checkmoney 200, 0 + checkmoney 200 goto CeladonCity_DepartmentStore_Roof_EventScript_TryBuyDrink end CeladonCity_DepartmentStore_Roof_EventScript_BuySodaPop:: setvar VAR_TEMP_0, ITEM_SODA_POP - checkmoney 300, 0 + checkmoney 300 goto CeladonCity_DepartmentStore_Roof_EventScript_TryBuyDrink end CeladonCity_DepartmentStore_Roof_EventScript_BuyLemonade:: setvar VAR_TEMP_0, ITEM_LEMONADE - checkmoney 350, 0 + checkmoney 350 goto CeladonCity_DepartmentStore_Roof_EventScript_TryBuyDrink end CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyFreshWater:: - removemoney 200, 0 + removemoney 200 return CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneySodaPop:: - removemoney 300, 0 + removemoney 300 return CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyLemonade:: - removemoney 350, 0 + removemoney 350 return CeladonCity_DepartmentStore_Roof_EventScript_TryBuyDrink:: compare VAR_RESULT, FALSE goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_NotEnoughMoney - checkitemspace VAR_TEMP_0, 1 + checkitemspace VAR_TEMP_0 compare VAR_RESULT, FALSE goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForDrink compare VAR_TEMP_1, 0 diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index 8cd7ca69b..a020f1bab 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -24,7 +24,7 @@ CeladonCity_GameCorner_EventScript_CoinsClerk:: goto_if_questlog EventScript_ReleaseEnd lock faceplayer - showmoneybox 0, 0, 0 + showmoneybox 0, 0 showcoinsbox 0, 5 message CeladonCity_GameCorner_Text_WelcomeBuySomeCoins waitmessage @@ -49,11 +49,11 @@ CeladonCity_GameCorner_EventScript_Buy500Coins:: checkcoins VAR_TEMP_1 compare VAR_TEMP_1, (MAX_COINS + 1) - 500 goto_if_ge CeladonCity_GameCorner_EventScript_ClerkNoRoomForCoins - checkmoney 10000, 0 + checkmoney 10000 compare VAR_RESULT, FALSE goto_if_eq CeladonCity_GameCorner_EventScript_ClerkNotEnoughMoney addcoins 500 - removemoney 10000, 0 + removemoney 10000 goto CeladonCity_GameCorner_EventScript_BoughtCoins end @@ -61,11 +61,11 @@ CeladonCity_GameCorner_EventScript_Buy50Coins:: checkcoins VAR_TEMP_1 compare VAR_TEMP_1, (MAX_COINS + 1) - 50 goto_if_ge CeladonCity_GameCorner_EventScript_ClerkNoRoomForCoins - checkmoney 1000, 0 + checkmoney 1000 compare VAR_RESULT, FALSE goto_if_eq CeladonCity_GameCorner_EventScript_ClerkNotEnoughMoney addcoins 50 - removemoney 1000, 0 + removemoney 1000 goto CeladonCity_GameCorner_EventScript_BoughtCoins end diff --git a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc index 544eb4a93..8a6c30770 100644 --- a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc +++ b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc @@ -123,10 +123,10 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeMon:: CeladonCity_GameCorner_PrizeRoom_EventScript_GiveAbra:: .ifdef FIRERED - givemon VAR_TEMP_1, 9, ITEM_NONE + givemon VAR_TEMP_1, 9 .else .ifdef LEAFGREEN - givemon VAR_TEMP_1, 7, ITEM_NONE + givemon VAR_TEMP_1, 7 .endif .endif goto CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon @@ -134,10 +134,10 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_GiveAbra:: CeladonCity_GameCorner_PrizeRoom_EventScript_GiveClefairy:: .ifdef FIRERED - givemon VAR_TEMP_1, 8, ITEM_NONE + givemon VAR_TEMP_1, 8 .else .ifdef LEAFGREEN - givemon VAR_TEMP_1, 12, ITEM_NONE + givemon VAR_TEMP_1, 12 .endif .endif goto CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon @@ -145,33 +145,33 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_GiveClefairy:: CeladonCity_GameCorner_PrizeRoom_EventScript_GiveDratini:: .ifdef FIRERED - givemon VAR_TEMP_1, 18, ITEM_NONE + givemon VAR_TEMP_1, 18 .else .ifdef LEAFGREEN - givemon VAR_TEMP_1, 24, ITEM_NONE + givemon VAR_TEMP_1, 24 .endif .endif goto CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon end CeladonCity_GameCorner_PrizeRoom_EventScript_GiveScyther:: - givemon VAR_TEMP_1, 25, ITEM_NONE + givemon VAR_TEMP_1, 25 goto CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon end CeladonCity_GameCorner_PrizeRoom_EventScript_GivePorygon:: .ifdef FIRERED - givemon VAR_TEMP_1, 26, ITEM_NONE + givemon VAR_TEMP_1, 26 .else .ifdef LEAFGREEN - givemon VAR_TEMP_1, 18, ITEM_NONE + givemon VAR_TEMP_1, 18 .endif .endif goto CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon end CeladonCity_GameCorner_PrizeRoom_EventScript_GivePinsir:: - givemon VAR_TEMP_1, 18, ITEM_NONE + givemon VAR_TEMP_1, 18 goto CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon end @@ -323,7 +323,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize:: checkcoins VAR_RESULT compare VAR_RESULT, VAR_TEMP_2 goto_if_lt CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins - checkitemspace VAR_TEMP_1, 1 + checkitemspace VAR_TEMP_1 compare VAR_RESULT, FALSE goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_BagFull removecoins VAR_TEMP_2 diff --git a/data/maps/CeladonCity_Gym/scripts.inc b/data/maps/CeladonCity_Gym/scripts.inc index 9795156b1..705ca6af6 100644 --- a/data/maps/CeladonCity_Gym/scripts.inc +++ b/data/maps/CeladonCity_Gym/scripts.inc @@ -21,7 +21,7 @@ CeladonCity_Gym_EventScript_DefeatedErika:: CeladonCity_Gym_EventScript_GiveTM19:: msgbox CeladonCity_Gym_Text_ExplainRainbowBadgeTakeThis - checkitemspace ITEM_TM19, 1 + checkitemspace ITEM_TM19 compare VAR_RESULT, FALSE goto_if_eq CeladonCity_Gym_EventScript_NoRoomForTM19 giveitem_msg CeladonCity_Gym_Text_ReceivedTM19FromErika, ITEM_TM19 diff --git a/data/maps/CeladonCity_Restaurant/scripts.inc b/data/maps/CeladonCity_Restaurant/scripts.inc index 65a625c7c..257bc1bb6 100644 --- a/data/maps/CeladonCity_Restaurant/scripts.inc +++ b/data/maps/CeladonCity_Restaurant/scripts.inc @@ -14,7 +14,7 @@ CeladonCity_Restaurant_EventScript_CoinCaseMan:: faceplayer goto_if_set FLAG_GOT_COIN_CASE, CeladonCity_Restaurant_EventScript_AlreadyGotCoinCase msgbox CeladonCity_Restaurant_Text_TakeThisImBusted - checkitemspace ITEM_COIN_CASE, 1 + checkitemspace ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq CeladonCity_Restaurant_EventScript_NoRoomForCoinCase giveitem_msg CeladonCity_Restaurant_Text_ReceivedCoinCaseFromMan, ITEM_COIN_CASE diff --git a/data/maps/CeruleanCave_B1F/scripts.inc b/data/maps/CeruleanCave_B1F/scripts.inc index 2963e9228..f75ba95ee 100644 --- a/data/maps/CeruleanCave_B1F/scripts.inc +++ b/data/maps/CeruleanCave_B1F/scripts.inc @@ -35,7 +35,7 @@ CeruleanCave_B1F_EventScript_Mewtwo:: delay 20 playbgm MUS_ENCOUNTER_GYM_LEADER, 0 waitbuttonpress - setwildbattle SPECIES_MEWTWO, 70, ITEM_NONE + setwildbattle SPECIES_MEWTWO, 70 setflag FLAG_SYS_SPECIAL_WILD_BATTLE special StartLegendaryBattle waitstate diff --git a/data/maps/CeruleanCity/scripts.inc b/data/maps/CeruleanCity/scripts.inc index 110a2de4c..1aee74666 100644 --- a/data/maps/CeruleanCity/scripts.inc +++ b/data/maps/CeruleanCity/scripts.inc @@ -189,7 +189,7 @@ CeruleanCity_EventScript_Grunt:: CeruleanCity_EventScript_GruntDefeated:: msgbox CeruleanCity_Text_OkayIllReturnStolenTM - checkitemspace ITEM_TM28, 1 + checkitemspace ITEM_TM28 compare VAR_RESULT, FALSE goto_if_eq CeruleanCity_EventScript_NoRoomForTM28 giveitem_msg CeruleanCity_Text_RecoveredTM28FromGrunt, ITEM_TM28 diff --git a/data/maps/CeruleanCity_BikeShop/scripts.inc b/data/maps/CeruleanCity_BikeShop/scripts.inc index 931ee7b12..9e8e0001f 100644 --- a/data/maps/CeruleanCity_BikeShop/scripts.inc +++ b/data/maps/CeruleanCity_BikeShop/scripts.inc @@ -6,7 +6,7 @@ CeruleanCity_BikeShop_EventScript_Clerk:: faceplayer goto_if_set FLAG_GOT_BICYCLE, CeruleanCity_BikeShop_EventScript_AlreadyGotBicycle goto_if_set FLAG_GOT_BIKE_VOUCHER, CeruleanCity_BikeShop_EventScript_ExchangeBikeVoucher - showmoneybox 0, 0, 0 + showmoneybox 0, 0 message CeruleanCity_BikeShop_Text_WelcomeToBikeShop waitmessage multichoice 11, 0, MULTICHOICE_BIKE_SHOP, FALSE diff --git a/data/maps/CeruleanCity_Gym/scripts.inc b/data/maps/CeruleanCity_Gym/scripts.inc index 1a1a02476..d20bab11e 100644 --- a/data/maps/CeruleanCity_Gym/scripts.inc +++ b/data/maps/CeruleanCity_Gym/scripts.inc @@ -20,7 +20,7 @@ CeruleanCity_Gym_EventScript_MistyDefeated:: CeruleanCity_Gym_EventScript_GiveTM03:: msgbox CeruleanCity_Gym_Text_ExplainCascadeBadge - checkitemspace ITEM_TM03, 1 + checkitemspace ITEM_TM03 compare VAR_RESULT, FALSE goto_if_eq CeruleanCity_Gym_EventScript_NoRoomForTM03 giveitem_msg CeruleanCity_Gym_Text_ReceivedTM03FromMisty, ITEM_TM03 diff --git a/data/maps/CinnabarIsland_Gym/scripts.inc b/data/maps/CinnabarIsland_Gym/scripts.inc index 0d9a1ff0a..395f45419 100644 --- a/data/maps/CinnabarIsland_Gym/scripts.inc +++ b/data/maps/CinnabarIsland_Gym/scripts.inc @@ -73,7 +73,7 @@ CinnabarIsland_Gym_EventScript_DefeatedBlaine:: CinnabarIsland_Gym_EventScript_GiveTM38:: msgbox CinnabarIsland_Gym_Text_ExplainVolcanoBadge - checkitemspace ITEM_TM38, 1 + checkitemspace ITEM_TM38 compare VAR_RESULT, FALSE goto_if_eq CinnabarIsland_Gym_EventScript_NoRoomForTM38 giveitem_msg CinnabarIsland_Gym_Text_ReceivedTM38FromBlaine, ITEM_TM38 diff --git a/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc b/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc index 5644b408b..1488e054c 100644 --- a/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc @@ -50,7 +50,7 @@ CinnabarIsland_PokemonCenter_1F_EventScript_Bill:: removeobject LOCALID_BILL setvar VAR_MAP_SCENE_CINNABAR_ISLAND_2, 1 clearflag FLAG_HIDE_CINNABAR_BILL - warp MAP_CINNABAR_ISLAND, 255, 14, 11 + warp MAP_CINNABAR_ISLAND, 14, 11 waitstate release end diff --git a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc index f3e905b95..8db5d6f3c 100644 --- a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc @@ -215,7 +215,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte:: setvar VAR_TEMP_1, SPECIES_OMANYTE bufferspeciesname STR_VAR_1, SPECIES_OMANYTE msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife - givemon SPECIES_OMANYTE, 5, ITEM_NONE + givemon SPECIES_OMANYTE, 5 compare VAR_RESULT, 2 goto_if_eq EventScript_NoMoreRoomForPokemon setflag FLAG_REVIVED_HELIX @@ -229,7 +229,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto:: setvar VAR_TEMP_1, SPECIES_KABUTO bufferspeciesname STR_VAR_1, SPECIES_KABUTO msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife - givemon SPECIES_KABUTO, 5, ITEM_NONE + givemon SPECIES_KABUTO, 5 compare VAR_RESULT, 2 goto_if_eq EventScript_NoMoreRoomForPokemon setflag FLAG_REVIVED_DOME @@ -243,7 +243,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl:: setvar VAR_TEMP_1, SPECIES_AERODACTYL bufferspeciesname STR_VAR_1, SPECIES_AERODACTYL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife - givemon SPECIES_AERODACTYL, 5, ITEM_NONE + givemon SPECIES_AERODACTYL, 5 compare VAR_RESULT, 2 goto_if_eq EventScript_NoMoreRoomForPokemon setflag FLAG_REVIVED_AMBER diff --git a/data/maps/FiveIsland_LostCave_Room10/scripts.inc b/data/maps/FiveIsland_LostCave_Room10/scripts.inc index d442b9b40..c69268fc6 100644 --- a/data/maps/FiveIsland_LostCave_Room10/scripts.inc +++ b/data/maps/FiveIsland_LostCave_Room10/scripts.inc @@ -31,7 +31,7 @@ FiveIsland_LostCave_Room10_EventScript_FindSelphyScene:: msgbox FiveIsland_LostCave_Room10_Text_MayIAskYouToTakeMeHome closemessage call FiveIsland_LostCave_Room10_EventScript_SetSelphyFound - warp MAP_FIVE_ISLAND_RESORT_GORGEOUS, 255, 39, 10 + warp MAP_FIVE_ISLAND_RESORT_GORGEOUS, 39, 10 waitstate releaseall end diff --git a/data/maps/FiveIsland_MemorialPillar/scripts.inc b/data/maps/FiveIsland_MemorialPillar/scripts.inc index c240bdbba..de3403a7d 100644 --- a/data/maps/FiveIsland_MemorialPillar/scripts.inc +++ b/data/maps/FiveIsland_MemorialPillar/scripts.inc @@ -40,7 +40,7 @@ FiveIsland_MemorialPillar_EventScript_Memorial:: goto_if_set FLAG_GOT_TM42_AT_MEMORIAL_PILLAR, FiveIsland_MemorialPillar_EventScript_MemorialLemonadeAlreadyPlaced goto_if_set FLAG_NO_ROOM_FOR_TM42_AT_MEMORIAL_PILLAR, FiveIsland_MemorialPillar_EventScript_MemorialLemonadeAlreadyPlaced msgbox FiveIsland_MemorialPillar_Text_HereLiesTectonixLemonadeOffering - checkitem ITEM_LEMONADE, 1 + checkitem ITEM_LEMONADE compare VAR_RESULT, TRUE goto_if_eq FiveIsland_MemorialPillar_EventScript_AskPlaceLemonade releaseall @@ -54,7 +54,7 @@ FiveIsland_MemorialPillar_EventScript_AskPlaceLemonade:: end FiveIsland_MemorialPillar_EventScript_PlaceLemonade:: - removeitem ITEM_LEMONADE, 1 + removeitem ITEM_LEMONADE msgbox FiveIsland_MemorialPillar_Text_PlacedCanOfLemonade closemessage applymovement LOCALID_MEMORIAL_MAN, Movement_WalkInPlaceFastestRight diff --git a/data/maps/FuchsiaCity_Gym/scripts.inc b/data/maps/FuchsiaCity_Gym/scripts.inc index 5b915f855..059a5710a 100644 --- a/data/maps/FuchsiaCity_Gym/scripts.inc +++ b/data/maps/FuchsiaCity_Gym/scripts.inc @@ -20,7 +20,7 @@ FuchsiaCity_Gym_EventScript_DefeatedKoga:: FuchsiaCity_Gym_EventScript_GiveTM06:: msgbox FuchsiaCity_Gym_Text_KogaExplainSoulBadge - checkitemspace ITEM_TM06, 1 + checkitemspace ITEM_TM06 compare VAR_RESULT, FALSE goto_if_eq FuchsiaCity_Gym_EventScript_NoRoomForTM06 giveitem_msg FuchsiaCity_Gym_Text_ReceivedTM06FromKoga, ITEM_TM06 diff --git a/data/maps/FuchsiaCity_House2/scripts.inc b/data/maps/FuchsiaCity_House2/scripts.inc index 1d5df4cec..9cda26e43 100644 --- a/data/maps/FuchsiaCity_House2/scripts.inc +++ b/data/maps/FuchsiaCity_House2/scripts.inc @@ -19,7 +19,7 @@ FuchsiaCity_House2_EventScript_AlreadyGotGoodRod:: FuchsiaCity_House2_EventScript_GiveGoodRod:: msgbox FuchsiaCity_House2_Text_LikeYourStyleTakeThis - checkitemspace ITEM_GOOD_ROD, 1 + checkitemspace ITEM_GOOD_ROD compare VAR_RESULT, FALSE goto_if_eq FuchsiaCity_House2_EventScript_NoRoomForGoodRod giveitem_msg FuchsiaCity_House2_Text_ReceivedGoodRod, ITEM_GOOD_ROD diff --git a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc index 00a22853b..cfca834fe 100644 --- a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc +++ b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc @@ -57,7 +57,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_ReturnToSafariZone:: closemessage applymovement OBJ_EVENT_ID_PLAYER, FuchsiaCity_SafariZone_Entrance_Movement_ReEnter waitmovement 0 - warp MAP_SAFARI_ZONE_CENTER, 255, 26, 30 + warp MAP_SAFARI_ZONE_CENTER, 26, 30 waitstate end @@ -103,7 +103,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_AskEnterSafariZone:: msgbox FuchsiaCity_SafariZone_Entrance_Text_WelcomeToSafariZone applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox FuchsiaCity_SafariZone_Entrance_Text_PlaySafariGameFor500, MSGBOX_YESNO compare VAR_RESULT, YES goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone @@ -113,10 +113,10 @@ FuchsiaCity_SafariZone_Entrance_EventScript_AskEnterSafariZone:: FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone:: call FuchsiaCity_SafariZone_Entrance_EventScript_CheckSpaceForMons - checkmoney 500, 0 + checkmoney 500 compare VAR_RESULT, FALSE goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney - removemoney 500, 0 + removemoney 500 updatemoneybox msgbox FuchsiaCity_SafariZone_Entrance_Text_ThatllBe500WeOnlyUseSpecialBalls textcolor 3 diff --git a/data/maps/FuchsiaCity_WardensHouse/scripts.inc b/data/maps/FuchsiaCity_WardensHouse/scripts.inc index 77ae03d2c..75b1afce1 100644 --- a/data/maps/FuchsiaCity_WardensHouse/scripts.inc +++ b/data/maps/FuchsiaCity_WardensHouse/scripts.inc @@ -29,7 +29,7 @@ FuchsiaCity_WardensHouse_EventScript_GiveGoldTeeth:: call_if_eq FuchsiaCity_WardensHouse_EventScript_WardenThanksFemale giveitem_msg FuchsiaCity_WardensHouse_Text_ReceivedHM04FromWarden, ITEM_HM04 setflag FLAG_GOT_HM04 - removeitem ITEM_GOLD_TEETH, 1 + removeitem ITEM_GOLD_TEETH release end diff --git a/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc b/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc index 1fe10e416..37d1ab7bc 100644 --- a/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc +++ b/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc @@ -6,7 +6,7 @@ LavenderTown_VolunteerPokemonHouse_EventScript_MrFuji:: faceplayer goto_if_set FLAG_GOT_POKE_FLUTE, LavenderTown_VolunteerPokemonHouse_EventScript_AlreadyHavePokeFlute msgbox LavenderTown_VolunteerPokemonHouse_Text_IdLikeYouToHaveThis - checkitemspace ITEM_POKE_FLUTE, 1 + checkitemspace ITEM_POKE_FLUTE compare VAR_RESULT, FALSE goto_if_eq LavenderTown_VolunteerPokemonHouse_EventScript_NoRoomForPokeFlute setflag FLAG_GOT_POKE_FLUTE diff --git a/data/maps/MtEmber_Summit/scripts.inc b/data/maps/MtEmber_Summit/scripts.inc index 3c3757e63..fc59bb822 100644 --- a/data/maps/MtEmber_Summit/scripts.inc +++ b/data/maps/MtEmber_Summit/scripts.inc @@ -27,7 +27,7 @@ MtEmber_Summit_EventScript_Moltres:: special QuestLog_CutRecording lock faceplayer - setwildbattle SPECIES_MOLTRES, 50, ITEM_NONE + setwildbattle SPECIES_MOLTRES, 50 waitse playmoncry SPECIES_MOLTRES, CRY_MODE_ENCOUNTER message Text_Gyaoo diff --git a/data/maps/OneIsland/scripts.inc b/data/maps/OneIsland/scripts.inc index a8943e17a..900ea4550 100644 --- a/data/maps/OneIsland/scripts.inc +++ b/data/maps/OneIsland/scripts.inc @@ -32,7 +32,7 @@ OneIsland_EventScript_EnterOneIslandFirstTime:: waitdooranim removeobject LOCALID_BILL setvar VAR_MAP_SCENE_ONE_ISLAND_HARBOR, 3 - warp MAP_ONE_ISLAND_POKEMON_CENTER_1F, 255, 9, 9 + warp MAP_ONE_ISLAND_POKEMON_CENTER_1F, 9, 9 waitstate releaseall end diff --git a/data/maps/OneIsland_Harbor/scripts.inc b/data/maps/OneIsland_Harbor/scripts.inc index 359730fe5..0b899f9cf 100644 --- a/data/maps/OneIsland_Harbor/scripts.inc +++ b/data/maps/OneIsland_Harbor/scripts.inc @@ -21,7 +21,7 @@ OneIsland_Harbor_EventScript_PlayerEnterHarborFirstTime:: applymovement OBJ_EVENT_ID_PLAYER, OneIsland_Harbor_Movement_PlayerExitHarbor waitmovement 0 setvar VAR_MAP_SCENE_ONE_ISLAND_HARBOR, 2 - warp MAP_ONE_ISLAND, 255, 12, 18 + warp MAP_ONE_ISLAND, 12, 18 waitstate releaseall end diff --git a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc index 7219df19e..a038798e4 100644 --- a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc +++ b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc @@ -265,7 +265,7 @@ OneIsland_PokemonCenter_1F_EventScript_GiveCelioSapphire:: waitmessage waitfanfare call EventScript_RestorePrevTextColor - removeitem ITEM_SAPPHIRE, 1 + removeitem ITEM_SAPPHIRE msgbox OneIsland_PokemonCenter_1F_Text_ThankYouGiveMeTime closemessage applymovement LOCALID_CELIO, OneIsland_PokemonCenter_1F_Movement_CelioPutGemInMachine @@ -335,8 +335,8 @@ OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio:: OneIsland_PokemonCenter_1F_EventScript_GiveRainbowPass:: msgbox OneIsland_PokemonCenter_1F_Text_AnotherGemstoneInSeviiIslands - removeitem ITEM_RUBY, 1 - removeitem ITEM_TRI_PASS, 1 + removeitem ITEM_RUBY + removeitem ITEM_TRI_PASS setvar VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 additem ITEM_RAINBOW_PASS setflag FLAG_SYS_SEVII_MAP_4567 diff --git a/data/maps/PalletTown/scripts.inc b/data/maps/PalletTown/scripts.inc index 6aedb3871..1e3d4f026 100644 --- a/data/maps/PalletTown/scripts.inc +++ b/data/maps/PalletTown/scripts.inc @@ -79,7 +79,7 @@ PalletTown_EventScript_OakRatingScene:: setvar VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 7 setvar VAR_MAP_SCENE_PALLET_TOWN_OAK, 3 setflag FLAG_HIDE_OAK_IN_PALLET_TOWN - warp MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB, 255, 6, 12 + warp MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB, 6, 12 waitstate releaseall end @@ -225,7 +225,7 @@ PalletTown_EventScript_OakTrigger:: setvar VAR_MAP_SCENE_PALLET_TOWN_OAK, 1 setflag FLAG_HIDE_OAK_IN_PALLET_TOWN setflag FLAG_DONT_TRANSITION_MUSIC - warp MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB, 255, 6, 12 + warp MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB, 6, 12 waitstate releaseall end diff --git a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc index a862f2fd4..2c43a2d26 100644 --- a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc +++ b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc @@ -656,7 +656,7 @@ PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: waitmessage waitfanfare call EventScript_RestorePrevTextColor - removeitem ITEM_OAKS_PARCEL, 1 + removeitem ITEM_OAKS_PARCEL msgbox PalletTown_ProfessorOaksLab_Text_OakCustomBallIOrdered playbgm MUS_ENCOUNTER_RIVAL, 0 msgbox PalletTown_ProfessorOaksLab_Text_RivalGramps @@ -1003,7 +1003,7 @@ PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls:: special QuestLog_CutRecording goto_if_set FLAG_OAK_SKIP_22_RIVAL_CHECK, PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait goto_if_set FLAG_GOT_POKEBALLS_FROM_OAK_AFTER_22_RIVAL, PalletTown_ProfessorOaksLab_EventScript_PlayerAlreadyGotBalls - checkitem ITEM_POKE_BALL, 1 + checkitem ITEM_POKE_BALL compare VAR_RESULT, FALSE goto_if_eq PalletTown_ProfessorOaksLab_EventScript_PlayerOutOfBalls goto PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait @@ -1215,7 +1215,7 @@ PalletTown_ProfessorOaksLab_EventScript_ChoseStarter:: call EventScript_RestorePrevTextColor setflag FLAG_SYS_POKEMON_GET setflag FLAG_PALLET_LADY_NOT_BLOCKING_SIGN - givemon PLAYER_STARTER_SPECIES, 5, ITEM_NONE + givemon PLAYER_STARTER_SPECIES, 5 copyvar VAR_STARTER_MON, PLAYER_STARTER_NUM bufferspeciesname STR_VAR_1, PLAYER_STARTER_SPECIES message PalletTown_ProfessorOaksLab_Text_ReceivedMonFromOak diff --git a/data/maps/PalletTown_RivalsHouse/scripts.inc b/data/maps/PalletTown_RivalsHouse/scripts.inc index 119ccba49..d7593eff3 100644 --- a/data/maps/PalletTown_RivalsHouse/scripts.inc +++ b/data/maps/PalletTown_RivalsHouse/scripts.inc @@ -144,7 +144,7 @@ PalletTown_RivalsHouse_EventScript_PleaseGiveMonsRest:: PalletTown_RivalsHouse_EventScript_GiveTownMap:: msgbox PalletTown_RivalsHouse_Text_ErrandForGrandpaThisWillHelp closemessage - checkitemspace ITEM_TOWN_MAP, 1 + checkitemspace ITEM_TOWN_MAP compare VAR_RESULT, FALSE goto_if_eq PalletTown_RivalsHouse_EventScript_NoRoomForTownMap applymovement LOCALID_DAISY, Movement_WalkInPlaceFastestRight diff --git a/data/maps/PewterCity_Gym/scripts.inc b/data/maps/PewterCity_Gym/scripts.inc index 0ab615946..95ed49e59 100644 --- a/data/maps/PewterCity_Gym/scripts.inc +++ b/data/maps/PewterCity_Gym/scripts.inc @@ -22,7 +22,7 @@ PewterCity_Gym_EventScript_DefeatedBrock:: PewterCity_Gym_EventScript_GiveTM39:: msgbox PewterCity_Gym_Text_TakeThisWithYou - checkitemspace ITEM_TM39, 1 + checkitemspace ITEM_TM39 compare VAR_RESULT, FALSE goto_if_eq PewterCity_Gym_EventScript_NoRoomForTM39 giveitem_msg PewterCity_Gym_Text_ReceivedTM39FromBrock, ITEM_TM39 diff --git a/data/maps/PewterCity_Museum_1F/scripts.inc b/data/maps/PewterCity_Museum_1F/scripts.inc index ad72bfbe4..a60e30aa6 100644 --- a/data/maps/PewterCity_Museum_1F/scripts.inc +++ b/data/maps/PewterCity_Museum_1F/scripts.inc @@ -65,7 +65,7 @@ PewterCity_Museum_1F_EventScript_EntranceTriggerRight:: PewterCity_Museum_1F_EventScript_EntranceTrigger:: textcolor 0 - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox PewterCity_Museum_1F_Text_Its50YForChildsTicket, MSGBOX_YESNO compare VAR_RESULT, YES goto_if_eq PewterCity_Museum_1F_EventScript_TryPayForTicket @@ -78,7 +78,7 @@ PewterCity_Museum_1F_EventScript_EntranceTrigger:: end PewterCity_Museum_1F_EventScript_TryPayForTicket:: - checkmoney 50, 0 + checkmoney 50 compare VAR_RESULT, FALSE goto_if_eq PewterCity_Museum_1F_EventScript_NotEnoughMoney closemessage @@ -89,7 +89,7 @@ PewterCity_Museum_1F_EventScript_TryPayForTicket:: compare VAR_TEMP_1, 2 call_if_eq PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight playse SE_SHOP - removemoney 50, 0 + removemoney 50 updatemoneybox waitse msgbox PewterCity_Museum_1F_Text_Right50YThankYou @@ -157,7 +157,7 @@ PewterCity_Museum_1F_EventScript_OldAmberScientist:: faceplayer goto_if_set FLAG_GOT_OLD_AMBER, PewterCity_Museum_1F_EventScript_AlreadyGotOldAmber msgbox PewterCity_Museum_1F_Text_WantYouToGetAmberExamined - checkitemspace ITEM_OLD_AMBER, 1 + checkitemspace ITEM_OLD_AMBER compare VAR_RESULT, FALSE goto_if_eq PewterCity_Museum_1F_EventScript_NoRoomForOldAmber setflag FLAG_GOT_OLD_AMBER diff --git a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc index 8accc5502..8b9be1fc2 100644 --- a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc +++ b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc @@ -96,7 +96,7 @@ PokemonLeague_ChampionsRoom_EventScript_EnterRoom:: applymovement OBJ_EVENT_ID_PLAYER, PokemonLeague_ChampionsRoom_Movement_PlayerExit waitmovement 0 setvar VAR_TEMP_1, 1 - warp MAP_POKEMON_LEAGUE_HALL_OF_FAME, 255, 5, 12 + warp MAP_POKEMON_LEAGUE_HALL_OF_FAME, 5, 12 waitstate releaseall end diff --git a/data/maps/PokemonTower_6F/scripts.inc b/data/maps/PokemonTower_6F/scripts.inc index e5c33b9af..5819189a1 100644 --- a/data/maps/PokemonTower_6F/scripts.inc +++ b/data/maps/PokemonTower_6F/scripts.inc @@ -6,7 +6,7 @@ PokemonTower_6F_EventScript_MarowakGhost:: textcolor 2 msgbox PokemonTower_6F_Text_BeGoneIntruders goto_if_questlog EventScript_ReleaseEnd - setwildbattle SPECIES_MAROWAK, 30, ITEM_NONE + setwildbattle SPECIES_MAROWAK, 30 special StartMarowakBattle waitstate special QuestLog_CutRecording diff --git a/data/maps/PokemonTower_7F/scripts.inc b/data/maps/PokemonTower_7F/scripts.inc index 91379e132..405209e69 100644 --- a/data/maps/PokemonTower_7F/scripts.inc +++ b/data/maps/PokemonTower_7F/scripts.inc @@ -14,7 +14,7 @@ PokemonTower_7F_EventScript_MrFuji:: setflag FLAG_RESCUED_MR_FUJI msgbox PokemonTower_7F_Text_MrFujiThankYouFollowMe closemessage - warp MAP_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE, 255, 4, 7 + warp MAP_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE, 4, 7 waitstate release end diff --git a/data/maps/PowerPlant/scripts.inc b/data/maps/PowerPlant/scripts.inc index 0be023701..129b7375f 100644 --- a/data/maps/PowerPlant/scripts.inc +++ b/data/maps/PowerPlant/scripts.inc @@ -38,7 +38,7 @@ PowerPlant_EventScript_Zapdos:: special QuestLog_CutRecording lock faceplayer - setwildbattle SPECIES_ZAPDOS, 50, ITEM_NONE + setwildbattle SPECIES_ZAPDOS, 50 waitse playmoncry SPECIES_ZAPDOS, CRY_MODE_ENCOUNTER message Text_Gyaoo @@ -76,7 +76,7 @@ PowerPlant_EventScript_Electrode1:: goto_if_questlog EventScript_ReleaseEnd lock faceplayer - setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE + setwildbattle SPECIES_ELECTRODE, 34 waitse playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 @@ -105,7 +105,7 @@ PowerPlant_EventScript_Electrode2:: goto_if_questlog EventScript_ReleaseEnd lock faceplayer - setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE + setwildbattle SPECIES_ELECTRODE, 34 waitse playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 diff --git a/data/maps/Route1/scripts.inc b/data/maps/Route1/scripts.inc index cd8a3cfaa..642fc2a6a 100644 --- a/data/maps/Route1/scripts.inc +++ b/data/maps/Route1/scripts.inc @@ -7,7 +7,7 @@ Route1_EventScript_MartClerk:: goto_if_set FLAG_GOT_POTION_ON_ROUTE_1, Route1_EventScript_AlreadyGotPotion msgbox Route1_Text_WorkAtPokeMartTakeSample textcolor 3 - checkitemspace ITEM_POTION, 1 + checkitemspace ITEM_POTION compare VAR_RESULT, FALSE goto_if_eq EventScript_BagIsFull bufferitemname STR_VAR_2, ITEM_POTION diff --git a/data/maps/Route10_PokemonCenter_1F/scripts.inc b/data/maps/Route10_PokemonCenter_1F/scripts.inc index ad106810b..bb9b8aab0 100644 --- a/data/maps/Route10_PokemonCenter_1F/scripts.inc +++ b/data/maps/Route10_PokemonCenter_1F/scripts.inc @@ -44,7 +44,7 @@ Route10_PokemonCenter_1F_EventScript_Aide:: compare VAR_0x8006, REQUIRED_OWNED_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough msgbox Route10_PokemonCenter_1F_Text_GreatHereYouGo - checkitemspace ITEM_EVERSTONE, 1 + checkitemspace ITEM_EVERSTONE compare VAR_RESULT, FALSE goto_if_eq Aide_EventScript_NoRoomForItem giveitem_msg Route10_PokemonCenter_1F_Text_ReceivedEverstoneFromAide, ITEM_EVERSTONE diff --git a/data/maps/Route11_EastEntrance_2F/scripts.inc b/data/maps/Route11_EastEntrance_2F/scripts.inc index 51baa1f53..d673d3321 100644 --- a/data/maps/Route11_EastEntrance_2F/scripts.inc +++ b/data/maps/Route11_EastEntrance_2F/scripts.inc @@ -71,7 +71,7 @@ Route11_EastEntrance_2F_EventScript_Aide:: compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough msgbox Route11_EastEntrance_2F_Text_GreatHereYouGo - checkitemspace ITEM_ITEMFINDER, 1 + checkitemspace ITEM_ITEMFINDER compare VAR_RESULT, FALSE goto_if_eq Aide_EventScript_NoRoomForItem giveitem_msg Route11_EastEntrance_2F_Text_ReceivedItemfinderFromAide, ITEM_ITEMFINDER diff --git a/data/maps/Route12/scripts.inc b/data/maps/Route12/scripts.inc index e6a1bc440..eadf4235a 100644 --- a/data/maps/Route12/scripts.inc +++ b/data/maps/Route12/scripts.inc @@ -20,7 +20,7 @@ Route12_EventScript_Snorlax:: compare VAR_RESULT, NO goto_if_eq Route12_EventScript_DontUsePokeFlute call EventScript_AwakenSnorlax - setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE + setwildbattle SPECIES_SNORLAX, 30 waitse playmoncry SPECIES_SNORLAX, CRY_MODE_ENCOUNTER delay 40 diff --git a/data/maps/Route12_FishingHouse/scripts.inc b/data/maps/Route12_FishingHouse/scripts.inc index 620753d7d..37b5c48a2 100644 --- a/data/maps/Route12_FishingHouse/scripts.inc +++ b/data/maps/Route12_FishingHouse/scripts.inc @@ -13,7 +13,7 @@ Route12_FishingHouse_EventScript_FishingGuruBrother:: end Route12_FishingHouse_EventScript_GiveSuperRod:: - checkitemspace ITEM_SUPER_ROD, 1 + checkitemspace ITEM_SUPER_ROD compare VAR_RESULT, FALSE goto_if_eq Route12_FishingHouse_EventScript_NoRoomForSuperRod additem ITEM_SUPER_ROD diff --git a/data/maps/Route12_NorthEntrance_2F/scripts.inc b/data/maps/Route12_NorthEntrance_2F/scripts.inc index c30488de4..c01d40be2 100644 --- a/data/maps/Route12_NorthEntrance_2F/scripts.inc +++ b/data/maps/Route12_NorthEntrance_2F/scripts.inc @@ -18,7 +18,7 @@ Route12_NorthEntrance_2F_EventScript_Lass:: call_if_eq Route12_NorthEntrance_2F_EventScript_TakeTMMale compare VAR_RESULT, FEMALE call_if_eq Route12_NorthEntrance_2F_EventScript_TakeTMFemale - checkitemspace ITEM_TM27, 1 + checkitemspace ITEM_TM27 compare VAR_RESULT, FALSE goto_if_eq Route12_NorthEntrance_2F_EventScript_NoRoomForTM27 giveitem_msg Route12_NorthEntrance_2F_Text_ReceivedTM27FromLittleGirl, ITEM_TM27 diff --git a/data/maps/Route15_WestEntrance_2F/scripts.inc b/data/maps/Route15_WestEntrance_2F/scripts.inc index e799ca57d..73780cc78 100644 --- a/data/maps/Route15_WestEntrance_2F/scripts.inc +++ b/data/maps/Route15_WestEntrance_2F/scripts.inc @@ -34,7 +34,7 @@ Route15_WestEntrance_2F_EventScript_Aide:: compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough msgbox Route15_WestEntrance_2F_Text_GreatHereYouGo - checkitemspace ITEM_EXP_SHARE, 1 + checkitemspace ITEM_EXP_SHARE compare VAR_RESULT, FALSE goto_if_eq Aide_EventScript_NoRoomForItem giveitem_msg Route15_WestEntrance_2F_Text_ReceivedItemFromAide, ITEM_EXP_SHARE diff --git a/data/maps/Route16/scripts.inc b/data/maps/Route16/scripts.inc index c1cd5e8a8..f921db6d6 100644 --- a/data/maps/Route16/scripts.inc +++ b/data/maps/Route16/scripts.inc @@ -39,7 +39,7 @@ Route16_EventScript_Snorlax:: compare VAR_RESULT, NO goto_if_eq Route16_EventScript_DontUsePokeFlute call EventScript_AwakenSnorlax - setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE + setwildbattle SPECIES_SNORLAX, 30 waitse playmoncry SPECIES_SNORLAX, CRY_MODE_ENCOUNTER delay 40 diff --git a/data/maps/Route16_House/scripts.inc b/data/maps/Route16_House/scripts.inc index 373259698..efa32d4d9 100644 --- a/data/maps/Route16_House/scripts.inc +++ b/data/maps/Route16_House/scripts.inc @@ -6,7 +6,7 @@ Route16_House_EventScript_Woman:: faceplayer goto_if_set FLAG_GOT_HM02, Route16_House_EventScript_AlreadyGotHM02 msgbox Route16_House_Text_FoundMySecretRetreat - checkitemspace ITEM_HM02, 1 + checkitemspace ITEM_HM02 compare VAR_RESULT, FALSE goto_if_eq Route16_House_EventScript_NoRoomForHM02 giveitem_msg Route16_House_Text_ReceivedHM02FromGirl, ITEM_HM02 diff --git a/data/maps/Route16_NorthEntrance_2F/scripts.inc b/data/maps/Route16_NorthEntrance_2F/scripts.inc index 63f7c7c8a..c2d9c7f86 100644 --- a/data/maps/Route16_NorthEntrance_2F/scripts.inc +++ b/data/maps/Route16_NorthEntrance_2F/scripts.inc @@ -34,7 +34,7 @@ Route16_NorthEntrance_2F_EventScript_Aide:: compare VAR_0x8006, REQUIRED_CAUGHT_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough msgbox Route16_NorthEntrance_2F_Text_GreatHereYouGo - checkitemspace ITEM_AMULET_COIN, 1 + checkitemspace ITEM_AMULET_COIN compare VAR_RESULT, FALSE goto_if_eq Aide_EventScript_NoRoomForItem giveitem_msg Route16_NorthEntrance_2F_Text_ReceivedAmuletCoinFromAide, ITEM_AMULET_COIN diff --git a/data/maps/Route24/scripts.inc b/data/maps/Route24/scripts.inc index dbcc621bc..12819e1e3 100644 --- a/data/maps/Route24/scripts.inc +++ b/data/maps/Route24/scripts.inc @@ -9,7 +9,7 @@ Route24_EventScript_Rocket:: compare VAR_MAP_SCENE_ROUTE24, 1 goto_if_eq Route24_EventScript_RocketPostBattle msgbox Route24_Text_JustEarnedFabulousPrize - checkitemspace ITEM_NUGGET, 1 + checkitemspace ITEM_NUGGET compare VAR_RESULT, FALSE goto_if_eq Route24_EventScript_NoRoomForNugget call Route24_EventScript_BattleRocket @@ -47,7 +47,7 @@ Route24_EventScript_RocketTrigger:: applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 msgbox Route24_Text_JustEarnedFabulousPrize - checkitemspace ITEM_NUGGET, 1 + checkitemspace ITEM_NUGGET compare VAR_RESULT, FALSE goto_if_eq Route24_EventScript_NoRoomForNuggetTrigger call Route24_EventScript_BattleRocket diff --git a/data/maps/Route25_SeaCottage/scripts.inc b/data/maps/Route25_SeaCottage/scripts.inc index 182aec7e7..5b2fea3a7 100644 --- a/data/maps/Route25_SeaCottage/scripts.inc +++ b/data/maps/Route25_SeaCottage/scripts.inc @@ -110,7 +110,7 @@ Route25_SeaCottage_EventScript_BillGiveSSTicket:: call_if_eq Route25_SeaCottage_EventScript_BillThanksMale compare VAR_RESULT, FEMALE call_if_eq Route25_SeaCottage_EventScript_BillThanksFemale - checkitemspace ITEM_SS_TICKET, 1 + checkitemspace ITEM_SS_TICKET compare VAR_RESULT, FALSE goto_if_eq Route25_SeaCottage_EventScript_NoRoomForSSTicket giveitem_msg Route25_SeaCottage_Text_ReceivedSSTicketFromBill, ITEM_SS_TICKET, 1, MUS_OBTAIN_KEY_ITEM diff --git a/data/maps/Route2_EastBuilding/scripts.inc b/data/maps/Route2_EastBuilding/scripts.inc index 60d995140..57f997f2d 100644 --- a/data/maps/Route2_EastBuilding/scripts.inc +++ b/data/maps/Route2_EastBuilding/scripts.inc @@ -18,7 +18,7 @@ Route2_EastBuilding_EventScript_Aide:: compare VAR_0x8006, REQUIRED_SEEN_MONS goto_if_lt Aide_EventScript_HaventCaughtEnough msgbox Route2_EastBuilding_Text_GreatHereYouGo - checkitemspace ITEM_HM05, 1 + checkitemspace ITEM_HM05 compare VAR_RESULT, FALSE goto_if_eq Aide_EventScript_NoRoomForItem giveitem_msg Route2_EastBuilding_Text_ReceivedHM05FromAide, ITEM_HM05 diff --git a/data/maps/Route4_PokemonCenter_1F/scripts.inc b/data/maps/Route4_PokemonCenter_1F/scripts.inc index f7a37ac6e..b52a41390 100644 --- a/data/maps/Route4_PokemonCenter_1F/scripts.inc +++ b/data/maps/Route4_PokemonCenter_1F/scripts.inc @@ -24,7 +24,7 @@ Route4_PokemonCenter_1F_EventScript_MagikarpSalesman:: lock faceplayer goto_if_set FLAG_BOUGHT_MAGIKARP, Route4_PokemonCenter_1F_EventScript_AlreadyBoughtMagikarp - showmoneybox 0, 0, 0 + showmoneybox 0, 0 checkplayergender compare VAR_RESULT, MALE goto_if_eq Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpMale @@ -45,12 +45,12 @@ Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpFemale:: Route4_PokemonCenter_1F_EventScript_TryBuyMagikarp:: compare VAR_RESULT, NO goto_if_eq Route4_PokemonCenter_1F_EventScript_DeclineMagikarp - checkmoney MAGIKARP_PRICE, 0 + checkmoney MAGIKARP_PRICE compare VAR_RESULT, FALSE goto_if_eq Route4_PokemonCenter_1F_EventScript_NotEnoughMoney textcolor 3 setvar VAR_TEMP_1, SPECIES_MAGIKARP - givemon SPECIES_MAGIKARP, 5, ITEM_NONE + givemon SPECIES_MAGIKARP, 5 compare VAR_RESULT, 0 goto_if_eq Route4_PokemonCenter_1F_EventScript_BuyMagikarpParty compare VAR_RESULT, 1 @@ -107,7 +107,7 @@ Route4_PokemonCenter_1F_EventScript_BoughtMagikarp:: end Route4_PokemonCenter_1F_EventScript_PayForMagikarp:: - removemoney MAGIKARP_PRICE, 0 + removemoney MAGIKARP_PRICE updatemoneybox playfanfare MUS_LEVEL_UP message Route4_PokemonCenter_1F_Text_PaidOutrageouslyForMagikarp diff --git a/data/maps/Route5_SouthEntrance/scripts.inc b/data/maps/Route5_SouthEntrance/scripts.inc index f9a914e26..831d97169 100644 --- a/data/maps/Route5_SouthEntrance/scripts.inc +++ b/data/maps/Route5_SouthEntrance/scripts.inc @@ -36,7 +36,7 @@ Route5_SouthEntrance_EventScript_GuardTrigger:: end Route5_SouthEntrance_EventScript_GiveTea:: - removeitem ITEM_TEA, 1 + removeitem ITEM_TEA goto Route5_SouthEntrance_EventScript_GuardDrinkTea end diff --git a/data/maps/Route6_NorthEntrance/scripts.inc b/data/maps/Route6_NorthEntrance/scripts.inc index 6fbbfe87d..a54806e4c 100644 --- a/data/maps/Route6_NorthEntrance/scripts.inc +++ b/data/maps/Route6_NorthEntrance/scripts.inc @@ -36,7 +36,7 @@ Route6_NorthEntrance_EventScript_GuardTrigger:: end Route6_NorthEntrance_EventScript_GiveTea:: - removeitem ITEM_TEA, 1 + removeitem ITEM_TEA goto Route6_NorthEntrance_EventScript_GuardDrinkTea end diff --git a/data/maps/Route7_EastEntrance/scripts.inc b/data/maps/Route7_EastEntrance/scripts.inc index 6786a148b..c2be1fe8e 100644 --- a/data/maps/Route7_EastEntrance/scripts.inc +++ b/data/maps/Route7_EastEntrance/scripts.inc @@ -36,7 +36,7 @@ Route7_EastEntrance_EventScript_GuardTrigger:: end Route7_EastEntrance_EventScript_GiveTea:: - removeitem ITEM_TEA, 1 + removeitem ITEM_TEA goto Route7_EastEntrance_EventScript_GuardDrinkTea end diff --git a/data/maps/Route8_WestEntrance/scripts.inc b/data/maps/Route8_WestEntrance/scripts.inc index f9ca6bda5..4a6af937b 100644 --- a/data/maps/Route8_WestEntrance/scripts.inc +++ b/data/maps/Route8_WestEntrance/scripts.inc @@ -36,19 +36,19 @@ Route8_WestEntrance_EventScript_GuardTrigger:: end Route8_WestEntrance_EventScript_GiveTea:: - removeitem ITEM_TEA, 1 + removeitem ITEM_TEA goto Route8_WestEntrance_EventScript_GuardDrinkTea end @ Unused Route8_WestEntrance_EventScript_GiveSodaPop:: - removeitem ITEM_SODA_POP, 1 + removeitem ITEM_SODA_POP goto Route8_WestEntrance_EventScript_GuardDrinkTea end @ Unused Route8_WestEntrance_EventScript_GiveLemonade:: - removeitem ITEM_LEMONADE, 1 + removeitem ITEM_LEMONADE goto Route8_WestEntrance_EventScript_GuardDrinkTea end diff --git a/data/maps/SSAnne_Exterior/scripts.inc b/data/maps/SSAnne_Exterior/scripts.inc index acd1c6aac..3d00d7272 100644 --- a/data/maps/SSAnne_Exterior/scripts.inc +++ b/data/maps/SSAnne_Exterior/scripts.inc @@ -29,7 +29,7 @@ SSAnne_Exterior_ExitSSAnne:: waitmovement 0 setvar VAR_MAP_SCENE_VERMILION_CITY, 2 setvar VAR_VERMILION_CITY_TICKET_CHECK_TRIGGER, 0 - warp MAP_VERMILION_CITY, 255, 23, 34 + warp MAP_VERMILION_CITY, 23, 34 waitstate releaseall end diff --git a/data/maps/SafariZone_SecretHouse/scripts.inc b/data/maps/SafariZone_SecretHouse/scripts.inc index 8b3102f82..73ac94301 100644 --- a/data/maps/SafariZone_SecretHouse/scripts.inc +++ b/data/maps/SafariZone_SecretHouse/scripts.inc @@ -6,7 +6,7 @@ SafariZone_SecretHouse_EventScript_Attendant:: faceplayer goto_if_set FLAG_GOT_HM03, SafariZone_SecretHouse_EventScript_ExplainSurf msgbox SafariZone_SecretHouse_Text_CongratsYouveWon - checkitemspace ITEM_HM03, 1 + checkitemspace ITEM_HM03 compare VAR_RESULT, FALSE goto_if_eq SafariZone_SecretHouse_EventScript_NoRoomForHM03 giveitem_msg SafariZone_SecretHouse_Text_ReceivedHM03FromAttendant, ITEM_HM03 diff --git a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc index e30cb601b..a0e19293b 100644 --- a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc +++ b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc @@ -22,7 +22,7 @@ SaffronCity_CopycatsHouse_2F_EventScript_Copycat:: special QuestLog_CutRecording lock faceplayer - checkitem ITEM_POKE_DOLL, 1 + checkitem ITEM_POKE_DOLL compare VAR_RESULT, TRUE goto_if_eq EventScript_MimicTutor checkplayergender diff --git a/data/maps/SaffronCity_Dojo/scripts.inc b/data/maps/SaffronCity_Dojo/scripts.inc index 126c2a6c5..4df12e773 100644 --- a/data/maps/SaffronCity_Dojo/scripts.inc +++ b/data/maps/SaffronCity_Dojo/scripts.inc @@ -60,7 +60,7 @@ SaffronCity_Dojo_EventScript_HitmonchanBall:: SaffronCity_Dojo_EventScript_GiveHitmon:: hidemonpic - givemon VAR_TEMP_1, 25, ITEM_NONE + givemon VAR_TEMP_1, 25 compare VAR_RESULT, 0 goto_if_eq SaffronCity_Dojo_EventScript_ReceivedHitmonParty compare VAR_RESULT, 1 diff --git a/data/maps/SaffronCity_Gym/scripts.inc b/data/maps/SaffronCity_Gym/scripts.inc index c142e9e7c..932554c0b 100644 --- a/data/maps/SaffronCity_Gym/scripts.inc +++ b/data/maps/SaffronCity_Gym/scripts.inc @@ -21,7 +21,7 @@ SaffronCity_Gym_EventScript_DefeatedSabrina:: SaffronCity_Gym_EventScript_GiveTM04:: msgbox SaffronCity_Gym_Text_ExplainMarshBadgeTakeThis - checkitemspace ITEM_TM04, 1 + checkitemspace ITEM_TM04 compare VAR_RESULT, FALSE goto_if_eq SaffronCity_Gym_EventScript_NoRoomForTM04 giveitem_msg SaffronCity_Gym_Text_ReceivedTM04FromSabrina, ITEM_TM04 diff --git a/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc b/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc index 1455945d7..724850fde 100644 --- a/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc +++ b/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc @@ -6,7 +6,7 @@ SaffronCity_MrPsychicsHouse_EventScript_MrPsychic:: faceplayer goto_if_set FLAG_GOT_TM29_FROM_MR_PSYCHIC, SaffronCity_MrPsychicsHouse_EventScript_AlreadyGotTM29 msgbox SaffronCity_MrPsychicsHouse_Text_YouWantedThis - checkitemspace ITEM_TM29, 1 + checkitemspace ITEM_TM29 compare VAR_RESULT, FALSE goto_if_eq SaffronCity_MrPsychicsHouse_EventScript_NoRoomForTM29 giveitem_msg SaffronCity_MrPsychicsHouse_Text_ReceivedTM29FromMrPsychic, ITEM_TM29 diff --git a/data/maps/SeafoamIslands_B3F/scripts.inc b/data/maps/SeafoamIslands_B3F/scripts.inc index e130a05d9..5ef1303d1 100644 --- a/data/maps/SeafoamIslands_B3F/scripts.inc +++ b/data/maps/SeafoamIslands_B3F/scripts.inc @@ -43,7 +43,7 @@ SeafoamIslands_B3F_EventScript_EnterByFalling:: compare VAR_0x8008, 24 call_if_ge SeafoamIslands_B3F_EventScript_RideCurrentClose setvar VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F, 1 - warp MAP_SEAFOAM_ISLANDS_B4F, 255, 27, 21 + warp MAP_SEAFOAM_ISLANDS_B4F, 27, 21 waitstate releaseall end diff --git a/data/maps/SeafoamIslands_B4F/scripts.inc b/data/maps/SeafoamIslands_B4F/scripts.inc index 342c46759..40b91f698 100644 --- a/data/maps/SeafoamIslands_B4F/scripts.inc +++ b/data/maps/SeafoamIslands_B4F/scripts.inc @@ -162,7 +162,7 @@ SeafoamIslands_B4F_EventScript_Articuno:: special QuestLog_CutRecording lock faceplayer - setwildbattle SPECIES_ARTICUNO, 50, ITEM_NONE + setwildbattle SPECIES_ARTICUNO, 50 waitse playmoncry SPECIES_ARTICUNO, CRY_MODE_ENCOUNTER message Text_Gyaoo diff --git a/data/maps/SevenIsland_House_Room1/scripts.inc b/data/maps/SevenIsland_House_Room1/scripts.inc index fda16db24..e36ea4ea4 100644 --- a/data/maps/SevenIsland_House_Room1/scripts.inc +++ b/data/maps/SevenIsland_House_Room1/scripts.inc @@ -118,7 +118,7 @@ SevenIsland_House_Room1_EventScript_TrainerVisiting:: call_if_eq SevenIsland_House_Room1_EventScript_EnterBattleRoomEast compare VAR_FACING, DIR_WEST call_if_eq SevenIsland_House_Room1_EventScript_EnterBattleRoomWest - warp MAP_SEVEN_ISLAND_HOUSE_ROOM2, 255, 3, 1 + warp MAP_SEVEN_ISLAND_HOUSE_ROOM2, 3, 1 waitstate release end diff --git a/data/maps/SevenIsland_House_Room2/scripts.inc b/data/maps/SevenIsland_House_Room2/scripts.inc index 2f319eebf..cc1e6dd8f 100644 --- a/data/maps/SevenIsland_House_Room2/scripts.inc +++ b/data/maps/SevenIsland_House_Room2/scripts.inc @@ -34,7 +34,7 @@ SevenIsland_House_Room2_EventScript_BattleVisitingTrainer:: waitmovement 0 special LoadPlayerParty setvar VAR_TEMP_1, 1 - warp MAP_SEVEN_ISLAND_HOUSE_ROOM1, 255, 4, 1 + warp MAP_SEVEN_ISLAND_HOUSE_ROOM1, 4, 1 waitstate releaseall end diff --git a/data/maps/SilphCo_11F/scripts.inc b/data/maps/SilphCo_11F/scripts.inc index 61d2ef04b..5abe486ea 100644 --- a/data/maps/SilphCo_11F/scripts.inc +++ b/data/maps/SilphCo_11F/scripts.inc @@ -19,7 +19,7 @@ SilphCo_11F_EventScript_President:: call_if_eq SilphCo_11F_EventScript_PresidentThanksMale compare VAR_RESULT, FEMALE call_if_eq SilphCo_11F_EventScript_PresidentThanksFemale - checkitemspace ITEM_MASTER_BALL, 1 + checkitemspace ITEM_MASTER_BALL compare VAR_RESULT, FALSE goto_if_eq SilphCo_11F_EventScript_NoRoomForMasterBall giveitem_msg SilphCo_11F_Text_ObtainedMasterBallFromPresident, ITEM_MASTER_BALL, 1, MUS_OBTAIN_KEY_ITEM diff --git a/data/maps/SilphCo_7F/scripts.inc b/data/maps/SilphCo_7F/scripts.inc index 353ed43af..77d38099e 100644 --- a/data/maps/SilphCo_7F/scripts.inc +++ b/data/maps/SilphCo_7F/scripts.inc @@ -129,7 +129,7 @@ SilphCo_7F_EventScript_LaprasGuy:: goto_if_set FLAG_GOT_LAPRAS_FROM_SILPH, SilphCo_7F_EventScript_AlreadyGotLapras msgbox SilphCo_7F_Text_HaveMonForSavingUs setvar VAR_TEMP_1, SPECIES_LAPRAS - givemon SPECIES_LAPRAS, 25, ITEM_NONE + givemon SPECIES_LAPRAS, 25 compare VAR_RESULT, 0 goto_if_eq SilphCo_7F_EventScript_ReceiveLaprasParty compare VAR_RESULT, 1 diff --git a/data/maps/ThreeIsland/scripts.inc b/data/maps/ThreeIsland/scripts.inc index f75505ea2..b6bc87870 100644 --- a/data/maps/ThreeIsland/scripts.inc +++ b/data/maps/ThreeIsland/scripts.inc @@ -56,7 +56,7 @@ ThreeIsland_EventScript_GiveFullRestore:: applymovement LOCALID_ANTIBIKER1, Movement_FacePlayer waitmovement 0 msgbox ThreeIsland_Text_ThankYouOhYourMonGotHurt - checkitemspace ITEM_FULL_RESTORE, 1 + checkitemspace ITEM_FULL_RESTORE compare VAR_RESULT, FALSE goto_if_eq ThreeIsland_EventScript_NoRoomForFullRestore msgreceiveditem ThreeIsland_Text_GivenFullRestore, ITEM_FULL_RESTORE diff --git a/data/maps/ThreeIsland_BerryForest/scripts.inc b/data/maps/ThreeIsland_BerryForest/scripts.inc index 8f5210dec..61d329939 100644 --- a/data/maps/ThreeIsland_BerryForest/scripts.inc +++ b/data/maps/ThreeIsland_BerryForest/scripts.inc @@ -6,7 +6,7 @@ ThreeIsland_BerryForest_MapScripts:: ThreeIsland_BerryForest_OnTransition:: setworldmapflag FLAG_WORLD_MAP_THREE_ISLAND_BERRY_FOREST - setescapewarp MAP_THREE_ISLAND_BOND_BRIDGE, 255, 12, 6 + setescapewarp MAP_THREE_ISLAND_BOND_BRIDGE, 12, 6 end ThreeIsland_BerryForest_EventScript_Lostelle:: @@ -23,7 +23,7 @@ ThreeIsland_BerryForest_EventScript_Lostelle:: waitse playmoncry SPECIES_HYPNO, CRY_MODE_ENCOUNTER waitmoncry - setwildbattle SPECIES_HYPNO, 30, ITEM_NONE + setwildbattle SPECIES_HYPNO, 30 dowildbattle special QuestLog_CutRecording applymovement LOCALID_LOSTELLE, Movement_FacePlayer @@ -39,7 +39,7 @@ ThreeIsland_BerryForest_EventScript_Lostelle:: setflag FLAG_HIDE_LOSTELLE_IN_BERRY_FOREST setvar VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 2 clearflag FLAG_HIDE_TWO_ISLAND_GAME_CORNER_LOSTELLE - warp MAP_TWO_ISLAND_JOYFUL_GAME_CORNER, 255, 6, 6 + warp MAP_TWO_ISLAND_JOYFUL_GAME_CORNER, 6, 6 waitstate release end diff --git a/data/maps/TrainerTower_Elevator/scripts.inc b/data/maps/TrainerTower_Elevator/scripts.inc index eb871699e..d46770895 100644 --- a/data/maps/TrainerTower_Elevator/scripts.inc +++ b/data/maps/TrainerTower_Elevator/scripts.inc @@ -38,7 +38,7 @@ TrainerTower_Elevator_EventScript_ChooseFloor:: TrainerTower_Elevator_EventScript_SelectLobby:: setvar VAR_0x8006, 3 - setdynamicwarp MAP_TRAINER_TOWER_LOBBY, 255, 17, 8 + setdynamicwarp MAP_TRAINER_TOWER_LOBBY, 17, 8 compare VAR_ELEVATOR_FLOOR, 3 goto_if_eq TrainerTower_Elevator_EventScript_CloseFloorSelect call TrainerTower_Elevator_EventScript_MoveElevator @@ -47,7 +47,7 @@ TrainerTower_Elevator_EventScript_SelectLobby:: delay 25 applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Elevator_Movement_ExitElevator waitmovement 0 - warp MAP_TRAINER_TOWER_LOBBY, 255, 17, 8 + warp MAP_TRAINER_TOWER_LOBBY, 17, 8 waitstate releaseall end diff --git a/data/maps/TwoIsland_House/scripts.inc b/data/maps/TwoIsland_House/scripts.inc index 024c61f15..da3e4d171 100644 --- a/data/maps/TwoIsland_House/scripts.inc +++ b/data/maps/TwoIsland_House/scripts.inc @@ -21,7 +21,7 @@ TwoIsland_House_EventScript_MoveManiac:: end TwoIsland_House_EventScript_CheckPlayerHasMushrooms:: - checkitem ITEM_BIG_MUSHROOM, 1 + checkitem ITEM_BIG_MUSHROOM compare VAR_RESULT, TRUE call_if_eq TwoIsland_House_EventScript_SetHasBigMushroom checkitem ITEM_TINY_MUSHROOM, 2 @@ -75,7 +75,7 @@ TwoIsland_House_EventScript_ChooseMoveToTeach:: end TwoIsland_House_EventScript_GiveBigMushroom:: - removeitem ITEM_BIG_MUSHROOM, 1 + removeitem ITEM_BIG_MUSHROOM textcolor 3 msgbox TwoIsland_House_Text_HandedOverOneBigMushroom call EventScript_RestorePrevTextColor diff --git a/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc b/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc index e2a5cdf02..0b67e5836 100644 --- a/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc +++ b/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc @@ -163,13 +163,13 @@ TwoIsland_JoyfulGameCorner_EventScript_GiveDaddyMeteorite:: waitmessage waitfanfare call EventScript_RestorePrevTextColor - removeitem ITEM_METEORITE, 1 + removeitem ITEM_METEORITE msgbox TwoIsland_JoyfulGameCorner_Text_OhThisIsFromBill goto TwoIsland_JoyfulGameCorner_EventScript_ReceiveMoonStone end TwoIsland_JoyfulGameCorner_EventScript_ReceiveMoonStone:: - checkitemspace ITEM_MOON_STONE, 1 + checkitemspace ITEM_MOON_STONE compare VAR_RESULT, FALSE goto_if_eq TwoIsland_JoyfulGameCorner_EventScript_NoRoomForMoonStone additem ITEM_MOON_STONE diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc index 128850f03..c49b8d38e 100644 --- a/data/maps/VermilionCity/scripts.inc +++ b/data/maps/VermilionCity/scripts.inc @@ -60,7 +60,7 @@ VermilionCity_EventScript_FerrySailor:: VermilionCity_EventScript_CheckHasMysticTicket:: goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, EventScript_SetResultFalse - checkitem ITEM_MYSTIC_TICKET, 1 + checkitem ITEM_MYSTIC_TICKET compare VAR_RESULT, FALSE goto_if_eq EventScript_SetResultFalse goto EventScript_SetResultTrue @@ -68,7 +68,7 @@ VermilionCity_EventScript_CheckHasMysticTicket:: VermilionCity_EventScript_CheckHasAuroraTicket:: goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, EventScript_SetResultFalse - checkitem ITEM_AURORA_TICKET, 1 + checkitem ITEM_AURORA_TICKET compare VAR_RESULT, FALSE goto_if_eq EventScript_SetResultFalse goto EventScript_SetResultTrue diff --git a/data/maps/VermilionCity_Gym/scripts.inc b/data/maps/VermilionCity_Gym/scripts.inc index 5e1ad744b..320c54ad0 100644 --- a/data/maps/VermilionCity_Gym/scripts.inc +++ b/data/maps/VermilionCity_Gym/scripts.inc @@ -229,7 +229,7 @@ VermilionCity_Gym_EventScript_ShowOaksAide:: VermilionCity_Gym_EventScript_GiveTM34:: msgbox VermilionCity_Gym_Text_ExplainThunderBadgeTakeThis - checkitemspace ITEM_TM34, 1 + checkitemspace ITEM_TM34 compare VAR_RESULT, FALSE goto_if_eq VermilionCity_Gym_EventScript_NoRoomForTM34 giveitem_msg VermilionCity_Gym_Text_ReceivedTM34FromLtSurge, ITEM_TM34 diff --git a/data/maps/VermilionCity_House1/scripts.inc b/data/maps/VermilionCity_House1/scripts.inc index e4194b549..e3d7a4605 100644 --- a/data/maps/VermilionCity_House1/scripts.inc +++ b/data/maps/VermilionCity_House1/scripts.inc @@ -18,7 +18,7 @@ VermilionCity_House1_EventScript_AlreadyGotOldRod:: end VermilionCity_House1_EventScript_GiveOldRod:: - checkitemspace ITEM_OLD_ROD, 1 + checkitemspace ITEM_OLD_ROD compare VAR_RESULT, FALSE goto_if_eq VermilionCity_House1_EventScript_NoRoomForOldRod additem ITEM_OLD_ROD diff --git a/data/maps/VermilionCity_PokemonFanClub/scripts.inc b/data/maps/VermilionCity_PokemonFanClub/scripts.inc index 6c0efe151..28ee7527c 100644 --- a/data/maps/VermilionCity_PokemonFanClub/scripts.inc +++ b/data/maps/VermilionCity_PokemonFanClub/scripts.inc @@ -25,7 +25,7 @@ VermilionCity_PokemonFanClub_EventScript_AlreadyHeardStory:: VermilionCity_PokemonFanClub_EventScript_ChairmanStory:: msgbox VermilionCity_PokemonFanClub_Text_ChairmansStory - checkitemspace ITEM_BIKE_VOUCHER, 1 + checkitemspace ITEM_BIKE_VOUCHER compare VAR_RESULT, FALSE goto_if_eq VermilionCity_PokemonFanClub_EventScript_NoRoomForBikeVoucher setflag FLAG_GOT_BIKE_VOUCHER diff --git a/data/maps/ViridianCity_Gym/scripts.inc b/data/maps/ViridianCity_Gym/scripts.inc index a7fad40be..3fdf779d0 100644 --- a/data/maps/ViridianCity_Gym/scripts.inc +++ b/data/maps/ViridianCity_Gym/scripts.inc @@ -27,7 +27,7 @@ ViridianCity_Gym_EventScript_DefeatedGiovanni:: ViridianCity_Gym_EventScript_GiveTM26:: msgbox ViridianCity_Gym_Text_ExplainEarthBadgeTakeThis - checkitemspace ITEM_TM26, 1 + checkitemspace ITEM_TM26 compare VAR_RESULT, FALSE goto_if_eq ViridianCity_Gym_EventScript_NoRoomForTM26 giveitem_msg ViridianCity_Gym_Text_ReceivedTM26FromGiovanni, ITEM_TM26 diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index dec8d1cb6..00b767374 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -330,7 +330,7 @@ CableClub_EventScript_EnterColosseum:: compare VAR_0x8004, USING_MULTI_BATTLE goto_if_eq CableClub_EventScript_WarpTo4PColosseum special SetCableClubWarp - warp MAP_BATTLE_COLOSSEUM_2P, 255, 6, 8 + warp MAP_BATTLE_COLOSSEUM_2P, 6, 8 special DoCableClubWarp waitstate end @@ -343,7 +343,7 @@ CableClub_EventScript_PlayerApproachLinkRoomRight:: CableClub_EventScript_WarpTo4PColosseum:: special SetCableClubWarp - warp MAP_BATTLE_COLOSSEUM_4P, 255, 5, 8 + warp MAP_BATTLE_COLOSSEUM_4P, 5, 8 special DoCableClubWarp waitstate end @@ -437,7 +437,7 @@ CableClub_EventScript_EnterTradeCenter:: waitdooranim release special SetCableClubWarp - setwarp MAP_TRADE_CENTER, 255, 5, 8 + setwarp MAP_TRADE_CENTER, 5, 8 special DoCableClubWarp waitstate end @@ -836,7 +836,7 @@ CableClub_EventScript_EnterUnionRoom:: waitdooranim special Script_ResetUnionRoomTrade special SetCableClubWarp - warpspinenter MAP_UNION_ROOM, 255, 7, 11 + warpspinenter MAP_UNION_ROOM, 7, 11 waitstate special UnionRoomSpecial waitstate diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index e227cbf52..6b14a58be 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -2,7 +2,7 @@ Route5_PokemonDayCare_EventScript_DaycareMan:: goto_if_questlog EventScript_ReleaseEnd lock faceplayer - showmoneybox 0, 0, 0 + showmoneybox 0, 0 specialvar VAR_RESULT, IsThereMonInRoute5Daycare compare VAR_RESULT, TRUE goto_if_eq Route5_PokemonDayCare_EventScript_CheckOnMon @@ -22,7 +22,7 @@ Route5_PokemonDayCare_EventScript_TryGiveMon:: hidemoneybox special ChooseSendDaycareMon waitstate - showmoneybox 0, 0, 0 + showmoneybox 0, 0 compare VAR_0x8004, PARTY_SIZE goto_if_ge Route5_PokemonDayCare_EventScript_ComeAgain specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot diff --git a/data/scripts/hole.inc b/data/scripts/hole.inc index 6ca793691..ae64ccf5f 100644 --- a/data/scripts/hole.inc +++ b/data/scripts/hole.inc @@ -15,7 +15,7 @@ EventScript_FallDownHole:: waitmovement 0 playse SE_FALL delay 60 - warphole 0xFFFF + warphole MAP_UNDEFINED waitstate end diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index 711f6a5a3..d65cb1f18 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -390,7 +390,7 @@ EventScript_MimicTutor:: faceplayer compare VAR_RESULT, 0 goto_if_eq EventScript_MimicDeclined - removeitem ITEM_POKE_DOLL, 1 + removeitem ITEM_POKE_DOLL setflag FLAG_TUTOR_MIMIC goto EventScript_MimicTaught end diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 96d8be444..93e2292f8 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -1,13 +1,13 @@ SafariZone_EventScript_OutOfBallsMidBattle:: setvar VAR_MAP_SCENE_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE, 3 special ExitSafariMode - setwarp MAP_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE, 255, 4, 1 + setwarp MAP_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE, 4, 1 end SafariZone_EventScript_Exit:: setvar VAR_MAP_SCENE_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE, 1 special ExitSafariMode - warp MAP_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE, 255, 4, 1 + warp MAP_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE, 4, 1 waitstate end diff --git a/data/scripts/trainer_card.inc b/data/scripts/trainer_card.inc index 6ba90358b..9c70b4c7c 100644 --- a/data/scripts/trainer_card.inc +++ b/data/scripts/trainer_card.inc @@ -2,15 +2,15 @@ CeladonCity_GameCorner_EventScript_PhotoPrinter:: lockall - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox CeladonCity_GameCorner_Text_TryPokemonPrinter, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CeladonCity_GameCorner_EventScript_DeclinePhoto - checkmoney 50, 0 + checkmoney 50 compare VAR_RESULT, FALSE goto_if_eq CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto playse SE_SHOP - removemoney 50, 0 + removemoney 50 updatemoneybox waitse message CeladonCity_GameCorner_Text_ChoosePrintType diff --git a/data/scripts/trainer_tower.inc b/data/scripts/trainer_tower.inc index 3c54a90c4..bedf9bb6a 100644 --- a/data/scripts/trainer_tower.inc +++ b/data/scripts/trainer_tower.inc @@ -97,7 +97,7 @@ TrainerTower_EventScript_EndEnterFloor: @ Never reached TrainerTower_EventScript_WarpToLobby:: - warp MAP_TRAINER_TOWER_LOBBY, 255, 9, 7 + warp MAP_TRAINER_TOWER_LOBBY, 9, 7 waitstate @@ -221,7 +221,7 @@ TrainerTower_EventScript_SetFloorCleared: TrainerTower_EventScript_WarpToLobbyLost:: special HealPlayerParty ttower_setlost - warp MAP_TRAINER_TOWER_LOBBY, 255, 9, 7 + warp MAP_TRAINER_TOWER_LOBBY, 9, 7 waitstate diff --git a/data/scripts/white_out.inc b/data/scripts/white_out.inc index c86341d8e..679b9fb7b 100644 --- a/data/scripts/white_out.inc +++ b/data/scripts/white_out.inc @@ -44,7 +44,7 @@ EventScript_FieldPoison:: end EventScript_FieldWhiteOut:: - checkmoney 1, 0 + checkmoney 1 compare VAR_RESULT, FALSE goto_if_eq EventScript_FieldWhiteOutNoMoney compare VAR_RESULT, TRUE From 0c1adf21150fde3d26d5d5522f911b88b0d7ddf0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 15:29:16 -0400 Subject: [PATCH 3/7] Use seteventmon --- data/maps/BirthIsland_Exterior/scripts.inc | 5 +---- data/maps/NavelRock_Base/scripts.inc | 5 +---- data/maps/NavelRock_Summit/scripts.inc | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 3c0bd7681..f22754aad 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -84,10 +84,7 @@ BirthIsland_Exterior_EventScript_Deoxys:: delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_DEOXYS - setvar VAR_0x8004, SPECIES_DEOXYS - setvar VAR_0x8005, 30 @ Level - setvar VAR_0x8006, ITEM_NONE - special CreateEventLegalEnemyMon + seteventmon SPECIES_DEOXYS, 30 setflag FLAG_SYS_SPECIAL_WILD_BATTLE special StartLegendaryBattle waitstate diff --git a/data/maps/NavelRock_Base/scripts.inc b/data/maps/NavelRock_Base/scripts.inc index b63ac1fd7..1dee3d547 100644 --- a/data/maps/NavelRock_Base/scripts.inc +++ b/data/maps/NavelRock_Base/scripts.inc @@ -56,10 +56,7 @@ NavelRock_Base_EventScript_Lugia:: playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER waitmoncry delay 20 - setvar VAR_0x8004, SPECIES_LUGIA - setvar VAR_0x8005, 70 @ Level - setvar VAR_0x8006, ITEM_NONE - special CreateEventLegalEnemyMon + seteventmon SPECIES_LUGIA, 70 setflag FLAG_SYS_SPECIAL_WILD_BATTLE special StartLegendaryBattle waitstate diff --git a/data/maps/NavelRock_Summit/scripts.inc b/data/maps/NavelRock_Summit/scripts.inc index 1f01b72eb..96df785a0 100644 --- a/data/maps/NavelRock_Summit/scripts.inc +++ b/data/maps/NavelRock_Summit/scripts.inc @@ -60,10 +60,7 @@ NavelRock_Summit_EventScript_HoOh:: applymovement LOCALID_HO_OH, Movement_HoOhApproach waitmovement 0 special RemoveCameraObject - setvar VAR_0x8004, SPECIES_HO_OH - setvar VAR_0x8005, 70 @ Level - setvar VAR_0x8006, ITEM_NONE - special CreateEventLegalEnemyMon + seteventmon SPECIES_HO_OH, 70 setflag FLAG_SYS_SPECIAL_WILD_BATTLE special StartLegendaryBattle waitstate From fbdbc5851ca533fd85fa5ad854f6667689cd6515 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 16:03:42 -0400 Subject: [PATCH 4/7] Add npc text color constants --- asm/macros/event.inc | 3 +- data/event_scripts.s | 2 +- .../scripts.inc | 6 +- data/maps/CeladonCity_GameCorner/scripts.inc | 8 +- .../scripts.inc | 8 +- data/maps/CeruleanCity/scripts.inc | 6 +- data/maps/CinnabarIsland/scripts.inc | 6 +- data/maps/CinnabarIsland_Gym/scripts.inc | 12 +- .../scripts.inc | 10 +- .../FiveIsland_LostCave_Room10/scripts.inc | 2 +- .../FiveIsland_MemorialPillar/scripts.inc | 2 +- .../FiveIsland_ResortGorgeous/scripts.inc | 2 +- .../scripts.inc | 10 +- .../FiveIsland_WaterLabyrinth/scripts.inc | 2 +- data/maps/FourIsland/scripts.inc | 4 +- .../FourIsland_IcefallCave_Back/scripts.inc | 18 +- .../FourIsland_PokemonDayCare/scripts.inc | 2 +- .../scripts.inc | 10 +- .../maps/FuchsiaCity_WardensHouse/scripts.inc | 2 +- data/maps/MtEmber_Exterior/scripts.inc | 2 +- data/maps/MtMoon_B2F/scripts.inc | 6 +- data/maps/OneIsland/scripts.inc | 2 +- data/maps/OneIsland_Harbor/scripts.inc | 2 +- .../OneIsland_PokemonCenter_1F/scripts.inc | 12 +- data/maps/PalletTown/scripts.inc | 8 +- .../PalletTown_ProfessorOaksLab/scripts.inc | 22 +-- data/maps/PewterCity/scripts.inc | 8 +- data/maps/PewterCity_House1/scripts.inc | 2 +- data/maps/PewterCity_Museum_1F/scripts.inc | 2 +- .../PokemonLeague_ChampionsRoom/scripts.inc | 2 +- .../maps/PokemonLeague_HallOfFame/scripts.inc | 2 +- data/maps/PokemonTower_2F/scripts.inc | 2 +- data/maps/PokemonTower_6F/scripts.inc | 2 +- data/maps/Route1/scripts.inc | 2 +- .../maps/Route16_NorthEntrance_1F/scripts.inc | 2 +- data/maps/Route18_EastEntrance_1F/scripts.inc | 2 +- data/maps/Route22/scripts.inc | 4 +- data/maps/Route24/scripts.inc | 2 +- data/maps/Route4_PokemonCenter_1F/scripts.inc | 4 +- data/maps/Route5_SouthEntrance/scripts.inc | 2 +- data/maps/Route6_NorthEntrance/scripts.inc | 2 +- data/maps/Route7_EastEntrance/scripts.inc | 2 +- data/maps/Route8_WestEntrance/scripts.inc | 2 +- data/maps/SSAnne_2F_Corridor/scripts.inc | 2 +- data/maps/SSAnne_CaptainsOffice/scripts.inc | 2 +- data/maps/SaffronCity/scripts.inc | 2 +- data/maps/SaffronCity_Dojo/scripts.inc | 4 +- .../scripts.inc | 2 +- data/maps/SevenIsland_House_Room1/scripts.inc | 2 +- .../scripts.inc | 4 +- data/maps/SilphCo_11F/scripts.inc | 2 +- data/maps/SilphCo_7F/scripts.inc | 8 +- .../scripts.inc | 4 +- .../SixIsland_PokemonCenter_1F/scripts.inc | 2 +- data/maps/ThreeIsland/scripts.inc | 4 +- data/maps/TrainerTower_Lobby/scripts.inc | 6 +- data/maps/TwoIsland_House/scripts.inc | 4 +- .../TwoIsland_JoyfulGameCorner/scripts.inc | 8 +- data/maps/VermilionCity/scripts.inc | 2 +- data/maps/ViridianCity/scripts.inc | 8 +- data/maps/ViridianCity_Mart/scripts.inc | 2 +- data/maps/ViridianCity_School/scripts.inc | 2 +- data/scripts/bag_full.inc | 2 +- data/scripts/cable_club.inc | 54 +++--- data/scripts/day_care.inc | 2 +- data/scripts/fame_checker.inc | 32 ++-- data/scripts/itemfinder.inc | 2 +- data/scripts/move_tutors.inc | 2 +- data/scripts/obtain_item.inc | 4 +- data/scripts/pokedex_rating.inc | 2 +- data/scripts/pokemon_league.inc | 2 +- data/scripts/questionnaire.inc | 6 +- data/scripts/route23.inc | 2 +- data/scripts/std_msgbox.inc | 2 +- data/scripts/trainer_card.inc | 6 +- data/scripts/trainer_tower.inc | 2 +- data/scripts/white_out.inc | 6 +- include/constants/vars.h | 7 + src/battle_message.c | 14 +- src/dynamic_placeholder_text_util.c | 154 +++++++++--------- src/field_specials.c | 14 +- src/menu_helpers.c | 2 +- src/new_menu_helpers.c | 10 +- src/shop.c | 2 +- 84 files changed, 318 insertions(+), 294 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index c79f10a6b..bff600233 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1540,7 +1540,8 @@ .2byte \box .endm - @ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text, 0xFF resets the color to the default for the current OW's gender, and all other values produce black text. + @ Sets the color of the text in standard message boxes. color is any NPC_TEXT_COLOR_* constant. + @ The color will be reset to NPC_TEXT_COLOR_DEFAULT whenever ProcessPlayerFieldInput is called. .macro textcolor color:req .byte 0xc7 .byte \color diff --git a/data/event_scripts.s b/data/event_scripts.s index 1e3ef3d8e..50b817741 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1317,7 +1317,7 @@ EventScript_BrailleCursorWaitButton:: return EventScript_NoMoreRoomForPokemon:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_NoMoreRoomForPokemon release end diff --git a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc index fd44f54e6..3f9833af8 100644 --- a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc +++ b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc @@ -41,10 +41,10 @@ CeladonCity_DepartmentStore_Roof_EventScript_AskGiveDrink:: msgbox CeladonCity_DepartmentStore_Roof_Text_ImThirstyGiveHerDrink, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_DontGiveDrink - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL message CeladonCity_DepartmentStore_Roof_Text_GiveWhichDrink waitmessage - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE switch VAR_TEMP_1 case 1, CeladonCity_DepartmentStore_Roof_EventScript_AskGiveFreshWater case 2, CeladonCity_DepartmentStore_Roof_EventScript_AskGiveSodaPop @@ -148,7 +148,7 @@ CeladonCity_DepartmentStore_Roof_EventScript_GiveDrink:: compare VAR_RESULT, FALSE goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForReward additem VAR_0x8009 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message Text_ReceivedItemFromLittleGirl waitmessage diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index a020f1bab..d95a601fc 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -134,7 +134,7 @@ CeladonCity_GameCorner_EventScript_Fisher:: compare VAR_TEMP_1, (MAX_COINS + 1) - 10 goto_if_ge CeladonCity_GameCorner_EventScript_FisherNoRoomForCoins addcoins 10 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_Text_Received10CoinsFromMan playse SE_SHOP waitse @@ -148,7 +148,7 @@ CeladonCity_GameCorner_EventScript_FisherNoRoomForCoins:: end CeladonCity_GameCorner_EventScript_GamblerNoCoinCase:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_Text_DontHaveCoinCase goto CeladonCity_GameCorner_EventScript_FaceSlotMachine end @@ -195,7 +195,7 @@ CeladonCity_GameCorner_EventScript_Scientist:: compare VAR_TEMP_1, (MAX_COINS + 1) - 20 goto_if_ge CeladonCity_GameCorner_EventScript_ScientistNoRoomForCoins addcoins 20 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_Text_Received20CoinsFromNiceGuy playse SE_SHOP waitse @@ -223,7 +223,7 @@ CeladonCity_GameCorner_EventScript_Gentleman:: compare VAR_TEMP_1, (MAX_COINS + 1) - 20 goto_if_ge CeladonCity_GameCorner_EventScript_GentlemanNoRoomForCoins addcoins 20 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_Text_Received20CoinsFromMan playse SE_SHOP waitse diff --git a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc index 8a6c30770..01a4d9284 100644 --- a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc +++ b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc @@ -111,7 +111,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeMon:: checkcoins VAR_RESULT compare VAR_RESULT, VAR_TEMP_2 goto_if_lt CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL switch VAR_TEMP_1 case SPECIES_ABRA, CeladonCity_GameCorner_PrizeRoom_EventScript_GiveAbra case SPECIES_CLEFAIRY, CeladonCity_GameCorner_PrizeRoom_EventScript_GiveClefairy @@ -185,7 +185,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon:: end CeladonCity_GameCorner_PrizeRoom_EventScript_PartyFull:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_NoMoreRoomForPokemon hidecoinsbox 0, 0 release @@ -200,7 +200,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_NicknamePartyMon:: end CeladonCity_GameCorner_PrizeRoom_EventScript_NeedCoinCase:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_PrizeRoom_Text_CoinCaseRequired release end @@ -333,7 +333,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize:: end CeladonCity_GameCorner_PrizeRoom_EventScript_BagFull:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_TooBadBagFull hidecoinsbox 0, 0 release diff --git a/data/maps/CeruleanCity/scripts.inc b/data/maps/CeruleanCity/scripts.inc index 1aee74666..2a2c1b66a 100644 --- a/data/maps/CeruleanCity/scripts.inc +++ b/data/maps/CeruleanCity/scripts.inc @@ -41,7 +41,7 @@ CeruleanCity_EventScript_RivalTriggerRight:: end CeruleanCity_EventScript_Rival:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE setvar VAR_MAP_SCENE_ROUTE22, 2 playbgm MUS_ENCOUNTER_RIVAL, 0 addobject LOCALID_RIVAL @@ -203,7 +203,7 @@ CeruleanCity_EventScript_GruntDefeated:: end CeruleanCity_EventScript_NoRoomForTM28:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CeruleanCity_Text_MakeRoomForThisCantRun release end @@ -229,7 +229,7 @@ CeruleanCity_EventScript_GruntTriggerBottom:: end CeruleanCity_EventScript_GruntTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CeruleanCity_Text_GruntIntro setvar VAR_LAST_TALKED, LOCALID_GRUNT trainerbattle_no_intro TRAINER_TEAM_ROCKET_GRUNT_5, CeruleanCity_Text_GruntDefeat diff --git a/data/maps/CinnabarIsland/scripts.inc b/data/maps/CinnabarIsland/scripts.inc index f4e2dc6af..c84bb8424 100644 --- a/data/maps/CinnabarIsland/scripts.inc +++ b/data/maps/CinnabarIsland/scripts.inc @@ -62,7 +62,7 @@ CinnabarIsland_EventScript_ExitPokeCenterForOneIsland:: lockall clearflag FLAG_DONT_TRANSITION_MUSIC savebgm MUS_DUMMY - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE setvar VAR_MAP_SCENE_CINNABAR_ISLAND_2, 2 delay 20 call CinnabarIsland_EventScript_SailToOneIsland @@ -71,7 +71,7 @@ CinnabarIsland_EventScript_ExitPokeCenterForOneIsland:: CinnabarIsland_EventScript_ReturnFromSeviiIslands:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Text_IfYouHaveTriPassYouCanGoAgain closemessage applymovement LOCALID_BILL, CinnabarIsland_Movement_BillExit @@ -94,7 +94,7 @@ CinnabarIsland_Movement_BillExit:: CinnabarIsland_EventScript_BillScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE call_if_unset FLAG_TEMP_2, CinnabarIsland_EventScript_BillFacePlayer1 call_if_set FLAG_TEMP_2, CinnabarIsland_EventScript_BillFacePlayer2 playse SE_PIN diff --git a/data/maps/CinnabarIsland_Gym/scripts.inc b/data/maps/CinnabarIsland_Gym/scripts.inc index 395f45419..c87f7aed1 100644 --- a/data/maps/CinnabarIsland_Gym/scripts.inc +++ b/data/maps/CinnabarIsland_Gym/scripts.inc @@ -267,7 +267,7 @@ CinnabarIsland_Gym_EventScript_BattleQuinn:: call_if_eq CinnabarIsland_Gym_EventScript_QuinnApproachLeft compare VAR_TEMP_1, 1 call_if_eq CinnabarIsland_Gym_EventScript_QuinnApproachRight - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_QuinnIntro trainerbattle_no_intro TRAINER_BURGLAR_QUINN, CinnabarIsland_Gym_Text_QuinnDefeat goto_if_set FLAG_CINNABAR_GYM_QUIZ_1, CinnabarIsland_Gym_EventScript_DoorAlreadyOpen @@ -343,7 +343,7 @@ CinnabarIsland_Gym_EventScript_BattleAvery:: call_if_eq CinnabarIsland_Gym_EventScript_AveryApproachLeft compare VAR_TEMP_1, 1 call_if_eq CinnabarIsland_Gym_EventScript_AveryApproachRight - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_AveryIntro trainerbattle_no_intro TRAINER_SUPER_NERD_AVERY, CinnabarIsland_Gym_Text_AveryDefeat goto_if_set FLAG_CINNABAR_GYM_QUIZ_2, CinnabarIsland_Gym_EventScript_DoorAlreadyOpen @@ -428,7 +428,7 @@ CinnabarIsland_Gym_EventScript_BattleRamon:: call_if_eq CinnabarIsland_Gym_EventScript_RamonApproachLeft compare VAR_TEMP_1, 1 call_if_eq CinnabarIsland_Gym_EventScript_RamonApproachRight - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_RamonIntro trainerbattle_no_intro TRAINER_BURGLAR_RAMON, CinnabarIsland_Gym_Text_RamonDefeat goto_if_set FLAG_CINNABAR_GYM_QUIZ_3, CinnabarIsland_Gym_EventScript_DoorAlreadyOpen @@ -504,7 +504,7 @@ CinnabarIsland_Gym_EventScript_BattleDerek:: call_if_eq CinnabarIsland_Gym_EventScript_DerekApproachLeft compare VAR_TEMP_1, 1 call_if_eq CinnabarIsland_Gym_EventScript_DerekApproachRight - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_DerekIntro trainerbattle_no_intro TRAINER_SUPER_NERD_DEREK, CinnabarIsland_Gym_Text_DerekDefeat goto_if_set FLAG_CINNABAR_GYM_QUIZ_4, CinnabarIsland_Gym_EventScript_DoorAlreadyOpen @@ -580,7 +580,7 @@ CinnabarIsland_Gym_EventScript_BattleDusty:: call_if_eq CinnabarIsland_Gym_EventScript_DustyApproachLeft compare VAR_TEMP_1, 1 call_if_eq CinnabarIsland_Gym_EventScript_DustyApproachRight - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_DustyIntro trainerbattle_no_intro TRAINER_BURGLAR_DUSTY, CinnabarIsland_Gym_Text_DustyDefeat goto_if_set FLAG_CINNABAR_GYM_QUIZ_5, CinnabarIsland_Gym_EventScript_DoorAlreadyOpen @@ -656,7 +656,7 @@ CinnabarIsland_Gym_EventScript_BattleZac:: call_if_eq CinnabarIsland_Gym_EventScript_ZacApproachLeft compare VAR_TEMP_1, 1 call_if_eq CinnabarIsland_Gym_EventScript_ZacApproachRight - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_ZacIntro trainerbattle_no_intro TRAINER_SUPER_NERD_ZAC, CinnabarIsland_Gym_Text_ZacDefeat goto_if_set FLAG_CINNABAR_GYM_QUIZ_6, CinnabarIsland_Gym_EventScript_DoorAlreadyOpen diff --git a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc index 8db5d6f3c..e460fa2b4 100644 --- a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc @@ -154,7 +154,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil:: compare VAR_RESULT, NO goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_HandedFossilToWeirdDoctor - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE removeitem ITEM_HELIX_FOSSIL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_TakesTimeGoForWalk setvar VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 1 @@ -169,7 +169,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil:: compare VAR_RESULT, NO goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_HandedFossilToWeirdDoctor - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE removeitem ITEM_DOME_FOSSIL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_TakesTimeGoForWalk setvar VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 1 @@ -184,7 +184,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowOldAmber:: compare VAR_RESULT, NO goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_HandedFossilToWeirdDoctor - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE removeitem ITEM_OLD_AMBER msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_TakesTimeGoForWalk setvar VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 1 @@ -254,7 +254,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl:: end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message CinnabarIsland_PokemonLab_ExperimentRoom_Text_ReceivedMonFromDoctor waitmessage @@ -269,7 +269,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty:: end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message CinnabarIsland_PokemonLab_ExperimentRoom_Text_ReceivedMonFromDoctor waitmessage diff --git a/data/maps/FiveIsland_LostCave_Room10/scripts.inc b/data/maps/FiveIsland_LostCave_Room10/scripts.inc index c69268fc6..21909c63e 100644 --- a/data/maps/FiveIsland_LostCave_Room10/scripts.inc +++ b/data/maps/FiveIsland_LostCave_Room10/scripts.inc @@ -19,7 +19,7 @@ FiveIsland_LostCave_Room10_OnFrame:: FiveIsland_LostCave_Room10_EventScript_FindSelphyScene:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE applymovement LOCALID_SELPHY, FiveIsland_LostCave_Room10_Movement_SelphyWander waitmovement 0 delay 100 diff --git a/data/maps/FiveIsland_MemorialPillar/scripts.inc b/data/maps/FiveIsland_MemorialPillar/scripts.inc index de3403a7d..c99d65131 100644 --- a/data/maps/FiveIsland_MemorialPillar/scripts.inc +++ b/data/maps/FiveIsland_MemorialPillar/scripts.inc @@ -62,7 +62,7 @@ FiveIsland_MemorialPillar_EventScript_PlaceLemonade:: delay 45 applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestLeft waitmovement 0 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FiveIsland_MemorialPillar_Text_ThankYouPleaseTakeThis giveitem ITEM_TM42 compare VAR_RESULT, FALSE diff --git a/data/maps/FiveIsland_ResortGorgeous/scripts.inc b/data/maps/FiveIsland_ResortGorgeous/scripts.inc index 2e6cf1777..2d18332cd 100644 --- a/data/maps/FiveIsland_ResortGorgeous/scripts.inc +++ b/data/maps/FiveIsland_ResortGorgeous/scripts.inc @@ -19,7 +19,7 @@ FiveIsland_ResortGorgeous_OnFrame:: FiveIsland_ResortGorgeous_EventScript_SelphyReturnHomeScene:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox FiveIsland_ResortGorgeous_Text_SelphyThanksYouMayGoNow closemessage applymovement LOCALID_SELPHY, Movement_WalkInPlaceFastestUp diff --git a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc index 8c799e14a..39cabec6e 100644 --- a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc +++ b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc @@ -45,13 +45,13 @@ FiveIsland_ResortGorgeous_House_EventScript_ShowRequestedMon:: addobject LOCALID_BUTLER applymovement LOCALID_BUTLER, FiveIsland_ResortGorgeous_House_Movement_ButlerEnter waitmovement 0 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FiveIsland_ResortGorgeous_House_Text_ButlerYesMyLady applymovement LOCALID_SELPHY, Movement_WalkInPlaceFastestUp waitmovement 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox FiveIsland_ResortGorgeous_House_Text_SelphyGiveTokenOfAppreciation - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FiveIsland_ResortGorgeous_House_Text_ButlerIShallDoAsYouBid closemessage compare VAR_FACING, DIR_NORTH @@ -101,9 +101,9 @@ FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerWest:: return FiveIsland_ResortGorgeous_House_EventScript_NoRoomForReward:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FiveIsland_ResortGorgeous_House_Text_ButlerBagAppearsToBeFull - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox FiveIsland_ResortGorgeous_House_Text_OhHowDisappointing setflag SHOWN_REQUESTED_MON setvar VAR_RESORT_GORGEOUS_REQUESTED_MON, SPECIES_NONE diff --git a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc index a7c37cbfd..d1c996aa2 100644 --- a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc +++ b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc @@ -33,7 +33,7 @@ FiveIsland_WaterLabyrinth_EventScript_TryGiveEgg:: goto_if_eq FiveIsland_WaterLabyrinth_EventScript_NoRoomForEgg setflag FLAG_GOT_TOGEPI_EGG giveegg SPECIES_TOGEPI - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message FiveIsland_WaterLabyrinth_Text_ReceivedEggFromMan waitfanfare diff --git a/data/maps/FourIsland/scripts.inc b/data/maps/FourIsland/scripts.inc index 024171e8f..22f4b3a38 100644 --- a/data/maps/FourIsland/scripts.inc +++ b/data/maps/FourIsland/scripts.inc @@ -29,7 +29,7 @@ FourIsland_OnFrame:: FourIsland_EventScript_RivalScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestDown waitmovement 0 playbgm MUS_ENCOUNTER_RIVAL, 0 @@ -110,7 +110,7 @@ FourIsland_EventScript_DaycareAcceptEgg:: end FourIsland_EventScript_DaycareReceivedEgg:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL message DayCare_Text_ReceivedEgg call EventScript_RestorePrevTextColor playfanfare MUS_LEVEL_UP diff --git a/data/maps/FourIsland_IcefallCave_Back/scripts.inc b/data/maps/FourIsland_IcefallCave_Back/scripts.inc index b0ef13da6..aeba075e1 100644 --- a/data/maps/FourIsland_IcefallCave_Back/scripts.inc +++ b/data/maps/FourIsland_IcefallCave_Back/scripts.inc @@ -18,11 +18,11 @@ FourIsland_IcefallCave_Back_EventScript_HideLorelei:: FourIsland_IcefallCave_Back_EventScript_LoreleiRocketsScene:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox FourIsland_IcefallCave_Back_Text_LoreleiKeepHandsOffMons applymovement LOCALID_ROCKET1, FourIsland_IcefallCave_Back_Movement_WalkInPlaceDown waitmovement 0 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FourIsland_IcefallCave_Back_Text_ShutItLadyLeaveUsBe closemessage playse SE_PIN @@ -32,7 +32,7 @@ FourIsland_IcefallCave_Back_EventScript_LoreleiRocketsScene:: waitmovement 0 applymovement LOCALID_LORELEI, Movement_Delay48 waitmovement 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox FourIsland_IcefallCave_Back_Text_LoreleiPlayerHelpMeKickPoachersOut closemessage applymovement LOCALID_LORELEI, Movement_WalkInPlaceFastestRight @@ -48,17 +48,17 @@ FourIsland_IcefallCave_Back_EventScript_LoreleiRocketsScene:: applymovement LOCALID_ROCKET2, FourIsland_IcefallCave_Back_Movement_WalkInPlaceDown waitmovement 0 playbgm MUS_ENCOUNTER_ROCKET, 0 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FourIsland_IcefallCave_Back_Text_GruntIntro setvar VAR_LAST_TALKED, LOCALID_ROCKET3 trainerbattle_no_intro TRAINER_TEAM_ROCKET_GRUNT_45, FourIsland_IcefallCave_Back_Text_GruntDefeat applymovement LOCALID_LORELEI, FourIsland_IcefallCave_Back_Movement_WalkInPlaceUp waitmovement 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox FourIsland_IcefallCave_Back_Text_LoreleiWhereHaveYouTakenMons - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FourIsland_IcefallCave_Back_Text_NotTellingYouThat - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE message FourIsland_IcefallCave_Back_Text_LoreleiWellDeepFreezeYou waitmessage waitse @@ -67,7 +67,7 @@ FourIsland_IcefallCave_Back_EventScript_LoreleiRocketsScene:: waitmoncry applymovement LOCALID_ROCKET1, FourIsland_IcefallCave_Back_Movement_Rocket1ReactToThreat waitmovement 0 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FourIsland_IcefallCave_Back_Text_OkayRocketWareHouseFiveIsland closemessage applymovement LOCALID_LORELEI, FourIsland_IcefallCave_Back_Movement_LoreleiWatchRocketsExit @@ -84,7 +84,7 @@ FourIsland_IcefallCave_Back_EventScript_LoreleiRocketsScene:: waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestLeft waitmovement 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox FourIsland_IcefallCave_Back_Text_ThankYouThisIsAwful setflag FLAG_HIDE_RUIN_VALLEY_SCIENTIST clearflag FLAG_HIDE_LORELEI_IN_HER_HOUSE diff --git a/data/maps/FourIsland_PokemonDayCare/scripts.inc b/data/maps/FourIsland_PokemonDayCare/scripts.inc index aef24b72b..854bda03d 100644 --- a/data/maps/FourIsland_PokemonDayCare/scripts.inc +++ b/data/maps/FourIsland_PokemonDayCare/scripts.inc @@ -138,7 +138,7 @@ FourIsland_PokemonDayCare_RetrieveMon:: msgbox DayCare_Text_HeresYourMon waitse playmoncry VAR_RESULT, CRY_MODE_NORMAL - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox DayCare_Text_TookBackMon call EventScript_RestorePrevTextColor waitmoncry diff --git a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc index cfca834fe..bdffacca4 100644 --- a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc +++ b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc @@ -11,7 +11,7 @@ FuchsiaCity_SafariZone_Entrance_OnFrame:: @ When player runs out of balls mid-battle FuchsiaCity_SafariZone_Entrance_EventScript_ExitWalkIn:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, FuchsiaCity_SafariZone_Entrance_Movement_ApproachCounter waitmovement 0 msgbox FuchsiaCity_SafariZone_Entrance_Text_CatchFairShareComeAgain @@ -26,7 +26,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_ExitWalkIn:: @ When player runs of out balls after catching a pokemon, or runs out of steps FuchsiaCity_SafariZone_Entrance_EventScript_ExitWarpIn:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FuchsiaCity_SafariZone_Entrance_Text_CatchFairShareComeAgain closemessage applymovement OBJ_EVENT_ID_PLAYER, FuchsiaCity_SafariZone_Entrance_Movement_Exit @@ -39,7 +39,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_ExitWarpIn:: @ When player re-enters the entrance building with balls/steps remaining FuchsiaCity_SafariZone_Entrance_EventScript_ExitEarly:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FuchsiaCity_SafariZone_Entrance_Text_GoingToLeaveSafariZoneEarly, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_ReturnToSafariZone @@ -99,7 +99,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_EntryTriggerLeft:: end FuchsiaCity_SafariZone_Entrance_EventScript_AskEnterSafariZone:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox FuchsiaCity_SafariZone_Entrance_Text_WelcomeToSafariZone applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 @@ -119,7 +119,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone:: removemoney 500 updatemoneybox msgbox FuchsiaCity_SafariZone_Entrance_Text_ThatllBe500WeOnlyUseSpecialBalls - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message FuchsiaCity_SafariZone_Entrance_Text_PlayerReceived30SafariBalls waitfanfare diff --git a/data/maps/FuchsiaCity_WardensHouse/scripts.inc b/data/maps/FuchsiaCity_WardensHouse/scripts.inc index 75b1afce1..94eb1345d 100644 --- a/data/maps/FuchsiaCity_WardensHouse/scripts.inc +++ b/data/maps/FuchsiaCity_WardensHouse/scripts.inc @@ -15,7 +15,7 @@ FuchsiaCity_WardensHouse_EventScript_Warden:: end FuchsiaCity_WardensHouse_EventScript_GiveGoldTeeth:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_TMHM message FuchsiaCity_WardensHouse_Text_GaveGoldTeethToWarden waitmessage diff --git a/data/maps/MtEmber_Exterior/scripts.inc b/data/maps/MtEmber_Exterior/scripts.inc index 770deab35..cc1215291 100644 --- a/data/maps/MtEmber_Exterior/scripts.inc +++ b/data/maps/MtEmber_Exterior/scripts.inc @@ -90,7 +90,7 @@ MtEmber_Exterior_EventScript_BattleGrunt2:: MtEmber_Exterior_EventScript_RocketPasswordScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox MtEmber_Exterior_Text_PunchedThroughAtLast message MtEmber_Exterior_Text_WhatsPasswordAgain waitmessage diff --git a/data/maps/MtMoon_B2F/scripts.inc b/data/maps/MtMoon_B2F/scripts.inc index cb4fb4b40..03d461b44 100644 --- a/data/maps/MtMoon_B2F/scripts.inc +++ b/data/maps/MtMoon_B2F/scripts.inc @@ -33,7 +33,7 @@ MtMoon_B2F_EventScript_Miguel:: end MtMoon_B2F_EventScript_BattleMiguel:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE message MtMoon_B2F_Text_MiguelIntro waitmessage playbgm MUS_ENCOUNTER_GYM_LEADER, 0 @@ -68,7 +68,7 @@ MtMoon_B2F_EventScript_DomeFossil:: applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToHelixFossil waitmovement 0 copyobjectxytoperm LOCALID_MIGUEL - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playfanfare MUS_OBTAIN_KEY_ITEM message MtMoon_B2F_Text_ThenThisFossilIsMine waitmessage @@ -100,7 +100,7 @@ MtMoon_B2F_EventScript_HelixFossil:: applymovement LOCALID_MIGUEL, MtMoon_B2F_Movement_MiguelToDomeFossil waitmovement 0 copyobjectxytoperm LOCALID_MIGUEL - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playfanfare MUS_OBTAIN_KEY_ITEM message MtMoon_B2F_Text_ThenThisFossilIsMine waitmessage diff --git a/data/maps/OneIsland/scripts.inc b/data/maps/OneIsland/scripts.inc index 900ea4550..8cab73528 100644 --- a/data/maps/OneIsland/scripts.inc +++ b/data/maps/OneIsland/scripts.inc @@ -15,7 +15,7 @@ OneIsland_OnFrame:: OneIsland_EventScript_EnterOneIslandFirstTime:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, OneIsland_Movement_PlayerExitHarbor waitmovement 0 msgbox OneIsland_Text_BillLetsGoSeeCelio diff --git a/data/maps/OneIsland_Harbor/scripts.inc b/data/maps/OneIsland_Harbor/scripts.inc index 0b899f9cf..0c0c2238e 100644 --- a/data/maps/OneIsland_Harbor/scripts.inc +++ b/data/maps/OneIsland_Harbor/scripts.inc @@ -17,7 +17,7 @@ OneIsland_Harbor_OnFrame:: OneIsland_Harbor_EventScript_PlayerEnterHarborFirstTime:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, OneIsland_Harbor_Movement_PlayerExitHarbor waitmovement 0 setvar VAR_MAP_SCENE_ONE_ISLAND_HARBOR, 2 diff --git a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc index a038798e4..1b4c011b5 100644 --- a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc +++ b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc @@ -62,7 +62,7 @@ OneIsland_PokemonCenter_1F_OnFrame:: OneIsland_PokemonCenter_1F_EventScript_MeetCelioScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, OneIsland_PokemonCenter_1F_Movement_PlayerWalkToCelio applymovement LOCALID_BILL, OneIsland_PokemonCenter_1F_Movement_BillWalkToCelio waitmovement 0 @@ -136,7 +136,7 @@ OneIsland_PokemonCenter_1F_EventScript_IntroducePlayerNotChamp:: return OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMapPage:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM message OneIsland_PokemonCenter_1F_Text_ReceivedExtraPageForTownMap waitmessage @@ -259,7 +259,7 @@ OneIsland_PokemonCenter_1F_EventScript_CelioJustGivenSapphire:: end OneIsland_PokemonCenter_1F_EventScript_GiveCelioSapphire:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_TMHM message OneIsland_PokemonCenter_1F_Text_HandedSapphireToCelio waitmessage @@ -305,7 +305,7 @@ OneIsland_PokemonCenter_1F_EventScript_ExplainRainbowPass:: OneIsland_PokemonCenter_1F_EventScript_GiveCelioRuby:: msgbox OneIsland_PokemonCenter_1F_Text_OhThats - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_TMHM message OneIsland_PokemonCenter_1F_Text_HandedRubyToCelio waitmessage @@ -340,7 +340,7 @@ OneIsland_PokemonCenter_1F_EventScript_GiveRainbowPass:: setvar VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 additem ITEM_RAINBOW_PASS setflag FLAG_SYS_SEVII_MAP_4567 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM message OneIsland_PokemonCenter_1F_Text_ReturnedTriPassForRainbowPass waitmessage @@ -454,7 +454,7 @@ OneIsland_PokemonCenter_1F_EventScript_LeaveOneIslandTriggerBottom:: end OneIsland_PokemonCenter_1F_EventScript_LeaveOneIslandScene:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playse SE_PIN applymovement LOCALID_BILL, Movement_ExclamationMark waitmovement 0 diff --git a/data/maps/PalletTown/scripts.inc b/data/maps/PalletTown/scripts.inc index 1e3d4f026..15ef22dc5 100644 --- a/data/maps/PalletTown/scripts.inc +++ b/data/maps/PalletTown/scripts.inc @@ -47,7 +47,7 @@ PalletTown_OnFrame:: @ Oak approaches player after exiting their house post Elite Four to check if they should receieve the National Dex PalletTown_EventScript_OakRatingScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE setobjectxyperm LOCALID_PROF_OAK, 14, 14 setobjectmovementtype LOCALID_PROF_OAK, MOVEMENT_TYPE_FACE_LEFT addobject LOCALID_PROF_OAK @@ -187,7 +187,7 @@ PalletTown_EventScript_OakTriggerRight:: PalletTown_EventScript_OakTrigger:: famechecker FAMECHECKER_OAK, FCPICKSTATE_COLORED, UpdatePickStateFromSpecialVar8005 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE delay 30 playbgm MUS_OAK, 0 message PalletTown_Text_OakDontGoOut @@ -442,11 +442,11 @@ PalletTown_EventScript_SignLadyTrigger:: end PalletTown_EventScript_SignLadyShowSign:: - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox PalletTown_Text_LookCopiedTrainerTipsSign closemessage delay 20 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL setflag FLAG_OPENED_START_MENU setvar VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1 setvar SIGN_LADY_READY, FALSE diff --git a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc index 2c43a2d26..4bb813827 100644 --- a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc +++ b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc @@ -65,7 +65,7 @@ PalletTown_ProfessorOaksLab_OnFrame:: PalletTown_ProfessorOaksLab_EventScript_EnterForNationalDexScene:: @ 8169002 lockall setvar VAR_FACING, DIR_NORTH - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_PROF_OAK, PalletTown_ProfessorOaksLab_Movement_OakEnter waitmovement 0 removeobject LOCALID_PROF_OAK @@ -95,7 +95,7 @@ PalletTown_ProfessorOaksLab_EventScript_NationalDexScene:: call_if_eq PalletTown_ProfessorOaksLab_EventScript_PlayerFaceOakNorth compare VAR_FACING, DIR_WEST call_if_eq PalletTown_ProfessorOaksLab_EventScript_PlayerFaceOakWest - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PalletTown_ProfessorOaksLab_Text_OakTookBothPokedexUnits closemessage call EventScript_RestorePrevTextColor @@ -123,7 +123,7 @@ PalletTown_ProfessorOaksLab_EventScript_NationalDexScene:: call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverEast compare VAR_FACING, DIR_WEST call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverWest - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM message PalletTown_ProfessorOaksLab_Text_PlayersPokedexWasUpgraded waitmessage @@ -227,7 +227,7 @@ PalletTown_ProfessorOaksLab_Movement_OakBringDexesToDeskSouth:: PalletTown_ProfessorOaksLab_ChooseStarterScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_PROF_OAK, PalletTown_ProfessorOaksLab_Movement_OakEnter waitmovement 0 removeobject LOCALID_PROF_OAK @@ -282,7 +282,7 @@ PalletTown_ProfessorOaksLab_Movement_RivalReact:: PalletTown_ProfessorOaksLab_EventScript_LeaveStarterSceneTrigger:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_PROF_OAK, Movement_FaceDown waitmovement 0 msgbox PalletTown_ProfessorOaksLab_Text_OakHeyDontGoAwayYet @@ -315,7 +315,7 @@ PalletTown_ProfessorOaksLab_EventScript_RivalBattleTriggerRight:: end PalletTown_ProfessorOaksLab_EventScript_RivalBattle:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestDown waitmovement 0 @@ -650,7 +650,7 @@ PalletTown_ProfessorOaksLab_EventScript_OakBattleMonForItToGrow:: PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: msgbox PalletTown_ProfessorOaksLab_Text_OakHaveSomethingForMe - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_TMHM message PalletTown_ProfessorOaksLab_Text_DeliveredOaksParcel waitmessage @@ -716,7 +716,7 @@ PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: compare VAR_FACING, DIR_WEST call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverWest delay 10 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM message PalletTown_ProfessorOaksLab_Text_ReceivedPokedexFromOak waitmessage @@ -1170,7 +1170,7 @@ PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice:: applymovement LOCALID_PROF_OAK, Movement_FaceRight waitmovement 0 showmonpic PLAYER_STARTER_SPECIES, 10, 3 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE compare PLAYER_STARTER_NUM, 0 goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmBulbasaur compare PLAYER_STARTER_NUM, 1 @@ -1264,10 +1264,10 @@ PalletTown_ProfessorOaksLab_EventScript_RivalWalksToBulbasaur:: end PalletTown_ProfessorOaksLab_EventScript_RivalTakesStarter:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox PalletTown_ProfessorOaksLab_Text_RivalIllTakeThisOneThen removeobject RIVAL_STARTER_ID - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL bufferspeciesname STR_VAR_1, RIVAL_STARTER_SPECIES message PalletTown_ProfessorOaksLab_Text_RivalReceivedMonFromOak waitmessage diff --git a/data/maps/PewterCity/scripts.inc b/data/maps/PewterCity/scripts.inc index 42cfcbca2..6a85d889a 100644 --- a/data/maps/PewterCity/scripts.inc +++ b/data/maps/PewterCity/scripts.inc @@ -284,7 +284,7 @@ PewterCity_EventScript_GymGuideTriggerRight:: end PewterCity_EventScript_GymGuideTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox PewterCity_Text_BrocksLookingForChallengersFollowMe closemessage playbgm MUS_FOLLOW_ME, 0 @@ -695,7 +695,7 @@ PewterCity_EventScript_RunningShoesAideTriggerBottom:: end PewterCity_EventScript_AideGiveRunningShoes:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE compare VAR_TEMP_1, 1 call_if_eq PewterCity_EventScript_AideNoticePlayer compare VAR_TEMP_1, 2 @@ -718,7 +718,7 @@ PewterCity_EventScript_AideGiveRunningShoes:: compare VAR_TEMP_1, 3 call_if_eq PewterCity_EventScript_AideApproachPlayer3 msgbox PewterCity_Text_AskedToDeliverThis - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM message PewterCity_Text_ReceivedRunningShoesFromAide waitmessage @@ -740,7 +740,7 @@ PewterCity_EventScript_AideGiveRunningShoes:: compare VAR_TEMP_1, 3 call_if_eq PewterCity_EventScript_AideExit3 delay 30 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PewterCity_Text_RunningShoesLetterFromMom closemessage removeobject LOCALID_AIDE diff --git a/data/maps/PewterCity_House1/scripts.inc b/data/maps/PewterCity_House1/scripts.inc index 56e9c623f..9003913dd 100644 --- a/data/maps/PewterCity_House1/scripts.inc +++ b/data/maps/PewterCity_House1/scripts.inc @@ -24,7 +24,7 @@ PewterCity_House1_EventScript_Nidoran:: end PewterCity_House1_EventScript_DoNidoranCry:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL waitse playmoncry SPECIES_NIDORAN_M, CRY_MODE_NORMAL msgbox PewterCity_House1_Text_Nidoran diff --git a/data/maps/PewterCity_Museum_1F/scripts.inc b/data/maps/PewterCity_Museum_1F/scripts.inc index a60e30aa6..7317774a8 100644 --- a/data/maps/PewterCity_Museum_1F/scripts.inc +++ b/data/maps/PewterCity_Museum_1F/scripts.inc @@ -64,7 +64,7 @@ PewterCity_Museum_1F_EventScript_EntranceTriggerRight:: end PewterCity_Museum_1F_EventScript_EntranceTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE showmoneybox 0, 0 msgbox PewterCity_Museum_1F_Text_Its50YForChildsTicket, MSGBOX_YESNO compare VAR_RESULT, YES diff --git a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc index 8b9be1fc2..21379c2e5 100644 --- a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc +++ b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc @@ -51,7 +51,7 @@ PokemonLeague_ChampionsRoom_OnFrame:: PokemonLeague_ChampionsRoom_EventScript_EnterRoom:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE setflag FLAG_TEMP_2 applymovement OBJ_EVENT_ID_PLAYER, PokemonLeague_ChampionsRoom_Movement_PlayerEnter waitmovement 0 diff --git a/data/maps/PokemonLeague_HallOfFame/scripts.inc b/data/maps/PokemonLeague_HallOfFame/scripts.inc index c91027354..3181cd7ba 100644 --- a/data/maps/PokemonLeague_HallOfFame/scripts.inc +++ b/data/maps/PokemonLeague_HallOfFame/scripts.inc @@ -19,7 +19,7 @@ PokemonLeague_HallOfFame_OnFrame:: PokemonLeague_HallOfFame_EventScript_EnterRoom:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, PokemonLeague_HallOfFame_Movement_EnterRoom waitmovement 0 applymovement LOCALID_PROF_OAK, Movement_WalkInPlaceFastestLeft diff --git a/data/maps/PokemonTower_2F/scripts.inc b/data/maps/PokemonTower_2F/scripts.inc index c20e4e1ce..a7c7fa789 100644 --- a/data/maps/PokemonTower_2F/scripts.inc +++ b/data/maps/PokemonTower_2F/scripts.inc @@ -20,7 +20,7 @@ PokemonTower_2F_EventScript_RivalTriggerDown:: end PokemonTower_2F_EventScript_Rival:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 compare VAR_TEMP_1, 0 call_if_eq PokemonTower_2F_EventScript_RivalFacePlayerRight diff --git a/data/maps/PokemonTower_6F/scripts.inc b/data/maps/PokemonTower_6F/scripts.inc index 5819189a1..5b7d4cb1a 100644 --- a/data/maps/PokemonTower_6F/scripts.inc +++ b/data/maps/PokemonTower_6F/scripts.inc @@ -3,7 +3,7 @@ PokemonTower_6F_MapScripts:: PokemonTower_6F_EventScript_MarowakGhost:: lockall - textcolor 2 + textcolor NPC_TEXT_COLOR_MON msgbox PokemonTower_6F_Text_BeGoneIntruders goto_if_questlog EventScript_ReleaseEnd setwildbattle SPECIES_MAROWAK, 30 diff --git a/data/maps/Route1/scripts.inc b/data/maps/Route1/scripts.inc index 642fc2a6a..391722428 100644 --- a/data/maps/Route1/scripts.inc +++ b/data/maps/Route1/scripts.inc @@ -6,7 +6,7 @@ Route1_EventScript_MartClerk:: faceplayer goto_if_set FLAG_GOT_POTION_ON_ROUTE_1, Route1_EventScript_AlreadyGotPotion msgbox Route1_Text_WorkAtPokeMartTakeSample - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL checkitemspace ITEM_POTION compare VAR_RESULT, FALSE goto_if_eq EventScript_BagIsFull diff --git a/data/maps/Route16_NorthEntrance_1F/scripts.inc b/data/maps/Route16_NorthEntrance_1F/scripts.inc index f305b656d..9ca3b4e0a 100644 --- a/data/maps/Route16_NorthEntrance_1F/scripts.inc +++ b/data/maps/Route16_NorthEntrance_1F/scripts.inc @@ -46,7 +46,7 @@ Route16_NorthEntrance_1F_EventScript_NeedBikeTriggerBottom:: end Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox Route16_NorthEntrance_1F_Text_ExcuseMeWaitUp closemessage applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp diff --git a/data/maps/Route18_EastEntrance_1F/scripts.inc b/data/maps/Route18_EastEntrance_1F/scripts.inc index 6d3afed96..b8314f051 100644 --- a/data/maps/Route18_EastEntrance_1F/scripts.inc +++ b/data/maps/Route18_EastEntrance_1F/scripts.inc @@ -46,7 +46,7 @@ Route18_EastEntrance_1F_EventScript_NeedBikeTriggerBottom:: end Route18_EastEntrance_1F_EventScript_NeedBikeTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox Route18_EastEntrance_1F_Text_ExcuseMe closemessage applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp diff --git a/data/maps/Route22/scripts.inc b/data/maps/Route22/scripts.inc index 5df278bae..103f4a65c 100644 --- a/data/maps/Route22/scripts.inc +++ b/data/maps/Route22/scripts.inc @@ -24,7 +24,7 @@ Route22_EventScript_EarlyRivalTriggerBottom:: end Route22_EventScript_EarlyRival:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 addobject LOCALID_RIVAL compare VAR_TEMP_1, 0 @@ -184,7 +184,7 @@ Route22_EventScript_LateRivalTriggerBottom:: end Route22_EventScript_LateRival:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 addobject LOCALID_RIVAL compare VAR_TEMP_1, 0 diff --git a/data/maps/Route24/scripts.inc b/data/maps/Route24/scripts.inc index 12819e1e3..48a1259ae 100644 --- a/data/maps/Route24/scripts.inc +++ b/data/maps/Route24/scripts.inc @@ -39,7 +39,7 @@ Route24_EventScript_RocketTriggerRight:: end Route24_EventScript_RocketTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE compare VAR_TEMP_1, 0 call_if_eq Route24_EventScript_RocketApproachPlayer compare VAR_TEMP_1, 1 diff --git a/data/maps/Route4_PokemonCenter_1F/scripts.inc b/data/maps/Route4_PokemonCenter_1F/scripts.inc index b52a41390..a64e55883 100644 --- a/data/maps/Route4_PokemonCenter_1F/scripts.inc +++ b/data/maps/Route4_PokemonCenter_1F/scripts.inc @@ -48,7 +48,7 @@ Route4_PokemonCenter_1F_EventScript_TryBuyMagikarp:: checkmoney MAGIKARP_PRICE compare VAR_RESULT, FALSE goto_if_eq Route4_PokemonCenter_1F_EventScript_NotEnoughMoney - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL setvar VAR_TEMP_1, SPECIES_MAGIKARP givemon SPECIES_MAGIKARP, 5 compare VAR_RESULT, 0 @@ -134,7 +134,7 @@ Route4_PokemonCenter_1F_EventScript_AlreadyBoughtMagikarp:: end Route4_PokemonCenter_1F_EventScript_NoRoomForMagikarp:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox Route4_PokemonCenter_1F_Text_NoRoomForMorePokemon hidemoneybox release diff --git a/data/maps/Route5_SouthEntrance/scripts.inc b/data/maps/Route5_SouthEntrance/scripts.inc index 831d97169..686a03f8b 100644 --- a/data/maps/Route5_SouthEntrance/scripts.inc +++ b/data/maps/Route5_SouthEntrance/scripts.inc @@ -24,7 +24,7 @@ Route5_SouthEntrance_EventScript_GuardTriggerRight:: end Route5_SouthEntrance_EventScript_GuardTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestLeft waitmovement 0 goto_if_set FLAG_GOT_TEA, Route5_SouthEntrance_EventScript_GiveTea diff --git a/data/maps/Route6_NorthEntrance/scripts.inc b/data/maps/Route6_NorthEntrance/scripts.inc index a54806e4c..a817e83b2 100644 --- a/data/maps/Route6_NorthEntrance/scripts.inc +++ b/data/maps/Route6_NorthEntrance/scripts.inc @@ -24,7 +24,7 @@ Route6_NorthEntrance_EventScript_GuardTriggerRight:: end Route6_NorthEntrance_EventScript_GuardTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 goto_if_set FLAG_GOT_TEA, Route6_NorthEntrance_EventScript_GiveTea diff --git a/data/maps/Route7_EastEntrance/scripts.inc b/data/maps/Route7_EastEntrance/scripts.inc index c2be1fe8e..cd9bc2807 100644 --- a/data/maps/Route7_EastEntrance/scripts.inc +++ b/data/maps/Route7_EastEntrance/scripts.inc @@ -24,7 +24,7 @@ Route7_EastEntrance_EventScript_GuardTriggerBottom:: end Route7_EastEntrance_EventScript_GuardTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 goto_if_set FLAG_GOT_TEA, Route7_EastEntrance_EventScript_GiveTea diff --git a/data/maps/Route8_WestEntrance/scripts.inc b/data/maps/Route8_WestEntrance/scripts.inc index 4a6af937b..6986887d4 100644 --- a/data/maps/Route8_WestEntrance/scripts.inc +++ b/data/maps/Route8_WestEntrance/scripts.inc @@ -24,7 +24,7 @@ Route8_WestEntrance_EventScript_GuardTriggerBottom:: end Route8_WestEntrance_EventScript_GuardTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 goto_if_set FLAG_GOT_TEA, Route8_WestEntrance_EventScript_GiveTea diff --git a/data/maps/SSAnne_2F_Corridor/scripts.inc b/data/maps/SSAnne_2F_Corridor/scripts.inc index c2feafdbd..4d1c8edfc 100644 --- a/data/maps/SSAnne_2F_Corridor/scripts.inc +++ b/data/maps/SSAnne_2F_Corridor/scripts.inc @@ -22,7 +22,7 @@ SSAnne_2F_Corridor_EventScript_RivalTriggerRight:: end SSAnne_2F_Corridor_EventScript_RivalTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playse SE_EXIT delay 5 playbgm MUS_ENCOUNTER_RIVAL, 0 diff --git a/data/maps/SSAnne_CaptainsOffice/scripts.inc b/data/maps/SSAnne_CaptainsOffice/scripts.inc index 95088fcc6..485b93807 100644 --- a/data/maps/SSAnne_CaptainsOffice/scripts.inc +++ b/data/maps/SSAnne_CaptainsOffice/scripts.inc @@ -7,7 +7,7 @@ SSAnne_CaptainsOffice_EventScript_Captain:: lock goto_if_set FLAG_GOT_HM01, SSAnne_CaptainsOffice_EventScript_AlreadyGotCut msgbox SSAnne_CaptainsOffice_Text_CaptainIFeelSeasick - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL message SSAnne_CaptainsOffice_Text_RubbedCaptainsBack waitmessage playfanfare MUS_HEAL diff --git a/data/maps/SaffronCity/scripts.inc b/data/maps/SaffronCity/scripts.inc index 44dba429b..530ce140c 100644 --- a/data/maps/SaffronCity/scripts.inc +++ b/data/maps/SaffronCity/scripts.inc @@ -51,7 +51,7 @@ SaffronCity_EventScript_DoorGuardGrunt:: end SaffronCity_EventScript_DoorGuardAsleep:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox SaffronCity_Text_HesTakingASnooze release end diff --git a/data/maps/SaffronCity_Dojo/scripts.inc b/data/maps/SaffronCity_Dojo/scripts.inc index 4df12e773..2989c218a 100644 --- a/data/maps/SaffronCity_Dojo/scripts.inc +++ b/data/maps/SaffronCity_Dojo/scripts.inc @@ -27,7 +27,7 @@ SaffronCity_Dojo_EventScript_HitmonleeBall:: setvar VAR_TEMP_1, SPECIES_HITMONLEE applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp waitmovement 0 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox SaffronCity_Dojo_Text_YouWantHitmonlee, MSGBOX_YESNO call EventScript_RestorePrevTextColor compare VAR_RESULT, YES @@ -49,7 +49,7 @@ SaffronCity_Dojo_EventScript_HitmonchanBall:: setvar VAR_TEMP_1, SPECIES_HITMONCHAN applymovement LOCALID_KARATE_MASTER, Movement_WalkInPlaceFastestUp waitmovement 0 - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox SaffronCity_Dojo_Text_YouWantHitmonchan, MSGBOX_YESNO call EventScript_RestorePrevTextColor compare VAR_RESULT, YES diff --git a/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc b/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc index 4bd8bb684..ea0d838da 100644 --- a/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc +++ b/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc @@ -18,7 +18,7 @@ SaffronCity_PokemonTrainerFanClub_OnFrame:: SaffronCity_PokemonTrainerFanClub_EventScript_MeetFirstFans:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE applymovement LOCALID_BATTLE_GIRL, Movement_WalkInPlaceFastestDown waitmovement 0 playse SE_PIN diff --git a/data/maps/SevenIsland_House_Room1/scripts.inc b/data/maps/SevenIsland_House_Room1/scripts.inc index e36ea4ea4..a7c536a30 100644 --- a/data/maps/SevenIsland_House_Room1/scripts.inc +++ b/data/maps/SevenIsland_House_Room1/scripts.inc @@ -35,7 +35,7 @@ SevenIsland_House_Room1_OnFrame:: SevenIsland_House_Room1_EventScript_OldWomanCommentOnBattle:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE applymovement OBJ_EVENT_ID_PLAYER, SevenIsland_House_Room1_Movement_PlayerReEnterRoom waitmovement 0 applymovement LOCALID_OLD_WOMAN, SevenIsland_House_Room1_Movement_OldWomanWalkBehindPlayer diff --git a/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc b/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc index e070f409d..4b5eebdb3 100644 --- a/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc +++ b/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc @@ -14,7 +14,7 @@ SevenIsland_SevaultCanyon_House_EventScript_BaldingMan:: applymovement LOCALID_BALDING_MAN, Movement_FacePlayer waitmovement 0 msgbox SevenIsland_SevaultCanyon_House_Text_ChanseyDanceJoinIn - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox SevenIsland_SevaultCanyon_House_Text_WouldYouLikeToDance, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SevenIsland_SevaultCanyon_House_EventScript_DeclineDance @@ -48,7 +48,7 @@ SevenIsland_SevaultCanyon_House_EventScript_AlreadyDanced:: end SevenIsland_SevaultCanyon_House_EventScript_DeclineDance:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox SevenIsland_SevaultCanyon_House_Text_ComeOnDance release end diff --git a/data/maps/SilphCo_11F/scripts.inc b/data/maps/SilphCo_11F/scripts.inc index 5abe486ea..40dc25e24 100644 --- a/data/maps/SilphCo_11F/scripts.inc +++ b/data/maps/SilphCo_11F/scripts.inc @@ -63,7 +63,7 @@ SilphCo_11F_EventScript_GiovanniTriggerRight:: end SilphCo_11F_EventScript_BattleGiovanni:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_GIOVANNI, Movement_WalkInPlaceFastestDown waitmovement 0 delay 25 diff --git a/data/maps/SilphCo_7F/scripts.inc b/data/maps/SilphCo_7F/scripts.inc index 77d38099e..fc5f9401a 100644 --- a/data/maps/SilphCo_7F/scripts.inc +++ b/data/maps/SilphCo_7F/scripts.inc @@ -34,7 +34,7 @@ SilphCo_7F_EventScript_RivalTriggerBottom:: end SilphCo_7F_EventScript_RivalScene:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 applymovement LOCALID_RIVAL, Movement_ExclamationMark waitmovement 0 @@ -140,7 +140,7 @@ SilphCo_7F_EventScript_LaprasGuy:: end SilphCo_7F_EventScript_ReceiveLaprasParty:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message SilphCo_7F_Text_ObtainedLaprasFromEmployee waitmessage @@ -155,7 +155,7 @@ SilphCo_7F_EventScript_ReceiveLaprasParty:: end SilphCo_7F_EventScript_ReceiveLaprasPC:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message SilphCo_7F_Text_ObtainedLaprasFromEmployee waitmessage @@ -174,7 +174,7 @@ SilphCo_7F_EventScript_LaprasTransferredToPC:: end SilphCo_7F_EventScript_EndReceiveLapras:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox SilphCo_7F_Text_ExplainLapras setflag FLAG_GOT_LAPRAS_FROM_SILPH release diff --git a/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc b/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc index fa1b9a367..172142fc0 100644 --- a/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc +++ b/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc @@ -7,7 +7,7 @@ SixIsland_DottedHole_SapphireRoom_MapScripts:: SixIsland_DottedHole_SapphireRoom_EventScript_Sapphire:: lock faceplayer - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM message SixIsland_DottedHole_SapphireRoom_Text_FoundSapphire waitmessage @@ -41,7 +41,7 @@ SixIsland_DottedHole_SapphireRoom_EventScript_Sapphire:: call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireEast compare VAR_FACING, DIR_WEST call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireWest - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox SixIsland_DottedHole_SapphireRoom_Text_IWasRightInTailingYou closemessage compare VAR_FACING, DIR_NORTH diff --git a/data/maps/SixIsland_PokemonCenter_1F/scripts.inc b/data/maps/SixIsland_PokemonCenter_1F/scripts.inc index c67d905e3..1c8f08406 100644 --- a/data/maps/SixIsland_PokemonCenter_1F/scripts.inc +++ b/data/maps/SixIsland_PokemonCenter_1F/scripts.inc @@ -22,7 +22,7 @@ SixIsland_PokemonCenter_1F_OnFrame:: SixIsland_PokemonCenter_1F_EventScript_RivalScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestDown waitmovement 0 playbgm MUS_ENCOUNTER_RIVAL, 0 diff --git a/data/maps/ThreeIsland/scripts.inc b/data/maps/ThreeIsland/scripts.inc index b6bc87870..194b4e4a4 100644 --- a/data/maps/ThreeIsland/scripts.inc +++ b/data/maps/ThreeIsland/scripts.inc @@ -161,7 +161,7 @@ ThreeIsland_EventScript_AntiBiker2BikersGone:: ThreeIsland_EventScript_BikerBossIntroTrigger:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_ANTIBIKER1, ThreeIsland_Movement_SpeakRight waitmovement 0 msgbox ThreeIsland_Text_AreYouBossGoBackToKanto @@ -220,7 +220,7 @@ ThreeIsland_EventScript_BattleBikersTriggerRight:: end ThreeIsland_EventScript_BattleBikersScene:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_BIKER1, Movement_WalkInPlaceFastestDown waitmovement 0 playse SE_PIN diff --git a/data/maps/TrainerTower_Lobby/scripts.inc b/data/maps/TrainerTower_Lobby/scripts.inc index 15a1bbb44..4bd7e9494 100644 --- a/data/maps/TrainerTower_Lobby/scripts.inc +++ b/data/maps/TrainerTower_Lobby/scripts.inc @@ -81,7 +81,7 @@ TrainerTower_Lobby_EventScript_LostChallenge:: lock faceplayer applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_FaceReceptionist - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox TrainerTower_Lobby_Text_TooBadComeBackTryAgain goto TrainerTower_Lobby_EventScript_ExitChallenge @@ -90,7 +90,7 @@ TrainerTower_Lobby_EventScript_164938:: lock faceplayer applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_FaceReceptionist - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox TrainerTower_Lobby_Text_MoveCounterHereWhenTrainersSwitch TrainerTower_Lobby_EventScript_ExitChallenge:: closemessage @@ -152,7 +152,7 @@ TrainerTower_Lobby_Mart_Items:: TrainerTower_Lobby_EventScript_EntryTrigger:: lockall applymovement OBJ_EVENT_ID_PLAYER, TrainerTower_Lobby_Movement_FaceReceptionist - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox TrainerTower_Lobby_Text_WelcomeToTrainerTower ttower_getnumfloors compare VAR_RESULT, FALSE diff --git a/data/maps/TwoIsland_House/scripts.inc b/data/maps/TwoIsland_House/scripts.inc index da3e4d171..e869f1b24 100644 --- a/data/maps/TwoIsland_House/scripts.inc +++ b/data/maps/TwoIsland_House/scripts.inc @@ -76,7 +76,7 @@ TwoIsland_House_EventScript_ChooseMoveToTeach:: TwoIsland_House_EventScript_GiveBigMushroom:: removeitem ITEM_BIG_MUSHROOM - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox TwoIsland_House_Text_HandedOverOneBigMushroom call EventScript_RestorePrevTextColor goto TwoIsland_House_EventScript_EndTutorMove @@ -84,7 +84,7 @@ TwoIsland_House_EventScript_GiveBigMushroom:: TwoIsland_House_EventScript_GiveTinyMushrooms:: removeitem ITEM_TINY_MUSHROOM, 2 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox TwoIsland_House_Text_HandedOverTwoTinyMushrooms call EventScript_RestorePrevTextColor goto TwoIsland_House_EventScript_EndTutorMove diff --git a/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc b/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc index 0b67e5836..005e4990b 100644 --- a/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc +++ b/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc @@ -37,9 +37,9 @@ TwoIsland_JoyfulGameCorner_OnFrame:: TwoIsland_JoyfulGameCorner_EventScript_FoundLostelleScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox TwoIsland_JoyfulGameCorner_Text_YouRescuedLostelle - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE special BufferBigGuyOrBigGirlString msgbox TwoIsland_JoyfulGameCorner_Text_LostelleItsOkayDaddy closemessage @@ -51,7 +51,7 @@ TwoIsland_JoyfulGameCorner_EventScript_FoundLostelleScene:: TwoIsland_JoyfulGameCorner_EventScript_HelpFindLostelleScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_DADDY, Movement_171520 waitmovement 0 msgbox TwoIsland_JoyfulGameCorner_Text_WhereHasLostelleGottenTo @@ -157,7 +157,7 @@ TwoIsland_JoyfulGameCorner_EventScript_GiveDaddyMeteorite:: goto_if_set FLAG_NO_ROOM_FOR_JOYFUL_GAME_CORNER_MOON_STONE, TwoIsland_JoyfulGameCorner_EventScript_ReceiveMoonStone msgbox TwoIsland_JoyfulGameCorner_Text_ThisIsForMe setvar VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 2 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_TMHM message TwoIsland_JoyfulGameCorner_Text_HandedMeteoriteToLostellesDaddy waitmessage diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc index c49b8d38e..c56a83337 100644 --- a/data/maps/VermilionCity/scripts.inc +++ b/data/maps/VermilionCity/scripts.inc @@ -199,7 +199,7 @@ VermilionCity_EventScript_ExitedTicketCheck:: end VermilionCity_EventScript_CheckTicket:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_FERRY_SAILOR, Movement_WalkInPlaceFastestLeft applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 diff --git a/data/maps/ViridianCity/scripts.inc b/data/maps/ViridianCity/scripts.inc index c1b735a6d..5cd7b62b7 100644 --- a/data/maps/ViridianCity/scripts.inc +++ b/data/maps/ViridianCity/scripts.inc @@ -46,7 +46,7 @@ ViridianCity_EventScript_TryUnlockGym:: ViridianCity_EventScript_GymDoorLocked:: lockall - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 delay 20 @@ -203,7 +203,7 @@ ViridianCity_EventScript_DreamEaterTutor:: ViridianCity_EventScript_RoadBlocked:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox ViridianCity_Text_ThisIsPrivateProperty closemessage applymovement OBJ_EVENT_ID_PLAYER, ViridianCity_Movement_WalkDown @@ -217,7 +217,7 @@ ViridianCity_Movement_WalkDown:: ViridianCity_EventScript_TutorialTriggerLeft:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_TUTORIAL_MAN, Movement_WalkInPlaceFastestLeft waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight @@ -228,7 +228,7 @@ ViridianCity_EventScript_TutorialTriggerLeft:: ViridianCity_EventScript_TutorialTriggerRight:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_TUTORIAL_MAN, Movement_WalkInPlaceFastestRight waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestLeft diff --git a/data/maps/ViridianCity_Mart/scripts.inc b/data/maps/ViridianCity_Mart/scripts.inc index 3142b0500..c3d068f7a 100644 --- a/data/maps/ViridianCity_Mart/scripts.inc +++ b/data/maps/ViridianCity_Mart/scripts.inc @@ -20,7 +20,7 @@ ViridianCity_Mart_OnFrame:: ViridianCity_Mart_EventScript_ParcelScene:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement LOCALID_CLERK, Movement_WalkInPlaceFastestDown waitmovement 0 msgbox ViridianCity_Mart_Text_YouCameFromPallet diff --git a/data/maps/ViridianCity_School/scripts.inc b/data/maps/ViridianCity_School/scripts.inc index 9b4cbcbf2..eca1c7723 100644 --- a/data/maps/ViridianCity_School/scripts.inc +++ b/data/maps/ViridianCity_School/scripts.inc @@ -41,7 +41,7 @@ ViridianCity_School_EventScript_Notebook:: msgbox ViridianCity_School_Text_NotebookFourthPage applymovement LOCALID_LASS, Movement_WalkInPlaceFastestUp waitmovement 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox ViridianCity_School_Text_HeyDontLookAtMyNotes releaseall end diff --git a/data/scripts/bag_full.inc b/data/scripts/bag_full.inc index 7ce421e78..eaf65c775 100644 --- a/data/scripts/bag_full.inc +++ b/data/scripts/bag_full.inc @@ -1,5 +1,5 @@ EventScript_BagIsFull:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_TooBadBagFull release end diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 00b767374..257df25d3 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -113,7 +113,7 @@ CableClub_EventScript_CloseLinkAndExitLinkRoom:: special HelpSystem_Enable special QuestLog_StartRecordingInputsAfterDeferredEvent setvar VAR_CABLE_CLUB_STATE, 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE compare VAR_0x8007, 0 goto_if_eq CableClub_EventScript_PlayerExitLinkRoom applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -139,7 +139,7 @@ CableClub_EventScript_PlayerExitTradeCenter:: special HelpSystem_Enable special QuestLog_StartRecordingInputsAfterDeferredEvent setvar VAR_CABLE_CLUB_STATE, 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE compare VAR_0x8007, 0 goto_if_eq CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight @@ -163,7 +163,7 @@ CableClub_EventScript_PlayerExitUnionRoom:: special HelpSystem_Enable special QuestLog_StartRecordingInputsAfterDeferredEvent setvar VAR_CABLE_CLUB_STATE, 0 - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE compare VAR_0x8007, 0 goto_if_eq CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight @@ -192,7 +192,7 @@ CableClub_EventScript_PlayerExitLinkRoom:: CableClub_EventScript_Tutorial:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 msgbox CableClub_Text_FirstTimeRightThisWay @@ -285,7 +285,7 @@ CableClub_EventScript_TryEnterColosseum:: message CableClub_Text_PleaseWaitBCancel waitmessage special HelpSystem_Disable - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special TryBattleLinkup waitstate call EventScript_RestorePrevTextColor @@ -392,7 +392,7 @@ CableClub_EventScript_TradeCenter:: message CableClub_Text_PleaseWaitBCancel waitmessage special HelpSystem_Disable - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special TryTradeLinkup waitstate call EventScript_RestorePrevTextColor @@ -608,14 +608,14 @@ CableClub_EventScript_ShowBattleRecords:: BattleColosseum_2P_EventScript_PlayerSpot0:: setvar VAR_0x8005, 0 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot waitstate end BattleColosseum_2P_EventScript_PlayerSpot1:: setvar VAR_0x8005, 1 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot waitstate end @@ -627,7 +627,7 @@ BattleColosseum_4P_EventScript_PlayerSpot0:: compare VAR_RESULT, 0 goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 0 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot waitstate end @@ -639,7 +639,7 @@ BattleColosseum_4P_EventScript_PlayerSpot1:: compare VAR_RESULT, 0 goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 1 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot waitstate end @@ -651,7 +651,7 @@ BattleColosseum_4P_EventScript_PlayerSpot2:: compare VAR_RESULT, 0 goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 2 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot waitstate end @@ -663,7 +663,7 @@ BattleColosseum_4P_EventScript_PlayerSpot3:: compare VAR_RESULT, 0 goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 3 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot waitstate end @@ -673,14 +673,14 @@ BattleColosseum_4P_EventScript_CancelSpotTrigger:: TradeCenter_EventScript_Chair0:: setvar VAR_0x8005, 0 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterTradeSeat waitstate end TradeCenter_EventScript_Chair1:: setvar VAR_0x8005, 1 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterTradeSeat waitstate end @@ -688,7 +688,7 @@ TradeCenter_EventScript_Chair1:: @ Unused TradeCenter_EventScript_Chair2:: setvar VAR_0x8005, 2 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterTradeSeat waitstate end @@ -696,7 +696,7 @@ TradeCenter_EventScript_Chair2:: @ Unused TradeCenter_EventScript_Chair3:: setvar VAR_0x8005, 3 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special EnterTradeSeat waitstate end @@ -710,7 +710,7 @@ RecordCorner_EventScript_Spot3:: end CableClub_EventScript_ReadTrainerCard:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_LookedAtPlayersTrainerCard fadescreen FADE_TO_BLACK special Script_ShowLinkTrainerCard @@ -718,7 +718,7 @@ CableClub_EventScript_ReadTrainerCard:: end CableClub_EventScript_ReadTrainerCardColored:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_LookedAtPlayersTrainerCardColored fadescreen FADE_TO_BLACK special Script_ShowLinkTrainerCard @@ -726,13 +726,13 @@ CableClub_EventScript_ReadTrainerCardColored:: end CableClub_EventScript_TooBusyToNotice:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_TrainerTooBusyToNotice closemessage end BattleColosseum_2P_EventScript_Attendant:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special Script_FacePlayer msgbox Text_TakeSeatStartBattle special Script_ClearHeldMovement @@ -740,7 +740,7 @@ BattleColosseum_2P_EventScript_Attendant:: end TradeCenter_EventScript_Attendant:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special Script_FacePlayer msgbox Text_TakeSeatStartTrade special Script_ClearHeldMovement @@ -752,7 +752,7 @@ RecordCorner_EventScript_Attendant:: end TradeCenter_ConfirmLeaveRoom:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_TerminateLinkIfYouLeaveRoom, MSGBOX_YESNO compare VAR_RESULT, YES goto_if_eq TradeCenter_TerminateLink @@ -761,7 +761,7 @@ TradeCenter_ConfirmLeaveRoom:: end TradeCenter_TerminateLink:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL messageautoscroll Text_TerminateLinkConfirmation waitmessage special ExitLinkRoom @@ -1002,7 +1002,7 @@ CableClub_EventScript_SaveAndChooseLinkLeader:: end CableClub_EventScript_ChooseLinkLeaderFrom2:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL message CableClub_Text_ChooseGroupLeaderOfTwo waitmessage call EventScript_RestorePrevTextColor @@ -1037,7 +1037,7 @@ CableClub_EventScript_TryJoinGroup2Players:: return CableClub_EventScript_ChooseLinkLeaderFrom4:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL message CableClub_Text_ChooseGroupLeaderOfFour waitmessage call EventScript_RestorePrevTextColor @@ -1072,7 +1072,7 @@ CableClub_EventScript_TryJoinGroup4Players:: return CableClub_EventScript_ChooseLinkLeader:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL message CableClub_Text_ChooseGroupLeader waitmessage call EventScript_RestorePrevTextColor @@ -1282,7 +1282,7 @@ CableClub_EventScript_PlayDodrioBerryPicking:: end CableClub_EventScript_ChooseLinkLeaderMinigame:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL message CableClub_Text_ChooseGroupLeader waitmessage call EventScript_RestorePrevTextColor diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index 6b14a58be..8bbc92d9f 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -98,7 +98,7 @@ Route5_PokemonDayCare_EventScript_RetrieveMon:: bufferpartymonnick STR_VAR_1, VAR_RESULT copyvar VAR_RESULT, VAR_0x8008 msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL waitse playmoncry VAR_RESULT, CRY_MODE_NORMAL msgbox Route5_PokemonDayCare_Text_PlayerGotMonBack diff --git a/data/scripts/fame_checker.inc b/data/scripts/fame_checker.inc index 4950fd73d..c15a88101 100644 --- a/data/scripts/fame_checker.inc +++ b/data/scripts/fame_checker.inc @@ -3,7 +3,7 @@ ViridianCity_School_EventScript_PokemonJournal:: faceplayer famechecker FAMECHECKER_OAK, 3 famechecker FAMECHECKER_DAISY, 3 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureProfOak release end @@ -13,7 +13,7 @@ EventScript_PokemonJournalUnused1:: faceplayer famechecker FAMECHECKER_DAISY, 1 famechecker FAMECHECKER_OAK, 4 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureProfOak release end @@ -22,7 +22,7 @@ EventScript_PokemonJournalUnused2:: lock faceplayer famechecker FAMECHECKER_DAISY, 4 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureProfOak release end @@ -30,7 +30,7 @@ EventScript_PokemonJournalUnused2:: FourIsland_PokemonCenter_1F_EventScript_PokemonJournal:: lockall famechecker FAMECHECKER_DAISY, 5 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureDaisyOak releaseall end @@ -54,7 +54,7 @@ MtMoon_1F_EventScript_BaldingMan:: PewterCity_Museum_1F_EventScript_PokemonJournalBrock:: lockall famechecker FAMECHECKER_BROCK, 5 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureBrock releaseall end @@ -79,7 +79,7 @@ CeruleanCity_PokemonCenter_1F_EventScript_PokemonJournalMisty:: lock faceplayer famechecker FAMECHECKER_MISTY, 5 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureMisty release end @@ -87,7 +87,7 @@ CeruleanCity_PokemonCenter_1F_EventScript_PokemonJournalMisty:: VermilionCity_PokemonCenter_1F_EventScript_PokemonJournalLtSurge:: lockall famechecker FAMECHECKER_LTSURGE, 5 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureLtSurge releaseall end @@ -96,7 +96,7 @@ CeladonCity_Condominiums_2F_EventScript_PokemonJournalErika:: lock faceplayer famechecker FAMECHECKER_ERIKA, 5 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureErika release end @@ -105,7 +105,7 @@ FuchsiaCity_WardensHouse_EventScript_PokemonJournalKoga:: lock faceplayer famechecker FAMECHECKER_KOGA, 4 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureKoga release end @@ -122,7 +122,7 @@ SaffronCity_PokemonCenter_1F_EventScript_PokemonJournalSabrina:: lock faceplayer famechecker FAMECHECKER_SABRINA, 4 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureSabrina release end @@ -138,7 +138,7 @@ CinnabarIsland_Gym_EventScript_BlaineFujiPhoto:: FiveIsland_ResortGorgeous_House_EventScript_PokemonJournal:: lockall famechecker FAMECHECKER_BLAINE, 5 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureBlaine releaseall end @@ -155,7 +155,7 @@ FiveIsland_PokemonCenter_1F_EventScript_PokemonJournal:: lock faceplayer famechecker FAMECHECKER_LORELEI, 3 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureLorelei release end @@ -164,7 +164,7 @@ SaffronCity_PokemonTrainerFanClub_EventScript_PokemonJournalBruno:: lock faceplayer famechecker FAMECHECKER_BRUNO, 2 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureBruno release end @@ -190,7 +190,7 @@ SevenIsland_PokemonCenter_1F_EventScript_PokemonJournal:: lock faceplayer famechecker FAMECHECKER_AGATHA, 3 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureAgatha release end @@ -239,7 +239,7 @@ IndigoPlateau_PokemonCenter_1F_EventScript_PokemonJournal:: lock faceplayer famechecker FAMECHECKER_LANCE, 4 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureLance release end @@ -264,7 +264,7 @@ CinnabarIsland_PokemonCenter_1F_EventScript_PokemonJournalMrFuji:: lock faceplayer famechecker FAMECHECKER_MRFUJI, 5 - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PokemonJournal_Text_SpecialFeatureMrFuji release end diff --git a/data/scripts/itemfinder.inc b/data/scripts/itemfinder.inc index d4b96cd76..941c17a9b 100644 --- a/data/scripts/itemfinder.inc +++ b/data/scripts/itemfinder.inc @@ -1,6 +1,6 @@ EventScript_ItemfinderDigUpUnderfootItem:: lockall - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL waitse call EventScript_TryPickUpHiddenItem compare VAR_0x8007, TRUE diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index d65cb1f18..deeebddd6 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -557,7 +557,7 @@ EventScript_ChooseMoveTutorMon:: return EventScript_CanOnlyBeLearnedOnce:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special DisableMsgBoxWalkaway signmsg msgbox Text_MoveCanOnlyBeLearnedOnce, MSGBOX_YESNO diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index 87eace4e5..b15b5e2b9 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -9,7 +9,7 @@ EventScript_RestorePrevTextColor:: Std_ObtainItem:: copyvar VAR_PREV_TEXT_COLOR, VAR_TEXT_COLOR - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL additem VAR_0x8000, VAR_0x8001 copyvar VAR_0x8007, VAR_RESULT call EventScript_ObtainItemMessage @@ -160,7 +160,7 @@ EventScript_NoRoomToPickUpItem:: EventScript_HiddenItemScript:: lockall - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL waitse compare VAR_0x8005, 0 goto_if_eq EventScript_TryPickUpHiddenCoins diff --git a/data/scripts/pokedex_rating.inc b/data/scripts/pokedex_rating.inc index 808659b08..5b70ef61a 100644 --- a/data/scripts/pokedex_rating.inc +++ b/data/scripts/pokedex_rating.inc @@ -65,7 +65,7 @@ PokedexRating_EventScript_Rate:: end PokedexRating_EventScript_SetTextColor:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE return PokedexRating_EventScript_DexIncomplete:: diff --git a/data/scripts/pokemon_league.inc b/data/scripts/pokemon_league.inc index d30251746..03295279e 100644 --- a/data/scripts/pokemon_league.inc +++ b/data/scripts/pokemon_league.inc @@ -23,7 +23,7 @@ PokemonLeague_EventScript_SetDoorOpen:: PokemonLeague_EventScript_PreventExit:: lockall - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE msgbox Text_VoiceRangOutDontRunAway closemessage applymovement OBJ_EVENT_ID_PLAYER, PokemonLeague_Movement_ForcePlayerIn diff --git a/data/scripts/questionnaire.inc b/data/scripts/questionnaire.inc index da618572d..f43a9064d 100644 --- a/data/scripts/questionnaire.inc +++ b/data/scripts/questionnaire.inc @@ -1,6 +1,6 @@ EventScript_Questionnaire:: lockall - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_FillOutQuestionnaire, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_DeclineQuestionnaire @@ -9,7 +9,7 @@ EventScript_Questionnaire:: lock faceplayer specialvar VAR_0x8008, GetMartClerkObjectId - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE compare VAR_0x8004, 0 goto_if_eq EventScript_EnableMysteryGift compare VAR_RESULT, 0 @@ -28,7 +28,7 @@ EventScript_EnableMysteryGift:: waitmovement 0 msgbox Text_YouKnowThoseWords setflag FLAG_SYS_MYSTERY_GIFT_ENABLED - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special DisableMsgBoxWalkaway signmsg msgbox Text_YouCanAccessMysteryGift diff --git a/data/scripts/route23.inc b/data/scripts/route23.inc index 3d88bc272..55e63d488 100644 --- a/data/scripts/route23.inc +++ b/data/scripts/route23.inc @@ -115,7 +115,7 @@ Route23_EventScript_RecognizeBadge:: end Route23_EventScript_BadgeGuardTrigger:: - textcolor 0 + textcolor NPC_TEXT_COLOR_MALE applymovement VAR_0x8009, Movement_WalkInPlaceFastestLeft waitmovement 0 switch VAR_TEMP_1 diff --git a/data/scripts/std_msgbox.inc b/data/scripts/std_msgbox.inc index e7feabfa6..d2a85a151 100644 --- a/data/scripts/std_msgbox.inc +++ b/data/scripts/std_msgbox.inc @@ -28,7 +28,7 @@ Std_MsgboxYesNo:: return Std_ReceivedItem:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL compare VAR_0x8002, MUS_LEVEL_UP call_if_eq EventScript_ReceivedItemFanfare1 compare VAR_0x8002, MUS_OBTAIN_KEY_ITEM diff --git a/data/scripts/trainer_card.inc b/data/scripts/trainer_card.inc index 9c70b4c7c..5cbf0897c 100644 --- a/data/scripts/trainer_card.inc +++ b/data/scripts/trainer_card.inc @@ -238,7 +238,7 @@ FourIsland_House2_EventScript_AlreadyBraggedHoFMax:: end FourIsland_House2_EventScript_BraggedHoF:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message FourIsland_House2_Text_HoFStickerApplied waitmessage @@ -301,7 +301,7 @@ FourIsland_House2_EventScript_AlreadyBraggedEggsMax:: end FourIsland_House2_EventScript_BraggedEggs:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message FourIsland_House2_Text_EggStickerApplied waitmessage @@ -364,7 +364,7 @@ FourIsland_House2_EventScript_AlreadyBraggedLinkWinsMax:: end FourIsland_House2_EventScript_BraggedLinkWins:: - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message FourIsland_House2_Text_VictoryStickerApplied waitmessage diff --git a/data/scripts/trainer_tower.inc b/data/scripts/trainer_tower.inc index bedf9bb6a..3a734aafd 100644 --- a/data/scripts/trainer_tower.inc +++ b/data/scripts/trainer_tower.inc @@ -292,7 +292,7 @@ TrainerTower_Roof_EventScript_GivePrize: TrainerTower_Roof_EventScript_ReceivePrize: msgbox TrainerTower_Roof_Text_ThisIsForYou - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP message Text_ObtainedTheX waitfanfare diff --git a/data/scripts/white_out.inc b/data/scripts/white_out.inc index 679b9fb7b..2f69a863c 100644 --- a/data/scripts/white_out.inc +++ b/data/scripts/white_out.inc @@ -1,6 +1,6 @@ EventScript_AfterWhiteOutHeal:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE msgbox Text_FirstShouldRestoreMonsHealth call EventScript_PkmnCenterNurse_TakeAndHealPkmn call_if_unset FLAG_DEFEATED_BROCK, EventScript_AfterWhiteOutHealMsgPreBrock @@ -23,7 +23,7 @@ EventScript_AfterWhiteOutHealMsg:: EventScript_AfterWhiteOutMomHeal:: lockall - textcolor 1 + textcolor NPC_TEXT_COLOR_FEMALE applymovement LOCALID_MOM, Movement_WalkInPlaceFastestDown waitmovement 0 msgbox Text_HadQuiteAnExperienceTakeRest @@ -35,7 +35,7 @@ EventScript_AfterWhiteOutMomHeal:: EventScript_FieldPoison:: lockall - textcolor 3 + textcolor NPC_TEXT_COLOR_NEUTRAL special TryFieldPoisonWhiteOut waitstate compare VAR_RESULT, TRUE diff --git a/include/constants/vars.h b/include/constants/vars.h index bb301609d..0db01238c 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -334,4 +334,11 @@ #define SPECIAL_VARS_END 0x8014 +// Text color ids for VAR_TEXT_COLOR / VAR_PREV_TEXT_COLOR +#define NPC_TEXT_COLOR_MALE 0 // Blue, for male NPCs +#define NPC_TEXT_COLOR_FEMALE 1 // Red, for female NPCs +#define NPC_TEXT_COLOR_MON 2 // Black, for Pokémon +#define NPC_TEXT_COLOR_NEUTRAL 3 // Black, for inanimate objects and messages from the game +#define NPC_TEXT_COLOR_DEFAULT 255 // If an NPC is selected, use the color specified by GetColorFromTextColorTable, otherwise use Neutral. + #endif // GUARD_CONSTANTS_VARS_H diff --git a/src/battle_message.c b/src/battle_message.c index 12369f063..a845fe57c 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2378,7 +2378,13 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = { {PIXEL_FILL(0x1), 4, 0x00, 1, 0, 1, 1, 0x2, 0x1, 0x3} }; -const u8 gUnknown_83FEC90[] = {0x04, 0x05, 0x02, 0x02}; +static const u8 sNpcTextColorToFont[] = +{ + [NPC_TEXT_COLOR_MALE] = FONT_4, + [NPC_TEXT_COLOR_FEMALE] = FONT_5, + [NPC_TEXT_COLOR_MON] = FONT_2, + [NPC_TEXT_COLOR_NEUTRAL] = FONT_2, +}; // windowId: Upper 2 bits are text flags // x40: Use NPC context-defined font @@ -2388,15 +2394,15 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId) { struct TextPrinterTemplate printerTemplate; u8 speed; int x; - u8 context; + u8 color; u8 textFlags = windowId & 0xC0; windowId &= 0x3F; if (!(textFlags & 0x80)) FillWindowPixelBuffer(windowId, sTextOnWindowsInfo_Normal[windowId].fillValue); if (textFlags & 0x40) { - context = ContextNpcGetTextColor(); - printerTemplate.fontId = gUnknown_83FEC90[context]; + color = ContextNpcGetTextColor(); + printerTemplate.fontId = sNpcTextColorToFont[color]; } else { printerTemplate.fontId = sTextOnWindowsInfo_Normal[windowId].fontId; diff --git a/src/dynamic_placeholder_text_util.c b/src/dynamic_placeholder_text_util.c index 8167c0d2b..3eaf8db8d 100644 --- a/src/dynamic_placeholder_text_util.c +++ b/src/dynamic_placeholder_text_util.c @@ -4,85 +4,87 @@ static EWRAM_DATA const u8 *sStringPointers[8] = {0}; +#define COLORS(a, b)((a) | (b << 4)) + static const u8 sTextColorTable[] = { // [LOW_NYBBLE / 2] = 0xXY, // HIGH_NYBBLE - [OBJ_EVENT_GFX_RED_NORMAL / 2] = 0x00, // OBJ_EVENT_GFX_RED_BIKE - [OBJ_EVENT_GFX_RED_SURF / 2] = 0x00, // OBJ_EVENT_GFX_RED_FIELD_MOVE - [OBJ_EVENT_GFX_RED_FISH / 2] = 0x00, // OBJ_EVENT_GFX_RED_VS_SEEKER - [OBJ_EVENT_GFX_RED_VS_SEEKER_BIKE / 2] = 0x10, // OBJ_EVENT_GFX_GREEN_NORMAL - [OBJ_EVENT_GFX_GREEN_BIKE / 2] = 0x11, // OBJ_EVENT_GFX_GREEN_SURF - [OBJ_EVENT_GFX_GREEN_FIELD_MOVE / 2] = 0x11, // OBJ_EVENT_GFX_GREEN_FISH - [OBJ_EVENT_GFX_GREEN_VS_SEEKER / 2] = 0x11, // OBJ_EVENT_GFX_GREEN_VS_SEEKER_BIKE - [OBJ_EVENT_GFX_RS_BRENDAN / 2] = 0x10, // OBJ_EVENT_GFX_RS_MAY - [OBJ_EVENT_GFX_LITTLE_BOY / 2] = 0x10, // OBJ_EVENT_GFX_LITTLE_GIRL - [OBJ_EVENT_GFX_YOUNGSTER / 2] = 0x00, // OBJ_EVENT_GFX_BOY - [OBJ_EVENT_GFX_BUG_CATCHER / 2] = 0x00, // OBJ_EVENT_GFX_SITTING_BOY - [OBJ_EVENT_GFX_LASS / 2] = 0x11, // OBJ_EVENT_GFX_WOMAN_1 - [OBJ_EVENT_GFX_BATTLE_GIRL / 2] = 0x01, // OBJ_EVENT_GFX_MAN - [OBJ_EVENT_GFX_ROCKER / 2] = 0x00, // OBJ_EVENT_GFX_FAT_MAN - [OBJ_EVENT_GFX_WOMAN_2 / 2] = 0x11, // OBJ_EVENT_GFX_BEAUTY - [OBJ_EVENT_GFX_BALDING_MAN / 2] = 0x10, // OBJ_EVENT_GFX_WOMAN_3 - [OBJ_EVENT_GFX_OLD_MAN_1 / 2] = 0x00, // OBJ_EVENT_GFX_OLD_MAN_2 - [OBJ_EVENT_GFX_OLD_MAN_LYING_DOWN / 2] = 0x10, // OBJ_EVENT_GFX_OLD_WOMAN - [OBJ_EVENT_GFX_TUBER_M_WATER / 2] = 0x10, // OBJ_EVENT_GFX_TUBER_F - [OBJ_EVENT_GFX_TUBER_M_LAND / 2] = 0x00, // OBJ_EVENT_GFX_CAMPER - [OBJ_EVENT_GFX_PICNICKER / 2] = 0x01, // OBJ_EVENT_GFX_COOLTRAINER_M - [OBJ_EVENT_GFX_COOLTRAINER_F / 2] = 0x01, // OBJ_EVENT_GFX_SWIMMER_M_WATER - [OBJ_EVENT_GFX_SWIMMER_F_WATER / 2] = 0x01, // OBJ_EVENT_GFX_SWIMMER_M_LAND - [OBJ_EVENT_GFX_SWIMMER_F_LAND / 2] = 0x01, // OBJ_EVENT_GFX_WORKER_M - [OBJ_EVENT_GFX_WORKER_F / 2] = 0x01, // OBJ_EVENT_GFX_ROCKET_M - [OBJ_EVENT_GFX_ROCKET_F / 2] = 0x01, // OBJ_EVENT_GFX_GBA_KID - [OBJ_EVENT_GFX_SUPER_NERD / 2] = 0x00, // OBJ_EVENT_GFX_BIKER - [OBJ_EVENT_GFX_BLACKBELT / 2] = 0x00, // OBJ_EVENT_GFX_SCIENTIST - [OBJ_EVENT_GFX_HIKER / 2] = 0x00, // OBJ_EVENT_GFX_FISHER - [OBJ_EVENT_GFX_CHANNELER / 2] = 0x01, // OBJ_EVENT_GFX_CHEF - [OBJ_EVENT_GFX_POLICEMAN / 2] = 0x00, // OBJ_EVENT_GFX_GENTLEMAN - [OBJ_EVENT_GFX_SAILOR / 2] = 0x00, // OBJ_EVENT_GFX_CAPTAIN - [OBJ_EVENT_GFX_NURSE / 2] = 0x11, // OBJ_EVENT_GFX_CABLE_CLUB_RECEPTIONIST - [OBJ_EVENT_GFX_UNION_ROOM_RECEPTIONIST / 2] = 0x01, // OBJ_EVENT_GFX_UNUSED_MALE_RECEPTIONIST - [OBJ_EVENT_GFX_CLERK / 2] = 0x00, // OBJ_EVENT_GFX_MG_DELIVERYMAN - [OBJ_EVENT_GFX_TRAINER_TOWER_DUDE / 2] = 0x00, // OBJ_EVENT_GFX_PROF_OAK - [OBJ_EVENT_GFX_BLUE / 2] = 0x00, // OBJ_EVENT_GFX_BILL - [OBJ_EVENT_GFX_LANCE / 2] = 0x10, // OBJ_EVENT_GFX_AGATHA - [OBJ_EVENT_GFX_DAISY / 2] = 0x11, // OBJ_EVENT_GFX_LORELEI - [OBJ_EVENT_GFX_MR_FUJI / 2] = 0x00, // OBJ_EVENT_GFX_BRUNO - [OBJ_EVENT_GFX_BROCK / 2] = 0x10, // OBJ_EVENT_GFX_MISTY - [OBJ_EVENT_GFX_LT_SURGE / 2] = 0x10, // OBJ_EVENT_GFX_ERIKA - [OBJ_EVENT_GFX_KOGA / 2] = 0x10, // OBJ_EVENT_GFX_SABRINA - [OBJ_EVENT_GFX_BLAINE / 2] = 0x00, // OBJ_EVENT_GFX_GIOVANNI - [OBJ_EVENT_GFX_MOM / 2] = 0x01, // OBJ_EVENT_GFX_CELIO - [OBJ_EVENT_GFX_TEACHY_TV_HOST / 2] = 0x00, // OBJ_EVENT_GFX_GYM_GUY - [OBJ_EVENT_GFX_ITEM_BALL / 2] = 0x33, // OBJ_EVENT_GFX_TOWN_MAP - [OBJ_EVENT_GFX_POKEDEX / 2] = 0x33, // OBJ_EVENT_GFX_CUT_TREE - [OBJ_EVENT_GFX_ROCK_SMASH_ROCK / 2] = 0x33, // OBJ_EVENT_GFX_PUSHABLE_BOULDER - [OBJ_EVENT_GFX_FOSSIL / 2] = 0x33, // OBJ_EVENT_GFX_RUBY - [OBJ_EVENT_GFX_SAPPHIRE / 2] = 0x33, // OBJ_EVENT_GFX_OLD_AMBER - [OBJ_EVENT_GFX_GYM_SIGN / 2] = 0x33, // OBJ_EVENT_GFX_SIGN - [OBJ_EVENT_GFX_TRAINER_TIPS / 2] = 0x33, // OBJ_EVENT_GFX_CLIPBOARD - [OBJ_EVENT_GFX_METEORITE / 2] = 0x33, // OBJ_EVENT_GFX_LAPRAS_DOLL - [OBJ_EVENT_GFX_SEAGALLOP / 2] = 0x23, // OBJ_EVENT_GFX_SNORLAX - [OBJ_EVENT_GFX_SPEAROW / 2] = 0x22, // OBJ_EVENT_GFX_CUBONE - [OBJ_EVENT_GFX_POLIWRATH / 2] = 0x22, // OBJ_EVENT_GFX_CLEFAIRY - [OBJ_EVENT_GFX_PIDGEOT / 2] = 0x22, // OBJ_EVENT_GFX_JIGGLYPUFF - [OBJ_EVENT_GFX_PIDGEY / 2] = 0x22, // OBJ_EVENT_GFX_CHANSEY - [OBJ_EVENT_GFX_OMANYTE / 2] = 0x22, // OBJ_EVENT_GFX_KANGASKHAN - [OBJ_EVENT_GFX_PIKACHU / 2] = 0x22, // OBJ_EVENT_GFX_PSYDUCK - [OBJ_EVENT_GFX_NIDORAN_F / 2] = 0x22, // OBJ_EVENT_GFX_NIDORAN_M - [OBJ_EVENT_GFX_NIDORINO / 2] = 0x22, // OBJ_EVENT_GFX_MEOWTH - [OBJ_EVENT_GFX_SEEL / 2] = 0x22, // OBJ_EVENT_GFX_VOLTORB - [OBJ_EVENT_GFX_SLOWPOKE / 2] = 0x22, // OBJ_EVENT_GFX_SLOWBRO - [OBJ_EVENT_GFX_MACHOP / 2] = 0x22, // OBJ_EVENT_GFX_WIGGLYTUFF - [OBJ_EVENT_GFX_DODUO / 2] = 0x22, // OBJ_EVENT_GFX_FEAROW - [OBJ_EVENT_GFX_MACHOKE / 2] = 0x22, // OBJ_EVENT_GFX_LAPRAS - [OBJ_EVENT_GFX_ZAPDOS / 2] = 0x22, // OBJ_EVENT_GFX_MOLTRES - [OBJ_EVENT_GFX_ARTICUNO / 2] = 0x22, // OBJ_EVENT_GFX_MEWTWO - [OBJ_EVENT_GFX_MEW / 2] = 0x22, // OBJ_EVENT_GFX_ENTEI - [OBJ_EVENT_GFX_SUICUNE / 2] = 0x22, // OBJ_EVENT_GFX_RAIKOU - [OBJ_EVENT_GFX_LUGIA / 2] = 0x22, // OBJ_EVENT_GFX_HO_OH - [OBJ_EVENT_GFX_CELEBI / 2] = 0x22, // OBJ_EVENT_GFX_KABUTO - [OBJ_EVENT_GFX_DEOXYS_D / 2] = 0x22, // OBJ_EVENT_GFX_DEOXYS_A - [OBJ_EVENT_GFX_DEOXYS_N / 2] = 0x32, // OBJ_EVENT_GFX_SS_ANNE + [OBJ_EVENT_GFX_RED_NORMAL / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_RED_BIKE + [OBJ_EVENT_GFX_RED_SURF / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_RED_FIELD_MOVE + [OBJ_EVENT_GFX_RED_FISH / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_RED_VS_SEEKER + [OBJ_EVENT_GFX_RED_VS_SEEKER_BIKE / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_GREEN_NORMAL + [OBJ_EVENT_GFX_GREEN_BIKE / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_GREEN_SURF + [OBJ_EVENT_GFX_GREEN_FIELD_MOVE / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_GREEN_FISH + [OBJ_EVENT_GFX_GREEN_VS_SEEKER / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_GREEN_VS_SEEKER_BIKE + [OBJ_EVENT_GFX_RS_BRENDAN / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_RS_MAY + [OBJ_EVENT_GFX_LITTLE_BOY / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_LITTLE_GIRL + [OBJ_EVENT_GFX_YOUNGSTER / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_BOY + [OBJ_EVENT_GFX_BUG_CATCHER / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_SITTING_BOY + [OBJ_EVENT_GFX_LASS / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_WOMAN_1 + [OBJ_EVENT_GFX_BATTLE_GIRL / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_MAN + [OBJ_EVENT_GFX_ROCKER / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_FAT_MAN + [OBJ_EVENT_GFX_WOMAN_2 / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_BEAUTY + [OBJ_EVENT_GFX_BALDING_MAN / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_WOMAN_3 + [OBJ_EVENT_GFX_OLD_MAN_1 / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_OLD_MAN_2 + [OBJ_EVENT_GFX_OLD_MAN_LYING_DOWN / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_OLD_WOMAN + [OBJ_EVENT_GFX_TUBER_M_WATER / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_TUBER_F + [OBJ_EVENT_GFX_TUBER_M_LAND / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_CAMPER + [OBJ_EVENT_GFX_PICNICKER / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_COOLTRAINER_M + [OBJ_EVENT_GFX_COOLTRAINER_F / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_SWIMMER_M_WATER + [OBJ_EVENT_GFX_SWIMMER_F_WATER / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_SWIMMER_M_LAND + [OBJ_EVENT_GFX_SWIMMER_F_LAND / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_WORKER_M + [OBJ_EVENT_GFX_WORKER_F / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_ROCKET_M + [OBJ_EVENT_GFX_ROCKET_F / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_GBA_KID + [OBJ_EVENT_GFX_SUPER_NERD / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_BIKER + [OBJ_EVENT_GFX_BLACKBELT / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_SCIENTIST + [OBJ_EVENT_GFX_HIKER / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_FISHER + [OBJ_EVENT_GFX_CHANNELER / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_CHEF + [OBJ_EVENT_GFX_POLICEMAN / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_GENTLEMAN + [OBJ_EVENT_GFX_SAILOR / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_CAPTAIN + [OBJ_EVENT_GFX_NURSE / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_CABLE_CLUB_RECEPTIONIST + [OBJ_EVENT_GFX_UNION_ROOM_RECEPTIONIST / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_UNUSED_MALE_RECEPTIONIST + [OBJ_EVENT_GFX_CLERK / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_MG_DELIVERYMAN + [OBJ_EVENT_GFX_TRAINER_TOWER_DUDE / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_PROF_OAK + [OBJ_EVENT_GFX_BLUE / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_BILL + [OBJ_EVENT_GFX_LANCE / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_AGATHA + [OBJ_EVENT_GFX_DAISY / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_LORELEI + [OBJ_EVENT_GFX_MR_FUJI / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_BRUNO + [OBJ_EVENT_GFX_BROCK / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_MISTY + [OBJ_EVENT_GFX_LT_SURGE / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_ERIKA + [OBJ_EVENT_GFX_KOGA / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_FEMALE), // OBJ_EVENT_GFX_SABRINA + [OBJ_EVENT_GFX_BLAINE / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_GIOVANNI + [OBJ_EVENT_GFX_MOM / 2] = COLORS(NPC_TEXT_COLOR_FEMALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_CELIO + [OBJ_EVENT_GFX_TEACHY_TV_HOST / 2] = COLORS(NPC_TEXT_COLOR_MALE, NPC_TEXT_COLOR_MALE), // OBJ_EVENT_GFX_GYM_GUY + [OBJ_EVENT_GFX_ITEM_BALL / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_TOWN_MAP + [OBJ_EVENT_GFX_POKEDEX / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_CUT_TREE + [OBJ_EVENT_GFX_ROCK_SMASH_ROCK / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_PUSHABLE_BOULDER + [OBJ_EVENT_GFX_FOSSIL / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_RUBY + [OBJ_EVENT_GFX_SAPPHIRE / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_OLD_AMBER + [OBJ_EVENT_GFX_GYM_SIGN / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_SIGN + [OBJ_EVENT_GFX_TRAINER_TIPS / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_CLIPBOARD + [OBJ_EVENT_GFX_METEORITE / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_LAPRAS_DOLL + [OBJ_EVENT_GFX_SEAGALLOP / 2] = COLORS(NPC_TEXT_COLOR_NEUTRAL, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_SNORLAX + [OBJ_EVENT_GFX_SPEAROW / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_CUBONE + [OBJ_EVENT_GFX_POLIWRATH / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_CLEFAIRY + [OBJ_EVENT_GFX_PIDGEOT / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_JIGGLYPUFF + [OBJ_EVENT_GFX_PIDGEY / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_CHANSEY + [OBJ_EVENT_GFX_OMANYTE / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_KANGASKHAN + [OBJ_EVENT_GFX_PIKACHU / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_PSYDUCK + [OBJ_EVENT_GFX_NIDORAN_F / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_NIDORAN_M + [OBJ_EVENT_GFX_NIDORINO / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_MEOWTH + [OBJ_EVENT_GFX_SEEL / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_VOLTORB + [OBJ_EVENT_GFX_SLOWPOKE / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_SLOWBRO + [OBJ_EVENT_GFX_MACHOP / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_WIGGLYTUFF + [OBJ_EVENT_GFX_DODUO / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_FEAROW + [OBJ_EVENT_GFX_MACHOKE / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_LAPRAS + [OBJ_EVENT_GFX_ZAPDOS / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_MOLTRES + [OBJ_EVENT_GFX_ARTICUNO / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_MEWTWO + [OBJ_EVENT_GFX_MEW / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_ENTEI + [OBJ_EVENT_GFX_SUICUNE / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_RAIKOU + [OBJ_EVENT_GFX_LUGIA / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_HO_OH + [OBJ_EVENT_GFX_CELEBI / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_KABUTO + [OBJ_EVENT_GFX_DEOXYS_D / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_MON), // OBJ_EVENT_GFX_DEOXYS_A + [OBJ_EVENT_GFX_DEOXYS_N / 2] = COLORS(NPC_TEXT_COLOR_MON, NPC_TEXT_COLOR_NEUTRAL), // OBJ_EVENT_GFX_SS_ANNE }; void DynamicPlaceholderTextUtil_Reset(void) diff --git a/src/field_specials.c b/src/field_specials.c index 731807d2e..74a4e353d 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1542,18 +1542,26 @@ void SetSeenMon(void) void ResetContextNpcTextColor(void) { gSelectedObjectEvent = 0; - gSpecialVar_TextColor = 0xFF; + gSpecialVar_TextColor = NPC_TEXT_COLOR_DEFAULT; } u8 ContextNpcGetTextColor(void) { u8 gfxId; - if (gSpecialVar_TextColor != 0xFF) + if (gSpecialVar_TextColor != NPC_TEXT_COLOR_DEFAULT) + { + // A text color has been specified, use that return gSpecialVar_TextColor; + } else if (gSelectedObjectEvent == 0) - return 3; + { + // No text color specified and no object selected, use neutral + return NPC_TEXT_COLOR_NEUTRAL; + } else { + // An object is selected and no color has been specified. + // Use the text color normally associated with this object's sprite. gfxId = gObjectEvents[gSelectedObjectEvent].graphicsId; if (gfxId >= OBJ_EVENT_GFX_VAR_0) gfxId = VarGetObjectEventGraphicsId(gfxId - OBJ_EVENT_GFX_VAR_0); diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 9b8bbda21..be092ccf4 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -241,7 +241,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity_p, u16 qmax) u8 GetDialogBoxFontId(void) { - if (!ContextNpcGetTextColor()) + if (ContextNpcGetTextColor() == NPC_TEXT_COLOR_MALE) return FONT_4; else return FONT_5; diff --git a/src/new_menu_helpers.c b/src/new_menu_helpers.c index 39b86e132..e11dbb36b 100644 --- a/src/new_menu_helpers.c +++ b/src/new_menu_helpers.c @@ -425,16 +425,16 @@ u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed void AddTextPrinterDiffStyle(bool8 allowSkippingDelayWithButtonPress) { - u8 result; + u8 color; void *nptr = NULL; gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - result = ContextNpcGetTextColor(); - if (result == 0) + color = ContextNpcGetTextColor(); + if (color == NPC_TEXT_COLOR_MALE) AddTextPrinterParameterized2(0, FONT_4, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_BLUE, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - else if (result == 1) + else if (color == NPC_TEXT_COLOR_FEMALE) AddTextPrinterParameterized2(0, FONT_5, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - else + else // NPC_TEXT_COLOR_MON / NPC_TEXT_COLOR_NEUTRAL AddTextPrinterParameterized2(0, FONT_2, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } diff --git a/src/shop.c b/src/shop.c index e9eb7097f..7f815c486 100644 --- a/src/shop.c +++ b/src/shop.c @@ -217,7 +217,7 @@ static u8 CreateShopMenu(u8 a0) { gShopData.martType = GetMartTypeFromItemList(a0); gShopData.selectedRow = 0; - if (ContextNpcGetTextColor() == 0) + if (ContextNpcGetTextColor() == NPC_TEXT_COLOR_MALE) gShopData.fontId = FONT_4; else gShopData.fontId = FONT_5; From 3add78dbd16a7487abe3293f60a795eb9faa3b6e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 20:12:26 -0400 Subject: [PATCH 5/7] Use constants for setfieldeffectargument --- data/maps/BirthIsland_Exterior/scripts.inc | 4 ++-- data/maps/CeladonCity_GameCorner/scripts.inc | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index f22754aad..bf8366f56 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -72,8 +72,8 @@ BirthIsland_Exterior_EventScript_Deoxys:: addobject LOCALID_DEOXYS waitse setfieldeffectargument 0, LOCALID_DEOXYS_ROCK - setfieldeffectargument 1, 56 - setfieldeffectargument 2, 2 + setfieldeffectargument 1, MAP_NUM(BIRTH_ISLAND_EXTERIOR) + setfieldeffectargument 2, MAP_GROUP(BIRTH_ISLAND_EXTERIOR) dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK playbgm MUS_ENCOUNTER_DEOXYS, 0 waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index d95a601fc..e0be493bb 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -256,9 +256,15 @@ CeladonCity_GameCorner_EventScript_SlotMachine:: msgbox CeladonCity_GameCorner_Text_SlotMachineWantToPlay, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CeladonCity_GameCorner_EventScript_DontPlaySlotMachine - setfieldeffectargument 0, 255 - setfieldeffectargument 1, 10 - setfieldeffectargument 2, 14 + setfieldeffectargument 0, OBJ_EVENT_ID_PLAYER +.ifdef BUGFIX + setfieldeffectargument 1, MAP_NUM(CELADON_CITY_GAME_CORNER) + setfieldeffectargument 2, MAP_GROUP(CELADON_CITY_GAME_CORNER) +.else + @ Map num/group were provided in the wrong order + setfieldeffectargument 1, MAP_GROUP(CELADON_CITY_GAME_CORNER) + setfieldeffectargument 2, MAP_NUM(CELADON_CITY_GAME_CORNER) +.endif dofieldeffect FLDEFF_SMILEY_FACE_ICON waitfieldeffect FLDEFF_SMILEY_FACE_ICON specialvar VAR_RESULT, GetRandomSlotMachineId From 60fc8c5e222f2870eabfdcdc4c478fee02bf0928 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 20:27:42 -0400 Subject: [PATCH 6/7] Add remaining event.inc comments --- asm/macros/event.inc | 37 +++++++++++++++++++++++-------------- data/script_cmd_table.inc | 2 +- src/scrcmd.c | 18 +++++++++--------- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index bff600233..55c6469a8 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1547,13 +1547,13 @@ .byte \color .endm - @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of the screen when the Main Menu is opened. - .macro loadhelp pointer:req + @ Displays the help menu with the given text. + .macro loadhelp msg:req .byte 0xc8 - .4byte \pointer + .4byte \msg .endm - @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of the screen when the Main Menu is opened. + @ Erases the help menu .macro unloadhelp .byte 0xc9 .endm @@ -1568,10 +1568,11 @@ .byte 0xcb .endm - @ Compares the value of a hidden variable to a dword. - .macro comparehiddenvar a:req, value:req + @ Reads the value of the specified game stat and compares it to the specified value. + @ Sets the script comparisonResult to 0 if stat < value, 1 if stat == value, and 2 if stat > value. + .macro comparestat statId:req, value:req .byte 0xcc - .byte \a + .byte \statId .4byte \value .endm @@ -1616,9 +1617,10 @@ .byte \location .endm - .macro getbraillestringwidth pointer:req + @ Gets the width of the specified message in the Braille font and sets the result to VAR_0x8004. + .macro getbraillestringwidth msg:req .byte 0xd3 - .4byte \pointer + .4byte \msg .endm @ Writes the name of the specified item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL @@ -1796,17 +1798,15 @@ callstd STD_FIND_ITEM .endm + @ Prints the message "{PLAYER} put the {ITEM} in the {POCKET}." The item name is pluralized, if applicable. .macro putitemaway item:req, amount=1 setorcopyvar VAR_0x8000, \item setorcopyvar VAR_0x8001, \amount callstd STD_PUT_ITEM_AWAY .endm - .macro giveitem_msg msg:req, item:req, amount=1, fanfare=MUS_LEVEL_UP - additem \item, \amount - msgreceiveditem \msg, \item, \amount, \fanfare - .endm - + @ Prints the provided message after playing the fanfare music (can only be MUS_LEVEL_UP or MUS_OBTAIN_KEY_ITEM). + @ It then prints the message shown by using putitemaway. .macro msgreceiveditem msg:req, item:req, amount=1, fanfare=MUS_LEVEL_UP loadword 0, \msg setorcopyvar VAR_0x8000, \item @@ -1815,12 +1815,20 @@ callstd STD_RECEIVED_ITEM .endm + @ Adds the specified item to the bag, then prints a message with fanfare. See description of msgreceiveditem. + .macro giveitem_msg msg:req, item:req, amount=1, fanfare=MUS_LEVEL_UP + additem \item, \amount + msgreceiveditem \msg, \item, \amount, \fanfare + .endm + + @ Depends on the provided function. With the default argument, unlocks the specified entry in the Fame Checker. .macro famechecker person:req, index:req, function=SetFlavorTextFlagFromSpecialVars setvar VAR_0x8004, \person setvar VAR_0x8005, \index special \function .endm + @ Sets the 'defeated' flag for all trainers in the specified gym. .macro set_gym_trainers gym:req setvar VAR_0x8008, \gym call EventScript_SetGymTrainers @@ -1833,6 +1841,7 @@ goto_if_eq \dest .endm + @ Prints a braille message, then waits for users input. .macro braillemessage_wait text:req setvar VAR_0x8006, 0 braillemessage \text diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 0a9535ae9..c73c0bb87 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -205,7 +205,7 @@ gScriptCmdTable:: .4byte ScrCmd_unloadhelp @ 0xc9 .4byte ScrCmd_signmsg @ 0xca .4byte ScrCmd_normalmsg @ 0xcb - .4byte ScrCmd_comparestattoword @ 0xcc + .4byte ScrCmd_comparestat @ 0xcc .4byte ScrCmd_setmoneventlegal @ 0xcd .4byte ScrCmd_checkmoneventlegal @ 0xce .4byte ScrCmd_trywondercardscript @ 0xcf diff --git a/src/scrcmd.c b/src/scrcmd.c index 7bc654d13..37e7bfefb 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -578,7 +578,7 @@ bool8 ScrCmd_incrementgamestat(struct ScriptContext * ctx) return FALSE; } -bool8 ScrCmd_comparestattoword(struct ScriptContext * ctx) +bool8 ScrCmd_comparestat(struct ScriptContext * ctx) { u8 statIdx = ScriptReadByte(ctx); u32 value = ScriptReadWord(ctx); @@ -1556,23 +1556,23 @@ bool8 ScrCmd_showcontestpainting(struct ScriptContext * ctx) bool8 ScrCmd_braillemessage(struct ScriptContext * ctx) { - u8 *ptr = (u8 *)ScriptReadWord(ctx); - if (ptr == NULL) - ptr = (u8 *)ctx->data[0]; + u8 *msg = (u8 *)ScriptReadWord(ctx); + if (msg == NULL) + msg = (u8 *)ctx->data[0]; LoadStdWindowFrameGfx(); DrawDialogueFrame(0, 1); - AddTextPrinterParameterized(0, FONT_BRAILLE, ptr, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_BRAILLE, msg, 0, 1, 0, NULL); return FALSE; } bool8 ScrCmd_getbraillestringwidth(struct ScriptContext * ctx) { - u8 *ptr = (u8 *)ScriptReadWord(ctx); - if (ptr == NULL) - ptr = (u8 *)ctx->data[0]; + u8 *msg = (u8 *)ScriptReadWord(ctx); + if (msg == NULL) + msg = (u8 *)ctx->data[0]; - gSpecialVar_0x8004 = GetStringWidth(FONT_BRAILLE, ptr, -1); + gSpecialVar_0x8004 = GetStringWidth(FONT_BRAILLE, msg, -1); return FALSE; } From f113da30ad15aa70013a53593927daa7a99ba8b1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 20:40:03 -0400 Subject: [PATCH 7/7] Use 'goto_if_eq VAR, value, Script' syntax --- data/event_scripts.s | 3 +- data/maps/BirthIsland_Exterior/scripts.inc | 12 +- .../CeladonCity_Condominiums_1F/scripts.inc | 3 +- .../CeladonCity_Condominiums_3F/scripts.inc | 3 +- .../scripts.inc | 15 +- .../scripts.inc | 15 +- .../scripts.inc | 42 +- data/maps/CeladonCity_GameCorner/scripts.inc | 36 +- .../scripts.inc | 33 +- data/maps/CeladonCity_Gym/scripts.inc | 3 +- data/maps/CeladonCity_Restaurant/scripts.inc | 3 +- data/maps/CeruleanCave_B1F/scripts.inc | 12 +- data/maps/CeruleanCity/scripts.inc | 51 +- data/maps/CeruleanCity_Gym/scripts.inc | 3 +- data/maps/CeruleanCity_House3/scripts.inc | 9 +- data/maps/CeruleanCity_House4/scripts.inc | 33 +- data/maps/CeruleanCity_House5/scripts.inc | 18 +- data/maps/CinnabarIsland/scripts.inc | 18 +- data/maps/CinnabarIsland_Gym/scripts.inc | 75 +- .../scripts.inc | 12 +- .../scripts.inc | 3 +- .../scripts.inc | 84 +- .../scripts.inc | 18 +- .../FiveIsland_MemorialPillar/scripts.inc | 12 +- .../scripts.inc | 24 +- .../FiveIsland_RocketWarehouse/scripts.inc | 33 +- .../FiveIsland_WaterLabyrinth/scripts.inc | 12 +- data/maps/FourIsland/scripts.inc | 21 +- .../FourIsland_IcefallCave_Back/scripts.inc | 3 +- .../FourIsland_PokemonDayCare/scripts.inc | 63 +- data/maps/FuchsiaCity_Gym/scripts.inc | 3 +- data/maps/FuchsiaCity_House2/scripts.inc | 6 +- data/maps/FuchsiaCity_House3/scripts.inc | 18 +- .../scripts.inc | 27 +- .../maps/FuchsiaCity_WardensHouse/scripts.inc | 12 +- data/maps/IndigoPlateau_Exterior/scripts.inc | 3 +- .../scripts.inc | 6 +- data/maps/LavenderTown/scripts.inc | 3 +- data/maps/LavenderTown_House2/scripts.inc | 30 +- .../scripts.inc | 3 +- data/maps/MtEmber_Exterior/scripts.inc | 12 +- data/maps/MtEmber_Summit/scripts.inc | 12 +- data/maps/MtMoon_B2F/scripts.inc | 6 +- data/maps/NavelRock_Base/scripts.inc | 12 +- data/maps/NavelRock_Summit/scripts.inc | 12 +- .../OneIsland_PokemonCenter_1F/scripts.inc | 60 +- data/maps/PalletTown/scripts.inc | 39 +- .../PalletTown_PlayersHouse_1F/scripts.inc | 15 +- .../PalletTown_PlayersHouse_2F/scripts.inc | 3 +- .../PalletTown_ProfessorOaksLab/scripts.inc | 294 ++---- data/maps/PalletTown_RivalsHouse/scripts.inc | 33 +- data/maps/PewterCity/scripts.inc | 63 +- data/maps/PewterCity_Gym/scripts.inc | 9 +- data/maps/PewterCity_Museum_1F/scripts.inc | 33 +- .../PokemonLeague_AgathasRoom/scripts.inc | 3 +- .../maps/PokemonLeague_BrunosRoom/scripts.inc | 27 +- .../PokemonLeague_ChampionsRoom/scripts.inc | 27 +- .../maps/PokemonLeague_LancesRoom/scripts.inc | 3 +- .../PokemonLeague_LoreleisRoom/scripts.inc | 3 +- data/maps/PokemonTower_1F/scripts.inc | 3 +- data/maps/PokemonTower_2F/scripts.inc | 21 +- data/maps/PokemonTower_6F/scripts.inc | 3 +- data/maps/PokemonTower_7F/scripts.inc | 21 +- data/maps/PowerPlant/scripts.inc | 30 +- data/maps/RocketHideout_B4F/scripts.inc | 21 +- data/maps/RocketHideout_Elevator/scripts.inc | 9 +- data/maps/Route1/scripts.inc | 3 +- .../maps/Route10_PokemonCenter_1F/scripts.inc | 9 +- data/maps/Route11_EastEntrance_2F/scripts.inc | 18 +- data/maps/Route12/scripts.inc | 12 +- data/maps/Route12_FishingHouse/scripts.inc | 27 +- .../maps/Route12_NorthEntrance_2F/scripts.inc | 9 +- data/maps/Route15_WestEntrance_2F/scripts.inc | 9 +- data/maps/Route16/scripts.inc | 15 +- data/maps/Route16_House/scripts.inc | 3 +- .../maps/Route16_NorthEntrance_1F/scripts.inc | 12 +- .../maps/Route16_NorthEntrance_2F/scripts.inc | 9 +- data/maps/Route18/scripts.inc | 3 +- data/maps/Route18_EastEntrance_1F/scripts.inc | 12 +- data/maps/Route18_EastEntrance_2F/scripts.inc | 9 +- data/maps/Route22/scripts.inc | 45 +- data/maps/Route24/scripts.inc | 18 +- data/maps/Route25_SeaCottage/scripts.inc | 36 +- data/maps/Route2_EastBuilding/scripts.inc | 9 +- data/maps/Route2_House/scripts.inc | 9 +- data/maps/Route4_PokemonCenter_1F/scripts.inc | 27 +- data/maps/Route5_SouthEntrance/scripts.inc | 9 +- data/maps/Route6_NorthEntrance/scripts.inc | 9 +- data/maps/Route7_EastEntrance/scripts.inc | 9 +- data/maps/Route8_WestEntrance/scripts.inc | 9 +- data/maps/SSAnne_1F_Room4/scripts.inc | 3 +- data/maps/SSAnne_1F_Room6/scripts.inc | 6 +- data/maps/SSAnne_2F_Corridor/scripts.inc | 27 +- data/maps/SSAnne_Exterior/scripts.inc | 6 +- data/maps/SSAnne_Kitchen/scripts.inc | 9 +- data/maps/SafariZone_SecretHouse/scripts.inc | 3 +- .../SaffronCity_CopycatsHouse_2F/scripts.inc | 9 +- data/maps/SaffronCity_Dojo/scripts.inc | 21 +- data/maps/SaffronCity_Gym/scripts.inc | 3 +- .../SaffronCity_MrPsychicsHouse/scripts.inc | 3 +- .../SaffronCity_PokemonCenter_1F/scripts.inc | 3 +- .../scripts.inc | 114 +-- data/maps/SeafoamIslands_B3F/scripts.inc | 12 +- data/maps/SeafoamIslands_B4F/scripts.inc | 27 +- data/maps/SevenIsland_House_Room1/scripts.inc | 42 +- data/maps/SevenIsland_House_Room2/scripts.inc | 9 +- .../scripts.inc | 6 +- .../scripts.inc | 42 +- data/maps/SilphCo_10F/scripts.inc | 3 +- data/maps/SilphCo_11F/scripts.inc | 15 +- data/maps/SilphCo_3F/scripts.inc | 3 +- data/maps/SilphCo_4F/scripts.inc | 3 +- data/maps/SilphCo_5F/scripts.inc | 3 +- data/maps/SilphCo_6F/scripts.inc | 15 +- data/maps/SilphCo_7F/scripts.inc | 48 +- data/maps/SilphCo_8F/scripts.inc | 3 +- data/maps/SilphCo_9F/scripts.inc | 3 +- data/maps/SilphCo_Elevator/scripts.inc | 33 +- .../scripts.inc | 60 +- data/maps/SixIsland_PatternBush/scripts.inc | 6 +- .../SixIsland_PokemonCenter_1F/scripts.inc | 3 +- data/maps/SixIsland_RuinValley/scripts.inc | 3 +- .../SixIsland_WaterPath_House1/scripts.inc | 21 +- data/maps/ThreeIsland/scripts.inc | 69 +- data/maps/ThreeIsland_BerryForest/scripts.inc | 3 +- .../ThreeIsland_DunsparceTunnel/scripts.inc | 12 +- data/maps/ThreeIsland_Port/scripts.inc | 6 +- data/maps/TrainerTower_Elevator/scripts.inc | 3 +- data/maps/TrainerTower_Lobby/scripts.inc | 12 +- data/maps/TwoIsland/scripts.inc | 18 +- data/maps/TwoIsland_House/scripts.inc | 21 +- .../TwoIsland_JoyfulGameCorner/scripts.inc | 12 +- .../UndergroundPath_NorthEntrance/scripts.inc | 9 +- data/maps/VermilionCity/scripts.inc | 36 +- data/maps/VermilionCity_Gym/scripts.inc | 9 +- data/maps/VermilionCity_House1/scripts.inc | 6 +- data/maps/VermilionCity_House2/scripts.inc | 9 +- .../VermilionCity_PokemonFanClub/scripts.inc | 6 +- data/maps/VictoryRoad_1F/scripts.inc | 6 +- data/maps/VictoryRoad_2F/scripts.inc | 12 +- data/maps/VictoryRoad_3F/scripts.inc | 6 +- data/maps/ViridianCity/scripts.inc | 36 +- data/maps/ViridianCity_Gym/scripts.inc | 3 +- data/maps/ViridianCity_Mart/scripts.inc | 3 +- data/maps/ViridianCity_School/scripts.inc | 9 +- data/mystery_event_msg.s | 39 +- data/scripts/cable_club.inc | 264 ++---- data/scripts/day_care.inc | 30 +- data/scripts/field_moves.inc | 39 +- data/scripts/hall_of_fame.inc | 3 +- data/scripts/itemfinder.inc | 6 +- data/scripts/move_tutors.inc | 168 ++-- data/scripts/mystery_event_club.inc | 12 +- data/scripts/obtain_item.inc | 57 +- data/scripts/pc.inc | 3 +- data/scripts/pc_transfer.inc | 6 +- data/scripts/pkmn_center_nurse.inc | 9 +- data/scripts/pokedex_rating.inc | 15 +- data/scripts/pokemon_mansion.inc | 3 +- data/scripts/questionnaire.inc | 12 +- data/scripts/route23.inc | 6 +- data/scripts/safari_zone.inc | 3 +- data/scripts/seagallop.inc | 295 +++--- data/scripts/silphco_doors.inc | 854 +++++++++--------- data/scripts/std_msgbox.inc | 9 +- data/scripts/surf.inc | 6 +- data/scripts/trainer_battle.inc | 33 +- data/scripts/trainer_card.inc | 84 +- data/scripts/trainer_tower.inc | 18 +- data/scripts/trainers.inc | 702 +++++--------- data/scripts/white_out.inc | 9 +- 171 files changed, 1992 insertions(+), 3453 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index 50b817741..5b2f933ff 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1249,8 +1249,7 @@ VermilionCity_PokemonCenter_1F_EventScript_VSSeekerWoman:: msgbox VermilionCity_PokemonCenter_1F_Text_UrgeToBattleSomeoneAgain setflag FLAG_GOT_VS_SEEKER giveitem ITEM_VS_SEEKER - compare VAR_RESULT, FALSE - goto_if_eq EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, EventScript_BagIsFull msgbox VermilionCity_PokemonCenter_1F_Text_UseDeviceForRematches release end diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index bf8366f56..64515f8d5 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -37,8 +37,7 @@ BirthIsland_Exterior_OnResume:: BirthIsland_Exterior_EventScript_TryRemoveDeoxys:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, EventScript_Return removeobject LOCALID_DEOXYS return @@ -90,12 +89,9 @@ BirthIsland_Exterior_EventScript_Deoxys:: waitstate clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BirthIsland_Exterior_EventScript_DefeatedDeoxys - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BirthIsland_Exterior_EventScript_DefeatedDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BirthIsland_Exterior_EventScript_RanFromDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BirthIsland_Exterior_EventScript_RanFromDeoxys setflag FLAG_FOUGHT_DEOXYS release end diff --git a/data/maps/CeladonCity_Condominiums_1F/scripts.inc b/data/maps/CeladonCity_Condominiums_1F/scripts.inc index 088efff72..c18a042f0 100644 --- a/data/maps/CeladonCity_Condominiums_1F/scripts.inc +++ b/data/maps/CeladonCity_Condominiums_1F/scripts.inc @@ -10,8 +10,7 @@ CeladonCity_Condominiums_1F_EventScript_TeaWoman:: msgbox CeladonCity_Condominiums_1F_Text_TryThisDrinkInstead setflag FLAG_GOT_TEA giveitem ITEM_TEA - compare VAR_RESULT, FALSE - goto_if_eq EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, EventScript_BagIsFull msgbox CeladonCity_Condominiums_1F_Text_NothingBeatsThirstLikeTea release end diff --git a/data/maps/CeladonCity_Condominiums_3F/scripts.inc b/data/maps/CeladonCity_Condominiums_3F/scripts.inc index c4c7f1099..866138a9f 100644 --- a/data/maps/CeladonCity_Condominiums_3F/scripts.inc +++ b/data/maps/CeladonCity_Condominiums_3F/scripts.inc @@ -17,8 +17,7 @@ CeladonCity_Condominiums_3F_EventScript_Designer:: lock faceplayer specialvar VAR_RESULT, HasAllKantoMons - compare VAR_RESULT, TRUE - goto_if_eq CeladonCity_Condominiums_3F_EventScript_CompletedPokedex + goto_if_eq VAR_RESULT, TRUE, CeladonCity_Condominiums_3F_EventScript_CompletedPokedex msgbox CeladonCity_Condominiums_3F_Text_ImGameDesignerShowMeFinishedPokedex release end diff --git a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc index 46e824cf0..9463564e7 100644 --- a/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc +++ b/data/maps/CeladonCity_Condominiums_RoofRoom/scripts.inc @@ -12,12 +12,9 @@ CeladonCity_Condominiums_RoofRoom_EventScript_EeveeBall:: faceplayer setvar VAR_TEMP_1, SPECIES_EEVEE givemon SPECIES_EEVEE, 25 - compare VAR_RESULT, 0 - goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveeParty - compare VAR_RESULT, 1 - goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveePC - compare VAR_RESULT, 2 - goto_if_eq EventScript_NoMoreRoomForPokemon + goto_if_eq VAR_RESULT, 0, CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveeParty + goto_if_eq VAR_RESULT, 1, CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveePC + goto_if_eq VAR_RESULT, 2, EventScript_NoMoreRoomForPokemon release end @@ -29,8 +26,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveeParty:: waitfanfare bufferspeciesname STR_VAR_1, SPECIES_EEVEE msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_SetGotEevee + goto_if_eq VAR_RESULT, NO, CeladonCity_Condominiums_RoofRoom_EventScript_SetGotEevee call EventScript_GetGiftMonPartySlot call EventScript_ChangePokemonNickname goto CeladonCity_Condominiums_RoofRoom_EventScript_SetGotEevee @@ -44,8 +40,7 @@ CeladonCity_Condominiums_RoofRoom_EventScript_GetEeveePC:: waitfanfare bufferspeciesname STR_VAR_1, SPECIES_EEVEE msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_Condominiums_RoofRoom_EventScript_TransferEeveeToPC + goto_if_eq VAR_RESULT, NO, CeladonCity_Condominiums_RoofRoom_EventScript_TransferEeveeToPC call EventScript_NameReceivedBoxMon goto CeladonCity_Condominiums_RoofRoom_EventScript_TransferEeveeToPC end diff --git a/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc index 6c01bd9f8..80b1d2c6d 100644 --- a/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc +++ b/data/maps/CeladonCity_DepartmentStore_Elevator/scripts.inc @@ -58,8 +58,7 @@ CeladonCity_DepartmentStore_Elevator_EventScript_ChooseFloor:: CeladonCity_DepartmentStore_Elevator_EventScript_To1F:: setvar VAR_0x8006, 4 setdynamicwarp MAP_CELADON_CITY_DEPARTMENT_STORE_1F, 255, 6, 1 - compare VAR_ELEVATOR_FLOOR, 4 - goto_if_eq CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 4, CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect call CeladonCity_DepartmentStore_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 4 goto CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect @@ -68,8 +67,7 @@ CeladonCity_DepartmentStore_Elevator_EventScript_To1F:: CeladonCity_DepartmentStore_Elevator_EventScript_To2F:: setvar VAR_0x8006, 5 setdynamicwarp MAP_CELADON_CITY_DEPARTMENT_STORE_2F, 255, 6, 1 - compare VAR_ELEVATOR_FLOOR, 5 - goto_if_eq CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 5, CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect call CeladonCity_DepartmentStore_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 5 goto CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect @@ -78,8 +76,7 @@ CeladonCity_DepartmentStore_Elevator_EventScript_To2F:: CeladonCity_DepartmentStore_Elevator_EventScript_To3F:: setvar VAR_0x8006, 6 setdynamicwarp MAP_CELADON_CITY_DEPARTMENT_STORE_3F, 255, 6, 1 - compare VAR_ELEVATOR_FLOOR, 6 - goto_if_eq CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 6, CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect call CeladonCity_DepartmentStore_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 6 goto CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect @@ -88,8 +85,7 @@ CeladonCity_DepartmentStore_Elevator_EventScript_To3F:: CeladonCity_DepartmentStore_Elevator_EventScript_To4F:: setvar VAR_0x8006, 7 setdynamicwarp MAP_CELADON_CITY_DEPARTMENT_STORE_4F, 255, 6, 1 - compare VAR_ELEVATOR_FLOOR, 7 - goto_if_eq CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 7, CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect call CeladonCity_DepartmentStore_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 7 goto CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect @@ -98,8 +94,7 @@ CeladonCity_DepartmentStore_Elevator_EventScript_To4F:: CeladonCity_DepartmentStore_Elevator_EventScript_To5F:: setvar VAR_0x8006, 8 setdynamicwarp MAP_CELADON_CITY_DEPARTMENT_STORE_5F, 255, 6, 1 - compare VAR_ELEVATOR_FLOOR, 8 - goto_if_eq CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 8, CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect call CeladonCity_DepartmentStore_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 8 goto CeladonCity_DepartmentStore_Elevator_EventScript_ExitFloorSelect diff --git a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc index 3f9833af8..364d83c43 100644 --- a/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc +++ b/data/maps/CeladonCity_DepartmentStore_Roof/scripts.inc @@ -7,22 +7,18 @@ CeladonCity_DepartmentStore_Roof_EventScript_ThirstyGirl:: lock faceplayer call CeladonCity_DepartmentStore_Roof_EventScript_CheckPlayerHasDrinks - compare VAR_TEMP_1, 0 - goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_IWantDrink + goto_if_eq VAR_TEMP_1, 0, CeladonCity_DepartmentStore_Roof_EventScript_IWantDrink goto CeladonCity_DepartmentStore_Roof_EventScript_AskGiveDrink end CeladonCity_DepartmentStore_Roof_EventScript_CheckPlayerHasDrinks:: setvar VAR_TEMP_1, 0 checkitem ITEM_FRESH_WATER - compare VAR_RESULT, TRUE - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_SetHasFreshWater + call_if_eq VAR_RESULT, TRUE, CeladonCity_DepartmentStore_Roof_EventScript_SetHasFreshWater checkitem ITEM_SODA_POP - compare VAR_RESULT, TRUE - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_SetHasSodaPop + call_if_eq VAR_RESULT, TRUE, CeladonCity_DepartmentStore_Roof_EventScript_SetHasSodaPop checkitem ITEM_LEMONADE - compare VAR_RESULT, TRUE - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_SetHasLemonade + call_if_eq VAR_RESULT, TRUE, CeladonCity_DepartmentStore_Roof_EventScript_SetHasLemonade return CeladonCity_DepartmentStore_Roof_EventScript_SetHasFreshWater:: @@ -39,8 +35,7 @@ CeladonCity_DepartmentStore_Roof_EventScript_SetHasLemonade:: CeladonCity_DepartmentStore_Roof_EventScript_AskGiveDrink:: msgbox CeladonCity_DepartmentStore_Roof_Text_ImThirstyGiveHerDrink, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_DontGiveDrink + goto_if_eq VAR_RESULT, NO, CeladonCity_DepartmentStore_Roof_EventScript_DontGiveDrink textcolor NPC_TEXT_COLOR_NEUTRAL message CeladonCity_DepartmentStore_Roof_Text_GiveWhichDrink waitmessage @@ -145,8 +140,7 @@ CeladonCity_DepartmentStore_Roof_EventScript_GiveDrink:: bufferitemname STR_VAR_2, VAR_0x8009 removeitem VAR_0x8008 checkitemspace VAR_0x8009 - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForReward + goto_if_eq VAR_RESULT, FALSE, CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForReward additem VAR_0x8009 textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_LEVEL_UP @@ -155,12 +149,9 @@ CeladonCity_DepartmentStore_Roof_EventScript_GiveDrink:: waitfanfare putitemaway VAR_0x8009 call EventScript_RestorePrevTextColor - compare VAR_0x8008, ITEM_FRESH_WATER - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_ExplainTM16 - compare VAR_0x8008, ITEM_SODA_POP - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_ExplainTM20 - compare VAR_0x8008, ITEM_LEMONADE - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_ExplainTM33 + call_if_eq VAR_0x8008, ITEM_FRESH_WATER, CeladonCity_DepartmentStore_Roof_EventScript_ExplainTM16 + call_if_eq VAR_0x8008, ITEM_SODA_POP, CeladonCity_DepartmentStore_Roof_EventScript_ExplainTM20 + call_if_eq VAR_0x8008, ITEM_LEMONADE, CeladonCity_DepartmentStore_Roof_EventScript_ExplainTM33 release end @@ -256,17 +247,12 @@ CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyLemonade:: return CeladonCity_DepartmentStore_Roof_EventScript_TryBuyDrink:: - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, CeladonCity_DepartmentStore_Roof_EventScript_NotEnoughMoney checkitemspace VAR_TEMP_0 - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForDrink - compare VAR_TEMP_1, 0 - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyFreshWater - compare VAR_TEMP_1, 1 - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneySodaPop - compare VAR_TEMP_1, 2 - call_if_eq CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyLemonade + goto_if_eq VAR_RESULT, FALSE, CeladonCity_DepartmentStore_Roof_EventScript_NoRoomForDrink + call_if_eq VAR_TEMP_1, 0, CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyFreshWater + call_if_eq VAR_TEMP_1, 1, CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneySodaPop + call_if_eq VAR_TEMP_1, 2, CeladonCity_DepartmentStore_Roof_EventScript_RemoveMoneyLemonade updatemoneybox bufferitemname STR_VAR_1, VAR_TEMP_0 playse SE_VEND diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index e0be493bb..120c59af1 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -39,19 +39,15 @@ CeladonCity_GameCorner_EventScript_CoinsClerk:: CeladonCity_GameCorner_EventScript_BuyCoins:: goto_if_unset FLAG_GOT_COIN_CASE, CeladonCity_GameCorner_EventScript_ClerkNoCoinCase - compare VAR_0x8009, 0 - goto_if_eq CeladonCity_GameCorner_EventScript_Buy50Coins - compare VAR_0x8009, 1 - goto_if_eq CeladonCity_GameCorner_EventScript_Buy500Coins + goto_if_eq VAR_0x8009, 0, CeladonCity_GameCorner_EventScript_Buy50Coins + goto_if_eq VAR_0x8009, 1, CeladonCity_GameCorner_EventScript_Buy500Coins end CeladonCity_GameCorner_EventScript_Buy500Coins:: checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1) - 500 - goto_if_ge CeladonCity_GameCorner_EventScript_ClerkNoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1) - 500, CeladonCity_GameCorner_EventScript_ClerkNoRoomForCoins checkmoney 10000 - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_GameCorner_EventScript_ClerkNotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, CeladonCity_GameCorner_EventScript_ClerkNotEnoughMoney addcoins 500 removemoney 10000 goto CeladonCity_GameCorner_EventScript_BoughtCoins @@ -59,11 +55,9 @@ CeladonCity_GameCorner_EventScript_Buy500Coins:: CeladonCity_GameCorner_EventScript_Buy50Coins:: checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1) - 50 - goto_if_ge CeladonCity_GameCorner_EventScript_ClerkNoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1) - 50, CeladonCity_GameCorner_EventScript_ClerkNoRoomForCoins checkmoney 1000 - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_GameCorner_EventScript_ClerkNotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, CeladonCity_GameCorner_EventScript_ClerkNotEnoughMoney addcoins 50 removemoney 1000 goto CeladonCity_GameCorner_EventScript_BoughtCoins @@ -131,8 +125,7 @@ CeladonCity_GameCorner_EventScript_Fisher:: msgbox CeladonCity_GameCorner_Text_DoYouWantToPlay goto_if_unset FLAG_GOT_COIN_CASE, CeladonCity_GameCorner_EventScript_GamblerNoCoinCase checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1) - 10 - goto_if_ge CeladonCity_GameCorner_EventScript_FisherNoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1) - 10, CeladonCity_GameCorner_EventScript_FisherNoRoomForCoins addcoins 10 textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_Text_Received10CoinsFromMan @@ -192,8 +185,7 @@ CeladonCity_GameCorner_EventScript_Scientist:: msgbox CeladonCity_GameCorner_Text_WantSomeCoins goto_if_unset FLAG_GOT_COIN_CASE, CeladonCity_GameCorner_EventScript_GamblerNoCoinCase checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1) - 20 - goto_if_ge CeladonCity_GameCorner_EventScript_ScientistNoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1) - 20, CeladonCity_GameCorner_EventScript_ScientistNoRoomForCoins addcoins 20 textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_Text_Received20CoinsFromNiceGuy @@ -220,8 +212,7 @@ CeladonCity_GameCorner_EventScript_Gentleman:: msgbox CeladonCity_GameCorner_Text_HereAreSomeCoinsShoo goto_if_unset FLAG_GOT_COIN_CASE, CeladonCity_GameCorner_EventScript_GamblerNoCoinCase checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1) - 20 - goto_if_ge CeladonCity_GameCorner_EventScript_GentlemanNoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1) - 20, CeladonCity_GameCorner_EventScript_GentlemanNoRoomForCoins addcoins 20 textcolor NPC_TEXT_COLOR_NEUTRAL msgbox CeladonCity_GameCorner_Text_Received20CoinsFromMan @@ -254,8 +245,7 @@ CeladonCity_GameCorner_EventScript_DontPlaySlotMachine:: CeladonCity_GameCorner_EventScript_SlotMachine:: goto_if_unset FLAG_GOT_COIN_CASE, CeladonCity_GameCorner_EventScript_SlotMachineNoCoinCase msgbox CeladonCity_GameCorner_Text_SlotMachineWantToPlay, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_GameCorner_EventScript_DontPlaySlotMachine + goto_if_eq VAR_RESULT, NO, CeladonCity_GameCorner_EventScript_DontPlaySlotMachine setfieldeffectargument 0, OBJ_EVENT_ID_PLAYER .ifdef BUGFIX setfieldeffectargument 1, MAP_NUM(CELADON_CITY_GAME_CORNER) @@ -429,10 +419,8 @@ CeladonCity_GameCorner_EventScript_RocketGrunt:: CeladonCity_GameCorner_Text_DefeatedGrunt:: msgbox CeladonCity_GameCorner_Text_GruntPostBattle closemessage - compare VAR_FACING, DIR_WEST - call_if_eq CeladonCity_GameCorner_Text_GruntExitWest - compare VAR_FACING, DIR_WEST - call_if_ne CeladonCity_GameCorner_Text_GruntExit + call_if_eq VAR_FACING, DIR_WEST, CeladonCity_GameCorner_Text_GruntExitWest + call_if_ne VAR_FACING, DIR_WEST, CeladonCity_GameCorner_Text_GruntExit removeobject LOCALID_GRUNT release end diff --git a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc index 01a4d9284..9c753f3ad 100644 --- a/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc +++ b/data/maps/CeladonCity_GameCorner_PrizeRoom/scripts.inc @@ -106,11 +106,9 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_Porygon:: CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeMon:: bufferspeciesname STR_VAR_1, VAR_TEMP_1 msgbox CeladonCity_GameCorner_PrizeRoom_Text_YouWantPrize, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange + goto_if_eq VAR_RESULT, NO, CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange checkcoins VAR_RESULT - compare VAR_RESULT, VAR_TEMP_2 - goto_if_lt CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins + goto_if_lt VAR_RESULT, VAR_TEMP_2, CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins textcolor NPC_TEXT_COLOR_NEUTRAL switch VAR_TEMP_1 case SPECIES_ABRA, CeladonCity_GameCorner_PrizeRoom_EventScript_GiveAbra @@ -176,12 +174,9 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_GivePinsir:: end CeladonCity_GameCorner_PrizeRoom_EventScript_CheckReceivedMon:: - compare VAR_RESULT, 0 - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty - compare VAR_RESULT, 1 - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonPC - compare VAR_RESULT, 2 - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_PartyFull + goto_if_eq VAR_RESULT, 0, CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty + goto_if_eq VAR_RESULT, 1, CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonPC + goto_if_eq VAR_RESULT, 2, CeladonCity_GameCorner_PrizeRoom_EventScript_PartyFull end CeladonCity_GameCorner_PrizeRoom_EventScript_PartyFull:: @@ -219,8 +214,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonParty:: waitmessage waitfanfare msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_NicknamePartyMon + goto_if_eq VAR_RESULT, YES, CeladonCity_GameCorner_PrizeRoom_EventScript_NicknamePartyMon goto CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange end @@ -233,8 +227,7 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_ReceivedMonPC:: waitmessage waitfanfare msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_TransferredToPC + goto_if_eq VAR_RESULT, NO, CeladonCity_GameCorner_PrizeRoom_EventScript_TransferredToPC call EventScript_NameReceivedBoxMon goto CeladonCity_GameCorner_PrizeRoom_EventScript_TransferredToPC end @@ -305,27 +298,23 @@ CeladonCity_GameCorner_PrizeRoom_EventScript_TM35:: CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeTM:: msgbox CeladonCity_GameCorner_PrizeRoom_Text_YouWantTM, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange + goto_if_eq VAR_RESULT, NO, CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange goto CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize end CeladonCity_GameCorner_PrizeRoom_EventScript_ConfirmPrizeItem:: bufferitemname STR_VAR_1, VAR_TEMP_1 msgbox CeladonCity_GameCorner_PrizeRoom_Text_YouWantPrize, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange + goto_if_eq VAR_RESULT, NO, CeladonCity_GameCorner_PrizeRoom_EventScript_EndPrizeExchange goto CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize end CeladonCity_GameCorner_PrizeRoom_EventScript_TryGivePrize:: bufferitemname STR_VAR_1, VAR_TEMP_1 checkcoins VAR_RESULT - compare VAR_RESULT, VAR_TEMP_2 - goto_if_lt CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins + goto_if_lt VAR_RESULT, VAR_TEMP_2, CeladonCity_GameCorner_PrizeRoom_EventScript_NotEnoughCoins checkitemspace VAR_TEMP_1 - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_GameCorner_PrizeRoom_EventScript_BagFull + goto_if_eq VAR_RESULT, FALSE, CeladonCity_GameCorner_PrizeRoom_EventScript_BagFull removecoins VAR_TEMP_2 updatecoinsbox 0, 5 giveitem VAR_TEMP_1 diff --git a/data/maps/CeladonCity_Gym/scripts.inc b/data/maps/CeladonCity_Gym/scripts.inc index 705ca6af6..3ab6ce298 100644 --- a/data/maps/CeladonCity_Gym/scripts.inc +++ b/data/maps/CeladonCity_Gym/scripts.inc @@ -22,8 +22,7 @@ CeladonCity_Gym_EventScript_DefeatedErika:: CeladonCity_Gym_EventScript_GiveTM19:: msgbox CeladonCity_Gym_Text_ExplainRainbowBadgeTakeThis checkitemspace ITEM_TM19 - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_Gym_EventScript_NoRoomForTM19 + goto_if_eq VAR_RESULT, FALSE, CeladonCity_Gym_EventScript_NoRoomForTM19 giveitem_msg CeladonCity_Gym_Text_ReceivedTM19FromErika, ITEM_TM19 setflag FLAG_GOT_TM19_FROM_ERIKA msgbox CeladonCity_Gym_Text_ExplainTM19 diff --git a/data/maps/CeladonCity_Restaurant/scripts.inc b/data/maps/CeladonCity_Restaurant/scripts.inc index 257bc1bb6..910434982 100644 --- a/data/maps/CeladonCity_Restaurant/scripts.inc +++ b/data/maps/CeladonCity_Restaurant/scripts.inc @@ -15,8 +15,7 @@ CeladonCity_Restaurant_EventScript_CoinCaseMan:: goto_if_set FLAG_GOT_COIN_CASE, CeladonCity_Restaurant_EventScript_AlreadyGotCoinCase msgbox CeladonCity_Restaurant_Text_TakeThisImBusted checkitemspace ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_Restaurant_EventScript_NoRoomForCoinCase + goto_if_eq VAR_RESULT, FALSE, CeladonCity_Restaurant_EventScript_NoRoomForCoinCase giveitem_msg CeladonCity_Restaurant_Text_ReceivedCoinCaseFromMan, ITEM_COIN_CASE setflag FLAG_GOT_COIN_CASE release diff --git a/data/maps/CeruleanCave_B1F/scripts.inc b/data/maps/CeruleanCave_B1F/scripts.inc index f75ba95ee..63a110bb4 100644 --- a/data/maps/CeruleanCave_B1F/scripts.inc +++ b/data/maps/CeruleanCave_B1F/scripts.inc @@ -9,8 +9,7 @@ CeruleanCave_B1F_OnResume:: CeruleanCave_B1F_EventScript_TryRemoveMewtwo:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, EventScript_Return removeobject VAR_LAST_TALKED return @@ -41,12 +40,9 @@ CeruleanCave_B1F_EventScript_Mewtwo:: waitstate clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq CeruleanCave_B1F_EventScript_DefeatedMewtwo - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq CeruleanCave_B1F_EventScript_RanFromMewtwo - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq CeruleanCave_B1F_EventScript_RanFromMewtwo + goto_if_eq VAR_RESULT, B_OUTCOME_WON, CeruleanCave_B1F_EventScript_DefeatedMewtwo + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, CeruleanCave_B1F_EventScript_RanFromMewtwo + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, CeruleanCave_B1F_EventScript_RanFromMewtwo setflag FLAG_FOUGHT_MEWTWO release end diff --git a/data/maps/CeruleanCity/scripts.inc b/data/maps/CeruleanCity/scripts.inc index 2a2c1b66a..f8b145240 100644 --- a/data/maps/CeruleanCity/scripts.inc +++ b/data/maps/CeruleanCity/scripts.inc @@ -49,22 +49,16 @@ CeruleanCity_EventScript_Rival:: waitmovement 0 msgbox CeruleanCity_Text_RivalIntro setvar VAR_LAST_TALKED, LOCALID_RIVAL - compare VAR_STARTER_MON, 2 - call_if_eq CeruleanCity_EventScript_RivalSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq CeruleanCity_EventScript_RivalBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq CeruleanCity_EventScript_RivalCharmander + call_if_eq VAR_STARTER_MON, 2, CeruleanCity_EventScript_RivalSquirtle + call_if_eq VAR_STARTER_MON, 1, CeruleanCity_EventScript_RivalBulbasaur + call_if_eq VAR_STARTER_MON, 0, CeruleanCity_EventScript_RivalCharmander famechecker FAMECHECKER_BILL, 0 msgbox CeruleanCity_Text_RivalPostBattle closemessage playbgm MUS_RIVAL_EXIT, 0 - compare VAR_TEMP_1, 0 - call_if_eq CeruleanCity_EventScript_RivalStartExit - compare VAR_TEMP_1, 1 - call_if_eq CeruleanCity_EventScript_RivalStartExit - compare VAR_TEMP_1, 2 - call_if_eq CeruleanCity_EventScript_RivalStartExitRight + call_if_eq VAR_TEMP_1, 0, CeruleanCity_EventScript_RivalStartExit + call_if_eq VAR_TEMP_1, 1, CeruleanCity_EventScript_RivalStartExit + call_if_eq VAR_TEMP_1, 2, CeruleanCity_EventScript_RivalStartExitRight msgbox CeruleanCity_Text_OhRightLittlePresentAsFavor setvar VAR_MAP_SCENE_CERULEAN_CITY_RIVAL, 1 setflag FLAG_GOT_FAME_CHECKER @@ -190,8 +184,7 @@ CeruleanCity_EventScript_Grunt:: CeruleanCity_EventScript_GruntDefeated:: msgbox CeruleanCity_Text_OkayIllReturnStolenTM checkitemspace ITEM_TM28 - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_EventScript_NoRoomForTM28 + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_EventScript_NoRoomForTM28 giveitem_msg CeruleanCity_Text_RecoveredTM28FromGrunt, ITEM_TM28 msgbox CeruleanCity_Text_BetterGetMovingBye closemessage @@ -286,24 +279,18 @@ CeruleanCity_EventScript_Lass:: lock random 3 copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 0 - call_if_eq CeruleanCity_EventScript_SlowbroCommand1 - compare VAR_0x8008, 1 - call_if_eq CeruleanCity_EventScript_SlowbroCommand2 - compare VAR_0x8008, 2 - call_if_eq CeruleanCity_EventScript_SlowbroCommand3 + call_if_eq VAR_0x8008, 0, CeruleanCity_EventScript_SlowbroCommand1 + call_if_eq VAR_0x8008, 1, CeruleanCity_EventScript_SlowbroCommand2 + call_if_eq VAR_0x8008, 2, CeruleanCity_EventScript_SlowbroCommand3 waitmessage delay 40 playse SE_PIN applymovement LOCALID_SLOWBRO, Movement_QuestionMark waitmovement 0 delay 30 - compare VAR_0x8008, 0 - call_if_eq CeruleanCity_EventScript_SlowbroFailed1 - compare VAR_0x8008, 1 - call_if_eq CeruleanCity_EventScript_SlowbroFailed2 - compare VAR_0x8008, 2 - call_if_eq CeruleanCity_EventScript_SlowbroFailed3 + call_if_eq VAR_0x8008, 0, CeruleanCity_EventScript_SlowbroFailed1 + call_if_eq VAR_0x8008, 1, CeruleanCity_EventScript_SlowbroFailed2 + call_if_eq VAR_0x8008, 2, CeruleanCity_EventScript_SlowbroFailed3 release end @@ -335,14 +322,10 @@ CeruleanCity_EventScript_Slowbro:: lock random 4 copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 0 - call_if_eq CeruleanCity_EventScript_SlowbroText1 - compare VAR_0x8008, 1 - call_if_eq CeruleanCity_EventScript_SlowbroText2 - compare VAR_0x8008, 2 - call_if_eq CeruleanCity_EventScript_SlowbroText3 - compare VAR_0x8008, 3 - call_if_eq CeruleanCity_EventScript_SlowbroText4 + call_if_eq VAR_0x8008, 0, CeruleanCity_EventScript_SlowbroText1 + call_if_eq VAR_0x8008, 1, CeruleanCity_EventScript_SlowbroText2 + call_if_eq VAR_0x8008, 2, CeruleanCity_EventScript_SlowbroText3 + call_if_eq VAR_0x8008, 3, CeruleanCity_EventScript_SlowbroText4 release end diff --git a/data/maps/CeruleanCity_Gym/scripts.inc b/data/maps/CeruleanCity_Gym/scripts.inc index d20bab11e..94190b086 100644 --- a/data/maps/CeruleanCity_Gym/scripts.inc +++ b/data/maps/CeruleanCity_Gym/scripts.inc @@ -21,8 +21,7 @@ CeruleanCity_Gym_EventScript_MistyDefeated:: CeruleanCity_Gym_EventScript_GiveTM03:: msgbox CeruleanCity_Gym_Text_ExplainCascadeBadge checkitemspace ITEM_TM03 - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_Gym_EventScript_NoRoomForTM03 + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_Gym_EventScript_NoRoomForTM03 giveitem_msg CeruleanCity_Gym_Text_ReceivedTM03FromMisty, ITEM_TM03 setflag FLAG_GOT_TM03_FROM_MISTY msgbox CeruleanCity_Gym_Text_ExplainTM03 diff --git a/data/maps/CeruleanCity_House3/scripts.inc b/data/maps/CeruleanCity_House3/scripts.inc index 23268dbfe..2e3913696 100644 --- a/data/maps/CeruleanCity_House3/scripts.inc +++ b/data/maps/CeruleanCity_House3/scripts.inc @@ -12,14 +12,11 @@ CeruleanCity_House3_EventScript_Dontae:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_ZYNX_TRADE, CeruleanCity_House3_EventScript_AlreadyTraded msgbox Trade_Text_DoYouHaveMonWouldYouTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeruleanCity_House3_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, CeruleanCity_House3_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge CeruleanCity_House3_EventScript_DeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, CeruleanCity_House3_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne CeruleanCity_House3_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, CeruleanCity_House3_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_Thanks setflag FLAG_DID_ZYNX_TRADE diff --git a/data/maps/CeruleanCity_House4/scripts.inc b/data/maps/CeruleanCity_House4/scripts.inc index f338f5173..8774b70ef 100644 --- a/data/maps/CeruleanCity_House4/scripts.inc +++ b/data/maps/CeruleanCity_House4/scripts.inc @@ -9,20 +9,13 @@ CeruleanCity_House4_EventScript_WonderNewsBerryMan:: lock specialvar VAR_0x8004, GetMENewsJisanItemAndState copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8004, 0 - goto_if_eq CeruleanCity_House4_EventScript_NoNews - compare VAR_0x8004, 1 - goto_if_eq CeruleanCity_House4_EventScript_News1 - compare VAR_0x8004, 2 - goto_if_eq CeruleanCity_House4_EventScript_News2 - compare VAR_0x8004, 3 - goto_if_eq CeruleanCity_House4_EventScript_NewsNotSpread - compare VAR_0x8004, 4 - goto_if_eq CeruleanCity_House4_EventScript_NewsSpread1 - compare VAR_0x8004, 5 - goto_if_eq CeruleanCity_House4_EventScript_NewsSpread2 - compare VAR_0x8004, 6 - goto_if_eq CeruleanCity_House4_EventScript_NewsDone + goto_if_eq VAR_0x8004, 0, CeruleanCity_House4_EventScript_NoNews + goto_if_eq VAR_0x8004, 1, CeruleanCity_House4_EventScript_News1 + goto_if_eq VAR_0x8004, 2, CeruleanCity_House4_EventScript_News2 + goto_if_eq VAR_0x8004, 3, CeruleanCity_House4_EventScript_NewsNotSpread + goto_if_eq VAR_0x8004, 4, CeruleanCity_House4_EventScript_NewsSpread1 + goto_if_eq VAR_0x8004, 5, CeruleanCity_House4_EventScript_NewsSpread2 + goto_if_eq VAR_0x8004, 6, CeruleanCity_House4_EventScript_NewsDone end CeruleanCity_House4_EventScript_NoNews:: @@ -34,8 +27,7 @@ CeruleanCity_House4_EventScript_News1:: call CeruleanCity_House4_EventScript_MovementReactionToNews msgbox CeruleanCity_House4_Text_NewNewsInformativeHaveThis giveitem VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_House4_EventScript_NoRoomForBerries + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries release end @@ -43,8 +35,7 @@ CeruleanCity_House4_EventScript_News2:: call CeruleanCity_House4_EventScript_MovementReactionToNews msgbox CeruleanCity_House4_Text_IncredibleNewsHaveBerries giveitem VAR_0x8008, 4 - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_House4_EventScript_NoRoomForBerries + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries release end @@ -59,8 +50,7 @@ CeruleanCity_House4_EventScript_NewsSpread1:: call CeruleanCity_House4_EventScript_MovementReactionToNews msgbox CeruleanCity_House4_Text_ThanksForSpreadingNewsTakeThis giveitem VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_House4_EventScript_NoRoomForBerries + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries release end @@ -68,8 +58,7 @@ CeruleanCity_House4_EventScript_NewsSpread2:: call CeruleanCity_House4_EventScript_MovementReactionToNews msgbox CeruleanCity_House4_Text_MagnificentNewsSpreadHaveBerries giveitem VAR_0x8008, 4 - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_House4_EventScript_NoRoomForBerries + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries release end diff --git a/data/maps/CeruleanCity_House5/scripts.inc b/data/maps/CeruleanCity_House5/scripts.inc index 5eaac5b59..a9413ecf1 100644 --- a/data/maps/CeruleanCity_House5/scripts.inc +++ b/data/maps/CeruleanCity_House5/scripts.inc @@ -6,14 +6,12 @@ CeruleanCity_House5_EventScript_BerryPowderMan:: faceplayer goto_if_set FLAG_GOT_POWDER_JAR, CeruleanCity_House5_EventScript_AskToExchangePowder msgbox CeruleanCity_House1_Text_AnyInterestInBerries, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeruleanCity_House5_EventScript_NoInterestInBerries + goto_if_eq VAR_RESULT, NO, CeruleanCity_House5_EventScript_NoInterestInBerries goto_if_unset FLAG_SYS_GOT_BERRY_POUCH, CeruleanCity_House5_EventScript_NoBerries msgbox CeruleanCity_House1_Text_HaveJustTheThing setflag FLAG_GOT_POWDER_JAR giveitem ITEM_POWDER_JAR - compare VAR_RESULT, FALSE - goto_if_eq EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, EventScript_BagIsFull msgbox CeruleanCity_House1_Text_GoCrushBerriesAtDirectCorner release end @@ -141,21 +139,17 @@ CeruleanCity_House5_EventScript_ExitMenu:: CeruleanCity_House5_EventScript_ExchangePowderForItem:: msgbox CeruleanCity_House1_Text_YoullExchangeBerryPowderForItem, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeruleanCity_House5_EventScript_ChooseExchangeItem + goto_if_eq VAR_RESULT, NO, CeruleanCity_House5_EventScript_ChooseExchangeItem copyvar VAR_0x8004, VAR_0x8009 specialvar VAR_RESULT, Script_HasEnoughBerryPowder - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_House5_EventScript_NotEnoughBerryPowder + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House5_EventScript_NotEnoughBerryPowder giveitem VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq CeruleanCity_House5_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House5_EventScript_BagIsFull copyvar VAR_0x8004, VAR_0x8009 special Script_TakeBerryPowder special PrintPlayerBerryPowderAmount msgbox CeruleanCity_House1_Text_TradeMoreBerryPowder, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CeruleanCity_House5_EventScript_ChooseExchangeItem + goto_if_eq VAR_RESULT, YES, CeruleanCity_House5_EventScript_ChooseExchangeItem msgbox CeruleanCity_House1_Text_HopeToSeeYouAgain special RemoveBerryPowderVendorMenu release diff --git a/data/maps/CinnabarIsland/scripts.inc b/data/maps/CinnabarIsland/scripts.inc index c84bb8424..1adc8c339 100644 --- a/data/maps/CinnabarIsland/scripts.inc +++ b/data/maps/CinnabarIsland/scripts.inc @@ -9,12 +9,9 @@ CinnabarIsland_MapScripts:: CinnabarIsland_OnTransition:: setworldmapflag FLAG_WORLD_MAP_CINNABAR_ISLAND call CinnabarIsland_EventScript_CheckUnlockGym - compare VAR_MAP_SCENE_CINNABAR_ISLAND, 1 - call_if_eq CinnabarIsland_EventScript_ReadyObjectsSailToOneIsland - compare VAR_MAP_SCENE_CINNABAR_ISLAND, 3 - call_if_eq CinnabarIsland_EventScript_ReadyObjectsReturnFromSeviiIslands - compare VAR_MAP_SCENE_CINNABAR_ISLAND_2, 1 - call_if_eq CinnabarIsland_EventScript_ReadyObjectsSailToOneIslandFromPokeCenter + call_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND, 1, CinnabarIsland_EventScript_ReadyObjectsSailToOneIsland + call_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND, 3, CinnabarIsland_EventScript_ReadyObjectsReturnFromSeviiIslands + call_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND_2, 1, CinnabarIsland_EventScript_ReadyObjectsSailToOneIslandFromPokeCenter end CinnabarIsland_EventScript_ReadyObjectsSailToOneIslandFromPokeCenter:: @@ -27,8 +24,7 @@ CinnabarIsland_EventScript_ReadyObjectsSailToOneIslandFromPokeCenter:: CinnabarIsland_EventScript_ReadyObjectsSailToOneIsland:: getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 18 - goto_if_ge CinnabarIsland_EventScript_MoveSeagallopDown + goto_if_ge VAR_0x8004, 18, CinnabarIsland_EventScript_MoveSeagallopDown setflag FLAG_TEMP_2 setobjectxyperm LOCALID_BILL, 18, 12 setobjectmovementtype LOCALID_BILL, MOVEMENT_TYPE_FACE_UP @@ -106,10 +102,8 @@ CinnabarIsland_EventScript_BillScene:: call_if_set FLAG_TEMP_2, CinnabarIsland_EventScript_BillApproachPlayer2 msgbox CinnabarIsland_Text_HeyIfItIsntPlayer msgbox CinnabarIsland_Text_ComeWithMeToOneIsland, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CinnabarIsland_EventScript_AgreeSailToOneIsland - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_EventScript_DeclineSailToOneIsland + goto_if_eq VAR_RESULT, YES, CinnabarIsland_EventScript_AgreeSailToOneIsland + goto_if_eq VAR_RESULT, NO, CinnabarIsland_EventScript_DeclineSailToOneIsland end CinnabarIsland_EventScript_BillFacePlayer1:: diff --git a/data/maps/CinnabarIsland_Gym/scripts.inc b/data/maps/CinnabarIsland_Gym/scripts.inc index c87f7aed1..e9df5511b 100644 --- a/data/maps/CinnabarIsland_Gym/scripts.inc +++ b/data/maps/CinnabarIsland_Gym/scripts.inc @@ -74,8 +74,7 @@ CinnabarIsland_Gym_EventScript_DefeatedBlaine:: CinnabarIsland_Gym_EventScript_GiveTM38:: msgbox CinnabarIsland_Gym_Text_ExplainVolcanoBadge checkitemspace ITEM_TM38 - compare VAR_RESULT, FALSE - goto_if_eq CinnabarIsland_Gym_EventScript_NoRoomForTM38 + goto_if_eq VAR_RESULT, FALSE, CinnabarIsland_Gym_EventScript_NoRoomForTM38 giveitem_msg CinnabarIsland_Gym_Text_ReceivedTM38FromBlaine, ITEM_TM38 setflag FLAG_GOT_TM38_FROM_BLAINE msgbox CinnabarIsland_Gym_Text_FireBlastIsUltimateFireMove @@ -217,10 +216,8 @@ CinnabarIsland_Gym_EventScript_Quz1Right:: CinnabarIsland_Gym_EventScript_Quiz1:: msgbox CinnabarIsland_Gym_Text_PokemonQuizRules msgbox CinnabarIsland_Gym_Text_QuizQuestion1, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz1Correct - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz1Incorrect + goto_if_eq VAR_RESULT, YES, CinnabarIsland_Gym_EventScript_Quiz1Correct + goto_if_eq VAR_RESULT, NO, CinnabarIsland_Gym_EventScript_Quiz1Incorrect end CinnabarIsland_Gym_EventScript_CorrectAnswer:: @@ -263,10 +260,8 @@ CinnabarIsland_Gym_EventScript_Quiz1Incorrect:: end CinnabarIsland_Gym_EventScript_BattleQuinn:: - compare VAR_TEMP_1, 0 - call_if_eq CinnabarIsland_Gym_EventScript_QuinnApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq CinnabarIsland_Gym_EventScript_QuinnApproachRight + call_if_eq VAR_TEMP_1, 0, CinnabarIsland_Gym_EventScript_QuinnApproachLeft + call_if_eq VAR_TEMP_1, 1, CinnabarIsland_Gym_EventScript_QuinnApproachRight textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_QuinnIntro trainerbattle_no_intro TRAINER_BURGLAR_QUINN, CinnabarIsland_Gym_Text_QuinnDefeat @@ -311,10 +306,8 @@ CinnabarIsland_Gym_EventScript_Quiz2Right:: CinnabarIsland_Gym_EventScript_Quiz2:: msgbox CinnabarIsland_Gym_Text_PokemonQuizRules msgbox CinnabarIsland_Gym_Text_QuizQuestion2, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz2Incorrect - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz2Correct + goto_if_eq VAR_RESULT, YES, CinnabarIsland_Gym_EventScript_Quiz2Incorrect + goto_if_eq VAR_RESULT, NO, CinnabarIsland_Gym_EventScript_Quiz2Correct end CinnabarIsland_Gym_EventScript_Quiz2Correct:: @@ -339,10 +332,8 @@ CinnabarIsland_Gym_EventScript_Quiz2Incorrect:: end CinnabarIsland_Gym_EventScript_BattleAvery:: - compare VAR_TEMP_1, 0 - call_if_eq CinnabarIsland_Gym_EventScript_AveryApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq CinnabarIsland_Gym_EventScript_AveryApproachRight + call_if_eq VAR_TEMP_1, 0, CinnabarIsland_Gym_EventScript_AveryApproachLeft + call_if_eq VAR_TEMP_1, 1, CinnabarIsland_Gym_EventScript_AveryApproachRight textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_AveryIntro trainerbattle_no_intro TRAINER_SUPER_NERD_AVERY, CinnabarIsland_Gym_Text_AveryDefeat @@ -396,10 +387,8 @@ CinnabarIsland_Gym_EventScript_Quiz3Right:: CinnabarIsland_Gym_EventScript_Quiz3:: msgbox CinnabarIsland_Gym_Text_PokemonQuizRules msgbox CinnabarIsland_Gym_Text_QuizQuestion3, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz3Incorrect - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz3Correct + goto_if_eq VAR_RESULT, YES, CinnabarIsland_Gym_EventScript_Quiz3Incorrect + goto_if_eq VAR_RESULT, NO, CinnabarIsland_Gym_EventScript_Quiz3Correct end CinnabarIsland_Gym_EventScript_Quiz3Correct:: @@ -424,10 +413,8 @@ CinnabarIsland_Gym_EventScript_Quiz3Incorrect:: end CinnabarIsland_Gym_EventScript_BattleRamon:: - compare VAR_TEMP_1, 0 - call_if_eq CinnabarIsland_Gym_EventScript_RamonApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq CinnabarIsland_Gym_EventScript_RamonApproachRight + call_if_eq VAR_TEMP_1, 0, CinnabarIsland_Gym_EventScript_RamonApproachLeft + call_if_eq VAR_TEMP_1, 1, CinnabarIsland_Gym_EventScript_RamonApproachRight textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_RamonIntro trainerbattle_no_intro TRAINER_BURGLAR_RAMON, CinnabarIsland_Gym_Text_RamonDefeat @@ -472,10 +459,8 @@ CinnabarIsland_Gym_EventScript_Quiz4Right:: CinnabarIsland_Gym_EventScript_Quiz4:: msgbox CinnabarIsland_Gym_Text_PokemonQuizRules msgbox CinnabarIsland_Gym_Text_QuizQuestion4, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz4Incorrect - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz4Correct + goto_if_eq VAR_RESULT, YES, CinnabarIsland_Gym_EventScript_Quiz4Incorrect + goto_if_eq VAR_RESULT, NO, CinnabarIsland_Gym_EventScript_Quiz4Correct end CinnabarIsland_Gym_EventScript_Quiz4Correct:: @@ -500,10 +485,8 @@ CinnabarIsland_Gym_EventScript_Quiz4Incorrect:: end CinnabarIsland_Gym_EventScript_BattleDerek:: - compare VAR_TEMP_1, 0 - call_if_eq CinnabarIsland_Gym_EventScript_DerekApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq CinnabarIsland_Gym_EventScript_DerekApproachRight + call_if_eq VAR_TEMP_1, 0, CinnabarIsland_Gym_EventScript_DerekApproachLeft + call_if_eq VAR_TEMP_1, 1, CinnabarIsland_Gym_EventScript_DerekApproachRight textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_DerekIntro trainerbattle_no_intro TRAINER_SUPER_NERD_DEREK, CinnabarIsland_Gym_Text_DerekDefeat @@ -548,10 +531,8 @@ CinnabarIsland_Gym_EventScript_Quiz5Right:: CinnabarIsland_Gym_EventScript_Quiz5:: msgbox CinnabarIsland_Gym_Text_PokemonQuizRules msgbox CinnabarIsland_Gym_Text_QuizQuestion5, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz5Correct - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz5Incorrect + goto_if_eq VAR_RESULT, YES, CinnabarIsland_Gym_EventScript_Quiz5Correct + goto_if_eq VAR_RESULT, NO, CinnabarIsland_Gym_EventScript_Quiz5Incorrect end CinnabarIsland_Gym_EventScript_Quiz5Correct:: @@ -576,10 +557,8 @@ CinnabarIsland_Gym_EventScript_Quiz5Incorrect:: end CinnabarIsland_Gym_EventScript_BattleDusty:: - compare VAR_TEMP_1, 0 - call_if_eq CinnabarIsland_Gym_EventScript_DustyApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq CinnabarIsland_Gym_EventScript_DustyApproachRight + call_if_eq VAR_TEMP_1, 0, CinnabarIsland_Gym_EventScript_DustyApproachLeft + call_if_eq VAR_TEMP_1, 1, CinnabarIsland_Gym_EventScript_DustyApproachRight textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_DustyIntro trainerbattle_no_intro TRAINER_BURGLAR_DUSTY, CinnabarIsland_Gym_Text_DustyDefeat @@ -624,10 +603,8 @@ CinnabarIsland_Gym_EventScript_Quiz6Right:: CinnabarIsland_Gym_EventScript_Quiz6:: msgbox CinnabarIsland_Gym_Text_PokemonQuizRules msgbox CinnabarIsland_Gym_Text_QuizQuestion6, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz6Incorrect - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_Gym_EventScript_Quiz6Correct + goto_if_eq VAR_RESULT, YES, CinnabarIsland_Gym_EventScript_Quiz6Incorrect + goto_if_eq VAR_RESULT, NO, CinnabarIsland_Gym_EventScript_Quiz6Correct end CinnabarIsland_Gym_EventScript_Quiz6Correct:: @@ -652,10 +629,8 @@ CinnabarIsland_Gym_EventScript_Quiz6Incorrect:: end CinnabarIsland_Gym_EventScript_BattleZac:: - compare VAR_TEMP_1, 0 - call_if_eq CinnabarIsland_Gym_EventScript_ZacApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq CinnabarIsland_Gym_EventScript_ZacApproachRight + call_if_eq VAR_TEMP_1, 0, CinnabarIsland_Gym_EventScript_ZacApproachLeft + call_if_eq VAR_TEMP_1, 1, CinnabarIsland_Gym_EventScript_ZacApproachRight textcolor NPC_TEXT_COLOR_MALE msgbox CinnabarIsland_Gym_Text_ZacIntro trainerbattle_no_intro TRAINER_SUPER_NERD_ZAC, CinnabarIsland_Gym_Text_ZacDefeat diff --git a/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc b/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc index 1488e054c..5f0b86d7e 100644 --- a/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonCenter_1F/scripts.inc @@ -32,8 +32,7 @@ CinnabarIsland_PokemonCenter_1F_EventScript_Bill:: lock faceplayer msgbox CinnabarIsland_PokemonCenter_1F_Text_ReadyToSailToOneIsland, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonCenter_1F_EventScript_NotReadyToSail + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonCenter_1F_EventScript_NotReadyToSail msgbox CinnabarIsland_PokemonCenter_1F_Text_LetsGo closemessage playbgm MUS_FOLLOW_ME, 1 @@ -41,12 +40,9 @@ CinnabarIsland_PokemonCenter_1F_EventScript_Bill:: setflag FLAG_DONT_TRANSITION_MUSIC setflag FLAG_HIDE_CINNABAR_POKECENTER_BILL delay 20 - compare VAR_FACING, DIR_SOUTH - call_if_eq CinnabarIsland_PokemonCenter_1F_EventScript_ExitWithBillSouth - compare VAR_FACING, DIR_EAST - call_if_eq CinnabarIsland_PokemonCenter_1F_EventScript_ExitWithBillEast - compare VAR_FACING, DIR_WEST - call_if_eq CinnabarIsland_PokemonCenter_1F_EventScript_ExitWithBillWest + call_if_eq VAR_FACING, DIR_SOUTH, CinnabarIsland_PokemonCenter_1F_EventScript_ExitWithBillSouth + call_if_eq VAR_FACING, DIR_EAST, CinnabarIsland_PokemonCenter_1F_EventScript_ExitWithBillEast + call_if_eq VAR_FACING, DIR_WEST, CinnabarIsland_PokemonCenter_1F_EventScript_ExitWithBillWest removeobject LOCALID_BILL setvar VAR_MAP_SCENE_CINNABAR_ISLAND_2, 1 clearflag FLAG_HIDE_CINNABAR_BILL diff --git a/data/maps/CinnabarIsland_PokemonLab_Entrance/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_Entrance/scripts.inc index d06864639..7969a84f3 100644 --- a/data/maps/CinnabarIsland_PokemonLab_Entrance/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_Entrance/scripts.inc @@ -3,8 +3,7 @@ CinnabarIsland_PokemonLab_Entrance_MapScripts:: .byte 0 CinnabarIsland_PokemonLab_Entrance_OnTransition:: - compare VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 1 - call_if_eq CinnabarIsland_PokemonLab_Entrance_EventScript_ReadyFossil + call_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 1, CinnabarIsland_PokemonLab_Entrance_EventScript_ReadyFossil end CinnabarIsland_PokemonLab_Entrance_EventScript_ReadyFossil:: diff --git a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc index e460fa2b4..92cfb97ea 100644 --- a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/scripts.inc @@ -12,14 +12,11 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_Garett:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_SEELOR_TRADE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_AlreadyTraded msgbox Trade_Text_LookingForMonWannaTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_HeyThanks setflag FLAG_DID_SEELOR_TRADE @@ -47,21 +44,15 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_FossilScientist:: faceplayer setvar VAR_RESULT, FALSE call_if_set FLAG_REVIVED_AMBER, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_CheckRevivedMtMoonFossil - compare VAR_RESULT, TRUE - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_RevivedAllFossils - compare VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 2 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveRevivedMon - compare VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 1 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_FossilStillReviving + goto_if_eq VAR_RESULT, TRUE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_RevivedAllFossils + goto_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 2, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveRevivedMon + goto_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 1, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_FossilStillReviving call CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_CheckAddHelixFossilToList - compare VAR_RESULT, TRUE - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilHelix + goto_if_eq VAR_RESULT, TRUE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilHelix call CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_CheckAddDomeFossilToList - compare VAR_RESULT, TRUE - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilDome + goto_if_eq VAR_RESULT, TRUE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilDome call CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_CheckAddOldAmberToList - compare VAR_RESULT, TRUE - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilAmber + goto_if_eq VAR_RESULT, TRUE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilAmber msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_HaveYouAFossilForMe goto CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DontShowFossil end @@ -97,8 +88,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilHelix:: message CinnabarIsland_PokemonLab_ExperimentRoom_Text_HaveYouAFossilForMe waitmessage call CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_CheckAddOldAmberToList - compare VAR_RESULT, TRUE - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilHelixAmber + goto_if_eq VAR_RESULT, TRUE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilHelixAmber multichoice 0, 0, MULTICHOICE_HELIX, FALSE switch VAR_RESULT case 0, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil @@ -110,8 +100,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilDome:: message CinnabarIsland_PokemonLab_ExperimentRoom_Text_HaveYouAFossilForMe waitmessage call CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_CheckAddOldAmberToList - compare VAR_RESULT, TRUE - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilDomeAmber + goto_if_eq VAR_RESULT, TRUE, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ChooseFossilDomeAmber multichoice 0, 0, MULTICHOICE_DOME, FALSE switch VAR_RESULT case 0, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil @@ -151,8 +140,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowHelixFossil:: bufferspeciesname STR_VAR_1, SPECIES_OMANYTE bufferitemname STR_VAR_2, ITEM_HELIX_FOSSIL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_HandedFossilToWeirdDoctor textcolor NPC_TEXT_COLOR_MALE removeitem ITEM_HELIX_FOSSIL @@ -166,8 +154,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowDomeFossil:: bufferspeciesname STR_VAR_1, SPECIES_KABUTO bufferitemname STR_VAR_2, ITEM_DOME_FOSSIL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_HandedFossilToWeirdDoctor textcolor NPC_TEXT_COLOR_MALE removeitem ITEM_DOME_FOSSIL @@ -181,8 +168,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_ShowOldAmber:: bufferspeciesname STR_VAR_1, SPECIES_AERODACTYL bufferitemname STR_VAR_2, ITEM_OLD_AMBER msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_DeclineReviveFossil msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_HandedFossilToWeirdDoctor textcolor NPC_TEXT_COLOR_MALE removeitem ITEM_OLD_AMBER @@ -203,12 +189,9 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_FossilStillReviving:: end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveRevivedMon:: - compare VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_WHICH_FOSSIL, HELIX_FOSSIL - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte - compare VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_WHICH_FOSSIL, DOME_FOSSIL - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto - compare VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_WHICH_FOSSIL, OLD_AMBER - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl + goto_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_WHICH_FOSSIL, HELIX_FOSSIL, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte + goto_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_WHICH_FOSSIL, DOME_FOSSIL, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto + goto_if_eq VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_WHICH_FOSSIL, OLD_AMBER, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte:: @@ -216,13 +199,10 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveOmanyte:: bufferspeciesname STR_VAR_1, SPECIES_OMANYTE msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife givemon SPECIES_OMANYTE, 5 - compare VAR_RESULT, 2 - goto_if_eq EventScript_NoMoreRoomForPokemon + goto_if_eq VAR_RESULT, 2, EventScript_NoMoreRoomForPokemon setflag FLAG_REVIVED_HELIX - compare VAR_RESULT, 0 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty - compare VAR_RESULT, 1 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC + goto_if_eq VAR_RESULT, 0, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty + goto_if_eq VAR_RESULT, 1, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto:: @@ -230,13 +210,10 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveKabuto:: bufferspeciesname STR_VAR_1, SPECIES_KABUTO msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife givemon SPECIES_KABUTO, 5 - compare VAR_RESULT, 2 - goto_if_eq EventScript_NoMoreRoomForPokemon + goto_if_eq VAR_RESULT, 2, EventScript_NoMoreRoomForPokemon setflag FLAG_REVIVED_DOME - compare VAR_RESULT, 0 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty - compare VAR_RESULT, 1 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC + goto_if_eq VAR_RESULT, 0, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty + goto_if_eq VAR_RESULT, 1, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl:: @@ -244,13 +221,10 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_GiveAerodactyl:: bufferspeciesname STR_VAR_1, SPECIES_AERODACTYL msgbox CinnabarIsland_PokemonLab_ExperimentRoom_Text_FossilMonBackToLife givemon SPECIES_AERODACTYL, 5 - compare VAR_RESULT, 2 - goto_if_eq EventScript_NoMoreRoomForPokemon + goto_if_eq VAR_RESULT, 2, EventScript_NoMoreRoomForPokemon setflag FLAG_REVIVED_AMBER - compare VAR_RESULT, 0 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty - compare VAR_RESULT, 1 - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC + goto_if_eq VAR_RESULT, 0, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty + goto_if_eq VAR_RESULT, 1, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC end CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty:: @@ -261,8 +235,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonParty:: waitfanfare setvar VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 0 msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_EndGiveMon + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_EndGiveMon call EventScript_GetGiftMonPartySlot call EventScript_ChangePokemonNickname goto CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_EndGiveMon @@ -276,8 +249,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_NicknameMonPC:: waitfanfare setvar VAR_MAP_SCENE_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM_REVIVE_STATE, 0 msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_MonSentToPC + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_MonSentToPC call EventScript_NameReceivedBoxMon goto CinnabarIsland_PokemonLab_ExperimentRoom_EventScript_MonSentToPC end diff --git a/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc b/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc index fa4f456a6..cbe712834 100644 --- a/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc +++ b/data/maps/CinnabarIsland_PokemonLab_Lounge/scripts.inc @@ -12,14 +12,11 @@ CinnabarIsland_PokemonLab_Lounge_EventScript_Clifton:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_ESPHERE_TRADE, CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonAlreadyTraded msgbox Trade_Text_DoYouHaveMonWouldYouTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonDeclineTrade + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonDeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonDeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonDeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonNotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, CinnabarIsland_PokemonLab_Lounge_EventScript_CliftonNotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_Thanks setflag FLAG_DID_ESPHERE_TRADE @@ -51,18 +48,15 @@ CinnabarIsland_PokemonLab_Lounge_EventScript_Norma:: copyvar VAR_0x8009, VAR_RESULT goto_if_set FLAG_DID_TANGENY_TRADE, CinnabarIsland_PokemonLab_Lounge_EventScript_NormaAlreadyTraded msgbox Trade_Text_DoYouHaveMonWantToTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CinnabarIsland_PokemonLab_Lounge_EventScript_NormaDeclineTrade + goto_if_eq VAR_RESULT, NO, CinnabarIsland_PokemonLab_Lounge_EventScript_NormaDeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_SIZE - goto_if_ge CinnabarIsland_PokemonLab_Lounge_EventScript_NormaDeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, CinnabarIsland_PokemonLab_Lounge_EventScript_NormaDeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne CinnabarIsland_PokemonLab_Lounge_EventScript_NormaNotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, CinnabarIsland_PokemonLab_Lounge_EventScript_NormaNotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/FiveIsland_MemorialPillar/scripts.inc b/data/maps/FiveIsland_MemorialPillar/scripts.inc index c99d65131..40e3fe73a 100644 --- a/data/maps/FiveIsland_MemorialPillar/scripts.inc +++ b/data/maps/FiveIsland_MemorialPillar/scripts.inc @@ -27,8 +27,7 @@ FiveIsland_MemorialPillar_EventScript_AlreadyGotTM42:: FiveIsland_MemorialPillar_EventScript_ReturnedForTM42:: msgbox FiveIsland_MemorialPillar_Text_StillHaveThingAsMyThanks giveitem ITEM_TM42 - compare VAR_RESULT, FALSE - goto_if_eq FiveIsland_MemorialPillar_EventScript_NoRoomForTM42 + goto_if_eq VAR_RESULT, FALSE, FiveIsland_MemorialPillar_EventScript_NoRoomForTM42 call FiveIsland_MemorialPillar_EventScript_ReceivedTM42 release end @@ -41,15 +40,13 @@ FiveIsland_MemorialPillar_EventScript_Memorial:: goto_if_set FLAG_NO_ROOM_FOR_TM42_AT_MEMORIAL_PILLAR, FiveIsland_MemorialPillar_EventScript_MemorialLemonadeAlreadyPlaced msgbox FiveIsland_MemorialPillar_Text_HereLiesTectonixLemonadeOffering checkitem ITEM_LEMONADE - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_MemorialPillar_EventScript_AskPlaceLemonade + goto_if_eq VAR_RESULT, TRUE, FiveIsland_MemorialPillar_EventScript_AskPlaceLemonade releaseall end FiveIsland_MemorialPillar_EventScript_AskPlaceLemonade:: msgbox FiveIsland_MemorialPillar_Text_LeaveAnotherLemonadeOffering, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FiveIsland_MemorialPillar_EventScript_PlaceLemonade + goto_if_eq VAR_RESULT, YES, FiveIsland_MemorialPillar_EventScript_PlaceLemonade releaseall end @@ -65,8 +62,7 @@ FiveIsland_MemorialPillar_EventScript_PlaceLemonade:: textcolor NPC_TEXT_COLOR_MALE msgbox FiveIsland_MemorialPillar_Text_ThankYouPleaseTakeThis giveitem ITEM_TM42 - compare VAR_RESULT, FALSE - goto_if_eq FiveIsland_MemorialPillar_EventScript_NoRoomForTM42 + goto_if_eq VAR_RESULT, FALSE, FiveIsland_MemorialPillar_EventScript_NoRoomForTM42 call FiveIsland_MemorialPillar_EventScript_ReceivedTM42 releaseall end diff --git a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc index 39cabec6e..2b98afca2 100644 --- a/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc +++ b/data/maps/FiveIsland_ResortGorgeous_House/scripts.inc @@ -12,10 +12,8 @@ FiveIsland_ResortGorgeous_House_EventScript_Selphy:: lock faceplayer goto_if_set SHOWN_REQUESTED_MON, FiveIsland_ResortGorgeous_House_EventScript_JustFulfilledRequest - compare VAR_RESORT_GORGEOUS_REQUESTED_MON, 0xFFFF - goto_if_eq FiveIsland_ResortGorgeous_House_EventScript_RequestTookTooLong - compare VAR_RESORT_GORGEOUS_REQUESTED_MON, SPECIES_NONE - goto_if_ne FiveIsland_ResortGorgeous_House_EventScript_CheckForRequestedMon + goto_if_eq VAR_RESORT_GORGEOUS_REQUESTED_MON, 0xFFFF, FiveIsland_ResortGorgeous_House_EventScript_RequestTookTooLong + goto_if_ne VAR_RESORT_GORGEOUS_REQUESTED_MON, SPECIES_NONE, FiveIsland_ResortGorgeous_House_EventScript_CheckForRequestedMon msgbox FiveIsland_ResortGorgeous_House_Text_PleaseHearMyWish goto FiveIsland_ResortGorgeous_House_EventScript_RequestMon end @@ -34,8 +32,7 @@ FiveIsland_ResortGorgeous_House_EventScript_RequestTookTooLong:: FiveIsland_ResortGorgeous_House_EventScript_CheckForRequestedMon:: copyvar VAR_0x8004, VAR_RESORT_GORGEOUS_REQUESTED_MON specialvar VAR_RESULT, DoesPlayerPartyContainSpecies - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_House_EventScript_ShowRequestedMon + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_House_EventScript_ShowRequestedMon goto FiveIsland_ResortGorgeous_House_EventScript_RequestMon end @@ -54,19 +51,14 @@ FiveIsland_ResortGorgeous_House_EventScript_ShowRequestedMon:: textcolor NPC_TEXT_COLOR_MALE msgbox FiveIsland_ResortGorgeous_House_Text_ButlerIShallDoAsYouBid closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerSouth - compare VAR_FACING, DIR_EAST - call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerEast - compare VAR_FACING, DIR_WEST - call_if_eq FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerWest + call_if_eq VAR_FACING, DIR_NORTH, FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerNorth + call_if_eq VAR_FACING, DIR_SOUTH, FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerSouth + call_if_eq VAR_FACING, DIR_EAST, FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerEast + call_if_eq VAR_FACING, DIR_WEST, FiveIsland_ResortGorgeous_House_EventScript_ButlerApproachPlayerWest copyobjectxytoperm LOCALID_BUTLER msgbox FiveIsland_ResortGorgeous_House_Text_ButlerPleaseAcceptThisAsHerThanks giveitem VAR_RESORT_GORGEOUS_REWARD - compare VAR_RESULT, FALSE - goto_if_eq FiveIsland_ResortGorgeous_House_EventScript_NoRoomForReward + goto_if_eq VAR_RESULT, FALSE, FiveIsland_ResortGorgeous_House_EventScript_NoRoomForReward setflag SHOWN_REQUESTED_MON setvar VAR_RESORT_GORGEOUS_REQUESTED_MON, SPECIES_NONE release diff --git a/data/maps/FiveIsland_RocketWarehouse/scripts.inc b/data/maps/FiveIsland_RocketWarehouse/scripts.inc index 28ad89a8e..f4933655d 100644 --- a/data/maps/FiveIsland_RocketWarehouse/scripts.inc +++ b/data/maps/FiveIsland_RocketWarehouse/scripts.inc @@ -84,8 +84,7 @@ FiveIsland_RocketWarehouse_EventScript_Admin2:: FiveIsland_RocketWarehouse_EventScript_DefeatedAdmin2:: getplayerxy PLAYER_X_POS, PLAYER_Y_POS - compare PLAYER_X_POS, 24 - call_if_le FiveIsland_RocketWarehouse_EventScript_PlayerFaceAdmin2 + call_if_le PLAYER_X_POS, 24, FiveIsland_RocketWarehouse_EventScript_PlayerFaceAdmin2 msgbox FiveIsland_RocketWarehouse_Text_Admin2PostBattle closemessage fadescreen FADE_TO_BLACK @@ -118,37 +117,27 @@ FiveIsland_RocketWarehouse_EventScript_Admin1:: FiveIsland_RocketWarehouse_EventScript_DefeatedAdmin1:: getplayerxy PLAYER_X_POS, PLAYER_Y_POS specialvar VAR_RESULT, GetPlayerFacingDirection - compare VAR_RESULT, DIR_NORTH - call_if_eq FiveIsland_RocketWarehouse_EventScript_PlayerFaceAdmin1 + call_if_eq VAR_RESULT, DIR_NORTH, FiveIsland_RocketWarehouse_EventScript_PlayerFaceAdmin1 msgbox FiveIsland_RocketWarehouse_Text_Admin1PostBattle closemessage - compare PLAYER_X_POS, 24 - call_if_le FiveIsland_RocketWarehouse_EventScript_AdminWalkToSwitchFar - compare PLAYER_X_POS, 25 - call_if_eq FiveIsland_RocketWarehouse_EventScript_AdminWalkToSwitch - compare PLAYER_X_POS, 26 - call_if_eq FiveIsland_RocketWarehouse_EventScript_AdminFaceSwitch - compare PLAYER_X_POS, 27 - call_if_eq FiveIsland_RocketWarehouse_EventScript_AdminFaceSwitch + call_if_le PLAYER_X_POS, 24, FiveIsland_RocketWarehouse_EventScript_AdminWalkToSwitchFar + call_if_eq PLAYER_X_POS, 25, FiveIsland_RocketWarehouse_EventScript_AdminWalkToSwitch + call_if_eq PLAYER_X_POS, 26, FiveIsland_RocketWarehouse_EventScript_AdminFaceSwitch + call_if_eq PLAYER_X_POS, 27, FiveIsland_RocketWarehouse_EventScript_AdminFaceSwitch playse SE_PIN call FiveIsland_RocketWarehouse_EventScript_SetArrowsForReEntry special DrawWholeMapView waitse - compare PLAYER_X_POS, 24 - call_if_le FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerLeft - compare PLAYER_X_POS, 25 - call_if_eq FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerLeft - compare PLAYER_X_POS, 26 - call_if_eq FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerLeft - compare PLAYER_X_POS, 27 - call_if_eq FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerDown + call_if_le PLAYER_X_POS, 24, FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerLeft + call_if_eq PLAYER_X_POS, 25, FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerLeft + call_if_eq PLAYER_X_POS, 26, FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerLeft + call_if_eq PLAYER_X_POS, 27, FiveIsland_RocketWarehouse_EventScript_AdminFacePlayerDown msgbox FiveIsland_RocketWarehouse_Text_MadeItSoYouCanComeBackThrough release end FiveIsland_RocketWarehouse_EventScript_PlayerFaceAdmin1:: - compare PLAYER_X_POS, 27 - goto_if_eq EventScript_Return + goto_if_eq PLAYER_X_POS, 27, EventScript_Return applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 return diff --git a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc index d1c996aa2..a6b7b8133 100644 --- a/data/maps/FiveIsland_WaterLabyrinth/scripts.inc +++ b/data/maps/FiveIsland_WaterLabyrinth/scripts.inc @@ -10,8 +10,7 @@ FiveIsland_WaterLabyrinth_EventScript_EggGentleman:: goto_if_set FLAG_NO_ROOM_FOR_TOGEPI_EGG, FiveIsland_WaterLabyrinth_EventScript_ReturnForEgg msgbox FiveIsland_WaterLabyrinth_Text_LetMeTakeLookAtMons specialvar VAR_RESULT, GetLeadMonFriendship - compare VAR_RESULT, 6 @ Max friendship - goto_if_eq FiveIsland_WaterLabyrinth_EventScript_LeadMonMaxFriendship + goto_if_eq VAR_RESULT, 6, FiveIsland_WaterLabyrinth_EventScript_LeadMonMaxFriendship msgbox FiveIsland_WaterLabyrinth_Text_HmmISeeIsee release end @@ -29,8 +28,7 @@ FiveIsland_WaterLabyrinth_EventScript_LeadMonMaxFriendship:: FiveIsland_WaterLabyrinth_EventScript_TryGiveEgg:: getpartysize - compare VAR_RESULT, PARTY_SIZE - goto_if_eq FiveIsland_WaterLabyrinth_EventScript_NoRoomForEgg + goto_if_eq VAR_RESULT, PARTY_SIZE, FiveIsland_WaterLabyrinth_EventScript_NoRoomForEgg setflag FLAG_GOT_TOGEPI_EGG giveegg SPECIES_TOGEPI textcolor NPC_TEXT_COLOR_NEUTRAL @@ -48,13 +46,11 @@ FiveIsland_WaterLabyrinth_EventScript_PostEggComment:: bufferspeciesname STR_VAR_2, SPECIES_TOGEPI setvar VAR_0x8004, SPECIES_TOGEPI specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_WaterLabyrinth_EventScript_MonDaisyComment + goto_if_eq VAR_RESULT, TRUE, FiveIsland_WaterLabyrinth_EventScript_MonDaisyComment bufferspeciesname STR_VAR_2, SPECIES_TOGETIC setvar VAR_0x8004, SPECIES_TOGETIC specialvar VAR_RESULT, PlayerPartyContainsSpeciesWithPlayerID - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_WaterLabyrinth_EventScript_MonDaisyComment + goto_if_eq VAR_RESULT, TRUE, FiveIsland_WaterLabyrinth_EventScript_MonDaisyComment msgbox FiveIsland_WaterLabyrinth_Text_GladIMetSomeoneLikeYou release end diff --git a/data/maps/FourIsland/scripts.inc b/data/maps/FourIsland/scripts.inc index 22f4b3a38..3e60c34b4 100644 --- a/data/maps/FourIsland/scripts.inc +++ b/data/maps/FourIsland/scripts.inc @@ -8,8 +8,7 @@ FourIsland_MapScripts:: FourIsland_OnTransition:: setworldmapflag FLAG_WORLD_MAP_FOUR_ISLAND - compare VAR_MAP_SCENE_FOUR_ISLAND, 0 - call_if_eq FourIsland_EventScript_ShowRival + call_if_eq VAR_MAP_SCENE_FOUR_ISLAND, 0, FourIsland_EventScript_ShowRival call FourIsland_EventScript_TrySetDayCareManPos end @@ -78,23 +77,18 @@ FourIsland_EventScript_DaycareMan:: faceplayer special GetDaycareMonNicknames specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_EGG_WAITING - goto_if_eq FourIsland_EventScript_DaycareEggWaiting - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq FourIsland_EventScript_CheckOnOneMon - compare VAR_RESULT, DAYCARE_TWO_MONS - goto_if_eq FourIsland_EventScript_CheckOnTwoMons + goto_if_eq VAR_RESULT, DAYCARE_EGG_WAITING, FourIsland_EventScript_DaycareEggWaiting + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, FourIsland_EventScript_CheckOnOneMon + goto_if_eq VAR_RESULT, DAYCARE_TWO_MONS, FourIsland_EventScript_CheckOnTwoMons msgbox DayCare_Text_ImDaycareManSpeakToMyWife release end FourIsland_EventScript_DaycareEggWaiting:: msgbox DayCare_Text_DoYouWantEgg, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_EventScript_DaycareAcceptEgg + goto_if_eq VAR_RESULT, YES, FourIsland_EventScript_DaycareAcceptEgg msgbox DayCare_Text_IWillKeepDoYouWantIt, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_EventScript_DaycareAcceptEgg + goto_if_eq VAR_RESULT, YES, FourIsland_EventScript_DaycareAcceptEgg msgbox DayCare_Text_IllKeepIt clearflag FLAG_PENDING_DAYCARE_EGG special RejectEggFromDayCare @@ -103,8 +97,7 @@ FourIsland_EventScript_DaycareEggWaiting:: FourIsland_EventScript_DaycareAcceptEgg:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, PARTY_SIZE - goto_if_ne FourIsland_EventScript_DaycareReceivedEgg + goto_if_ne VAR_RESULT, PARTY_SIZE, FourIsland_EventScript_DaycareReceivedEgg msgbox DayCare_Text_YouHaveNoRoomForIt release end diff --git a/data/maps/FourIsland_IcefallCave_Back/scripts.inc b/data/maps/FourIsland_IcefallCave_Back/scripts.inc index aeba075e1..2603e25e1 100644 --- a/data/maps/FourIsland_IcefallCave_Back/scripts.inc +++ b/data/maps/FourIsland_IcefallCave_Back/scripts.inc @@ -8,8 +8,7 @@ FourIsland_IcefallCave_Back_MapScripts:: .byte 0 FourIsland_IcefallCave_Back_OnTransition:: - compare VAR_MAP_SCENE_ICEFALL_CAVE_BACK, 1 - call_if_eq FourIsland_IcefallCave_Back_EventScript_HideLorelei + call_if_eq VAR_MAP_SCENE_ICEFALL_CAVE_BACK, 1, FourIsland_IcefallCave_Back_EventScript_HideLorelei end FourIsland_IcefallCave_Back_EventScript_HideLorelei:: diff --git a/data/maps/FourIsland_PokemonDayCare/scripts.inc b/data/maps/FourIsland_PokemonDayCare/scripts.inc index 854bda03d..fb2a1fbc7 100644 --- a/data/maps/FourIsland_PokemonDayCare/scripts.inc +++ b/data/maps/FourIsland_PokemonDayCare/scripts.inc @@ -8,32 +8,25 @@ FourIsland_PokemonDayCare_EventScript_DaycareWoman:: lock faceplayer specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_EGG_WAITING - goto_if_eq FourIsland_PokemonDayCare_EggWaiting - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq FourIsland_PokemonDayCare_OneMonInDaycare - compare VAR_RESULT, DAYCARE_TWO_MONS - goto_if_eq FourIsland_PokemonDayCare_TwoMonsInDaycare + goto_if_eq VAR_RESULT, DAYCARE_EGG_WAITING, FourIsland_PokemonDayCare_EggWaiting + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, FourIsland_PokemonDayCare_OneMonInDaycare + goto_if_eq VAR_RESULT, DAYCARE_TWO_MONS, FourIsland_PokemonDayCare_TwoMonsInDaycare msgbox DayCare_Text_WouldYouLikeUsToRaiseMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_PokemonDayCare_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, FourIsland_PokemonDayCare_GiveMonToRaise msgbox DayCare_Text_FineThenComeAgain release end FourIsland_PokemonDayCare_GiveMonToRaise:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 1 - goto_if_eq FourIsland_PokemonDayCare_OnlyOneMonInParty + goto_if_eq VAR_RESULT, 1, FourIsland_PokemonDayCare_OnlyOneMonInParty msgbox DayCare_Text_WhichMonShouldWeRaise fadescreen FADE_TO_BLACK special ChooseSendDaycareMon waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge FourIsland_PokemonDayCare_ComeAgain + goto_if_ge VAR_0x8004, PARTY_SIZE, FourIsland_PokemonDayCare_ComeAgain specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot - compare VAR_RESULT, 0 - goto_if_eq FourIsland_PokemonDayCare_OnlyOneAliveMonInParty + goto_if_eq VAR_RESULT, 0, FourIsland_PokemonDayCare_OnlyOneAliveMonInParty specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies waitse playmoncry VAR_0x8005, CRY_MODE_NORMAL @@ -42,8 +35,7 @@ FourIsland_PokemonDayCare_GiveMonToRaise:: special StoreSelectedPokemonInDaycare incrementgamestat GAME_STAT_USED_DAYCARE specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq FourIsland_PokemonDayCare_CanRaiseOneMore + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, FourIsland_PokemonDayCare_CanRaiseOneMore release end @@ -54,8 +46,7 @@ FourIsland_PokemonDayCare_ComeAgain:: FourIsland_PokemonDayCare_CanRaiseOneMore:: msgbox DayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_PokemonDayCare_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, FourIsland_PokemonDayCare_GiveMonToRaise goto FourIsland_PokemonDayCare_ComeAgain end @@ -80,8 +71,7 @@ FourIsland_PokemonDayCare_MonHasGrownXLevels:: FourIsland_PokemonDayCare_DisplayLevelsGained:: specialvar VAR_RESULT, GetNumLevelsGainedFromDaycare - compare VAR_RESULT, 0 - call_if_ne FourIsland_PokemonDayCare_MonHasGrownXLevels + call_if_ne VAR_RESULT, 0, FourIsland_PokemonDayCare_MonHasGrownXLevels return FourIsland_PokemonDayCare_OneMonInDaycare:: @@ -89,42 +79,35 @@ FourIsland_PokemonDayCare_OneMonInDaycare:: setvar VAR_0x8004, 0 call FourIsland_PokemonDayCare_DisplayLevelsGained msgbox DayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_PokemonDayCare_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, FourIsland_PokemonDayCare_GiveMonToRaise msgbox DayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_PokemonDayCare_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, FourIsland_PokemonDayCare_TryRetrieveMon goto FourIsland_PokemonDayCare_ComeAgain end FourIsland_PokemonDayCare_TryRetrieveMon:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, PARTY_SIZE - goto_if_eq FourIsland_PokemonDayCare_NoRoomInParty + goto_if_eq VAR_RESULT, PARTY_SIZE, FourIsland_PokemonDayCare_NoRoomInParty specialvar VAR_RESULT, GetDaycareState setvar VAR_0x8004, 0 - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq FourIsland_PokemonDayCare_CostPrompt + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, FourIsland_PokemonDayCare_CostPrompt special ShowDaycareLevelMenu waitstate copyvar VAR_0x8004, VAR_RESULT - compare VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU - goto_if_eq FourIsland_PokemonDayCare_ComeAgain + goto_if_eq VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU, FourIsland_PokemonDayCare_ComeAgain goto FourIsland_PokemonDayCare_CostPrompt end FourIsland_PokemonDayCare_CostPrompt:: special GetDaycareCost msgbox DayCare_Text_ItWillCostX, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_PokemonDayCare_CheckEnoughMoney + goto_if_eq VAR_RESULT, YES, FourIsland_PokemonDayCare_CheckEnoughMoney goto FourIsland_PokemonDayCare_ComeAgain end FourIsland_PokemonDayCare_CheckEnoughMoney:: specialvar VAR_RESULT, IsEnoughForCostInVar0x8005 - compare VAR_RESULT, TRUE - goto_if_eq FourIsland_PokemonDayCare_RetrieveMon + goto_if_eq VAR_RESULT, TRUE, FourIsland_PokemonDayCare_RetrieveMon msgbox DayCare_Text_NotEnoughMoney release end @@ -143,15 +126,13 @@ FourIsland_PokemonDayCare_RetrieveMon:: call EventScript_RestorePrevTextColor waitmoncry specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq FourIsland_PokemonDayCare_AskRetrieveOtherMon + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, FourIsland_PokemonDayCare_AskRetrieveOtherMon goto FourIsland_PokemonDayCare_ComeAgain end FourIsland_PokemonDayCare_AskRetrieveOtherMon:: msgbox DayCare_Text_TakeOtherOneBackToo, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_PokemonDayCare_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, FourIsland_PokemonDayCare_TryRetrieveMon goto FourIsland_PokemonDayCare_ComeAgain end @@ -193,8 +174,7 @@ FourIsland_PokemonDayCare_TwoMonsInDaycare:: setvar VAR_0x8004, 1 call FourIsland_PokemonDayCare_DisplayLevelsGained msgbox DayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FourIsland_PokemonDayCare_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, FourIsland_PokemonDayCare_TryRetrieveMon msgbox DayCare_Text_ComeAgain release end @@ -203,8 +183,7 @@ FourIsland_PokemonDayCare_TwoMonsInDaycare:: FourIsland_PokemonDayCare_EventScript_UnusedRetrieveMon:: special ShowDaycareLevelMenu waitstate - compare VAR_RESULT, 2 - goto_if_eq FourIsland_PokemonDayCare_ComeAgain + goto_if_eq VAR_RESULT, 2, FourIsland_PokemonDayCare_ComeAgain copyvar VAR_0x8004, VAR_RESULT specialvar VAR_RESULT, TakePokemonFromDaycare msgbox DayCare_Text_HeresYourMon diff --git a/data/maps/FuchsiaCity_Gym/scripts.inc b/data/maps/FuchsiaCity_Gym/scripts.inc index 059a5710a..86d0a1a7f 100644 --- a/data/maps/FuchsiaCity_Gym/scripts.inc +++ b/data/maps/FuchsiaCity_Gym/scripts.inc @@ -21,8 +21,7 @@ FuchsiaCity_Gym_EventScript_DefeatedKoga:: FuchsiaCity_Gym_EventScript_GiveTM06:: msgbox FuchsiaCity_Gym_Text_KogaExplainSoulBadge checkitemspace ITEM_TM06 - compare VAR_RESULT, FALSE - goto_if_eq FuchsiaCity_Gym_EventScript_NoRoomForTM06 + goto_if_eq VAR_RESULT, FALSE, FuchsiaCity_Gym_EventScript_NoRoomForTM06 giveitem_msg FuchsiaCity_Gym_Text_ReceivedTM06FromKoga, ITEM_TM06 setflag FLAG_GOT_TM06_FROM_KOGA msgbox FuchsiaCity_Gym_Text_KogaExplainTM06 diff --git a/data/maps/FuchsiaCity_House2/scripts.inc b/data/maps/FuchsiaCity_House2/scripts.inc index 9cda26e43..1b9d8be45 100644 --- a/data/maps/FuchsiaCity_House2/scripts.inc +++ b/data/maps/FuchsiaCity_House2/scripts.inc @@ -6,8 +6,7 @@ FuchsiaCity_House2_EventScript_FishingGurusBrother:: faceplayer goto_if_set FLAG_GOT_GOOD_ROD, FuchsiaCity_House2_EventScript_AlreadyGotGoodRod msgbox FuchsiaCity_House2_Text_DoYouLikeToFish, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FuchsiaCity_House2_EventScript_GiveGoodRod + goto_if_eq VAR_RESULT, YES, FuchsiaCity_House2_EventScript_GiveGoodRod msgbox FuchsiaCity_House2_Text_OhThatsDisappointing release end @@ -20,8 +19,7 @@ FuchsiaCity_House2_EventScript_AlreadyGotGoodRod:: FuchsiaCity_House2_EventScript_GiveGoodRod:: msgbox FuchsiaCity_House2_Text_LikeYourStyleTakeThis checkitemspace ITEM_GOOD_ROD - compare VAR_RESULT, FALSE - goto_if_eq FuchsiaCity_House2_EventScript_NoRoomForGoodRod + goto_if_eq VAR_RESULT, FALSE, FuchsiaCity_House2_EventScript_NoRoomForGoodRod giveitem_msg FuchsiaCity_House2_Text_ReceivedGoodRod, ITEM_GOOD_ROD msgbox FuchsiaCity_House2_Text_GoodRodCanCatchBetterMons setflag FLAG_GOT_GOOD_ROD diff --git a/data/maps/FuchsiaCity_House3/scripts.inc b/data/maps/FuchsiaCity_House3/scripts.inc index c22477162..07110433d 100644 --- a/data/maps/FuchsiaCity_House3/scripts.inc +++ b/data/maps/FuchsiaCity_House3/scripts.inc @@ -5,8 +5,7 @@ FuchsiaCity_House3_EventScript_MoveDeleter:: lock faceplayer msgbox FuchsiaCity_House3_Text_WouldYouLikeToForgetMove, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FuchsiaCity_House3_EventScript_ChooseMonForMoveDeleter + goto_if_eq VAR_RESULT, YES, FuchsiaCity_House3_EventScript_ChooseMonForMoveDeleter goto FuchsiaCity_House3_EventScript_CancelForgetMove end @@ -14,24 +13,19 @@ FuchsiaCity_House3_EventScript_ChooseMonForMoveDeleter:: msgbox FuchsiaCity_House3_Text_WhichMonShouldForgetMove special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge FuchsiaCity_House3_EventScript_CancelForgetMove + goto_if_ge VAR_0x8004, PARTY_SIZE, FuchsiaCity_House3_EventScript_CancelForgetMove special IsSelectedMonEgg - compare VAR_RESULT, TRUE - goto_if_eq FuchsiaCity_House3_EventScript_CantForgetMoveEgg + goto_if_eq VAR_RESULT, TRUE, FuchsiaCity_House3_EventScript_CantForgetMoveEgg special GetNumMovesSelectedMonHas - compare VAR_RESULT, 1 - goto_if_eq FuchsiaCity_House3_EventScript_CantForgetOnlyMove + goto_if_eq VAR_RESULT, 1, FuchsiaCity_House3_EventScript_CantForgetOnlyMove msgbox FuchsiaCity_House3_Text_WhichMoveShouldBeForgotten fadescreen FADE_TO_BLACK special SelectMoveDeleterMove fadescreen FADE_FROM_BLACK - compare VAR_0x8005, MAX_MON_MOVES - goto_if_eq FuchsiaCity_House3_EventScript_ChooseMonForMoveDeleter + goto_if_eq VAR_0x8005, MAX_MON_MOVES, FuchsiaCity_House3_EventScript_ChooseMonForMoveDeleter special BufferMoveDeleterNicknameAndMove msgbox FuchsiaCity_House3_Text_MonsMoveShouldBeForgotten, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FuchsiaCity_House3_EventScript_ForgetMove + goto_if_eq VAR_RESULT, YES, FuchsiaCity_House3_EventScript_ForgetMove goto FuchsiaCity_House3_EventScript_CancelForgetMove end diff --git a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc index bdffacca4..da846862a 100644 --- a/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc +++ b/data/maps/FuchsiaCity_SafariZone_Entrance/scripts.inc @@ -41,8 +41,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_ExitEarly:: lockall textcolor NPC_TEXT_COLOR_MALE msgbox FuchsiaCity_SafariZone_Entrance_Text_GoingToLeaveSafariZoneEarly, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_ReturnToSafariZone + goto_if_eq VAR_RESULT, NO, FuchsiaCity_SafariZone_Entrance_EventScript_ReturnToSafariZone msgbox FuchsiaCity_SafariZone_Entrance_Text_PleaseReturnSafariBalls closemessage applymovement OBJ_EVENT_ID_PLAYER, FuchsiaCity_SafariZone_Entrance_Movement_Exit @@ -105,8 +104,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_AskEnterSafariZone:: waitmovement 0 showmoneybox 0, 0 msgbox FuchsiaCity_SafariZone_Entrance_Text_PlaySafariGameFor500, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone + goto_if_eq VAR_RESULT, YES, FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone msgbox FuchsiaCity_SafariZone_Entrance_Text_OkayPleaseComeAgain goto FuchsiaCity_SafariZone_Entrance_EventScript_ForcePlayerBack end @@ -114,8 +112,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_AskEnterSafariZone:: FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone:: call FuchsiaCity_SafariZone_Entrance_EventScript_CheckSpaceForMons checkmoney 500 - compare VAR_RESULT, FALSE - goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, FuchsiaCity_SafariZone_Entrance_EventScript_NotEnoughMoney removemoney 500 updatemoneybox msgbox FuchsiaCity_SafariZone_Entrance_Text_ThatllBe500WeOnlyUseSpecialBalls @@ -127,12 +124,9 @@ FuchsiaCity_SafariZone_Entrance_EventScript_TryEnterSafariZone:: msgbox FuchsiaCity_SafariZone_Entrance_Text_CallYouOnPAWhenYouRunOut closemessage hidemoneybox - compare VAR_TEMP_2, 0 - call_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneMid - compare VAR_TEMP_2, 1 - call_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneRight - compare VAR_TEMP_2, 2 - call_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneLeft + call_if_eq VAR_TEMP_2, 0, FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneMid + call_if_eq VAR_TEMP_2, 1, FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneRight + call_if_eq VAR_TEMP_2, 2, FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneLeft special EnterSafariMode setvar VAR_MAP_SCENE_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE, 2 warp MAP_SAFARI_ZONE_CENTER, 255, 26, 30 @@ -156,11 +150,9 @@ FuchsiaCity_SafariZone_Entrance_EventScript_EnterSafariZoneLeft:: FuchsiaCity_SafariZone_Entrance_EventScript_CheckSpaceForMons:: getpartysize - compare VAR_RESULT, PARTY_SIZE - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, PARTY_SIZE, EventScript_Return specialvar VAR_RESULT, IsThereRoomInAnyBoxForMorePokemon - compare VAR_RESULT, TRUE - goto_if_eq EventScript_Return + goto_if_eq VAR_RESULT, TRUE, EventScript_Return msgbox SafariZone_Text_ExcuseMeYourPCBoxIsFull goto FuchsiaCity_SafariZone_Entrance_EventScript_ForcePlayerBack end @@ -203,8 +195,7 @@ FuchsiaCity_SafariZone_Entrance_EventScript_InfoAttendant:: lock faceplayer msgbox FuchsiaCity_SafariZone_Entrance_Text_FirstTimeAtSafariZone, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FuchsiaCity_SafariZone_Entrance_EventScript_ExplainSafariZone + goto_if_eq VAR_RESULT, YES, FuchsiaCity_SafariZone_Entrance_EventScript_ExplainSafariZone msgbox FuchsiaCity_SafariZone_Entrance_Text_SorryYoureARegularHere release end diff --git a/data/maps/FuchsiaCity_WardensHouse/scripts.inc b/data/maps/FuchsiaCity_WardensHouse/scripts.inc index 94eb1345d..b3f951881 100644 --- a/data/maps/FuchsiaCity_WardensHouse/scripts.inc +++ b/data/maps/FuchsiaCity_WardensHouse/scripts.inc @@ -7,10 +7,8 @@ FuchsiaCity_WardensHouse_EventScript_Warden:: goto_if_set FLAG_GOT_HM04, FuchsiaCity_WardensHouse_EventScript_ExplainStrength goto_if_set FLAG_HIDE_SAFARI_ZONE_WEST_GOLD_TEETH, FuchsiaCity_WardensHouse_EventScript_GiveGoldTeeth msgbox FuchsiaCity_WardensHouse_Text_HifFuffHefifoo, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq FuchsiaCity_WardensHouse_EventScript_WardenYes - compare VAR_RESULT, NO - call_if_eq FuchsiaCity_WardensHouse_EventScript_WardenNo + call_if_eq VAR_RESULT, YES, FuchsiaCity_WardensHouse_EventScript_WardenYes + call_if_eq VAR_RESULT, NO, FuchsiaCity_WardensHouse_EventScript_WardenNo release end @@ -23,10 +21,8 @@ FuchsiaCity_WardensHouse_EventScript_GiveGoldTeeth:: msgbox FuchsiaCity_WardensHouse_Text_WardenPoppedInHisTeeth call EventScript_RestorePrevTextColor checkplayergender - compare VAR_RESULT, MALE - call_if_eq FuchsiaCity_WardensHouse_EventScript_WardenThanksMale - compare VAR_RESULT, FEMALE - call_if_eq FuchsiaCity_WardensHouse_EventScript_WardenThanksFemale + call_if_eq VAR_RESULT, MALE, FuchsiaCity_WardensHouse_EventScript_WardenThanksMale + call_if_eq VAR_RESULT, FEMALE, FuchsiaCity_WardensHouse_EventScript_WardenThanksFemale giveitem_msg FuchsiaCity_WardensHouse_Text_ReceivedHM04FromWarden, ITEM_HM04 setflag FLAG_GOT_HM04 removeitem ITEM_GOLD_TEETH diff --git a/data/maps/IndigoPlateau_Exterior/scripts.inc b/data/maps/IndigoPlateau_Exterior/scripts.inc index 9f64c22a5..a3226e121 100644 --- a/data/maps/IndigoPlateau_Exterior/scripts.inc +++ b/data/maps/IndigoPlateau_Exterior/scripts.inc @@ -8,8 +8,7 @@ IndigoPlateau_Exterior_MapScripts:: IndigoPlateau_Exterior_OnTransition:: setworldmapflag FLAG_WORLD_MAP_INDIGO_PLATEAU_EXTERIOR - compare VAR_MAP_SCENE_INDIGO_PLATEAU_EXTERIOR, 1 - call_if_eq IndigoPlateau_Exterior_EventScript_PlayCreditsMusic + call_if_eq VAR_MAP_SCENE_INDIGO_PLATEAU_EXTERIOR, 1, IndigoPlateau_Exterior_EventScript_PlayCreditsMusic end IndigoPlateau_Exterior_EventScript_PlayCreditsMusic:: diff --git a/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc b/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc index 71f06da2d..bb6d74b5f 100644 --- a/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc +++ b/data/maps/IndigoPlateau_PokemonCenter_1F/scripts.inc @@ -8,8 +8,7 @@ IndigoPlateau_PokemonCenter_1F_MapScripts:: IndigoPlateau_PokemonCenter_1F_OnTransition:: setrespawn SPAWN_INDIGO_PLATEAU specialvar VAR_RESULT, IsNationalPokedexEnabled - compare VAR_RESULT, TRUE - call_if_eq IndigoPlateau_PokemonCenter_1F_EventScript_CheckBlockDoor + call_if_eq VAR_RESULT, TRUE, IndigoPlateau_PokemonCenter_1F_EventScript_CheckBlockDoor end IndigoPlateau_PokemonCenter_1F_EventScript_CheckBlockDoor:: @@ -21,8 +20,7 @@ IndigoPlateau_PokemonCenter_1F_EventScript_DoorGuard:: lock faceplayer specialvar VAR_RESULT, IsNationalPokedexEnabled - compare VAR_RESULT, TRUE - goto_if_eq IndigoPlateau_PokemonCenter_1F_EventScript_CheckSeviiIslandComplete + goto_if_eq VAR_RESULT, TRUE, IndigoPlateau_PokemonCenter_1F_EventScript_CheckSeviiIslandComplete msgbox IndigoPlateau_PokemonCenter_1F_Text_FaceEliteFourGoodLuck release end diff --git a/data/maps/LavenderTown/scripts.inc b/data/maps/LavenderTown/scripts.inc index 40f3b2146..4832d2d9d 100644 --- a/data/maps/LavenderTown/scripts.inc +++ b/data/maps/LavenderTown/scripts.inc @@ -12,8 +12,7 @@ LavenderTown_EventScript_LittleGirl:: lock faceplayer msgbox LavenderTown_Text_DoYouBelieveInGhosts, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LavenderTown_EventScript_LittleGirlBelieve + goto_if_eq VAR_RESULT, YES, LavenderTown_EventScript_LittleGirlBelieve msgbox LavenderTown_Text_JustImaginingWhiteHand release end diff --git a/data/maps/LavenderTown_House2/scripts.inc b/data/maps/LavenderTown_House2/scripts.inc index 6f8f7d350..8e353ecfc 100644 --- a/data/maps/LavenderTown_House2/scripts.inc +++ b/data/maps/LavenderTown_House2/scripts.inc @@ -5,20 +5,16 @@ LavenderTown_House2_EventScript_NameRater:: lock faceplayer msgbox LavenderTown_House2_Text_WantMeToRateNicknames, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LavenderTown_House2_EventScript_ChooseMon - compare VAR_RESULT, NO - goto_if_eq LavenderTown_House2_EventScript_DontRateNickname + goto_if_eq VAR_RESULT, YES, LavenderTown_House2_EventScript_ChooseMon + goto_if_eq VAR_RESULT, NO, LavenderTown_House2_EventScript_DontRateNickname end LavenderTown_House2_EventScript_ChooseMon:: msgbox LavenderTown_House2_Text_CritiqueWhichMonsNickname special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_lt LavenderTown_House2_EventScript_CheckCanRateMon - compare VAR_0x8004, PARTY_SIZE - goto_if_ge LavenderTown_House2_EventScript_DontRateNickname + goto_if_lt VAR_0x8004, PARTY_SIZE, LavenderTown_House2_EventScript_CheckCanRateMon + goto_if_ge VAR_0x8004, PARTY_SIZE, LavenderTown_House2_EventScript_DontRateNickname end LavenderTown_House2_EventScript_DontRateNickname:: @@ -28,21 +24,16 @@ LavenderTown_House2_EventScript_DontRateNickname:: LavenderTown_House2_EventScript_CheckCanRateMon:: specialvar VAR_RESULT, GetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq LavenderTown_House2_EventScript_CantNicknameEgg + goto_if_eq VAR_RESULT, SPECIES_EGG, LavenderTown_House2_EventScript_CantNicknameEgg special BufferMonNickname special IsMonOTIDNotPlayers - compare VAR_RESULT, TRUE - goto_if_eq LavenderTown_House2_EventScript_CantNicknameTradeMon + goto_if_eq VAR_RESULT, TRUE, LavenderTown_House2_EventScript_CantNicknameTradeMon specialvar VAR_RESULT, IsMonOTNameNotPlayers special BufferMonNickname - compare VAR_RESULT, TRUE - goto_if_eq LavenderTown_House2_EventScript_CantNicknameTradeMon + goto_if_eq VAR_RESULT, TRUE, LavenderTown_House2_EventScript_CantNicknameTradeMon msgbox LavenderTown_House2_Text_GiveItANicerName, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LavenderTown_House2_EventScript_ChooseNewNickname - compare VAR_RESULT, NO - goto_if_eq LavenderTown_House2_EventScript_DontRateNickname + goto_if_eq VAR_RESULT, YES, LavenderTown_House2_EventScript_ChooseNewNickname + goto_if_eq VAR_RESULT, NO, LavenderTown_House2_EventScript_DontRateNickname end LavenderTown_House2_EventScript_CantNicknameEgg:: @@ -60,8 +51,7 @@ LavenderTown_House2_EventScript_ChooseNewNickname:: call EventScript_ChangePokemonNickname specialvar VAR_RESULT, NameRaterWasNicknameChanged special BufferMonNickname - compare VAR_RESULT, TRUE - goto_if_eq LavenderTown_House2_EventScript_ChoseNewNickname + goto_if_eq VAR_RESULT, TRUE, LavenderTown_House2_EventScript_ChoseNewNickname msgbox LavenderTown_House2_Text_FromNowOnShallBeKnownAsSameName release end diff --git a/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc b/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc index 37d1ab7bc..2e31c8789 100644 --- a/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc +++ b/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc @@ -7,8 +7,7 @@ LavenderTown_VolunteerPokemonHouse_EventScript_MrFuji:: goto_if_set FLAG_GOT_POKE_FLUTE, LavenderTown_VolunteerPokemonHouse_EventScript_AlreadyHavePokeFlute msgbox LavenderTown_VolunteerPokemonHouse_Text_IdLikeYouToHaveThis checkitemspace ITEM_POKE_FLUTE - compare VAR_RESULT, FALSE - goto_if_eq LavenderTown_VolunteerPokemonHouse_EventScript_NoRoomForPokeFlute + goto_if_eq VAR_RESULT, FALSE, LavenderTown_VolunteerPokemonHouse_EventScript_NoRoomForPokeFlute setflag FLAG_GOT_POKE_FLUTE giveitem_msg LavenderTown_VolunteerPokemonHouse_Text_ReceivedPokeFluteFromMrFuji, ITEM_POKE_FLUTE, 1, MUS_OBTAIN_KEY_ITEM msgbox LavenderTown_VolunteerPokemonHouse_Text_ExplainPokeFlute diff --git a/data/maps/MtEmber_Exterior/scripts.inc b/data/maps/MtEmber_Exterior/scripts.inc index cc1215291..bca9934ee 100644 --- a/data/maps/MtEmber_Exterior/scripts.inc +++ b/data/maps/MtEmber_Exterior/scripts.inc @@ -8,8 +8,7 @@ MtEmber_Exterior_MapScripts:: MtEmber_Exterior_OnTransition:: setworldmapflag FLAG_WORLD_MAP_MT_EMBER_EXTERIOR - compare VAR_MAP_SCENE_MT_EMBER_EXTERIOR, 2 - call_if_eq MtEmber_Exterior_EventScript_RocketsFaceDown + call_if_eq VAR_MAP_SCENE_MT_EMBER_EXTERIOR, 2, MtEmber_Exterior_EventScript_RocketsFaceDown end MtEmber_Exterior_EventScript_RocketsFaceDown:: @@ -18,8 +17,7 @@ MtEmber_Exterior_EventScript_RocketsFaceDown:: return MtEmber_Exterior_OnLoad:: - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4 - call_if_ge MtEmber_Exterior_EventScript_OpenCave + call_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4, MtEmber_Exterior_EventScript_OpenCave end MtEmber_Exterior_EventScript_OpenCave:: @@ -29,8 +27,7 @@ MtEmber_Exterior_EventScript_OpenCave:: MtEmber_Exterior_EventScript_Grunt1:: lock goto_if_defeated TRAINER_TEAM_ROCKET_GRUNT_43, MtEmber_Exterior_EventScript_Grunt1Defeated - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4 - goto_if_eq MtEmber_Exterior_EventScript_BattleGrunt1 + goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4, MtEmber_Exterior_EventScript_BattleGrunt1 msgbox MtEmber_Exterior_Text_WellTryDiggingHere release end @@ -65,8 +62,7 @@ MtEmber_Exterior_EventScript_Grunt2:: lock faceplayer goto_if_defeated TRAINER_TEAM_ROCKET_GRUNT_44, MtEmber_Exterior_EventScript_DefeatedGrunt2 - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4 - goto_if_eq MtEmber_Exterior_EventScript_BattleGrunt2 + goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4, MtEmber_Exterior_EventScript_BattleGrunt2 msgbox MtEmber_Exterior_Text_YoureInTheWayGetLost closemessage applymovement LOCALID_GRUNT2, Movement_FaceOriginalDirection diff --git a/data/maps/MtEmber_Summit/scripts.inc b/data/maps/MtEmber_Summit/scripts.inc index fc59bb822..5cc41d7ad 100644 --- a/data/maps/MtEmber_Summit/scripts.inc +++ b/data/maps/MtEmber_Summit/scripts.inc @@ -9,8 +9,7 @@ MtEmber_Summit_OnResume:: MtEmber_Summit_EventScript_TryRemoveMoltres:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, EventScript_Return removeobject VAR_LAST_TALKED return @@ -41,12 +40,9 @@ MtEmber_Summit_EventScript_Moltres:: waitstate clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq MtEmber_Summit_EventScript_DefeatedMoltres - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq MtEmber_Summit_EventScript_RanFromMoltres - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq MtEmber_Summit_EventScript_RanFromMoltres + goto_if_eq VAR_RESULT, B_OUTCOME_WON, MtEmber_Summit_EventScript_DefeatedMoltres + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, MtEmber_Summit_EventScript_RanFromMoltres + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, MtEmber_Summit_EventScript_RanFromMoltres setflag FLAG_FOUGHT_MOLTRES release end diff --git a/data/maps/MtMoon_B2F/scripts.inc b/data/maps/MtMoon_B2F/scripts.inc index 03d461b44..201a9636f 100644 --- a/data/maps/MtMoon_B2F/scripts.inc +++ b/data/maps/MtMoon_B2F/scripts.inc @@ -58,8 +58,7 @@ MtMoon_B2F_EventScript_DomeFossil:: lock faceplayer msgbox MtMoon_B2F_Text_YouWantDomeFossil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MtMoon_B2F_EventScript_DontTakeFossil + goto_if_eq VAR_RESULT, NO, MtMoon_B2F_EventScript_DontTakeFossil removeobject LOCALID_DOME_FOSSIL giveitem_msg MtMoon_B2F_Text_ObtainedDomeFossil, ITEM_DOME_FOSSIL, 1, MUS_OBTAIN_KEY_ITEM closemessage @@ -90,8 +89,7 @@ MtMoon_B2F_EventScript_HelixFossil:: lock faceplayer msgbox MtMoon_B2F_Text_YouWantHelixFossil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MtMoon_B2F_EventScript_DontTakeFossil + goto_if_eq VAR_RESULT, NO, MtMoon_B2F_EventScript_DontTakeFossil removeobject LOCALID_HELIX_FOSSIL giveitem_msg MtMoon_B2F_Text_ObtainedHelixFossil, ITEM_HELIX_FOSSIL, 1, MUS_OBTAIN_KEY_ITEM closemessage diff --git a/data/maps/NavelRock_Base/scripts.inc b/data/maps/NavelRock_Base/scripts.inc index 1dee3d547..4919a5ac4 100644 --- a/data/maps/NavelRock_Base/scripts.inc +++ b/data/maps/NavelRock_Base/scripts.inc @@ -25,8 +25,7 @@ NavelRock_Base_OnResume:: NavelRock_Base_EventScript_TryRemoveLugia:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, EventScript_Return removeobject LOCALID_LUGIA return @@ -62,12 +61,9 @@ NavelRock_Base_EventScript_Lugia:: waitstate clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Base_EventScript_DefeatedLugia - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Base_EventScript_RanFromLugia - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Base_EventScript_RanFromLugia + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Base_EventScript_DefeatedLugia + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Base_EventScript_RanFromLugia + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NavelRock_Base_EventScript_RanFromLugia setflag FLAG_FOUGHT_LUGIA release end diff --git a/data/maps/NavelRock_Summit/scripts.inc b/data/maps/NavelRock_Summit/scripts.inc index 96df785a0..068f99a03 100644 --- a/data/maps/NavelRock_Summit/scripts.inc +++ b/data/maps/NavelRock_Summit/scripts.inc @@ -28,8 +28,7 @@ NavelRock_Summit_OnResume:: NavelRock_Summit_EventScript_TryRemoveHoOh:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, EventScript_Return removeobject LOCALID_HO_OH return @@ -67,12 +66,9 @@ NavelRock_Summit_EventScript_HoOh:: clearflag FLAG_SYS_SPECIAL_WILD_BATTLE setvar VAR_LAST_TALKED, LOCALID_HO_OH specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Summit_EventScript_DefeatedHoOh - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Summit_EventScript_RanFromHoOh - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Summit_EventScript_RanFromHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Summit_EventScript_DefeatedHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Summit_EventScript_RanFromHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NavelRock_Summit_EventScript_RanFromHoOh setflag FLAG_FOUGHT_HO_OH releaseall end diff --git a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc index 1b4c011b5..eb3c47d44 100644 --- a/data/maps/OneIsland_PokemonCenter_1F/scripts.inc +++ b/data/maps/OneIsland_PokemonCenter_1F/scripts.inc @@ -9,8 +9,7 @@ OneIsland_PokemonCenter_1F_MapScripts:: .byte 0 OneIsland_PokemonCenter_1F_OnLoad:: - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 - call_if_ge OneIsland_PokemonCenter_1F_EventScript_SetRubyMetatile + call_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, OneIsland_PokemonCenter_1F_EventScript_SetRubyMetatile call_if_set FLAG_SYS_CAN_LINK_WITH_RS, OneIsland_PokemonCenter_1F_EventScript_SetNetworkMachineOn end @@ -30,12 +29,9 @@ OneIsland_PokemonCenter_1F_EventScript_SetNetworkMachineOn:: OneIsland_PokemonCenter_1F_OnTransition:: setrespawn SPAWN_ONE_ISLAND - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6 - call_if_eq OneIsland_PokemonCenter_1F_EventScript_SetCelioQuestDone - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 0 - call_if_eq OneIsland_PokemonCenter_1F_EventScript_SetBillCelioFirstMeetingPos - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 2 - call_if_eq OneIsland_PokemonCenter_1F_EventScript_SetBillCelioReadyToLeavePos + call_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6, OneIsland_PokemonCenter_1F_EventScript_SetCelioQuestDone + call_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 0, OneIsland_PokemonCenter_1F_EventScript_SetBillCelioFirstMeetingPos + call_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 2, OneIsland_PokemonCenter_1F_EventScript_SetBillCelioReadyToLeavePos end OneIsland_PokemonCenter_1F_EventScript_SetCelioQuestDone:: @@ -111,10 +107,8 @@ OneIsland_PokemonCenter_1F_EventScript_MeetCelioScene:: msgbox OneIsland_PokemonCenter_1F_Text_CelioPleaseTakeThis giveitem_msg OneIsland_PokemonCenter_1F_Text_ObtainedTriPass, ITEM_TRI_PASS, 1, MUS_OBTAIN_KEY_ITEM msgbox OneIsland_PokemonCenter_1F_Text_PassLetsYouTravelBetweenIslands - compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2 - call_if_ge OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMapPage - compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2 - call_if_lt OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMap + call_if_ge VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2, OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMapPage + call_if_lt VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2, OneIsland_PokemonCenter_1F_EventScript_ReceiveTownMap setflag FLAG_SYS_SEVII_MAP_123 msgbox OneIsland_PokemonCenter_1F_Text_BillCatchYouLater closemessage @@ -207,21 +201,15 @@ OneIsland_PokemonCenter_1F_EventScript_BillGoTakeStroll:: OneIsland_PokemonCenter_1F_EventScript_Celio:: lock faceplayer - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 7 - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioGiveBillFact - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6 - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioJustGivenSapphire + goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 7, OneIsland_PokemonCenter_1F_EventScript_CelioGiveBillFact + goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 6, OneIsland_PokemonCenter_1F_EventScript_CelioJustGivenSapphire goto_if_set FLAG_RECOVERED_SAPPHIRE, OneIsland_PokemonCenter_1F_EventScript_GiveCelioSapphire - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_ExplainRainbowPass + goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, OneIsland_PokemonCenter_1F_EventScript_ExplainRainbowPass goto_if_set FLAG_GOT_RUBY, OneIsland_PokemonCenter_1F_EventScript_GiveCelioRuby - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4 - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioWaitingForRuby + goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 4, OneIsland_PokemonCenter_1F_EventScript_CelioWaitingForRuby specialvar VAR_RESULT, IsNationalPokedexEnabled - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioRequestRuby - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 3 - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_CelioPlayerMissingNationalDex + goto_if_eq VAR_RESULT, TRUE, OneIsland_PokemonCenter_1F_EventScript_CelioRequestRuby + goto_if_eq VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 3, OneIsland_PokemonCenter_1F_EventScript_CelioPlayerMissingNationalDex msgbox OneIsland_PokemonCenter_1F_Text_SorryForBeingPoorHost closemessage applymovement LOCALID_CELIO, Movement_FaceOriginalDirection @@ -232,10 +220,8 @@ OneIsland_PokemonCenter_1F_EventScript_Celio:: OneIsland_PokemonCenter_1F_EventScript_CelioGiveBillFact:: msgbox OneIsland_PokemonCenter_1F_Text_CelioHearingRumorsAboutYou random 3 - compare VAR_RESULT, 0 - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_BillFact1 - compare VAR_RESULT, 1 - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_BillFact2 + goto_if_eq VAR_RESULT, 0, OneIsland_PokemonCenter_1F_EventScript_BillFact1 + goto_if_eq VAR_RESULT, 1, OneIsland_PokemonCenter_1F_EventScript_BillFact2 famechecker FAMECHECKER_BILL, 5 msgbox OneIsland_PokemonCenter_1F_Text_BillCantStomachMilk release @@ -321,15 +307,13 @@ OneIsland_PokemonCenter_1F_EventScript_GiveCelioRuby:: applymovement LOCALID_CELIO, Movement_FacePlayer waitmovement 0 msgbox OneIsland_PokemonCenter_1F_Text_MayIAskOneMoreFavor, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio + goto_if_eq VAR_RESULT, NO, OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio goto OneIsland_PokemonCenter_1F_EventScript_GiveRainbowPass end OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio:: msgbox OneIsland_PokemonCenter_1F_Text_PleaseINeedYourHelp, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio + goto_if_eq VAR_RESULT, NO, OneIsland_PokemonCenter_1F_EventScript_DeclineHelpCelio goto OneIsland_PokemonCenter_1F_EventScript_GiveRainbowPass end @@ -460,14 +444,10 @@ OneIsland_PokemonCenter_1F_EventScript_LeaveOneIslandScene:: waitmovement 0 msgbox OneIsland_PokemonCenter_1F_Text_BillOhHeyPlayer closemessage - compare VAR_TEMP_1, 1 - call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillTop - compare VAR_TEMP_1, 2 - call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidTop - compare VAR_TEMP_1, 3 - call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidBottom - compare VAR_TEMP_1, 4 - call_if_eq OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillBottom + call_if_eq VAR_TEMP_1, 1, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillTop + call_if_eq VAR_TEMP_1, 2, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidTop + call_if_eq VAR_TEMP_1, 3, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillMidBottom + call_if_eq VAR_TEMP_1, 4, OneIsland_PokemonCenter_1F_EventScript_PlayerWalkToBillBottom delay 10 msgbox OneIsland_PokemonCenter_1F_Text_BillWeGotItDone applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestDown diff --git a/data/maps/PalletTown/scripts.inc b/data/maps/PalletTown/scripts.inc index 15ef22dc5..eff134734 100644 --- a/data/maps/PalletTown/scripts.inc +++ b/data/maps/PalletTown/scripts.inc @@ -11,16 +11,13 @@ PalletTown_MapScripts:: PalletTown_OnTransition:: setworldmapflag FLAG_WORLD_MAP_PALLET_TOWN call_if_set FLAG_PALLET_LADY_NOT_BLOCKING_SIGN, PalletTown_EventScript_TryReadySignLady - compare VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 0 - call_if_eq PalletTown_EventScript_SetSignLadyPos - compare VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1 - call_if_eq PalletTown_EventScript_SetSignLadyDone + call_if_eq VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 0, PalletTown_EventScript_SetSignLadyPos + call_if_eq VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1, PalletTown_EventScript_SetSignLadyDone end PalletTown_EventScript_TryReadySignLady:: goto_if_unset FLAG_OPENED_START_MENU, EventScript_Return - compare VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1 - goto_if_ge EventScript_Return + goto_if_ge VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1, EventScript_Return setvar VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1 return @@ -61,8 +58,7 @@ PalletTown_EventScript_OakRatingScene:: copyvar VAR_0x8009, VAR_0x8006 buffernumberstring STR_VAR_1, VAR_0x8008 buffernumberstring STR_VAR_2, VAR_0x8009 - compare VAR_0x8009, 60 - goto_if_lt PalletTown_EventScript_NotEnoughMonsForNationalDex + goto_if_lt VAR_0x8009, 60, PalletTown_EventScript_NotEnoughMonsForNationalDex msgbox PalletTown_Text_CaughtXImpressiveFollowMe closemessage playbgm MUS_FOLLOW_ME, 0 @@ -201,18 +197,14 @@ PalletTown_EventScript_OakTrigger:: waitmovement 0 delay 30 addobject LOCALID_PROF_OAK - compare VAR_TEMP_1, 0 - call_if_eq PalletTown_EventScript_OakEnterLeft - compare VAR_TEMP_1, 1 - call_if_eq PalletTown_EventScript_OakEnterRight + call_if_eq VAR_TEMP_1, 0, PalletTown_EventScript_OakEnterLeft + call_if_eq VAR_TEMP_1, 1, PalletTown_EventScript_OakEnterRight delay 30 msgbox PalletTown_Text_OakGrassUnsafeNeedMon closemessage delay 30 - compare VAR_TEMP_1, 0 - call_if_eq PalletTown_EventScript_OakLeadPlayerToLabLeft - compare VAR_TEMP_1, 1 - call_if_eq PalletTown_EventScript_OakLeadPlayerToLabRight + call_if_eq VAR_TEMP_1, 0, PalletTown_EventScript_OakLeadPlayerToLabLeft + call_if_eq VAR_TEMP_1, 1, PalletTown_EventScript_OakLeadPlayerToLabRight opendoor 16, 13 waitdooranim applymovement LOCALID_PROF_OAK, PalletTown_Movement_OakEnterLab @@ -335,12 +327,9 @@ PalletTown_Movement_PlayerEnterLab:: PalletTown_EventScript_SignLady:: lock - compare VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 2 - goto_if_eq PalletTown_EventScript_SignLadyDone - compare VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1 - goto_if_eq PalletTown_EventScript_SignLadyJustShowedSign - compare SIGN_LADY_READY, TRUE - goto_if_eq PalletTown_EventScript_SignLadyStartShowSign + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 2, PalletTown_EventScript_SignLadyDone + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_SIGN_LADY, 1, PalletTown_EventScript_SignLadyJustShowedSign + goto_if_eq SIGN_LADY_READY, TRUE, PalletTown_EventScript_SignLadyStartShowSign goto_if_set FLAG_TEMP_2, PalletTown_EventScript_SignLadyGoReadSign msgbox PalletTown_Text_HmmIsThatRight applymovement LOCALID_SIGN_LADY, Movement_FacePlayer @@ -352,10 +341,8 @@ PalletTown_EventScript_SignLady:: waitmovement 0 msgbox PalletTown_Text_OhLookLook closemessage - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_EventScript_SignLadyMoveOutOfWayRight - compare VAR_FACING, DIR_EAST - call_if_ne PalletTown_EventScript_SignLadyMoveOutOfWayLeft + call_if_eq VAR_FACING, DIR_EAST, PalletTown_EventScript_SignLadyMoveOutOfWayRight + call_if_ne VAR_FACING, DIR_EAST, PalletTown_EventScript_SignLadyMoveOutOfWayLeft copyobjectxytoperm LOCALID_SIGN_LADY setflag FLAG_TEMP_2 release diff --git a/data/maps/PalletTown_PlayersHouse_1F/scripts.inc b/data/maps/PalletTown_PlayersHouse_1F/scripts.inc index 00a622d3a..01028e6fb 100644 --- a/data/maps/PalletTown_PlayersHouse_1F/scripts.inc +++ b/data/maps/PalletTown_PlayersHouse_1F/scripts.inc @@ -8,10 +8,8 @@ PalletTown_PlayersHouse_1F_EventScript_Mom:: faceplayer goto_if_set FLAG_BEAT_RIVAL_IN_OAKS_LAB, PalletTown_PlayersHouse_1F_EventScript_MomHeal checkplayergender - compare VAR_RESULT, MALE - call_if_eq PalletTown_PlayersHouse_1F_EventScript_MomOakLookingForYouMale - compare VAR_RESULT, FEMALE - call_if_eq PalletTown_PlayersHouse_1F_EventScript_MomOakLookingForYouFemale + call_if_eq VAR_RESULT, MALE, PalletTown_PlayersHouse_1F_EventScript_MomOakLookingForYouMale + call_if_eq VAR_RESULT, FEMALE, PalletTown_PlayersHouse_1F_EventScript_MomOakLookingForYouFemale closemessage applymovement LOCALID_MOM, Movement_FaceOriginalDirection waitmovement 0 @@ -37,18 +35,15 @@ PalletTown_PlayersHouse_1F_EventScript_MomHeal:: @ Displays special text if interacted with from side or back (which are normally inaccessible) PalletTown_PlayersHouse_1F_EventScript_TV:: lockall - compare VAR_FACING, DIR_NORTH - goto_if_eq PalletTown_PlayersHouse_1F_EventScript_TVScreen + goto_if_eq VAR_FACING, DIR_NORTH, PalletTown_PlayersHouse_1F_EventScript_TVScreen msgbox PalletTown_PlayersHouse_1F_Text_OopsWrongSide releaseall end PalletTown_PlayersHouse_1F_EventScript_TVScreen:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq PalletTown_PlayersHouse_1F_EventScript_TVScreenMale - compare VAR_RESULT, FEMALE - call_if_eq PalletTown_PlayersHouse_1F_EventScript_TVScreenFemale + call_if_eq VAR_RESULT, MALE, PalletTown_PlayersHouse_1F_EventScript_TVScreenMale + call_if_eq VAR_RESULT, FEMALE, PalletTown_PlayersHouse_1F_EventScript_TVScreenFemale releaseall end diff --git a/data/maps/PalletTown_PlayersHouse_2F/scripts.inc b/data/maps/PalletTown_PlayersHouse_2F/scripts.inc index 2bfdc0654..a26d8588a 100644 --- a/data/maps/PalletTown_PlayersHouse_2F/scripts.inc +++ b/data/maps/PalletTown_PlayersHouse_2F/scripts.inc @@ -4,8 +4,7 @@ PalletTown_PlayersHouse_2F_MapScripts:: .byte 0 PalletTown_PlayersHouse_2F_OnTransition:: - compare VAR_MAP_SCENE_PALLET_TOWN_PLAYERS_HOUSE_2F, 0 - call_if_eq PalletTown_PlayersHouse_2F_EventScript_SetRespawn + call_if_eq VAR_MAP_SCENE_PALLET_TOWN_PLAYERS_HOUSE_2F, 0, PalletTown_PlayersHouse_2F_EventScript_SetRespawn end PalletTown_PlayersHouse_2F_EventScript_SetRespawn:: diff --git a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc index 4bb813827..69dd2c790 100644 --- a/data/maps/PalletTown_ProfessorOaksLab/scripts.inc +++ b/data/maps/PalletTown_ProfessorOaksLab/scripts.inc @@ -21,12 +21,9 @@ PalletTown_ProfessorOaksLab_MapScripts:: PalletTown_ProfessorOaksLab_OnTransition:: setflag FLAG_VISITED_OAKS_LAB - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 1 - call_if_eq PalletTown_ProfessorOaksLab_EventScript_ReadyOakForStarterScene - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 7 - call_if_eq PalletTown_ProfessorOaksLab_EventScript_ReadyOakForNationalDexScene - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 8 - call_if_eq PalletTown_ProfessorOaksLab_EventScript_SetNationalDexSceneFinished + call_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 1, PalletTown_ProfessorOaksLab_EventScript_ReadyOakForStarterScene + call_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 7, PalletTown_ProfessorOaksLab_EventScript_ReadyOakForNationalDexScene + call_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 8, PalletTown_ProfessorOaksLab_EventScript_SetNationalDexSceneFinished call_if_set FLAG_GOT_POKEBALLS_FROM_OAK_AFTER_22_RIVAL, PalletTown_ProfessorOaksLab_EventScript_SetSkipPokeBallCheck end @@ -80,33 +77,23 @@ PalletTown_ProfessorOaksLab_EventScript_EnterForNationalDexScene:: @ 8169002 PalletTown_ProfessorOaksLab_EventScript_NationalDexScene:: msgbox PalletTown_ProfessorOaksLab_Text_OakSightingsOfRareMons closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterEastWest - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterEastWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterEastWest + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_NationalDexSceneRivalEnterEastWest msgbox PalletTown_ProfessorOaksLab_Text_RivalJustLetMeHandleEverything fadedefaultbgm msgbox PalletTown_ProfessorOaksLab_Text_OakNeedYourHelpTooNeedToSeePokedexes - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_PlayerFaceOakNorth - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_PlayerFaceOakWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_PlayerFaceOakNorth + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_PlayerFaceOakWest textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PalletTown_ProfessorOaksLab_Text_OakTookBothPokedexUnits closemessage call EventScript_RestorePrevTextColor - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskEast - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskEast + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesToDeskWest addobject LOCALID_POKEDEX_1 addobject LOCALID_POKEDEX_2 delay 30 @@ -115,14 +102,10 @@ PalletTown_ProfessorOaksLab_EventScript_NationalDexScene:: removeobject LOCALID_POKEDEX_1 removeobject LOCALID_POKEDEX_2 delay 30 - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverEast - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverEast + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverWest textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM message PalletTown_ProfessorOaksLab_Text_PlayersPokedexWasUpgraded @@ -134,14 +117,10 @@ PalletTown_ProfessorOaksLab_EventScript_NationalDexScene:: msgbox PalletTown_ProfessorOaksLab_Text_RivalIllCompleteThePokedex closemessage playbgm MUS_RIVAL_EXIT, 0 - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExitNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExit - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExit - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExit + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_RivalExitNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_RivalExit + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_RivalExit + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_RivalExit removeobject LOCALID_RIVAL fadedefaultbgm setvar VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 8 @@ -325,12 +304,9 @@ PalletTown_ProfessorOaksLab_EventScript_RivalBattle:: closemessage applymovement LOCALID_PROF_OAK, Movement_FaceDown waitmovement 0 - compare VAR_STARTER_MON, 0 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmander - compare VAR_STARTER_MON, 1 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaur - compare VAR_STARTER_MON, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtle + goto_if_eq VAR_STARTER_MON, 0, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmander + goto_if_eq VAR_STARTER_MON, 1, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaur + goto_if_eq VAR_STARTER_MON, 2, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtle end @ The scripts for the rival approaching the player for battle are a bit bloated because @@ -338,12 +314,9 @@ PalletTown_ProfessorOaksLab_EventScript_RivalBattle:: @ NOTE: Names below refer to the Rival's mon (e.g. for RivalBattleSquirtle, player has Charmander) PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtle:: - compare VAR_TEMP_2, 1 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtleLeft - compare VAR_TEMP_2, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtleMid - compare VAR_TEMP_2, 3 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtleRight + goto_if_eq VAR_TEMP_2, 1, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtleLeft + goto_if_eq VAR_TEMP_2, 2, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtleMid + goto_if_eq VAR_TEMP_2, 3, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtleRight end PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleSquirtleLeft:: @@ -394,12 +367,9 @@ PalletTown_ProfessorOaksLab_Movement_RivalApproachForBattleSquirtleRight:: step_end PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmander:: - compare VAR_TEMP_2, 1 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmanderLeft - compare VAR_TEMP_2, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmanderMid - compare VAR_TEMP_2, 3 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmanderRight + goto_if_eq VAR_TEMP_2, 1, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmanderLeft + goto_if_eq VAR_TEMP_2, 2, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmanderMid + goto_if_eq VAR_TEMP_2, 3, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmanderRight end PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleCharmanderLeft:: @@ -453,12 +423,9 @@ PalletTown_ProfessorOaksLab_Movement_ApproachForBattleCharmanderRight:: step_end PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaur:: - compare VAR_TEMP_2, 1 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaurLeft - compare VAR_TEMP_2, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaurMid - compare VAR_TEMP_2, 3 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaurRight + goto_if_eq VAR_TEMP_2, 1, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaurLeft + goto_if_eq VAR_TEMP_2, 2, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaurMid + goto_if_eq VAR_TEMP_2, 3, PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaurRight end PalletTown_ProfessorOaksLab_EventScript_RivalApproachForBattleBulbasaurLeft:: @@ -510,12 +477,9 @@ PalletTown_ProfessorOaksLab_EventScript_EndRivalBattle:: msgbox PalletTown_ProfessorOaksLab_Text_RivalGoToughenMyMon closemessage playbgm MUS_RIVAL_EXIT, 0 - compare VAR_TEMP_2, 1 - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExitAfterBattleLeft - compare VAR_TEMP_2, 2 - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExitAfterBattleMid - compare VAR_TEMP_2, 3 - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExitAfterBattleRight + call_if_eq VAR_TEMP_2, 1, PalletTown_ProfessorOaksLab_EventScript_RivalExitAfterBattleLeft + call_if_eq VAR_TEMP_2, 2, PalletTown_ProfessorOaksLab_EventScript_RivalExitAfterBattleMid + call_if_eq VAR_TEMP_2, 3, PalletTown_ProfessorOaksLab_EventScript_RivalExitAfterBattleRight removeobject LOCALID_RIVAL playse SE_EXIT fadedefaultbgm @@ -592,10 +556,8 @@ PalletTown_ProfessorOaksLab_Movement_PlayerWatchRivalExitAfterBattleRight:: PalletTown_ProfessorOaksLab_EventScript_Rival:: lock faceplayer - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalChoseStarter - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalWaitingForStarter + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3, PalletTown_ProfessorOaksLab_EventScript_RivalChoseStarter + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2, PalletTown_ProfessorOaksLab_EventScript_RivalWaitingForStarter msgbox PalletTown_ProfessorOaksLab_Text_RivalGrampsIsntAround release end @@ -614,21 +576,14 @@ PalletTown_ProfessorOaksLab_EventScript_ProfOak:: lock faceplayer goto_if_set SHOWED_OAK_COMPLETE_DEX, PalletTown_ProfessorOaksLab_EventScript_OakJustShownCompleteDex - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 9 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RatePokedex - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 8 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 9, PalletTown_ProfessorOaksLab_EventScript_RatePokedex + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 8, PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait goto_if_set FLAG_SYS_GAME_CLEAR, PalletTown_ProfessorOaksLab_EventScript_TryStartNationalDexScene - compare VAR_MAP_SCENE_CERULEAN_CITY_RIVAL, 1 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RatePokedex - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 6 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RatePokedexOrTryGiveBalls - compare VAR_MAP_SCENE_VIRIDIAN_CITY_MART, 1 - goto_if_ge PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 4 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBattleMonForItToGrow - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_OakCanReachNextTownWithMon + goto_if_eq VAR_MAP_SCENE_CERULEAN_CITY_RIVAL, 1, PalletTown_ProfessorOaksLab_EventScript_RatePokedex + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 6, PalletTown_ProfessorOaksLab_EventScript_RatePokedexOrTryGiveBalls + goto_if_ge VAR_MAP_SCENE_VIRIDIAN_CITY_MART, 1, PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 4, PalletTown_ProfessorOaksLab_EventScript_OakBattleMonForItToGrow + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3, PalletTown_ProfessorOaksLab_EventScript_OakCanReachNextTownWithMon msgbox PalletTown_ProfessorOaksLab_Text_OakWhichOneWillYouChoose release end @@ -661,14 +616,10 @@ PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: playbgm MUS_ENCOUNTER_RIVAL, 0 msgbox PalletTown_ProfessorOaksLab_Text_RivalGramps closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterEastWest - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterEastWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterEastWest + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalEnterEastWest fadedefaultbgm msgbox PalletTown_ProfessorOaksLab_Text_RivalWhatDidYouCallMeFor closemessage @@ -678,24 +629,16 @@ PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: waitmovement 0 applymovement LOCALID_PROF_OAK, Movement_Delay48 waitmovement 0 - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalEast - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalWest - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalEast + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakFacePlayerAndRivalNorth msgbox PalletTown_ProfessorOaksLab_Text_OakHaveRequestForYouTwo closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskEast - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskEast + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_DexSceneOakWalkToDeskWest msgbox PalletTown_ProfessorOaksLab_Text_OakPokedexOnDesk closemessage delay 40 @@ -707,14 +650,10 @@ PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: delay 10 removeobject LOCALID_POKEDEX_2 delay 25 - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverEast - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverEast + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_OakBringDexesOverWest delay 10 textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM @@ -731,25 +670,17 @@ PalletTown_ProfessorOaksLab_EventScript_ReceiveDexScene:: famechecker FAMECHECKER_OAK, 1 msgbox PalletTown_ProfessorOaksLab_Text_OakCompleteMonGuideWasMyDream msgbox PalletTown_ProfessorOaksLab_Text_RivalLeaveItToMeGramps - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerEastWest - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerEastWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerEastWest + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_DexSceneRivalFacePlayerEastWest msgbox PalletTown_ProfessorOaksLab_Text_RivalTellSisNotToGiveYouMap closemessage playbgm MUS_RIVAL_EXIT, 0 - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExitNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExit - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExit - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalExit + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_RivalExitNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_RivalExit + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_RivalExit + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_RivalExit removeobject LOCALID_RIVAL fadedefaultbgm setvar VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 6 @@ -854,8 +785,7 @@ PalletTown_ProfessorOaksLab_EventScript_RatePokedexOrTryGiveBalls:: copyvar VAR_0x8009, VAR_0x8006 buffernumberstring STR_VAR_1, VAR_0x8008 buffernumberstring STR_VAR_2, VAR_0x8009 - compare VAR_0x8009, 1 @ Player only has starter - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls + goto_if_eq VAR_0x8009, 1, PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls @ Player only has starter goto PalletTown_ProfessorOaksLab_EventScript_RatePokedex end @@ -870,14 +800,10 @@ PalletTown_ProfessorOaksLab_EventScript_DexCompleted:: delay 40 message PokedexRating_Text_Wroooaaarrr waitmessage - compare VAR_FACING, DIR_NORTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakExcitedNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakExcitedSouth - compare VAR_FACING, DIR_EAST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakExcitedEast - compare VAR_FACING, DIR_WEST - call_if_eq PalletTown_ProfessorOaksLab_EventScript_OakExcitedWest + call_if_eq VAR_FACING, DIR_NORTH, PalletTown_ProfessorOaksLab_EventScript_OakExcitedNorth + call_if_eq VAR_FACING, DIR_SOUTH, PalletTown_ProfessorOaksLab_EventScript_OakExcitedSouth + call_if_eq VAR_FACING, DIR_EAST, PalletTown_ProfessorOaksLab_EventScript_OakExcitedEast + call_if_eq VAR_FACING, DIR_WEST, PalletTown_ProfessorOaksLab_EventScript_OakExcitedWest applymovement LOCALID_PROF_OAK, Movement_FacePlayer waitmovement 0 closemessage @@ -986,8 +912,7 @@ Movement_1699C5: PalletTown_ProfessorOaksLab_EventScript_TryStartNationalDexScene:: call PokedexRating_EventScript_RateInPerson closemessage - compare VAR_0x8009, 60 - goto_if_lt PalletTown_ProfessorOaksLab_EventScript_DontStartNationalDexScene + goto_if_lt VAR_0x8009, 60, PalletTown_ProfessorOaksLab_EventScript_DontStartNationalDexScene goto_if_unset FLAG_WORLD_MAP_ONE_ISLAND, PalletTown_ProfessorOaksLab_EventScript_DontStartNationalDexScene delay 30 msgbox PalletTown_ProfessorOaksLab_Text_OakFavorToAskYouPlayer @@ -1004,14 +929,12 @@ PalletTown_ProfessorOaksLab_EventScript_CheckIfPlayerNeedsBalls:: goto_if_set FLAG_OAK_SKIP_22_RIVAL_CHECK, PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait goto_if_set FLAG_GOT_POKEBALLS_FROM_OAK_AFTER_22_RIVAL, PalletTown_ProfessorOaksLab_EventScript_PlayerAlreadyGotBalls checkitem ITEM_POKE_BALL - compare VAR_RESULT, FALSE - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_PlayerOutOfBalls + goto_if_eq VAR_RESULT, FALSE, PalletTown_ProfessorOaksLab_EventScript_PlayerOutOfBalls goto PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait end PalletTown_ProfessorOaksLab_EventScript_PlayerOutOfBalls:: - compare VAR_MAP_SCENE_ROUTE22, 2 - goto_if_ge PalletTown_ProfessorOaksLab_EventScript_GivePlayerMoreBalls + goto_if_ge VAR_MAP_SCENE_ROUTE22, 2, PalletTown_ProfessorOaksLab_EventScript_GivePlayerMoreBalls goto PalletTown_ProfessorOaksLab_EventScript_MonsAroundWorldWait end @@ -1158,10 +1081,8 @@ PalletTown_ProfessorOaksLab_EventScript_BulbasaurBall:: setvar PLAYER_STARTER_SPECIES, SPECIES_BULBASAUR setvar RIVAL_STARTER_SPECIES, SPECIES_CHARMANDER setvar RIVAL_STARTER_ID, LOCALID_CHARMANDER_BALL - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3 - goto_if_ge PalletTown_ProfessorOaksLab_EventScript_LastPokeBall - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice + goto_if_ge VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3, PalletTown_ProfessorOaksLab_EventScript_LastPokeBall + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2, PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice msgbox PalletTown_ProfessorOaksLab_Text_ThoseArePokeBalls release end @@ -1171,36 +1092,27 @@ PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice:: waitmovement 0 showmonpic PLAYER_STARTER_SPECIES, 10, 3 textcolor NPC_TEXT_COLOR_MALE - compare PLAYER_STARTER_NUM, 0 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmBulbasaur - compare PLAYER_STARTER_NUM, 1 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmSquirtle - compare PLAYER_STARTER_NUM, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmCharmander + goto_if_eq PLAYER_STARTER_NUM, 0, PalletTown_ProfessorOaksLab_EventScript_ConfirmBulbasaur + goto_if_eq PLAYER_STARTER_NUM, 1, PalletTown_ProfessorOaksLab_EventScript_ConfirmSquirtle + goto_if_eq PLAYER_STARTER_NUM, 2, PalletTown_ProfessorOaksLab_EventScript_ConfirmCharmander end PalletTown_ProfessorOaksLab_EventScript_ConfirmBulbasaur:: msgbox PalletTown_ProfessorOaksLab_Text_OakChoosingBulbasaur, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ChoseStarter - compare VAR_RESULT, NO - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter + goto_if_eq VAR_RESULT, YES, PalletTown_ProfessorOaksLab_EventScript_ChoseStarter + goto_if_eq VAR_RESULT, NO, PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter end PalletTown_ProfessorOaksLab_EventScript_ConfirmSquirtle:: msgbox PalletTown_ProfessorOaksLab_Text_OakChoosingSquirtle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ChoseStarter - compare VAR_RESULT, NO - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter + goto_if_eq VAR_RESULT, YES, PalletTown_ProfessorOaksLab_EventScript_ChoseStarter + goto_if_eq VAR_RESULT, NO, PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter end PalletTown_ProfessorOaksLab_EventScript_ConfirmCharmander:: msgbox PalletTown_ProfessorOaksLab_Text_OakChoosingCharmander, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ChoseStarter - compare VAR_RESULT, NO - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter + goto_if_eq VAR_RESULT, YES, PalletTown_ProfessorOaksLab_EventScript_ChoseStarter + goto_if_eq VAR_RESULT, NO, PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter end PalletTown_ProfessorOaksLab_EventScript_DeclinedStarter:: @@ -1223,10 +1135,8 @@ PalletTown_ProfessorOaksLab_EventScript_ChoseStarter:: playfanfare MUS_OBTAIN_KEY_ITEM waitfanfare msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_GiveNicknameToStarter - compare VAR_RESULT, NO - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalPicksStarter + goto_if_eq VAR_RESULT, YES, EventScript_GiveNicknameToStarter + goto_if_eq VAR_RESULT, NO, PalletTown_ProfessorOaksLab_EventScript_RivalPicksStarter end EventScript_GiveNicknameToStarter:: @@ -1237,12 +1147,9 @@ EventScript_GiveNicknameToStarter:: PalletTown_ProfessorOaksLab_EventScript_RivalPicksStarter:: closemessage - compare PLAYER_STARTER_NUM, 0 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalWalksToCharmander - compare PLAYER_STARTER_NUM, 1 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalWalksToBulbasaur - compare PLAYER_STARTER_NUM, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_RivalWalksToSquirtle + goto_if_eq PLAYER_STARTER_NUM, 0, PalletTown_ProfessorOaksLab_EventScript_RivalWalksToCharmander + goto_if_eq PLAYER_STARTER_NUM, 1, PalletTown_ProfessorOaksLab_EventScript_RivalWalksToBulbasaur + goto_if_eq PLAYER_STARTER_NUM, 2, PalletTown_ProfessorOaksLab_EventScript_RivalWalksToSquirtle end PalletTown_ProfessorOaksLab_EventScript_RivalWalksToCharmander:: @@ -1317,10 +1224,8 @@ PalletTown_ProfessorOaksLab_EventScript_SquirtleBall:: setvar PLAYER_STARTER_SPECIES, SPECIES_SQUIRTLE setvar RIVAL_STARTER_SPECIES, SPECIES_BULBASAUR setvar RIVAL_STARTER_ID, LOCALID_BULBASAUR_BALL - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3 - goto_if_ge PalletTown_ProfessorOaksLab_EventScript_LastPokeBall - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice + goto_if_ge VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3, PalletTown_ProfessorOaksLab_EventScript_LastPokeBall + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2, PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice msgbox PalletTown_ProfessorOaksLab_Text_ThoseArePokeBalls release end @@ -1332,10 +1237,8 @@ PalletTown_ProfessorOaksLab_EventScript_CharmanderBall:: setvar PLAYER_STARTER_SPECIES, SPECIES_CHARMANDER setvar RIVAL_STARTER_SPECIES, SPECIES_SQUIRTLE setvar RIVAL_STARTER_ID, LOCALID_SQUIRTLE_BALL - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3 - goto_if_ge PalletTown_ProfessorOaksLab_EventScript_LastPokeBall - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2 - goto_if_eq PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice + goto_if_ge VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 3, PalletTown_ProfessorOaksLab_EventScript_LastPokeBall + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 2, PalletTown_ProfessorOaksLab_EventScript_ConfirmStarterChoice msgbox PalletTown_ProfessorOaksLab_Text_ThoseArePokeBalls release end @@ -1395,8 +1298,7 @@ PalletTown_ProfessorOaksLab_EventScript_LeftSign:: PalletTown_ProfessorOaksLab_EventScript_RightSign:: lockall - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 6 - goto_if_ge PalletTown_ProfessorOaksLab_EventScript_RightSignAlt + goto_if_ge VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 6, PalletTown_ProfessorOaksLab_EventScript_RightSignAlt msgbox PalletTown_ProfessorOaksLab_Text_SaveOptionInMenu releaseall end diff --git a/data/maps/PalletTown_RivalsHouse/scripts.inc b/data/maps/PalletTown_RivalsHouse/scripts.inc index d7593eff3..17eeef81e 100644 --- a/data/maps/PalletTown_RivalsHouse/scripts.inc +++ b/data/maps/PalletTown_RivalsHouse/scripts.inc @@ -8,10 +8,8 @@ PalletTown_RivalsHouse_MapScripts:: .byte 0 PalletTown_RivalsHouse_OnTransition:: - compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2 - call_if_lt PalletTown_RivalsHouse_EventScript_MoveDaisyToTable - compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2 - call_if_ge PalletTown_RivalsHouse_EventScript_AlreadyReceivedTownMap + call_if_lt VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2, PalletTown_RivalsHouse_EventScript_MoveDaisyToTable + call_if_ge VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2, PalletTown_RivalsHouse_EventScript_AlreadyReceivedTownMap end PalletTown_RivalsHouse_EventScript_MoveDaisyToTable:: @@ -28,14 +26,10 @@ PalletTown_RivalsHouse_EventScript_Daisy:: faceplayer famechecker FAMECHECKER_DAISY, FCPICKSTATE_COLORED, UpdatePickStateFromSpecialVar8005 goto_if_set FLAG_SYS_GAME_CLEAR, PalletTown_RivalsHouse_EventScript_GroomMon - compare RECEIVED_TOWN_MAP, TRUE - goto_if_eq PalletTown_RivalsHouse_EventScript_PleaseGiveMonsRest - compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2 - goto_if_eq PalletTown_RivalsHouse_EventScript_ExplainTownMap - compare VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 1 - goto_if_eq PalletTown_RivalsHouse_EventScript_GiveTownMap - compare VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 1 - goto_if_ge PalletTown_RivalsHouse_EventScript_HeardBattledRival + goto_if_eq RECEIVED_TOWN_MAP, TRUE, PalletTown_RivalsHouse_EventScript_PleaseGiveMonsRest + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 2, PalletTown_RivalsHouse_EventScript_ExplainTownMap + goto_if_eq VAR_MAP_SCENE_PALLET_TOWN_RIVALS_HOUSE, 1, PalletTown_RivalsHouse_EventScript_GiveTownMap + goto_if_ge VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB, 1, PalletTown_RivalsHouse_EventScript_HeardBattledRival msgbox PalletTown_RivalsHouse_Text_HiBrothersAtLab closemessage applymovement LOCALID_DAISY, Movement_FaceOriginalDirection @@ -51,21 +45,17 @@ PalletTown_RivalsHouse_EventScript_HeardBattledRival:: PalletTown_RivalsHouse_EventScript_GroomMon:: goto_if_questlog EventScript_ReleaseEnd special QuestLog_CutRecording - compare VAR_MASSAGE_COOLDOWN_STEP_COUNTER, 500 - goto_if_lt PalletTown_RivalsHouse_EventScript_RateMonFriendship + goto_if_lt VAR_MASSAGE_COOLDOWN_STEP_COUNTER, 500, PalletTown_RivalsHouse_EventScript_RateMonFriendship msgbox PalletTown_RivalsHouse_Text_LikeMeToGroomMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq PalletTown_RivalsHouse_EventScript_DeclineGrooming + goto_if_eq VAR_RESULT, NO, PalletTown_RivalsHouse_EventScript_DeclineGrooming msgbox PalletTown_RivalsHouse_Text_GroomWhichOne special ChoosePartyMon waitstate lock faceplayer - compare VAR_0x8004, PARTY_SIZE - goto_if_ge PalletTown_RivalsHouse_EventScript_DeclineGrooming + goto_if_ge VAR_0x8004, PARTY_SIZE, PalletTown_RivalsHouse_EventScript_DeclineGrooming specialvar VAR_RESULT, GetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq PalletTown_RivalsHouse_EventScript_CantGroomEgg + goto_if_eq VAR_RESULT, SPECIES_EGG, PalletTown_RivalsHouse_EventScript_CantGroomEgg msgbox PalletTown_RivalsHouse_Text_LookingNiceInNoTime closemessage fadescreen FADE_TO_BLACK @@ -145,8 +135,7 @@ PalletTown_RivalsHouse_EventScript_GiveTownMap:: msgbox PalletTown_RivalsHouse_Text_ErrandForGrandpaThisWillHelp closemessage checkitemspace ITEM_TOWN_MAP - compare VAR_RESULT, FALSE - goto_if_eq PalletTown_RivalsHouse_EventScript_NoRoomForTownMap + goto_if_eq VAR_RESULT, FALSE, PalletTown_RivalsHouse_EventScript_NoRoomForTownMap applymovement LOCALID_DAISY, Movement_WalkInPlaceFastestRight waitmovement 0 removeobject LOCALID_TOWN_MAP diff --git a/data/maps/PewterCity/scripts.inc b/data/maps/PewterCity/scripts.inc index 6a85d889a..b79424090 100644 --- a/data/maps/PewterCity/scripts.inc +++ b/data/maps/PewterCity/scripts.inc @@ -19,8 +19,7 @@ PewterCity_EventScript_GymGuide:: msgbox PewterCity_Text_BrocksLookingForChallengersFollowMe closemessage playbgm MUS_FOLLOW_ME, 0 - compare VAR_FACING, DIR_EAST - call_if_eq PewterCity_EventScript_WalkToGymEast + call_if_eq VAR_FACING, DIR_EAST, PewterCity_EventScript_WalkToGymEast msgbox PewterCity_Text_GoTakeOnBrock closemessage applymovement LOCALID_GYM_GUIDE, PewterCity_Movement_GymGuideExit @@ -288,12 +287,9 @@ PewterCity_EventScript_GymGuideTrigger:: msgbox PewterCity_Text_BrocksLookingForChallengersFollowMe closemessage playbgm MUS_FOLLOW_ME, 0 - compare VAR_TEMP_1, 0 - call_if_eq PewterCity_EventScript_WalkToGymTop - compare VAR_TEMP_1, 1 - call_if_eq PewterCity_EventScript_WalkToGymMid - compare VAR_TEMP_1, 2 - call_if_eq PewterCity_EventScript_WalkToGymBottom + call_if_eq VAR_TEMP_1, 0, PewterCity_EventScript_WalkToGymTop + call_if_eq VAR_TEMP_1, 1, PewterCity_EventScript_WalkToGymMid + call_if_eq VAR_TEMP_1, 2, PewterCity_EventScript_WalkToGymBottom msgbox PewterCity_Text_GoTakeOnBrock closemessage applymovement LOCALID_GYM_GUIDE, PewterCity_Movement_GymGuideExit @@ -440,20 +436,15 @@ PewterCity_EventScript_MuseumGuide:: lock faceplayer msgbox PewterCity_Text_DidYouCheckOutMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PewterCity_EventScript_CheckedOutMuseum + goto_if_eq VAR_RESULT, YES, PewterCity_EventScript_CheckedOutMuseum msgbox PewterCity_Text_ReallyYouHaveToGo closemessage delay 10 playbgm MUS_FOLLOW_ME, 0 - compare VAR_FACING, DIR_NORTH - call_if_eq PewterCity_EventScript_LeadToMuseumNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq PewterCity_EventScript_LeadToMuseumSouth - compare VAR_FACING, DIR_WEST - call_if_eq PewterCity_EventScript_LeadToMuseumWest - compare VAR_FACING, DIR_EAST - call_if_eq PewterCity_EventScript_LeadToMuseumEast + call_if_eq VAR_FACING, DIR_NORTH, PewterCity_EventScript_LeadToMuseumNorth + call_if_eq VAR_FACING, DIR_SOUTH, PewterCity_EventScript_LeadToMuseumSouth + call_if_eq VAR_FACING, DIR_WEST, PewterCity_EventScript_LeadToMuseumWest + call_if_eq VAR_FACING, DIR_EAST, PewterCity_EventScript_LeadToMuseumEast msgbox PewterCity_Text_ThisIsTheMuseum closemessage delay 10 @@ -631,8 +622,7 @@ PewterCity_EventScript_BugCatcher:: lock faceplayer msgbox PewterCity_Text_DoYouKnowWhatImDoing, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PewterCity_EventScript_KnowWhatTheyreDoing + goto_if_eq VAR_RESULT, YES, PewterCity_EventScript_KnowWhatTheyreDoing msgbox PewterCity_Text_SprayingRepelToKeepWildMonsOut release end @@ -696,12 +686,9 @@ PewterCity_EventScript_RunningShoesAideTriggerBottom:: PewterCity_EventScript_AideGiveRunningShoes:: textcolor NPC_TEXT_COLOR_MALE - compare VAR_TEMP_1, 1 - call_if_eq PewterCity_EventScript_AideNoticePlayer - compare VAR_TEMP_1, 2 - call_if_eq PewterCity_EventScript_AideNoticePlayer - compare VAR_TEMP_1, 3 - call_if_eq PewterCity_EventScript_AideNoticePlayer + call_if_eq VAR_TEMP_1, 1, PewterCity_EventScript_AideNoticePlayer + call_if_eq VAR_TEMP_1, 2, PewterCity_EventScript_AideNoticePlayer + call_if_eq VAR_TEMP_1, 3, PewterCity_EventScript_AideNoticePlayer waitse playse SE_PIN applymovement LOCALID_AIDE, Movement_ExclamationMark @@ -709,14 +696,10 @@ PewterCity_EventScript_AideGiveRunningShoes:: applymovement LOCALID_AIDE, Movement_Delay48 waitmovement 0 msgbox PewterCity_Text_OhPlayer - compare VAR_TEMP_1, 0 - call_if_eq PewterCity_EventScript_AideApproachPlayer0 - compare VAR_TEMP_1, 1 - call_if_eq PewterCity_EventScript_AideApproachPlayer1 - compare VAR_TEMP_1, 2 - call_if_eq PewterCity_EventScript_AideApproachPlayer2 - compare VAR_TEMP_1, 3 - call_if_eq PewterCity_EventScript_AideApproachPlayer3 + call_if_eq VAR_TEMP_1, 0, PewterCity_EventScript_AideApproachPlayer0 + call_if_eq VAR_TEMP_1, 1, PewterCity_EventScript_AideApproachPlayer1 + call_if_eq VAR_TEMP_1, 2, PewterCity_EventScript_AideApproachPlayer2 + call_if_eq VAR_TEMP_1, 3, PewterCity_EventScript_AideApproachPlayer3 msgbox PewterCity_Text_AskedToDeliverThis textcolor NPC_TEXT_COLOR_NEUTRAL playfanfare MUS_OBTAIN_KEY_ITEM @@ -731,14 +714,10 @@ PewterCity_EventScript_AideGiveRunningShoes:: call EventScript_RestorePrevTextColor msgbox PewterCity_Text_MustBeGoingBackToLab closemessage - compare VAR_TEMP_1, 0 - call_if_eq PewterCity_EventScript_AideExit0 - compare VAR_TEMP_1, 1 - call_if_eq PewterCity_EventScript_AideExit1 - compare VAR_TEMP_1, 2 - call_if_eq PewterCity_EventScript_AideExit2 - compare VAR_TEMP_1, 3 - call_if_eq PewterCity_EventScript_AideExit3 + call_if_eq VAR_TEMP_1, 0, PewterCity_EventScript_AideExit0 + call_if_eq VAR_TEMP_1, 1, PewterCity_EventScript_AideExit1 + call_if_eq VAR_TEMP_1, 2, PewterCity_EventScript_AideExit2 + call_if_eq VAR_TEMP_1, 3, PewterCity_EventScript_AideExit3 delay 30 textcolor NPC_TEXT_COLOR_NEUTRAL msgbox PewterCity_Text_RunningShoesLetterFromMom diff --git a/data/maps/PewterCity_Gym/scripts.inc b/data/maps/PewterCity_Gym/scripts.inc index 95ed49e59..dfc7ed92d 100644 --- a/data/maps/PewterCity_Gym/scripts.inc +++ b/data/maps/PewterCity_Gym/scripts.inc @@ -23,8 +23,7 @@ PewterCity_Gym_EventScript_DefeatedBrock:: PewterCity_Gym_EventScript_GiveTM39:: msgbox PewterCity_Gym_Text_TakeThisWithYou checkitemspace ITEM_TM39 - compare VAR_RESULT, FALSE - goto_if_eq PewterCity_Gym_EventScript_NoRoomForTM39 + goto_if_eq VAR_RESULT, FALSE, PewterCity_Gym_EventScript_NoRoomForTM39 giveitem_msg PewterCity_Gym_Text_ReceivedTM39FromBrock, ITEM_TM39 setflag FLAG_GOT_TM39_FROM_BROCK msgbox PewterCity_Gym_Text_ExplainTM39 @@ -46,10 +45,8 @@ PewterCity_Gym_EventScript_GymGuy:: faceplayer goto_if_set FLAG_DEFEATED_BROCK, PewterCity_Gym_EventScript_GymGuyPostVictory msgbox PewterCity_Gym_Text_LetMeTakeYouToTheTop, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PewterCity_Gym_EventScript_GymGuyTakeMeToTop - compare VAR_RESULT, NO - goto_if_eq PewterCity_Gym_EventScript_GymGuyDontTakeMeToTop + goto_if_eq VAR_RESULT, YES, PewterCity_Gym_EventScript_GymGuyTakeMeToTop + goto_if_eq VAR_RESULT, NO, PewterCity_Gym_EventScript_GymGuyDontTakeMeToTop end PewterCity_Gym_EventScript_GymGuyPostVictory:: diff --git a/data/maps/PewterCity_Museum_1F/scripts.inc b/data/maps/PewterCity_Museum_1F/scripts.inc index 7317774a8..6410a53b4 100644 --- a/data/maps/PewterCity_Museum_1F/scripts.inc +++ b/data/maps/PewterCity_Museum_1F/scripts.inc @@ -7,22 +7,17 @@ PewterCity_Museum_1F_MapScripts:: PewterCity_Museum_1F_EventScript_Scientist1:: lock faceplayer - compare VAR_FACING, DIR_WEST - goto_if_eq PewterCity_Museum_1F_EventScript_Scientist1BehindCounter - compare VAR_FACING, DIR_SOUTH - goto_if_eq PewterCity_Museum_1F_EventScript_Scientist1BehindCounter - compare VAR_FACING, DIR_NORTH - goto_if_eq PewterCity_Museum_1F_EventScript_Scientist1BehindCounter + goto_if_eq VAR_FACING, DIR_WEST, PewterCity_Museum_1F_EventScript_Scientist1BehindCounter + goto_if_eq VAR_FACING, DIR_SOUTH, PewterCity_Museum_1F_EventScript_Scientist1BehindCounter + goto_if_eq VAR_FACING, DIR_NORTH, PewterCity_Museum_1F_EventScript_Scientist1BehindCounter msgbox PewterCity_Museum_1F_Text_PleaseEnjoyYourself release end PewterCity_Museum_1F_EventScript_Scientist1BehindCounter:: msgbox PewterCity_Museum_1F_Text_DoYouKnowWhatAmberIs, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PewterCity_Museum_1F_EventScript_AmberHasGeneticMatter - compare VAR_RESULT, NO - goto_if_eq PewterCity_Museum_1F_EventScript_ExplainAmber + goto_if_eq VAR_RESULT, YES, PewterCity_Museum_1F_EventScript_AmberHasGeneticMatter + goto_if_eq VAR_RESULT, NO, PewterCity_Museum_1F_EventScript_ExplainAmber end PewterCity_Museum_1F_EventScript_AmberHasGeneticMatter:: @@ -67,8 +62,7 @@ PewterCity_Museum_1F_EventScript_EntranceTrigger:: textcolor NPC_TEXT_COLOR_MALE showmoneybox 0, 0 msgbox PewterCity_Museum_1F_Text_Its50YForChildsTicket, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PewterCity_Museum_1F_EventScript_TryPayForTicket + goto_if_eq VAR_RESULT, YES, PewterCity_Museum_1F_EventScript_TryPayForTicket msgbox PewterCity_Museum_1F_Text_ComeAgain closemessage hidemoneybox @@ -79,15 +73,11 @@ PewterCity_Museum_1F_EventScript_EntranceTrigger:: PewterCity_Museum_1F_EventScript_TryPayForTicket:: checkmoney 50 - compare VAR_RESULT, FALSE - goto_if_eq PewterCity_Museum_1F_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, PewterCity_Museum_1F_EventScript_NotEnoughMoney closemessage - compare VAR_TEMP_1, 0 - call_if_eq PewterCity_Museum_1F_EventScript_PlayerApproachCounterLeft - compare VAR_TEMP_1, 1 - call_if_eq PewterCity_Museum_1F_EventScript_PlayerApproachCounterMid - compare VAR_TEMP_1, 2 - call_if_eq PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight + call_if_eq VAR_TEMP_1, 0, PewterCity_Museum_1F_EventScript_PlayerApproachCounterLeft + call_if_eq VAR_TEMP_1, 1, PewterCity_Museum_1F_EventScript_PlayerApproachCounterMid + call_if_eq VAR_TEMP_1, 2, PewterCity_Museum_1F_EventScript_PlayerApproachCounterRight playse SE_SHOP removemoney 50 updatemoneybox @@ -158,8 +148,7 @@ PewterCity_Museum_1F_EventScript_OldAmberScientist:: goto_if_set FLAG_GOT_OLD_AMBER, PewterCity_Museum_1F_EventScript_AlreadyGotOldAmber msgbox PewterCity_Museum_1F_Text_WantYouToGetAmberExamined checkitemspace ITEM_OLD_AMBER - compare VAR_RESULT, FALSE - goto_if_eq PewterCity_Museum_1F_EventScript_NoRoomForOldAmber + goto_if_eq VAR_RESULT, FALSE, PewterCity_Museum_1F_EventScript_NoRoomForOldAmber setflag FLAG_GOT_OLD_AMBER removeobject LOCALID_OLD_AMBER giveitem_msg PewterCity_Museum_1F_Text_ReceivedOldAmberFromMan, ITEM_OLD_AMBER, 1, MUS_OBTAIN_KEY_ITEM diff --git a/data/maps/PokemonLeague_AgathasRoom/scripts.inc b/data/maps/PokemonLeague_AgathasRoom/scripts.inc index 34b1a8062..f66f243b8 100644 --- a/data/maps/PokemonLeague_AgathasRoom/scripts.inc +++ b/data/maps/PokemonLeague_AgathasRoom/scripts.inc @@ -12,8 +12,7 @@ PokemonLeague_AgathasRoom_OnResume:: PokemonLeague_AgathasRoom_OnLoad:: call_if_set FLAG_DEFEATED_AGATHA, PokemonLeague_AgathasRoom_EventScript_SetDoorOpen - compare VAR_MAP_SCENE_POKEMON_LEAGUE, 3 - call_if_eq PokemonLeague_AgathasRoom_EventScript_CloseEntry + call_if_eq VAR_MAP_SCENE_POKEMON_LEAGUE, 3, PokemonLeague_AgathasRoom_EventScript_CloseEntry end PokemonLeague_AgathasRoom_EventScript_CloseEntry:: diff --git a/data/maps/PokemonLeague_BrunosRoom/scripts.inc b/data/maps/PokemonLeague_BrunosRoom/scripts.inc index 3d87c4520..00bed0983 100644 --- a/data/maps/PokemonLeague_BrunosRoom/scripts.inc +++ b/data/maps/PokemonLeague_BrunosRoom/scripts.inc @@ -14,8 +14,7 @@ PokemonLeague_BrunosRoom_OnResume:: PokemonLeague_BrunosRoom_OnLoad:: call_if_set FLAG_DEFEATED_BRUNO, PokemonLeague_BrunosRoom_EventScript_SetDoorOpen - compare VAR_MAP_SCENE_POKEMON_LEAGUE, 2 - call_if_eq PokemonLeague_BrunosRoom_EventScript_CloseEntry + call_if_eq VAR_MAP_SCENE_POKEMON_LEAGUE, 2, PokemonLeague_BrunosRoom_EventScript_CloseEntry end PokemonLeague_BrunosRoom_EventScript_CloseEntry:: @@ -81,14 +80,10 @@ PokemonLeague_BrunosRoom_EventScript_Rematch:: PokemonLeague_BrunosRoom_EventScript_PostBattle:: msgbox PokemonLeague_BrunosRoom_Text_PostBattle closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayRight - compare VAR_FACING, DIR_SOUTH - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayLeft - compare VAR_FACING, DIR_WEST - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown - compare VAR_FACING, DIR_EAST - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown + call_if_eq VAR_FACING, DIR_NORTH, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayRight + call_if_eq VAR_FACING, DIR_SOUTH, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayLeft + call_if_eq VAR_FACING, DIR_WEST, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown + call_if_eq VAR_FACING, DIR_EAST, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown release end @@ -97,14 +92,10 @@ PokemonLeague_BrunosRoom_EventScript_DefeatedBruno:: call PokemonLeague_EventScript_OpenDoor msgbox PokemonLeague_BrunosRoom_Text_PostBattle closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayRight - compare VAR_FACING, DIR_SOUTH - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayLeft - compare VAR_FACING, DIR_WEST - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown - compare VAR_FACING, DIR_EAST - call_if_eq PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown + call_if_eq VAR_FACING, DIR_NORTH, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayRight + call_if_eq VAR_FACING, DIR_SOUTH, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayLeft + call_if_eq VAR_FACING, DIR_WEST, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown + call_if_eq VAR_FACING, DIR_EAST, PokemonLeague_BrunosRoom_EventScript_BrunoLookAwayDown release end diff --git a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc index 21379c2e5..7282a2547 100644 --- a/data/maps/PokemonLeague_ChampionsRoom/scripts.inc +++ b/data/maps/PokemonLeague_ChampionsRoom/scripts.inc @@ -10,12 +10,9 @@ PokemonLeague_ChampionsRoom_MapScripts:: PokemonLeague_ChampionsRoom_OnResume:: setvar VAR_0x8004, 4 call PokemonLeague_EventScript_DoLightingEffect - compare VAR_STARTER_MON, 2 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerCharmander + call_if_eq VAR_STARTER_MON, 2, PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerSquirtle + call_if_eq VAR_STARTER_MON, 1, PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerBulbasaur + call_if_eq VAR_STARTER_MON, 0, PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerCharmander end PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerSquirtle:: @@ -107,21 +104,15 @@ PokemonLeague_ChampionsRoom_EventScript_QuestLogEnd:: end PokemonLeague_ChampionsRoom_EventScript_Battle:: - compare VAR_STARTER_MON, 2 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_BattleSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_BattleBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_BattleCharmander + call_if_eq VAR_STARTER_MON, 2, PokemonLeague_ChampionsRoom_EventScript_BattleSquirtle + call_if_eq VAR_STARTER_MON, 1, PokemonLeague_ChampionsRoom_EventScript_BattleBulbasaur + call_if_eq VAR_STARTER_MON, 0, PokemonLeague_ChampionsRoom_EventScript_BattleCharmander return PokemonLeague_ChampionsRoom_EventScript_Rematch:: - compare VAR_STARTER_MON, 2 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_RematchSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_RematchBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq PokemonLeague_ChampionsRoom_EventScript_RematchCharmander + call_if_eq VAR_STARTER_MON, 2, PokemonLeague_ChampionsRoom_EventScript_RematchSquirtle + call_if_eq VAR_STARTER_MON, 1, PokemonLeague_ChampionsRoom_EventScript_RematchBulbasaur + call_if_eq VAR_STARTER_MON, 0, PokemonLeague_ChampionsRoom_EventScript_RematchCharmander return PokemonLeague_ChampionsRoom_EventScript_Intro:: diff --git a/data/maps/PokemonLeague_LancesRoom/scripts.inc b/data/maps/PokemonLeague_LancesRoom/scripts.inc index e191cd3c6..985f89f98 100644 --- a/data/maps/PokemonLeague_LancesRoom/scripts.inc +++ b/data/maps/PokemonLeague_LancesRoom/scripts.inc @@ -13,8 +13,7 @@ PokemonLeague_LancesRoom_OnResume:: end PokemonLeague_LancesRoom_OnLoad:: - compare VAR_MAP_SCENE_POKEMON_LEAGUE, 4 - call_if_eq PokemonLeague_LancesRoom_EventScript_CloseEntry + call_if_eq VAR_MAP_SCENE_POKEMON_LEAGUE, 4, PokemonLeague_LancesRoom_EventScript_CloseEntry call_if_set FLAG_DEFEATED_LANCE, PokemonLeague_LancesRoom_EventScript_SetDoorOpen end diff --git a/data/maps/PokemonLeague_LoreleisRoom/scripts.inc b/data/maps/PokemonLeague_LoreleisRoom/scripts.inc index 98430fcce..7f56673d2 100644 --- a/data/maps/PokemonLeague_LoreleisRoom/scripts.inc +++ b/data/maps/PokemonLeague_LoreleisRoom/scripts.inc @@ -13,8 +13,7 @@ PokemonLeague_LoreleisRoom_OnResume:: PokemonLeague_LoreleisRoom_OnLoad:: call_if_set FLAG_DEFEATED_LORELEI, PokemonLeague_LoreleisRoom_EventScript_SetDoorOpen - compare VAR_MAP_SCENE_POKEMON_LEAGUE, 1 - call_if_eq PokemonLeague_LoreleisRoom_EventScript_CloseEntry + call_if_eq VAR_MAP_SCENE_POKEMON_LEAGUE, 1, PokemonLeague_LoreleisRoom_EventScript_CloseEntry end PokemonLeague_LoreleisRoom_EventScript_CloseEntry:: diff --git a/data/maps/PokemonTower_1F/scripts.inc b/data/maps/PokemonTower_1F/scripts.inc index 5e5665a15..119737136 100644 --- a/data/maps/PokemonTower_1F/scripts.inc +++ b/data/maps/PokemonTower_1F/scripts.inc @@ -22,8 +22,7 @@ PokemonTower_1F_EventScript_Woman2:: lock faceplayer checkplayergender - compare VAR_RESULT, MALE - goto_if_eq PokemonTower_1F_EventScript_Woman2MalePlayer + goto_if_eq VAR_RESULT, MALE, PokemonTower_1F_EventScript_Woman2MalePlayer msgbox PokemonTower_1F_Text_ComeToPayRespectsGirl release end diff --git a/data/maps/PokemonTower_2F/scripts.inc b/data/maps/PokemonTower_2F/scripts.inc index a7c7fa789..142f48c9c 100644 --- a/data/maps/PokemonTower_2F/scripts.inc +++ b/data/maps/PokemonTower_2F/scripts.inc @@ -22,29 +22,22 @@ PokemonTower_2F_EventScript_RivalTriggerDown:: PokemonTower_2F_EventScript_Rival:: textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 - compare VAR_TEMP_1, 0 - call_if_eq PokemonTower_2F_EventScript_RivalFacePlayerRight - compare VAR_TEMP_1, 1 - call_if_eq PokemonTower_2F_EventScript_RivalFacePlayerDown + call_if_eq VAR_TEMP_1, 0, PokemonTower_2F_EventScript_RivalFacePlayerRight + call_if_eq VAR_TEMP_1, 1, PokemonTower_2F_EventScript_RivalFacePlayerDown applymovement LOCALID_RIVAL, Movement_ExclamationMark waitmovement 0 applymovement LOCALID_RIVAL, Movement_Delay48 waitmovement 0 msgbox PokemonTower_2F_Text_RivalIntro setvar VAR_LAST_TALKED, LOCALID_RIVAL - compare VAR_STARTER_MON, 2 - call_if_eq PokemonTower_2F_EventScript_RivalSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq PokemonTower_2F_EventScript_RivalBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq PokemonTower_2F_EventScript_RivalCharmander + call_if_eq VAR_STARTER_MON, 2, PokemonTower_2F_EventScript_RivalSquirtle + call_if_eq VAR_STARTER_MON, 1, PokemonTower_2F_EventScript_RivalBulbasaur + call_if_eq VAR_STARTER_MON, 0, PokemonTower_2F_EventScript_RivalCharmander msgbox PokemonTower_2F_Text_RivalPostBattle closemessage playbgm MUS_RIVAL_EXIT, 0 - compare VAR_TEMP_1, 0 - call_if_eq PokemonTower_2F_EventScript_RivalExitRight - compare VAR_TEMP_1, 1 - call_if_eq PokemonTower_2F_EventScript_RivalExitDown + call_if_eq VAR_TEMP_1, 0, PokemonTower_2F_EventScript_RivalExitRight + call_if_eq VAR_TEMP_1, 1, PokemonTower_2F_EventScript_RivalExitDown playse SE_EXIT delay 25 fadedefaultbgm diff --git a/data/maps/PokemonTower_6F/scripts.inc b/data/maps/PokemonTower_6F/scripts.inc index 5b7d4cb1a..ca0ff6895 100644 --- a/data/maps/PokemonTower_6F/scripts.inc +++ b/data/maps/PokemonTower_6F/scripts.inc @@ -10,8 +10,7 @@ PokemonTower_6F_EventScript_MarowakGhost:: special StartMarowakBattle waitstate special QuestLog_CutRecording - compare VAR_RESULT, FALSE @ Set by CB2_EndMarowakBattle - goto_if_eq PokemonTower_6F_EventScript_DefeatedMarowakGhost + goto_if_eq VAR_RESULT, FALSE, PokemonTower_6F_EventScript_DefeatedMarowakGhost @ VAR_RESULT set by CB2_EndMarowakBattle applymovement OBJ_EVENT_ID_PLAYER, PokemonTower_6F_Movement_ForcePlayerUp waitmovement 0 releaseall diff --git a/data/maps/PokemonTower_7F/scripts.inc b/data/maps/PokemonTower_7F/scripts.inc index 405209e69..af4a8e3ce 100644 --- a/data/maps/PokemonTower_7F/scripts.inc +++ b/data/maps/PokemonTower_7F/scripts.inc @@ -28,12 +28,9 @@ PokemonTower_7F_EventScript_DefeatedGrunt1:: msgbox PokemonTower_7F_Text_Grunt1PostBattle closemessage getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 10 - goto_if_eq PokemonTower_7F_EventScript_Grunt1ExitMid - compare VAR_0x8004, 11 - goto_if_eq PokemonTower_7F_EventScript_Grunt1ExitRight - compare VAR_0x8004, 9 - goto_if_eq PokemonTower_7F_EventScript_Grunt1ExitLeft + goto_if_eq VAR_0x8004, 10, PokemonTower_7F_EventScript_Grunt1ExitMid + goto_if_eq VAR_0x8004, 11, PokemonTower_7F_EventScript_Grunt1ExitRight + goto_if_eq VAR_0x8004, 9, PokemonTower_7F_EventScript_Grunt1ExitLeft applymovement LOCALID_GRUNT1, PokemonTower_7F_Movement_Grunt1Exit waitmovement 0 goto PokemonTower_7F_EventScript_RemoveGrunt1 @@ -116,10 +113,8 @@ PokemonTower_7F_EventScript_DefeatedGrunt2:: msgbox PokemonTower_7F_Text_Grunt2PostBattle closemessage getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 12 - goto_if_eq PokemonTower_7F_EventScript_Grunt2ExitLeft - compare VAR_0x8004, 13 - goto_if_eq PokemonTower_7F_EventScript_Grunt2ExitRight + goto_if_eq VAR_0x8004, 12, PokemonTower_7F_EventScript_Grunt2ExitLeft + goto_if_eq VAR_0x8004, 13, PokemonTower_7F_EventScript_Grunt2ExitRight applymovement LOCALID_GRUNT2, PokemonTower_7F_Movement_Grunt2Exit waitmovement 0 goto PokemonTower_7F_EventScript_RemoveGrunt2 @@ -181,10 +176,8 @@ PokemonTower_7F_EventScript_DefeatedGrunt3:: msgbox PokemonTower_7F_Text_Grunt3PostBattle closemessage getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 10 - goto_if_eq PokemonTower_7F_EventScript_Grunt3ExitRight - compare VAR_0x8004, 9 - goto_if_eq PokemonTower_7F_EventScript_Grunt3ExitLeft + goto_if_eq VAR_0x8004, 10, PokemonTower_7F_EventScript_Grunt3ExitRight + goto_if_eq VAR_0x8004, 9, PokemonTower_7F_EventScript_Grunt3ExitLeft applymovement LOCALID_GRUNT3, PokemonTower_7F_Movement_Grunt3Exit waitmovement 0 goto PokemonTower_7F_EventScript_RemoveGrunt3 diff --git a/data/maps/PowerPlant/scripts.inc b/data/maps/PowerPlant/scripts.inc index 129b7375f..ec48a3778 100644 --- a/data/maps/PowerPlant/scripts.inc +++ b/data/maps/PowerPlant/scripts.inc @@ -9,8 +9,7 @@ PowerPlant_OnResume:: PowerPlant_EventScript_TryRemoveStaticMon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, EventScript_Return removeobject VAR_LAST_TALKED return @@ -52,12 +51,9 @@ PowerPlant_EventScript_Zapdos:: waitstate clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq PowerPlant_EventScript_DefeatedZapdos - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq PowerPlant_EventScript_RanFromZapdos - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq PowerPlant_EventScript_RanFromZapdos + goto_if_eq VAR_RESULT, B_OUTCOME_WON, PowerPlant_EventScript_DefeatedZapdos + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, PowerPlant_EventScript_RanFromZapdos + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, PowerPlant_EventScript_RanFromZapdos setflag FLAG_FOUGHT_ZAPDOS release end @@ -86,12 +82,9 @@ PowerPlant_EventScript_Electrode1:: clearflag FLAG_SYS_SPECIAL_WILD_BATTLE special QuestLog_CutRecording specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq PowerPlant_EventScript_FoughtElectrode1 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq PowerPlant_EventScript_FoughtElectrode1 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq PowerPlant_EventScript_FoughtElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, PowerPlant_EventScript_FoughtElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, PowerPlant_EventScript_FoughtElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, PowerPlant_EventScript_FoughtElectrode1 setflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_1 release end @@ -115,12 +108,9 @@ PowerPlant_EventScript_Electrode2:: clearflag FLAG_SYS_SPECIAL_WILD_BATTLE special QuestLog_CutRecording specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq PowerPlant_EventScript_FoughtElectrode2 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq PowerPlant_EventScript_FoughtElectrode2 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq PowerPlant_EventScript_FoughtElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, PowerPlant_EventScript_FoughtElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, PowerPlant_EventScript_FoughtElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, PowerPlant_EventScript_FoughtElectrode2 setflag FLAG_FOUGHT_POWER_PLANT_ELECTRODE_2 release end diff --git a/data/maps/RocketHideout_B4F/scripts.inc b/data/maps/RocketHideout_B4F/scripts.inc index eceb02ee2..7d0c50b98 100644 --- a/data/maps/RocketHideout_B4F/scripts.inc +++ b/data/maps/RocketHideout_B4F/scripts.inc @@ -12,8 +12,7 @@ RocketHideout_B4F_OnLoad:: setvar NUM_DOOR_GRUNTS_DEFEATED, 0 call_if_defeated TRAINER_TEAM_ROCKET_GRUNT_16, RocketHideout_B4F_EventScript_CountGruntDefeated call_if_defeated TRAINER_TEAM_ROCKET_GRUNT_17, RocketHideout_B4F_EventScript_CountGruntDefeated - compare NUM_DOOR_GRUNTS_DEFEATED, 2 - call_if_ne RocketHideout_B4F_EventScript_SetBarrier + call_if_ne NUM_DOOR_GRUNTS_DEFEATED, 2, RocketHideout_B4F_EventScript_SetBarrier end RocketHideout_B4F_EventScript_CountGruntDefeated:: @@ -46,8 +45,7 @@ RocketHideout_B4F_EventScript_SilphScope:: faceplayer removeobject LOCALID_SILPH_SCOPE giveitem ITEM_SILPH_SCOPE - compare VAR_RESULT, FALSE - goto_if_eq EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, EventScript_BagIsFull release end @@ -70,8 +68,7 @@ RocketHideout_B4F_EventScript_LiftKey:: setflag FLAG_CAN_USE_ROCKET_HIDEOUT_LIFT removeobject LOCALID_LIFT_KEY giveitem ITEM_LIFT_KEY - compare VAR_RESULT, FALSE - goto_if_eq EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, EventScript_BagIsFull release end @@ -84,10 +81,8 @@ RocketHideout_B4F_EventScript_DefeatedGrunt2:: setvar NUM_DOOR_GRUNTS_DEFEATED, 0 call_if_defeated TRAINER_TEAM_ROCKET_GRUNT_16, RocketHideout_B4F_EventScript_CountGruntDefeated call_if_defeated TRAINER_TEAM_ROCKET_GRUNT_17, RocketHideout_B4F_EventScript_CountGruntDefeated - compare NUM_DOOR_GRUNTS_DEFEATED, 2 - call_if_eq RocketHideout_B4F_EventScript_RemoveBarrier - compare NUM_DOOR_GRUNTS_DEFEATED, 2 - call_if_eq RocketHideout_B4F_EventScript_DrawMapForBarrierRemoval + call_if_eq NUM_DOOR_GRUNTS_DEFEATED, 2, RocketHideout_B4F_EventScript_RemoveBarrier + call_if_eq NUM_DOOR_GRUNTS_DEFEATED, 2, RocketHideout_B4F_EventScript_DrawMapForBarrierRemoval release end @@ -100,10 +95,8 @@ RocketHideout_B4F_EventScript_DefeatedGrunt3:: setvar NUM_DOOR_GRUNTS_DEFEATED, 0 call_if_defeated TRAINER_TEAM_ROCKET_GRUNT_16, RocketHideout_B4F_EventScript_CountGruntDefeated call_if_defeated TRAINER_TEAM_ROCKET_GRUNT_17, RocketHideout_B4F_EventScript_CountGruntDefeated - compare NUM_DOOR_GRUNTS_DEFEATED, 2 - call_if_eq RocketHideout_B4F_EventScript_RemoveBarrier - compare NUM_DOOR_GRUNTS_DEFEATED, 2 - call_if_eq RocketHideout_B4F_EventScript_DrawMapForBarrierRemoval + call_if_eq NUM_DOOR_GRUNTS_DEFEATED, 2, RocketHideout_B4F_EventScript_RemoveBarrier + call_if_eq NUM_DOOR_GRUNTS_DEFEATED, 2, RocketHideout_B4F_EventScript_DrawMapForBarrierRemoval release end diff --git a/data/maps/RocketHideout_Elevator/scripts.inc b/data/maps/RocketHideout_Elevator/scripts.inc index eb7adaa96..00a0dd894 100644 --- a/data/maps/RocketHideout_Elevator/scripts.inc +++ b/data/maps/RocketHideout_Elevator/scripts.inc @@ -45,8 +45,7 @@ RocketHideout_Elevator_EventScript_ChooseFloor:: RocketHideout_Elevator_EventScript_ToB1F:: setvar VAR_0x8006, 3 setdynamicwarp MAP_ROCKET_HIDEOUT_B1F, 255, 24, 25 - compare VAR_ELEVATOR_FLOOR, 3 - goto_if_eq RocketHideout_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 3, RocketHideout_Elevator_EventScript_ExitFloorSelect call RocketHideout_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 3 goto RocketHideout_Elevator_EventScript_ExitFloorSelect @@ -55,8 +54,7 @@ RocketHideout_Elevator_EventScript_ToB1F:: RocketHideout_Elevator_EventScript_ToB2F:: setvar VAR_0x8006, 2 setdynamicwarp MAP_ROCKET_HIDEOUT_B2F, 255, 28, 16 - compare VAR_ELEVATOR_FLOOR, 2 - goto_if_eq RocketHideout_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 2, RocketHideout_Elevator_EventScript_ExitFloorSelect call RocketHideout_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 2 goto RocketHideout_Elevator_EventScript_ExitFloorSelect @@ -65,8 +63,7 @@ RocketHideout_Elevator_EventScript_ToB2F:: RocketHideout_Elevator_EventScript_ToB4F:: setvar VAR_0x8006, 0 setdynamicwarp MAP_ROCKET_HIDEOUT_B4F, 255, 20, 23 - compare VAR_ELEVATOR_FLOOR, 0 - goto_if_eq RocketHideout_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 0, RocketHideout_Elevator_EventScript_ExitFloorSelect call RocketHideout_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 0 goto RocketHideout_Elevator_EventScript_ExitFloorSelect diff --git a/data/maps/Route1/scripts.inc b/data/maps/Route1/scripts.inc index 391722428..ba2e22d9c 100644 --- a/data/maps/Route1/scripts.inc +++ b/data/maps/Route1/scripts.inc @@ -8,8 +8,7 @@ Route1_EventScript_MartClerk:: msgbox Route1_Text_WorkAtPokeMartTakeSample textcolor NPC_TEXT_COLOR_NEUTRAL checkitemspace ITEM_POTION - compare VAR_RESULT, FALSE - goto_if_eq EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, EventScript_BagIsFull bufferitemname STR_VAR_2, ITEM_POTION playfanfare MUS_LEVEL_UP message Text_ObtainedTheX diff --git a/data/maps/Route10_PokemonCenter_1F/scripts.inc b/data/maps/Route10_PokemonCenter_1F/scripts.inc index bb9b8aab0..1624afbef 100644 --- a/data/maps/Route10_PokemonCenter_1F/scripts.inc +++ b/data/maps/Route10_PokemonCenter_1F/scripts.inc @@ -35,18 +35,15 @@ Route10_PokemonCenter_1F_EventScript_Aide:: call Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo goto_if_set FLAG_GOT_EVERSTONE_FROM_OAKS_AIDE, Route10_PokemonCenter_1F_EventScript_AlreadyGotEverstone msgbox Route10_PokemonCenter_1F_Text_GiveEverstoneIfCaught20Mons, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Aide_EventScript_DeclineCheckMons + goto_if_eq VAR_RESULT, NO, Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount buffernumberstring STR_VAR_3, VAR_0x8006 call Route10_PokemonCenter_1F_EventScript_GetAideRequestInfo - compare VAR_0x8006, REQUIRED_OWNED_MONS - goto_if_lt Aide_EventScript_HaventCaughtEnough + goto_if_lt VAR_0x8006, REQUIRED_OWNED_MONS, Aide_EventScript_HaventCaughtEnough msgbox Route10_PokemonCenter_1F_Text_GreatHereYouGo checkitemspace ITEM_EVERSTONE - compare VAR_RESULT, FALSE - goto_if_eq Aide_EventScript_NoRoomForItem + goto_if_eq VAR_RESULT, FALSE, Aide_EventScript_NoRoomForItem giveitem_msg Route10_PokemonCenter_1F_Text_ReceivedEverstoneFromAide, ITEM_EVERSTONE setflag FLAG_GOT_EVERSTONE_FROM_OAKS_AIDE msgbox Route10_PokemonCenter_1F_Text_ExplainEverstone diff --git a/data/maps/Route11_EastEntrance_2F/scripts.inc b/data/maps/Route11_EastEntrance_2F/scripts.inc index d673d3321..487c92fce 100644 --- a/data/maps/Route11_EastEntrance_2F/scripts.inc +++ b/data/maps/Route11_EastEntrance_2F/scripts.inc @@ -26,14 +26,11 @@ Route11_EastEntrance_2F_EventScript_Turner:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_NINA_TRADE, Route11_EastEntrance_2F_EventScript_AlreadyTraded msgbox Trade_Text_LookingForMonWannaTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route11_EastEntrance_2F_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, Route11_EastEntrance_2F_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge Route11_EastEntrance_2F_EventScript_DeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, Route11_EastEntrance_2F_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne Route11_EastEntrance_2F_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, Route11_EastEntrance_2F_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_HeyThanks setflag FLAG_DID_NINA_TRADE @@ -62,18 +59,15 @@ Route11_EastEntrance_2F_EventScript_Aide:: call Route11_EastEntrance_2F_EventScript_GetAideRequestInfo goto_if_set FLAG_GOT_ITEMFINDER, Route11_EastEntrance_2F_EventScript_AlreadyGotItemfinder msgbox Route11_EastEntrance_2F_Text_GiveItemfinderIfCaught30, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Aide_EventScript_DeclineCheckMons + goto_if_eq VAR_RESULT, NO, Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount buffernumberstring STR_VAR_3, VAR_0x8006 call Route11_EastEntrance_2F_EventScript_GetAideRequestInfo - compare VAR_0x8006, REQUIRED_CAUGHT_MONS - goto_if_lt Aide_EventScript_HaventCaughtEnough + goto_if_lt VAR_0x8006, REQUIRED_CAUGHT_MONS, Aide_EventScript_HaventCaughtEnough msgbox Route11_EastEntrance_2F_Text_GreatHereYouGo checkitemspace ITEM_ITEMFINDER - compare VAR_RESULT, FALSE - goto_if_eq Aide_EventScript_NoRoomForItem + goto_if_eq VAR_RESULT, FALSE, Aide_EventScript_NoRoomForItem giveitem_msg Route11_EastEntrance_2F_Text_ReceivedItemfinderFromAide, ITEM_ITEMFINDER setflag FLAG_GOT_ITEMFINDER msgbox Route11_EastEntrance_2F_Text_ExplainItemfinder diff --git a/data/maps/Route12/scripts.inc b/data/maps/Route12/scripts.inc index eadf4235a..7e17f2573 100644 --- a/data/maps/Route12/scripts.inc +++ b/data/maps/Route12/scripts.inc @@ -17,8 +17,7 @@ Route12_EventScript_Snorlax:: goto_if_questlog EventScript_ReleaseEnd special QuestLog_CutRecording msgbox Text_WantToUsePokeFlute, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route12_EventScript_DontUsePokeFlute + goto_if_eq VAR_RESULT, NO, Route12_EventScript_DontUsePokeFlute call EventScript_AwakenSnorlax setwildbattle SPECIES_SNORLAX, 30 waitse @@ -31,12 +30,9 @@ Route12_EventScript_Snorlax:: dowildbattle clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq Route12_EventScript_FoughtSnorlax - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq Route12_EventScript_FoughtSnorlax - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq Route12_EventScript_FoughtSnorlax + goto_if_eq VAR_RESULT, B_OUTCOME_WON, Route12_EventScript_FoughtSnorlax + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, Route12_EventScript_FoughtSnorlax + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, Route12_EventScript_FoughtSnorlax release end diff --git a/data/maps/Route12_FishingHouse/scripts.inc b/data/maps/Route12_FishingHouse/scripts.inc index 37b5c48a2..545472154 100644 --- a/data/maps/Route12_FishingHouse/scripts.inc +++ b/data/maps/Route12_FishingHouse/scripts.inc @@ -6,16 +6,14 @@ Route12_FishingHouse_EventScript_FishingGuruBrother:: faceplayer goto_if_set FLAG_GOT_SUPER_ROD, Route12_FishingHouse_EventScript_CheckMagikarpRecord msgbox Route12_FishingHouse_Text_DoYouLikeToFish, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route12_FishingHouse_EventScript_GiveSuperRod + goto_if_eq VAR_RESULT, YES, Route12_FishingHouse_EventScript_GiveSuperRod msgbox Route12_FishingHouse_Text_OhThatsDisappointing release end Route12_FishingHouse_EventScript_GiveSuperRod:: checkitemspace ITEM_SUPER_ROD - compare VAR_RESULT, FALSE - goto_if_eq Route12_FishingHouse_EventScript_NoRoomForSuperRod + goto_if_eq VAR_RESULT, FALSE, Route12_FishingHouse_EventScript_NoRoomForSuperRod additem ITEM_SUPER_ROD msgbox Route12_FishingHouse_Text_TakeThisAndFish msgreceiveditem Route12_FishingHouse_Text_ReceivedSuperRod, ITEM_SUPER_ROD @@ -34,24 +32,18 @@ Route12_FishingHouse_EventScript_CheckMagikarpRecord:: special QuestLog_CutRecording setvar VAR_0x8004, SPECIES_MAGIKARP specialvar VAR_RESULT, DoesPlayerPartyContainSpecies - compare VAR_RESULT, FALSE - goto_if_eq Route12_FishingHouse_EventScript_NoMagikarpInParty + goto_if_eq VAR_RESULT, FALSE, Route12_FishingHouse_EventScript_NoMagikarpInParty special GetMagikarpSizeRecordInfo msgbox Route12_FishingHouse_Text_OhMagikarpAllowMeToSee special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, PARTY_SIZE - goto_if_ge Route12_FishingHouse_EventScript_CancelShowMon + goto_if_ge VAR_RESULT, PARTY_SIZE, Route12_FishingHouse_EventScript_CancelShowMon special CompareMagikarpSize - compare VAR_RESULT, 1 - goto_if_eq Route12_FishingHouse_EventScript_NotMagikarp - compare VAR_RESULT, 2 - goto_if_eq Route12_FishingHouse_EventScript_NotRecordMagikarp - compare VAR_RESULT, 3 - goto_if_eq Route12_FishingHouse_EventScript_NewRecordMagikarp - compare VAR_RESULT, 4 - goto_if_eq Route12_FishingHouse_EventScript_TieRecordMagikarp + goto_if_eq VAR_RESULT, 1, Route12_FishingHouse_EventScript_NotMagikarp + goto_if_eq VAR_RESULT, 2, Route12_FishingHouse_EventScript_NotRecordMagikarp + goto_if_eq VAR_RESULT, 3, Route12_FishingHouse_EventScript_NewRecordMagikarp + goto_if_eq VAR_RESULT, 4, Route12_FishingHouse_EventScript_TieRecordMagikarp release end @@ -85,8 +77,7 @@ Route12_FishingHouse_EventScript_NewRecordMagikarp:: setflag FLAG_GOT_RECORD_SETTING_MAGIKARP msgbox Route12_FishingHouse_Text_WhoaXInchesTakeThis giveitem ITEM_NET_BALL - compare VAR_RESULT, FALSE - goto_if_eq Route12_FishingHouse_EventScript_NoRoomForNetBall + goto_if_eq VAR_RESULT, FALSE, Route12_FishingHouse_EventScript_NoRoomForNetBall msgbox Route12_FishingHouse_Text_LookForwardToGreaterRecords release end diff --git a/data/maps/Route12_NorthEntrance_2F/scripts.inc b/data/maps/Route12_NorthEntrance_2F/scripts.inc index c01d40be2..93a8caeaf 100644 --- a/data/maps/Route12_NorthEntrance_2F/scripts.inc +++ b/data/maps/Route12_NorthEntrance_2F/scripts.inc @@ -14,13 +14,10 @@ Route12_NorthEntrance_2F_EventScript_Lass:: faceplayer goto_if_set FLAG_GOT_TM27, Route12_NorthEntrance_2F_EventScript_ExplainTM27 checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route12_NorthEntrance_2F_EventScript_TakeTMMale - compare VAR_RESULT, FEMALE - call_if_eq Route12_NorthEntrance_2F_EventScript_TakeTMFemale + call_if_eq VAR_RESULT, MALE, Route12_NorthEntrance_2F_EventScript_TakeTMMale + call_if_eq VAR_RESULT, FEMALE, Route12_NorthEntrance_2F_EventScript_TakeTMFemale checkitemspace ITEM_TM27 - compare VAR_RESULT, FALSE - goto_if_eq Route12_NorthEntrance_2F_EventScript_NoRoomForTM27 + goto_if_eq VAR_RESULT, FALSE, Route12_NorthEntrance_2F_EventScript_NoRoomForTM27 giveitem_msg Route12_NorthEntrance_2F_Text_ReceivedTM27FromLittleGirl, ITEM_TM27 msgbox Route12_NorthEntrance_2F_Text_ExplainTM27 setflag FLAG_GOT_TM27 diff --git a/data/maps/Route15_WestEntrance_2F/scripts.inc b/data/maps/Route15_WestEntrance_2F/scripts.inc index 73780cc78..4606f2f27 100644 --- a/data/maps/Route15_WestEntrance_2F/scripts.inc +++ b/data/maps/Route15_WestEntrance_2F/scripts.inc @@ -25,18 +25,15 @@ Route15_WestEntrance_2F_EventScript_Aide:: call Route15_WestEntrance_2F_EventScript_GetAideRequestInfo goto_if_set FLAG_GOT_EXP_SHARE_FROM_OAKS_AIDE, Route15_WestEntrance_2F_EventScript_AlreadyGotExpShare msgbox Route15_WestEntrance_2F_Text_GiveItemIfCaughtEnough, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Aide_EventScript_DeclineCheckMons + goto_if_eq VAR_RESULT, NO, Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount buffernumberstring STR_VAR_3, VAR_0x8006 call Route15_WestEntrance_2F_EventScript_GetAideRequestInfo - compare VAR_0x8006, REQUIRED_CAUGHT_MONS - goto_if_lt Aide_EventScript_HaventCaughtEnough + goto_if_lt VAR_0x8006, REQUIRED_CAUGHT_MONS, Aide_EventScript_HaventCaughtEnough msgbox Route15_WestEntrance_2F_Text_GreatHereYouGo checkitemspace ITEM_EXP_SHARE - compare VAR_RESULT, FALSE - goto_if_eq Aide_EventScript_NoRoomForItem + goto_if_eq VAR_RESULT, FALSE, Aide_EventScript_NoRoomForItem giveitem_msg Route15_WestEntrance_2F_Text_ReceivedItemFromAide, ITEM_EXP_SHARE setflag FLAG_GOT_EXP_SHARE_FROM_OAKS_AIDE msgbox Route15_WestEntrance_2F_Text_ExplainExpShare diff --git a/data/maps/Route16/scripts.inc b/data/maps/Route16/scripts.inc index f921db6d6..27ad5ce6f 100644 --- a/data/maps/Route16/scripts.inc +++ b/data/maps/Route16/scripts.inc @@ -13,8 +13,7 @@ Route16_EventScript_RemoveSnorlax:: return Route16_OnTransition:: - compare VAR_MAP_SCENE_ROUTE16, 1 - call_if_eq Route16_OnTransitionCyclingRoad + call_if_eq VAR_MAP_SCENE_ROUTE16, 1, Route16_OnTransitionCyclingRoad end Route16_OnTransitionCyclingRoad:: @@ -36,8 +35,7 @@ Route16_EventScript_Snorlax:: goto_if_questlog EventScript_ReleaseEnd special QuestLog_CutRecording msgbox Text_WantToUsePokeFlute, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route16_EventScript_DontUsePokeFlute + goto_if_eq VAR_RESULT, NO, Route16_EventScript_DontUsePokeFlute call EventScript_AwakenSnorlax setwildbattle SPECIES_SNORLAX, 30 waitse @@ -49,12 +47,9 @@ Route16_EventScript_Snorlax:: dowildbattle clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq Route16_EventScript_FoughtSnorlax - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq Route16_EventScript_FoughtSnorlax - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq Route16_EventScript_FoughtSnorlax + goto_if_eq VAR_RESULT, B_OUTCOME_WON, Route16_EventScript_FoughtSnorlax + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, Route16_EventScript_FoughtSnorlax + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, Route16_EventScript_FoughtSnorlax release end diff --git a/data/maps/Route16_House/scripts.inc b/data/maps/Route16_House/scripts.inc index efa32d4d9..a1abb3d82 100644 --- a/data/maps/Route16_House/scripts.inc +++ b/data/maps/Route16_House/scripts.inc @@ -7,8 +7,7 @@ Route16_House_EventScript_Woman:: goto_if_set FLAG_GOT_HM02, Route16_House_EventScript_AlreadyGotHM02 msgbox Route16_House_Text_FoundMySecretRetreat checkitemspace ITEM_HM02 - compare VAR_RESULT, FALSE - goto_if_eq Route16_House_EventScript_NoRoomForHM02 + goto_if_eq VAR_RESULT, FALSE, Route16_House_EventScript_NoRoomForHM02 giveitem_msg Route16_House_Text_ReceivedHM02FromGirl, ITEM_HM02 msgbox Route16_House_Text_ExplainHM02 setflag FLAG_GOT_HM02 diff --git a/data/maps/Route16_NorthEntrance_1F/scripts.inc b/data/maps/Route16_NorthEntrance_1F/scripts.inc index 9ca3b4e0a..4d4080b16 100644 --- a/data/maps/Route16_NorthEntrance_1F/scripts.inc +++ b/data/maps/Route16_NorthEntrance_1F/scripts.inc @@ -52,14 +52,10 @@ Route16_NorthEntrance_1F_EventScript_NeedBikeTrigger:: applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 delay 20 - compare VAR_0x8008, 1 - call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidTop - compare VAR_0x8008, 2 - call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMid - compare VAR_0x8008, 3 - call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidBottom - compare VAR_0x8008, 4 - call_if_eq Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterBottom + call_if_eq VAR_0x8008, 1, Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidTop + call_if_eq VAR_0x8008, 2, Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMid + call_if_eq VAR_0x8008, 3, Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterMidBottom + call_if_eq VAR_0x8008, 4, Route16_NorthEntrance_1F_EventScript_PlayerWalkToCounterBottom msgbox Route16_NorthEntrance_1F_Text_NoPedestriansOnCyclingRoad closemessage applymovement OBJ_EVENT_ID_PLAYER, Route16_NorthEntrance_1F_Movement_WalkRight diff --git a/data/maps/Route16_NorthEntrance_2F/scripts.inc b/data/maps/Route16_NorthEntrance_2F/scripts.inc index c2d9c7f86..c96c1c589 100644 --- a/data/maps/Route16_NorthEntrance_2F/scripts.inc +++ b/data/maps/Route16_NorthEntrance_2F/scripts.inc @@ -25,18 +25,15 @@ Route16_NorthEntrance_2F_EventScript_Aide:: call Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo goto_if_set FLAG_GOT_AMULET_COIN_FROM_OAKS_AIDE, Route16_NorthEntrance_2F_EventScript_AlreadyGotAmuletCoin msgbox Route16_NorthEntrance_2F_Text_GiveAmuletCoinIfCaught40, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Aide_EventScript_DeclineCheckMons + goto_if_eq VAR_RESULT, NO, Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount buffernumberstring STR_VAR_3, VAR_0x8006 call Route16_NorthEntrance_2F_EventScript_GetAideRequestInfo - compare VAR_0x8006, REQUIRED_CAUGHT_MONS - goto_if_lt Aide_EventScript_HaventCaughtEnough + goto_if_lt VAR_0x8006, REQUIRED_CAUGHT_MONS, Aide_EventScript_HaventCaughtEnough msgbox Route16_NorthEntrance_2F_Text_GreatHereYouGo checkitemspace ITEM_AMULET_COIN - compare VAR_RESULT, FALSE - goto_if_eq Aide_EventScript_NoRoomForItem + goto_if_eq VAR_RESULT, FALSE, Aide_EventScript_NoRoomForItem giveitem_msg Route16_NorthEntrance_2F_Text_ReceivedAmuletCoinFromAide, ITEM_AMULET_COIN setflag FLAG_GOT_AMULET_COIN_FROM_OAKS_AIDE msgbox Route16_NorthEntrance_2F_Text_ExplainAmuletCoin diff --git a/data/maps/Route18/scripts.inc b/data/maps/Route18/scripts.inc index 8269eceb5..4f5e9019f 100644 --- a/data/maps/Route18/scripts.inc +++ b/data/maps/Route18/scripts.inc @@ -4,8 +4,7 @@ Route18_MapScripts:: .byte 0 Route18_OnTransition:: - compare VAR_MAP_SCENE_ROUTE16, 1 - call_if_eq Route18_OnTransitionCyclingRoad + call_if_eq VAR_MAP_SCENE_ROUTE16, 1, Route18_OnTransitionCyclingRoad end Route18_OnTransitionCyclingRoad:: diff --git a/data/maps/Route18_EastEntrance_1F/scripts.inc b/data/maps/Route18_EastEntrance_1F/scripts.inc index b8314f051..740a778a5 100644 --- a/data/maps/Route18_EastEntrance_1F/scripts.inc +++ b/data/maps/Route18_EastEntrance_1F/scripts.inc @@ -52,14 +52,10 @@ Route18_EastEntrance_1F_EventScript_NeedBikeTrigger:: applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 delay 20 - compare VAR_0x8008, 1 - call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidTop - compare VAR_0x8008, 2 - call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMid - compare VAR_0x8008, 3 - call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidBottom - compare VAR_0x8008, 4 - call_if_eq Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterBottom + call_if_eq VAR_0x8008, 1, Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidTop + call_if_eq VAR_0x8008, 2, Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMid + call_if_eq VAR_0x8008, 3, Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterMidBottom + call_if_eq VAR_0x8008, 4, Route18_EastEntrance_1F_EventScript_PlayerWalkToCounterBottom msgbox Route18_EastEntrance_1F_Text_NeedBicycleForCyclingRoad closemessage applymovement OBJ_EVENT_ID_PLAYER, Route18_EastEntrance_1F_Movement_WalkRight diff --git a/data/maps/Route18_EastEntrance_2F/scripts.inc b/data/maps/Route18_EastEntrance_2F/scripts.inc index 814d9e0d0..506e21d1e 100644 --- a/data/maps/Route18_EastEntrance_2F/scripts.inc +++ b/data/maps/Route18_EastEntrance_2F/scripts.inc @@ -16,14 +16,11 @@ Route18_EastEntrance_2F_EventScript_Haden:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_MARC_TRADE, Route18_EastEntrance_2F_EventScript_AlreadyTraded msgbox Trade_Text_LookingForMonWannaTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route18_EastEntrance_2F_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, Route18_EastEntrance_2F_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge Route18_EastEntrance_2F_EventScript_DeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, Route18_EastEntrance_2F_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne Route18_EastEntrance_2F_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, Route18_EastEntrance_2F_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_HeyThanks setflag FLAG_DID_MARC_TRADE diff --git a/data/maps/Route22/scripts.inc b/data/maps/Route22/scripts.inc index 103f4a65c..6db0a69fd 100644 --- a/data/maps/Route22/scripts.inc +++ b/data/maps/Route22/scripts.inc @@ -27,30 +27,21 @@ Route22_EventScript_EarlyRival:: textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 addobject LOCALID_RIVAL - compare VAR_TEMP_1, 0 - call_if_eq Route22_EventScript_EarlyRivalApproach - compare VAR_TEMP_1, 1 - call_if_eq Route22_EventScript_EarlyRivalApproach - compare VAR_TEMP_1, 2 - call_if_eq Route22_EventScript_EarlyRivalApproachBottom + call_if_eq VAR_TEMP_1, 0, Route22_EventScript_EarlyRivalApproach + call_if_eq VAR_TEMP_1, 1, Route22_EventScript_EarlyRivalApproach + call_if_eq VAR_TEMP_1, 2, Route22_EventScript_EarlyRivalApproachBottom delay 6 msgbox Route22_Text_EarlyRivalIntro - compare VAR_STARTER_MON, 2 - call_if_eq Route22_EventScript_EarlyRivalSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq Route22_EventScript_EarlyRivalBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq Route22_EventScript_EarlyRivalCharmander + call_if_eq VAR_STARTER_MON, 2, Route22_EventScript_EarlyRivalSquirtle + call_if_eq VAR_STARTER_MON, 1, Route22_EventScript_EarlyRivalBulbasaur + call_if_eq VAR_STARTER_MON, 0, Route22_EventScript_EarlyRivalCharmander msgbox Route22_Text_EarlyRivalPostBattle closemessage delay 10 playbgm MUS_RIVAL_EXIT, 0 - compare VAR_TEMP_1, 0 - call_if_eq Route22_EventScript_EarlyRivalExit - compare VAR_TEMP_1, 1 - call_if_eq Route22_EventScript_EarlyRivalExit - compare VAR_TEMP_1, 2 - call_if_eq Route22_EventScript_EarlyRivalExitBottom + call_if_eq VAR_TEMP_1, 0, Route22_EventScript_EarlyRivalExit + call_if_eq VAR_TEMP_1, 1, Route22_EventScript_EarlyRivalExit + call_if_eq VAR_TEMP_1, 2, Route22_EventScript_EarlyRivalExitBottom fadedefaultbgm removeobject LOCALID_RIVAL setvar VAR_MAP_SCENE_ROUTE22, 2 @@ -187,20 +178,14 @@ Route22_EventScript_LateRival:: textcolor NPC_TEXT_COLOR_MALE playbgm MUS_ENCOUNTER_RIVAL, 0 addobject LOCALID_RIVAL - compare VAR_TEMP_1, 0 - call_if_eq Route22_EventScript_LateRivalApproach - compare VAR_TEMP_1, 1 - call_if_eq Route22_EventScript_LateRivalApproach - compare VAR_TEMP_1, 2 - call_if_eq Route22_EventScript_LateRivalApproachBottom + call_if_eq VAR_TEMP_1, 0, Route22_EventScript_LateRivalApproach + call_if_eq VAR_TEMP_1, 1, Route22_EventScript_LateRivalApproach + call_if_eq VAR_TEMP_1, 2, Route22_EventScript_LateRivalApproachBottom msgbox Route22_Text_LateRivalIntro setvar VAR_LAST_TALKED, LOCALID_RIVAL - compare VAR_STARTER_MON, 2 - call_if_eq Route22_EventScript_LateRivalSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq Route22_EventScript_LateRivalBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq Route22_EventScript_LateRivalCharmander + call_if_eq VAR_STARTER_MON, 2, Route22_EventScript_LateRivalSquirtle + call_if_eq VAR_STARTER_MON, 1, Route22_EventScript_LateRivalBulbasaur + call_if_eq VAR_STARTER_MON, 0, Route22_EventScript_LateRivalCharmander msgbox Route22_Text_LateRivalPostBattle closemessage delay 10 diff --git a/data/maps/Route24/scripts.inc b/data/maps/Route24/scripts.inc index 48a1259ae..06f260fe9 100644 --- a/data/maps/Route24/scripts.inc +++ b/data/maps/Route24/scripts.inc @@ -6,12 +6,10 @@ Route24_MapScripts:: Route24_EventScript_Rocket:: lock faceplayer - compare VAR_MAP_SCENE_ROUTE24, 1 - goto_if_eq Route24_EventScript_RocketPostBattle + goto_if_eq VAR_MAP_SCENE_ROUTE24, 1, Route24_EventScript_RocketPostBattle msgbox Route24_Text_JustEarnedFabulousPrize checkitemspace ITEM_NUGGET - compare VAR_RESULT, FALSE - goto_if_eq Route24_EventScript_NoRoomForNugget + goto_if_eq VAR_RESULT, FALSE, Route24_EventScript_NoRoomForNugget call Route24_EventScript_BattleRocket release end @@ -40,16 +38,13 @@ Route24_EventScript_RocketTriggerRight:: Route24_EventScript_RocketTrigger:: textcolor NPC_TEXT_COLOR_MALE - compare VAR_TEMP_1, 0 - call_if_eq Route24_EventScript_RocketApproachPlayer - compare VAR_TEMP_1, 1 - call_if_eq Route24_EventScript_RocketMotionToPlayer + call_if_eq VAR_TEMP_1, 0, Route24_EventScript_RocketApproachPlayer + call_if_eq VAR_TEMP_1, 1, Route24_EventScript_RocketMotionToPlayer applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 msgbox Route24_Text_JustEarnedFabulousPrize checkitemspace ITEM_NUGGET - compare VAR_RESULT, FALSE - goto_if_eq Route24_EventScript_NoRoomForNuggetTrigger + goto_if_eq VAR_RESULT, FALSE, Route24_EventScript_NoRoomForNuggetTrigger call Route24_EventScript_BattleRocket releaseall end @@ -81,8 +76,7 @@ Route24_EventScript_NoRoomForNuggetTrigger:: closemessage applymovement OBJ_EVENT_ID_PLAYER, Route24_Movement_WalkDown waitmovement 0 - compare VAR_TEMP_1, 0 - call_if_eq Route24_EventScript_RocketWalkBackToPos + call_if_eq VAR_TEMP_1, 0, Route24_EventScript_RocketWalkBackToPos release end diff --git a/data/maps/Route25_SeaCottage/scripts.inc b/data/maps/Route25_SeaCottage/scripts.inc index 5b2fea3a7..2ba918a4a 100644 --- a/data/maps/Route25_SeaCottage/scripts.inc +++ b/data/maps/Route25_SeaCottage/scripts.inc @@ -29,10 +29,8 @@ Route25_SeaCottage_EventScript_Bill:: goto_if_set FLAG_GOT_SS_TICKET, Route25_SeaCottage_EventScript_BillGoToSSAnne goto_if_set FLAG_HELPED_BILL_IN_SEA_COTTAGE, Route25_SeaCottage_EventScript_BillGiveSSTicket checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route25_SeaCottage_EventScript_BillAskForHelpMale - compare VAR_RESULT, FEMALE - goto_if_eq Route25_SeaCottage_EventScript_BillAskForHelpFemale + goto_if_eq VAR_RESULT, MALE, Route25_SeaCottage_EventScript_BillAskForHelpMale + goto_if_eq VAR_RESULT, FEMALE, Route25_SeaCottage_EventScript_BillAskForHelpFemale end Route25_SeaCottage_EventScript_BillAskForHelpMale:: @@ -46,19 +44,14 @@ Route25_SeaCottage_EventScript_BillAskForHelpFemale:: end Route25_SeaCottage_EventScript_BillAskForHelp:: - compare VAR_RESULT, NO - call_if_eq Route25_SeaCottage_EventScript_DeclineHelpBill + call_if_eq VAR_RESULT, NO, Route25_SeaCottage_EventScript_DeclineHelpBill msgbox Route25_SeaCottage_Text_RunCellSeparationOnPC closemessage delay 10 - compare VAR_FACING, DIR_SOUTH - call_if_eq Route25_SeaCottage_EventScript_BillWalkToTeleporterSouth - compare VAR_FACING, DIR_NORTH - call_if_eq Route25_SeaCottage_EventScript_BillWalkToTeleporter - compare VAR_FACING, DIR_WEST - call_if_eq Route25_SeaCottage_EventScript_BillWalkToTeleporter - compare VAR_FACING, DIR_EAST - call_if_eq Route25_SeaCottage_EventScript_BillWalkToTeleporter + call_if_eq VAR_FACING, DIR_SOUTH, Route25_SeaCottage_EventScript_BillWalkToTeleporterSouth + call_if_eq VAR_FACING, DIR_NORTH, Route25_SeaCottage_EventScript_BillWalkToTeleporter + call_if_eq VAR_FACING, DIR_WEST, Route25_SeaCottage_EventScript_BillWalkToTeleporter + call_if_eq VAR_FACING, DIR_EAST, Route25_SeaCottage_EventScript_BillWalkToTeleporter opendoor 10, 3 waitdooranim applymovement LOCALID_BILL_CLEFAIRY, Route25_SeaCottage_Movement_BillEnterTeleporter @@ -74,10 +67,8 @@ Route25_SeaCottage_EventScript_BillAskForHelp:: @ Just returns after message, execution continues as if player had said yes Route25_SeaCottage_EventScript_DeclineHelpBill:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route25_SeaCottage_EventScript_DeclineHelpBillMale - compare VAR_RESULT, FEMALE - call_if_eq Route25_SeaCottage_EventScript_DeclineHelpBillFemale + call_if_eq VAR_RESULT, MALE, Route25_SeaCottage_EventScript_DeclineHelpBillMale + call_if_eq VAR_RESULT, FEMALE, Route25_SeaCottage_EventScript_DeclineHelpBillFemale return Route25_SeaCottage_EventScript_DeclineHelpBillMale:: @@ -106,13 +97,10 @@ Route25_SeaCottage_EventScript_BillGoToSSAnne:: Route25_SeaCottage_EventScript_BillGiveSSTicket:: famechecker FAMECHECKER_BILL, FCPICKSTATE_COLORED, UpdatePickStateFromSpecialVar8005 checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route25_SeaCottage_EventScript_BillThanksMale - compare VAR_RESULT, FEMALE - call_if_eq Route25_SeaCottage_EventScript_BillThanksFemale + call_if_eq VAR_RESULT, MALE, Route25_SeaCottage_EventScript_BillThanksMale + call_if_eq VAR_RESULT, FEMALE, Route25_SeaCottage_EventScript_BillThanksFemale checkitemspace ITEM_SS_TICKET - compare VAR_RESULT, FALSE - goto_if_eq Route25_SeaCottage_EventScript_NoRoomForSSTicket + goto_if_eq VAR_RESULT, FALSE, Route25_SeaCottage_EventScript_NoRoomForSSTicket giveitem_msg Route25_SeaCottage_Text_ReceivedSSTicketFromBill, ITEM_SS_TICKET, 1, MUS_OBTAIN_KEY_ITEM setflag FLAG_GOT_SS_TICKET_DUP setflag FLAG_HIDE_NUGGET_BRIDGE_ROCKET diff --git a/data/maps/Route2_EastBuilding/scripts.inc b/data/maps/Route2_EastBuilding/scripts.inc index 57f997f2d..40ffb77da 100644 --- a/data/maps/Route2_EastBuilding/scripts.inc +++ b/data/maps/Route2_EastBuilding/scripts.inc @@ -9,18 +9,15 @@ Route2_EastBuilding_EventScript_Aide:: call Route2_EastBuilding_EventScript_GetAideRequestInfo goto_if_set FLAG_GOT_HM05, Route2_EastBuilding_EventScript_AlreadyGotHM05 msgbox Route2_EastBuilding_Text_GiveHM05IfSeen10Mons, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Aide_EventScript_DeclineCheckMons + goto_if_eq VAR_RESULT, NO, Aide_EventScript_DeclineCheckMons setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetPokedexCount buffernumberstring STR_VAR_3, VAR_0x8006 call Route2_EastBuilding_EventScript_GetAideRequestInfo - compare VAR_0x8006, REQUIRED_SEEN_MONS - goto_if_lt Aide_EventScript_HaventCaughtEnough + goto_if_lt VAR_0x8006, REQUIRED_SEEN_MONS, Aide_EventScript_HaventCaughtEnough msgbox Route2_EastBuilding_Text_GreatHereYouGo checkitemspace ITEM_HM05 - compare VAR_RESULT, FALSE - goto_if_eq Aide_EventScript_NoRoomForItem + goto_if_eq VAR_RESULT, FALSE, Aide_EventScript_NoRoomForItem giveitem_msg Route2_EastBuilding_Text_ReceivedHM05FromAide, ITEM_HM05 setflag FLAG_GOT_HM05 msgbox Route2_EastBuilding_Text_ExplainHM05 diff --git a/data/maps/Route2_House/scripts.inc b/data/maps/Route2_House/scripts.inc index c252e38b3..7ee088f62 100644 --- a/data/maps/Route2_House/scripts.inc +++ b/data/maps/Route2_House/scripts.inc @@ -12,14 +12,11 @@ Route2_House_EventScript_Reyley:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_MIMIEN_TRADE, Route2_House_EventScript_AlreadyTraded msgbox Trade_Text_LookingForMonWannaTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route2_House_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, Route2_House_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge Route2_House_EventScript_DeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, Route2_House_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne Route2_House_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, Route2_House_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_HeyThanks setflag FLAG_DID_MIMIEN_TRADE diff --git a/data/maps/Route4_PokemonCenter_1F/scripts.inc b/data/maps/Route4_PokemonCenter_1F/scripts.inc index a64e55883..32d2ff660 100644 --- a/data/maps/Route4_PokemonCenter_1F/scripts.inc +++ b/data/maps/Route4_PokemonCenter_1F/scripts.inc @@ -26,10 +26,8 @@ Route4_PokemonCenter_1F_EventScript_MagikarpSalesman:: goto_if_set FLAG_BOUGHT_MAGIKARP, Route4_PokemonCenter_1F_EventScript_AlreadyBoughtMagikarp showmoneybox 0, 0 checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpMale - compare VAR_RESULT, FEMALE - goto_if_eq Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpFemale + goto_if_eq VAR_RESULT, MALE, Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpMale + goto_if_eq VAR_RESULT, FEMALE, Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpFemale end Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpMale:: @@ -43,27 +41,21 @@ Route4_PokemonCenter_1F_EventScript_AskBuyMagikarpFemale:: end Route4_PokemonCenter_1F_EventScript_TryBuyMagikarp:: - compare VAR_RESULT, NO - goto_if_eq Route4_PokemonCenter_1F_EventScript_DeclineMagikarp + goto_if_eq VAR_RESULT, NO, Route4_PokemonCenter_1F_EventScript_DeclineMagikarp checkmoney MAGIKARP_PRICE - compare VAR_RESULT, FALSE - goto_if_eq Route4_PokemonCenter_1F_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, Route4_PokemonCenter_1F_EventScript_NotEnoughMoney textcolor NPC_TEXT_COLOR_NEUTRAL setvar VAR_TEMP_1, SPECIES_MAGIKARP givemon SPECIES_MAGIKARP, 5 - compare VAR_RESULT, 0 - goto_if_eq Route4_PokemonCenter_1F_EventScript_BuyMagikarpParty - compare VAR_RESULT, 1 - goto_if_eq Route4_PokemonCenter_1F_EventScript_BuyMagikarpPC - compare VAR_RESULT, 2 - goto_if_eq Route4_PokemonCenter_1F_EventScript_NoRoomForMagikarp + goto_if_eq VAR_RESULT, 0, Route4_PokemonCenter_1F_EventScript_BuyMagikarpParty + goto_if_eq VAR_RESULT, 1, Route4_PokemonCenter_1F_EventScript_BuyMagikarpPC + goto_if_eq VAR_RESULT, 2, Route4_PokemonCenter_1F_EventScript_NoRoomForMagikarp end Route4_PokemonCenter_1F_EventScript_BuyMagikarpParty:: call Route4_PokemonCenter_1F_EventScript_PayForMagikarp msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp + goto_if_eq VAR_RESULT, NO, Route4_PokemonCenter_1F_EventScript_EndPurchaseMagikarp call EventScript_GetGiftMonPartySlot fadescreen FADE_TO_BLACK hidemoneybox @@ -75,8 +67,7 @@ Route4_PokemonCenter_1F_EventScript_BuyMagikarpParty:: Route4_PokemonCenter_1F_EventScript_BuyMagikarpPC:: call Route4_PokemonCenter_1F_EventScript_PayForMagikarp msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route4_PokemonCenter_1F_EventScript_TransferMagikarpCloseMoneyBox + goto_if_eq VAR_RESULT, NO, Route4_PokemonCenter_1F_EventScript_TransferMagikarpCloseMoneyBox fadescreen FADE_TO_BLACK hidemoneybox special ChangeBoxPokemonNickname diff --git a/data/maps/Route5_SouthEntrance/scripts.inc b/data/maps/Route5_SouthEntrance/scripts.inc index 686a03f8b..60d5a5748 100644 --- a/data/maps/Route5_SouthEntrance/scripts.inc +++ b/data/maps/Route5_SouthEntrance/scripts.inc @@ -43,12 +43,9 @@ Route5_SouthEntrance_EventScript_GiveTea:: Route5_SouthEntrance_EventScript_GuardDrinkTea:: msgbox Route5_SouthEntrance_Text_ThatTeaLooksTasty closemessage - compare VAR_TEMP_1, 0 - call_if_eq Route5_SouthEntrance_EventScript_WalkToGuardLeft - compare VAR_TEMP_1, 1 - call_if_eq Route5_SouthEntrance_EventScript_WalkToGuardMid - compare VAR_TEMP_1, 2 - call_if_eq Route5_SouthEntrance_EventScript_WalkToGuardRight + call_if_eq VAR_TEMP_1, 0, Route5_SouthEntrance_EventScript_WalkToGuardLeft + call_if_eq VAR_TEMP_1, 1, Route5_SouthEntrance_EventScript_WalkToGuardMid + call_if_eq VAR_TEMP_1, 2, Route5_SouthEntrance_EventScript_WalkToGuardRight msgbox Route5_SouthEntrance_Text_ThanksIllShareTeaWithGuards setvar VAR_MAP_SCENE_ROUTE5_ROUTE6_ROUTE7_ROUTE8_GATES, 1 releaseall diff --git a/data/maps/Route6_NorthEntrance/scripts.inc b/data/maps/Route6_NorthEntrance/scripts.inc index a817e83b2..00961fb86 100644 --- a/data/maps/Route6_NorthEntrance/scripts.inc +++ b/data/maps/Route6_NorthEntrance/scripts.inc @@ -43,12 +43,9 @@ Route6_NorthEntrance_EventScript_GiveTea:: Route6_NorthEntrance_EventScript_GuardDrinkTea:: msgbox Route6_NorthEntrance_Text_ThatTeaLooksTasty closemessage - compare VAR_TEMP_1, 0 - call_if_eq Route6_NorthEntrance_EventScript_WalkToGuardLeft - compare VAR_TEMP_1, 1 - call_if_eq Route6_NorthEntrance_EventScript_WalkToGuardMid - compare VAR_TEMP_1, 2 - call_if_eq Route6_NorthEntrance_EventScript_WalkToGuardRight + call_if_eq VAR_TEMP_1, 0, Route6_NorthEntrance_EventScript_WalkToGuardLeft + call_if_eq VAR_TEMP_1, 1, Route6_NorthEntrance_EventScript_WalkToGuardMid + call_if_eq VAR_TEMP_1, 2, Route6_NorthEntrance_EventScript_WalkToGuardRight msgbox Route6_NorthEntrance_Text_ThanksIllShareTeaWithGuards setvar VAR_MAP_SCENE_ROUTE5_ROUTE6_ROUTE7_ROUTE8_GATES, 1 releaseall diff --git a/data/maps/Route7_EastEntrance/scripts.inc b/data/maps/Route7_EastEntrance/scripts.inc index cd9bc2807..a5dadcddd 100644 --- a/data/maps/Route7_EastEntrance/scripts.inc +++ b/data/maps/Route7_EastEntrance/scripts.inc @@ -43,12 +43,9 @@ Route7_EastEntrance_EventScript_GiveTea:: Route7_EastEntrance_EventScript_GuardDrinkTea:: msgbox Route7_EastEntrance_Text_ThatTeaLooksTasty closemessage - compare VAR_TEMP_1, 0 - call_if_eq Route7_EastEntrance_WalkToGuardTop - compare VAR_TEMP_1, 1 - call_if_eq Route7_EastEntrance_WalkToGuardMid - compare VAR_TEMP_1, 2 - call_if_eq Route7_EastEntrance_WalkToGuardBottom + call_if_eq VAR_TEMP_1, 0, Route7_EastEntrance_WalkToGuardTop + call_if_eq VAR_TEMP_1, 1, Route7_EastEntrance_WalkToGuardMid + call_if_eq VAR_TEMP_1, 2, Route7_EastEntrance_WalkToGuardBottom msgbox Route7_EastEntrance_Text_ThanksIllShareTeaWithGuards setvar VAR_MAP_SCENE_ROUTE5_ROUTE6_ROUTE7_ROUTE8_GATES, 1 releaseall diff --git a/data/maps/Route8_WestEntrance/scripts.inc b/data/maps/Route8_WestEntrance/scripts.inc index 6986887d4..6f4b752dd 100644 --- a/data/maps/Route8_WestEntrance/scripts.inc +++ b/data/maps/Route8_WestEntrance/scripts.inc @@ -55,12 +55,9 @@ Route8_WestEntrance_EventScript_GiveLemonade:: Route8_WestEntrance_EventScript_GuardDrinkTea:: msgbox Route8_WestEntrance_Text_ThatTeaLooksTasty closemessage - compare VAR_TEMP_1, 0 - call_if_eq Route8_WestEntrance_EventScript_WalkToGuardTop - compare VAR_TEMP_1, 1 - call_if_eq Route8_WestEntrance_EventScript_WalkToGuardMid - compare VAR_TEMP_1, 2 - call_if_eq Route8_WestEntrance_EventScript_WalkToGuardBottom + call_if_eq VAR_TEMP_1, 0, Route8_WestEntrance_EventScript_WalkToGuardTop + call_if_eq VAR_TEMP_1, 1, Route8_WestEntrance_EventScript_WalkToGuardMid + call_if_eq VAR_TEMP_1, 2, Route8_WestEntrance_EventScript_WalkToGuardBottom msgbox Route8_WestEntrance_Text_ThanksIllShareTeaWithGuards setvar VAR_MAP_SCENE_ROUTE5_ROUTE6_ROUTE7_ROUTE8_GATES, 1 releaseall diff --git a/data/maps/SSAnne_1F_Room4/scripts.inc b/data/maps/SSAnne_1F_Room4/scripts.inc index c2fe4a166..2af139b97 100644 --- a/data/maps/SSAnne_1F_Room4/scripts.inc +++ b/data/maps/SSAnne_1F_Room4/scripts.inc @@ -5,8 +5,7 @@ SSAnne_1F_Room4_EventScript_Woman:: lock faceplayer checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SSAnne_1F_Room4_EventScript_WomanPlayerMale + goto_if_eq VAR_RESULT, MALE, SSAnne_1F_Room4_EventScript_WomanPlayerMale msgbox SSAnne_1F_Room4_Text_WaitressCherryPiePlease release end diff --git a/data/maps/SSAnne_1F_Room6/scripts.inc b/data/maps/SSAnne_1F_Room6/scripts.inc index d416dd818..7024b8273 100644 --- a/data/maps/SSAnne_1F_Room6/scripts.inc +++ b/data/maps/SSAnne_1F_Room6/scripts.inc @@ -5,8 +5,7 @@ SSAnne_1F_Room6_EventScript_Woman:: lock faceplayer msgbox SSAnne_1F_Room6_Text_TakeAShortRest, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SSAnne_1F_Room6_EventScript_DeclineHeal + goto_if_eq VAR_RESULT, NO, SSAnne_1F_Room6_EventScript_DeclineHeal closemessage call EventScript_OutOfCenterPartyHeal msgbox SSAnne_1F_Room6_Text_GladEveryoneIsRefreshed @@ -15,8 +14,7 @@ SSAnne_1F_Room6_EventScript_Woman:: SSAnne_1F_Room6_EventScript_DeclineHeal:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SSAnne_1F_Room6_EventScript_DeclineHealMale + goto_if_eq VAR_RESULT, MALE, SSAnne_1F_Room6_EventScript_DeclineHealMale msgbox SSAnne_1F_Room6_Text_SorryYouLookLikeMySister release end diff --git a/data/maps/SSAnne_2F_Corridor/scripts.inc b/data/maps/SSAnne_2F_Corridor/scripts.inc index 4d1c8edfc..fb2e10931 100644 --- a/data/maps/SSAnne_2F_Corridor/scripts.inc +++ b/data/maps/SSAnne_2F_Corridor/scripts.inc @@ -31,30 +31,21 @@ SSAnne_2F_Corridor_EventScript_RivalTrigger:: applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestDown waitmovement 0 delay 20 - compare VAR_TEMP_1, 0 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalApproachMid - compare VAR_TEMP_1, 2 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalApproachRight + call_if_eq VAR_TEMP_1, 0, SSAnne_2F_Corridor_EventScript_RivalApproachLeft + call_if_eq VAR_TEMP_1, 1, SSAnne_2F_Corridor_EventScript_RivalApproachMid + call_if_eq VAR_TEMP_1, 2, SSAnne_2F_Corridor_EventScript_RivalApproachRight msgbox SSAnne_2F_Corridor_Text_RivalIntro setvar VAR_LAST_TALKED, LOCALID_RIVAL - compare VAR_STARTER_MON, 2 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalCharmander + call_if_eq VAR_STARTER_MON, 2, SSAnne_2F_Corridor_EventScript_RivalSquirtle + call_if_eq VAR_STARTER_MON, 1, SSAnne_2F_Corridor_EventScript_RivalBulbasaur + call_if_eq VAR_STARTER_MON, 0, SSAnne_2F_Corridor_EventScript_RivalCharmander msgbox SSAnne_2F_Corridor_Text_RivalPostBattle closemessage delay 10 playbgm MUS_RIVAL_EXIT, 0 - compare VAR_TEMP_1, 0 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalExitLeft - compare VAR_TEMP_1, 1 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalExitMid - compare VAR_TEMP_1, 2 - call_if_eq SSAnne_2F_Corridor_EventScript_RivalExitRight + call_if_eq VAR_TEMP_1, 0, SSAnne_2F_Corridor_EventScript_RivalExitLeft + call_if_eq VAR_TEMP_1, 1, SSAnne_2F_Corridor_EventScript_RivalExitMid + call_if_eq VAR_TEMP_1, 2, SSAnne_2F_Corridor_EventScript_RivalExitRight fadedefaultbgm removeobject LOCALID_RIVAL setvar VAR_MAP_SCENE_S_S_ANNE_2F_CORRIDOR, 1 diff --git a/data/maps/SSAnne_Exterior/scripts.inc b/data/maps/SSAnne_Exterior/scripts.inc index 3d00d7272..28c220936 100644 --- a/data/maps/SSAnne_Exterior/scripts.inc +++ b/data/maps/SSAnne_Exterior/scripts.inc @@ -16,10 +16,8 @@ SSAnne_Exterior_OnFrame:: SSAnne_Exterior_ExitSSAnne:: lockall getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8005, 6 - call_if_le SSAnne_Exterior_WalkDown - compare VAR_0x8005, 7 - call_if_ge SSAnne_Exterior_WalkInPlaceDown + call_if_le VAR_0x8005, 6, SSAnne_Exterior_WalkDown + call_if_ge VAR_0x8005, 7, SSAnne_Exterior_WalkInPlaceDown fadenewbgm MUS_SURF delay 50 special DoSSAnneDepartureCutscene diff --git a/data/maps/SSAnne_Kitchen/scripts.inc b/data/maps/SSAnne_Kitchen/scripts.inc index 7ce4c6a3e..f90554c88 100644 --- a/data/maps/SSAnne_Kitchen/scripts.inc +++ b/data/maps/SSAnne_Kitchen/scripts.inc @@ -19,12 +19,9 @@ SSAnne_Kitchen_EventScript_Chef4:: msgbox SSAnne_Kitchen_Text_IAmLeChefMainCourseIs random 3 copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 0 - call_if_eq SSAnne_Kitchen_EventScript_SalmonDuSalad - compare VAR_0x8008, 1 - call_if_eq SSAnne_Kitchen_EventScript_EelsAuBarbecue - compare VAR_0x8008, 2 - call_if_eq SSAnne_Kitchen_EventScript_PrimeBeefsteak + call_if_eq VAR_0x8008, 0, SSAnne_Kitchen_EventScript_SalmonDuSalad + call_if_eq VAR_0x8008, 1, SSAnne_Kitchen_EventScript_EelsAuBarbecue + call_if_eq VAR_0x8008, 2, SSAnne_Kitchen_EventScript_PrimeBeefsteak release end diff --git a/data/maps/SafariZone_SecretHouse/scripts.inc b/data/maps/SafariZone_SecretHouse/scripts.inc index 73ac94301..357359e2d 100644 --- a/data/maps/SafariZone_SecretHouse/scripts.inc +++ b/data/maps/SafariZone_SecretHouse/scripts.inc @@ -7,8 +7,7 @@ SafariZone_SecretHouse_EventScript_Attendant:: goto_if_set FLAG_GOT_HM03, SafariZone_SecretHouse_EventScript_ExplainSurf msgbox SafariZone_SecretHouse_Text_CongratsYouveWon checkitemspace ITEM_HM03 - compare VAR_RESULT, FALSE - goto_if_eq SafariZone_SecretHouse_EventScript_NoRoomForHM03 + goto_if_eq VAR_RESULT, FALSE, SafariZone_SecretHouse_EventScript_NoRoomForHM03 giveitem_msg SafariZone_SecretHouse_Text_ReceivedHM03FromAttendant, ITEM_HM03 msgbox SafariZone_SecretHouse_Text_ExplainSurf setflag FLAG_GOT_HM03 diff --git a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc index a0e19293b..12f8ada3c 100644 --- a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc +++ b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc @@ -23,13 +23,10 @@ SaffronCity_CopycatsHouse_2F_EventScript_Copycat:: lock faceplayer checkitem ITEM_POKE_DOLL - compare VAR_RESULT, TRUE - goto_if_eq EventScript_MimicTutor + goto_if_eq VAR_RESULT, TRUE, EventScript_MimicTutor checkplayergender - compare VAR_RESULT, MALE - call_if_eq SaffronCity_CopycatsHouse_2F_EventScript_MimicPlayerMale - compare VAR_RESULT, FEMALE - call_if_eq SaffronCity_CopycatsHouse_2F_EventScript_MimicPlayerFemale + call_if_eq VAR_RESULT, MALE, SaffronCity_CopycatsHouse_2F_EventScript_MimicPlayerMale + call_if_eq VAR_RESULT, FEMALE, SaffronCity_CopycatsHouse_2F_EventScript_MimicPlayerFemale release end diff --git a/data/maps/SaffronCity_Dojo/scripts.inc b/data/maps/SaffronCity_Dojo/scripts.inc index 2989c218a..cc58ae3a6 100644 --- a/data/maps/SaffronCity_Dojo/scripts.inc +++ b/data/maps/SaffronCity_Dojo/scripts.inc @@ -30,8 +30,7 @@ SaffronCity_Dojo_EventScript_HitmonleeBall:: textcolor NPC_TEXT_COLOR_MALE msgbox SaffronCity_Dojo_Text_YouWantHitmonlee, MSGBOX_YESNO call EventScript_RestorePrevTextColor - compare VAR_RESULT, YES - goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon + goto_if_eq VAR_RESULT, YES, SaffronCity_Dojo_EventScript_GiveHitmon hidemonpic release end @@ -52,8 +51,7 @@ SaffronCity_Dojo_EventScript_HitmonchanBall:: textcolor NPC_TEXT_COLOR_MALE msgbox SaffronCity_Dojo_Text_YouWantHitmonchan, MSGBOX_YESNO call EventScript_RestorePrevTextColor - compare VAR_RESULT, YES - goto_if_eq SaffronCity_Dojo_EventScript_GiveHitmon + goto_if_eq VAR_RESULT, YES, SaffronCity_Dojo_EventScript_GiveHitmon hidemonpic release end @@ -61,12 +59,9 @@ SaffronCity_Dojo_EventScript_HitmonchanBall:: SaffronCity_Dojo_EventScript_GiveHitmon:: hidemonpic givemon VAR_TEMP_1, 25 - compare VAR_RESULT, 0 - goto_if_eq SaffronCity_Dojo_EventScript_ReceivedHitmonParty - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_Dojo_EventScript_ReceivedHitmonPC - compare VAR_RESULT, 2 - goto_if_eq EventScript_NoMoreRoomForPokemon + goto_if_eq VAR_RESULT, 0, SaffronCity_Dojo_EventScript_ReceivedHitmonParty + goto_if_eq VAR_RESULT, 1, SaffronCity_Dojo_EventScript_ReceivedHitmonPC + goto_if_eq VAR_RESULT, 2, EventScript_NoMoreRoomForPokemon release end @@ -79,8 +74,7 @@ SaffronCity_Dojo_EventScript_ReceivedHitmonParty:: waitfanfare setflag FLAG_GOT_HITMON_FROM_DOJO msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SaffronCity_Dojo_EventScript_EndGiveMon + goto_if_eq VAR_RESULT, NO, SaffronCity_Dojo_EventScript_EndGiveMon call EventScript_GetGiftMonPartySlot call EventScript_ChangePokemonNickname goto SaffronCity_Dojo_EventScript_EndGiveMon @@ -95,8 +89,7 @@ SaffronCity_Dojo_EventScript_ReceivedHitmonPC:: waitfanfare setflag FLAG_GOT_HITMON_FROM_DOJO msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SaffronCity_Dojo_EventScript_TransferredHitmonToPC + goto_if_eq VAR_RESULT, NO, SaffronCity_Dojo_EventScript_TransferredHitmonToPC call EventScript_NameReceivedBoxMon goto SaffronCity_Dojo_EventScript_TransferredHitmonToPC end diff --git a/data/maps/SaffronCity_Gym/scripts.inc b/data/maps/SaffronCity_Gym/scripts.inc index 932554c0b..c9b1873fb 100644 --- a/data/maps/SaffronCity_Gym/scripts.inc +++ b/data/maps/SaffronCity_Gym/scripts.inc @@ -22,8 +22,7 @@ SaffronCity_Gym_EventScript_DefeatedSabrina:: SaffronCity_Gym_EventScript_GiveTM04:: msgbox SaffronCity_Gym_Text_ExplainMarshBadgeTakeThis checkitemspace ITEM_TM04 - compare VAR_RESULT, FALSE - goto_if_eq SaffronCity_Gym_EventScript_NoRoomForTM04 + goto_if_eq VAR_RESULT, FALSE, SaffronCity_Gym_EventScript_NoRoomForTM04 giveitem_msg SaffronCity_Gym_Text_ReceivedTM04FromSabrina, ITEM_TM04 setflag FLAG_GOT_TM04_FROM_SABRINA msgbox SaffronCity_Gym_Text_SabrinaPostBattle diff --git a/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc b/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc index 724850fde..725d92d12 100644 --- a/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc +++ b/data/maps/SaffronCity_MrPsychicsHouse/scripts.inc @@ -7,8 +7,7 @@ SaffronCity_MrPsychicsHouse_EventScript_MrPsychic:: goto_if_set FLAG_GOT_TM29_FROM_MR_PSYCHIC, SaffronCity_MrPsychicsHouse_EventScript_AlreadyGotTM29 msgbox SaffronCity_MrPsychicsHouse_Text_YouWantedThis checkitemspace ITEM_TM29 - compare VAR_RESULT, FALSE - goto_if_eq SaffronCity_MrPsychicsHouse_EventScript_NoRoomForTM29 + goto_if_eq VAR_RESULT, FALSE, SaffronCity_MrPsychicsHouse_EventScript_NoRoomForTM29 giveitem_msg SaffronCity_MrPsychicsHouse_Text_ReceivedTM29FromMrPsychic, ITEM_TM29 msgbox SaffronCity_MrPsychicsHouse_Text_ExplainTM29 setflag FLAG_GOT_TM29_FROM_MR_PSYCHIC diff --git a/data/maps/SaffronCity_PokemonCenter_1F/scripts.inc b/data/maps/SaffronCity_PokemonCenter_1F/scripts.inc index 24986f8e8..8b4390f0a 100644 --- a/data/maps/SaffronCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/SaffronCity_PokemonCenter_1F/scripts.inc @@ -25,8 +25,7 @@ SaffronCity_PokemonCenter_1F_EventScript_Woman:: SaffronCity_PokemonCenter_1F_EventScript_Youngster:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_eq SaffronCity_PokemonCenter_1F_EventScript_YoungsterRocketsGone + goto_if_eq VAR_MAP_SCENE_SILPH_CO_11F, 1, SaffronCity_PokemonCenter_1F_EventScript_YoungsterRocketsGone msgbox SaffronCity_PokemonCenter_1F_Text_GreatIfEliteFourCameBeatRockets release end diff --git a/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc b/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc index ea0d838da..767ac508f 100644 --- a/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc +++ b/data/maps/SaffronCity_PokemonTrainerFanClub/scripts.inc @@ -84,46 +84,36 @@ LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer:: step_end SaffronCity_PokemonTrainerFanClub_OnTransition:: - compare VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_SetMemberPosForFirstMeeting - compare VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 2 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions + goto_if_eq VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 1, SaffronCity_PokemonTrainerFanClub_EventScript_SetMemberPosForFirstMeeting + goto_if_eq VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 2, SaffronCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions end SaffronCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions:: special Script_TryLoseFansFromPlayTime setvar VAR_0x8004, FANCLUB_MEMBER1 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER2 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember2ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember2ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER3 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember3ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember3ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER4 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember4ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember4ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER5 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember5ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember5ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER6 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember6ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember6ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER7 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember7ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember7ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER8 specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember8ToFarTable + call_if_eq VAR_RESULT, FALSE, SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember8ToFarTable end SaffronCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable:: @@ -179,22 +169,18 @@ SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirl:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER1 special Script_BufferFanClubTrainerName - compare VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlPlayerNotChampion + goto_if_eq VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0, SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlPlayerNotChampion specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_WasYourFanNotAnymore release end SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_BattleGirlOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_AlwaysCheerForYou release end @@ -219,22 +205,18 @@ SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirl:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER4 special Script_BufferFanClubTrainerName - compare VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayerNotChampion + goto_if_eq VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0, SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayerNotChampion specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_WantToBeLikeSabrina release end SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_WantToBeLikeYouOneDay release end @@ -259,22 +241,18 @@ SaffronCity_PokemonTrainerFanClub_EventScript_Youngster:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER2 special Script_BufferFanClubTrainerName - compare VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterPlayerNotChampion + goto_if_eq VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0, SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterPlayerNotChampion specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_BrocksMyHero release end SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_YoungsterOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_CanYouAutographShorts release end @@ -299,22 +277,18 @@ SaffronCity_PokemonTrainerFanClub_EventScript_Gentleman:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER3 special Script_BufferFanClubTrainerName - compare VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanPlayerNotChampion + goto_if_eq VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB, 0, SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanPlayerNotChampion specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_HmmAndYouAre release end SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_GentlemanOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_HadPleasureOfWatchingYouBattle release end @@ -340,19 +314,16 @@ SaffronCity_PokemonTrainerFanClub_EventScript_Woman:: setvar VAR_0x8004, FANCLUB_MEMBER6 special Script_BufferFanClubTrainerName specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_WomanOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_WomanOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_TrainerHasBeenOnFire release end SaffronCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_WomanOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_WomanOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_AdoreWayYouBattle release end @@ -373,19 +344,16 @@ SaffronCity_PokemonTrainerFanClub_EventScript_Rocker:: setvar VAR_0x8004, FANCLUB_MEMBER5 special Script_BufferFanClubTrainerName specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_RockerPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_RockerPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_RockerOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_RockerOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_LoveWayTrainerTalks release end SaffronCity_PokemonTrainerFanClub_EventScript_RockerPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_RockerOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_RockerOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_TheWayYouBattleIsCool release end @@ -406,19 +374,16 @@ SaffronCity_PokemonTrainerFanClub_EventScript_Beauty:: setvar VAR_0x8004, FANCLUB_MEMBER7 special Script_BufferFanClubTrainerName specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BeautyPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_BeautyPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BeautyOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_BeautyOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_WhyCantOthersSeeMastersDignity release end SaffronCity_PokemonTrainerFanClub_EventScript_BeautyPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BeautyOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_BeautyOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_YouReallyAreAmazing release end @@ -439,19 +404,16 @@ SaffronCity_PokemonTrainerFanClub_EventScript_BlackBelt:: setvar VAR_0x8004, FANCLUB_MEMBER8 special Script_BufferFanClubTrainerName specialvar VAR_RESULT, Script_IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BlackBeltPlayersFan + goto_if_eq VAR_RESULT, TRUE, SaffronCity_PokemonTrainerFanClub_EventScript_BlackBeltPlayersFan specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BlackBeltOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), SaffronCity_PokemonTrainerFanClub_EventScript_BlackBeltOnlyNonFan msgbox SaffronCity_PokemonTrainerFanClub_Text_OnlyMasterHasMyRespect release end SaffronCity_PokemonTrainerFanClub_EventScript_BlackBeltPlayersFan:: specialvar VAR_RESULT, Script_GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq SaffronCity_PokemonTrainerFanClub_EventScript_BlackBeltOnlyFan + goto_if_eq VAR_RESULT, 1, SaffronCity_PokemonTrainerFanClub_EventScript_BlackBeltOnlyFan msgbox SaffronCity_PokemonTrainerFanClub_Text_YourBattleStyleIsEducational release end diff --git a/data/maps/SeafoamIslands_B3F/scripts.inc b/data/maps/SeafoamIslands_B3F/scripts.inc index 5ef1303d1..353288d96 100644 --- a/data/maps/SeafoamIslands_B3F/scripts.inc +++ b/data/maps/SeafoamIslands_B3F/scripts.inc @@ -14,8 +14,7 @@ SeafoamIslands_B3F_EventScript_CheckStoppedCurrent:: setvar NUM_BOULDERS_PRESENT, 0 call_if_unset FLAG_HIDE_SEAFOAM_B3F_BOULDER_1, SeafoamIslands_B3F_EventScript_AddBoulderPresent call_if_unset FLAG_HIDE_SEAFOAM_B3F_BOULDER_2, SeafoamIslands_B3F_EventScript_AddBoulderPresent - compare NUM_BOULDERS_PRESENT, 2 - call_if_eq SeafoamIslands_B3F_EventScript_StoppedCurrent + call_if_eq NUM_BOULDERS_PRESENT, 2, SeafoamIslands_B3F_EventScript_StoppedCurrent return SeafoamIslands_B3F_EventScript_StoppedCurrent:: @@ -35,13 +34,10 @@ SeafoamIslands_B3F_EventScript_EnterByFalling:: setvar NUM_BOULDERS_PRESENT, 0 call_if_unset FLAG_HIDE_SEAFOAM_B3F_BOULDER_1, SeafoamIslands_B3F_EventScript_AddBoulderPresent call_if_unset FLAG_HIDE_SEAFOAM_B3F_BOULDER_2, SeafoamIslands_B3F_EventScript_AddBoulderPresent - compare NUM_BOULDERS_PRESENT, 2 - goto_if_eq SeafoamIslands_B3F_EventScript_CurrentBlocked + goto_if_eq NUM_BOULDERS_PRESENT, 2, SeafoamIslands_B3F_EventScript_CurrentBlocked getplayerxy VAR_0x8008, VAR_0x8009 - compare VAR_0x8008, 24 - call_if_lt SeafoamIslands_B3F_EventScript_RideCurrentFar - compare VAR_0x8008, 24 - call_if_ge SeafoamIslands_B3F_EventScript_RideCurrentClose + call_if_lt VAR_0x8008, 24, SeafoamIslands_B3F_EventScript_RideCurrentFar + call_if_ge VAR_0x8008, 24, SeafoamIslands_B3F_EventScript_RideCurrentClose setvar VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F, 1 warp MAP_SEAFOAM_ISLANDS_B4F, 27, 21 waitstate diff --git a/data/maps/SeafoamIslands_B4F/scripts.inc b/data/maps/SeafoamIslands_B4F/scripts.inc index 40b91f698..9b25c704a 100644 --- a/data/maps/SeafoamIslands_B4F/scripts.inc +++ b/data/maps/SeafoamIslands_B4F/scripts.inc @@ -14,8 +14,7 @@ SeafoamIslands_B4F_OnResume:: SeafoamIslands_B4F_EventScript_TryRemoveArticuno:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne EventScript_Return + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, EventScript_Return removeobject VAR_LAST_TALKED return @@ -29,8 +28,7 @@ SeafoamIslands_B4F_EventScript_CheckStoppedCurrent:: setvar NUM_BOULDERS_PRESENT, 0 call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, SeafoamIslands_B4F_EventScript_AddBoulderPresent call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, SeafoamIslands_B4F_EventScript_AddBoulderPresent - compare NUM_BOULDERS_PRESENT, 2 - call_if_eq SeafoamIslands_B4F_EventScript_StoppedCurrent + call_if_eq NUM_BOULDERS_PRESENT, 2, SeafoamIslands_B4F_EventScript_StoppedCurrent return SeafoamIslands_B4F_EventScript_StoppedCurrent:: @@ -49,8 +47,7 @@ SeafoamIslands_B4F_OnLoad:: setvar NUM_BOULDERS_PRESENT, 0 call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, SeafoamIslands_B4F_EventScript_AddBoulderPresent call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, SeafoamIslands_B4F_EventScript_AddBoulderPresent - compare NUM_BOULDERS_PRESENT, 2 - goto_if_eq SeafoamIslands_B4F_EventScript_SetCalmWaterNearStairs + goto_if_eq NUM_BOULDERS_PRESENT, 2, SeafoamIslands_B4F_EventScript_SetCalmWaterNearStairs end SeafoamIslands_B4F_EventScript_SetCalmWaterNearStairs:: @@ -93,13 +90,10 @@ SeafoamIslands_B4F_EventScript_EnterByFalling:: setvar NUM_BOULDERS_PRESENT, 0 call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_1, SeafoamIslands_B4F_EventScript_AddBoulderPresent call_if_unset FLAG_HIDE_SEAFOAM_B4F_BOULDER_2, SeafoamIslands_B4F_EventScript_AddBoulderPresent - compare NUM_BOULDERS_PRESENT, 2 - goto_if_eq SeafoamIslands_B4F_EventScript_CurrentBlocked + goto_if_eq NUM_BOULDERS_PRESENT, 2, SeafoamIslands_B4F_EventScript_CurrentBlocked getplayerxy VAR_0x8008, VAR_0x8009 - compare VAR_0x8008, 9 - call_if_lt SeafoamIslands_B4F_EventScript_RideCurrentFar - compare VAR_0x8008, 9 - call_if_ge SeafoamIslands_B4F_EventScript_RideCurrentClose + call_if_lt VAR_0x8008, 9, SeafoamIslands_B4F_EventScript_RideCurrentFar + call_if_ge VAR_0x8008, 9, SeafoamIslands_B4F_EventScript_RideCurrentClose special SeafoamIslandsB4F_CurrentDumpsPlayerOnLand setvar VAR_TEMP_1, 0 releaseall @@ -176,12 +170,9 @@ SeafoamIslands_B4F_EventScript_Articuno:: waitstate clearflag FLAG_SYS_SPECIAL_WILD_BATTLE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq SeafoamIslands_B4F_EventScript_DefeatedArticuno - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq SeafoamIslands_B4F_EventScript_RanFromArticuno - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq SeafoamIslands_B4F_EventScript_RanFromArticuno + goto_if_eq VAR_RESULT, B_OUTCOME_WON, SeafoamIslands_B4F_EventScript_DefeatedArticuno + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SeafoamIslands_B4F_EventScript_RanFromArticuno + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SeafoamIslands_B4F_EventScript_RanFromArticuno setflag FLAG_FOUGHT_ARTICUNO release end diff --git a/data/maps/SevenIsland_House_Room1/scripts.inc b/data/maps/SevenIsland_House_Room1/scripts.inc index a7c536a30..5982f4a83 100644 --- a/data/maps/SevenIsland_House_Room1/scripts.inc +++ b/data/maps/SevenIsland_House_Room1/scripts.inc @@ -9,10 +9,8 @@ SevenIsland_House_Room1_MapScripts:: SevenIsland_House_Room1_OnTransition:: special ValidateEReaderTrainer - compare VAR_RESULT, 0 - call_if_eq SevenIsland_House_Room1_EventScript_SetTrainerVisitingLayout - compare VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 0 - call_if_ne SevenIsland_House_Room1_EventScript_MoveOldWomanToDoor + call_if_eq VAR_RESULT, 0, SevenIsland_House_Room1_EventScript_SetTrainerVisitingLayout + call_if_ne VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 0, SevenIsland_House_Room1_EventScript_MoveOldWomanToDoor end SevenIsland_House_Room1_EventScript_SetTrainerVisitingLayout:: @@ -43,12 +41,9 @@ SevenIsland_House_Room1_EventScript_OldWomanCommentOnBattle:: copyobjectxytoperm LOCALID_OLD_WOMAN applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestUp waitmovement 0 - compare VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 1 - call_if_eq SevenIsland_House_Room1_EventScript_BattleWonComment - compare VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 2 - call_if_eq SevenIsland_House_Room1_EventScript_BattleLostComment - compare VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 3 - call_if_eq SevenIsland_House_Room1_EventScript_BattleTiedComment + call_if_eq VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 1, SevenIsland_House_Room1_EventScript_BattleWonComment + call_if_eq VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 2, SevenIsland_House_Room1_EventScript_BattleLostComment + call_if_eq VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 3, SevenIsland_House_Room1_EventScript_BattleTiedComment special LoadPlayerParty setvar VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1, 0 releaseall @@ -79,10 +74,8 @@ SevenIsland_House_Room1_EventScript_OldWoman:: lock faceplayer special ValidateEReaderTrainer - compare VAR_RESULT, 1 - call_if_eq SevenIsland_House_Room1_EventScript_InvalidVisitingTrainer - compare TRAINER_VISITING, TRUE - goto_if_eq SevenIsland_House_Room1_EventScript_TrainerVisiting + call_if_eq VAR_RESULT, 1, SevenIsland_House_Room1_EventScript_InvalidVisitingTrainer + goto_if_eq TRAINER_VISITING, TRUE, SevenIsland_House_Room1_EventScript_TrainerVisiting msgbox SevenIsland_House_Room1_Text_OnlyEnjoymentWatchingBattles release end @@ -96,28 +89,21 @@ SevenIsland_House_Room1_EventScript_TrainerVisiting:: special SavePlayerParty special BufferEReaderTrainerName msgbox SevenIsland_House_Room1_Text_ChallengeVisitingTrainer, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SevenIsland_House_Room1_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, NO, SevenIsland_House_Room1_EventScript_DeclineBattle call SevenIsland_House_Room1_EventScript_ChooseParty - compare VAR_RESULT, 0 - goto_if_eq SevenIsland_House_Room1_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, 0, SevenIsland_House_Room1_EventScript_DeclineBattle msgbox SevenIsland_House_Room1_Text_SaveProgressBeforeBattle, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SevenIsland_House_Room1_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, NO, SevenIsland_House_Room1_EventScript_DeclineBattle special LoadPlayerParty call EventScript_AskSaveGame - compare VAR_RESULT, 0 - goto_if_eq SevenIsland_House_Room1_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, 0, SevenIsland_House_Room1_EventScript_DeclineBattle special SavePlayerParty special ReducePlayerPartyToThree msgbox SevenIsland_House_Room1_Text_DontHoldAnythingBack closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq SevenIsland_House_Room1_EventScript_EnterBattleRoomNorth - compare VAR_FACING, DIR_EAST - call_if_eq SevenIsland_House_Room1_EventScript_EnterBattleRoomEast - compare VAR_FACING, DIR_WEST - call_if_eq SevenIsland_House_Room1_EventScript_EnterBattleRoomWest + call_if_eq VAR_FACING, DIR_NORTH, SevenIsland_House_Room1_EventScript_EnterBattleRoomNorth + call_if_eq VAR_FACING, DIR_EAST, SevenIsland_House_Room1_EventScript_EnterBattleRoomEast + call_if_eq VAR_FACING, DIR_WEST, SevenIsland_House_Room1_EventScript_EnterBattleRoomWest warp MAP_SEVEN_ISLAND_HOUSE_ROOM2, 3, 1 waitstate release diff --git a/data/maps/SevenIsland_House_Room2/scripts.inc b/data/maps/SevenIsland_House_Room2/scripts.inc index cc1e6dd8f..e55eaa2aa 100644 --- a/data/maps/SevenIsland_House_Room2/scripts.inc +++ b/data/maps/SevenIsland_House_Room2/scripts.inc @@ -22,12 +22,9 @@ SevenIsland_House_Room2_EventScript_BattleVisitingTrainer:: setvar VAR_0x8005, 0 special StartSpecialBattle waitstate - compare VAR_RESULT, 3 - call_if_eq SevenIsland_House_Room2_EventScript_BattleTie - compare VAR_RESULT, 1 - call_if_eq SevenIsland_House_Room2_EventScript_BattleWon - compare VAR_RESULT, 2 - call_if_eq SevenIsland_House_Room2_EventScript_BattleLost + call_if_eq VAR_RESULT, 3, SevenIsland_House_Room2_EventScript_BattleTie + call_if_eq VAR_RESULT, 1, SevenIsland_House_Room2_EventScript_BattleWon + call_if_eq VAR_RESULT, 2, SevenIsland_House_Room2_EventScript_BattleLost closemessage special HealPlayerParty applymovement OBJ_EVENT_ID_PLAYER, SevenIsland_House_Room2_Movement_PlayerExitRoom diff --git a/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc b/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc index 4b5eebdb3..ce831f140 100644 --- a/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc +++ b/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc @@ -16,13 +16,11 @@ SevenIsland_SevaultCanyon_House_EventScript_BaldingMan:: msgbox SevenIsland_SevaultCanyon_House_Text_ChanseyDanceJoinIn textcolor NPC_TEXT_COLOR_NEUTRAL msgbox SevenIsland_SevaultCanyon_House_Text_WouldYouLikeToDance, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SevenIsland_SevaultCanyon_House_EventScript_DeclineDance + goto_if_eq VAR_RESULT, NO, SevenIsland_SevaultCanyon_House_EventScript_DeclineDance msgbox SevenIsland_SevaultCanyon_House_Text_DancedChanseyDance closemessage call EventScript_RestorePrevTextColor - compare VAR_FACING, DIR_SOUTH - call_if_ne SevenIsland_SevaultCanyon_House_EventScript_PlayerFaceDown + call_if_ne VAR_FACING, DIR_SOUTH, SevenIsland_SevaultCanyon_House_EventScript_PlayerFaceDown delay 30 playbgm MUS_SCHOOL, 0 applymovement OBJ_EVENT_ID_PLAYER, SevenIsland_SevaultCanyon_House_Movement_ChanseyDance diff --git a/data/maps/SevenIsland_SevaultCanyon_TanobyKey/scripts.inc b/data/maps/SevenIsland_SevaultCanyon_TanobyKey/scripts.inc index f7b0f96e2..d2d059ac1 100644 --- a/data/maps/SevenIsland_SevaultCanyon_TanobyKey/scripts.inc +++ b/data/maps/SevenIsland_SevaultCanyon_TanobyKey/scripts.inc @@ -37,78 +37,64 @@ SevenIsland_SevaultCanyon_TanobyKey_EventScript_MoveBouldersToSolvedPos:: SevenIsland_SevaultCanyon_TanobyKey_EventScript_Switch1:: lockall - compare VAR_TEMP_1, 100 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed + goto_if_eq VAR_TEMP_1, 100, SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed call SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchPressed setvar VAR_TEMP_1, 100 - compare NUM_SWITCHES_PRESSED, 7 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved + goto_if_eq NUM_SWITCHES_PRESSED, 7, SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved releaseall end SevenIsland_SevaultCanyon_TanobyKey_EventScript_Switch2:: lockall - compare VAR_TEMP_2, 100 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed + goto_if_eq VAR_TEMP_2, 100, SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed call SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchPressed setvar VAR_TEMP_2, 100 - compare NUM_SWITCHES_PRESSED, 7 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved + goto_if_eq NUM_SWITCHES_PRESSED, 7, SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved releaseall end SevenIsland_SevaultCanyon_TanobyKey_EventScript_Switch3:: lockall - compare VAR_TEMP_3, 100 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed + goto_if_eq VAR_TEMP_3, 100, SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed call SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchPressed setvar VAR_TEMP_3, 100 - compare NUM_SWITCHES_PRESSED, 7 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved + goto_if_eq NUM_SWITCHES_PRESSED, 7, SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved releaseall end SevenIsland_SevaultCanyon_TanobyKey_EventScript_Switch4:: lockall - compare VAR_TEMP_4, 100 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed + goto_if_eq VAR_TEMP_4, 100, SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed call SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchPressed setvar VAR_TEMP_4, 100 - compare NUM_SWITCHES_PRESSED, 7 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved + goto_if_eq NUM_SWITCHES_PRESSED, 7, SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved releaseall end SevenIsland_SevaultCanyon_TanobyKey_EventScript_Switch5:: lockall - compare VAR_TEMP_5, 100 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed + goto_if_eq VAR_TEMP_5, 100, SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed call SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchPressed setvar VAR_TEMP_5, 100 - compare NUM_SWITCHES_PRESSED, 7 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved + goto_if_eq NUM_SWITCHES_PRESSED, 7, SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved releaseall end SevenIsland_SevaultCanyon_TanobyKey_EventScript_Switch6:: lockall - compare VAR_TEMP_6, 100 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed + goto_if_eq VAR_TEMP_6, 100, SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed call SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchPressed setvar VAR_TEMP_6, 100 - compare NUM_SWITCHES_PRESSED, 7 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved + goto_if_eq NUM_SWITCHES_PRESSED, 7, SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved releaseall end SevenIsland_SevaultCanyon_TanobyKey_EventScript_Switch7:: lockall - compare VAR_TEMP_7, 100 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed + goto_if_eq VAR_TEMP_7, 100, SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchAlreadyPressed call SevenIsland_SevaultCanyon_TanobyKey_EventScript_SwitchPressed setvar VAR_TEMP_7, 100 - compare NUM_SWITCHES_PRESSED, 7 - goto_if_eq SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved + goto_if_eq NUM_SWITCHES_PRESSED, 7, SevenIsland_SevaultCanyon_TanobyKey_EventScript_PuzzleSolved releaseall end diff --git a/data/maps/SilphCo_10F/scripts.inc b/data/maps/SilphCo_10F/scripts.inc index 4df7c880c..789caf5b2 100644 --- a/data/maps/SilphCo_10F/scripts.inc +++ b/data/maps/SilphCo_10F/scripts.inc @@ -9,8 +9,7 @@ SilphCo_10F_OnLoad:: SilphCo_10F_EventScript_WorkerF:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_10F_EventScript_WorkerFRocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_10F_EventScript_WorkerFRocketsGone msgbox SilphCo_10F_Text_WaaaImScared release end diff --git a/data/maps/SilphCo_11F/scripts.inc b/data/maps/SilphCo_11F/scripts.inc index 40dc25e24..81ba1095c 100644 --- a/data/maps/SilphCo_11F/scripts.inc +++ b/data/maps/SilphCo_11F/scripts.inc @@ -15,13 +15,10 @@ SilphCo_11F_EventScript_President:: faceplayer goto_if_set FLAG_GOT_MASTER_BALL_FROM_SILPH, SilphCo_11F_EventScript_AlreadyGotMasterBall checkplayergender - compare VAR_RESULT, MALE - call_if_eq SilphCo_11F_EventScript_PresidentThanksMale - compare VAR_RESULT, FEMALE - call_if_eq SilphCo_11F_EventScript_PresidentThanksFemale + call_if_eq VAR_RESULT, MALE, SilphCo_11F_EventScript_PresidentThanksMale + call_if_eq VAR_RESULT, FEMALE, SilphCo_11F_EventScript_PresidentThanksFemale checkitemspace ITEM_MASTER_BALL - compare VAR_RESULT, FALSE - goto_if_eq SilphCo_11F_EventScript_NoRoomForMasterBall + goto_if_eq VAR_RESULT, FALSE, SilphCo_11F_EventScript_NoRoomForMasterBall giveitem_msg SilphCo_11F_Text_ObtainedMasterBallFromPresident, ITEM_MASTER_BALL, 1, MUS_OBTAIN_KEY_ITEM msgbox SilphCo_11F_Text_ThatsOurSecretPrototype setflag FLAG_GOT_MASTER_BALL_FROM_SILPH @@ -69,10 +66,8 @@ SilphCo_11F_EventScript_BattleGiovanni:: delay 25 msgbox SilphCo_11F_Text_GiovanniIntro closemessage - compare VAR_TEMP_1, 0 - call_if_eq SilphCo_11F_EventScript_GiovanniApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq SilphCo_11F_EventScript_GiovanniApproachRight + call_if_eq VAR_TEMP_1, 0, SilphCo_11F_EventScript_GiovanniApproachLeft + call_if_eq VAR_TEMP_1, 1, SilphCo_11F_EventScript_GiovanniApproachRight setvar VAR_LAST_TALKED, LOCALID_GIOVANNI trainerbattle_no_intro TRAINER_BOSS_GIOVANNI_2, SilphCo_11F_Text_GiovanniDefeat msgbox SilphCo_11F_Text_GiovanniPostBattle diff --git a/data/maps/SilphCo_3F/scripts.inc b/data/maps/SilphCo_3F/scripts.inc index 5a39471e0..1b5510791 100644 --- a/data/maps/SilphCo_3F/scripts.inc +++ b/data/maps/SilphCo_3F/scripts.inc @@ -10,8 +10,7 @@ SilphCo_3F_OnLoad:: SilphCo_3F_EventScript_WorkerM:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_3F_EventScript_WorkerMRocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_3F_EventScript_WorkerMRocketsGone msgbox SilphCo_3F_Text_WhatAmIToDo release end diff --git a/data/maps/SilphCo_4F/scripts.inc b/data/maps/SilphCo_4F/scripts.inc index ab416bc98..9b1b7615f 100644 --- a/data/maps/SilphCo_4F/scripts.inc +++ b/data/maps/SilphCo_4F/scripts.inc @@ -10,8 +10,7 @@ SilphCo_4F_OnLoad:: SilphCo_4F_EventScript_WorkerM:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_4F_EventScript_WorkerMRocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_4F_EventScript_WorkerMRocketsGone msgbox SilphCo_4F_Text_CantYouSeeImHiding release end diff --git a/data/maps/SilphCo_5F/scripts.inc b/data/maps/SilphCo_5F/scripts.inc index c3245a7ca..e8f921d9a 100644 --- a/data/maps/SilphCo_5F/scripts.inc +++ b/data/maps/SilphCo_5F/scripts.inc @@ -11,8 +11,7 @@ SilphCo_5F_OnLoad:: SilphCo_5F_EventScript_WorkerM:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_5F_EventScript_WorkerMRocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_5F_EventScript_WorkerMRocketsGone msgbox SilphCo_5F_Text_RocketsInUproarAboutIntruder release end diff --git a/data/maps/SilphCo_6F/scripts.inc b/data/maps/SilphCo_6F/scripts.inc index 06e2636ea..e19836d27 100644 --- a/data/maps/SilphCo_6F/scripts.inc +++ b/data/maps/SilphCo_6F/scripts.inc @@ -9,8 +9,7 @@ SilphCo_6F_OnLoad:: SilphCo_6F_EventScript_WorkerM2:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_6F_EventScript_WorkerM2RocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_6F_EventScript_WorkerM2RocketsGone msgbox SilphCo_6F_Text_TargetedSilphForOurMonProducts release end @@ -23,8 +22,7 @@ SilphCo_6F_EventScript_WorkerM2RocketsGone:: SilphCo_6F_EventScript_WorkerM3:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_6F_EventScript_WorkerM3RocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_6F_EventScript_WorkerM3RocketsGone msgbox SilphCo_6F_Text_RocketsTookOverBuilding release end @@ -37,8 +35,7 @@ SilphCo_6F_EventScript_WorkerM3RocketsGone:: SilphCo_6F_EventScript_WorkerM1:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_6F_EventScript_WorkerM1RocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_6F_EventScript_WorkerM1RocketsGone msgbox SilphCo_6F_Text_HelpMePlease release end @@ -51,8 +48,7 @@ SilphCo_6F_EventScript_WorkerM1RocketsGone:: SilphCo_6F_EventScript_WorkerF1:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_6F_EventScript_WorkerF1RocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_6F_EventScript_WorkerF1RocketsGone msgbox SilphCo_6F_Text_ThatManIsSuchACoward release end @@ -65,8 +61,7 @@ SilphCo_6F_EventScript_WorkerF1RocketsGone:: SilphCo_6F_EventScript_WorkerF2:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_6F_EventScript_WorkerF2RocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_6F_EventScript_WorkerF2RocketsGone msgbox SilphCo_6F_Text_RocketsTryingToConquerWorld release end diff --git a/data/maps/SilphCo_7F/scripts.inc b/data/maps/SilphCo_7F/scripts.inc index fc5f9401a..3e3f35e93 100644 --- a/data/maps/SilphCo_7F/scripts.inc +++ b/data/maps/SilphCo_7F/scripts.inc @@ -13,8 +13,7 @@ SilphCo_7F_OnLoad:: end SilphCo_7F_OnTransition:: - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - call_if_ge SilphCo_7F_EventScript_SetObjRocketsGone + call_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_7F_EventScript_SetObjRocketsGone end SilphCo_7F_EventScript_SetObjRocketsGone:: @@ -42,25 +41,18 @@ SilphCo_7F_EventScript_RivalScene:: applymovement LOCALID_RIVAL, Movement_Delay48 waitmovement 0 msgbox SilphCo_7F_Text_RivalWhatKeptYou - compare VAR_TEMP_1, 0 - call_if_eq SilphCo_7F_EventScript_RivalApproachTop - compare VAR_TEMP_1, 1 - call_if_eq SilphCo_7F_EventScript_RivalApproachBottom + call_if_eq VAR_TEMP_1, 0, SilphCo_7F_EventScript_RivalApproachTop + call_if_eq VAR_TEMP_1, 1, SilphCo_7F_EventScript_RivalApproachBottom msgbox SilphCo_7F_Text_RivalIntro setvar VAR_LAST_TALKED, LOCALID_RIVAL - compare VAR_STARTER_MON, 2 - call_if_eq SilphCo_7F_EventScript_RivalSquirtle - compare VAR_STARTER_MON, 1 - call_if_eq SilphCo_7F_EventScript_RivalBulbasaur - compare VAR_STARTER_MON, 0 - call_if_eq SilphCo_7F_EventScript_RivalCharmander + call_if_eq VAR_STARTER_MON, 2, SilphCo_7F_EventScript_RivalSquirtle + call_if_eq VAR_STARTER_MON, 1, SilphCo_7F_EventScript_RivalBulbasaur + call_if_eq VAR_STARTER_MON, 0, SilphCo_7F_EventScript_RivalCharmander msgbox SilphCo_7F_Text_RivalPostBattle closemessage playbgm MUS_RIVAL_EXIT, 0 - compare VAR_TEMP_1, 0 - call_if_eq SilphCo_7F_EventScript_RivalExitTop - compare VAR_TEMP_1, 1 - call_if_eq SilphCo_7F_EventScript_RivalExitBottom + call_if_eq VAR_TEMP_1, 0, SilphCo_7F_EventScript_RivalExitTop + call_if_eq VAR_TEMP_1, 1, SilphCo_7F_EventScript_RivalExitBottom playse SE_WARP_IN fadedefaultbgm removeobject LOCALID_RIVAL @@ -130,12 +122,9 @@ SilphCo_7F_EventScript_LaprasGuy:: msgbox SilphCo_7F_Text_HaveMonForSavingUs setvar VAR_TEMP_1, SPECIES_LAPRAS givemon SPECIES_LAPRAS, 25 - compare VAR_RESULT, 0 - goto_if_eq SilphCo_7F_EventScript_ReceiveLaprasParty - compare VAR_RESULT, 1 - goto_if_eq SilphCo_7F_EventScript_ReceiveLaprasPC - compare VAR_RESULT, 2 - goto_if_eq EventScript_NoMoreRoomForPokemon + goto_if_eq VAR_RESULT, 0, SilphCo_7F_EventScript_ReceiveLaprasParty + goto_if_eq VAR_RESULT, 1, SilphCo_7F_EventScript_ReceiveLaprasPC + goto_if_eq VAR_RESULT, 2, EventScript_NoMoreRoomForPokemon release end @@ -147,8 +136,7 @@ SilphCo_7F_EventScript_ReceiveLaprasParty:: waitfanfare bufferspeciesname STR_VAR_1, SPECIES_LAPRAS msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SilphCo_7F_EventScript_EndReceiveLapras + goto_if_eq VAR_RESULT, NO, SilphCo_7F_EventScript_EndReceiveLapras call EventScript_GetGiftMonPartySlot call EventScript_ChangePokemonNickname goto SilphCo_7F_EventScript_EndReceiveLapras @@ -162,8 +150,7 @@ SilphCo_7F_EventScript_ReceiveLaprasPC:: waitfanfare bufferspeciesname STR_VAR_1, SPECIES_LAPRAS msgbox Text_GiveNicknameToThisMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SilphCo_7F_EventScript_LaprasTransferredToPC + goto_if_eq VAR_RESULT, NO, SilphCo_7F_EventScript_LaprasTransferredToPC call EventScript_NameReceivedBoxMon goto SilphCo_7F_EventScript_LaprasTransferredToPC end @@ -188,8 +175,7 @@ SilphCo_7F_EventScript_AlreadyGotLapras:: SilphCo_7F_EventScript_WorkerM1:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_7F_EventScript_WorkerM1RocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_7F_EventScript_WorkerM1RocketsGone msgbox SilphCo_7F_Text_RocketsAfterMasterBall release end @@ -202,8 +188,7 @@ SilphCo_7F_EventScript_WorkerM1RocketsGone:: SilphCo_7F_EventScript_WorkerM2:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_7F_EventScript_WorkerM2RocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_7F_EventScript_WorkerM2RocketsGone msgbox SilphCo_7F_Text_BadIfTeamRocketTookOver release end @@ -216,8 +201,7 @@ SilphCo_7F_EventScript_WorkerM2RocketsGone:: SilphCo_7F_EventScript_WorkerF:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_7F_EventScript_WorkerFRocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_7F_EventScript_WorkerFRocketsGone msgbox SilphCo_7F_Text_ReallyDangerousHere release end diff --git a/data/maps/SilphCo_8F/scripts.inc b/data/maps/SilphCo_8F/scripts.inc index c8605fcac..e27d177e2 100644 --- a/data/maps/SilphCo_8F/scripts.inc +++ b/data/maps/SilphCo_8F/scripts.inc @@ -9,8 +9,7 @@ SilphCo_8F_OnLoad:: SilphCo_8F_EventScript_WorkerM:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_8F_EventScript_WorkerMRocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_8F_EventScript_WorkerMRocketsGone msgbox SilphCo_8F_Text_WonderIfSilphIsFinished release end diff --git a/data/maps/SilphCo_9F/scripts.inc b/data/maps/SilphCo_9F/scripts.inc index 8584190db..a62a85bae 100644 --- a/data/maps/SilphCo_9F/scripts.inc +++ b/data/maps/SilphCo_9F/scripts.inc @@ -12,8 +12,7 @@ SilphCo_9F_OnLoad:: SilphCo_9F_EventScript_HealWoman:: lock faceplayer - compare VAR_MAP_SCENE_SILPH_CO_11F, 1 - goto_if_ge SilphCo_9F_EventScript_HealWomanRocketsGone + goto_if_ge VAR_MAP_SCENE_SILPH_CO_11F, 1, SilphCo_9F_EventScript_HealWomanRocketsGone msgbox SilphCo_9F_Text_YouShouldTakeQuickNap closemessage call EventScript_OutOfCenterPartyHeal diff --git a/data/maps/SilphCo_Elevator/scripts.inc b/data/maps/SilphCo_Elevator/scripts.inc index 6c305e4d5..dc6b5cfee 100644 --- a/data/maps/SilphCo_Elevator/scripts.inc +++ b/data/maps/SilphCo_Elevator/scripts.inc @@ -32,8 +32,7 @@ SilphCo_Elevator_EventScript_FloorSelect:: SilphCo_Elevator_EventScript_To1F:: setvar VAR_0x8006, 4 setdynamicwarp MAP_SILPH_CO_1F, 255, 22, 3 - compare VAR_ELEVATOR_FLOOR, 4 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 4, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 4 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -42,8 +41,7 @@ SilphCo_Elevator_EventScript_To1F:: SilphCo_Elevator_EventScript_To2F:: setvar VAR_0x8006, 5 setdynamicwarp MAP_SILPH_CO_2F, 255, 22, 3 - compare VAR_ELEVATOR_FLOOR, 5 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 5, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 5 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -52,8 +50,7 @@ SilphCo_Elevator_EventScript_To2F:: SilphCo_Elevator_EventScript_To3F:: setvar VAR_0x8006, 6 setdynamicwarp MAP_SILPH_CO_3F, 255, 22, 3 - compare VAR_ELEVATOR_FLOOR, 6 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 6, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 6 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -62,8 +59,7 @@ SilphCo_Elevator_EventScript_To3F:: SilphCo_Elevator_EventScript_To4F:: setvar VAR_0x8006, 7 setdynamicwarp MAP_SILPH_CO_4F, 255, 22, 3 - compare VAR_ELEVATOR_FLOOR, 7 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 7, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 7 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -72,8 +68,7 @@ SilphCo_Elevator_EventScript_To4F:: SilphCo_Elevator_EventScript_To5F:: setvar VAR_0x8006, 8 setdynamicwarp MAP_SILPH_CO_5F, 255, 22, 3 - compare VAR_ELEVATOR_FLOOR, 8 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 8, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 8 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -82,8 +77,7 @@ SilphCo_Elevator_EventScript_To5F:: SilphCo_Elevator_EventScript_To6F:: setvar VAR_0x8006, 9 setdynamicwarp MAP_SILPH_CO_6F, 255, 20, 3 - compare VAR_ELEVATOR_FLOOR, 9 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 9, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 9 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -92,8 +86,7 @@ SilphCo_Elevator_EventScript_To6F:: SilphCo_Elevator_EventScript_To7F:: setvar VAR_0x8006, 10 setdynamicwarp MAP_SILPH_CO_7F, 255, 23, 3 - compare VAR_ELEVATOR_FLOOR, 10 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 10, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 10 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -102,8 +95,7 @@ SilphCo_Elevator_EventScript_To7F:: SilphCo_Elevator_EventScript_To8F:: setvar VAR_0x8006, 11 setdynamicwarp MAP_SILPH_CO_8F, 255, 22, 3 - compare VAR_ELEVATOR_FLOOR, 11 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 11, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 11 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -112,8 +104,7 @@ SilphCo_Elevator_EventScript_To8F:: SilphCo_Elevator_EventScript_To9F:: setvar VAR_0x8006, 12 setdynamicwarp MAP_SILPH_CO_9F, 255, 24, 3 - compare VAR_ELEVATOR_FLOOR, 12 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 12, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 12 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -122,8 +113,7 @@ SilphCo_Elevator_EventScript_To9F:: SilphCo_Elevator_EventScript_To10F:: setvar VAR_0x8006, 13 setdynamicwarp MAP_SILPH_CO_10F, 255, 13, 3 - compare VAR_ELEVATOR_FLOOR, 13 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 13, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 13 goto SilphCo_Elevator_EventScript_ExitFloorSelect @@ -132,8 +122,7 @@ SilphCo_Elevator_EventScript_To10F:: SilphCo_Elevator_EventScript_To11F:: setvar VAR_0x8006, 14 setdynamicwarp MAP_SILPH_CO_11F, 255, 13, 3 - compare VAR_ELEVATOR_FLOOR, 14 - goto_if_eq SilphCo_Elevator_EventScript_ExitFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 14, SilphCo_Elevator_EventScript_ExitFloorSelect call SilphCo_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 14 goto SilphCo_Elevator_EventScript_ExitFloorSelect diff --git a/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc b/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc index 172142fc0..419ba04d4 100644 --- a/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc +++ b/data/maps/SixIsland_DottedHole_SapphireRoom/scripts.inc @@ -19,58 +19,38 @@ SixIsland_DottedHole_SapphireRoom_EventScript_Sapphire:: applymovement LOCALID_THIEF, SixIsland_DottedHole_SapphireRoom_Movement_ThiefFallIn waitmovement 0 playse SE_M_STRENGTH - compare VAR_FACING, DIR_NORTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft - compare VAR_FACING, DIR_SOUTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft - compare VAR_FACING, DIR_EAST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown - compare VAR_FACING, DIR_WEST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown + call_if_eq VAR_FACING, DIR_NORTH, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft + call_if_eq VAR_FACING, DIR_SOUTH, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft + call_if_eq VAR_FACING, DIR_EAST, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown + call_if_eq VAR_FACING, DIR_WEST, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown setvar VAR_0x8004, 3 setvar VAR_0x8005, 0 setvar VAR_0x8006, 12 setvar VAR_0x8007, 3 special ShakeScreen delay 60 - compare VAR_FACING, DIR_NORTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireSouth - compare VAR_FACING, DIR_EAST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireEast - compare VAR_FACING, DIR_WEST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireWest + call_if_eq VAR_FACING, DIR_NORTH, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireNorth + call_if_eq VAR_FACING, DIR_SOUTH, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireSouth + call_if_eq VAR_FACING, DIR_EAST, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireEast + call_if_eq VAR_FACING, DIR_WEST, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefLookAtSapphireWest textcolor NPC_TEXT_COLOR_MALE msgbox SixIsland_DottedHole_SapphireRoom_Text_IWasRightInTailingYou closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireSouth - compare VAR_FACING, DIR_EAST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireEast - compare VAR_FACING, DIR_WEST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireWest + call_if_eq VAR_FACING, DIR_NORTH, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireNorth + call_if_eq VAR_FACING, DIR_SOUTH, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireSouth + call_if_eq VAR_FACING, DIR_EAST, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireEast + call_if_eq VAR_FACING, DIR_WEST, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefGetSapphireWest removeobject LOCALID_SAPPHIRE - compare VAR_FACING, DIR_NORTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft2 - compare VAR_FACING, DIR_SOUTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft2 - compare VAR_FACING, DIR_EAST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown2 - compare VAR_FACING, DIR_WEST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown2 + call_if_eq VAR_FACING, DIR_NORTH, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft2 + call_if_eq VAR_FACING, DIR_SOUTH, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefLeft2 + call_if_eq VAR_FACING, DIR_EAST, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown2 + call_if_eq VAR_FACING, DIR_WEST, SixIsland_DottedHole_SapphireRoom_EventScript_PlayerFaceThiefDown2 msgbox SixIsland_DottedHole_SapphireRoom_Text_SellToTeamRocketTellPassword closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitSouth - compare VAR_FACING, DIR_EAST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitEast - compare VAR_FACING, DIR_WEST - call_if_eq SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitWest + call_if_eq VAR_FACING, DIR_NORTH, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitNorth + call_if_eq VAR_FACING, DIR_SOUTH, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitSouth + call_if_eq VAR_FACING, DIR_EAST, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitEast + call_if_eq VAR_FACING, DIR_WEST, SixIsland_DottedHole_SapphireRoom_EventScript_ThiefExitWest playse SE_EXIT delay 35 removeobject LOCALID_THIEF diff --git a/data/maps/SixIsland_PatternBush/scripts.inc b/data/maps/SixIsland_PatternBush/scripts.inc index d42ed5241..d5f06a183 100644 --- a/data/maps/SixIsland_PatternBush/scripts.inc +++ b/data/maps/SixIsland_PatternBush/scripts.inc @@ -5,10 +5,8 @@ SixIsland_PatternBush_MapScripts:: SixIsland_PatternBush_OnTransition:: setworldmapflag FLAG_WORLD_MAP_SIX_ISLAND_PATTERN_BUSH getplayerxy VAR_TEMP_1, VAR_TEMP_2 - compare VAR_TEMP_1, 50 - call_if_ge SixIsland_PatternBush_EventScript_SetEscapeRightExit - compare VAR_TEMP_1, 49 - call_if_le SixIsland_PatternBush_EventScript_SetEscapeLeftExit + call_if_ge VAR_TEMP_1, 50, SixIsland_PatternBush_EventScript_SetEscapeRightExit + call_if_le VAR_TEMP_1, 49, SixIsland_PatternBush_EventScript_SetEscapeLeftExit end SixIsland_PatternBush_EventScript_SetEscapeRightExit:: diff --git a/data/maps/SixIsland_PokemonCenter_1F/scripts.inc b/data/maps/SixIsland_PokemonCenter_1F/scripts.inc index 1c8f08406..853fd36f7 100644 --- a/data/maps/SixIsland_PokemonCenter_1F/scripts.inc +++ b/data/maps/SixIsland_PokemonCenter_1F/scripts.inc @@ -8,8 +8,7 @@ SixIsland_PokemonCenter_1F_MapScripts:: SixIsland_PokemonCenter_1F_OnTransition:: setrespawn SPAWN_SIX_ISLAND - compare VAR_MAP_SCENE_SIX_ISLAND_POKEMON_CENTER_1F, 0 - call_if_eq SixIsland_PokemonCenter_1F_EventScript_ShowRival + call_if_eq VAR_MAP_SCENE_SIX_ISLAND_POKEMON_CENTER_1F, 0, SixIsland_PokemonCenter_1F_EventScript_ShowRival end SixIsland_PokemonCenter_1F_EventScript_ShowRival:: diff --git a/data/maps/SixIsland_RuinValley/scripts.inc b/data/maps/SixIsland_RuinValley/scripts.inc index 133add073..808bed3d0 100644 --- a/data/maps/SixIsland_RuinValley/scripts.inc +++ b/data/maps/SixIsland_RuinValley/scripts.inc @@ -27,8 +27,7 @@ SixIsland_RuinValley_EventScript_DottedHoleDoor:: lockall goto_if_set FLAG_USED_CUT_ON_RUIN_VALLEY_BRAILLE, SixIsland_RuinValley_EventScript_DottedHoleDoorOpen msgbox SixIsland_RuinValley_Text_CheckDoorMoreThoroughly, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SixIsland_RuinValley_EventScript_IgnoreDottedHoleDoor + goto_if_eq VAR_RESULT, NO, SixIsland_RuinValley_EventScript_IgnoreDottedHoleDoor msgbox SixIsland_RuinValley_Text_SeveralDotsOnTheDoor braillemessage Braille_Text_Cut waitbuttonpress diff --git a/data/maps/SixIsland_WaterPath_House1/scripts.inc b/data/maps/SixIsland_WaterPath_House1/scripts.inc index eb253ce81..0797724ac 100644 --- a/data/maps/SixIsland_WaterPath_House1/scripts.inc +++ b/data/maps/SixIsland_WaterPath_House1/scripts.inc @@ -8,24 +8,18 @@ SixIsland_WaterPath_House1_EventScript_Beauty:: special QuestLog_CutRecording setvar VAR_0x8004, SPECIES_HERACROSS specialvar VAR_RESULT, DoesPlayerPartyContainSpecies - compare VAR_RESULT, FALSE - goto_if_eq SixIsland_WaterPath_House1_EventScript_NoHeracrossInParty + goto_if_eq VAR_RESULT, FALSE, SixIsland_WaterPath_House1_EventScript_NoHeracrossInParty special GetHeracrossSizeRecordInfo msgbox SixIsland_WaterPath_House1_Text_MayIMeasureHeracross special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, PARTY_SIZE - goto_if_ge SixIsland_WaterPath_House1_EventScript_DontShowMon + goto_if_ge VAR_RESULT, PARTY_SIZE, SixIsland_WaterPath_House1_EventScript_DontShowMon special CompareHeracrossSize - compare VAR_RESULT, 1 - goto_if_eq SixIsland_WaterPath_House1_EventScript_ShownNonHeracross - compare VAR_RESULT, 2 - goto_if_eq SixIsland_WaterPath_House1_EventScript_ShownSmallHeracross - compare VAR_RESULT, 3 - goto_if_eq SixIsland_WaterPath_House1_EventScript_ShownBigHeracross - compare VAR_RESULT, 4 - goto_if_eq SixIsland_WaterPath_House1_EventScript_ShownTiedHeracross + goto_if_eq VAR_RESULT, 1, SixIsland_WaterPath_House1_EventScript_ShownNonHeracross + goto_if_eq VAR_RESULT, 2, SixIsland_WaterPath_House1_EventScript_ShownSmallHeracross + goto_if_eq VAR_RESULT, 3, SixIsland_WaterPath_House1_EventScript_ShownBigHeracross + goto_if_eq VAR_RESULT, 4, SixIsland_WaterPath_House1_EventScript_ShownTiedHeracross release end @@ -59,8 +53,7 @@ SixIsland_WaterPath_House1_EventScript_ShownBigHeracross:: setflag FLAG_GOT_NEST_BALL_FROM_WATER_PATH_HOUSE_1 msgbox SixIsland_WaterPath_House1_Text_ItsXInchesDeserveReward giveitem ITEM_NEST_BALL - compare VAR_RESULT, FALSE - goto_if_eq SixIsland_WaterPath_House1_EventScript_NoRoomForNestBall + goto_if_eq VAR_RESULT, FALSE, SixIsland_WaterPath_House1_EventScript_NoRoomForNestBall msgbox SixIsland_WaterPath_House1_Text_WantToSeeBiggerOne release end diff --git a/data/maps/ThreeIsland/scripts.inc b/data/maps/ThreeIsland/scripts.inc index 194b4e4a4..0d7c53e07 100644 --- a/data/maps/ThreeIsland/scripts.inc +++ b/data/maps/ThreeIsland/scripts.inc @@ -15,8 +15,7 @@ ThreeIsland_MapScripts:: ThreeIsland_OnTransition:: setworldmapflag FLAG_WORLD_MAP_THREE_ISLAND call_if_set FLAG_RESCUED_LOSTELLE, ThreeIsland_EventScript_HideAntiBikers - compare VAR_MAP_SCENE_THREE_ISLAND, 4 - call_if_eq ThreeIsland_EventScript_SetAntiBikersMovementAfterBikers + call_if_eq VAR_MAP_SCENE_THREE_ISLAND, 4, ThreeIsland_EventScript_SetAntiBikersMovementAfterBikers end ThreeIsland_EventScript_HideAntiBikers:: @@ -38,8 +37,7 @@ ThreeIsland_EventScript_Biker:: ThreeIsland_EventScript_AntiBiker1:: lock goto_if_set FLAG_GOT_FULL_RESTORE_FROM_THREE_ISLAND_DEFENDER, ThreeIsland_EventScript_AntiBiker1GotFullRestore - compare VAR_MAP_SCENE_THREE_ISLAND, 4 - goto_if_eq ThreeIsland_EventScript_GiveFullRestore + goto_if_eq VAR_MAP_SCENE_THREE_ISLAND, 4, ThreeIsland_EventScript_GiveFullRestore setvar VAR_TEMP_1, 0 call ThreeIsland_EventScript_BikerArgumentScene release @@ -57,8 +55,7 @@ ThreeIsland_EventScript_GiveFullRestore:: waitmovement 0 msgbox ThreeIsland_Text_ThankYouOhYourMonGotHurt checkitemspace ITEM_FULL_RESTORE - compare VAR_RESULT, FALSE - goto_if_eq ThreeIsland_EventScript_NoRoomForFullRestore + goto_if_eq VAR_RESULT, FALSE, ThreeIsland_EventScript_NoRoomForFullRestore msgreceiveditem ThreeIsland_Text_GivenFullRestore, ITEM_FULL_RESTORE additem ITEM_FULL_RESTORE setflag FLAG_GOT_FULL_RESTORE_FROM_THREE_ISLAND_DEFENDER @@ -72,37 +69,26 @@ ThreeIsland_EventScript_NoRoomForFullRestore:: end ThreeIsland_EventScript_BikerArgumentScene:: - compare VAR_TEMP_1, 1 - call_if_eq ThreeIsland_EventScript_PlayerFaceLeft - compare VAR_TEMP_1, 2 - call_if_eq ThreeIsland_EventScript_PlayerFaceLeft + call_if_eq VAR_TEMP_1, 1, ThreeIsland_EventScript_PlayerFaceLeft + call_if_eq VAR_TEMP_1, 2, ThreeIsland_EventScript_PlayerFaceLeft applymovement LOCALID_ANTIBIKER1, ThreeIsland_Movement_SpeakRight waitmovement 0 msgbox ThreeIsland_Text_GoBackToKanto - compare VAR_TEMP_1, 0 - call_if_eq ThreeIsland_EventScript_PlayerFaceRight - compare VAR_TEMP_1, 1 - call_if_eq ThreeIsland_EventScript_PlayerFaceRight - compare VAR_TEMP_1, 2 - call_if_eq ThreeIsland_EventScript_PlayerFaceBiker + call_if_eq VAR_TEMP_1, 0, ThreeIsland_EventScript_PlayerFaceRight + call_if_eq VAR_TEMP_1, 1, ThreeIsland_EventScript_PlayerFaceRight + call_if_eq VAR_TEMP_1, 2, ThreeIsland_EventScript_PlayerFaceBiker applymovement LOCALID_BIKER1, ThreeIsland_Movement_SpeakLeft waitmovement 0 msgbox ThreeIsland_Text_BossIsOnHisWay - compare VAR_TEMP_1, 0 - call_if_eq ThreeIsland_EventScript_PlayerFaceUp - compare VAR_TEMP_1, 1 - call_if_eq ThreeIsland_EventScript_PlayerFaceUp - compare VAR_TEMP_1, 2 - call_if_eq ThreeIsland_EventScript_PlayerFaceAntiBiker + call_if_eq VAR_TEMP_1, 0, ThreeIsland_EventScript_PlayerFaceUp + call_if_eq VAR_TEMP_1, 1, ThreeIsland_EventScript_PlayerFaceUp + call_if_eq VAR_TEMP_1, 2, ThreeIsland_EventScript_PlayerFaceAntiBiker applymovement LOCALID_ANTIBIKER2, ThreeIsland_Movement_SpeakRight waitmovement 0 msgbox ThreeIsland_Text_GetOffIslandNow - compare VAR_TEMP_1, 0 - call_if_eq ThreeIsland_EventScript_PlayerFaceRight - compare VAR_TEMP_1, 1 - call_if_eq ThreeIsland_EventScript_PlayerFaceRight - compare VAR_TEMP_1, 2 - call_if_eq ThreeIsland_EventScript_PlayerFaceBiker + call_if_eq VAR_TEMP_1, 0, ThreeIsland_EventScript_PlayerFaceRight + call_if_eq VAR_TEMP_1, 1, ThreeIsland_EventScript_PlayerFaceRight + call_if_eq VAR_TEMP_1, 2, ThreeIsland_EventScript_PlayerFaceBiker applymovement LOCALID_BIKER3, ThreeIsland_Movement_SpeakLeft waitmovement 0 msgbox ThreeIsland_Text_WhosGonnaMakeMe @@ -131,22 +117,19 @@ ThreeIsland_EventScript_PlayerFaceRight:: ThreeIsland_EventScript_PlayerFaceBiker:: getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 9 - goto_if_ge ThreeIsland_EventScript_PlayerFaceUp + goto_if_ge VAR_0x8004, 9, ThreeIsland_EventScript_PlayerFaceUp goto ThreeIsland_EventScript_PlayerFaceRight end ThreeIsland_EventScript_PlayerFaceAntiBiker:: getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 9 - goto_if_ge ThreeIsland_EventScript_PlayerFaceLeft + goto_if_ge VAR_0x8004, 9, ThreeIsland_EventScript_PlayerFaceLeft goto ThreeIsland_EventScript_PlayerFaceUp end ThreeIsland_EventScript_AntiBiker2:: lock - compare VAR_MAP_SCENE_THREE_ISLAND, 4 - goto_if_eq ThreeIsland_EventScript_AntiBiker2BikersGone + goto_if_eq VAR_MAP_SCENE_THREE_ISLAND, 4, ThreeIsland_EventScript_AntiBiker2BikersGone setvar VAR_TEMP_1, 1 call ThreeIsland_EventScript_BikerArgumentScene release @@ -232,8 +215,7 @@ ThreeIsland_EventScript_BattleBikersScene:: waitmovement 0 playbgm MUS_ENCOUNTER_BOY, 0 msgbox ThreeIsland_Text_WannaMakeSomethingOfYourStaring, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ThreeIsland_EventScript_LeaveBikersAlone + goto_if_eq VAR_RESULT, NO, ThreeIsland_EventScript_LeaveBikersAlone msgbox ThreeIsland_Text_Biker1Intro setvar VAR_LAST_TALKED, LOCALID_BIKER1 trainerbattle_no_intro TRAINER_BIKER_GOON, ThreeIsland_Text_Biker1Defeat @@ -265,16 +247,11 @@ ThreeIsland_EventScript_BattleBikersScene:: msgbox ThreeIsland_Text_Biker3PostBattle closemessage delay 45 - compare VAR_TEMP_1, 0 - call_if_eq ThreeIsland_EventScript_PaxtonApproachLeft - compare VAR_TEMP_1, 1 - call_if_eq ThreeIsland_EventScript_PaxtonApproachMidLeft - compare VAR_TEMP_1, 2 - call_if_eq ThreeIsland_EventScript_PaxtonApproachMid - compare VAR_TEMP_1, 3 - call_if_eq ThreeIsland_EventScript_PaxtonApproachMidRight - compare VAR_TEMP_1, 4 - call_if_eq ThreeIsland_EventScript_PaxtonApproachRight + call_if_eq VAR_TEMP_1, 0, ThreeIsland_EventScript_PaxtonApproachLeft + call_if_eq VAR_TEMP_1, 1, ThreeIsland_EventScript_PaxtonApproachMidLeft + call_if_eq VAR_TEMP_1, 2, ThreeIsland_EventScript_PaxtonApproachMid + call_if_eq VAR_TEMP_1, 3, ThreeIsland_EventScript_PaxtonApproachMidRight + call_if_eq VAR_TEMP_1, 4, ThreeIsland_EventScript_PaxtonApproachRight playbgm MUS_ENCOUNTER_BOY, 0 msgbox ThreeIsland_Text_PaxtonIntro setvar VAR_LAST_TALKED, LOCALID_PAXTON diff --git a/data/maps/ThreeIsland_BerryForest/scripts.inc b/data/maps/ThreeIsland_BerryForest/scripts.inc index 61d329939..9b7fc032c 100644 --- a/data/maps/ThreeIsland_BerryForest/scripts.inc +++ b/data/maps/ThreeIsland_BerryForest/scripts.inc @@ -30,8 +30,7 @@ ThreeIsland_BerryForest_EventScript_Lostelle:: waitmovement 0 msgbox ThreeIsland_BerryForest_Text_ThankYouHaveThis giveitem ITEM_IAPAPA_BERRY - compare VAR_RESULT, FALSE - call_if_eq ThreeIsland_BerryForest_EventScript_NoRoomForBerry + call_if_eq VAR_RESULT, FALSE, ThreeIsland_BerryForest_EventScript_NoRoomForBerry special BufferBigGuyOrBigGirlString msgbox ThreeIsland_BerryForest_Text_LetsGoHome closemessage diff --git a/data/maps/ThreeIsland_DunsparceTunnel/scripts.inc b/data/maps/ThreeIsland_DunsparceTunnel/scripts.inc index 52493703a..20826c539 100644 --- a/data/maps/ThreeIsland_DunsparceTunnel/scripts.inc +++ b/data/maps/ThreeIsland_DunsparceTunnel/scripts.inc @@ -8,10 +8,8 @@ ThreeIsland_DunsparceTunnel_OnTransition:: setworldmapflag FLAG_WORLD_MAP_THREE_ISLAND_DUNSPARCE_TUNNEL specialvar VAR_RESULT, IsNationalPokedexEnabled copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, TRUE - call_if_eq ThreeIsland_DunsparceTunnel_EventScript_SetLayoutDugOut - compare VAR_0x8008, FALSE - call_if_eq ThreeIsland_DunsparceTunnel_EventScript_MoveProspectorToWall + call_if_eq VAR_0x8008, TRUE, ThreeIsland_DunsparceTunnel_EventScript_SetLayoutDugOut + call_if_eq VAR_0x8008, FALSE, ThreeIsland_DunsparceTunnel_EventScript_MoveProspectorToWall end ThreeIsland_DunsparceTunnel_EventScript_SetLayoutDugOut:: @@ -28,8 +26,7 @@ ThreeIsland_DunsparceTunnel_EventScript_Prospector:: faceplayer goto_if_set FLAG_GOT_NUGGET_FROM_DUNSPARCE_TUNNEL, ThreeIsland_DunsparceTunnel_EventScript_ProspectorAlreadyGaveNugget specialvar VAR_RESULT, IsNationalPokedexEnabled - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_DunsparceTunnel_EventScript_ProspectorStruckGold + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_DunsparceTunnel_EventScript_ProspectorStruckGold msgbox ThreeIsland_DunsparceTunnel_Text_ProspectingForGold closemessage applymovement LOCALID_PROSPECTOR, Movement_FaceOriginalDirection @@ -40,8 +37,7 @@ ThreeIsland_DunsparceTunnel_EventScript_Prospector:: ThreeIsland_DunsparceTunnel_EventScript_ProspectorStruckGold:: msgbox ThreeIsland_DunsparceTunnel_Text_StruckGoldThisIsForYou giveitem ITEM_NUGGET - compare VAR_RESULT, FALSE - goto_if_eq ThreeIsland_DunsparceTunnel_EventScript_NoRoomForNugget + goto_if_eq VAR_RESULT, FALSE, ThreeIsland_DunsparceTunnel_EventScript_NoRoomForNugget setflag FLAG_GOT_NUGGET_FROM_DUNSPARCE_TUNNEL goto ThreeIsland_DunsparceTunnel_EventScript_ProspectorAlreadyGaveNugget end diff --git a/data/maps/ThreeIsland_Port/scripts.inc b/data/maps/ThreeIsland_Port/scripts.inc index d48609a81..bd28d7905 100644 --- a/data/maps/ThreeIsland_Port/scripts.inc +++ b/data/maps/ThreeIsland_Port/scripts.inc @@ -10,10 +10,8 @@ ThreeIsland_Port_OnTransition:: ThreeIsland_Port_EventScript_Woman:: lock faceplayer - compare VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 2 - goto_if_ge ThreeIsland_Port_EventScript_WomanLostelleFound - compare VAR_MAP_SCENE_THREE_ISLAND, 4 - goto_if_ge ThreeIsland_Port_EventScript_WomanBikersGone + goto_if_ge VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 2, ThreeIsland_Port_EventScript_WomanLostelleFound + goto_if_ge VAR_MAP_SCENE_THREE_ISLAND, 4, ThreeIsland_Port_EventScript_WomanBikersGone msgbox ThreeIsland_Port_Text_IllCallThePolice release end diff --git a/data/maps/TrainerTower_Elevator/scripts.inc b/data/maps/TrainerTower_Elevator/scripts.inc index d46770895..659394b14 100644 --- a/data/maps/TrainerTower_Elevator/scripts.inc +++ b/data/maps/TrainerTower_Elevator/scripts.inc @@ -39,8 +39,7 @@ TrainerTower_Elevator_EventScript_ChooseFloor:: TrainerTower_Elevator_EventScript_SelectLobby:: setvar VAR_0x8006, 3 setdynamicwarp MAP_TRAINER_TOWER_LOBBY, 17, 8 - compare VAR_ELEVATOR_FLOOR, 3 - goto_if_eq TrainerTower_Elevator_EventScript_CloseFloorSelect + goto_if_eq VAR_ELEVATOR_FLOOR, 3, TrainerTower_Elevator_EventScript_CloseFloorSelect call TrainerTower_Elevator_EventScript_MoveElevator setvar VAR_ELEVATOR_FLOOR, 3 special CloseElevatorCurrentFloorWindow diff --git a/data/maps/TrainerTower_Lobby/scripts.inc b/data/maps/TrainerTower_Lobby/scripts.inc index 4bd7e9494..19dc390ae 100644 --- a/data/maps/TrainerTower_Lobby/scripts.inc +++ b/data/maps/TrainerTower_Lobby/scripts.inc @@ -16,8 +16,7 @@ TrainerTower_Lobby_OnResume:: setvar VAR_TEMP_2, 0 ttower_resumetimer ttower_shouldexit - compare VAR_RESULT, FALSE - goto_if_eq TrainerTower_Lobby_OnResumeEnd + goto_if_eq VAR_RESULT, FALSE, TrainerTower_Lobby_OnResumeEnd @ Never reached, above always FALSE setvar VAR_TEMP_0, 0 setobjectxy OBJ_EVENT_ID_PLAYER, 9, 7 @@ -34,8 +33,7 @@ TrainerTower_Lobby_OnReturnToField:: end TrainerTower_Lobby_OnLoad:: - compare VAR_TEMP_D, 17 - call_if_eq TrainerTower_Lobby_OpenCounterBarrier + call_if_eq VAR_TEMP_D, 17, TrainerTower_Lobby_OpenCounterBarrier end TrainerTower_Lobby_OpenCounterBarrier:: @@ -112,8 +110,7 @@ TrainerTower_Lobby_EventScript_Receptionist:: lock faceplayer ttower_getbeatchallenge - compare VAR_RESULT, TRUE - goto_if_eq TrainerTower_Lobby_EventScript_ThanksForCompeting + goto_if_eq VAR_RESULT, TRUE, TrainerTower_Lobby_EventScript_ThanksForCompeting msgbox TrainerTower_Lobby_Text_GiveItYourBest goto TrainerTower_Lobby_EventScript_ReceptionistEnd @@ -155,8 +152,7 @@ TrainerTower_Lobby_EventScript_EntryTrigger:: textcolor NPC_TEXT_COLOR_FEMALE msgbox TrainerTower_Lobby_Text_WelcomeToTrainerTower ttower_getnumfloors - compare VAR_RESULT, FALSE - goto_if_eq TrainerTower_Lobby_EventScript_AllFloorsUsed + goto_if_eq VAR_RESULT, FALSE, TrainerTower_Lobby_EventScript_AllFloorsUsed msgbox TrainerTower_Lobby_Text_TrainersUpToFloorNum goto TrainerTower_Lobby_EventScript_AskEnterChallenge diff --git a/data/maps/TwoIsland/scripts.inc b/data/maps/TwoIsland/scripts.inc index 591cb7368..5e8a768d7 100644 --- a/data/maps/TwoIsland/scripts.inc +++ b/data/maps/TwoIsland/scripts.inc @@ -61,12 +61,9 @@ TwoIsland_EventScript_Clerk:: goto_if_questlog EventScript_ReleaseEnd lock faceplayer - compare VAR_MAP_SCENE_TWO_ISLAND, 4 - goto_if_eq TwoIsland_EventScript_ClerkShopExpanded3 - compare VAR_MAP_SCENE_TWO_ISLAND, 3 - goto_if_eq TwoIsland_EventScript_ClerkShopExpanded2 - compare VAR_MAP_SCENE_TWO_ISLAND, 2 - goto_if_eq TwoIsland_EventScript_ClerkShopExpanded1 + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND, 4, TwoIsland_EventScript_ClerkShopExpanded3 + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND, 3, TwoIsland_EventScript_ClerkShopExpanded2 + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND, 2, TwoIsland_EventScript_ClerkShopExpanded1 goto TwoIsland_EventScript_ClerkShopInitial end @@ -105,12 +102,9 @@ TwoIsland_EventScript_ClerkShopInitial:: TwoIsland_EventScript_ClerkShopSkipIntro:: message Text_MayIHelpYou waitmessage - compare VAR_MAP_SCENE_TWO_ISLAND, 4 - goto_if_eq TwoIsland_EventScript_ShopExpanded3 - compare VAR_MAP_SCENE_TWO_ISLAND, 3 - goto_if_eq TwoIsland_EventScript_ShopExpanded2 - compare VAR_MAP_SCENE_TWO_ISLAND, 2 - goto_if_eq TwoIsland_EventScript_ShopExpanded1 + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND, 4, TwoIsland_EventScript_ShopExpanded3 + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND, 3, TwoIsland_EventScript_ShopExpanded2 + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND, 2, TwoIsland_EventScript_ShopExpanded1 goto TwoIsland_EventScript_ShopInitial end diff --git a/data/maps/TwoIsland_House/scripts.inc b/data/maps/TwoIsland_House/scripts.inc index e869f1b24..010f0fa10 100644 --- a/data/maps/TwoIsland_House/scripts.inc +++ b/data/maps/TwoIsland_House/scripts.inc @@ -22,11 +22,9 @@ TwoIsland_House_EventScript_MoveManiac:: TwoIsland_House_EventScript_CheckPlayerHasMushrooms:: checkitem ITEM_BIG_MUSHROOM - compare VAR_RESULT, TRUE - call_if_eq TwoIsland_House_EventScript_SetHasBigMushroom + call_if_eq VAR_RESULT, TRUE, TwoIsland_House_EventScript_SetHasBigMushroom checkitem ITEM_TINY_MUSHROOM, 2 - compare VAR_RESULT, TRUE - call_if_eq TwoIsland_House_EventScript_SetHasTinyMushrooms + call_if_eq VAR_RESULT, TRUE, TwoIsland_House_EventScript_SetHasTinyMushrooms goto_if_set HAS_BIG_MUSHROOM, TwoIsland_House_EventScript_CheckAlsoHasTinyMushrooms goto_if_set HAS_TINY_MUSHROOMS, TwoIsland_House_EventScript_CheckAlsoHasBigMushroom goto TwoIsland_House_EventScript_EndTutorMove @@ -44,8 +42,7 @@ TwoIsland_House_EventScript_CheckAlsoHasBigMushroom:: TwoIsland_House_EventScript_AskTutorMon:: msgbox TwoIsland_House_Text_WantMeToTeachMove, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq TwoIsland_House_EventScript_EndTutorMove + goto_if_eq VAR_RESULT, NO, TwoIsland_House_EventScript_EndTutorMove goto TwoIsland_House_EventScript_ChooseMonToTutor end @@ -53,13 +50,10 @@ TwoIsland_House_EventScript_ChooseMonToTutor:: msgbox TwoIsland_House_Text_TutorWhichMon special SelectMoveTutorMon waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge TwoIsland_House_EventScript_EndTutorMove + goto_if_ge VAR_0x8004, PARTY_SIZE, TwoIsland_House_EventScript_EndTutorMove special IsSelectedMonEgg - compare VAR_RESULT, TRUE - goto_if_eq TwoIsland_House_EventScript_CantTutorEgg - compare VAR_0x8005, 0 - goto_if_eq TwoIsland_House_EventScript_NoMoveToTutorMon + goto_if_eq VAR_RESULT, TRUE, TwoIsland_House_EventScript_CantTutorEgg + goto_if_eq VAR_0x8005, 0, TwoIsland_House_EventScript_NoMoveToTutorMon goto TwoIsland_House_EventScript_ChooseMoveToTeach end @@ -67,8 +61,7 @@ TwoIsland_House_EventScript_ChooseMoveToTeach:: msgbox TwoIsland_House_Text_TeachWhichMove special DisplayMoveTutorMenu waitstate - compare VAR_0x8004, 0 - goto_if_eq TwoIsland_House_EventScript_ChooseMonToTutor + goto_if_eq VAR_0x8004, 0, TwoIsland_House_EventScript_ChooseMonToTutor goto_if_set HAS_BOTH_MUSHROOMS, TwoIsland_House_EventScript_ChooseMushroom goto_if_set HAS_BIG_MUSHROOM, TwoIsland_House_EventScript_GiveBigMushroom goto_if_set HAS_TINY_MUSHROOMS, TwoIsland_House_EventScript_GiveTinyMushrooms diff --git a/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc b/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc index 005e4990b..d70199be5 100644 --- a/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc +++ b/data/maps/TwoIsland_JoyfulGameCorner/scripts.inc @@ -128,8 +128,7 @@ TwoIsland_JoyfulGameCorner_Movement_BikerLookAround:: TwoIsland_JoyfulGameCorner_EventScript_InfoMan:: lock faceplayer - compare VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 4 - goto_if_eq JoyfulGameCorner_EventScript_InfoMan2 + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 4, JoyfulGameCorner_EventScript_InfoMan2 goto_if_set FLAG_RESCUED_LOSTELLE, TwoIsland_JoyfulGameCorner_EventScript_GetGamesGoingSoon msgbox TwoIsland_JoyfulGameCorner_Text_NotRunningAnyGamesToday release @@ -144,11 +143,9 @@ TwoIsland_JoyfulGameCorner_EventScript_GetGamesGoingSoon:: TwoIsland_JoyfulGameCorner_EventScript_LostellesDaddy:: lock faceplayer - compare VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 4 - goto_if_eq JoyfulGameCorner_EventScript_MinigameAttendant + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 4, JoyfulGameCorner_EventScript_MinigameAttendant goto_if_set FLAG_GOT_MOON_STONE_FROM_JOYFUL_GAME_CORNER, TwoIsland_JoyfulGameCorner_EventScript_GetGameCornerRunning - compare VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 3 - goto_if_eq TwoIsland_JoyfulGameCorner_EventScript_GiveDaddyMeteorite + goto_if_eq VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER, 3, TwoIsland_JoyfulGameCorner_EventScript_GiveDaddyMeteorite msgbox TwoIsland_JoyfulGameCorner_Text_PleaseGoToThreeIsland release end @@ -170,8 +167,7 @@ TwoIsland_JoyfulGameCorner_EventScript_GiveDaddyMeteorite:: TwoIsland_JoyfulGameCorner_EventScript_ReceiveMoonStone:: checkitemspace ITEM_MOON_STONE - compare VAR_RESULT, FALSE - goto_if_eq TwoIsland_JoyfulGameCorner_EventScript_NoRoomForMoonStone + goto_if_eq VAR_RESULT, FALSE, TwoIsland_JoyfulGameCorner_EventScript_NoRoomForMoonStone additem ITEM_MOON_STONE setflag FLAG_GOT_MOON_STONE_FROM_JOYFUL_GAME_CORNER msgreceiveditem TwoIsland_JoyfulGameCorner_Text_ReceivedMoonStoneFromLostellesDaddy, ITEM_MOON_STONE diff --git a/data/maps/UndergroundPath_NorthEntrance/scripts.inc b/data/maps/UndergroundPath_NorthEntrance/scripts.inc index 64a7ba916..671948449 100644 --- a/data/maps/UndergroundPath_NorthEntrance/scripts.inc +++ b/data/maps/UndergroundPath_NorthEntrance/scripts.inc @@ -8,14 +8,11 @@ UndergroundPath_NorthEntrance_EventScript_Saige:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_MS_NIDO_TRADE, UndergroundPath_NorthEntrance_EventScript_AlreadyTraded msgbox Trade_Text_DoYouHaveMonWantToTradeForMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq UndergroundPath_NorthEntrance_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, UndergroundPath_NorthEntrance_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge UndergroundPath_NorthEntrance_EventScript_DeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, UndergroundPath_NorthEntrance_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne UndergroundPath_NorthEntrance_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, UndergroundPath_NorthEntrance_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox Trade_Text_ThanksYoureAPal setflag FLAG_DID_MS_NIDO_TRADE diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc index c56a83337..c8f7f9d75 100644 --- a/data/maps/VermilionCity/scripts.inc +++ b/data/maps/VermilionCity/scripts.inc @@ -38,8 +38,7 @@ VermilionCity_EventScript_Woman:: VermilionCity_EventScript_OldMan1:: lock faceplayer - compare VAR_MAP_SCENE_VERMILION_CITY, 3 - goto_if_eq VermilionCity_EventScript_OldMan1SSAnneLeft + goto_if_eq VAR_MAP_SCENE_VERMILION_CITY, 3, VermilionCity_EventScript_OldMan1SSAnneLeft msgbox VermilionCity_Text_DidYouSeeSSAnneInHarbor release end @@ -52,8 +51,7 @@ VermilionCity_EventScript_OldMan1SSAnneLeft:: VermilionCity_EventScript_FerrySailor:: lock faceplayer - compare VAR_MAP_SCENE_VERMILION_CITY, 3 - goto_if_eq VermilionCity_EventScript_CheckSeagallopPresent + goto_if_eq VAR_MAP_SCENE_VERMILION_CITY, 3, VermilionCity_EventScript_CheckSeagallopPresent msgbox VermilionCity_Text_WelcomeToTheSSAnne release end @@ -61,25 +59,21 @@ VermilionCity_EventScript_FerrySailor:: VermilionCity_EventScript_CheckHasMysticTicket:: goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, EventScript_SetResultFalse checkitem ITEM_MYSTIC_TICKET - compare VAR_RESULT, FALSE - goto_if_eq EventScript_SetResultFalse + goto_if_eq VAR_RESULT, FALSE, EventScript_SetResultFalse goto EventScript_SetResultTrue end VermilionCity_EventScript_CheckHasAuroraTicket:: goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, EventScript_SetResultFalse checkitem ITEM_AURORA_TICKET - compare VAR_RESULT, FALSE - goto_if_eq EventScript_SetResultFalse + goto_if_eq VAR_RESULT, FALSE, EventScript_SetResultFalse goto EventScript_SetResultTrue end VermilionCity_EventScript_CheckSeagallopPresent:: setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 - goto_if_ge VermilionCity_EventScript_ChooseSeagallopDestRainbowPass - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1 - goto_if_ge VermilionCity_EventScript_ChooseSeagallopDestTriPass + goto_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, VermilionCity_EventScript_ChooseSeagallopDestRainbowPass + goto_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1, VermilionCity_EventScript_ChooseSeagallopDestTriPass msgbox VermilionCity_Text_TheShipSetSail release end @@ -88,11 +82,9 @@ VermilionCity_EventScript_ChooseSeagallopDestRainbowPass:: goto_if_questlog EventScript_ReleaseEnd special QuestLog_CutRecording call VermilionCity_EventScript_CheckHasMysticTicket - compare VAR_RESULT, TRUE - goto_if_eq VermilionCity_EventScript_HasMysticTicket + goto_if_eq VAR_RESULT, TRUE, VermilionCity_EventScript_HasMysticTicket call VermilionCity_EventScript_CheckHasAuroraTicket - compare VAR_RESULT, TRUE - goto_if_eq VermilionCity_EventScript_HasAuroraTicket + goto_if_eq VAR_RESULT, TRUE, VermilionCity_EventScript_HasAuroraTicket setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY message VermilionCity_Text_BoardSeagallopRainbowPass waitmessage @@ -101,8 +93,7 @@ VermilionCity_EventScript_ChooseSeagallopDestRainbowPass:: VermilionCity_EventScript_HasMysticTicket:: call VermilionCity_EventScript_CheckHasAuroraTicket - compare VAR_RESULT, TRUE - goto_if_eq VermilionCity_EventScript_HasMysticAndAuroraTickets + goto_if_eq VAR_RESULT, TRUE, VermilionCity_EventScript_HasMysticAndAuroraTickets call_if_unset FLAG_SHOWN_MYSTIC_TICKET, VermilionCity_EventScript_ShowMysticTicket message VermilionCity_Text_BoardSeagallopFerry waitmessage @@ -203,8 +194,7 @@ VermilionCity_EventScript_CheckTicket:: applymovement LOCALID_FERRY_SAILOR, Movement_WalkInPlaceFastestLeft applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkInPlaceFastestRight waitmovement 0 - compare VAR_MAP_SCENE_VERMILION_CITY, 3 - goto_if_eq VermilionCity_EventScript_CheckSeagallopPresentTrigger + goto_if_eq VAR_MAP_SCENE_VERMILION_CITY, 3, VermilionCity_EventScript_CheckSeagallopPresentTrigger msgbox VermilionCity_Text_DoYouHaveATicket goto_if_unset FLAG_GOT_SS_TICKET, VermilionCity_EventScript_DontHaveSSTicket msgbox VermilionCity_Text_FlashedSSTicket @@ -220,10 +210,8 @@ VermilionCity_EventScript_DontHaveSSTicket:: VermilionCity_EventScript_CheckSeagallopPresentTrigger:: setvar VAR_0x8004, SEAGALLOP_VERMILION_CITY - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 - goto_if_ge VermilionCity_EventScript_ChooseSeagallopDestRainbowPass - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1 - goto_if_ge VermilionCity_EventScript_ChooseSeagallopDestTriPass + goto_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, VermilionCity_EventScript_ChooseSeagallopDestRainbowPass + goto_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 1, VermilionCity_EventScript_ChooseSeagallopDestTriPass msgbox VermilionCity_Text_TheShipSetSail closemessage goto VermilionCity_EventScript_WalkUpPier diff --git a/data/maps/VermilionCity_Gym/scripts.inc b/data/maps/VermilionCity_Gym/scripts.inc index 320c54ad0..844201b07 100644 --- a/data/maps/VermilionCity_Gym/scripts.inc +++ b/data/maps/VermilionCity_Gym/scripts.inc @@ -147,8 +147,7 @@ VermilionCity_Gym_EventScript_TrashCan:: copyvar SWITCH2_ID, VAR_TEMP_1 goto_if_set FLAG_FOUND_BOTH_VERMILION_GYM_SWITCHES, VermilionCity_Gym_EventScript_LocksAlreadyOpen goto_if_set FOUND_FIRST_SWITCH, VermilionCity_Gym_EventScript_TrySwitchTwo - compare SWITCH1_ID, TRASH_CAN_ID - goto_if_eq VermilionCity_Gym_EventScript_FoundSwitchOne + goto_if_eq SWITCH1_ID, TRASH_CAN_ID, VermilionCity_Gym_EventScript_FoundSwitchOne msgbox VermilionCity_Gym_Text_NopeOnlyTrashHere releaseall end @@ -164,8 +163,7 @@ VermilionCity_Gym_EventScript_FoundSwitchOne:: end VermilionCity_Gym_EventScript_TrySwitchTwo:: - compare SWITCH2_ID, TRASH_CAN_ID - goto_if_eq VermilionCity_Gym_EventScript_FoundSwitchTwo + goto_if_eq SWITCH2_ID, TRASH_CAN_ID, VermilionCity_Gym_EventScript_FoundSwitchTwo msgbox VermilionCity_Gym_Text_OnlyTrashLocksWereReset clearflag FOUND_FIRST_SWITCH special SetVermilionTrashCans @@ -230,8 +228,7 @@ VermilionCity_Gym_EventScript_ShowOaksAide:: VermilionCity_Gym_EventScript_GiveTM34:: msgbox VermilionCity_Gym_Text_ExplainThunderBadgeTakeThis checkitemspace ITEM_TM34 - compare VAR_RESULT, FALSE - goto_if_eq VermilionCity_Gym_EventScript_NoRoomForTM34 + goto_if_eq VAR_RESULT, FALSE, VermilionCity_Gym_EventScript_NoRoomForTM34 giveitem_msg VermilionCity_Gym_Text_ReceivedTM34FromLtSurge, ITEM_TM34 setflag FLAG_GOT_TM34_FROM_SURGE msgbox VermilionCity_Gym_Text_ExplainTM34 diff --git a/data/maps/VermilionCity_House1/scripts.inc b/data/maps/VermilionCity_House1/scripts.inc index e3d7a4605..e4afccb20 100644 --- a/data/maps/VermilionCity_House1/scripts.inc +++ b/data/maps/VermilionCity_House1/scripts.inc @@ -6,8 +6,7 @@ VermilionCity_House1_EventScript_FishingGuru:: faceplayer goto_if_set FLAG_GOT_OLD_ROD, VermilionCity_House1_EventScript_AlreadyGotOldRod msgbox VermilionCity_House1_Text_ImFishingGuruDoYouLikeToFish, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq VermilionCity_House1_EventScript_GiveOldRod + goto_if_eq VAR_RESULT, YES, VermilionCity_House1_EventScript_GiveOldRod msgbox VermilionCity_House1_Text_OhThatsSoDisappointing release end @@ -19,8 +18,7 @@ VermilionCity_House1_EventScript_AlreadyGotOldRod:: VermilionCity_House1_EventScript_GiveOldRod:: checkitemspace ITEM_OLD_ROD - compare VAR_RESULT, FALSE - goto_if_eq VermilionCity_House1_EventScript_NoRoomForOldRod + goto_if_eq VAR_RESULT, FALSE, VermilionCity_House1_EventScript_NoRoomForOldRod additem ITEM_OLD_ROD msgbox VermilionCity_House1_Text_TakeThisAndFish msgreceiveditem VermilionCity_House1_Text_ReceivedOldRodFromFishingGuru, ITEM_OLD_ROD diff --git a/data/maps/VermilionCity_House2/scripts.inc b/data/maps/VermilionCity_House2/scripts.inc index a6c960685..2bd2400be 100644 --- a/data/maps/VermilionCity_House2/scripts.inc +++ b/data/maps/VermilionCity_House2/scripts.inc @@ -8,14 +8,11 @@ VermilionCity_House2_EventScript_Elyssa:: call EventScript_GetInGameTradeSpeciesInfo goto_if_set FLAG_DID_CH_DING_TRADE, VermilionCity_House2_EventScript_AlreadyTraded msgbox VermilionCity_House2_Text_DoYouHaveMonWantToTradeForMyMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq VermilionCity_House2_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, VermilionCity_House2_EventScript_DeclineTrade call EventScript_ChooseMonForInGameTrade - compare VAR_0x8004, PARTY_SIZE - goto_if_ge VermilionCity_House2_EventScript_DeclineTrade + goto_if_ge VAR_0x8004, PARTY_SIZE, VermilionCity_House2_EventScript_DeclineTrade call EventScript_GetInGameTradeSpecies - compare VAR_RESULT, VAR_0x8009 - goto_if_ne VermilionCity_House2_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, VermilionCity_House2_EventScript_NotRequestedMon call EventScript_DoInGameTrade msgbox VermilionCity_House2_Text_ThankYou setflag FLAG_DID_CH_DING_TRADE diff --git a/data/maps/VermilionCity_PokemonFanClub/scripts.inc b/data/maps/VermilionCity_PokemonFanClub/scripts.inc index 28ee7527c..1ef77430e 100644 --- a/data/maps/VermilionCity_PokemonFanClub/scripts.inc +++ b/data/maps/VermilionCity_PokemonFanClub/scripts.inc @@ -12,8 +12,7 @@ VermilionCity_PokemonFanClub_EventScript_Chairman:: faceplayer goto_if_set FLAG_GOT_BIKE_VOUCHER, VermilionCity_PokemonFanClub_EventScript_AlreadyHeardStory msgbox VermilionCity_PokemonFanClub_Text_DidYouComeToHearAboutMyMons, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq VermilionCity_PokemonFanClub_EventScript_ChairmanStory + goto_if_eq VAR_RESULT, YES, VermilionCity_PokemonFanClub_EventScript_ChairmanStory msgbox VermilionCity_PokemonFanClub_Text_ComeBackToHearStory release end @@ -26,8 +25,7 @@ VermilionCity_PokemonFanClub_EventScript_AlreadyHeardStory:: VermilionCity_PokemonFanClub_EventScript_ChairmanStory:: msgbox VermilionCity_PokemonFanClub_Text_ChairmansStory checkitemspace ITEM_BIKE_VOUCHER - compare VAR_RESULT, FALSE - goto_if_eq VermilionCity_PokemonFanClub_EventScript_NoRoomForBikeVoucher + goto_if_eq VAR_RESULT, FALSE, VermilionCity_PokemonFanClub_EventScript_NoRoomForBikeVoucher setflag FLAG_GOT_BIKE_VOUCHER giveitem_msg VermilionCity_PokemonFanClub_Text_ReceivedBikeVoucherFromChairman, ITEM_BIKE_VOUCHER, 1, MUS_OBTAIN_KEY_ITEM msgbox VermilionCity_PokemonFanClub_Text_ExplainBikeVoucher diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index f9d118b09..c7db0fc69 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -6,8 +6,7 @@ VictoryRoad_1F_MapScripts:: .byte 0 VictoryRoad_1F_OnLoad:: - compare VAR_MAP_SCENE_VICTORY_ROAD_1F, 100 - call_if_ne VictoryRoad_1F_EventScript_SetRockBarrier + call_if_ne VAR_MAP_SCENE_VICTORY_ROAD_1F, 100, VictoryRoad_1F_EventScript_SetRockBarrier end VictoryRoad_1F_EventScript_SetRockBarrier:: @@ -21,8 +20,7 @@ VictoryRoad_1F_OnTransition:: VictoryRoad_1F_EventScript_FloorSwitch:: lockall - compare VAR_MAP_SCENE_VICTORY_ROAD_1F, 100 - goto_if_eq VictoryRoad_1F_EventScript_FloorSwitchAlreadyPressed + goto_if_eq VAR_MAP_SCENE_VICTORY_ROAD_1F, 100, VictoryRoad_1F_EventScript_FloorSwitchAlreadyPressed setmetatile 12, 14, METATILE_Cave_Floor_Ledge_Top, 0 setmetatile 12, 15, METATILE_Cave_Floor_Ledge_Bottom, 0 playse SE_ICE_BREAK diff --git a/data/maps/VictoryRoad_2F/scripts.inc b/data/maps/VictoryRoad_2F/scripts.inc index 738c62818..7e8140e29 100644 --- a/data/maps/VictoryRoad_2F/scripts.inc +++ b/data/maps/VictoryRoad_2F/scripts.inc @@ -6,10 +6,8 @@ VictoryRoad_2F_MapScripts:: .byte 0 VictoryRoad_2F_OnLoad:: - compare VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER1, 100 - call_if_ne VictoryRoad_2F_EventScript_SetRockBarrier1 - compare VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2, 100 - call_if_ne VictoryRoad_2F_EventScript_SetRockBarrier2 + call_if_ne VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER1, 100, VictoryRoad_2F_EventScript_SetRockBarrier1 + call_if_ne VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2, 100, VictoryRoad_2F_EventScript_SetRockBarrier2 end VictoryRoad_2F_EventScript_SetRockBarrier1:: @@ -24,8 +22,7 @@ VictoryRoad_2F_EventScript_SetRockBarrier2:: VictoryRoad_2F_EventScript_FloorSwitch1:: lockall - compare VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER1, 100 - goto_if_eq VictoryRoad_2F_EventScript_FloorSwitch1AlreadyPressed + goto_if_eq VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER1, 100, VictoryRoad_2F_EventScript_FloorSwitch1AlreadyPressed setmetatile 13, 10, METATILE_Cave_Floor_Ledge_Top, 0 setmetatile 13, 11, METATILE_Cave_Floor_Ledge_Bottom, 0 playse SE_ICE_BREAK @@ -42,8 +39,7 @@ VictoryRoad_2F_EventScript_FloorSwitch1AlreadyPressed:: VictoryRoad_2F_EventScript_FloorSwitch2:: lockall - compare VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2, 100 - goto_if_eq VictoryRoad_2F_EventScript_FloorSwitch2AlreadyPressed + goto_if_eq VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2, 100, VictoryRoad_2F_EventScript_FloorSwitch2AlreadyPressed setmetatile 33, 16, METATILE_Cave_Floor_Ledge_Top, 0 setmetatile 33, 17, METATILE_Cave_Floor_Ledge_Bottom, 0 playse SE_ICE_BREAK diff --git a/data/maps/VictoryRoad_3F/scripts.inc b/data/maps/VictoryRoad_3F/scripts.inc index 6a6ba11b7..23350fb8b 100644 --- a/data/maps/VictoryRoad_3F/scripts.inc +++ b/data/maps/VictoryRoad_3F/scripts.inc @@ -6,8 +6,7 @@ VictoryRoad_3F_MapScripts:: .byte 0 VictoryRoad_3F_OnLoad:: - compare VAR_MAP_SCENE_VICTORY_ROAD_3F, 100 - call_if_ne VictoryRoad_3F_EventScript_SetRockBarrier + call_if_ne VAR_MAP_SCENE_VICTORY_ROAD_3F, 100, VictoryRoad_3F_EventScript_SetRockBarrier end VictoryRoad_3F_EventScript_SetRockBarrier:: @@ -17,8 +16,7 @@ VictoryRoad_3F_EventScript_SetRockBarrier:: VictoryRoad_3F_EventScript_FloorSwitch:: lockall - compare VAR_MAP_SCENE_VICTORY_ROAD_3F, 100 - goto_if_eq VictoryRoad_3F_EventScript_FloorSwitchAlreadyPressed + goto_if_eq VAR_MAP_SCENE_VICTORY_ROAD_3F, 100, VictoryRoad_3F_EventScript_FloorSwitchAlreadyPressed setmetatile 12, 12, METATILE_Cave_Floor_Ledge_Top, 0 setmetatile 12, 13, METATILE_Cave_Floor_Ledge_Bottom, 0 playse SE_ICE_BREAK diff --git a/data/maps/ViridianCity/scripts.inc b/data/maps/ViridianCity/scripts.inc index 5cd7b62b7..824aae6fa 100644 --- a/data/maps/ViridianCity/scripts.inc +++ b/data/maps/ViridianCity/scripts.inc @@ -8,14 +8,10 @@ ViridianCity_MapScripts:: ViridianCity_OnTransition:: setworldmapflag FLAG_WORLD_MAP_VIRIDIAN_CITY - compare VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 0 - call_if_eq ViridianCity_EventScript_SetOldManBlockingRoad - compare VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 1 - call_if_eq ViridianCity_EventScript_SetOldManStandingByRoad - compare VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 2 - call_if_ge ViridianCity_EventScript_SetOldManNormal - compare VAR_MAP_SCENE_VIRIDIAN_CITY_GYM_DOOR, 0 - call_if_eq ViridianCity_EventScript_TryUnlockGym + call_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 0, ViridianCity_EventScript_SetOldManBlockingRoad + call_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 1, ViridianCity_EventScript_SetOldManStandingByRoad + call_if_ge VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 2, ViridianCity_EventScript_SetOldManNormal + call_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_GYM_DOOR, 0, ViridianCity_EventScript_TryUnlockGym end ViridianCity_EventScript_SetOldManNormal:: @@ -89,8 +85,7 @@ ViridianCity_EventScript_Boy:: ViridianCity_EventScript_OldMan:: lock faceplayer - compare VAR_MAP_SCENE_VIRIDIAN_CITY_GYM_DOOR, 1 - goto_if_eq ViridianCity_EventScript_OldManGymLeaderReturned + goto_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_GYM_DOOR, 1, ViridianCity_EventScript_OldManGymLeaderReturned msgbox ViridianCity_Text_GymClosedWonderWhoLeaderIs closemessage applymovement LOCALID_OLD_MAN, Movement_FaceOriginalDirection @@ -107,18 +102,14 @@ ViridianCity_EventScript_TutorialOldMan:: lock faceplayer goto_if_set FLAG_BADGE01_GET, ViridianCity_EventScript_AskIfTeachyTVHelpful - compare VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 2 - goto_if_ge ViridianCity_EventScript_TutorialCompleted - compare VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 1 - goto_if_eq ViridianCity_EventScript_TutorialStart - compare VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 0 - goto_if_eq ViridianCity_EventScript_TutorialNotReady + goto_if_ge VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 2, ViridianCity_EventScript_TutorialCompleted + goto_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 1, ViridianCity_EventScript_TutorialStart + goto_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 0, ViridianCity_EventScript_TutorialNotReady end ViridianCity_EventScript_AskIfTeachyTVHelpful:: msgbox ViridianCity_Text_HowsTeachyTVHelping, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ViridianCity_EventScript_TeachyTVNotHelpful + goto_if_eq VAR_RESULT, NO, ViridianCity_EventScript_TeachyTVNotHelpful msgbox ViridianCity_Text_MyGrandsonOnTheShow release end @@ -164,10 +155,8 @@ ViridianCity_EventScript_Youngster:: lock faceplayer msgbox ViridianCity_Text_WantToKnowAboutCaterpillarMons, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq ViridianCity_EventScript_YoungsterExplainCaterpillars - compare VAR_RESULT, NO - goto_if_eq ViridianCity_EventScript_YoungsterDeclineExplanation + goto_if_eq VAR_RESULT, YES, ViridianCity_EventScript_YoungsterExplainCaterpillars + goto_if_eq VAR_RESULT, NO, ViridianCity_EventScript_YoungsterDeclineExplanation end ViridianCity_EventScript_YoungsterExplainCaterpillars:: @@ -183,8 +172,7 @@ ViridianCity_EventScript_YoungsterDeclineExplanation:: ViridianCity_EventScript_Woman:: lock faceplayer - compare VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 0 - goto_if_eq ViridianCity_EventScript_WomanRoadBlocked + goto_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_OLD_MAN, 0, ViridianCity_EventScript_WomanRoadBlocked msgbox ViridianCity_Text_GoShoppingInPewterOccasionally release end diff --git a/data/maps/ViridianCity_Gym/scripts.inc b/data/maps/ViridianCity_Gym/scripts.inc index 3fdf779d0..c1ca590e0 100644 --- a/data/maps/ViridianCity_Gym/scripts.inc +++ b/data/maps/ViridianCity_Gym/scripts.inc @@ -28,8 +28,7 @@ ViridianCity_Gym_EventScript_DefeatedGiovanni:: ViridianCity_Gym_EventScript_GiveTM26:: msgbox ViridianCity_Gym_Text_ExplainEarthBadgeTakeThis checkitemspace ITEM_TM26 - compare VAR_RESULT, FALSE - goto_if_eq ViridianCity_Gym_EventScript_NoRoomForTM26 + goto_if_eq VAR_RESULT, FALSE, ViridianCity_Gym_EventScript_NoRoomForTM26 giveitem_msg ViridianCity_Gym_Text_ReceivedTM26FromGiovanni, ITEM_TM26 setflag FLAG_GOT_TM26_FROM_GIOVANNI msgbox ViridianCity_Gym_Text_ExplainTM26 diff --git a/data/maps/ViridianCity_Mart/scripts.inc b/data/maps/ViridianCity_Mart/scripts.inc index c3d068f7a..9d30f53ee 100644 --- a/data/maps/ViridianCity_Mart/scripts.inc +++ b/data/maps/ViridianCity_Mart/scripts.inc @@ -54,8 +54,7 @@ ViridianCity_Mart_Movement_FacePlayer:: ViridianCity_Mart_EventScript_Clerk:: lock faceplayer - compare VAR_MAP_SCENE_VIRIDIAN_CITY_MART, 1 - goto_if_eq ViridianCity_Mart_EventScript_SayHiToOak + goto_if_eq VAR_MAP_SCENE_VIRIDIAN_CITY_MART, 1, ViridianCity_Mart_EventScript_SayHiToOak goto_if_questlog EventScript_ReleaseEnd message Text_MayIHelpYou waitmessage diff --git a/data/maps/ViridianCity_School/scripts.inc b/data/maps/ViridianCity_School/scripts.inc index eca1c7723..7f72fb83c 100644 --- a/data/maps/ViridianCity_School/scripts.inc +++ b/data/maps/ViridianCity_School/scripts.inc @@ -28,16 +28,13 @@ ViridianCity_School_EventScript_Notebook:: lockall msgbox ViridianCity_School_Text_NotebookFirstPage msgbox ViridianCity_School_Text_TurnThePage, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ViridianCity_School_EventScript_StopReadingNotebook + goto_if_eq VAR_RESULT, NO, ViridianCity_School_EventScript_StopReadingNotebook msgbox ViridianCity_School_Text_NotebookSecondPage msgbox ViridianCity_School_Text_TurnThePage, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ViridianCity_School_EventScript_StopReadingNotebook + goto_if_eq VAR_RESULT, NO, ViridianCity_School_EventScript_StopReadingNotebook msgbox ViridianCity_School_Text_NotebookThirdPage msgbox ViridianCity_School_Text_TurnThePage, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ViridianCity_School_EventScript_StopReadingNotebook + goto_if_eq VAR_RESULT, NO, ViridianCity_School_EventScript_StopReadingNotebook msgbox ViridianCity_School_Text_NotebookFourthPage applymovement LOCALID_LASS, Movement_WalkInPlaceFastestUp waitmovement 0 diff --git a/data/mystery_event_msg.s b/data/mystery_event_msg.s index 78c2e05f0..26048ca52 100644 --- a/data/mystery_event_msg.s +++ b/data/mystery_event_msg.s @@ -43,8 +43,7 @@ MysteryEventScript_SurfPichu:: SurfPichu_GiveIfPossible: specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount - compare VAR_EVENT_PICHU_SLOT, PARTY_SIZE - vgoto_if_eq SurfPichu_FullParty + vgoto_if_eq VAR_EVENT_PICHU_SLOT, PARTY_SIZE, SurfPichu_FullParty setflag FLAG_MYSTERY_GIFT_DONE vcall SurfPichu_GiveEgg lock @@ -70,16 +69,11 @@ SurfPichu_GiveEgg: giveegg SPECIES_PICHU setmoneventlegal VAR_EVENT_PICHU_SLOT setmonmetlocation VAR_EVENT_PICHU_SLOT, 0xff - compare VAR_EVENT_PICHU_SLOT, 1 - vgoto_if_eq SurfPichu_Slot1 - compare VAR_EVENT_PICHU_SLOT, 2 - vgoto_if_eq SurfPichu_Slot2 - compare VAR_EVENT_PICHU_SLOT, 3 - vgoto_if_eq SurfPichu_Slot3 - compare VAR_EVENT_PICHU_SLOT, 4 - vgoto_if_eq SurfPichu_Slot4 - compare VAR_EVENT_PICHU_SLOT, 5 - vgoto_if_eq SurfPichu_Slot5 + vgoto_if_eq VAR_EVENT_PICHU_SLOT, 1, SurfPichu_Slot1 + vgoto_if_eq VAR_EVENT_PICHU_SLOT, 2, SurfPichu_Slot2 + vgoto_if_eq VAR_EVENT_PICHU_SLOT, 3, SurfPichu_Slot3 + vgoto_if_eq VAR_EVENT_PICHU_SLOT, 4, SurfPichu_Slot4 + vgoto_if_eq VAR_EVENT_PICHU_SLOT, 5, SurfPichu_Slot5 return SurfPichu_Slot1: @@ -118,8 +112,7 @@ sText_FullParty: MysteryEventScript_VisitingTrainer:: setvaddress MysteryEventScript_VisitingTrainer special ValidateEReaderTrainer - compare VAR_RESULT, 0 - vgoto_if_eq MysteryEventScript_VisitingTrainerArrived + vgoto_if_eq VAR_RESULT, 0, MysteryEventScript_VisitingTrainerArrived lock faceplayer vmessage sText_MysteryGiftVisitingTrainer @@ -170,8 +163,7 @@ MysteryEventScript_BattleCard:: vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryEventScript_BattleCardInfo setorcopyvar VAR_RESULT, 2 specialvar VAR_0x8008, BattleCardAction - compare VAR_0x8008, 3 - vgoto_if_ne MysteryEventScript_BattleCardInfo + vgoto_if_ne VAR_0x8008, 3, MysteryEventScript_BattleCardInfo lock faceplayer vmessage sText_MysteryGiftBattleCountCard_2 @@ -219,14 +211,12 @@ MysteryEventScript_AuroraTicket:: vgoto_if_set FLAG_GOT_AURORA_TICKET, AuroraTicket_Obtained vgoto_if_set FLAG_FOUGHT_DEOXYS, AuroraTicket_Obtained checkitem ITEM_AURORA_TICKET, 1 - compare VAR_RESULT, TRUE - vgoto_if_eq AuroraTicket_Obtained + vgoto_if_eq VAR_RESULT, TRUE, AuroraTicket_Obtained vmessage sText_AuroraTicket1 waitmessage waitbuttonpress checkitemspace ITEM_AURORA_TICKET, 1 - compare VAR_RESULT, FALSE - vgoto_if_eq AuroraTicket_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, AuroraTicket_NoBagSpace giveitem ITEM_AURORA_TICKET setflag FLAG_ENABLE_SHIP_BIRTH_ISLAND setflag FLAG_GOT_AURORA_TICKET @@ -280,14 +270,12 @@ MysteryEventScript_MysticTicket:: vgoto_if_set FLAG_FOUGHT_LUGIA, MysticTicket_Obtained vgoto_if_set FLAG_FOUGHT_HO_OH, MysticTicket_Obtained checkitem ITEM_MYSTIC_TICKET, 1 - compare VAR_RESULT, TRUE - vgoto_if_eq MysticTicket_Obtained + vgoto_if_eq VAR_RESULT, TRUE, MysticTicket_Obtained vmessage sText_MysticTicket2 waitmessage waitbuttonpress checkitemspace ITEM_MYSTIC_TICKET, 1 - compare VAR_RESULT, FALSE - vgoto_if_eq MysticTicket_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, MysticTicket_NoBagSpace giveitem ITEM_MYSTIC_TICKET setflag FLAG_ENABLE_SHIP_NAVEL_ROCK setflag FLAG_GOT_MYSTIC_TICKET @@ -336,8 +324,7 @@ sText_MysticTicketNoPlace: MysteryEventScript_AlteringCave:: setvaddress MysteryEventScript_AlteringCave addvar VAR_ALTERING_CAVE_WILD_SET, 1 - compare VAR_ALTERING_CAVE_WILD_SET, 10 - vgoto_if_ne MysteryEventScript_AlteringCave_ + vgoto_if_ne VAR_ALTERING_CAVE_WILD_SET, 10, MysteryEventScript_AlteringCave_ setvar VAR_ALTERING_CAVE_WILD_SET, 0 MysteryEventScript_AlteringCave_: lock diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 257df25d3..a577534bf 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -4,8 +4,7 @@ CableClub_OnTransition:: CableClub_EventScript_HideOrShowMysteryGiftMan:: specialvar VAR_RESULT, ValidateReceivedWonderCard - compare VAR_RESULT, FALSE - goto_if_eq EventScript_HideMysteryGiftMan + goto_if_eq VAR_RESULT, FALSE, EventScript_HideMysteryGiftMan clearflag FLAG_HIDE_MG_DELIVERYMEN return @@ -34,27 +33,19 @@ CableClub_OnWarp:: .2byte 0 EventScript_CheckTurnAttendant:: - compare VAR_0x8007, 0 - goto_if_eq EventScript_CheckTurnAttendantEnd + goto_if_eq VAR_0x8007, 0, EventScript_CheckTurnAttendantEnd turnobject VAR_0x8007, DIR_WEST EventScript_CheckTurnAttendantEnd: end CableClub_OnLoad:: - compare VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE - goto_if_eq EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE - goto_if_eq EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE - goto_if_eq EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER - goto_if_eq EventScript_OnLoadFromTradeCenter - compare VAR_CABLE_CLUB_STATE, USING_UNION_ROOM - goto_if_eq EventScript_OnLoadFromUnionRoom - compare VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH - goto_if_eq EventScript_OnLoadFromBerryCrush - compare VAR_CABLE_CLUB_STATE, USING_MINIGAME - goto_if_eq EventScript_OnLoadFromGameCorner + goto_if_eq VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE, EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE, EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE, EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER, EventScript_OnLoadFromTradeCenter + goto_if_eq VAR_CABLE_CLUB_STATE, USING_UNION_ROOM, EventScript_OnLoadFromUnionRoom + goto_if_eq VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH, EventScript_OnLoadFromBerryCrush + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MINIGAME, EventScript_OnLoadFromGameCorner end EventScript_OnLoadFromColosseum:: @@ -114,8 +105,7 @@ CableClub_EventScript_CloseLinkAndExitLinkRoom:: special QuestLog_StartRecordingInputsAfterDeferredEvent setvar VAR_CABLE_CLUB_STATE, 0 textcolor NPC_TEXT_COLOR_FEMALE - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement VAR_0x8007, Movement_AttendantFaceLeft waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom @@ -140,8 +130,7 @@ CableClub_EventScript_PlayerExitTradeCenter:: special QuestLog_StartRecordingInputsAfterDeferredEvent setvar VAR_CABLE_CLUB_STATE, 0 textcolor NPC_TEXT_COLOR_FEMALE - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -164,8 +153,7 @@ CableClub_EventScript_PlayerExitUnionRoom:: special QuestLog_StartRecordingInputsAfterDeferredEvent setvar VAR_CABLE_CLUB_STATE, 0 textcolor NPC_TEXT_COLOR_FEMALE - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -262,8 +250,7 @@ CableClub_EventScript_SingleBattleMode:: CableClub_EventScript_DoubleBattleMode:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_NeedTwoMonsForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_NeedTwoMonsForDoubleBattle setvar VAR_0x8004, USING_DOUBLE_BATTLE goto CableClub_EventScript_TryEnterColosseum end @@ -280,8 +267,7 @@ CableClub_EventScript_MultiBattleMode:: CableClub_EventScript_TryEnterColosseum:: call EventScript_AskSaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message CableClub_Text_PleaseWaitBCancel waitmessage special HelpSystem_Disable @@ -289,18 +275,12 @@ CableClub_EventScript_TryEnterColosseum:: special TryBattleLinkup waitstate call EventScript_RestorePrevTextColor - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterColosseum - compare VAR_RESULT, 2 - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, 3 - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, 4 - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, 6 - goto_if_eq CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterColosseum + goto_if_eq VAR_RESULT, 2, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, 3, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, 4, CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 6, CableClub_EventScript_AbortLinkConnectionError end CableClub_EventScript_EnterColosseum:: @@ -327,8 +307,7 @@ CableClub_EventScript_EnterColosseum:: closedoor 9, 1 waitdooranim release - compare VAR_0x8004, USING_MULTI_BATTLE - goto_if_eq CableClub_EventScript_WarpTo4PColosseum + goto_if_eq VAR_0x8004, USING_MULTI_BATTLE, CableClub_EventScript_WarpTo4PColosseum special SetCableClubWarp warp MAP_BATTLE_COLOSSEUM_2P, 6, 8 special DoCableClubWarp @@ -384,11 +363,9 @@ CableClub_EventScript_ConfirmNumberAndRestart:: CableClub_EventScript_TradeCenter:: copyvar VAR_0x8007, VAR_LAST_TALKED call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink call EventScript_AskSaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message CableClub_Text_PleaseWaitBCancel waitmessage special HelpSystem_Disable @@ -396,22 +373,14 @@ CableClub_EventScript_TradeCenter:: special TryTradeLinkup waitstate call EventScript_RestorePrevTextColor - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterTradeCenter - compare VAR_RESULT, 2 - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, 3 - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, 4 - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, 6 - goto_if_eq CableClub_EventScript_AbortLinkConnectionError - compare VAR_RESULT, 7 - goto_if_eq CableClub_EventScript_AbortLinkPlayerNotReady - compare VAR_RESULT, 9 - goto_if_eq CableClub_EventScript_AbortLinkOtherTrainerNotReady + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterTradeCenter + goto_if_eq VAR_RESULT, 2, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, 3, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, 4, CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 6, CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, 7, CableClub_EventScript_AbortLinkPlayerNotReady + goto_if_eq VAR_RESULT, 9, CableClub_EventScript_AbortLinkOtherTrainerNotReady end CableClub_EventScript_EnterTradeCenter:: @@ -444,11 +413,9 @@ CableClub_EventScript_EnterTradeCenter:: CableClub_EventScript_CheckPartyTradeRequirements:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsToTrade + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsToTrade specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_CantTradeEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_CantTradeEnigmaBerry setvar VAR_RESULT, TRUE return @@ -624,8 +591,7 @@ BattleColosseum_4P_EventScript_PlayerSpot0:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 0 textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot @@ -636,8 +602,7 @@ BattleColosseum_4P_EventScript_PlayerSpot1:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 1 textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot @@ -648,8 +613,7 @@ BattleColosseum_4P_EventScript_PlayerSpot2:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 2 textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot @@ -660,8 +624,7 @@ BattleColosseum_4P_EventScript_PlayerSpot3:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleColosseum_4P_EventScript_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, BattleColosseum_4P_EventScript_CancelSpotTrigger setvar VAR_0x8005, 3 textcolor NPC_TEXT_COLOR_NEUTRAL special EnterColosseumPlayerSpot @@ -754,8 +717,7 @@ RecordCorner_EventScript_Attendant:: TradeCenter_ConfirmLeaveRoom:: textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_TerminateLinkIfYouLeaveRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq TradeCenter_TerminateLink + goto_if_eq VAR_RESULT, YES, TradeCenter_TerminateLink erasebox 0, 0, 29, 19 releaseall end @@ -780,12 +742,10 @@ CableClub_EventScript_UnionRoomAttendant:: faceplayer goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg copyvar VAR_0x8007, VAR_LAST_TALKED specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_UnionRoomAdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_UnionRoomAdapterNotConnected message CableClub_Text_WelcomeUnionRoomEnter waitmessage goto CableClub_EventScript_AskEnterUnionRoom @@ -808,11 +768,9 @@ CableClub_EventScript_UnionRoomInfo:: CableClub_EventScript_EnterUnionRoom:: call CableClub_EventScript_CheckPartyUnionRoomRequirements - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_AbortLink call EventScript_AskSaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink msgbox CableClub_Text_EnjoyUnionRoom closemessage special HealPlayerParty @@ -844,11 +802,9 @@ CableClub_EventScript_EnterUnionRoom:: CableClub_EventScript_CheckPartyUnionRoomRequirements:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsForUnionRoom + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsForUnionRoom specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_NoEnigmaBerryInUnionRoom + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_NoEnigmaBerryInUnionRoom setvar VAR_RESULT, TRUE return @@ -872,8 +828,7 @@ CableClub_EventScript_WirelessClubAttendant:: faceplayer goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements msgbox CableClub_Text_AskAboutLinking, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_DontAskAboutLinking + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_DontAskAboutLinking msgbox CableClub_Text_ExplainWirelessClub release return @@ -890,11 +845,9 @@ CableClub_EventScript_DirectCornerAttendant:: faceplayer goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_WelcomeToCableClub + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_WelcomeToCableClub message CableClub_Text_WelcomeWhichDirectCornerRoom waitmessage delay 15 @@ -923,11 +876,9 @@ CableClub_EventScript_DirectCornerNoBerry:: CableClub_EventScript_WirelessTrade:: msgbox CableClub_Text_TradePokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_AbortLink setvar VAR_0x8004, LINK_GROUP_TRADE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -952,8 +903,7 @@ CableClub_EventScript_WirelessSingleBattle:: CableClub_EventScript_WirelessDoubleBattle:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle setvar VAR_0x8004, LINK_GROUP_DOUBLE_BATTLE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -975,11 +925,9 @@ CableClub_EventScript_WirelessBattleInfo:: CableClub_EventScript_WirelessBerryCrush:: msgbox CableClub_Text_UseBerryCrush, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink special HasAtLeastOneBerry - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_NeedBerryForBerryCrush + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_NeedBerryForBerryCrush setvar VAR_0x8004, LINK_GROUP_BERRY_CRUSH goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -991,8 +939,7 @@ CableClub_EventScript_NeedBerryForBerryCrush:: CableClub_EventScript_SaveAndChooseLinkLeader:: call EventScript_AskSaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink switch VAR_0x8004 case LINK_GROUP_TRADE, CableClub_EventScript_ChooseLinkLeaderFrom2 case LINK_GROUP_SINGLE_BATTLE, CableClub_EventScript_ChooseLinkLeaderFrom2 @@ -1016,23 +963,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom2:: CableClub_EventScript_TryLeadGroup2Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryLeadGroup2Players + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryLeadGroup2Players release return CableClub_EventScript_TryJoinGroup2Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryJoinGroup2Players + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryJoinGroup2Players release return @@ -1051,23 +992,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom4:: CableClub_EventScript_TryLeadGroup4Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryLeadGroup4Players + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryLeadGroup4Players release return CableClub_EventScript_TryJoinGroup4Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryJoinGroup4Players + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryJoinGroup4Players release return @@ -1086,23 +1021,17 @@ CableClub_EventScript_ChooseLinkLeader:: CableClub_EventScript_TryLeadGroupXPlayers:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryLeadGroupXPlayers + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryLeadGroupXPlayers release return CableClub_EventScript_TryJoinGroupXPlayers:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryJoinGroupXPlayers + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryJoinGroupXPlayers release return @@ -1149,8 +1078,7 @@ CableClub_EventScript_ShowWirelessCommunicationScreen:: lockall goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_NotReadyYet specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_AdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_AdapterNotConnected special HelpSystem_Disable fadescreen FADE_TO_BLACK special ShowWirelessCommunicationScreen @@ -1231,8 +1159,7 @@ JoyfulGameCorner_EventScript_MinigameAttendant:: message Text_WelcomeCanYouWait waitmessage specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_AdapterNotConnectedMinigame + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_AdapterNotConnectedMinigame delay 60 special HelpSystem_Disable message Text_PlayWhichGame @@ -1248,17 +1175,14 @@ JoyfulGameCorner_EventScript_MinigameAttendant:: CableClub_EventScript_PlayPokemonJump:: setvar VAR_0x8005, 0 special IsPokemonJumpSpeciesInParty - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_NoEligiblePkmn + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_NoEligiblePkmn msgbox Text_EnterWhichPokemon setvar VAR_0x8005, 0 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge CableClub_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, CableClub_EventScript_AbortMinigame call EventScript_AskSaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_POKEMON_JUMP goto CableClub_EventScript_ChooseLinkLeaderMinigame end @@ -1266,17 +1190,14 @@ CableClub_EventScript_PlayPokemonJump:: CableClub_EventScript_PlayDodrioBerryPicking:: setvar VAR_0x8005, 1 special IsDodrioInParty - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_NoEligiblePkmn + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_NoEligiblePkmn msgbox Text_EnterWhichPokemon setvar VAR_0x8005, 1 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge CableClub_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, CableClub_EventScript_AbortMinigame call EventScript_AskSaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_BERRY_PICKING goto CableClub_EventScript_ChooseLinkLeaderMinigame end @@ -1296,23 +1217,17 @@ CableClub_EventScript_ChooseLinkLeaderMinigame:: CableClub_EventScript_TryBecomeMinigameLinkLeader:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterMinigame - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeaderMinigame - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryBecomeMinigameLinkLeader + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterMinigame + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeaderMinigame + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryBecomeMinigameLinkLeader release return CableClub_EventScript_TryJoinMinigameLinkGroup:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, 1 - goto_if_eq CableClub_EventScript_EnterMinigame - compare VAR_RESULT, 5 - goto_if_eq CableClub_EventScript_ChooseLinkLeaderMinigame - compare VAR_RESULT, 8 - goto_if_eq CableClub_EventScript_TryJoinMinigameLinkGroup + goto_if_eq VAR_RESULT, 1, CableClub_EventScript_EnterMinigame + goto_if_eq VAR_RESULT, 5, CableClub_EventScript_ChooseLinkLeaderMinigame + goto_if_eq VAR_RESULT, 8, CableClub_EventScript_TryJoinMinigameLinkGroup release return @@ -1343,12 +1258,9 @@ CableClub_EventScript_AdapterNotConnectedMinigame:: CableClub_EventScript_NoEligiblePkmn:: msgbox EventScript_ExplainPokemonJumpRequirements, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortMinigame - compare VAR_0x8005, 0 - call_if_eq CableClub_EventScript_ExplainPokemonJumpRequirements - compare VAR_0x8005, 1 - call_if_eq CableClub_EventScript_ExplainDodrioBerryPickingRequirements + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortMinigame + call_if_eq VAR_0x8005, 0, CableClub_EventScript_ExplainPokemonJumpRequirements + call_if_eq VAR_0x8005, 1, CableClub_EventScript_ExplainDodrioBerryPickingRequirements goto CableClub_EventScript_AbortMinigame end diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index 8bbc92d9f..a0b15678c 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -4,30 +4,25 @@ Route5_PokemonDayCare_EventScript_DaycareMan:: faceplayer showmoneybox 0, 0 specialvar VAR_RESULT, IsThereMonInRoute5Daycare - compare VAR_RESULT, TRUE - goto_if_eq Route5_PokemonDayCare_EventScript_CheckOnMon + goto_if_eq VAR_RESULT, TRUE, Route5_PokemonDayCare_EventScript_CheckOnMon msgbox Route5_PokemonDayCare_Text_WantMeToRaiseMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route5_PokemonDayCare_EventScript_TryGiveMon + goto_if_eq VAR_RESULT, YES, Route5_PokemonDayCare_EventScript_TryGiveMon msgbox Route5_PokemonDayCare_Text_ComeAgain goto Route5_PokemonDayCare_EventScript_CloseMoneyBox end Route5_PokemonDayCare_EventScript_TryGiveMon:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 1 - goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneMonInParty + goto_if_eq VAR_RESULT, 1, Route5_PokemonDayCare_EventScript_OnlyOneMonInParty msgbox Route5_PokemonDayCare_Text_WhichMonShouldIRaise fadescreen FADE_TO_BLACK hidemoneybox special ChooseSendDaycareMon waitstate showmoneybox 0, 0 - compare VAR_0x8004, PARTY_SIZE - goto_if_ge Route5_PokemonDayCare_EventScript_ComeAgain + goto_if_ge VAR_0x8004, PARTY_SIZE, Route5_PokemonDayCare_EventScript_ComeAgain specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot - compare VAR_RESULT, 0 - goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty + goto_if_eq VAR_RESULT, 0, Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies msgbox Route5_PokemonDayCare_Text_LookAfterMonForAWhile waitse @@ -57,14 +52,11 @@ Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty:: Route5_PokemonDayCare_EventScript_CheckOnMon:: setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetNumLevelsGainedForRoute5DaycareMon - compare VAR_RESULT, 0 - call_if_ne Route5_PokemonDayCare_EventScript_MonHasGrownByXLevels - compare VAR_RESULT, 0 - call_if_eq Route5_PokemonDayCare_EventScript_NotEnoughTime + call_if_ne VAR_RESULT, 0, Route5_PokemonDayCare_EventScript_MonHasGrownByXLevels + call_if_eq VAR_RESULT, 0, Route5_PokemonDayCare_EventScript_NotEnoughTime special GetCostToWithdrawRoute5DaycareMon msgbox Route5_PokemonDayCare_Text_OweMeXForMonsReturn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route5_PokemonDayCare_EventScript_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, Route5_PokemonDayCare_EventScript_TryRetrieveMon goto Route5_PokemonDayCare_EventScript_ComeAgain end @@ -78,11 +70,9 @@ Route5_PokemonDayCare_EventScript_NotEnoughTime:: Route5_PokemonDayCare_EventScript_TryRetrieveMon:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, PARTY_SIZE - goto_if_eq Route5_PokemonDayCare_EventScript_NoRoomInParty + goto_if_eq VAR_RESULT, PARTY_SIZE, Route5_PokemonDayCare_EventScript_NoRoomInParty specialvar VAR_RESULT, IsEnoughForCostInVar0x8005 - compare VAR_RESULT, TRUE - goto_if_eq Route5_PokemonDayCare_EventScript_RetrieveMon + goto_if_eq VAR_RESULT, TRUE, Route5_PokemonDayCare_EventScript_RetrieveMon msgbox Route5_PokemonDayCare_Text_DontHaveEnoughMoney goto Route5_PokemonDayCare_EventScript_CloseMoneyBox end diff --git a/data/scripts/field_moves.inc b/data/scripts/field_moves.inc index 80e8ba366..fc2998f1a 100644 --- a/data/scripts/field_moves.inc +++ b/data/scripts/field_moves.inc @@ -3,14 +3,12 @@ EventScript_CutTree:: lockall goto_if_unset FLAG_BADGE02_GET, EventScript_CantCutTree checkpartymove MOVE_CUT - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantCutTree + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantCutTree setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_CUT msgbox Text_CutTreeDown, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_DontCutTree + goto_if_eq VAR_RESULT, NO, EventScript_DontCutTree msgbox Text_MonUsedMove closemessage dofieldeffect FLDEFF_USE_CUT_ON_TREE @@ -63,14 +61,12 @@ EventScript_RockSmash:: lockall goto_if_unset FLAG_BADGE06_GET, EventScript_CantSmashRock checkpartymove MOVE_ROCK_SMASH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSmashRock + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSmashRock setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_ROCK_SMASH msgbox Text_UseRockSmash, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_DontSmashRock + goto_if_eq VAR_RESULT, NO, EventScript_DontSmashRock msgbox Text_MonUsedMove closemessage dofieldeffect FLDEFF_USE_ROCK_SMASH @@ -90,8 +86,7 @@ EventScript_UseRockSmash:: waitmovement 0 removeobject VAR_LAST_TALKED special RockSmashWildEncounter - compare VAR_RESULT, FALSE - goto_if_eq EventScript_RockSmashNoEncounter + goto_if_eq VAR_RESULT, FALSE, EventScript_RockSmashNoEncounter waitstate releaseall end @@ -127,12 +122,10 @@ EventScript_StrengthBoulder:: goto_if_unset FLAG_BADGE04_GET, EventScript_CantMoveBoulder goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_AlreadyUsedStrength checkpartymove MOVE_STRENGTH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantMoveBoulder + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantMoveBoulder setfieldeffectargument 0, VAR_RESULT msgbox Text_UseStrength, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_DontUseStrength + goto_if_eq VAR_RESULT, NO, EventScript_DontUseStrength closemessage dofieldeffect FLDEFF_USE_STRENGTH waitstate @@ -186,13 +179,11 @@ EventScript_Waterfall:: goto_if_questlog EventScript_ReleaseEnd lockall checkpartymove MOVE_WATERFALL - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_WaterCrashingDown + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_WaterCrashingDown bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT msgbox Text_UseWaterfall, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndWaterfall + goto_if_eq VAR_RESULT, NO, EventScript_EndWaterfall msgbox Text_MonUsedWaterfall dofieldeffect FLDEFF_USE_WATERFALL goto EventScript_EndWaterfall @@ -220,14 +211,12 @@ Text_MonUsedWaterfall:: EventScript_DeepWater:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_MayGoUnderwater + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_MayGoUnderwater bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_SeaIsDeepUseDive, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndDive + goto_if_eq VAR_RESULT, NO, EventScript_EndDive msgbox Text_MonUsedDive dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndDive @@ -243,14 +232,12 @@ EventScript_EndDive: EventScript_TrySurface:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSurface + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSurface bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_LightFilteringUseDive, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndSurface + goto_if_eq VAR_RESULT, NO, EventScript_EndSurface msgbox Text_MonUsedDive dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndSurface diff --git a/data/scripts/hall_of_fame.inc b/data/scripts/hall_of_fame.inc index d34a8766f..7fede6987 100644 --- a/data/scripts/hall_of_fame.inc +++ b/data/scripts/hall_of_fame.inc @@ -3,8 +3,7 @@ EventScript_SetDefeatedEliteFourFlagsVars:: call EventScript_ResetEliteFour special Script_UpdateTrainerFanClubGameClear specialvar VAR_RESULT, IsNationalPokedexEnabled - compare VAR_RESULT, FALSE - call_if_eq EventScript_SetReadyTryGiveNationalDexScene + call_if_eq VAR_RESULT, FALSE, EventScript_SetReadyTryGiveNationalDexScene call EventScript_ResetLegendaries return diff --git a/data/scripts/itemfinder.inc b/data/scripts/itemfinder.inc index 941c17a9b..1647364ce 100644 --- a/data/scripts/itemfinder.inc +++ b/data/scripts/itemfinder.inc @@ -3,10 +3,8 @@ EventScript_ItemfinderDigUpUnderfootItem:: textcolor NPC_TEXT_COLOR_NEUTRAL waitse call EventScript_TryPickUpHiddenItem - compare VAR_0x8007, TRUE - goto_if_eq EventScript_DigUpItemPutInPocket - compare VAR_0x8007, FALSE - goto_if_eq EventScript_DigUpItemBagIsFull + goto_if_eq VAR_0x8007, TRUE, EventScript_DigUpItemPutInPocket + goto_if_eq VAR_0x8007, FALSE, EventScript_DigUpItemBagIsFull end EventScript_DigUpItemPutInPocket:: diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index deeebddd6..fa56be624 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -3,16 +3,13 @@ VictoryRoad_2F_EventScript_DoubleEdgeTutor:: faceplayer goto_if_set FLAG_TUTOR_DOUBLE_EDGE, EventScript_DoubleEdgeTaught msgbox Text_DoubleEdgeTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, NO, EventScript_DoubleEdgeDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, NO, EventScript_DoubleEdgeDeclined msgbox Text_DoubleEdgeWhichMon setvar VAR_0x8005, MOVETUTOR_DOUBLE_EDGE call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_DoubleEdgeDeclined setflag FLAG_TUTOR_DOUBLE_EDGE goto EventScript_DoubleEdgeTaught end @@ -32,16 +29,13 @@ EventScript_ThunderWaveTutor:: faceplayer goto_if_set FLAG_TUTOR_THUNDER_WAVE, EventScript_ThunderWaveTaught msgbox Text_ThunderWaveTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_ThunderWaveDeclined + goto_if_eq VAR_RESULT, NO, EventScript_ThunderWaveDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_ThunderWaveDeclined + goto_if_eq VAR_RESULT, NO, EventScript_ThunderWaveDeclined msgbox Text_ThunderWaveWhichMon setvar VAR_0x8005, MOVETUTOR_THUNDER_WAVE call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_ThunderWaveDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_ThunderWaveDeclined setflag FLAG_TUTOR_THUNDER_WAVE goto EventScript_ThunderWaveTaught end @@ -61,16 +55,13 @@ RockTunnel_B1F_EventScript_RockSlideTutor:: faceplayer goto_if_set FLAG_TUTOR_ROCK_SLIDE, EventScript_RockSlideTaught msgbox Text_RockSlideTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_RockSlideDeclined + goto_if_eq VAR_RESULT, NO, EventScript_RockSlideDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_RockSlideDeclined + goto_if_eq VAR_RESULT, NO, EventScript_RockSlideDeclined msgbox Text_RockSlideWhichMon setvar VAR_0x8005, MOVETUTOR_ROCK_SLIDE call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_RockSlideDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_RockSlideDeclined setflag FLAG_TUTOR_ROCK_SLIDE goto EventScript_RockSlideTaught end @@ -90,16 +81,13 @@ MtEmber_Exterior_EventScript_ExplosionTutor:: faceplayer goto_if_set FLAG_TUTOR_EXPLOSION, EventScript_ExplosionTaught msgbox Text_ExplosionTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, NO, EventScript_ExplosionDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, NO, EventScript_ExplosionDeclined msgbox Text_ExplosionWhichMon setvar VAR_0x8005, MOVETUTOR_EXPLOSION call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_ExplosionDeclined setflag FLAG_TUTOR_EXPLOSION goto EventScript_ExplosionTaught end @@ -119,16 +107,13 @@ Route4_EventScript_MegaPunchTutor:: faceplayer goto_if_set FLAG_TUTOR_MEGA_PUNCH, EventScript_MegaPunchTaught msgbox Text_MegaPunchTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_MegaPunchDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MegaPunchDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_MegaPunchDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MegaPunchDeclined msgbox Text_MegaPunchWhichMon setvar VAR_0x8005, MOVETUTOR_MEGA_PUNCH call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_MegaPunchDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_MegaPunchDeclined setflag FLAG_TUTOR_MEGA_PUNCH goto EventScript_MegaPunchTaught end @@ -148,16 +133,13 @@ Route4_EventScript_MegaKickTutor:: faceplayer goto_if_set FLAG_TUTOR_MEGA_KICK, EventScript_MegaKickTaught msgbox Text_MegaKickTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_MegaKickDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MegaKickDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_MegaKickDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MegaKickDeclined msgbox Text_MegaKickWhichMon setvar VAR_0x8005, MOVETUTOR_MEGA_KICK call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_MegaKickDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_MegaKickDeclined setflag FLAG_TUTOR_MEGA_KICK goto EventScript_MegaKickTaught end @@ -177,16 +159,13 @@ EventScript_DreamEaterTutor:: faceplayer goto_if_set FLAG_TUTOR_DREAM_EATER, EventScript_DreamEaterTaught msgbox Text_DreamEaterTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_DreamEaterDeclined + goto_if_eq VAR_RESULT, NO, EventScript_DreamEaterDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_DreamEaterDeclined + goto_if_eq VAR_RESULT, NO, EventScript_DreamEaterDeclined msgbox Text_DreamEaterWhichMon setvar VAR_0x8005, MOVETUTOR_DREAM_EATER call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_DreamEaterDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_DreamEaterDeclined setflag FLAG_TUTOR_DREAM_EATER goto EventScript_DreamEaterTaught end @@ -206,16 +185,13 @@ EventScript_SoftboiledTutor:: faceplayer goto_if_set FLAG_TUTOR_SOFT_BOILED, EventScript_SoftboiledTaught msgbox Text_SoftboiledTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_SoftboiledDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SoftboiledDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_SoftboiledDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SoftboiledDeclined msgbox Text_SoftboiledWhichMon setvar VAR_0x8005, MOVETUTOR_SOFT_BOILED call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_SoftboiledDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_SoftboiledDeclined setflag FLAG_TUTOR_SOFT_BOILED goto EventScript_SoftboiledTaught end @@ -235,16 +211,13 @@ FuchsiaCity_EventScript_SubstituteTutor:: faceplayer goto_if_set FLAG_TUTOR_SUBSTITUTE, EventScript_SubstituteTaught msgbox Text_SubstituteTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SubstituteDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SubstituteDeclined msgbox Text_SubstituteWhichMon setvar VAR_0x8005, MOVETUTOR_SUBSTITUTE call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_SubstituteDeclined setflag FLAG_TUTOR_SUBSTITUTE goto EventScript_SubstituteTaught end @@ -264,16 +237,13 @@ SevenIsland_EventScript_SwordsDanceTutor:: faceplayer goto_if_set FLAG_TUTOR_SWORDS_DANCE, EventScript_SwordsDanceTaught msgbox Text_SwordsDanceTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_SwordsDanceDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SwordsDanceDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_SwordsDanceDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SwordsDanceDeclined msgbox Text_SwordsDanceWhichMon setvar VAR_0x8005, MOVETUTOR_SWORDS_DANCE call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_SwordsDanceDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_SwordsDanceDeclined setflag FLAG_TUTOR_SWORDS_DANCE goto EventScript_SwordsDanceTaught end @@ -293,16 +263,13 @@ PewterCity_Museum_1F_EventScript_SeismicTossTutor:: faceplayer goto_if_set FLAG_TUTOR_SEISMIC_TOSS, EventScript_SeismicTossTaught msgbox Text_SeismicTossTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_SeismicTossDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SeismicTossDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_SeismicTossDeclined + goto_if_eq VAR_RESULT, NO, EventScript_SeismicTossDeclined msgbox Text_SeismicTossWhichMon setvar VAR_0x8005, MOVETUTOR_SEISMIC_TOSS call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_SeismicTossDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_SeismicTossDeclined setflag FLAG_TUTOR_SEISMIC_TOSS goto EventScript_SeismicTossTaught end @@ -322,16 +289,13 @@ EventScript_CounterTutor:: faceplayer goto_if_set FLAG_TUTOR_COUNTER, EventScript_CounterTaught msgbox Text_CounterTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CounterDeclined + goto_if_eq VAR_RESULT, NO, EventScript_CounterDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_CounterDeclined + goto_if_eq VAR_RESULT, NO, EventScript_CounterDeclined msgbox Text_CounterWhichMon setvar VAR_0x8005, MOVETUTOR_COUNTER call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_CounterDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_CounterDeclined setflag FLAG_TUTOR_COUNTER goto EventScript_CounterTaught end @@ -351,16 +315,13 @@ EventScript_MetronomeTutor:: faceplayer goto_if_set FLAG_TUTOR_METRONOME, EventScript_MetronomeTaught msgbox Text_MetronomeTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MetronomeDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MetronomeDeclined msgbox Text_MetronomeWhichMon setvar VAR_0x8005, MOVETUTOR_METRONOME call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_MetronomeDeclined setflag FLAG_TUTOR_METRONOME goto EventScript_MetronomeTaught end @@ -378,18 +339,15 @@ EventScript_MetronomeTaught:: EventScript_MimicTutor:: goto_if_set FLAG_TUTOR_MIMIC, EventScript_MimicTaught msgbox Text_MimicTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_MimicDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MimicDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_MimicDeclined + goto_if_eq VAR_RESULT, NO, EventScript_MimicDeclined msgbox Text_MimicWhichMon setvar VAR_0x8005, MOVETUTOR_MIMIC call EventScript_ChooseMoveTutorMon lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq EventScript_MimicDeclined + goto_if_eq VAR_RESULT, 0, EventScript_MimicDeclined removeitem ITEM_POKE_DOLL setflag FLAG_TUTOR_MIMIC goto EventScript_MimicTaught @@ -402,10 +360,8 @@ EventScript_MimicDeclined:: EventScript_MimicTaught:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq EventScript_MimicTaughtMale - compare VAR_RESULT, FEMALE - call_if_eq EventScript_MimicTaughtFemale + call_if_eq VAR_RESULT, MALE, EventScript_MimicTaughtMale + call_if_eq VAR_RESULT, FEMALE, EventScript_MimicTaughtFemale release end @@ -422,16 +378,13 @@ FourIsland_House1_EventScript_BodySlamTutor:: faceplayer goto_if_set FLAG_TUTOR_BODY_SLAM, EventScript_BodySlamTaught msgbox Text_BodySlamTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_BodySlamDeclined + goto_if_eq VAR_RESULT, NO, EventScript_BodySlamDeclined call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq EventScript_BodySlamDeclined + goto_if_eq VAR_RESULT, NO, EventScript_BodySlamDeclined msgbox Text_BodySlamWhichMon setvar VAR_0x8005, MOVETUTOR_BODY_SLAM call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq EventScript_BodySlamDeclined + goto_if_eq VAR_RESULT, FALSE, EventScript_BodySlamDeclined setflag FLAG_TUTOR_BODY_SLAM goto EventScript_BodySlamTaught end @@ -458,23 +411,16 @@ TwoIsland_CapeBrink_House_EventScript_StarterTutor:: bufferleadmonspeciesname STR_VAR_1 msgbox Text_UltimateMoveThatMon specialvar VAR_RESULT, CapeBrinkGetMoveToTeachLeadPokemon - compare VAR_RESULT, FALSE - goto_if_eq CapeBrinkTutor_EventScript_NoLeadStarter + goto_if_eq VAR_RESULT, FALSE, CapeBrinkTutor_EventScript_NoLeadStarter copyvar VAR_0x8009, VAR_0x8005 - compare VAR_FACING, DIR_NORTH - call_if_eq CapeBrinkTutor_EventScript_JumpInPlaceDown - compare VAR_FACING, DIR_SOUTH - call_if_eq CapeBrinkTutor_EventScript_JumpInPlaceUp - compare VAR_FACING, DIR_EAST - call_if_eq CapeBrinkTutor_EventScript_JumpInPlaceLeft - compare VAR_FACING, DIR_WEST - call_if_eq CapeBrinkTutor_EventScript_JumpInPlaceRight + call_if_eq VAR_FACING, DIR_NORTH, CapeBrinkTutor_EventScript_JumpInPlaceDown + call_if_eq VAR_FACING, DIR_SOUTH, CapeBrinkTutor_EventScript_JumpInPlaceUp + call_if_eq VAR_FACING, DIR_EAST, CapeBrinkTutor_EventScript_JumpInPlaceLeft + call_if_eq VAR_FACING, DIR_WEST, CapeBrinkTutor_EventScript_JumpInPlaceRight msgbox Text_AllowMeToTeachMonUltimateMove, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CapeBrinkTutor_EventScript_DeclineMove + goto_if_eq VAR_RESULT, NO, CapeBrinkTutor_EventScript_DeclineMove call EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq CapeBrinkTutor_EventScript_DeclineMove + goto_if_eq VAR_RESULT, NO, CapeBrinkTutor_EventScript_DeclineMove msgbox Text_LetMeConferUltimateMove closemessage fadescreen FADE_TO_BLACK @@ -499,8 +445,7 @@ CapeBrinkTutor_EventScript_TaughtAllMoves:: CapeBrinkTutor_EventScript_TaughtMove:: copyvar VAR_0x8005, VAR_0x8009 specialvar VAR_RESULT, HasLearnedAllMovesFromCapeBrinkTutor - compare VAR_RESULT, TRUE - goto_if_eq CapeBrinkTutor_EventScript_LearnedAllMoves + goto_if_eq VAR_RESULT, TRUE, CapeBrinkTutor_EventScript_LearnedAllMoves msgbox Text_TaughtMove setflag FLAG_TEMP_2 release @@ -514,8 +459,7 @@ CapeBrinkTutor_EventScript_LearnedAllMoves:: CapeBrinkTutor_EventScript_ChooseMon:: call EventScript_ChooseMoveTutorMon - compare VAR_RESULT, FALSE - goto_if_eq CapeBrinkTutor_EventScript_DeclineMove + goto_if_eq VAR_RESULT, FALSE, CapeBrinkTutor_EventScript_DeclineMove goto CapeBrinkTutor_EventScript_TaughtMove end diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc index 46e96956a..a9cb1958f 100644 --- a/data/scripts/mystery_event_club.inc +++ b/data/scripts/mystery_event_club.inc @@ -3,8 +3,7 @@ MysteryEventClub_EventScript_Woman:: lock faceplayer - compare GAVE_PROFILE, TRUE - goto_if_eq EventScript_AlreadyGaveProfile + goto_if_eq GAVE_PROFILE, TRUE, EventScript_AlreadyGaveProfile goto_if_set FLAG_SYS_SET_TRAINER_CARD_PROFILE, EventScript_GivenProfileBefore msgbox Text_IdLoveToHearYourProfile goto EventScript_AskForProfile @@ -104,12 +103,9 @@ EventScript_GiveProfile: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_0x8004, 0 - goto_if_eq EventScript_GaveSpecialProfile - compare VAR_RESULT, FALSE - goto_if_eq EventScript_CancelGiveProfile - compare VAR_RESULT, TRUE - goto_if_eq EventScript_GaveProfile + goto_if_eq VAR_0x8004, 0, EventScript_GaveSpecialProfile + goto_if_eq VAR_RESULT, FALSE, EventScript_CancelGiveProfile + goto_if_eq VAR_RESULT, TRUE, EventScript_GaveProfile end Text_IdLoveToHearYourProfile: diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index b15b5e2b9..c904278ae 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -20,10 +20,8 @@ EventScript_ObtainItemMessage:: bufferitemnameplural STR_VAR_2, VAR_0x8000, VAR_0x8001 checkitemtype VAR_0x8000 call EventScript_BufferPocketNameTryFanfare - compare VAR_0x8007, TRUE - call_if_eq EventScript_ObtainedItem - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomForItem + call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedItem + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForItem return EventScript_BufferPocketNameTryFanfare:: @@ -37,32 +35,27 @@ EventScript_BufferPocketNameTryFanfare:: EventScript_BufferItemsPocket:: bufferstdstring STR_VAR_3, STDSTRING_ITEMS_POCKET - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferKeyItemsPocket:: bufferstdstring STR_VAR_3, STDSTRING_KEY_ITEMS_POCKET - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferPokeBallsPocket:: bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS_POCKET - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferTMCase:: bufferstdstring STR_VAR_3, STDSTRING_TM_CASE - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedTMHM + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedTMHM return EventScript_BufferBerryPouch:: bufferstdstring STR_VAR_3, STDSTRING_BERRY_POUCH - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_ObtainedItem:: @@ -93,10 +86,8 @@ Std_ObtainDecoration:: EventScript_ObtainDecorMessage:: bufferdecorationname STR_VAR_2, VAR_0x8000 - compare VAR_0x8007, TRUE - call_if_eq EventScript_ObtainedDecor - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomForDecor + call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedDecor + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForDecor return EventScript_ObtainedDecor:: @@ -123,10 +114,8 @@ Std_FindItem:: bufferitemname STR_VAR_2, VAR_0x8000 checkitemtype VAR_0x8000 call EventScript_BufferPocketNameTryFanfare - compare VAR_0x8007, TRUE - call_if_eq EventScript_PickUpItem - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomToPickUpItem + call_if_eq VAR_0x8007, TRUE, EventScript_PickUpItem + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomToPickUpItem release return @@ -135,10 +124,8 @@ EventScript_PickUpItem:: additem VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, TRUE - call_if_eq EventScript_FoundTMHM - compare VAR_0x8008, FALSE - call_if_eq EventScript_FoundItem + call_if_eq VAR_0x8008, TRUE, EventScript_FoundTMHM + call_if_eq VAR_0x8008, FALSE, EventScript_FoundItem waitfanfare waitmessage msgbox Text_PutItemAway @@ -162,13 +149,10 @@ EventScript_HiddenItemScript:: lockall textcolor NPC_TEXT_COLOR_NEUTRAL waitse - compare VAR_0x8005, 0 - goto_if_eq EventScript_TryPickUpHiddenCoins + goto_if_eq VAR_0x8005, 0, EventScript_TryPickUpHiddenCoins call EventScript_TryPickUpHiddenItem - compare VAR_0x8007, TRUE - goto_if_eq EventScript_PickedUpHiddenItem - compare VAR_0x8007, FALSE - goto_if_eq EventScript_NoRoomForHiddenItem + goto_if_eq VAR_0x8007, TRUE, EventScript_PickedUpHiddenItem + goto_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForHiddenItem end EventScript_TryPickUpHiddenItem:: @@ -180,10 +164,8 @@ EventScript_TryPickUpHiddenItem:: return EventScript_PickedUpHiddenItem:: - compare VAR_0x8006, 1 - call_if_eq EventScript_FoundSingleItem - compare VAR_0x8006, 1 - call_if_ne EventScript_FoundMultipleItems + call_if_eq VAR_0x8006, 1, EventScript_FoundSingleItem + call_if_ne VAR_0x8006, 1, EventScript_FoundMultipleItems waitfanfare waitmessage msgbox Text_PutItemAway @@ -216,8 +198,7 @@ EventScript_TryPickUpHiddenCoins:: goto_if_unset FLAG_GOT_COIN_CASE, EventScript_NoCaseForHiddenCoins checkcoins VAR_RESULT specialvar VAR_RESULT, CheckAddCoins - compare VAR_RESULT, FALSE - goto_if_eq EventScript_HiddenCoinsButCaseIsFull + goto_if_eq VAR_RESULT, FALSE, EventScript_HiddenCoinsButCaseIsFull addcoins VAR_0x8006 bufferstdstring STR_VAR_2, STDSTRING_COINS call EventScript_PlayFanfareObtainedItem diff --git a/data/scripts/pc.inc b/data/scripts/pc.inc index dedcd041e..77cf55e6f 100644 --- a/data/scripts/pc.inc +++ b/data/scripts/pc.inc @@ -88,8 +88,7 @@ EventScript_AccessProfOaksPC:: playse SE_PC_LOGIN msgbox Text_AccessedProfOaksPC msgbox Text_HavePokedexRated, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_ExitOaksPC + goto_if_eq VAR_RESULT, NO, EventScript_ExitOaksPC setflag FLAG_OAKS_RATING_IS_VIA_PC call PokedexRating_EventScript_Rate clearflag FLAG_OAKS_RATING_IS_VIA_PC diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc index ae23eace5..1a71b1136 100644 --- a/data/scripts/pc_transfer.inc +++ b/data/scripts/pc_transfer.inc @@ -21,8 +21,7 @@ EventScript_TransferredToPC:: EventScript_TransferredSomeonesPC:: specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, TRUE - goto_if_eq EventScript_TransferredSomeonesPCBoxFull + goto_if_eq VAR_RESULT, TRUE, EventScript_TransferredSomeonesPCBoxFull msgbox Text_MonSentToBoxInSomeonesPC return @@ -34,8 +33,7 @@ EventScript_TransferredSomeonesPCBoxFull:: EventScript_TransferredBillsPC:: specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, TRUE - goto_if_eq EventScript_TransferredBillsPCBoxFull + goto_if_eq VAR_RESULT, TRUE, EventScript_TransferredBillsPCBoxFull msgbox Text_MonSentToBoxInBillsPC return diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc index 3c0e6b56e..53875fc5f 100644 --- a/data/scripts/pkmn_center_nurse.inc +++ b/data/scripts/pkmn_center_nurse.inc @@ -30,14 +30,11 @@ EventScript_PkmnCenterNurse_TakeAndHealPkmn:: EventScript_PkmnCenterNurse_CheckTrainerTowerAndUnionRoom:: specialvar VAR_RESULT, IsPlayerNotInTrainerTowerLobby - compare VAR_RESULT, FALSE - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn + goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_ReturnPkmn specialvar VAR_RESULT, BufferUnionRoomPlayerName copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 0 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn - compare VAR_0x8008, 1 - goto_if_eq EventScript_PkmnCenterNurse_PlayerWaitingInUionRoom + goto_if_eq VAR_0x8008, 0, EventScript_PkmnCenterNurse_ReturnPkmn + goto_if_eq VAR_0x8008, 1, EventScript_PkmnCenterNurse_PlayerWaitingInUionRoom end EventScript_PkmnCenterNurse_ReturnPkmn:: diff --git a/data/scripts/pokedex_rating.inc b/data/scripts/pokedex_rating.inc index 5b70ef61a..6a4ed0751 100644 --- a/data/scripts/pokedex_rating.inc +++ b/data/scripts/pokedex_rating.inc @@ -18,10 +18,8 @@ PokedexRating_EventScript_ShowRatingMsg:: copyvar VAR_0x8004, VAR_0x8009 special GetProfOaksRatingMessage waitmessage - compare VAR_RESULT, FALSE - call_if_eq PokedexRating_EventScript_NormalFanfare - compare VAR_RESULT, TRUE - call_if_eq PokedexRating_EventScript_DexCompleteFanfare + call_if_eq VAR_RESULT, FALSE, PokedexRating_EventScript_NormalFanfare + call_if_eq VAR_RESULT, TRUE, PokedexRating_EventScript_DexCompleteFanfare waitfanfare waitbuttonpress return @@ -48,8 +46,7 @@ PokedexRating_EventScript_Rate:: msgbox PokedexRating_Text_SeenXOwnedY call_if_unset FLAG_OAKS_RATING_IS_VIA_PC, PokedexRating_EventScript_SetTextColor call PokedexRating_EventScript_ShowRatingMsg - compare VAR_0x800A, FALSE - goto_if_eq PokedexRating_EventScript_EndRating @ National Dex not enabled + goto_if_eq VAR_0x800A, FALSE, PokedexRating_EventScript_EndRating @ National Dex not enabled setvar VAR_0x8004, 1 specialvar VAR_RESULT, GetPokedexCount copyvar VAR_0x8008, VAR_0x8005 @@ -58,10 +55,8 @@ PokedexRating_EventScript_Rate:: buffernumberstring STR_VAR_2, VAR_0x8009 @ Num National Caught msgbox PokedexRating_Text_NationalDexSeenXOwnedY specialvar VAR_RESULT, HasAllMons - compare VAR_RESULT, FALSE - goto_if_eq PokedexRating_EventScript_DexIncomplete - compare VAR_RESULT, TRUE - goto_if_eq PokedexRating_EventScript_DexComplete + goto_if_eq VAR_RESULT, FALSE, PokedexRating_EventScript_DexIncomplete + goto_if_eq VAR_RESULT, TRUE, PokedexRating_EventScript_DexComplete end PokedexRating_EventScript_SetTextColor:: diff --git a/data/scripts/pokemon_mansion.inc b/data/scripts/pokemon_mansion.inc index b750ae1cf..3c648dbfd 100644 --- a/data/scripts/pokemon_mansion.inc +++ b/data/scripts/pokemon_mansion.inc @@ -1,7 +1,6 @@ PokemonMansion_EventScript_SecretSwitch:: msgbox PokemonMansion_Text_PressSecretSwitch, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq PokemonMansion_EventScript_DontPressSwitch + goto_if_eq VAR_RESULT, NO, PokemonMansion_EventScript_DontPressSwitch msgbox PokemonMansion_Text_WhoWouldnt goto_if_set FLAG_POKEMON_MANSION_SWITCH_STATE, PokemonMansion_EventScript_ResetSwitch setflag FLAG_POKEMON_MANSION_SWITCH_STATE diff --git a/data/scripts/questionnaire.inc b/data/scripts/questionnaire.inc index f43a9064d..f3bb76a3b 100644 --- a/data/scripts/questionnaire.inc +++ b/data/scripts/questionnaire.inc @@ -2,20 +2,16 @@ EventScript_Questionnaire:: lockall textcolor NPC_TEXT_COLOR_NEUTRAL msgbox Text_FillOutQuestionnaire, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_DeclineQuestionnaire + goto_if_eq VAR_RESULT, NO, EventScript_DeclineQuestionnaire setvar VAR_0x8004, EASY_CHAT_TYPE_QUESTIONNAIRE call Common_ShowEasyChatScreen lock faceplayer specialvar VAR_0x8008, GetMartClerkObjectId textcolor NPC_TEXT_COLOR_MALE - compare VAR_0x8004, 0 - goto_if_eq EventScript_EnableMysteryGift - compare VAR_RESULT, 0 - goto_if_eq EventScript_DeclineQuestionnaire - compare VAR_RESULT, 1 - goto_if_eq EventScript_TookQuestionnaire + goto_if_eq VAR_0x8004, 0, EventScript_EnableMysteryGift + goto_if_eq VAR_RESULT, 0, EventScript_DeclineQuestionnaire + goto_if_eq VAR_RESULT, 1, EventScript_TookQuestionnaire end EventScript_EnableMysteryGift:: diff --git a/data/scripts/route23.inc b/data/scripts/route23.inc index 55e63d488..dc47d5cc8 100644 --- a/data/scripts/route23.inc +++ b/data/scripts/route23.inc @@ -31,8 +31,7 @@ Route23_EventScript_AlreadyRecognizedBadge:: @ Duplicate of the below, only used for Boulder Badge Route22_NorthEntrance_EventScript_BadgeGuard:: - compare VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1 - goto_if_ge Route23_EventScript_AlreadyRecognizedBoulderBadge + goto_if_ge VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1, Route23_EventScript_AlreadyRecognizedBoulderBadge switch VAR_TEMP_1 case 1, Route23_EventScript_CheckBoulderBadge case 2, Route23_EventScript_CheckCascadeBadge @@ -45,8 +44,7 @@ Route22_NorthEntrance_EventScript_BadgeGuard:: end Route23_EventScript_BadgeGuard:: - compare VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1 - goto_if_ge Route23_EventScript_AlreadyRecognizedBadge + goto_if_ge VAR_MAP_SCENE_ROUTE23, VAR_TEMP_1, Route23_EventScript_AlreadyRecognizedBadge switch VAR_TEMP_1 case 1, Route23_EventScript_CheckBoulderBadge case 2, Route23_EventScript_CheckCascadeBadge diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 93e2292f8..a973b6a38 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -14,8 +14,7 @@ SafariZone_EventScript_Exit:: SafariZone_EventScript_RetirePrompt:: lockall msgbox SafariZone_Text_WouldYouLikeToExit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SafariZone_EventScript_Retire + goto_if_eq VAR_RESULT, YES, SafariZone_EventScript_Retire releaseall end diff --git a/data/scripts/seagallop.inc b/data/scripts/seagallop.inc index d64ed41e7..9cbd502b6 100644 --- a/data/scripts/seagallop.inc +++ b/data/scripts/seagallop.inc @@ -1,206 +1,197 @@ @ Separate selection menus for before the Rainbow Pass is obtained EventScript_ChooseDestFromOneIsland:: - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 - goto_if_ge EventScript_SeviiDestinationsPage1 - compare VAR_MAP_SCENE_CINNABAR_ISLAND, 4 - goto_if_ge EventScript_ChooseDestFromOneIslandVermilionAllowed - multichoice 19, 6, MULTICHOICE_ISLAND_23, FALSE - switch VAR_RESULT - case 0, EventScript_SailToTwoIsland2 - case 1, EventScript_SailToThreeIsland2 - case 2, EventScript_CancelSail - case SCR_MENU_CANCEL, EventScript_CancelSail - end + goto_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, EventScript_SeviiDestinationsPage1 + goto_if_ge VAR_MAP_SCENE_CINNABAR_ISLAND, 4, EventScript_ChooseDestFromOneIslandVermilionAllowed + multichoice 19, 6, MULTICHOICE_ISLAND_23, FALSE + switch VAR_RESULT + case 0, EventScript_SailToTwoIsland2 + case 1, EventScript_SailToThreeIsland2 + case 2, EventScript_CancelSail + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_ChooseDestFromOneIslandVermilionAllowed:: - multichoice 19, 5, MULTICHOICE_SEAGALLOP_V23, FALSE - switch VAR_RESULT - case 0, EventScript_SailToVermilion2 - case 1, EventScript_SailToTwoIsland2 - case 2, EventScript_SailToThreeIsland2 - case 3, EventScript_CancelSail - case SCR_MENU_CANCEL, EventScript_CancelSail - end + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V23, FALSE + switch VAR_RESULT + case 0, EventScript_SailToVermilion2 + case 1, EventScript_SailToTwoIsland2 + case 2, EventScript_SailToThreeIsland2 + case 3, EventScript_CancelSail + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_ChooseDestFromTwoIsland:: - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 - goto_if_ge EventScript_SeviiDestinationsPage1 - compare VAR_MAP_SCENE_CINNABAR_ISLAND, 4 - goto_if_ge EventScript_ChooseDestFromTwoIslandVermilionAllowed - multichoice 19, 6, MULTICHOICE_ISLAND_13, FALSE - switch VAR_RESULT - case 0, EventScript_SailToOneIsland2 - case 1, EventScript_SailToThreeIsland2 - case 2, EventScript_CancelSail - case SCR_MENU_CANCEL, EventScript_CancelSail - end + goto_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, EventScript_SeviiDestinationsPage1 + goto_if_ge VAR_MAP_SCENE_CINNABAR_ISLAND, 4, EventScript_ChooseDestFromTwoIslandVermilionAllowed + multichoice 19, 6, MULTICHOICE_ISLAND_13, FALSE + switch VAR_RESULT + case 0, EventScript_SailToOneIsland2 + case 1, EventScript_SailToThreeIsland2 + case 2, EventScript_CancelSail + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_ChooseDestFromTwoIslandVermilionAllowed:: - multichoice 19, 5, MULTICHOICE_SEAGALLOP_V13, FALSE - switch VAR_RESULT - case 0, EventScript_SailToVermilion2 - case 1, EventScript_SailToOneIsland2 - case 2, EventScript_SailToThreeIsland2 - case 3, EventScript_CancelSail - case SCR_MENU_CANCEL, EventScript_CancelSail - end + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V13, FALSE + switch VAR_RESULT + case 0, EventScript_SailToVermilion2 + case 1, EventScript_SailToOneIsland2 + case 2, EventScript_SailToThreeIsland2 + case 3, EventScript_CancelSail + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_SailToVermilion2:: - setvar VAR_0x8006, SEAGALLOP_VERMILION_CITY - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_VERMILION_CITY + goto EventScript_SailToDest + end EventScript_SailToOneIsland2:: - setvar VAR_0x8006, SEAGALLOP_ONE_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_ONE_ISLAND + goto EventScript_SailToDest + end EventScript_SailToTwoIsland2:: - setvar VAR_0x8006, SEAGALLOP_TWO_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_TWO_ISLAND + goto EventScript_SailToDest + end EventScript_SailToThreeIsland2:: - setvar VAR_0x8006, SEAGALLOP_THREE_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_THREE_ISLAND + goto EventScript_SailToDest + end EventScript_ChooseDestFromIsland:: - compare VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5 - goto_if_ge EventScript_SeviiDestinationsPage1 - compare VAR_MAP_SCENE_CINNABAR_ISLAND, 4 - goto_if_ge EventScript_ChooseDestFromIslandVermilionAllowed - multichoice 19, 6, MULTICHOICE_ISLAND_12, FALSE - switch VAR_RESULT - case 0, EventScript_SailToOneIsland2 - case 1, EventScript_SailToTwoIsland2 - case 2, EventScript_CancelSail - case SCR_MENU_CANCEL, EventScript_CancelSail - end + goto_if_ge VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F, 5, EventScript_SeviiDestinationsPage1 + goto_if_ge VAR_MAP_SCENE_CINNABAR_ISLAND, 4, EventScript_ChooseDestFromIslandVermilionAllowed + multichoice 19, 6, MULTICHOICE_ISLAND_12, FALSE + switch VAR_RESULT + case 0, EventScript_SailToOneIsland2 + case 1, EventScript_SailToTwoIsland2 + case 2, EventScript_CancelSail + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_ChooseDestFromIslandVermilionAllowed:: - multichoice 19, 5, MULTICHOICE_SEAGALLOP_V12, FALSE - switch VAR_RESULT - case 0, EventScript_SailToVermilion2 - case 1, EventScript_SailToOneIsland2 - case 2, EventScript_SailToTwoIsland2 - case 3, EventScript_CancelSail - case SCR_MENU_CANCEL, EventScript_CancelSail - end + multichoice 19, 5, MULTICHOICE_SEAGALLOP_V12, FALSE + switch VAR_RESULT + case 0, EventScript_SailToVermilion2 + case 1, EventScript_SailToOneIsland2 + case 2, EventScript_SailToTwoIsland2 + case 3, EventScript_CancelSail + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_SailToDest:: - specialvar VAR_RESULT, GetSeagallopNumber - buffernumberstring STR_VAR_1, VAR_RESULT - compare VAR_0x8004, SEAGALLOP_VERMILION_CITY - goto_if_eq EventScript_DepartingVermilion - compare VAR_0x8004, SEAGALLOP_VERMILION_CITY - goto_if_ne EventScript_DepartingNotVermilion - end + specialvar VAR_RESULT, GetSeagallopNumber + buffernumberstring STR_VAR_1, VAR_RESULT + goto_if_eq VAR_0x8004, SEAGALLOP_VERMILION_CITY, EventScript_DepartingVermilion + goto_if_ne VAR_0x8004, SEAGALLOP_VERMILION_CITY, EventScript_DepartingNotVermilion + end EventScript_DepartingVermilion:: - msgbox VermilionCity_Text_Seagallop7Departing - goto EventScript_SetSail - end + msgbox VermilionCity_Text_Seagallop7Departing + goto EventScript_SetSail + end EventScript_DepartingNotVermilion:: - msgbox Text_AllAboardSeagallopNum - goto EventScript_SetSail - end + msgbox Text_AllAboardSeagallopNum + goto EventScript_SetSail + end EventScript_SetSail:: - closemessage - delay 20 - goto_if_questlog EventScript_ReleaseEnd - special QuestLog_CutRecording - fadescreen FADE_TO_BLACK - special DoSeagallopFerryScene - waitstate - end + closemessage + delay 20 + goto_if_questlog EventScript_ReleaseEnd + special QuestLog_CutRecording + fadescreen FADE_TO_BLACK + special DoSeagallopFerryScene + waitstate + end EventScript_CancelSail:: - specialvar VAR_RESULT, IsPlayerLeftOfVermilionSailor - compare VAR_RESULT, TRUE - goto_if_eq VermilionCity_EventScript_WalkUpPier - release - end + specialvar VAR_RESULT, IsPlayerLeftOfVermilionSailor + goto_if_eq VAR_RESULT, TRUE, VermilionCity_EventScript_WalkUpPier + release + end VermilionCity_EventScript_WalkUpPier:: - closemessage - applymovement LOCALID_FERRY_SAILOR, Movement_FaceOriginalDirection - applymovement OBJ_EVENT_ID_PLAYER, VermilionCity_Movement_WalkUp - waitmovement 0 - releaseall - end + closemessage + applymovement LOCALID_FERRY_SAILOR, Movement_FaceOriginalDirection + applymovement OBJ_EVENT_ID_PLAYER, VermilionCity_Movement_WalkUp + waitmovement 0 + releaseall + end VermilionCity_Movement_WalkUp:: - walk_up - step_end + walk_up + step_end EventScript_SeviiDestinationsPage1:: - setvar VAR_0x8005, 0 - special DrawSeagallopDestinationMenu - waitstate - specialvar VAR_0x8006, GetSelectedSeagallopDestination - switch VAR_0x8006 - case SEAGALLOP_VERMILION_CITY, EventScript_SailToVermilionCity - case SEAGALLOP_ONE_ISLAND, EventScript_SailToOneIsland - case SEAGALLOP_TWO_ISLAND, EventScript_SailToTwoIsland - case SEAGALLOP_THREE_ISLAND, EventScript_SailToThreeIsland - case SEAGALLOP_FOUR_ISLAND, EventScript_SailToFourIsland - case SEAGALLOP_MORE, EventScript_SeviiDestinationsPage2 - case SCR_MENU_CANCEL, EventScript_CancelSail - end + setvar VAR_0x8005, 0 + special DrawSeagallopDestinationMenu + waitstate + specialvar VAR_0x8006, GetSelectedSeagallopDestination + switch VAR_0x8006 + case SEAGALLOP_VERMILION_CITY, EventScript_SailToVermilionCity + case SEAGALLOP_ONE_ISLAND, EventScript_SailToOneIsland + case SEAGALLOP_TWO_ISLAND, EventScript_SailToTwoIsland + case SEAGALLOP_THREE_ISLAND, EventScript_SailToThreeIsland + case SEAGALLOP_FOUR_ISLAND, EventScript_SailToFourIsland + case SEAGALLOP_MORE, EventScript_SeviiDestinationsPage2 + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_SeviiDestinationsPage2:: - setvar VAR_0x8005, 1 - special DrawSeagallopDestinationMenu - waitstate - specialvar VAR_0x8006, GetSelectedSeagallopDestination - switch VAR_0x8006 - case SEAGALLOP_FOUR_ISLAND, EventScript_SailToFourIsland - case SEAGALLOP_FIVE_ISLAND, EventScript_SailToFiveIsland - case SEAGALLOP_SIX_ISLAND, EventScript_SailToSixIsland - case SEAGALLOP_SEVEN_ISLAND, EventScript_SailToSevenIsland - case SEAGALLOP_MORE, EventScript_SeviiDestinationsPage1 - case SCR_MENU_CANCEL, EventScript_CancelSail - end + setvar VAR_0x8005, 1 + special DrawSeagallopDestinationMenu + waitstate + specialvar VAR_0x8006, GetSelectedSeagallopDestination + switch VAR_0x8006 + case SEAGALLOP_FOUR_ISLAND, EventScript_SailToFourIsland + case SEAGALLOP_FIVE_ISLAND, EventScript_SailToFiveIsland + case SEAGALLOP_SIX_ISLAND, EventScript_SailToSixIsland + case SEAGALLOP_SEVEN_ISLAND, EventScript_SailToSevenIsland + case SEAGALLOP_MORE, EventScript_SeviiDestinationsPage1 + case SCR_MENU_CANCEL, EventScript_CancelSail + end EventScript_SailToVermilionCity:: - setvar VAR_0x8006, SEAGALLOP_VERMILION_CITY - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_VERMILION_CITY + goto EventScript_SailToDest + end EventScript_SailToOneIsland:: - setvar VAR_0x8006, SEAGALLOP_ONE_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_ONE_ISLAND + goto EventScript_SailToDest + end EventScript_SailToTwoIsland:: - setvar VAR_0x8006, SEAGALLOP_TWO_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_TWO_ISLAND + goto EventScript_SailToDest + end EventScript_SailToThreeIsland:: - setvar VAR_0x8006, SEAGALLOP_THREE_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_THREE_ISLAND + goto EventScript_SailToDest + end EventScript_SailToFourIsland:: - setvar VAR_0x8006, SEAGALLOP_FOUR_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_FOUR_ISLAND + goto EventScript_SailToDest + end EventScript_SailToFiveIsland:: - setvar VAR_0x8006, SEAGALLOP_FIVE_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_FIVE_ISLAND + goto EventScript_SailToDest + end EventScript_SailToSixIsland:: - setvar VAR_0x8006, SEAGALLOP_SIX_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_SIX_ISLAND + goto EventScript_SailToDest + end EventScript_SailToSevenIsland:: - setvar VAR_0x8006, SEAGALLOP_SEVEN_ISLAND - goto EventScript_SailToDest - end + setvar VAR_0x8006, SEAGALLOP_SEVEN_ISLAND + goto EventScript_SailToDest + end diff --git a/data/scripts/silphco_doors.inc b/data/scripts/silphco_doors.inc index 4486001e5..47abd97cf 100644 --- a/data/scripts/silphco_doors.inc +++ b/data/scripts/silphco_doors.inc @@ -1,564 +1,544 @@ EventScript_NeedCardKey:: - msgbox Text_ItNeedsCardKey - releaseall - end + msgbox Text_ItNeedsCardKey + releaseall + end EventScript_DoorUnlocked:: - msgbox Text_TheDoorIsOpen - releaseall - end + msgbox Text_TheDoorIsOpen + releaseall + end EventScript_Close2FDoor1:: - setmetatile 5, 8, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 6, 8, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 5, 9, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 6, 9, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 6, 10, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 5, 8, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 6, 8, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 5, 9, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 6, 9, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 6, 10, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close2FDoor2:: - setmetatile 5, 15, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 6, 15, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 5, 16, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 6, 16, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 6, 17, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 5, 15, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 6, 15, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 5, 16, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 6, 16, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 6, 17, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close3FDoor1:: - setmetatile 9, 11, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 10, 11, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 9, 12, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 10, 12, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 9, 13, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 10, 13, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 9, 11, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 10, 11, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 9, 12, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 10, 12, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 9, 13, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 10, 13, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close3FDoor2:: - setmetatile 20, 11, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 21, 11, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 20, 12, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 21, 12, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 20, 13, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 21, 13, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 20, 11, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 21, 11, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 20, 12, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 21, 12, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 20, 13, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 21, 13, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close4FDoor1:: - setmetatile 3, 16, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 4, 16, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 3, 17, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 4, 17, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 4, 18, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 3, 16, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 4, 16, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 3, 17, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 4, 17, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 4, 18, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close4FDoor2:: - setmetatile 14, 11, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 15, 11, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 14, 12, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 15, 12, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 15, 13, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 14, 11, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 15, 11, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 14, 12, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 15, 12, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 15, 13, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close5FDoor1:: @ 81AMETATILE_SilphCo_Floor_WallRightCornerF - setmetatile 7, 8, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 8, 8, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 7, 9, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 8, 9, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 7, 10, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 8, 10, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 7, 8, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 8, 8, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 7, 9, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 8, 9, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 7, 10, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 8, 10, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close5FDoor2:: - setmetatile 7, 17, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 8, 17, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 7, 18, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 8, 18, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 7, 19, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 8, 19, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 7, 17, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 8, 17, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 7, 18, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 8, 18, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 7, 19, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 8, 19, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close5FDoor3:: - setmetatile 18, 12, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 19, 12, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 18, 13, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 19, 13, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 18, 14, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 19, 14, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 18, 12, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 19, 12, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 18, 13, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 19, 13, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 18, 14, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 19, 14, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close6FDoor:: - setmetatile 5, 14, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 6, 14, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 5, 15, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 6, 15, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 5, 16, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 6, 16, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 5, 14, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 6, 14, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 5, 15, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 6, 15, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 5, 16, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 6, 16, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close7FDoor1:: - setmetatile 11, 8, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 12, 8, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 11, 9, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 12, 9, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 12, 10, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 11, 8, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 12, 8, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 11, 9, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 12, 9, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 12, 10, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close7FDoor2:: - setmetatile 24, 7, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 25, 7, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 24, 8, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 25, 8, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 25, 9, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 24, 7, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 25, 7, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 24, 8, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 25, 8, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 25, 9, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close7FDoor3:: - setmetatile 25, 13, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 26, 13, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 25, 14, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 26, 14, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 26, 15, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 25, 13, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 26, 13, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 25, 14, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 26, 14, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 26, 15, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close8FDoor:: - setmetatile 5, 9, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 6, 9, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 5, 10, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 6, 10, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 5, 11, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 6, 11, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 5, 9, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 6, 9, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 5, 10, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 6, 10, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 5, 11, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 6, 11, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close9FDoor1:: - setmetatile 2, 9, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 3, 9, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 2, 10, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 3, 10, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 2, 11, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 3, 11, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 2, 9, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 3, 9, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 2, 10, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 3, 10, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 2, 11, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 3, 11, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close9FDoor2:: - setmetatile 12, 15, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 - setmetatile 13, 15, METATILE_SilphCo_VerticalBarrier_TopRight, 1 - setmetatile 12, 16, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 - setmetatile 13, 16, METATILE_SilphCo_VerticalBarrier_MidRight, 1 - setmetatile 12, 17, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 - setmetatile 13, 17, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 - return + setmetatile 12, 15, METATILE_SilphCo_VerticalBarrier_TopLeft, 1 + setmetatile 13, 15, METATILE_SilphCo_VerticalBarrier_TopRight, 1 + setmetatile 12, 16, METATILE_SilphCo_VerticalBarrier_MidLeft, 1 + setmetatile 13, 16, METATILE_SilphCo_VerticalBarrier_MidRight, 1 + setmetatile 12, 17, METATILE_SilphCo_VerticalBarrier_BottomLeft, 1 + setmetatile 13, 17, METATILE_SilphCo_VerticalBarrier_BottomRight, 1 + return EventScript_Close9FDoor3:: - setmetatile 21, 6, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 22, 6, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 21, 7, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 22, 7, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 22, 8, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 21, 6, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 22, 6, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 21, 7, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 22, 7, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 22, 8, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close9FDoor4:: - setmetatile 21, 12, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 22, 12, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 21, 13, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 22, 13, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 22, 14, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 21, 12, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 22, 12, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 21, 13, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 22, 13, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 22, 14, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close10FDoor:: - setmetatile 12, 11, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 13, 11, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 12, 12, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 13, 12, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 13, 13, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 12, 11, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 13, 11, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 12, 12, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 13, 12, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 13, 13, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Close11FDoor:: - setmetatile 5, 16, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 - setmetatile 6, 16, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 - setmetatile 5, 17, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 - setmetatile 6, 17, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 - setmetatile 6, 18, METATILE_SilphCo_Floor_ShadeFull, 0 - return + setmetatile 5, 16, METATILE_SilphCo_HorizontalBarrier_TopLeft, 1 + setmetatile 6, 16, METATILE_SilphCo_HorizontalBarrier_TopRight, 1 + setmetatile 5, 17, METATILE_SilphCo_HorizontalBarrier_BottomLeft, 1 + setmetatile 6, 17, METATILE_SilphCo_HorizontalBarrier_BottomRight, 1 + setmetatile 6, 18, METATILE_SilphCo_Floor_ShadeFull, 0 + return EventScript_Open2FDoor1:: - setmetatile 5, 8, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 8, METATILE_SilphCo_Floor, 0 - setmetatile 5, 9, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 9, METATILE_SilphCo_Floor, 0 - setmetatile 6, 10, METATILE_SilphCo_Floor, 0 - return + setmetatile 5, 8, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 8, METATILE_SilphCo_Floor, 0 + setmetatile 5, 9, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 9, METATILE_SilphCo_Floor, 0 + setmetatile 6, 10, METATILE_SilphCo_Floor, 0 + return EventScript_Open2FDoor2:: - setmetatile 5, 15, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 15, METATILE_SilphCo_Floor, 0 - setmetatile 5, 16, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 16, METATILE_SilphCo_Floor, 0 - setmetatile 6, 17, METATILE_SilphCo_Floor, 0 - return + setmetatile 5, 15, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 15, METATILE_SilphCo_Floor, 0 + setmetatile 5, 16, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 16, METATILE_SilphCo_Floor, 0 + setmetatile 6, 17, METATILE_SilphCo_Floor, 0 + return EventScript_Open3FDoor1:: - setmetatile 9, 11, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 10, 11, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 9, 12, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 10, 12, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 9, 13, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 10, 13, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 9, 11, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 10, 11, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 9, 12, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 10, 12, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 9, 13, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 10, 13, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open3FDoor2:: - setmetatile 20, 11, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 21, 11, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 20, 12, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 21, 12, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 20, 13, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 21, 13, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 20, 11, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 21, 11, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 20, 12, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 21, 12, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 20, 13, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 21, 13, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open4FDoor1:: - setmetatile 3, 16, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 4, 16, METATILE_SilphCo_Floor, 0 - setmetatile 3, 17, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 4, 17, METATILE_SilphCo_Floor, 0 - setmetatile 4, 18, METATILE_SilphCo_Floor, 0 - return + setmetatile 3, 16, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 4, 16, METATILE_SilphCo_Floor, 0 + setmetatile 3, 17, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 4, 17, METATILE_SilphCo_Floor, 0 + setmetatile 4, 18, METATILE_SilphCo_Floor, 0 + return EventScript_Open4FDoor2:: - setmetatile 14, 11, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 15, 11, METATILE_SilphCo_Floor, 0 - setmetatile 14, 12, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 15, 12, METATILE_SilphCo_Floor, 0 - setmetatile 15, 13, METATILE_SilphCo_Floor, 0 - return + setmetatile 14, 11, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 15, 11, METATILE_SilphCo_Floor, 0 + setmetatile 14, 12, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 15, 12, METATILE_SilphCo_Floor, 0 + setmetatile 15, 13, METATILE_SilphCo_Floor, 0 + return EventScript_Open5FDoor1:: - setmetatile 7, 8, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 8, 8, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 7, 9, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 8, 9, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 7, 10, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 8, 10, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 7, 8, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 8, 8, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 7, 9, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 8, 9, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 7, 10, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 8, 10, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open5FDoor2:: - setmetatile 7, 17, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 8, 17, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 7, 18, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 8, 18, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 7, 19, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 8, 19, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 7, 17, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 8, 17, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 7, 18, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 8, 18, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 7, 19, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 8, 19, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open5FDoor3:: - setmetatile 18, 12, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 19, 12, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 18, 13, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 19, 13, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 18, 14, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 19, 14, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 18, 12, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 19, 12, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 18, 13, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 19, 13, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 18, 14, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 19, 14, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open6FDoor:: - setmetatile 5, 14, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 6, 14, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 5, 15, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 15, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 5, 16, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 6, 16, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 5, 14, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 6, 14, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 5, 15, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 15, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 5, 16, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 6, 16, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open7FDoor1:: - setmetatile 11, 8, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 12, 8, METATILE_SilphCo_Floor, 0 - setmetatile 11, 9, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 12, 9, METATILE_SilphCo_Floor, 0 - setmetatile 12, 10, METATILE_SilphCo_Floor, 0 - return + setmetatile 11, 8, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 12, 8, METATILE_SilphCo_Floor, 0 + setmetatile 11, 9, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 12, 9, METATILE_SilphCo_Floor, 0 + setmetatile 12, 10, METATILE_SilphCo_Floor, 0 + return EventScript_Open7FDoor2:: - setmetatile 24, 7, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 25, 7, METATILE_SilphCo_Floor, 0 - setmetatile 24, 8, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 25, 8, METATILE_SilphCo_Floor, 0 - setmetatile 25, 9, METATILE_SilphCo_Floor, 0 - return + setmetatile 24, 7, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 25, 7, METATILE_SilphCo_Floor, 0 + setmetatile 24, 8, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 25, 8, METATILE_SilphCo_Floor, 0 + setmetatile 25, 9, METATILE_SilphCo_Floor, 0 + return EventScript_Open7FDoor3:: - setmetatile 25, 13, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 26, 13, METATILE_SilphCo_Floor, 0 - setmetatile 25, 14, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 26, 14, METATILE_SilphCo_Floor, 0 - setmetatile 26, 15, METATILE_SilphCo_Floor, 0 - return + setmetatile 25, 13, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 26, 13, METATILE_SilphCo_Floor, 0 + setmetatile 25, 14, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 26, 14, METATILE_SilphCo_Floor, 0 + setmetatile 26, 15, METATILE_SilphCo_Floor, 0 + return EventScript_Open8FDoor:: - setmetatile 5, 9, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 6, 9, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 5, 10, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 10, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 5, 11, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 6, 11, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 5, 9, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 6, 9, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 5, 10, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 10, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 5, 11, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 6, 11, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open9FDoor1:: - setmetatile 2, 9, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 3, 9, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 2, 10, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 3, 10, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 2, 11, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 3, 11, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 2, 9, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 3, 9, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 2, 10, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 3, 10, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 2, 11, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 3, 11, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open9FDoor2:: - setmetatile 12, 15, METATILE_SilphCo_Wall_LeftEdge, 1 - setmetatile 13, 15, METATILE_SilphCo_Wall_RightEdge, 1 - setmetatile 12, 16, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 13, 16, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 12, 17, METATILE_SilphCo_Floor_WallLeftCorner, 0 - setmetatile 13, 17, METATILE_SilphCo_Floor_WallRightCorner, 0 - return + setmetatile 12, 15, METATILE_SilphCo_Wall_LeftEdge, 1 + setmetatile 13, 15, METATILE_SilphCo_Wall_RightEdge, 1 + setmetatile 12, 16, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 13, 16, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 12, 17, METATILE_SilphCo_Floor_WallLeftCorner, 0 + setmetatile 13, 17, METATILE_SilphCo_Floor_WallRightCorner, 0 + return EventScript_Open9FDoor3:: - setmetatile 21, 6, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 22, 6, METATILE_SilphCo_Floor, 0 - setmetatile 21, 7, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 22, 7, METATILE_SilphCo_Floor, 0 - setmetatile 22, 8, METATILE_SilphCo_Floor, 0 - return + setmetatile 21, 6, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 22, 6, METATILE_SilphCo_Floor, 0 + setmetatile 21, 7, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 22, 7, METATILE_SilphCo_Floor, 0 + setmetatile 22, 8, METATILE_SilphCo_Floor, 0 + return EventScript_Open9FDoor4:: - setmetatile 21, 12, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 22, 12, METATILE_SilphCo_Floor, 0 - setmetatile 21, 13, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 22, 13, METATILE_SilphCo_Floor, 0 - setmetatile 22, 14, METATILE_SilphCo_Floor, 0 - return + setmetatile 21, 12, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 22, 12, METATILE_SilphCo_Floor, 0 + setmetatile 21, 13, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 22, 13, METATILE_SilphCo_Floor, 0 + setmetatile 22, 14, METATILE_SilphCo_Floor, 0 + return EventScript_Open10FDoor:: - setmetatile 12, 11, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 13, 11, METATILE_SilphCo_Floor, 0 - setmetatile 12, 12, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 13, 12, METATILE_SilphCo_Floor, 0 - setmetatile 13, 13, METATILE_SilphCo_Floor, 0 - return + setmetatile 12, 11, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 13, 11, METATILE_SilphCo_Floor, 0 + setmetatile 12, 12, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 13, 12, METATILE_SilphCo_Floor, 0 + setmetatile 13, 13, METATILE_SilphCo_Floor, 0 + return EventScript_Open11FDoor:: - setmetatile 5, 16, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 16, METATILE_SilphCo_Floor, 0 - setmetatile 5, 17, METATILE_SilphCo_Floor_ShadeFull, 0 - setmetatile 6, 17, METATILE_SilphCo_Floor, 0 - setmetatile 6, 18, METATILE_SilphCo_Floor, 0 - return + setmetatile 5, 16, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 16, METATILE_SilphCo_Floor, 0 + setmetatile 5, 17, METATILE_SilphCo_Floor_ShadeFull, 0 + setmetatile 6, 17, METATILE_SilphCo_Floor, 0 + setmetatile 6, 18, METATILE_SilphCo_Floor, 0 + return SilphCo_2F_EventScript_Door1:: - lockall - setvar VAR_TEMP_1, 1 - setvar VAR_0x8004, FLAG_SILPH_2F_DOOR_1 - goto_if_set FLAG_SILPH_2F_DOOR_1, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 1 + setvar VAR_0x8004, FLAG_SILPH_2F_DOOR_1 + goto_if_set FLAG_SILPH_2F_DOOR_1, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_2F_EventScript_Door2:: - lockall - setvar VAR_TEMP_1, 2 - setvar VAR_0x8004, FLAG_SILPH_2F_DOOR_2 - goto_if_set FLAG_SILPH_2F_DOOR_2, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 2 + setvar VAR_0x8004, FLAG_SILPH_2F_DOOR_2 + goto_if_set FLAG_SILPH_2F_DOOR_2, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_3F_EventScript_Door1:: - lockall - setvar VAR_TEMP_1, 3 - setvar VAR_0x8004, FLAG_SILPH_3F_DOOR_1 - goto_if_set FLAG_SILPH_3F_DOOR_1, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 3 + setvar VAR_0x8004, FLAG_SILPH_3F_DOOR_1 + goto_if_set FLAG_SILPH_3F_DOOR_1, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_3F_EventScript_Door2:: - lockall - setvar VAR_TEMP_1, 4 - setvar VAR_0x8004, FLAG_SILPH_3F_DOOR_2 - goto_if_set FLAG_SILPH_3F_DOOR_2, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 4 + setvar VAR_0x8004, FLAG_SILPH_3F_DOOR_2 + goto_if_set FLAG_SILPH_3F_DOOR_2, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_4F_EventScript_Door1:: - lockall - setvar VAR_TEMP_1, 5 - setvar VAR_0x8004, FLAG_SILPH_4F_DOOR_1 - goto_if_set FLAG_SILPH_4F_DOOR_1, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 5 + setvar VAR_0x8004, FLAG_SILPH_4F_DOOR_1 + goto_if_set FLAG_SILPH_4F_DOOR_1, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_4F_EventScript_Door2:: - lockall - setvar VAR_TEMP_1, 6 - setvar VAR_0x8004, FLAG_SILPH_4F_DOOR_2 - goto_if_set FLAG_SILPH_4F_DOOR_2, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 6 + setvar VAR_0x8004, FLAG_SILPH_4F_DOOR_2 + goto_if_set FLAG_SILPH_4F_DOOR_2, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_5F_EventScript_Door1:: - lockall - setvar VAR_TEMP_1, 7 - setvar VAR_0x8004, FLAG_SILPH_5F_DOOR_1 - goto_if_set FLAG_SILPH_5F_DOOR_1, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 7 + setvar VAR_0x8004, FLAG_SILPH_5F_DOOR_1 + goto_if_set FLAG_SILPH_5F_DOOR_1, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_5F_EventScript_Door2:: - lockall - setvar VAR_TEMP_1, 8 - setvar VAR_0x8004, FLAG_SILPH_5F_DOOR_2 - goto_if_set FLAG_SILPH_5F_DOOR_2, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 8 + setvar VAR_0x8004, FLAG_SILPH_5F_DOOR_2 + goto_if_set FLAG_SILPH_5F_DOOR_2, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_5F_EventScript_Door3:: - lockall - setvar VAR_TEMP_1, 9 - setvar VAR_0x8004, FLAG_SILPH_5F_DOOR_3 - goto_if_set FLAG_SILPH_5F_DOOR_3, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 9 + setvar VAR_0x8004, FLAG_SILPH_5F_DOOR_3 + goto_if_set FLAG_SILPH_5F_DOOR_3, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_6F_EventScript_Door:: - lockall - setvar VAR_TEMP_1, 10 - setvar VAR_0x8004, FLAG_SILPH_6F_DOOR - goto_if_set FLAG_SILPH_6F_DOOR, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 10 + setvar VAR_0x8004, FLAG_SILPH_6F_DOOR + goto_if_set FLAG_SILPH_6F_DOOR, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_7F_EventScript_Door1:: - lockall - setvar VAR_TEMP_1, 11 - setvar VAR_0x8004, FLAG_SILPH_7F_DOOR_1 - goto_if_set FLAG_SILPH_7F_DOOR_1, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 11 + setvar VAR_0x8004, FLAG_SILPH_7F_DOOR_1 + goto_if_set FLAG_SILPH_7F_DOOR_1, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_7F_EventScript_Door2:: - lockall - setvar VAR_TEMP_1, 12 - setvar VAR_0x8004, FLAG_SILPH_7F_DOOR_2 - goto_if_set FLAG_SILPH_7F_DOOR_2, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 12 + setvar VAR_0x8004, FLAG_SILPH_7F_DOOR_2 + goto_if_set FLAG_SILPH_7F_DOOR_2, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_7F_EventScript_Door3:: - lockall - setvar VAR_TEMP_1, 13 - setvar VAR_0x8004, FLAG_SILPH_7F_DOOR_3 - goto_if_set FLAG_SILPH_7F_DOOR_3, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 13 + setvar VAR_0x8004, FLAG_SILPH_7F_DOOR_3 + goto_if_set FLAG_SILPH_7F_DOOR_3, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_8F_EventScript_Door:: - lockall - setvar VAR_TEMP_1, 14 - setvar VAR_0x8004, FLAG_SILPH_8F_DOOR - goto_if_set FLAG_SILPH_8F_DOOR, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 14 + setvar VAR_0x8004, FLAG_SILPH_8F_DOOR + goto_if_set FLAG_SILPH_8F_DOOR, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_9F_EventScript_Door1:: - lockall - setvar VAR_TEMP_1, 15 - setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_1 - goto_if_set FLAG_SILPH_9F_DOOR_1, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 15 + setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_1 + goto_if_set FLAG_SILPH_9F_DOOR_1, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_9F_EventScript_Door2:: - lockall - setvar VAR_TEMP_1, 16 - setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_2 - goto_if_set FLAG_SILPH_9F_DOOR_2, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 16 + setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_2 + goto_if_set FLAG_SILPH_9F_DOOR_2, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_9F_EventScript_Door3:: - lockall - setvar VAR_TEMP_1, 17 - setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_3 - goto_if_set FLAG_SILPH_9F_DOOR_3, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 17 + setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_3 + goto_if_set FLAG_SILPH_9F_DOOR_3, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_9F_EventScript_Door4:: - lockall - setvar VAR_TEMP_1, 18 - setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_4 - goto_if_set FLAG_SILPH_9F_DOOR_4, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 18 + setvar VAR_0x8004, FLAG_SILPH_9F_DOOR_4 + goto_if_set FLAG_SILPH_9F_DOOR_4, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_10F_EventScript_Door:: - lockall - setvar VAR_TEMP_1, 19 - setvar VAR_0x8004, FLAG_SILPH_10F_DOOR - goto_if_set FLAG_SILPH_10F_DOOR, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 19 + setvar VAR_0x8004, FLAG_SILPH_10F_DOOR + goto_if_set FLAG_SILPH_10F_DOOR, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end SilphCo_11F_EventScript_Door:: - lockall - setvar VAR_TEMP_1, 20 - setvar VAR_0x8004, FLAG_SILPH_11F_DOOR - goto_if_set FLAG_SILPH_11F_DOOR, EventScript_DoorUnlocked - goto EventScript_TryUnlockDoor - end + lockall + setvar VAR_TEMP_1, 20 + setvar VAR_0x8004, FLAG_SILPH_11F_DOOR + goto_if_set FLAG_SILPH_11F_DOOR, EventScript_DoorUnlocked + goto EventScript_TryUnlockDoor + end EventScript_TryUnlockDoor:: - goto_if_set FLAG_HIDE_SILPH_CO_5F_CARD_KEY, EventScript_OpenDoor - goto EventScript_NeedCardKey - end + goto_if_set FLAG_HIDE_SILPH_CO_5F_CARD_KEY, EventScript_OpenDoor + goto EventScript_NeedCardKey + end EventScript_OpenDoor:: - playfanfare MUS_LEVEL_UP - msgbox Text_CardKeyOpenedDoor - waitfanfare - compare VAR_TEMP_1, 1 - call_if_eq EventScript_Open2FDoor1 - compare VAR_TEMP_1, 2 - call_if_eq EventScript_Open2FDoor2 - compare VAR_TEMP_1, 3 - call_if_eq EventScript_Open3FDoor1 - compare VAR_TEMP_1, 4 - call_if_eq EventScript_Open3FDoor2 - compare VAR_TEMP_1, 5 - call_if_eq EventScript_Open4FDoor1 - compare VAR_TEMP_1, 6 - call_if_eq EventScript_Open4FDoor2 - compare VAR_TEMP_1, 7 - call_if_eq EventScript_Open5FDoor1 - compare VAR_TEMP_1, 8 - call_if_eq EventScript_Open5FDoor2 - compare VAR_TEMP_1, 9 - call_if_eq EventScript_Open5FDoor3 - compare VAR_TEMP_1, 10 - call_if_eq EventScript_Open6FDoor - compare VAR_TEMP_1, 11 - call_if_eq EventScript_Open7FDoor1 - compare VAR_TEMP_1, 12 - call_if_eq EventScript_Open7FDoor2 - compare VAR_TEMP_1, 13 - call_if_eq EventScript_Open7FDoor3 - compare VAR_TEMP_1, 14 - call_if_eq EventScript_Open8FDoor - compare VAR_TEMP_1, 15 - call_if_eq EventScript_Open9FDoor1 - compare VAR_TEMP_1, 16 - call_if_eq EventScript_Open9FDoor2 - compare VAR_TEMP_1, 17 - call_if_eq EventScript_Open9FDoor3 - compare VAR_TEMP_1, 18 - call_if_eq EventScript_Open9FDoor4 - compare VAR_TEMP_1, 19 - call_if_eq EventScript_Open10FDoor - compare VAR_TEMP_1, 20 - call_if_eq EventScript_Open11FDoor - waitse - playse SE_UNLOCK - special DrawWholeMapView - waitse - special SetHiddenItemFlag - releaseall - end + playfanfare MUS_LEVEL_UP + msgbox Text_CardKeyOpenedDoor + waitfanfare + call_if_eq VAR_TEMP_1, 1, EventScript_Open2FDoor1 + call_if_eq VAR_TEMP_1, 2, EventScript_Open2FDoor2 + call_if_eq VAR_TEMP_1, 3, EventScript_Open3FDoor1 + call_if_eq VAR_TEMP_1, 4, EventScript_Open3FDoor2 + call_if_eq VAR_TEMP_1, 5, EventScript_Open4FDoor1 + call_if_eq VAR_TEMP_1, 6, EventScript_Open4FDoor2 + call_if_eq VAR_TEMP_1, 7, EventScript_Open5FDoor1 + call_if_eq VAR_TEMP_1, 8, EventScript_Open5FDoor2 + call_if_eq VAR_TEMP_1, 9, EventScript_Open5FDoor3 + call_if_eq VAR_TEMP_1, 10, EventScript_Open6FDoor + call_if_eq VAR_TEMP_1, 11, EventScript_Open7FDoor1 + call_if_eq VAR_TEMP_1, 12, EventScript_Open7FDoor2 + call_if_eq VAR_TEMP_1, 13, EventScript_Open7FDoor3 + call_if_eq VAR_TEMP_1, 14, EventScript_Open8FDoor + call_if_eq VAR_TEMP_1, 15, EventScript_Open9FDoor1 + call_if_eq VAR_TEMP_1, 16, EventScript_Open9FDoor2 + call_if_eq VAR_TEMP_1, 17, EventScript_Open9FDoor3 + call_if_eq VAR_TEMP_1, 18, EventScript_Open9FDoor4 + call_if_eq VAR_TEMP_1, 19, EventScript_Open10FDoor + call_if_eq VAR_TEMP_1, 20, EventScript_Open11FDoor + waitse + playse SE_UNLOCK + special DrawWholeMapView + waitse + special SetHiddenItemFlag + releaseall + end diff --git a/data/scripts/std_msgbox.inc b/data/scripts/std_msgbox.inc index d2a85a151..18ad553c8 100644 --- a/data/scripts/std_msgbox.inc +++ b/data/scripts/std_msgbox.inc @@ -29,15 +29,12 @@ Std_MsgboxYesNo:: Std_ReceivedItem:: textcolor NPC_TEXT_COLOR_NEUTRAL - compare VAR_0x8002, MUS_LEVEL_UP - call_if_eq EventScript_ReceivedItemFanfare1 - compare VAR_0x8002, MUS_OBTAIN_KEY_ITEM - call_if_eq EventScript_ReceivedItemFanfare2 + call_if_eq VAR_0x8002, MUS_LEVEL_UP, EventScript_ReceivedItemFanfare1 + call_if_eq VAR_0x8002, MUS_OBTAIN_KEY_ITEM, EventScript_ReceivedItemFanfare2 message 0x0 waitmessage waitfanfare - compare VAR_0x8002, MUS_LEVEL_UP - call_if_eq EventScript_ReceivedItemWaitFanfare + call_if_eq VAR_0x8002, MUS_LEVEL_UP, EventScript_ReceivedItemWaitFanfare putitemaway VAR_0x8000, VAR_0x8001 call EventScript_RestorePrevTextColor return diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc index 43a64b3fe..e7bf85ec7 100644 --- a/data/scripts/surf.inc +++ b/data/scripts/surf.inc @@ -1,14 +1,12 @@ EventScript_UseSurf:: goto_if_questlog EventScript_UseSurfEnd checkpartymove MOVE_SURF - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_UseSurfEnd + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_UseSurfEnd bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT lockall msgbox Text_WantToSurf, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_UseSurfRelease + goto_if_eq VAR_RESULT, NO, EventScript_UseSurfRelease msgbox Text_UsedSurf dofieldeffect FLDEFF_USE_SURF EventScript_UseSurfRelease: diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index ca774d982..c3e437196 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -11,8 +11,7 @@ EventScript_TryDoNormalTrainerBattle:: applymovement VAR_LAST_TALKED, Movement_RevealTrainer waitmovement 0 specialvar VAR_RESULT, Script_HasTrainerBeenFought - compare VAR_RESULT, FALSE - goto_if_ne EventScript_NoTrainerBattle + goto_if_ne VAR_RESULT, FALSE, EventScript_NoTrainerBattle special PlayTrainerEncounterMusic special SetUpTrainerMovement goto EventScript_DoTrainerBattle @@ -25,11 +24,9 @@ EventScript_TryDoDoubleTrainerBattle:: faceplayer call EventScript_RevealTrainer specialvar VAR_RESULT, Script_HasTrainerBeenFought - compare VAR_RESULT, FALSE - goto_if_ne EventScript_NoDoubleTrainerBattle + goto_if_ne VAR_RESULT, FALSE, EventScript_NoDoubleTrainerBattle special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne EventScript_NotEnoughMonsForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleBattle special PlayTrainerEncounterMusic special SetUpTrainerMovement goto EventScript_DoTrainerBattle @@ -55,8 +52,7 @@ EventScript_DoNoIntroTrainerBattle:: EventScript_TryDoRematchBattle:: call EventScript_RevealTrainer specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, FALSE - goto_if_eq EventScript_NoRematchBattle + goto_if_eq VAR_RESULT, FALSE, EventScript_NoRematchBattle special PlayTrainerEncounterMusic special SetUpTrainerMovement special ShowTrainerIntroSpeech @@ -73,11 +69,9 @@ EventScript_NoRematchBattle:: EventScript_TryDoDoubleRematchBattle:: specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, FALSE - goto_if_eq EventScript_NoDoubleRematchBattle + goto_if_eq VAR_RESULT, FALSE, EventScript_NoDoubleRematchBattle special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleRematchBattle special PlayTrainerEncounterMusic special SetUpTrainerMovement special ShowTrainerIntroSpeech @@ -119,16 +113,11 @@ EventScript_DoTrainerBattle:: goto_if_questlog EventScript_EndQuestLogBattle dotrainerbattle specialvar VAR_RESULT, GetTrainerBattleMode - compare VAR_RESULT, TRAINER_BATTLE_SINGLE - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT - goto_if_eq EventScript_EndTrainerBattleContinueScript - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC - goto_if_eq EventScript_EndTrainerBattleContinueScript - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE - goto_if_eq EventScript_EndTrainerBattleContinueScript - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC - goto_if_eq EventScript_EndTrainerBattleContinueScript + goto_if_eq VAR_RESULT, TRAINER_BATTLE_SINGLE, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT, EventScript_EndTrainerBattleContinueScript + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC, EventScript_EndTrainerBattleContinueScript + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE, EventScript_EndTrainerBattleContinueScript + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC, EventScript_EndTrainerBattleContinueScript EventScript_EndTrainerBattle:: releaseall end diff --git a/data/scripts/trainer_card.inc b/data/scripts/trainer_card.inc index 5cbf0897c..09a4c38f5 100644 --- a/data/scripts/trainer_card.inc +++ b/data/scripts/trainer_card.inc @@ -4,11 +4,9 @@ CeladonCity_GameCorner_EventScript_PhotoPrinter:: lockall showmoneybox 0, 0 msgbox CeladonCity_GameCorner_Text_TryPokemonPrinter, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CeladonCity_GameCorner_EventScript_DeclinePhoto + goto_if_eq VAR_RESULT, NO, CeladonCity_GameCorner_EventScript_DeclinePhoto checkmoney 50 - compare VAR_RESULT, FALSE - goto_if_eq CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto + goto_if_eq VAR_RESULT, FALSE, CeladonCity_GameCorner_EventScript_NotEnoughMoneyForPhoto playse SE_SHOP removemoney 50 updatemoneybox @@ -83,8 +81,7 @@ FourIsland_House2_EventScript_MeetStickerMan:: waitmovement 0 applymovement LOCALID_STICKER_MAN, Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 0 - goto_if_eq FourIsland_House2_EventScript_StickerManNothingToBrag + goto_if_eq VAR_0x8008, 0, FourIsland_House2_EventScript_StickerManNothingToBrag message FourIsland_House2_Text_GiveYouStickerIfYouBrag waitmessage goto FourIsland_House2_EventScript_ChooseBrag @@ -95,8 +92,7 @@ FourIsland_House2_EventScript_StickerManAskForBrag:: waitmovement 0 goto_if_questlog EventScript_ReleaseEnd special QuestLog_CutRecording - compare VAR_0x8008, 0 - goto_if_eq FourIsland_House2_EventScript_NothingToBragAbout + goto_if_eq VAR_0x8008, 0, FourIsland_House2_EventScript_NothingToBragAbout message FourIsland_House2_Text_BragAboutWhatToday waitmessage goto FourIsland_House2_EventScript_ChooseBrag @@ -185,43 +181,35 @@ FourIsland_House2_EventScript_StickerManNothingToBrag:: end FourIsland_House2_EventScript_BragHoF:: - compare VAR_0x8004, 39 - goto_if_le FourIsland_House2_EventScript_BragHoFLowest - compare VAR_0x8004, 99 - goto_if_le FourIsland_House2_EventScript_BragHoFLow - compare VAR_0x8004, 199 - goto_if_le FourIsland_House2_EventScript_BragHoFHigh - compare VAR_0x8004, 200 - goto_if_ge FourIsland_House2_EventScript_BragHoFHighest + goto_if_le VAR_0x8004, 39, FourIsland_House2_EventScript_BragHoFLowest + goto_if_le VAR_0x8004, 99, FourIsland_House2_EventScript_BragHoFLow + goto_if_le VAR_0x8004, 199, FourIsland_House2_EventScript_BragHoFHigh + goto_if_ge VAR_0x8004, 200, FourIsland_House2_EventScript_BragHoFHighest end FourIsland_House2_EventScript_BragHoFLowest:: - compare VAR_HOF_BRAG_STATE, 1 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedHoF + goto_if_eq VAR_HOF_BRAG_STATE, 1, FourIsland_House2_EventScript_AlreadyBraggedHoF setvar VAR_HOF_BRAG_STATE, 1 msgbox FourIsland_House2_Text_WowHoFLowest goto FourIsland_House2_EventScript_BraggedHoF end FourIsland_House2_EventScript_BragHoFLow:: - compare VAR_HOF_BRAG_STATE, 2 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedHoF + goto_if_eq VAR_HOF_BRAG_STATE, 2, FourIsland_House2_EventScript_AlreadyBraggedHoF setvar VAR_HOF_BRAG_STATE, 2 msgbox FourIsland_House2_Text_WowHoFLow goto FourIsland_House2_EventScript_BraggedHoF end FourIsland_House2_EventScript_BragHoFHigh:: - compare VAR_HOF_BRAG_STATE, 3 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedHoF + goto_if_eq VAR_HOF_BRAG_STATE, 3, FourIsland_House2_EventScript_AlreadyBraggedHoF setvar VAR_HOF_BRAG_STATE, 3 msgbox FourIsland_House2_Text_WowHoFHigh goto FourIsland_House2_EventScript_BraggedHoF end FourIsland_House2_EventScript_BragHoFHighest:: - compare VAR_HOF_BRAG_STATE, 4 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedHoFMax + goto_if_eq VAR_HOF_BRAG_STATE, 4, FourIsland_House2_EventScript_AlreadyBraggedHoFMax setvar VAR_HOF_BRAG_STATE, 4 msgbox FourIsland_House2_Text_WowHoFHighest goto FourIsland_House2_EventScript_BraggedHoF @@ -248,43 +236,35 @@ FourIsland_House2_EventScript_BraggedHoF:: end FourIsland_House2_EventScript_BragEggs:: - compare VAR_0x8005, 99 - goto_if_le FourIsland_House2_EventScript_BragEggsLowest - compare VAR_0x8005, 199 - goto_if_le FourIsland_House2_EventScript_BragEggsLow - compare VAR_0x8005, 299 - goto_if_le FourIsland_House2_EventScript_BragEggsHigh - compare VAR_0x8005, 300 - goto_if_ge FourIsland_House2_EventScript_BragEggsHighest + goto_if_le VAR_0x8005, 99, FourIsland_House2_EventScript_BragEggsLowest + goto_if_le VAR_0x8005, 199, FourIsland_House2_EventScript_BragEggsLow + goto_if_le VAR_0x8005, 299, FourIsland_House2_EventScript_BragEggsHigh + goto_if_ge VAR_0x8005, 300, FourIsland_House2_EventScript_BragEggsHighest end FourIsland_House2_EventScript_BragEggsLowest:: - compare VAR_EGG_BRAG_STATE, 1 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedEggs + goto_if_eq VAR_EGG_BRAG_STATE, 1, FourIsland_House2_EventScript_AlreadyBraggedEggs setvar VAR_EGG_BRAG_STATE, 1 msgbox FourIsland_House2_Text_WowEggsLowest goto FourIsland_House2_EventScript_BraggedEggs end FourIsland_House2_EventScript_BragEggsLow:: - compare VAR_EGG_BRAG_STATE, 2 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedEggs + goto_if_eq VAR_EGG_BRAG_STATE, 2, FourIsland_House2_EventScript_AlreadyBraggedEggs setvar VAR_EGG_BRAG_STATE, 2 msgbox FourIsland_House2_Text_WowEggsLow goto FourIsland_House2_EventScript_BraggedEggs end FourIsland_House2_EventScript_BragEggsHigh:: - compare VAR_EGG_BRAG_STATE, 3 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedEggs + goto_if_eq VAR_EGG_BRAG_STATE, 3, FourIsland_House2_EventScript_AlreadyBraggedEggs setvar VAR_EGG_BRAG_STATE, 3 msgbox FourIsland_House2_Text_WowEggsHigh goto FourIsland_House2_EventScript_BraggedEggs end FourIsland_House2_EventScript_BragEggsHighest:: - compare VAR_EGG_BRAG_STATE, 4 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedEggsMax + goto_if_eq VAR_EGG_BRAG_STATE, 4, FourIsland_House2_EventScript_AlreadyBraggedEggsMax setvar VAR_EGG_BRAG_STATE, 4 msgbox FourIsland_House2_Text_WowEggsHighest goto FourIsland_House2_EventScript_BraggedEggs @@ -311,43 +291,35 @@ FourIsland_House2_EventScript_BraggedEggs:: end FourIsland_House2_EventScript_BragLinkWins:: - compare VAR_0x8006, 19 - goto_if_le FourIsland_House2_EventScript_BragLinkWinsLowest - compare VAR_0x8006, 49 - goto_if_le FourIsland_House2_EventScript_BragLinkWinsLow - compare VAR_0x8006, 99 - goto_if_le FourIsland_House2_EventScript_BragLinkWinsHigh - compare VAR_0x8006, 100 - goto_if_ge FourIsland_House2_EventScript_BragLinkWinsHighest + goto_if_le VAR_0x8006, 19, FourIsland_House2_EventScript_BragLinkWinsLowest + goto_if_le VAR_0x8006, 49, FourIsland_House2_EventScript_BragLinkWinsLow + goto_if_le VAR_0x8006, 99, FourIsland_House2_EventScript_BragLinkWinsHigh + goto_if_ge VAR_0x8006, 100, FourIsland_House2_EventScript_BragLinkWinsHighest end FourIsland_House2_EventScript_BragLinkWinsLowest:: - compare VAR_LINK_WIN_BRAG_STATE, 1 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedLinkWins + goto_if_eq VAR_LINK_WIN_BRAG_STATE, 1, FourIsland_House2_EventScript_AlreadyBraggedLinkWins setvar VAR_LINK_WIN_BRAG_STATE, 1 msgbox FourIsland_House2_Text_WowLinkWinsLowest goto FourIsland_House2_EventScript_BraggedLinkWins end FourIsland_House2_EventScript_BragLinkWinsLow:: - compare VAR_LINK_WIN_BRAG_STATE, 2 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedLinkWins + goto_if_eq VAR_LINK_WIN_BRAG_STATE, 2, FourIsland_House2_EventScript_AlreadyBraggedLinkWins setvar VAR_LINK_WIN_BRAG_STATE, 2 msgbox FourIsland_House2_Text_WowLinkWinsLow goto FourIsland_House2_EventScript_BraggedLinkWins end FourIsland_House2_EventScript_BragLinkWinsHigh:: - compare VAR_LINK_WIN_BRAG_STATE, 3 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedLinkWins + goto_if_eq VAR_LINK_WIN_BRAG_STATE, 3, FourIsland_House2_EventScript_AlreadyBraggedLinkWins setvar VAR_LINK_WIN_BRAG_STATE, 3 msgbox FourIsland_House2_Text_WowLinkWinsHigh goto FourIsland_House2_EventScript_BraggedLinkWins end FourIsland_House2_EventScript_BragLinkWinsHighest:: - compare VAR_LINK_WIN_BRAG_STATE, 4 - goto_if_eq FourIsland_House2_EventScript_AlreadyBraggedLinkWinsMax + goto_if_eq VAR_LINK_WIN_BRAG_STATE, 4, FourIsland_House2_EventScript_AlreadyBraggedLinkWinsMax setvar VAR_LINK_WIN_BRAG_STATE, 4 msgbox FourIsland_House2_Text_WowLinkWinsHighest goto FourIsland_House2_EventScript_BraggedLinkWins diff --git a/data/scripts/trainer_tower.inc b/data/scripts/trainer_tower.inc index 3a734aafd..fe239dd1d 100644 --- a/data/scripts/trainer_tower.inc +++ b/data/scripts/trainer_tower.inc @@ -49,8 +49,7 @@ TrainerTower_EventScript_SetObjectsDoubles:: setflag HIDE_TRAINER_KNOCKOUT setvar DISABLE_SINGLES_TRIGGER, TRUE ttower_isfloorcleared - compare VAR_RESULT, TRUE - goto_if_eq TrainerTower_EventScript_SetObjectsDoublesAlreadyBeaten + goto_if_eq VAR_RESULT, TRUE, TrainerTower_EventScript_SetObjectsDoublesAlreadyBeaten setobjectxyperm LOCALID_TRAINER_DOUBLES1, 10, 12 setobjectmovementtype LOCALID_TRAINER_DOUBLES1, MOVEMENT_TYPE_FACE_LEFT setobjectxyperm LOCALID_TRAINER_DOUBLES2, 10, 13 @@ -85,14 +84,12 @@ TrainerTower_OnFrame:: TrainerTower_EventScript_EnterFloor:: setvar VAR_TEMP_2, 1 ttower_isfloorcleared - compare VAR_RESULT, FALSE - goto_if_eq TrainerTower_EventScript_EndEnterFloor + goto_if_eq VAR_RESULT, FALSE, TrainerTower_EventScript_EndEnterFloor setvar DISABLE_SINGLES_TRIGGER, TRUE setvar DISABLE_DOUBLES_TRIGGER, TRUE TrainerTower_EventScript_EndEnterFloor: ttower_shouldexit - compare VAR_RESULT, TRUE - goto_if_eq TrainerTower_EventScript_WarpToLobby + goto_if_eq VAR_RESULT, TRUE, TrainerTower_EventScript_WarpToLobby end @ Never reached @@ -130,8 +127,7 @@ TrainerTower_EventScript_DoDoubleBattle:: setvar VAR_0x8004, TRAINER_TOWER_FUNC_GET_SPEECH setvar VAR_0x8005, TRAINER_TOWER_TEXT_INTRO addvar VAR_TEMP_3, 1 - compare VAR_TEMP_3, 1 - goto_if_eq TrainerTower_EventScript_DoSecondTrainerIntro + goto_if_eq VAR_TEMP_3, 1, TrainerTower_EventScript_DoSecondTrainerIntro setvar VAR_TEMP_3, 0 TrainerTower_EventScript_DoSecondTrainerIntro: copyvar VAR_0x8006, VAR_TEMP_3 @@ -341,8 +337,7 @@ TrainerTower_EventScript_SingleBattleTrigger:: TrainerTower_EventScript_DoubleBattleTriggerTop:: setvar VAR_TEMP_3, 0 ttower_checkdoubles - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne TrainerTower_EventScript_IneligibleForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, TrainerTower_EventScript_IneligibleForDoubleBattle ttower_encountermusic applymovement LOCALID_TRAINER_DOUBLES1, Movement_ExclamationMark waitmovement 0 @@ -352,8 +347,7 @@ TrainerTower_EventScript_DoubleBattleTriggerTop:: TrainerTower_EventScript_DoubleBattleTriggerBottom:: setvar VAR_TEMP_3, 1 ttower_checkdoubles - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne TrainerTower_EventScript_IneligibleForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, TrainerTower_EventScript_IneligibleForDoubleBattle ttower_encountermusic applymovement LOCALID_TRAINER_DOUBLES2, Movement_ExclamationMark waitmovement 0 diff --git a/data/scripts/trainers.inc b/data/scripts/trainers.inc index c6c66c751..5ec6ef8f4 100644 --- a/data/scripts/trainers.inc +++ b/data/scripts/trainers.inc @@ -1,8 +1,7 @@ Route3_EventScript_Ben:: trainerbattle_single TRAINER_YOUNGSTER_BEN, Route3_Text_BenIntro, Route3_Text_BenDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_BenRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_BenRematch msgbox Route3_Text_BenPostBattle, MSGBOX_AUTOCLOSE end @@ -14,8 +13,7 @@ Route3_EventScript_BenRematch:: Route3_EventScript_Calvin:: trainerbattle_single TRAINER_YOUNGSTER_CALVIN, Route3_Text_CalvinIntro, Route3_Text_CalvinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_CalvinRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_CalvinRematch msgbox Route3_Text_CalvinPostBattle, MSGBOX_AUTOCLOSE end @@ -27,8 +25,7 @@ Route3_EventScript_CalvinRematch:: Route3_EventScript_Colton:: trainerbattle_single TRAINER_BUG_CATCHER_COLTON, Route3_Text_ColtonIntro, Route3_Text_ColtonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_ColtonRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_ColtonRematch msgbox Route3_Text_ColtonPostBattle, MSGBOX_AUTOCLOSE end @@ -40,8 +37,7 @@ Route3_EventScript_ColtonRematch:: Route3_EventScript_Greg:: trainerbattle_single TRAINER_BUG_CATCHER_GREG, Route3_Text_GregIntro, Route3_Text_GregDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_GregRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_GregRematch msgbox Route3_Text_GregPostBattle, MSGBOX_AUTOCLOSE end @@ -53,8 +49,7 @@ Route3_EventScript_GregRematch:: Route3_EventScript_James:: trainerbattle_single TRAINER_BUG_CATCHER_JAMES, Route3_Text_JamesIntro, Route3_Text_JamesDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_JamesRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_JamesRematch msgbox Route3_Text_JamesPostBattle, MSGBOX_AUTOCLOSE end @@ -66,8 +61,7 @@ Route3_EventScript_JamesRematch:: Route3_EventScript_Janice:: trainerbattle_single TRAINER_LASS_JANICE, Route3_Text_JaniceIntro, Route3_Text_JaniceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_JaniceRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_JaniceRematch msgbox Route3_Text_JanicePostBattle, MSGBOX_AUTOCLOSE end @@ -79,8 +73,7 @@ Route3_EventScript_JaniceRematch:: Route3_EventScript_Sally:: trainerbattle_single TRAINER_LASS_SALLY, Route3_Text_SallyIntro, Route3_Text_SallyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_SallyRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_SallyRematch msgbox Route3_Text_SallyPostBattle, MSGBOX_AUTOCLOSE end @@ -92,8 +85,7 @@ Route3_EventScript_SallyRematch:: Route3_EventScript_Robin:: trainerbattle_single TRAINER_LASS_ROBIN, Route3_Text_RobinIntro, Route3_Text_RobinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route3_EventScript_RobinRematch + goto_if_eq VAR_RESULT, TRUE, Route3_EventScript_RobinRematch msgbox Route3_Text_RobinPostBattle, MSGBOX_AUTOCLOSE end @@ -105,8 +97,7 @@ Route3_EventScript_RobinRematch:: Route4_EventScript_Crissy:: trainerbattle_single TRAINER_LASS_CRISSY, Route4_Text_CrissyIntro, Route4_Text_CrissyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route4_EventScript_CrissyRematch + goto_if_eq VAR_RESULT, TRUE, Route4_EventScript_CrissyRematch msgbox Route4_Text_CrissyPostBattle, MSGBOX_AUTOCLOSE end @@ -118,8 +109,7 @@ Route4_EventScript_CrissyRematch:: Route24_EventScript_Timmy:: trainerbattle_single TRAINER_YOUNGSTER_TIMMY, Route24_Text_TimmyIntro, Route24_Text_TimmyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route24_EventScript_TimmyRematch + goto_if_eq VAR_RESULT, TRUE, Route24_EventScript_TimmyRematch msgbox Route24_Text_TimmyPostBattle, MSGBOX_AUTOCLOSE end @@ -131,8 +121,7 @@ Route24_EventScript_TimmyRematch:: Route24_EventScript_Cale:: trainerbattle_single TRAINER_BUG_CATCHER_CALE, Route24_Text_CaleIntro, Route24_Text_CaleDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route24_EventScript_CaleRematch + goto_if_eq VAR_RESULT, TRUE, Route24_EventScript_CaleRematch msgbox Route24_Text_CalePostBattle, MSGBOX_AUTOCLOSE end @@ -144,8 +133,7 @@ Route24_EventScript_CaleRematch:: Route24_EventScript_Reli:: trainerbattle_single TRAINER_LASS_RELI, Route24_Text_ReliIntro, Route24_Text_ReliDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route24_EventScript_ReliRematch + goto_if_eq VAR_RESULT, TRUE, Route24_EventScript_ReliRematch msgbox Route24_Text_ReliPostBattle, MSGBOX_AUTOCLOSE end @@ -157,8 +145,7 @@ Route24_EventScript_ReliRematch:: Route24_EventScript_Ali:: trainerbattle_single TRAINER_LASS_ALI, Route24_Text_AliIntro, Route24_Text_AliDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route24_EventScript_AliRematch + goto_if_eq VAR_RESULT, TRUE, Route24_EventScript_AliRematch msgbox Route24_Text_AliPostBattle, MSGBOX_AUTOCLOSE end @@ -170,8 +157,7 @@ Route24_EventScript_AliRematch:: Route24_EventScript_Shane:: trainerbattle_single TRAINER_CAMPER_SHANE, Route24_Text_ShaneIntro, Route24_Text_ShaneDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route24_EventScript_ShaneRematch + goto_if_eq VAR_RESULT, TRUE, Route24_EventScript_ShaneRematch msgbox Route24_Text_ShanePostBattle, MSGBOX_AUTOCLOSE end @@ -183,8 +169,7 @@ Route24_EventScript_ShaneRematch:: Route24_EventScript_Ethan:: trainerbattle_single TRAINER_CAMPER_ETHAN, Route24_Text_EthanIntro, Route24_Text_EthanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route24_EventScript_EthanRematch + goto_if_eq VAR_RESULT, TRUE, Route24_EventScript_EthanRematch msgbox Route24_Text_EthanPostBattle, MSGBOX_AUTOCLOSE end @@ -196,8 +181,7 @@ Route24_EventScript_EthanRematch:: Route25_EventScript_Joey:: trainerbattle_single TRAINER_YOUNGSTER_JOEY, Route25_Text_JoeyIntro, Route25_Text_JoeyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_JoeyRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_JoeyRematch msgbox Route25_Text_JoeyPostBattle, MSGBOX_AUTOCLOSE end @@ -209,8 +193,7 @@ Route25_EventScript_JoeyRematch:: Route25_EventScript_Dan:: trainerbattle_single TRAINER_YOUNGSTER_DAN, Route25_Text_DanIntro, Route25_Text_DanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_DanRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_DanRematch msgbox Route25_Text_DanPostBattle, MSGBOX_AUTOCLOSE end @@ -222,8 +205,7 @@ Route25_EventScript_DanRematch:: Route25_EventScript_Chad:: trainerbattle_single TRAINER_YOUNGSTER_CHAD, Route25_Text_ChadIntro, Route25_Text_ChadDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_ChadRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_ChadRematch msgbox Route25_Text_ChadPostBattle, MSGBOX_AUTOCLOSE end @@ -235,8 +217,7 @@ Route25_EventScript_ChadRematch:: Route25_EventScript_Kelsey:: trainerbattle_single TRAINER_PICNICKER_KELSEY, Route25_Text_KelseyIntro, Route25_Text_KelseyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_KelseyRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_KelseyRematch msgbox Route25_Text_KelseyPostBattle, MSGBOX_AUTOCLOSE end @@ -248,8 +229,7 @@ Route25_EventScript_KelseyRematch:: Route25_EventScript_Haley:: trainerbattle_single TRAINER_LASS_HALEY, Route25_Text_HaleyIntro, Route25_Text_HaleyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_HaleyRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_HaleyRematch msgbox Route25_Text_HaleyPostBattle, MSGBOX_AUTOCLOSE end @@ -261,8 +241,7 @@ Route25_EventScript_HaleyRematch:: Route25_EventScript_Franklin:: trainerbattle_single TRAINER_HIKER_FRANKLIN, Route25_Text_FranklinIntro, Route25_Text_FranklinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_FranklinRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_FranklinRematch msgbox Route25_Text_FranklinPostBattle, MSGBOX_AUTOCLOSE end @@ -274,8 +253,7 @@ Route25_EventScript_FranklinRematch:: Route25_EventScript_Nob:: trainerbattle_single TRAINER_HIKER_NOB, Route25_Text_NobIntro, Route25_Text_NobDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_NobRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_NobRematch msgbox Route25_Text_NobPostBattle, MSGBOX_AUTOCLOSE end @@ -287,8 +265,7 @@ Route25_EventScript_NobRematch:: Route25_EventScript_Wayne:: trainerbattle_single TRAINER_HIKER_WAYNE, Route25_Text_WayneIntro, Route25_Text_WayneDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_WayneRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_WayneRematch msgbox Route25_Text_WaynePostBattle, MSGBOX_AUTOCLOSE end @@ -300,8 +277,7 @@ Route25_EventScript_WayneRematch:: Route25_EventScript_Flint:: trainerbattle_single TRAINER_CAMPER_FLINT, Route25_Text_FlintIntro, Route25_Text_FlintDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route25_EventScript_FlintRematch + goto_if_eq VAR_RESULT, TRUE, Route25_EventScript_FlintRematch msgbox Route25_Text_FlintPostBattle, MSGBOX_AUTOCLOSE end @@ -313,8 +289,7 @@ Route25_EventScript_FlintRematch:: Route6_EventScript_Keigo:: trainerbattle_single TRAINER_BUG_CATCHER_KEIGO, Route6_Text_KeigoIntro, Route6_Text_KeigoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route6_EventScript_KeigoRematch + goto_if_eq VAR_RESULT, TRUE, Route6_EventScript_KeigoRematch msgbox Route6_Text_KeigoPostBattle, MSGBOX_AUTOCLOSE end @@ -326,8 +301,7 @@ Route6_EventScript_KeigoRematch:: Route6_EventScript_Elijah:: trainerbattle_single TRAINER_BUG_CATCHER_ELIJAH, Route6_Text_ElijahIntro, Route6_Text_ElijahDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route6_EventScript_ElijahRematch + goto_if_eq VAR_RESULT, TRUE, Route6_EventScript_ElijahRematch msgbox Route6_Text_ElijahPostBattle, MSGBOX_AUTOCLOSE end @@ -339,8 +313,7 @@ Route6_EventScript_ElijahRematch:: Route6_EventScript_Ricky:: trainerbattle_single TRAINER_CAMPER_RICKY, Route6_Text_RickyIntro, Route6_Text_RickyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route6_EventScript_RickyRematch + goto_if_eq VAR_RESULT, TRUE, Route6_EventScript_RickyRematch msgbox Route6_Text_RickyPostBattle, MSGBOX_AUTOCLOSE end @@ -352,8 +325,7 @@ Route6_EventScript_RickyRematch:: Route6_EventScript_Jeff:: trainerbattle_single TRAINER_CAMPER_JEFF, Route6_Text_JeffIntro, Route6_Text_JeffDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route6_EventScript_JeffRematch + goto_if_eq VAR_RESULT, TRUE, Route6_EventScript_JeffRematch msgbox Route6_Text_JeffPostBattle, MSGBOX_AUTOCLOSE end @@ -365,8 +337,7 @@ Route6_EventScript_JeffRematch:: Route6_EventScript_Nancy:: trainerbattle_single TRAINER_PICNICKER_NANCY, Route6_Text_NancyIntro, Route6_Text_NancyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route6_EventScript_NancyRematch + goto_if_eq VAR_RESULT, TRUE, Route6_EventScript_NancyRematch msgbox Route6_Text_NancyPostBattle, MSGBOX_AUTOCLOSE end @@ -378,8 +349,7 @@ Route6_EventScript_NancyRematch:: Route6_EventScript_Isabelle:: trainerbattle_single TRAINER_PICNICKER_ISABELLE, Route6_Text_IsabelleIntro, Route6_Text_IsabelleDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route6_EventScript_IsabelleRematch + goto_if_eq VAR_RESULT, TRUE, Route6_EventScript_IsabelleRematch msgbox Route6_Text_IsabellePostBattle, MSGBOX_AUTOCLOSE end @@ -391,8 +361,7 @@ Route6_EventScript_IsabelleRematch:: Route11_EventScript_Eddie:: trainerbattle_single TRAINER_YOUNGSTER_EDDIE, Route11_Text_EddieIntro, Route11_Text_EddieDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_EddieRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_EddieRematch msgbox Route11_Text_EddiePostBattle, MSGBOX_AUTOCLOSE end @@ -404,8 +373,7 @@ Route11_EventScript_EddieRematch:: Route11_EventScript_Dillon:: trainerbattle_single TRAINER_YOUNGSTER_DILLON, Route11_Text_DillonIntro, Route11_Text_DillonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_DillonRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_DillonRematch msgbox Route11_Text_DillonPostBattle, MSGBOX_AUTOCLOSE end @@ -417,8 +385,7 @@ Route11_EventScript_DillonRematch:: Route11_EventScript_Yasu:: trainerbattle_single TRAINER_YOUNGSTER_YASU, Route11_Text_YasuIntro, Route11_Text_YasuDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_YasuRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_YasuRematch msgbox Route11_Text_YasuPostBattle, MSGBOX_AUTOCLOSE end @@ -430,8 +397,7 @@ Route11_EventScript_YasuRematch:: Route11_EventScript_Dave:: trainerbattle_single TRAINER_YOUNGSTER_DAVE, Route11_Text_DaveIntro, Route11_Text_DaveDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_DaveRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_DaveRematch msgbox Route11_Text_DavePostBattle, MSGBOX_AUTOCLOSE end @@ -443,8 +409,7 @@ Route11_EventScript_DaveRematch:: Route11_EventScript_Braxton:: trainerbattle_single TRAINER_ENGINEER_BRAXTON, Route11_Text_BraxtonIntro, Route11_Text_BraxtonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_BraxtonRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_BraxtonRematch msgbox Route11_Text_BraxtonPostBattle, MSGBOX_AUTOCLOSE end @@ -456,8 +421,7 @@ Route11_EventScript_BraxtonRematch:: Route11_EventScript_Bernie:: trainerbattle_single TRAINER_ENGINEER_BERNIE, Route11_Text_BernieIntro, Route11_Text_BernieDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_BernieRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_BernieRematch msgbox Route11_Text_BerniePostBattle, MSGBOX_AUTOCLOSE end @@ -469,8 +433,7 @@ Route11_EventScript_BernieRematch:: Route11_EventScript_Hugo:: trainerbattle_single TRAINER_GAMER_HUGO, Route11_Text_HugoIntro, Route11_Text_HugoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_HugoRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_HugoRematch msgbox Route11_Text_HugoPostBattle, MSGBOX_AUTOCLOSE end @@ -482,8 +445,7 @@ Route11_EventScript_HugoRematch:: Route11_EventScript_Jasper:: trainerbattle_single TRAINER_GAMER_JASPER, Route11_Text_JasperIntro, Route11_Text_JasperDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_JasperRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_JasperRematch msgbox Route11_Text_JasperPostBattle, MSGBOX_AUTOCLOSE end @@ -495,8 +457,7 @@ Route11_EventScript_JasperRematch:: Route11_EventScript_Dirk:: trainerbattle_single TRAINER_GAMER_DIRK, Route11_Text_DirkIntro, Route11_Text_DirkDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_DirkRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_DirkRematch msgbox Route11_Text_DirkPostBattle, MSGBOX_AUTOCLOSE end @@ -508,8 +469,7 @@ Route11_EventScript_DirkRematch:: Route11_EventScript_Darian:: trainerbattle_single TRAINER_GAMER_DARIAN, Route11_Text_DarianIntro, Route11_Text_DarianDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route11_EventScript_DarianRematch + goto_if_eq VAR_RESULT, TRUE, Route11_EventScript_DarianRematch msgbox Route11_Text_DarianPostBattle, MSGBOX_AUTOCLOSE end @@ -521,8 +481,7 @@ Route11_EventScript_DarianRematch:: Route9_EventScript_Brent:: trainerbattle_single TRAINER_BUG_CATCHER_BRENT, Route9_Text_BrentIntro, Route9_Text_BrentDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_BrentRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_BrentRematch msgbox Route9_Text_BrentPostBattle, MSGBOX_AUTOCLOSE end @@ -534,8 +493,7 @@ Route9_EventScript_BrentRematch:: Route9_EventScript_Conner:: trainerbattle_single TRAINER_BUG_CATCHER_CONNER, Route9_Text_ConnerIntro, Route9_Text_ConnerDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_ConnerRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_ConnerRematch msgbox Route9_Text_ConnerPostBattle, MSGBOX_AUTOCLOSE end @@ -547,8 +505,7 @@ Route9_EventScript_ConnerRematch:: Route9_EventScript_Chris:: trainerbattle_single TRAINER_CAMPER_CHRIS, Route9_Text_ChrisIntro, Route9_Text_ChrisDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_ChrisRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_ChrisRematch msgbox Route9_Text_ChrisPostBattle, MSGBOX_AUTOCLOSE end @@ -560,8 +517,7 @@ Route9_EventScript_ChrisRematch:: Route9_EventScript_Drew:: trainerbattle_single TRAINER_CAMPER_DREW, Route9_Text_DrewIntro, Route9_Text_DrewDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_DrewRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_DrewRematch msgbox Route9_Text_DrewPostBattle, MSGBOX_AUTOCLOSE end @@ -573,8 +529,7 @@ Route9_EventScript_DrewRematch:: Route9_EventScript_Alicia:: trainerbattle_single TRAINER_PICNICKER_ALICIA, Route9_Text_AliciaIntro, Route9_Text_AliciaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_AliciaRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_AliciaRematch msgbox Route9_Text_AliciaPostBattle, MSGBOX_AUTOCLOSE end @@ -586,8 +541,7 @@ Route9_EventScript_AliciaRematch:: Route9_EventScript_Caitlin:: trainerbattle_single TRAINER_PICNICKER_CAITLIN, Route9_Text_CaitlinIntro, Route9_Text_CaitlinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_CaitlinRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_CaitlinRematch msgbox Route9_Text_CaitlinPostBattle, MSGBOX_AUTOCLOSE end @@ -599,8 +553,7 @@ Route9_EventScript_CaitlinRematch:: Route9_EventScript_Alan:: trainerbattle_single TRAINER_HIKER_ALAN, Route9_Text_AlanIntro, Route9_Text_AlanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_AlanRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_AlanRematch msgbox Route9_Text_AlanPostBattle, MSGBOX_AUTOCLOSE end @@ -612,8 +565,7 @@ Route9_EventScript_AlanRematch:: Route9_EventScript_Brice:: trainerbattle_single TRAINER_HIKER_BRICE, Route9_Text_BriceIntro, Route9_Text_BriceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_BriceRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_BriceRematch msgbox Route9_Text_BricePostBattle, MSGBOX_AUTOCLOSE end @@ -625,8 +577,7 @@ Route9_EventScript_BriceRematch:: Route9_EventScript_Jeremy:: trainerbattle_single TRAINER_HIKER_JEREMY, Route9_Text_JeremyIntro, Route9_Text_JeremyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route9_EventScript_JeremyRematch + goto_if_eq VAR_RESULT, TRUE, Route9_EventScript_JeremyRematch msgbox Route9_Text_JeremyPostBattle, MSGBOX_AUTOCLOSE end @@ -638,8 +589,7 @@ Route9_EventScript_JeremyRematch:: Route10_EventScript_Heidi:: trainerbattle_single TRAINER_PICNICKER_HEIDI, Route10_Text_HeidiIntro, Route10_Text_HeidiDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route10_EventScript_HeidiRematch + goto_if_eq VAR_RESULT, TRUE, Route10_EventScript_HeidiRematch msgbox Route10_Text_HeidiPostBattle, MSGBOX_AUTOCLOSE end @@ -651,8 +601,7 @@ Route10_EventScript_HeidiRematch:: Route10_EventScript_Carol:: trainerbattle_single TRAINER_PICNICKER_CAROL, Route10_Text_CarolIntro, Route10_Text_CarolDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route10_EventScript_CarolRematch + goto_if_eq VAR_RESULT, TRUE, Route10_EventScript_CarolRematch msgbox Route10_Text_CarolPostBattle, MSGBOX_AUTOCLOSE end @@ -664,8 +613,7 @@ Route10_EventScript_CarolRematch:: Route10_EventScript_Mark:: trainerbattle_single TRAINER_POKEMANIAC_MARK, Route10_Text_MarkIntro, Route10_Text_MarkDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route10_EventScript_MarkRematch + goto_if_eq VAR_RESULT, TRUE, Route10_EventScript_MarkRematch msgbox Route10_Text_MarkPostBattle, MSGBOX_AUTOCLOSE end @@ -677,8 +625,7 @@ Route10_EventScript_MarkRematch:: Route10_EventScript_Herman:: trainerbattle_single TRAINER_POKEMANIAC_HERMAN, Route10_Text_HermanIntro, Route10_Text_HermanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route10_EventScript_HermanRematch + goto_if_eq VAR_RESULT, TRUE, Route10_EventScript_HermanRematch msgbox Route10_Text_HermanPostBattle, MSGBOX_AUTOCLOSE end @@ -690,8 +637,7 @@ Route10_EventScript_HermanRematch:: Route10_EventScript_Clark:: trainerbattle_single TRAINER_HIKER_CLARK, Route10_Text_ClarkIntro, Route10_Text_ClarkDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route10_EventScript_ClarkRematch + goto_if_eq VAR_RESULT, TRUE, Route10_EventScript_ClarkRematch msgbox Route10_Text_ClarkPostBattle, MSGBOX_AUTOCLOSE end @@ -703,8 +649,7 @@ Route10_EventScript_ClarkRematch:: Route10_EventScript_Trent:: trainerbattle_single TRAINER_HIKER_TRENT, Route10_Text_TrentIntro, Route10_Text_TrentDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route10_EventScript_TrentRematch + goto_if_eq VAR_RESULT, TRUE, Route10_EventScript_TrentRematch msgbox Route10_Text_TrentPostBattle, MSGBOX_AUTOCLOSE end @@ -716,8 +661,7 @@ Route10_EventScript_TrentRematch:: Route8_EventScript_Paige:: trainerbattle_single TRAINER_LASS_PAIGE, Route8_Text_PaigeIntro, Route8_Text_PaigeDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_PaigeRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_PaigeRematch msgbox Route8_Text_PaigePostBattle, MSGBOX_AUTOCLOSE end @@ -729,8 +673,7 @@ Route8_EventScript_PaigeRematch:: Route8_EventScript_Andrea:: trainerbattle_single TRAINER_LASS_ANDREA, Route8_Text_AndreaIntro, Route8_Text_AndreaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_AndreaRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_AndreaRematch msgbox Route8_Text_AndreaPostBattle, MSGBOX_AUTOCLOSE end @@ -742,8 +685,7 @@ Route8_EventScript_AndreaRematch:: Route8_EventScript_Megan:: trainerbattle_single TRAINER_LASS_MEGAN, Route8_Text_MeganIntro, Route8_Text_MeganDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_MeganRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_MeganRematch msgbox Route8_Text_MeganPostBattle, MSGBOX_AUTOCLOSE end @@ -755,8 +697,7 @@ Route8_EventScript_MeganRematch:: Route8_EventScript_Julia:: trainerbattle_single TRAINER_LASS_JULIA, Route8_Text_JuliaIntro, Route8_Text_JuliaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_JuliaRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_JuliaRematch msgbox Route8_Text_JuliaPostBattle, MSGBOX_AUTOCLOSE end @@ -768,8 +709,7 @@ Route8_EventScript_JuliaRematch:: Route8_EventScript_Aidan:: trainerbattle_single TRAINER_SUPER_NERD_AIDAN, Route8_Text_AidanIntro, Route8_Text_AidanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_AidanRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_AidanRematch msgbox Route8_Text_AidanPostBattle, MSGBOX_AUTOCLOSE end @@ -781,8 +721,7 @@ Route8_EventScript_AidanRematch:: Route8_EventScript_Glenn:: trainerbattle_single TRAINER_SUPER_NERD_GLENN, Route8_Text_GlennIntro, Route8_Text_GlennDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_GlennRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_GlennRematch msgbox Route8_Text_GlennPostBattle, MSGBOX_AUTOCLOSE end @@ -794,8 +733,7 @@ Route8_EventScript_GlennRematch:: Route8_EventScript_Leslie:: trainerbattle_single TRAINER_SUPER_NERD_LESLIE, Route8_Text_LeslieIntro, Route8_Text_LeslieDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_LeslieRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_LeslieRematch msgbox Route8_Text_LesliePostBattle, MSGBOX_AUTOCLOSE end @@ -807,8 +745,7 @@ Route8_EventScript_LeslieRematch:: Route8_EventScript_Stan:: trainerbattle_single TRAINER_GAMER_STAN, Route8_Text_StanIntro, Route8_Text_StanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_StanRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_StanRematch msgbox Route8_Text_StanPostBattle, MSGBOX_AUTOCLOSE end @@ -820,8 +757,7 @@ Route8_EventScript_StanRematch:: Route8_EventScript_Rich:: trainerbattle_single TRAINER_GAMER_RICH, Route8_Text_RichIntro, Route8_Text_RichDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_RichRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_RichRematch msgbox Route8_Text_RichPostBattle, MSGBOX_AUTOCLOSE end @@ -833,8 +769,7 @@ Route8_EventScript_RichRematch:: Route8_EventScript_Eli:: trainerbattle_double TRAINER_TWINS_ELI_ANNE, Route8_Text_EliIntro, Route8_Text_EliDefeat, Route8_Text_EliNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_EliRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_EliRematch msgbox Route8_Text_EliPostBattle, MSGBOX_AUTOCLOSE end @@ -846,8 +781,7 @@ Route8_EventScript_EliRematch:: Route8_EventScript_Anne:: trainerbattle_double TRAINER_TWINS_ELI_ANNE, Route8_Text_AnneIntro, Route8_Text_AnneDefeat, Route8_Text_AnneNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_AnneRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_AnneRematch msgbox Route8_Text_AnnePostBattle, MSGBOX_AUTOCLOSE end @@ -859,8 +793,7 @@ Route8_EventScript_AnneRematch:: Route8_EventScript_Ricardo:: trainerbattle_single TRAINER_BIKER_RICARDO, Route8_Text_RicardoIntro, Route8_Text_RicardoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_RicardoRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_RicardoRematch msgbox Route8_Text_RicardoPostBattle, MSGBOX_AUTOCLOSE end @@ -872,8 +805,7 @@ Route8_EventScript_RicardoRematch:: Route8_EventScript_Jaren:: trainerbattle_single TRAINER_BIKER_JAREN, Route8_Text_JarenIntro, Route8_Text_JarenDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route8_EventScript_JarenRematch + goto_if_eq VAR_RESULT, TRUE, Route8_EventScript_JarenRematch msgbox Route8_Text_JarenPostBattle, MSGBOX_AUTOCLOSE end @@ -885,8 +817,7 @@ Route8_EventScript_JarenRematch:: Route12_EventScript_Ned:: trainerbattle_single TRAINER_FISHERMAN_NED, Route12_Text_NedIntro, Route12_Text_NedDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_NedRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_NedRematch msgbox Route12_Text_NedPostBattle, MSGBOX_AUTOCLOSE end @@ -898,8 +829,7 @@ Route12_EventScript_NedRematch:: Route12_EventScript_Chip:: trainerbattle_single TRAINER_FISHERMAN_CHIP, Route12_Text_ChipIntro, Route12_Text_ChipDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_ChipRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_ChipRematch msgbox Route12_Text_ChipPostBattle, MSGBOX_AUTOCLOSE end @@ -911,8 +841,7 @@ Route12_EventScript_ChipRematch:: Route12_EventScript_Hank:: trainerbattle_single TRAINER_FISHERMAN_HANK, Route12_Text_HankIntro, Route12_Text_HankDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_HankRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_HankRematch msgbox Route12_Text_HankPostBattle, MSGBOX_AUTOCLOSE end @@ -924,8 +853,7 @@ Route12_EventScript_HankRematch:: Route12_EventScript_Elliot:: trainerbattle_single TRAINER_FISHERMAN_ELLIOT, Route12_Text_ElliotIntro, Route12_Text_ElliotDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_ElliotRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_ElliotRematch msgbox Route12_Text_ElliotPostBattle, MSGBOX_AUTOCLOSE end @@ -937,8 +865,7 @@ Route12_EventScript_ElliotRematch:: Route12_EventScript_Andrew:: trainerbattle_single TRAINER_FISHERMAN_ANDREW, Route12_Text_AndrewIntro, Route12_Text_AndrewDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_AndrewRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_AndrewRematch msgbox Route12_Text_AndrewPostBattle, MSGBOX_AUTOCLOSE end @@ -950,8 +877,7 @@ Route12_EventScript_AndrewRematch:: Route12_EventScript_Luca:: trainerbattle_single TRAINER_ROCKER_LUCA, Route12_Text_LucaIntro, Route12_Text_LucaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_LucaRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_LucaRematch msgbox Route12_Text_LucaPostBattle, MSGBOX_AUTOCLOSE end @@ -963,8 +889,7 @@ Route12_EventScript_LucaRematch:: Route12_EventScript_Justin:: trainerbattle_single TRAINER_CAMPER_JUSTIN, Route12_Text_JustinIntro, Route12_Text_JustinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_JustinRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_JustinRematch msgbox Route12_Text_JustinPostBattle, MSGBOX_AUTOCLOSE end @@ -976,8 +901,7 @@ Route12_EventScript_JustinRematch:: Route12_EventScript_Jes:: trainerbattle_double TRAINER_YOUNG_COUPLE_GIA_JES, Route12_Text_JesIntro, Route12_Text_JesDefeat, Route12_Text_JesNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_JesRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_JesRematch msgbox Route12_Text_JesPostBattle, MSGBOX_AUTOCLOSE end @@ -989,8 +913,7 @@ Route12_EventScript_JesRematch:: Route12_EventScript_Gia:: trainerbattle_double TRAINER_YOUNG_COUPLE_GIA_JES, Route12_Text_GiaIntro, Route12_Text_GiaDefeat, Route12_Text_GiaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route12_EventScript_GiaRematch + goto_if_eq VAR_RESULT, TRUE, Route12_EventScript_GiaRematch msgbox Route12_Text_GiaPostBattle, MSGBOX_AUTOCLOSE end @@ -1002,8 +925,7 @@ Route12_EventScript_GiaRematch:: Route13_EventScript_Jared:: trainerbattle_single TRAINER_BIKER_JARED, Route13_Text_JaredIntro, Route13_Text_JaredDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_JaredRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_JaredRematch msgbox Route13_Text_JaredPostBattle, MSGBOX_AUTOCLOSE end @@ -1015,8 +937,7 @@ Route13_EventScript_JaredRematch:: Route13_EventScript_Lola:: trainerbattle_single TRAINER_BEAUTY_LOLA, Route13_Text_LolaIntro, Route13_Text_LolaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_LolaRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_LolaRematch msgbox Route13_Text_LolaPostBattle, MSGBOX_AUTOCLOSE end @@ -1028,8 +949,7 @@ Route13_EventScript_LolaRematch:: Route13_EventScript_Sheila:: trainerbattle_single TRAINER_BEAUTY_SHEILA, Route13_Text_SheilaIntro, Route13_Text_SheilaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_SheilaRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_SheilaRematch msgbox Route13_Text_SheilaPostBattle, MSGBOX_AUTOCLOSE end @@ -1041,8 +961,7 @@ Route13_EventScript_SheilaRematch:: Route13_EventScript_Sebastian:: trainerbattle_single TRAINER_BIRD_KEEPER_SEBASTIAN, Route13_Text_SebastianIntro, Route13_Text_SebastianDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_SebastianRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_SebastianRematch msgbox Route13_Text_SebastianPostBattle, MSGBOX_AUTOCLOSE end @@ -1054,8 +973,7 @@ Route13_EventScript_SebastianRematch:: Route13_EventScript_Perry:: trainerbattle_single TRAINER_BIRD_KEEPER_PERRY, Route13_Text_PerryIntro, Route13_Text_PerryDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_PerryRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_PerryRematch msgbox Route13_Text_PerryPostBattle, MSGBOX_AUTOCLOSE end @@ -1067,8 +985,7 @@ Route13_EventScript_PerryRematch:: Route13_EventScript_Robert:: trainerbattle_single TRAINER_BIRD_KEEPER_ROBERT, Route13_Text_RobertIntro, Route13_Text_RobertDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_RobertRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_RobertRematch msgbox Route13_Text_RobertPostBattle, MSGBOX_AUTOCLOSE end @@ -1080,8 +997,7 @@ Route13_EventScript_RobertRematch:: Route13_EventScript_Alma:: trainerbattle_single TRAINER_PICNICKER_ALMA, Route13_Text_AlmaIntro, Route13_Text_AlmaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_AlmaRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_AlmaRematch msgbox Route13_Text_AlmaPostBattle, MSGBOX_AUTOCLOSE end @@ -1093,8 +1009,7 @@ Route13_EventScript_AlmaRematch:: Route13_EventScript_Susie:: trainerbattle_single TRAINER_PICNICKER_SUSIE, Route13_Text_SusieIntro, Route13_Text_SusieDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_SusieRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_SusieRematch msgbox Route13_Text_SusiePostBattle, MSGBOX_AUTOCLOSE end @@ -1106,8 +1021,7 @@ Route13_EventScript_SusieRematch:: Route13_EventScript_Valerie:: trainerbattle_single TRAINER_PICNICKER_VALERIE, Route13_Text_ValerieIntro, Route13_Text_ValerieDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_ValerieRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_ValerieRematch msgbox Route13_Text_ValeriePostBattle, MSGBOX_AUTOCLOSE end @@ -1119,8 +1033,7 @@ Route13_EventScript_ValerieRematch:: Route13_EventScript_Gwen:: trainerbattle_single TRAINER_PICNICKER_GWEN, Route13_Text_GwenIntro, Route13_Text_GwenDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route13_EventScript_GwenRematch + goto_if_eq VAR_RESULT, TRUE, Route13_EventScript_GwenRematch msgbox Route13_Text_GwenPostBattle, MSGBOX_AUTOCLOSE end @@ -1132,8 +1045,7 @@ Route13_EventScript_GwenRematch:: Route14_EventScript_Malik:: trainerbattle_single TRAINER_BIKER_MALIK, Route14_Text_MalikIntro, Route14_Text_MalikDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_MalikRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_MalikRematch msgbox Route14_Text_MalikPostBattle, MSGBOX_AUTOCLOSE end @@ -1145,8 +1057,7 @@ Route14_EventScript_MalikRematch:: Route14_EventScript_Lukas:: trainerbattle_single TRAINER_BIKER_LUKAS, Route14_Text_LukasIntro, Route14_Text_LukasDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_LukasRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_LukasRematch msgbox Route14_Text_LukasPostBattle, MSGBOX_AUTOCLOSE end @@ -1158,8 +1069,7 @@ Route14_EventScript_LukasRematch:: Route14_EventScript_Isaac:: trainerbattle_single TRAINER_BIKER_ISAAC, Route14_Text_IsaacIntro, Route14_Text_IsaacDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_IsaacRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_IsaacRematch msgbox Route14_Text_IsaacPostBattle, MSGBOX_AUTOCLOSE end @@ -1171,8 +1081,7 @@ Route14_EventScript_IsaacRematch:: Route14_EventScript_Gerald:: trainerbattle_single TRAINER_BIKER_GERALD, Route14_Text_GeraldIntro, Route14_Text_GeraldDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_GeraldRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_GeraldRematch msgbox Route14_Text_GeraldPostBattle, MSGBOX_AUTOCLOSE end @@ -1184,8 +1093,7 @@ Route14_EventScript_GeraldRematch:: Route14_EventScript_Donald:: trainerbattle_single TRAINER_BIRD_KEEPER_DONALD, Route14_Text_DonaldIntro, Route14_Text_DonaldDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_DonaldRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_DonaldRematch msgbox Route14_Text_DonaldPostBattle, MSGBOX_AUTOCLOSE end @@ -1197,8 +1105,7 @@ Route14_EventScript_DonaldRematch:: Route14_EventScript_Benny:: trainerbattle_single TRAINER_BIRD_KEEPER_BENNY, Route14_Text_BennyIntro, Route14_Text_BennyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_BennyRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_BennyRematch msgbox Route14_Text_BennyPostBattle, MSGBOX_AUTOCLOSE end @@ -1210,8 +1117,7 @@ Route14_EventScript_BennyRematch:: Route14_EventScript_Carter:: trainerbattle_single TRAINER_BIRD_KEEPER_CARTER, Route14_Text_CarterIntro, Route14_Text_CarterDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_CarterRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_CarterRematch msgbox Route14_Text_CarterPostBattle, MSGBOX_AUTOCLOSE end @@ -1223,8 +1129,7 @@ Route14_EventScript_CarterRematch:: Route14_EventScript_Mitch:: trainerbattle_single TRAINER_BIRD_KEEPER_MITCH, Route14_Text_MitchIntro, Route14_Text_MitchDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_MitchRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_MitchRematch msgbox Route14_Text_MitchPostBattle, MSGBOX_AUTOCLOSE end @@ -1236,8 +1141,7 @@ Route14_EventScript_MitchRematch:: Route14_EventScript_Beck:: trainerbattle_single TRAINER_BIRD_KEEPER_BECK, Route14_Text_BeckIntro, Route14_Text_BeckDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_BeckRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_BeckRematch msgbox Route14_Text_BeckPostBattle, MSGBOX_AUTOCLOSE end @@ -1249,8 +1153,7 @@ Route14_EventScript_BeckRematch:: Route14_EventScript_Marlon:: trainerbattle_single TRAINER_BIRD_KEEPER_MARLON, Route14_Text_MarlonIntro, Route14_Text_MarlonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_MarlonRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_MarlonRematch msgbox Route14_Text_MarlonPostBattle, MSGBOX_AUTOCLOSE end @@ -1262,8 +1165,7 @@ Route14_EventScript_MarlonRematch:: Route14_EventScript_Kiri:: trainerbattle_double TRAINER_TWINS_KIRI_JAN, Route14_Text_KiriIntro, Route14_Text_KiriDefeat, Route14_Text_KiriNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_KiriRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_KiriRematch msgbox Route14_Text_KiriPostBattle, MSGBOX_AUTOCLOSE end @@ -1275,8 +1177,7 @@ Route14_EventScript_KiriRematch:: Route14_EventScript_Jan:: trainerbattle_double TRAINER_TWINS_KIRI_JAN, Route14_Text_JanIntro, Route14_Text_JanDefeat, Route14_Text_JanNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route14_EventScript_JanRematch + goto_if_eq VAR_RESULT, TRUE, Route14_EventScript_JanRematch msgbox Route14_Text_JanPostBattle, MSGBOX_AUTOCLOSE end @@ -1288,8 +1189,7 @@ Route14_EventScript_JanRematch:: Route15_EventScript_Ernest:: trainerbattle_single TRAINER_BIKER_ERNEST, Route15_Text_ErnestIntro, Route15_Text_ErnestDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_ErnestRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_ErnestRematch msgbox Route15_Text_ErnestPostBattle, MSGBOX_AUTOCLOSE end @@ -1301,8 +1201,7 @@ Route15_EventScript_ErnestRematch:: Route15_EventScript_Alex:: trainerbattle_single TRAINER_BIKER_ALEX, Route15_Text_AlexIntro, Route15_Text_AlexDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_AlexRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_AlexRematch msgbox Route15_Text_AlexPostBattle, MSGBOX_AUTOCLOSE end @@ -1314,8 +1213,7 @@ Route15_EventScript_AlexRematch:: Route15_EventScript_Grace:: trainerbattle_single TRAINER_BEAUTY_GRACE, Route15_Text_GraceIntro, Route15_Text_GraceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_GraceRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_GraceRematch msgbox Route15_Text_GracePostBattle, MSGBOX_AUTOCLOSE end @@ -1327,8 +1225,7 @@ Route15_EventScript_GraceRematch:: Route15_EventScript_Olivia:: trainerbattle_single TRAINER_BEAUTY_OLIVIA, Route15_Text_OliviaIntro, Route15_Text_OliviaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_OliviaRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_OliviaRematch msgbox Route15_Text_OliviaPostBattle, MSGBOX_AUTOCLOSE end @@ -1340,8 +1237,7 @@ Route15_EventScript_OliviaRematch:: Route15_EventScript_Edwin:: trainerbattle_single TRAINER_BIRD_KEEPER_EDWIN, Route15_Text_EdwinIntro, Route15_Text_EdwinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_EdwinRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_EdwinRematch msgbox Route15_Text_EdwinPostBattle, MSGBOX_AUTOCLOSE end @@ -1353,8 +1249,7 @@ Route15_EventScript_EdwinRematch:: Route15_EventScript_Chester:: trainerbattle_single TRAINER_BIRD_KEEPER_CHESTER, Route15_Text_ChesterIntro, Route15_Text_ChesterDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_ChesterRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_ChesterRematch msgbox Route15_Text_ChesterPostBattle, MSGBOX_AUTOCLOSE end @@ -1366,8 +1261,7 @@ Route15_EventScript_ChesterRematch:: Route15_EventScript_Yazmin:: trainerbattle_single TRAINER_PICNICKER_YAZMIN, Route15_Text_YazminIntro, Route15_Text_YazminDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_YazminRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_YazminRematch msgbox Route15_Text_YazminPostBattle, MSGBOX_AUTOCLOSE end @@ -1379,8 +1273,7 @@ Route15_EventScript_YazminRematch:: Route15_EventScript_Kindra:: trainerbattle_single TRAINER_PICNICKER_KINDRA, Route15_Text_KindraIntro, Route15_Text_KindraDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_KindraRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_KindraRematch msgbox Route15_Text_KindraPostBattle, MSGBOX_AUTOCLOSE end @@ -1392,8 +1285,7 @@ Route15_EventScript_KindraRematch:: Route15_EventScript_Becky:: trainerbattle_single TRAINER_PICNICKER_BECKY, Route15_Text_BeckyIntro, Route15_Text_BeckyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_BeckyRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_BeckyRematch msgbox Route15_Text_BeckyPostBattle, MSGBOX_AUTOCLOSE end @@ -1405,8 +1297,7 @@ Route15_EventScript_BeckyRematch:: Route15_EventScript_Celia:: trainerbattle_single TRAINER_PICNICKER_CELIA, Route15_Text_CeliaIntro, Route15_Text_CeliaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_CeliaRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_CeliaRematch msgbox Route15_Text_CeliaPostBattle, MSGBOX_AUTOCLOSE end @@ -1418,8 +1309,7 @@ Route15_EventScript_CeliaRematch:: Route15_EventScript_Mya:: trainerbattle_double TRAINER_CRUSH_KIN_RON_MYA, Route15_Text_MyaIntro, Route15_Text_MyaDefeat, Route15_Text_MyaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_MyaRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_MyaRematch msgbox Route15_Text_MyaPostBattle, MSGBOX_AUTOCLOSE end @@ -1431,8 +1321,7 @@ Route15_EventScript_MyaRematch:: Route15_EventScript_Ron:: trainerbattle_double TRAINER_CRUSH_KIN_RON_MYA, Route15_Text_RonIntro, Route15_Text_RonDefeat, Route15_Text_RonNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route15_EventScript_RonRematch + goto_if_eq VAR_RESULT, TRUE, Route15_EventScript_RonRematch msgbox Route15_Text_RonPostBattle, MSGBOX_AUTOCLOSE end @@ -1444,8 +1333,7 @@ Route15_EventScript_RonRematch:: Route16_EventScript_Lao:: trainerbattle_single TRAINER_BIKER_LAO, Route16_Text_LaoIntro, Route16_Text_LaoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_LaoRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_LaoRematch msgbox Route16_Text_LaoPostBattle, MSGBOX_AUTOCLOSE end @@ -1457,8 +1345,7 @@ Route16_EventScript_LaoRematch:: Route16_EventScript_Hideo:: trainerbattle_single TRAINER_BIKER_HIDEO, Route16_Text_HideoIntro, Route16_Text_HideoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_HideoRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_HideoRematch msgbox Route16_Text_HideoPostBattle, MSGBOX_AUTOCLOSE end @@ -1470,8 +1357,7 @@ Route16_EventScript_HideoRematch:: Route16_EventScript_Ruben:: trainerbattle_single TRAINER_BIKER_RUBEN, Route16_Text_RubenIntro, Route16_Text_RubenDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_RubenRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_RubenRematch msgbox Route16_Text_RubenPostBattle, MSGBOX_AUTOCLOSE end @@ -1483,8 +1369,7 @@ Route16_EventScript_RubenRematch:: Route16_EventScript_Koji:: trainerbattle_single TRAINER_CUE_BALL_KOJI, Route16_Text_KojiIntro, Route16_Text_KojiDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_KojiRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_KojiRematch msgbox Route16_Text_KojiPostBattle, MSGBOX_AUTOCLOSE end @@ -1496,8 +1381,7 @@ Route16_EventScript_KojiRematch:: Route16_EventScript_Luke:: trainerbattle_single TRAINER_CUE_BALL_LUKE, Route16_Text_LukeIntro, Route16_Text_LukeDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_LukeRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_LukeRematch msgbox Route16_Text_LukePostBattle, MSGBOX_AUTOCLOSE end @@ -1509,8 +1393,7 @@ Route16_EventScript_LukeRematch:: Route16_EventScript_Camron:: trainerbattle_single TRAINER_CUE_BALL_CAMRON, Route16_Text_CamronIntro, Route16_Text_CamronDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_CamronRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_CamronRematch msgbox Route16_Text_CamronPostBattle, MSGBOX_AUTOCLOSE end @@ -1522,8 +1405,7 @@ Route16_EventScript_CamronRematch:: Route16_EventScript_Jed:: trainerbattle_double TRAINER_YOUNG_COUPLE_LEA_JED, Route16_Text_JedIntro, Route16_Text_JedDefeat, Route16_Text_JedNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_JedRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_JedRematch msgbox Route16_Text_JedPostBattle, MSGBOX_AUTOCLOSE end @@ -1535,8 +1417,7 @@ Route16_EventScript_JedRematch:: Route16_EventScript_Lea:: trainerbattle_double TRAINER_YOUNG_COUPLE_LEA_JED, Route16_Text_LeaIntro, Route16_Text_LeaDefeat, Route16_Text_LeaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route16_EventScript_LeaRematch + goto_if_eq VAR_RESULT, TRUE, Route16_EventScript_LeaRematch msgbox Route16_Text_LeaPostBattle, MSGBOX_AUTOCLOSE end @@ -1548,8 +1429,7 @@ Route16_EventScript_LeaRematch:: Route17_EventScript_Billy:: trainerbattle_single TRAINER_BIKER_BILLY, Route17_Text_BillyIntro, Route17_Text_BillyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_BillyRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_BillyRematch msgbox Route17_Text_BillyPostBattle, MSGBOX_AUTOCLOSE end @@ -1561,8 +1441,7 @@ Route17_EventScript_BillyRematch:: Route17_EventScript_Nikolas:: trainerbattle_single TRAINER_BIKER_NIKOLAS, Route17_Text_NikolasIntro, Route17_Text_NikolasDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_NikolasRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_NikolasRematch msgbox Route17_Text_NikolasPostBattle, MSGBOX_AUTOCLOSE end @@ -1574,8 +1453,7 @@ Route17_EventScript_NikolasRematch:: Route17_EventScript_Jaxon:: trainerbattle_single TRAINER_BIKER_JAXON, Route17_Text_JaxonIntro, Route17_Text_JaxonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_JaxonRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_JaxonRematch msgbox Route17_Text_JaxonPostBattle, MSGBOX_AUTOCLOSE end @@ -1587,8 +1465,7 @@ Route17_EventScript_JaxonRematch:: Route17_EventScript_William:: trainerbattle_single TRAINER_BIKER_WILLIAM, Route17_Text_WilliamIntro, Route17_Text_WilliamDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_WilliamRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_WilliamRematch msgbox Route17_Text_WilliamPostBattle, MSGBOX_AUTOCLOSE end @@ -1600,8 +1477,7 @@ Route17_EventScript_WilliamRematch:: Route17_EventScript_Raul:: trainerbattle_single TRAINER_CUE_BALL_RAUL, Route17_Text_RaulIntro, Route17_Text_RaulDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_RaulRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_RaulRematch msgbox Route17_Text_RaulPostBattle, MSGBOX_AUTOCLOSE end @@ -1613,8 +1489,7 @@ Route17_EventScript_RaulRematch:: Route17_EventScript_Isaiah:: trainerbattle_single TRAINER_CUE_BALL_ISAIAH, Route17_Text_IsaiahIntro, Route17_Text_IsaiahDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_IsaiahRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_IsaiahRematch msgbox Route17_Text_IsaiahPostBattle, MSGBOX_AUTOCLOSE end @@ -1626,8 +1501,7 @@ Route17_EventScript_IsaiahRematch:: Route17_EventScript_Zeek:: trainerbattle_single TRAINER_CUE_BALL_ZEEK, Route17_Text_ZeekIntro, Route17_Text_ZeekDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_ZeekRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_ZeekRematch msgbox Route17_Text_ZeekPostBattle, MSGBOX_AUTOCLOSE end @@ -1639,8 +1513,7 @@ Route17_EventScript_ZeekRematch:: Route17_EventScript_Jamal:: trainerbattle_single TRAINER_CUE_BALL_JAMAL, Route17_Text_JamalIntro, Route17_Text_JamalDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_JamalRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_JamalRematch msgbox Route17_Text_JamalPostBattle, MSGBOX_AUTOCLOSE end @@ -1652,8 +1525,7 @@ Route17_EventScript_JamalRematch:: Route17_EventScript_Corey:: trainerbattle_single TRAINER_CUE_BALL_COREY, Route17_Text_CoreyIntro, Route17_Text_CoreyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_CoreyRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_CoreyRematch msgbox Route17_Text_CoreyPostBattle, MSGBOX_AUTOCLOSE end @@ -1665,8 +1537,7 @@ Route17_EventScript_CoreyRematch:: Route17_EventScript_Virgil:: trainerbattle_single TRAINER_BIKER_VIRGIL, Route17_Text_VirgilIntro, Route17_Text_VirgilDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route17_EventScript_VirgilRematch + goto_if_eq VAR_RESULT, TRUE, Route17_EventScript_VirgilRematch msgbox Route17_Text_VirgilPostBattle, MSGBOX_AUTOCLOSE end @@ -1678,8 +1549,7 @@ Route17_EventScript_VirgilRematch:: Route18_EventScript_Wilton:: trainerbattle_single TRAINER_BIRD_KEEPER_WILTON, Route18_Text_WiltonIntro, Route18_Text_WiltonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route18_EventScript_WiltonRematch + goto_if_eq VAR_RESULT, TRUE, Route18_EventScript_WiltonRematch msgbox Route18_Text_WiltonPostBattle, MSGBOX_AUTOCLOSE end @@ -1691,8 +1561,7 @@ Route18_EventScript_WiltonRematch:: Route18_EventScript_Ramiro:: trainerbattle_single TRAINER_BIRD_KEEPER_RAMIRO, Route18_Text_RamiroIntro, Route18_Text_RamiroDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route18_EventScript_RamiroRematch + goto_if_eq VAR_RESULT, TRUE, Route18_EventScript_RamiroRematch msgbox Route18_Text_RamiroPostBattle, MSGBOX_AUTOCLOSE end @@ -1704,8 +1573,7 @@ Route18_EventScript_RamiroRematch:: Route18_EventScript_Jacob:: trainerbattle_single TRAINER_BIRD_KEEPER_JACOB, Route18_Text_JacobIntro, Route18_Text_JacobDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route18_EventScript_JacobRematch + goto_if_eq VAR_RESULT, TRUE, Route18_EventScript_JacobRematch msgbox Route18_Text_JacobPostBattle, MSGBOX_AUTOCLOSE end @@ -1717,8 +1585,7 @@ Route18_EventScript_JacobRematch:: Route19_EventScript_Richard:: trainerbattle_single TRAINER_SWIMMER_MALE_RICHARD, Route19_Text_RichardIntro, Route19_Text_RichardDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_RichardRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_RichardRematch msgbox Route19_Text_RichardPostBattle, MSGBOX_AUTOCLOSE end @@ -1730,8 +1597,7 @@ Route19_EventScript_RichardRematch:: Route19_EventScript_Reece:: trainerbattle_single TRAINER_SWIMMER_MALE_REECE, Route19_Text_ReeceIntro, Route19_Text_ReeceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_ReeceRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_ReeceRematch msgbox Route19_Text_ReecePostBattle, MSGBOX_AUTOCLOSE end @@ -1743,8 +1609,7 @@ Route19_EventScript_ReeceRematch:: Route19_EventScript_Matthew:: trainerbattle_single TRAINER_SWIMMER_MALE_MATTHEW, Route19_Text_MatthewIntro, Route19_Text_MatthewDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_MatthewRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_MatthewRematch msgbox Route19_Text_MatthewPostBattle, MSGBOX_AUTOCLOSE end @@ -1756,8 +1621,7 @@ Route19_EventScript_MatthewRematch:: Route19_EventScript_Douglas:: trainerbattle_single TRAINER_SWIMMER_MALE_DOUGLAS, Route19_Text_DouglasIntro, Route19_Text_DouglasDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_DouglasRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_DouglasRematch msgbox Route19_Text_DouglasPostBattle, MSGBOX_AUTOCLOSE end @@ -1769,8 +1633,7 @@ Route19_EventScript_DouglasRematch:: Route19_EventScript_David:: trainerbattle_single TRAINER_SWIMMER_MALE_DAVID, Route19_Text_DavidIntro, Route19_Text_DavidDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_DavidRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_DavidRematch msgbox Route19_Text_DavidPostBattle, MSGBOX_AUTOCLOSE end @@ -1782,8 +1645,7 @@ Route19_EventScript_DavidRematch:: Route19_EventScript_Tony:: trainerbattle_single TRAINER_SWIMMER_MALE_TONY, Route19_Text_TonyIntro, Route19_Text_TonyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_TonyRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_TonyRematch msgbox Route19_Text_TonyPostBattle, MSGBOX_AUTOCLOSE end @@ -1795,8 +1657,7 @@ Route19_EventScript_TonyRematch:: Route19_EventScript_Axle:: trainerbattle_single TRAINER_SWIMMER_MALE_AXLE, Route19_Text_AxleIntro, Route19_Text_AxleDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_AxleRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_AxleRematch msgbox Route19_Text_AxlePostBattle, MSGBOX_AUTOCLOSE end @@ -1808,8 +1669,7 @@ Route19_EventScript_AxleRematch:: Route19_EventScript_Anya:: trainerbattle_single TRAINER_SWIMMER_FEMALE_ANYA, Route19_Text_AnyaIntro, Route19_Text_AnyaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_AnyaRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_AnyaRematch msgbox Route19_Text_AnyaPostBattle, MSGBOX_AUTOCLOSE end @@ -1821,8 +1681,7 @@ Route19_EventScript_AnyaRematch:: Route19_EventScript_Alice:: trainerbattle_single TRAINER_SWIMMER_FEMALE_ALICE, Route19_Text_AliceIntro, Route19_Text_AliceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_AliceRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_AliceRematch msgbox Route19_Text_AlicePostBattle, MSGBOX_AUTOCLOSE end @@ -1834,8 +1693,7 @@ Route19_EventScript_AliceRematch:: Route19_EventScript_Connie:: trainerbattle_single TRAINER_SWIMMER_FEMALE_CONNIE, Route19_Text_ConnieIntro, Route19_Text_ConnieDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_ConnieRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_ConnieRematch msgbox Route19_Text_ConniePostBattle, MSGBOX_AUTOCLOSE end @@ -1847,8 +1705,7 @@ Route19_EventScript_ConnieRematch:: Route19_EventScript_Lia:: trainerbattle_double TRAINER_SIS_AND_BRO_LIA_LUC, Route19_Text_LiaIntro, Route19_Text_LiaDefeat, Route19_Text_LiaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_LiaRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_LiaRematch msgbox Route19_Text_LiaPostBattle, MSGBOX_AUTOCLOSE end @@ -1860,8 +1717,7 @@ Route19_EventScript_LiaRematch:: Route19_EventScript_Luc:: trainerbattle_double TRAINER_SIS_AND_BRO_LIA_LUC, Route19_Text_LucIntro, Route19_Text_LucDefeat, Route19_Text_LucNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route19_EventScript_LucRematch + goto_if_eq VAR_RESULT, TRUE, Route19_EventScript_LucRematch msgbox Route19_Text_LucPostBattle, MSGBOX_AUTOCLOSE end @@ -1873,8 +1729,7 @@ Route19_EventScript_LucRematch:: Route20_EventScript_Barry:: trainerbattle_single TRAINER_SWIMMER_MALE_BARRY, Route20_Text_BarryIntro, Route20_Text_BarryDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_BarryRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_BarryRematch msgbox Route20_Text_BarryPostBattle, MSGBOX_AUTOCLOSE end @@ -1886,8 +1741,7 @@ Route20_EventScript_BarryRematch:: Route20_EventScript_Dean:: trainerbattle_single TRAINER_SWIMMER_MALE_DEAN, Route20_Text_DeanIntro, Route20_Text_DeanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_DeanRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_DeanRematch msgbox Route20_Text_DeanPostBattle, MSGBOX_AUTOCLOSE end @@ -1899,8 +1753,7 @@ Route20_EventScript_DeanRematch:: Route20_EventScript_Darrin:: trainerbattle_single TRAINER_SWIMMER_MALE_DARRIN, Route20_Text_DarrinIntro, Route20_Text_DarrinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_DarrinRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_DarrinRematch msgbox Route20_Text_DarrinPostBattle, MSGBOX_AUTOCLOSE end @@ -1912,8 +1765,7 @@ Route20_EventScript_DarrinRematch:: Route20_EventScript_Tiffany:: trainerbattle_single TRAINER_SWIMMER_FEMALE_TIFFANY, Route20_Text_TiffanyIntro, Route20_Text_TiffanyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_TiffanyRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_TiffanyRematch msgbox Route20_Text_TiffanyPostBattle, MSGBOX_AUTOCLOSE end @@ -1925,8 +1777,7 @@ Route20_EventScript_TiffanyRematch:: Route20_EventScript_Nora:: trainerbattle_single TRAINER_SWIMMER_FEMALE_NORA, Route20_Text_NoraIntro, Route20_Text_NoraDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_NoraRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_NoraRematch msgbox Route20_Text_NoraPostBattle, MSGBOX_AUTOCLOSE end @@ -1938,8 +1789,7 @@ Route20_EventScript_NoraRematch:: Route20_EventScript_Melissa:: trainerbattle_single TRAINER_SWIMMER_FEMALE_MELISSA, Route20_Text_MelissaIntro, Route20_Text_MelissaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_MelissaRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_MelissaRematch msgbox Route20_Text_MelissaPostBattle, MSGBOX_AUTOCLOSE end @@ -1951,8 +1801,7 @@ Route20_EventScript_MelissaRematch:: Route20_EventScript_Shirley:: trainerbattle_single TRAINER_SWIMMER_FEMALE_SHIRLEY, Route20_Text_ShirleyIntro, Route20_Text_ShirleyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_ShirleyRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_ShirleyRematch msgbox Route20_Text_ShirleyPostBattle, MSGBOX_AUTOCLOSE end @@ -1964,8 +1813,7 @@ Route20_EventScript_ShirleyRematch:: Route20_EventScript_Roger:: trainerbattle_single TRAINER_BIRD_KEEPER_ROGER, Route20_Text_RogerIntro, Route20_Text_RogerDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_RogerRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_RogerRematch msgbox Route20_Text_RogerPostBattle, MSGBOX_AUTOCLOSE end @@ -1977,8 +1825,7 @@ Route20_EventScript_RogerRematch:: Route20_EventScript_Missy:: trainerbattle_single TRAINER_PICNICKER_MISSY, Route20_Text_MissyIntro, Route20_Text_MissyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_MissyRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_MissyRematch msgbox Route20_Text_MissyPostBattle, MSGBOX_AUTOCLOSE end @@ -1990,8 +1837,7 @@ Route20_EventScript_MissyRematch:: Route20_EventScript_Irene:: trainerbattle_single TRAINER_PICNICKER_IRENE, Route20_Text_IreneIntro, Route20_Text_IreneDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route20_EventScript_IreneRematch + goto_if_eq VAR_RESULT, TRUE, Route20_EventScript_IreneRematch msgbox Route20_Text_IrenePostBattle, MSGBOX_AUTOCLOSE end @@ -2003,8 +1849,7 @@ Route20_EventScript_IreneRematch:: Route21_North_EventScript_Ronald:: trainerbattle_single TRAINER_FISHERMAN_RONALD, Route21_North_Text_RonaldIntro, Route21_North_Text_RonaldDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_North_EventScript_RonaldRematch + goto_if_eq VAR_RESULT, TRUE, Route21_North_EventScript_RonaldRematch msgbox Route21_North_Text_RonaldPostBattle, MSGBOX_AUTOCLOSE end @@ -2016,8 +1861,7 @@ Route21_North_EventScript_RonaldRematch:: Route21_South_EventScript_Claude:: trainerbattle_single TRAINER_FISHERMAN_CLAUDE, Route21_South_Text_ClaudeIntro, Route21_South_Text_ClaudeDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_South_EventScript_ClaudeRematch + goto_if_eq VAR_RESULT, TRUE, Route21_South_EventScript_ClaudeRematch msgbox Route21_South_Text_ClaudePostBattle, MSGBOX_AUTOCLOSE end @@ -2029,8 +1873,7 @@ Route21_South_EventScript_ClaudeRematch:: Route21_North_EventScript_Wade:: trainerbattle_single TRAINER_FISHERMAN_WADE, Route21_North_Text_WadeIntro, Route21_North_Text_WadeDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_North_EventScript_WadeRematch + goto_if_eq VAR_RESULT, TRUE, Route21_North_EventScript_WadeRematch msgbox Route21_North_Text_WadePostBattle, MSGBOX_AUTOCLOSE end @@ -2042,8 +1885,7 @@ Route21_North_EventScript_WadeRematch:: Route21_South_EventScript_Nolan:: trainerbattle_single TRAINER_FISHERMAN_NOLAN, Route21_South_Text_NolanIntro, Route21_South_Text_NolanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_South_EventScript_NolanRematch + goto_if_eq VAR_RESULT, TRUE, Route21_South_EventScript_NolanRematch msgbox Route21_South_Text_NolanPostBattle, MSGBOX_AUTOCLOSE end @@ -2055,8 +1897,7 @@ Route21_South_EventScript_NolanRematch:: Route21_North_EventScript_Spencer:: trainerbattle_single TRAINER_SWIMMER_MALE_SPENCER, Route21_North_Text_SpencerIntro, Route21_North_Text_SpencerDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_North_EventScript_SpencerRematch + goto_if_eq VAR_RESULT, TRUE, Route21_North_EventScript_SpencerRematch msgbox Route21_North_Text_SpencerPostBattle, MSGBOX_AUTOCLOSE end @@ -2068,8 +1909,7 @@ Route21_North_EventScript_SpencerRematch:: Route21_South_EventScript_Jack:: trainerbattle_single TRAINER_SWIMMER_MALE_JACK, Route21_South_Text_JackIntro, Route21_South_Text_JackDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_South_EventScript_JackRematch + goto_if_eq VAR_RESULT, TRUE, Route21_South_EventScript_JackRematch msgbox Route21_South_Text_JackPostBattle, MSGBOX_AUTOCLOSE end @@ -2081,8 +1921,7 @@ Route21_South_EventScript_JackRematch:: Route21_South_EventScript_Jerome:: trainerbattle_single TRAINER_SWIMMER_MALE_JEROME, Route21_South_Text_JeromeIntro, Route21_South_Text_JeromeDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_South_EventScript_JeromeRematch + goto_if_eq VAR_RESULT, TRUE, Route21_South_EventScript_JeromeRematch msgbox Route21_South_Text_JeromePostBattle, MSGBOX_AUTOCLOSE end @@ -2094,8 +1933,7 @@ Route21_South_EventScript_JeromeRematch:: Route21_South_EventScript_Roland:: trainerbattle_single TRAINER_SWIMMER_MALE_ROLAND, Route21_South_Text_RolandIntro, Route21_South_Text_RolandDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_South_EventScript_RolandRematch + goto_if_eq VAR_RESULT, TRUE, Route21_South_EventScript_RolandRematch msgbox Route21_South_Text_RolandPostBattle, MSGBOX_AUTOCLOSE end @@ -2107,8 +1945,7 @@ Route21_South_EventScript_RolandRematch:: Route21_North_EventScript_Lil:: trainerbattle_double TRAINER_SIS_AND_BRO_LIL_IAN, Route21_North_Text_LilIntro, Route21_North_Text_LilDefeat, Route21_North_Text_LilNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_North_EventScript_LilRematch + goto_if_eq VAR_RESULT, TRUE, Route21_North_EventScript_LilRematch msgbox Route21_North_Text_LilPostBattle, MSGBOX_AUTOCLOSE end @@ -2120,8 +1957,7 @@ Route21_North_EventScript_LilRematch:: Route21_North_EventScript_Ian:: trainerbattle_double TRAINER_SIS_AND_BRO_LIL_IAN, Route21_North_Text_IanIntro, Route21_North_Text_IanDefeat, Route21_North_Text_IanNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route21_North_EventScript_IanRematch + goto_if_eq VAR_RESULT, TRUE, Route21_North_EventScript_IanRematch msgbox Route21_North_Text_IanPostBattle, MSGBOX_AUTOCLOSE end @@ -2133,8 +1969,7 @@ Route21_North_EventScript_IanRematch:: OneIsland_KindleRoad_EventScript_Maria:: trainerbattle_single TRAINER_SWIMMER_FEMALE_MARIA, OneIsland_KindleRoad_Text_MariaIntro, OneIsland_KindleRoad_Text_MariaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_MariaRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_MariaRematch msgbox OneIsland_KindleRoad_Text_MariaPostBattle, MSGBOX_AUTOCLOSE end @@ -2146,8 +1981,7 @@ OneIsland_KindleRoad_EventScript_MariaRematch:: OneIsland_KindleRoad_EventScript_Abigail:: trainerbattle_single TRAINER_SWIMMER_FEMALE_ABIGAIL, OneIsland_KindleRoad_Text_AbigailIntro, OneIsland_KindleRoad_Text_AbigailDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_AbigailRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_AbigailRematch msgbox OneIsland_KindleRoad_Text_AbigailPostBattle, MSGBOX_AUTOCLOSE end @@ -2159,8 +1993,7 @@ OneIsland_KindleRoad_EventScript_AbigailRematch:: OneIsland_KindleRoad_EventScript_Finn:: trainerbattle_single TRAINER_SWIMMER_MALE_FINN, OneIsland_KindleRoad_Text_FinnIntro, OneIsland_KindleRoad_Text_FinnDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_FinnRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_FinnRematch msgbox OneIsland_KindleRoad_Text_FinnPostBattle, MSGBOX_AUTOCLOSE end @@ -2172,8 +2005,7 @@ OneIsland_KindleRoad_EventScript_FinnRematch:: OneIsland_KindleRoad_EventScript_Garrett:: trainerbattle_single TRAINER_SWIMMER_MALE_GARRETT, OneIsland_KindleRoad_Text_GarrettIntro, OneIsland_KindleRoad_Text_GarrettDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_GarrettRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_GarrettRematch msgbox OneIsland_KindleRoad_Text_GarrettPostBattle, MSGBOX_AUTOCLOSE end @@ -2185,8 +2017,7 @@ OneIsland_KindleRoad_EventScript_GarrettRematch:: OneIsland_KindleRoad_EventScript_Tommy:: trainerbattle_single TRAINER_FISHERMAN_TOMMY, OneIsland_KindleRoad_Text_TommyIntro, OneIsland_KindleRoad_Text_TommyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_TommyRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_TommyRematch msgbox OneIsland_KindleRoad_Text_TommyPostBattle, MSGBOX_AUTOCLOSE end @@ -2198,8 +2029,7 @@ OneIsland_KindleRoad_EventScript_TommyRematch:: OneIsland_KindleRoad_EventScript_Sharon:: trainerbattle_single TRAINER_CRUSH_GIRL_SHARON, OneIsland_KindleRoad_Text_SharonIntro, OneIsland_KindleRoad_Text_SharonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_SharonRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_SharonRematch msgbox OneIsland_KindleRoad_Text_SharonPostBattle, MSGBOX_AUTOCLOSE end @@ -2211,8 +2041,7 @@ OneIsland_KindleRoad_EventScript_SharonRematch:: OneIsland_KindleRoad_EventScript_Tanya:: trainerbattle_single TRAINER_CRUSH_GIRL_TANYA, OneIsland_KindleRoad_Text_TanyaIntro, OneIsland_KindleRoad_Text_TanyaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_TanyaRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_TanyaRematch msgbox OneIsland_KindleRoad_Text_TanyaPostBattle, MSGBOX_AUTOCLOSE end @@ -2224,8 +2053,7 @@ OneIsland_KindleRoad_EventScript_TanyaRematch:: OneIsland_KindleRoad_EventScript_Shea:: trainerbattle_single TRAINER_BLACK_BELT_SHEA, OneIsland_KindleRoad_Text_SheaIntro, OneIsland_KindleRoad_Text_SheaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_SheaRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_SheaRematch msgbox OneIsland_KindleRoad_Text_SheaPostBattle, MSGBOX_AUTOCLOSE end @@ -2237,8 +2065,7 @@ OneIsland_KindleRoad_EventScript_SheaRematch:: OneIsland_KindleRoad_EventScript_Hugh:: trainerbattle_single TRAINER_BLACK_BELT_HUGH, OneIsland_KindleRoad_Text_HughIntro, OneIsland_KindleRoad_Text_HughDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_HughRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_HughRematch msgbox OneIsland_KindleRoad_Text_HughPostBattle, MSGBOX_AUTOCLOSE end @@ -2250,8 +2077,7 @@ OneIsland_KindleRoad_EventScript_HughRematch:: OneIsland_KindleRoad_EventScript_Bryce:: trainerbattle_single TRAINER_CAMPER_BRYCE, OneIsland_KindleRoad_Text_BryceIntro, OneIsland_KindleRoad_Text_BryceDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_BryceRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_BryceRematch msgbox OneIsland_KindleRoad_Text_BrycePostBattle, MSGBOX_AUTOCLOSE end @@ -2263,8 +2089,7 @@ OneIsland_KindleRoad_EventScript_BryceRematch:: OneIsland_KindleRoad_EventScript_Claire:: trainerbattle_single TRAINER_PICNICKER_CLAIRE, OneIsland_KindleRoad_Text_ClaireIntro, OneIsland_KindleRoad_Text_ClaireDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_ClaireRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_ClaireRematch msgbox OneIsland_KindleRoad_Text_ClairePostBattle, MSGBOX_AUTOCLOSE end @@ -2276,8 +2101,7 @@ OneIsland_KindleRoad_EventScript_ClaireRematch:: OneIsland_KindleRoad_EventScript_Kia:: trainerbattle_double TRAINER_CRUSH_KIN_MIK_KIA, OneIsland_KindleRoad_Text_KiaIntro, OneIsland_KindleRoad_Text_KiaDefeat, OneIsland_KindleRoad_Text_KiaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_KiaRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_KiaRematch msgbox OneIsland_KindleRoad_Text_KiaPostBattle, MSGBOX_AUTOCLOSE end @@ -2289,8 +2113,7 @@ OneIsland_KindleRoad_EventScript_KiaRematch:: OneIsland_KindleRoad_EventScript_Mik:: trainerbattle_double TRAINER_CRUSH_KIN_MIK_KIA, OneIsland_KindleRoad_Text_MikIntro, OneIsland_KindleRoad_Text_MikDefeat, OneIsland_KindleRoad_Text_MikNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_KindleRoad_EventScript_MikRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_KindleRoad_EventScript_MikRematch msgbox OneIsland_KindleRoad_Text_MikPostBattle, MSGBOX_AUTOCLOSE end @@ -2302,8 +2125,7 @@ OneIsland_KindleRoad_EventScript_MikRematch:: OneIsland_TreasureBeach_EventScript_Amara:: trainerbattle_single TRAINER_SWIMMER_FEMALE_AMARA, OneIsland_TreasureBeach_Text_AmaraIntro, OneIsland_TreasureBeach_Text_AmaraDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq OneIsland_TreasureBeach_EventScript_AmaraRematch + goto_if_eq VAR_RESULT, TRUE, OneIsland_TreasureBeach_EventScript_AmaraRematch msgbox OneIsland_TreasureBeach_Text_AmaraPostBattle, MSGBOX_AUTOCLOSE end @@ -2315,8 +2137,7 @@ OneIsland_TreasureBeach_EventScript_AmaraRematch:: ThreeIsland_BondBridge_EventScript_Nikki:: trainerbattle_single TRAINER_AROMA_LADY_NIKKI, ThreeIsland_BondBridge_Text_NikkiIntro, ThreeIsland_BondBridge_Text_NikkiDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_BondBridge_EventScript_NikkiRematch + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_BondBridge_EventScript_NikkiRematch msgbox ThreeIsland_BondBridge_Text_NikkiPostBattle, MSGBOX_AUTOCLOSE end @@ -2328,8 +2149,7 @@ ThreeIsland_BondBridge_EventScript_NikkiRematch:: ThreeIsland_BondBridge_EventScript_Violet:: trainerbattle_single TRAINER_AROMA_LADY_VIOLET, ThreeIsland_BondBridge_Text_VioletIntro, ThreeIsland_BondBridge_Text_VioletDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_BondBridge_EventScript_VioletRematch + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_BondBridge_EventScript_VioletRematch msgbox ThreeIsland_BondBridge_Text_VioletPostBattle, MSGBOX_AUTOCLOSE end @@ -2341,8 +2161,7 @@ ThreeIsland_BondBridge_EventScript_VioletRematch:: ThreeIsland_BondBridge_EventScript_Amira:: trainerbattle_single TRAINER_TUBER_AMIRA, ThreeIsland_BondBridge_Text_AmiraIntro, ThreeIsland_BondBridge_Text_AmiraDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_BondBridge_EventScript_AmiraRematch + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_BondBridge_EventScript_AmiraRematch msgbox ThreeIsland_BondBridge_Text_AmiraPostBattle, MSGBOX_AUTOCLOSE end @@ -2354,8 +2173,7 @@ ThreeIsland_BondBridge_EventScript_AmiraRematch:: ThreeIsland_BondBridge_EventScript_Alexis:: trainerbattle_single TRAINER_TUBER_ALEXIS, ThreeIsland_BondBridge_Text_AlexisIntro, ThreeIsland_BondBridge_Text_AlexisDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_BondBridge_EventScript_AlexisRematch + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_BondBridge_EventScript_AlexisRematch msgbox ThreeIsland_BondBridge_Text_AlexisPostBattle, MSGBOX_AUTOCLOSE end @@ -2367,8 +2185,7 @@ ThreeIsland_BondBridge_EventScript_AlexisRematch:: ThreeIsland_BondBridge_EventScript_Tisha:: trainerbattle_single TRAINER_SWIMMER_FEMALE_TISHA, ThreeIsland_BondBridge_Text_TishaIntro, ThreeIsland_BondBridge_Text_TishaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_BondBridge_EventScript_TishaRematch + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_BondBridge_EventScript_TishaRematch msgbox ThreeIsland_BondBridge_Text_TishaPostBattle, MSGBOX_AUTOCLOSE end @@ -2380,8 +2197,7 @@ ThreeIsland_BondBridge_EventScript_TishaRematch:: ThreeIsland_BondBridge_EventScript_Joy:: trainerbattle_double TRAINER_TWINS_JOY_MEG, ThreeIsland_BondBridge_Text_JoyIntro, ThreeIsland_BondBridge_Text_JoyDefeat, ThreeIsland_BondBridge_Text_JoyNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_BondBridge_EventScript_JoyRematch + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_BondBridge_EventScript_JoyRematch msgbox ThreeIsland_BondBridge_Text_JoyPostBattle, MSGBOX_AUTOCLOSE end @@ -2393,8 +2209,7 @@ ThreeIsland_BondBridge_EventScript_JoyRematch:: ThreeIsland_BondBridge_EventScript_Meg:: trainerbattle_double TRAINER_TWINS_JOY_MEG, ThreeIsland_BondBridge_Text_MegIntro, ThreeIsland_BondBridge_Text_MegDefeat, ThreeIsland_BondBridge_Text_MegNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq ThreeIsland_BondBridge_EventScript_MegRematch + goto_if_eq VAR_RESULT, TRUE, ThreeIsland_BondBridge_EventScript_MegRematch msgbox ThreeIsland_BondBridge_Text_MegPostBattle, MSGBOX_AUTOCLOSE end @@ -2406,8 +2221,7 @@ ThreeIsland_BondBridge_EventScript_MegRematch:: FiveIsland_ResortGorgeous_EventScript_Daisy:: trainerbattle_single TRAINER_PAINTER_DAISY, FiveIsland_ResortGorgeous_Text_DaisyIntro, FiveIsland_ResortGorgeous_Text_DaisyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_EventScript_DaisyRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_EventScript_DaisyRematch msgbox FiveIsland_ResortGorgeous_Text_DaisyPostBattle, MSGBOX_AUTOCLOSE end @@ -2419,8 +2233,7 @@ FiveIsland_ResortGorgeous_EventScript_DaisyRematch:: FiveIsland_ResortGorgeous_EventScript_Celina:: trainerbattle_single TRAINER_PAINTER_CELINA, FiveIsland_ResortGorgeous_Text_CelinaIntro, FiveIsland_ResortGorgeous_Text_CelinaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_EventScript_CelinaRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_EventScript_CelinaRematch msgbox FiveIsland_ResortGorgeous_Text_CelinaPostBattle, MSGBOX_AUTOCLOSE end @@ -2432,8 +2245,7 @@ FiveIsland_ResortGorgeous_EventScript_CelinaRematch:: FiveIsland_ResortGorgeous_EventScript_Rayna:: trainerbattle_single TRAINER_PAINTER_RAYNA, FiveIsland_ResortGorgeous_Text_RaynaIntro, FiveIsland_ResortGorgeous_Text_RaynaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_EventScript_RaynaRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_EventScript_RaynaRematch msgbox FiveIsland_ResortGorgeous_Text_RaynaPostBattle, MSGBOX_AUTOCLOSE end @@ -2445,8 +2257,7 @@ FiveIsland_ResortGorgeous_EventScript_RaynaRematch:: FiveIsland_ResortGorgeous_EventScript_Jacki:: trainerbattle_single TRAINER_LADY_JACKI, FiveIsland_ResortGorgeous_Text_JackiIntro, FiveIsland_ResortGorgeous_Text_JackiDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_EventScript_JackiRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_EventScript_JackiRematch msgbox FiveIsland_ResortGorgeous_Text_JackiPostBattle, MSGBOX_AUTOCLOSE end @@ -2458,8 +2269,7 @@ FiveIsland_ResortGorgeous_EventScript_JackiRematch:: FiveIsland_ResortGorgeous_EventScript_Gillian:: trainerbattle_single TRAINER_LADY_GILLIAN, FiveIsland_ResortGorgeous_Text_GillianIntro, FiveIsland_ResortGorgeous_Text_GillianDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_EventScript_GillianRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_EventScript_GillianRematch msgbox FiveIsland_ResortGorgeous_Text_GillianPostBattle, MSGBOX_AUTOCLOSE end @@ -2471,8 +2281,7 @@ FiveIsland_ResortGorgeous_EventScript_GillianRematch:: FiveIsland_ResortGorgeous_EventScript_Destin:: trainerbattle_single TRAINER_YOUNGSTER_DESTIN, FiveIsland_ResortGorgeous_Text_DestinIntro, FiveIsland_ResortGorgeous_Text_DestinDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_EventScript_DestinRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_EventScript_DestinRematch msgbox FiveIsland_ResortGorgeous_Text_DestinPostBattle, MSGBOX_AUTOCLOSE end @@ -2484,8 +2293,7 @@ FiveIsland_ResortGorgeous_EventScript_DestinRematch:: FiveIsland_ResortGorgeous_EventScript_Toby:: trainerbattle_single TRAINER_SWIMMER_MALE_TOBY, FiveIsland_ResortGorgeous_Text_TobyIntro, FiveIsland_ResortGorgeous_Text_TobyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_ResortGorgeous_EventScript_TobyRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_ResortGorgeous_EventScript_TobyRematch msgbox FiveIsland_ResortGorgeous_Text_TobyPostBattle, MSGBOX_AUTOCLOSE end @@ -2497,8 +2305,7 @@ FiveIsland_ResortGorgeous_EventScript_TobyRematch:: FiveIsland_WaterLabyrinth_EventScript_Alize:: trainerbattle_single TRAINER_PKMN_BREEDER_ALIZE, FiveIsland_WaterLabyrinth_Text_AlizeIntro, FiveIsland_WaterLabyrinth_Text_AlizeDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_WaterLabyrinth_EventScript_AlizeRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_WaterLabyrinth_EventScript_AlizeRematch msgbox FiveIsland_WaterLabyrinth_Text_AlizePostBattle, MSGBOX_AUTOCLOSE end @@ -2510,8 +2317,7 @@ FiveIsland_WaterLabyrinth_EventScript_AlizeRematch:: FiveIsland_MemorialPillar_EventScript_Milo:: trainerbattle_single TRAINER_BIRD_KEEPER_MILO, FiveIsland_MemorialPillar_Text_MiloIntro, FiveIsland_MemorialPillar_Text_MiloDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_MemorialPillar_EventScript_MiloRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_MemorialPillar_EventScript_MiloRematch msgbox FiveIsland_MemorialPillar_Text_MiloPostBattle, MSGBOX_AUTOCLOSE end @@ -2523,8 +2329,7 @@ FiveIsland_MemorialPillar_EventScript_MiloRematch:: FiveIsland_MemorialPillar_EventScript_Chaz:: trainerbattle_single TRAINER_BIRD_KEEPER_CHAZ, FiveIsland_MemorialPillar_Text_ChazIntro, FiveIsland_MemorialPillar_Text_ChazDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_MemorialPillar_EventScript_ChazRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_MemorialPillar_EventScript_ChazRematch msgbox FiveIsland_MemorialPillar_Text_ChazPostBattle, MSGBOX_AUTOCLOSE end @@ -2536,8 +2341,7 @@ FiveIsland_MemorialPillar_EventScript_ChazRematch:: FiveIsland_MemorialPillar_EventScript_Harold:: trainerbattle_single TRAINER_BIRD_KEEPER_HAROLD, FiveIsland_MemorialPillar_Text_HaroldIntro, FiveIsland_MemorialPillar_Text_HaroldDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FiveIsland_MemorialPillar_EventScript_HaroldRematch + goto_if_eq VAR_RESULT, TRUE, FiveIsland_MemorialPillar_EventScript_HaroldRematch msgbox FiveIsland_MemorialPillar_Text_HaroldPostBattle, MSGBOX_AUTOCLOSE end @@ -2549,8 +2353,7 @@ FiveIsland_MemorialPillar_EventScript_HaroldRematch:: SixIsland_OutcastIsland_EventScript_Tylor:: trainerbattle_single TRAINER_FISHERMAN_TYLOR, SixIsland_OutcastIsland_Text_TylorIntro, SixIsland_OutcastIsland_Text_TylorDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_OutcastIsland_EventScript_TylorRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_OutcastIsland_EventScript_TylorRematch msgbox SixIsland_OutcastIsland_Text_TylorPostBattle, MSGBOX_AUTOCLOSE end @@ -2562,8 +2365,7 @@ SixIsland_OutcastIsland_EventScript_TylorRematch:: SixIsland_OutcastIsland_EventScript_Mymo:: trainerbattle_single TRAINER_SWIMMER_MALE_MYMO, SixIsland_OutcastIsland_Text_MymoIntro, SixIsland_OutcastIsland_Text_MymoDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_OutcastIsland_EventScript_MymoRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_OutcastIsland_EventScript_MymoRematch msgbox SixIsland_OutcastIsland_Text_MymoPostBattle, MSGBOX_AUTOCLOSE end @@ -2575,8 +2377,7 @@ SixIsland_OutcastIsland_EventScript_MymoRematch:: SixIsland_OutcastIsland_EventScript_Nicole:: trainerbattle_single TRAINER_SWIMMER_FEMALE_NICOLE, SixIsland_OutcastIsland_Text_NicoleIntro, SixIsland_OutcastIsland_Text_NicoleDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_OutcastIsland_EventScript_NicoleRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_OutcastIsland_EventScript_NicoleRematch msgbox SixIsland_OutcastIsland_Text_NicolePostBattle, MSGBOX_AUTOCLOSE end @@ -2588,8 +2389,7 @@ SixIsland_OutcastIsland_EventScript_NicoleRematch:: SixIsland_OutcastIsland_EventScript_Ava:: trainerbattle_double TRAINER_SIS_AND_BRO_AVA_GEB, SixIsland_OutcastIsland_Text_AvaIntro, SixIsland_OutcastIsland_Text_AvaDefeat, SixIsland_OutcastIsland_Text_AvaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_OutcastIsland_EventScript_AvaRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_OutcastIsland_EventScript_AvaRematch msgbox SixIsland_OutcastIsland_Text_AvaPostBattle, MSGBOX_AUTOCLOSE end @@ -2601,8 +2401,7 @@ SixIsland_OutcastIsland_EventScript_AvaRematch:: SixIsland_OutcastIsland_EventScript_Geb:: trainerbattle_double TRAINER_SIS_AND_BRO_AVA_GEB, SixIsland_OutcastIsland_Text_GebIntro, SixIsland_OutcastIsland_Text_GebDefeat, SixIsland_OutcastIsland_Text_GebNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_OutcastIsland_EventScript_GebRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_OutcastIsland_EventScript_GebRematch msgbox SixIsland_OutcastIsland_Text_GebPostBattle, MSGBOX_AUTOCLOSE end @@ -2614,8 +2413,7 @@ SixIsland_OutcastIsland_EventScript_GebRematch:: SixIsland_GreenPath_EventScript_Jaclyn:: trainerbattle_single TRAINER_PSYCHIC_JACLYN, SixIsland_GreenPath_Text_JaclynIntro, SixIsland_GreenPath_Text_JaclynDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_GreenPath_EventScript_JaclynRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_GreenPath_EventScript_JaclynRematch msgbox SixIsland_GreenPath_Text_JaclynPostBattle, MSGBOX_AUTOCLOSE end @@ -2627,8 +2425,7 @@ SixIsland_GreenPath_EventScript_JaclynRematch:: SixIsland_WaterPath_EventScript_Rose:: trainerbattle_single TRAINER_AROMA_LADY_ROSE, SixIsland_WaterPath_Text_RoseIntro, SixIsland_WaterPath_Text_RoseDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_WaterPath_EventScript_RoseRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_WaterPath_EventScript_RoseRematch msgbox SixIsland_WaterPath_Text_RosePostBattle, MSGBOX_AUTOCLOSE end @@ -2640,8 +2437,7 @@ SixIsland_WaterPath_EventScript_RoseRematch:: SixIsland_WaterPath_EventScript_Edward:: trainerbattle_single TRAINER_JUGGLER_EDWARD, SixIsland_WaterPath_Text_EdwardIntro, SixIsland_WaterPath_Text_EdwardDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_WaterPath_EventScript_EdwardRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_WaterPath_EventScript_EdwardRematch msgbox SixIsland_WaterPath_Text_EdwardPostBattle, MSGBOX_AUTOCLOSE end @@ -2653,8 +2449,7 @@ SixIsland_WaterPath_EventScript_EdwardRematch:: SixIsland_WaterPath_EventScript_Samir:: trainerbattle_single TRAINER_SWIMMER_MALE_SAMIR, SixIsland_WaterPath_Text_SamirIntro, SixIsland_WaterPath_Text_SamirDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_WaterPath_EventScript_SamirRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_WaterPath_EventScript_SamirRematch msgbox SixIsland_WaterPath_Text_SamirPostBattle, MSGBOX_AUTOCLOSE end @@ -2666,8 +2461,7 @@ SixIsland_WaterPath_EventScript_SamirRematch:: SixIsland_WaterPath_EventScript_Denise:: trainerbattle_single TRAINER_SWIMMER_FEMALE_DENISE, SixIsland_WaterPath_Text_DeniseIntro, SixIsland_WaterPath_Text_DeniseDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_WaterPath_EventScript_DeniseRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_WaterPath_EventScript_DeniseRematch msgbox SixIsland_WaterPath_Text_DenisePostBattle, MSGBOX_AUTOCLOSE end @@ -2679,8 +2473,7 @@ SixIsland_WaterPath_EventScript_DeniseRematch:: SixIsland_WaterPath_EventScript_Miu:: trainerbattle_double TRAINER_TWINS_MIU_MIA, SixIsland_WaterPath_Text_MiuIntro, SixIsland_WaterPath_Text_MiuDefeat, SixIsland_WaterPath_Text_MiuNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_WaterPath_EventScript_MiuRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_WaterPath_EventScript_MiuRematch msgbox SixIsland_WaterPath_Text_MiuPostBattle, MSGBOX_AUTOCLOSE end @@ -2692,8 +2485,7 @@ SixIsland_WaterPath_EventScript_MiuRematch:: SixIsland_WaterPath_EventScript_Mia:: trainerbattle_double TRAINER_TWINS_MIU_MIA, SixIsland_WaterPath_Text_MiaIntro, SixIsland_WaterPath_Text_MiaDefeat, SixIsland_WaterPath_Text_MiaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_WaterPath_EventScript_MiaRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_WaterPath_EventScript_MiaRematch msgbox SixIsland_WaterPath_Text_MiaPostBattle, MSGBOX_AUTOCLOSE end @@ -2705,8 +2497,7 @@ SixIsland_WaterPath_EventScript_MiaRematch:: SixIsland_WaterPath_EventScript_Earl:: trainerbattle_single TRAINER_HIKER_EARL, SixIsland_WaterPath_Text_EarlIntro, SixIsland_WaterPath_Text_EarlDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_WaterPath_EventScript_EarlRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_WaterPath_EventScript_EarlRematch msgbox SixIsland_WaterPath_Text_EarlPostBattle, MSGBOX_AUTOCLOSE end @@ -2718,8 +2509,7 @@ SixIsland_WaterPath_EventScript_EarlRematch:: SixIsland_RuinValley_EventScript_Stanly:: trainerbattle_single TRAINER_RUIN_MANIAC_STANLY, SixIsland_RuinValley_Text_StanlyIntro, SixIsland_RuinValley_Text_StanlyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_RuinValley_EventScript_StanlyRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_RuinValley_EventScript_StanlyRematch msgbox SixIsland_RuinValley_Text_StanlyPostBattle, MSGBOX_AUTOCLOSE end @@ -2731,8 +2521,7 @@ SixIsland_RuinValley_EventScript_StanlyRematch:: SixIsland_RuinValley_EventScript_Foster:: trainerbattle_single TRAINER_RUIN_MANIAC_FOSTER, SixIsland_RuinValley_Text_FosterIntro, SixIsland_RuinValley_Text_FosterDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_RuinValley_EventScript_FosterRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_RuinValley_EventScript_FosterRematch msgbox SixIsland_RuinValley_Text_FosterPostBattle, MSGBOX_AUTOCLOSE end @@ -2744,8 +2533,7 @@ SixIsland_RuinValley_EventScript_FosterRematch:: SixIsland_RuinValley_EventScript_Larry:: trainerbattle_single TRAINER_RUIN_MANIAC_LARRY, SixIsland_RuinValley_Text_LarryIntro, SixIsland_RuinValley_Text_LarryDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_RuinValley_EventScript_LarryRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_RuinValley_EventScript_LarryRematch msgbox SixIsland_RuinValley_Text_LarryPostBattle, MSGBOX_AUTOCLOSE end @@ -2757,8 +2545,7 @@ SixIsland_RuinValley_EventScript_LarryRematch:: SixIsland_RuinValley_EventScript_Daryl:: trainerbattle_single TRAINER_HIKER_DARYL, SixIsland_RuinValley_Text_DarylIntro, SixIsland_RuinValley_Text_DarylDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_RuinValley_EventScript_DarylRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_RuinValley_EventScript_DarylRematch msgbox SixIsland_RuinValley_Text_DarylPostBattle, MSGBOX_AUTOCLOSE end @@ -2770,8 +2557,7 @@ SixIsland_RuinValley_EventScript_DarylRematch:: SixIsland_RuinValley_EventScript_Hector:: trainerbattle_single TRAINER_POKEMANIAC_HECTOR, SixIsland_RuinValley_Text_HectorIntro, SixIsland_RuinValley_Text_HectorDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SixIsland_RuinValley_EventScript_HectorRematch + goto_if_eq VAR_RESULT, TRUE, SixIsland_RuinValley_EventScript_HectorRematch msgbox SixIsland_RuinValley_Text_HectorPostBattle, MSGBOX_AUTOCLOSE end @@ -2783,8 +2569,7 @@ SixIsland_RuinValley_EventScript_HectorRematch:: SevenIsland_TrainerTower_EventScript_Dario:: trainerbattle_single TRAINER_PSYCHIC_DARIO, SevenIsland_TrainerTower_Text_DarioIntro, SevenIsland_TrainerTower_Text_DarioDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_TrainerTower_EventScript_DarioRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_TrainerTower_EventScript_DarioRematch msgbox SevenIsland_TrainerTower_Text_DarioPostBattle, MSGBOX_AUTOCLOSE end @@ -2796,8 +2581,7 @@ SevenIsland_TrainerTower_EventScript_DarioRematch:: SevenIsland_TrainerTower_EventScript_Rodette:: trainerbattle_single TRAINER_PSYCHIC_RODETTE, SevenIsland_TrainerTower_Text_RodetteIntro, SevenIsland_TrainerTower_Text_RodetteDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_TrainerTower_EventScript_RodetteRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_TrainerTower_EventScript_RodetteRematch msgbox SevenIsland_TrainerTower_Text_RodettePostBattle, MSGBOX_AUTOCLOSE end @@ -2809,8 +2593,7 @@ SevenIsland_TrainerTower_EventScript_RodetteRematch:: SevenIsland_SevaultCanyon_Entrance_EventScript_Miah:: trainerbattle_single TRAINER_AROMA_LADY_MIAH, SevenIsland_SevaultCanyon_Entrance_Text_MiahIntro, SevenIsland_SevaultCanyon_Entrance_Text_MiahDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_Entrance_EventScript_MiahRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_Entrance_EventScript_MiahRematch msgbox SevenIsland_SevaultCanyon_Entrance_Text_MiahPostBattle, MSGBOX_AUTOCLOSE end @@ -2822,8 +2605,7 @@ SevenIsland_SevaultCanyon_Entrance_EventScript_MiahRematch:: SevenIsland_SevaultCanyon_Entrance_EventScript_Eve:: trainerbattle_double TRAINER_YOUNG_COUPLE_EVE_JON, SevenIsland_SevaultCanyon_Entrance_Text_EveIntro, SevenIsland_SevaultCanyon_Entrance_Text_EveDefeat, SevenIsland_SevaultCanyon_Entrance_Text_EveNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_Entrance_EventScript_EveRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_Entrance_EventScript_EveRematch msgbox SevenIsland_SevaultCanyon_Entrance_Text_EvePostBattle, MSGBOX_AUTOCLOSE end @@ -2835,8 +2617,7 @@ SevenIsland_SevaultCanyon_Entrance_EventScript_EveRematch:: SevenIsland_SevaultCanyon_Entrance_EventScript_Jon:: trainerbattle_double TRAINER_YOUNG_COUPLE_EVE_JON, SevenIsland_SevaultCanyon_Entrance_Text_JonIntro, SevenIsland_SevaultCanyon_Entrance_Text_JonDefeat, SevenIsland_SevaultCanyon_Entrance_Text_JonNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_Entrance_EventScript_JonRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_Entrance_EventScript_JonRematch msgbox SevenIsland_SevaultCanyon_Entrance_Text_JonPostBattle, MSGBOX_AUTOCLOSE end @@ -2848,8 +2629,7 @@ SevenIsland_SevaultCanyon_Entrance_EventScript_JonRematch:: SevenIsland_SevaultCanyon_Entrance_EventScript_Mason:: trainerbattle_single TRAINER_JUGGLER_MASON, SevenIsland_SevaultCanyon_Entrance_Text_MasonIntro, SevenIsland_SevaultCanyon_Entrance_Text_MasonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_Entrance_EventScript_MasonRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_Entrance_EventScript_MasonRematch msgbox SevenIsland_SevaultCanyon_Entrance_Text_MasonPostBattle, MSGBOX_AUTOCLOSE end @@ -2861,8 +2641,7 @@ SevenIsland_SevaultCanyon_Entrance_EventScript_MasonRematch:: SevenIsland_SevaultCanyon_Entrance_EventScript_Nicolas:: trainerbattle_single TRAINER_PKMN_RANGER_NICOLAS, SevenIsland_SevaultCanyon_Entrance_Text_NicolasIntro, SevenIsland_SevaultCanyon_Entrance_Text_NicolasDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_Entrance_EventScript_NicolasRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_Entrance_EventScript_NicolasRematch msgbox SevenIsland_SevaultCanyon_Entrance_Text_NicolasPostBattle, MSGBOX_AUTOCLOSE end @@ -2874,8 +2653,7 @@ SevenIsland_SevaultCanyon_Entrance_EventScript_NicolasRematch:: SevenIsland_SevaultCanyon_Entrance_EventScript_Madeline:: trainerbattle_single TRAINER_PKMN_RANGER_MADELINE, SevenIsland_SevaultCanyon_Entrance_Text_MadelineIntro, SevenIsland_SevaultCanyon_Entrance_Text_MadelineDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_Entrance_EventScript_MadelineRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_Entrance_EventScript_MadelineRematch msgbox SevenIsland_SevaultCanyon_Entrance_Text_MadelinePostBattle, MSGBOX_AUTOCLOSE end @@ -2887,8 +2665,7 @@ SevenIsland_SevaultCanyon_Entrance_EventScript_MadelineRematch:: SevenIsland_SevaultCanyon_EventScript_Cyndy:: trainerbattle_single TRAINER_CRUSH_GIRL_CYNDY, SevenIsland_SevaultCanyon_Text_CyndyIntro, SevenIsland_SevaultCanyon_Text_CyndyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_CyndyRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_CyndyRematch msgbox SevenIsland_SevaultCanyon_Text_CyndyPostBattle, MSGBOX_AUTOCLOSE end @@ -2900,8 +2677,7 @@ SevenIsland_SevaultCanyon_EventScript_CyndyRematch:: SevenIsland_SevaultCanyon_EventScript_Evan:: trainerbattle_single TRAINER_TAMER_EVAN, SevenIsland_SevaultCanyon_Text_EvanIntro, SevenIsland_SevaultCanyon_Text_EvanDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_EvanRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_EvanRematch msgbox SevenIsland_SevaultCanyon_Text_EvanPostBattle, MSGBOX_AUTOCLOSE end @@ -2913,8 +2689,7 @@ SevenIsland_SevaultCanyon_EventScript_EvanRematch:: SevenIsland_SevaultCanyon_EventScript_Jackson:: trainerbattle_single TRAINER_PKMN_RANGER_JACKSON, SevenIsland_SevaultCanyon_Text_JacksonIntro, SevenIsland_SevaultCanyon_Text_JacksonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_JacksonRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_JacksonRematch msgbox SevenIsland_SevaultCanyon_Text_JacksonPostBattle, MSGBOX_AUTOCLOSE end @@ -2926,8 +2701,7 @@ SevenIsland_SevaultCanyon_EventScript_JacksonRematch:: SevenIsland_SevaultCanyon_EventScript_Katelyn:: trainerbattle_single TRAINER_PKMN_RANGER_KATELYN, SevenIsland_SevaultCanyon_Text_KatelynIntro, SevenIsland_SevaultCanyon_Text_KatelynDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_KatelynRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_KatelynRematch msgbox SevenIsland_SevaultCanyon_Text_KatelynPostBattle, MSGBOX_AUTOCLOSE end @@ -2939,8 +2713,7 @@ SevenIsland_SevaultCanyon_EventScript_KatelynRematch:: SevenIsland_SevaultCanyon_EventScript_Leroy:: trainerbattle_single TRAINER_COOLTRAINER_LEROY, SevenIsland_SevaultCanyon_Text_LeroyIntro, SevenIsland_SevaultCanyon_Text_LeroyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_LeroyRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_LeroyRematch msgbox SevenIsland_SevaultCanyon_Text_LeroyPostBattle, MSGBOX_AUTOCLOSE end @@ -2952,8 +2725,7 @@ SevenIsland_SevaultCanyon_EventScript_LeroyRematch:: SevenIsland_SevaultCanyon_EventScript_Michelle:: trainerbattle_single TRAINER_COOLTRAINER_MICHELLE, SevenIsland_SevaultCanyon_Text_MichelleIntro, SevenIsland_SevaultCanyon_Text_MichelleDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_MichelleRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_MichelleRematch msgbox SevenIsland_SevaultCanyon_Text_MichellePostBattle, MSGBOX_AUTOCLOSE end @@ -2965,8 +2737,7 @@ SevenIsland_SevaultCanyon_EventScript_MichelleRematch:: SevenIsland_SevaultCanyon_EventScript_Lex:: trainerbattle_double TRAINER_COOL_COUPLE_LEX_NYA, SevenIsland_SevaultCanyon_Text_LexIntro, SevenIsland_SevaultCanyon_Text_LexDefeat, SevenIsland_SevaultCanyon_Text_LexNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_LexRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_LexRematch msgbox SevenIsland_SevaultCanyon_Text_LexPostBattle, MSGBOX_AUTOCLOSE end @@ -2978,8 +2749,7 @@ SevenIsland_SevaultCanyon_EventScript_LexRematch:: SevenIsland_SevaultCanyon_EventScript_Nya:: trainerbattle_double TRAINER_COOL_COUPLE_LEX_NYA, SevenIsland_SevaultCanyon_Text_NyaIntro, SevenIsland_SevaultCanyon_Text_NyaDefeat, SevenIsland_SevaultCanyon_Text_NyaNotEnoughMons specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_SevaultCanyon_EventScript_NyaRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_SevaultCanyon_EventScript_NyaRematch msgbox SevenIsland_SevaultCanyon_Text_NyaPostBattle, MSGBOX_AUTOCLOSE end @@ -2991,8 +2761,7 @@ SevenIsland_SevaultCanyon_EventScript_NyaRematch:: SevenIsland_TanobyRuins_EventScript_Brandon:: trainerbattle_single TRAINER_RUIN_MANIAC_BRANDON, SevenIsland_TanobyRuins_Text_BrandonIntro, SevenIsland_TanobyRuins_Text_BrandonDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_TanobyRuins_EventScript_BrandonRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_TanobyRuins_EventScript_BrandonRematch msgbox SevenIsland_TanobyRuins_Text_BrandonPostBattle, MSGBOX_AUTOCLOSE end @@ -3004,8 +2773,7 @@ SevenIsland_TanobyRuins_EventScript_BrandonRematch:: SevenIsland_TanobyRuins_EventScript_Benjamin:: trainerbattle_single TRAINER_RUIN_MANIAC_BENJAMIN, SevenIsland_TanobyRuins_Text_BenjaminIntro, SevenIsland_TanobyRuins_Text_BenjaminDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_TanobyRuins_EventScript_BenjaminRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_TanobyRuins_EventScript_BenjaminRematch msgbox SevenIsland_TanobyRuins_Text_BenjaminPostBattle, MSGBOX_AUTOCLOSE end @@ -3017,8 +2785,7 @@ SevenIsland_TanobyRuins_EventScript_BenjaminRematch:: SevenIsland_TanobyRuins_EventScript_Edna:: trainerbattle_single TRAINER_PAINTER_EDNA, SevenIsland_TanobyRuins_Text_EdnaIntro, SevenIsland_TanobyRuins_Text_EdnaDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_TanobyRuins_EventScript_EdnaRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_TanobyRuins_EventScript_EdnaRematch msgbox SevenIsland_TanobyRuins_Text_EdnaPostBattle, MSGBOX_AUTOCLOSE end @@ -3030,8 +2797,7 @@ SevenIsland_TanobyRuins_EventScript_EdnaRematch:: SevenIsland_TanobyRuins_EventScript_Clifford:: trainerbattle_single TRAINER_GENTLEMAN_CLIFFORD, SevenIsland_TanobyRuins_Text_CliffordIntro, SevenIsland_TanobyRuins_Text_CliffordDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SevenIsland_TanobyRuins_EventScript_CliffordRematch + goto_if_eq VAR_RESULT, TRUE, SevenIsland_TanobyRuins_EventScript_CliffordRematch msgbox SevenIsland_TanobyRuins_Text_CliffordPostBattle, MSGBOX_AUTOCLOSE end diff --git a/data/scripts/white_out.inc b/data/scripts/white_out.inc index 2f69a863c..6541d7a21 100644 --- a/data/scripts/white_out.inc +++ b/data/scripts/white_out.inc @@ -38,17 +38,14 @@ EventScript_FieldPoison:: textcolor NPC_TEXT_COLOR_NEUTRAL special TryFieldPoisonWhiteOut waitstate - compare VAR_RESULT, TRUE - goto_if_eq EventScript_FieldWhiteOut + goto_if_eq VAR_RESULT, TRUE, EventScript_FieldWhiteOut releaseall end EventScript_FieldWhiteOut:: checkmoney 1 - compare VAR_RESULT, FALSE - goto_if_eq EventScript_FieldWhiteOutNoMoney - compare VAR_RESULT, TRUE - goto_if_eq EventScript_FieldWhiteOutHasMoney + goto_if_eq VAR_RESULT, FALSE, EventScript_FieldWhiteOutNoMoney + goto_if_eq VAR_RESULT, TRUE, EventScript_FieldWhiteOutHasMoney end EventScript_FieldWhiteOutNoMoney::