Start event macro comment updates

This commit is contained in:
GriffinR
2021-08-05 12:46:11 -04:00
parent 70577e844d
commit f85de6eca5
42 changed files with 352 additions and 333 deletions

View File

@@ -56,20 +56,20 @@
STD_OBTAIN_DECORATION = 7 STD_OBTAIN_DECORATION = 7
STD_REGISTER_MATCH_CALL = 8 STD_REGISTER_MATCH_CALL = 8
@ Calls the standard function at index function. @ Executes the script in gStdScripts at index function.
.macro callstd function:req .macro callstd function:req
.byte 0x09 .byte 0x09
.byte \function .byte \function
.endm .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 .macro gotostd_if condition:req, function:req
.byte 0x0a .byte 0x0a
.byte \condition .byte \condition
.byte \function .byte \function
.endm .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 .macro callstd_if condition:req, function:req
.byte 0x0b .byte 0x0b
.byte \condition .byte \condition
@@ -120,6 +120,7 @@
.4byte \source .4byte \source
.endm .endm
@ TODO
@ Not sure. Judging from XSE's description I think it takes the least-significant byte in bank source and writes it to destination. @ 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 .macro setptrbyte source:req, destination:req
.byte 0x13 .byte 0x13
@@ -233,7 +234,7 @@
.endm .endm
@ Generic compare macro which attempts to deduce argument types based on their values @ Generic compare macro which attempts to deduce argument types based on their values
@ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8015 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 .macro compare var:req, arg:req
.if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END)) .if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END))
compare_var_to_var \var, \arg compare_var_to_var \var, \arg
@@ -242,38 +243,32 @@
.endif .endif
.endm .endm
@ Calls the native C function stored at `func`. @ Calls the native C function stored at func.
.macro callnative func:req .macro callnative func:req
.byte 0x23 .byte 0x23
.4byte \func .4byte \func
.endm .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 .macro gotonative func:req
.byte 0x24 .byte 0x24
.4byte \func .4byte \func
.endm .endm
@ Calls a special function; that is, a function 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 .macro special function:req
.byte 0x25 .byte 0x25
.2byte SPECIAL_\function .2byte SPECIAL_\function
.endm .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 .macro specialvar output:req, function:req
.byte 0x26 .byte 0x26
.2byte \output .2byte \output
.2byte SPECIAL_\function .2byte SPECIAL_\function
.endm .endm
@ temporary solution
.macro specialvar_ output:req, functionId:req
.byte 0x26
.2byte \output
.2byte \functionId
.endm
@ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific @ 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 @ 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). @ state, the script will remain blocked indefinitely (essentially a hang).
@@ -287,46 +282,46 @@
.2byte \frames .2byte \frames
.endm .endm
@ Sets a to 1. @ Sets flag to TRUE.
.macro setflag a:req .macro setflag flag:req
.byte 0x29 .byte 0x29
.2byte \a .2byte \flag
.endm .endm
@ Sets a to 0. @ Sets flag to FALSE.
.macro clearflag a:req .macro clearflag flag:req
.byte 0x2a .byte 0x2a
.2byte \a .2byte \flag
.endm .endm
@ Compares a to 1. @ Compares flag to TRUE and stores the result in comparisonResult to be used by goto_if, etc
.macro checkflag a:req @ See additional _if_unset and _if_set macros
.macro checkflag flag:req
.byte 0x2b .byte 0x2b
.2byte \a .2byte \flag
.endm .endm
@ Initializes the RTC`s local time offset to the given hour and minute. In FireRed, this command is a nop. @ Initializes the RTC`s local time offset to the given hour and minute.
.macro initclock hour:req, minute:req .macro initclock hour:req, minute:req
.byte 0x2c .byte 0x2c
.2byte \hour .2byte \hour
.2byte \minute .2byte \minute
.endm .endm
@ Runs time based events. In FireRed, this command is a nop. @ Runs time based events.
.macro dotimebasedevents .macro dotimebasedevents
.byte 0x2d .byte 0x2d
.endm .endm
@ Sets the values of variables 0x8000, 0x8001, and 0x8002 to the current hour, minute, and second. In FRLG, @ Sets the values of variables VAR_0x8000, VAR_0x8001, and VAR_0x8002 to the current hour, minute, and second.
@ this command sets those variables to zero.
.macro gettime .macro gettime
.byte 0x2e .byte 0x2e
.endm .endm
@ Plays the specified (sound_number) sound. Only one sound may play at a time, with newer ones interrupting older ones. @ Plays the specified (song) sound. Only one sound may play at a time, with newer ones interrupting older ones.
.macro playse sound_number:req .macro playse song:req
.byte 0x2f .byte 0x2f
.2byte \sound_number .2byte \song
.endm .endm
@ Blocks script execution until the currently-playing sound (triggered by playse) finishes playing. @ Blocks script execution until the currently-playing sound (triggered by playse) finishes playing.
@@ -335,9 +330,9 @@
.endm .endm
@ 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. @ 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 songNumber:req .macro playfanfare song:req
.byte 0x31 .byte 0x31
.2byte \songNumber .2byte \song
.endm .endm
@ Blocks script execution until all currently-playing fanfares finish. @ Blocks script execution until all currently-playing fanfares finish.
@@ -345,18 +340,18 @@
.byte 0x32 .byte 0x32
.endm .endm
@ Plays the specified (song_number) song. If save_song is TRUE, the @ Plays the specified song. If save_song is TRUE, the
@ specified (song_number) will be saved as if savebgm was called with it. @ specified song will be saved as if savebgm was called with it.
.macro playbgm song_number:req, save_song:req .macro playbgm song:req, save_song:req
.byte 0x33 .byte 0x33
.2byte \song_number .2byte \song
.byte \save_song .byte \save_song
.endm .endm
@ Saves the specified (song_number) song to be played later. @ Saves the specified song to be played later.
.macro savebgm song_number:req .macro savebgm song:req
.byte 0x34 .byte 0x34
.2byte \song_number .2byte \song
.endm .endm
@ Crossfades the currently-playing song into the map's default song. @ Crossfades the currently-playing song into the map's default song.
@@ -364,10 +359,10 @@
.byte 0x35 .byte 0x35
.endm .endm
@ Crossfades the currently-playng song into the specified (song_number) song. @ Crossfades the currently-playng song into the specified song.
.macro fadenewbgm song_number:req .macro fadenewbgm song:req
.byte 0x36 .byte 0x36
.2byte \song_number .2byte \song
.endm .endm
@ Fades out the currently-playing song. @ Fades out the currently-playing song.
@@ -382,32 +377,37 @@
.byte \speed .byte \speed
.endm .endm
@ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF, @ Warps the player to the specified map.
@ then the player will instead be sent to (X, Y) on the map. @ The player will warp to the coordinates of the given 'warp'.
.macro warp map:req, warp:req, X:req, Y:req @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro warp map:req, warp:req, x=0, y=0
.byte 0x39 .byte 0x39
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ Clone of warp that does not play a sound effect. @ Warps the player to the specified map without playing a sound effect.
.macro warpsilent map:req, warp:req, X:req, Y:req @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro warpsilent map:req, warp:req, x=0, y=0
.byte 0x3a .byte 0x3a
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ Clone of warp that plays a door opening animation before stepping upwards into it. @ Warps the player to the specified map and plays a door opening animation before stepping upwards into it.
.macro warpdoor map:req, warp:req, X:req, Y:req @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro warpdoor map:req, warp:req, x=0, y=0
.byte 0x3b .byte 0x3b
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ Warps the player to another map using a hole animation. @ Warps the player to another map using a hole animation.
@@ -416,57 +416,62 @@
map \map map \map
.endm .endm
@ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E. @ Warps the player to the specified map using a teleport effect.
.macro warpteleport map:req, warp:req, X:req, Y:req @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro warpteleport map:req, warp:req, x=0, y=0
.byte 0x3d .byte 0x3d
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ Sets the warp destination to be used later. @ Sets the warp destination to be used later.
.macro setwarp map:req, warp:req, X:req, Y:req @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro setwarp map:req, warp:req, x=0, y=0
.byte 0x3e .byte 0x3e
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ TODO
@ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to. @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to.
@ Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). @ 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 .macro setdynamicwarp map:req, warp:req, x:req, y:req
.byte 0x3f .byte 0x3f
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ Sets the destination that diving or emerging from a dive will take the player to. @ Sets the destination that diving or emerging from a dive will take the player to.
.macro setdivewarp map:req, warp:req, X:req, Y:req .macro setdivewarp map:req, warp:req, x:req, y:req
.byte 0x40 .byte 0x40
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ Sets the destination that falling into a hole will take the player to. @ Sets the destination that falling into a hole will take the player to.
.macro setholewarp map:req, warp:req, X:req, Y:req .macro setholewarp map:req, warp:req, x:req, y:req
.byte 0x41 .byte 0x41
map \map map \map
.byte \warp .byte \warp
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .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 .macro getplayerxy x:req, y:req
.byte 0x42 .byte 0x42
.2byte \X .2byte \x
.2byte \Y .2byte \y
.endm .endm
@ Retrieves the number of Pokemon in the player's party, and stores that number in VAR_RESULT. @ Retrieves the number of Pokemon in the player's party, and stores that number in VAR_RESULT.
@@ -482,7 +487,8 @@
.2byte \quantity .2byte \quantity
.endm .endm
@ Removes quantity of item index from the player's Bag. @ Removes quantity of item index 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 index:req, quantity=1 .macro removeitem index:req, quantity=1
.byte 0x45 .byte 0x45
.2byte \index .2byte \index
@@ -491,7 +497,7 @@
@ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to @ 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. @ TRUE if there is room, or FALSE is there is no room.
.macro checkitemspace index:req, quantity:req .macro checkitemspace index:req, quantity=1
.byte 0x46 .byte 0x46
.2byte \index .2byte \index
.2byte \quantity .2byte \quantity
@@ -499,53 +505,53 @@
@ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has @ 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. @ enough of the item, or FALSE if they have fewer than quantity of the item.
.macro checkitem index:req, quantity:req .macro checkitem index:req, quantity=1
.byte 0x47 .byte 0x47
.2byte \index .2byte \index
.2byte \quantity .2byte \quantity
.endm .endm
@ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. @ 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). @ This is used to show the name of the proper Bag pocket when the player receives an item via callstd.
.macro checkitemtype index:req .macro checkitemtype index:req
.byte 0x48 .byte 0x48
.2byte \index .2byte \index
.endm .endm
@ Adds a quantity amount of item index to the player's PC. Both arguments can be variables. @ Adds a quantity amount of item index to the player's PC.
.macro addpcitem index:req, quantity:req .macro addpcitem index:req, quantity=1
.byte 0x49 .byte 0x49
.2byte \index .2byte \index
.2byte \quantity .2byte \quantity
.endm .endm
@ Checks for quantity amount of item index in the player's PC. Both arguments can be variables. @ Checks for quantity amount of item index in the player's PC.
.macro checkpcitem index:req, quantity:req .macro checkpcitem index:req, quantity=1
.byte 0x4a .byte 0x4a
.2byte \index .2byte \index
.2byte \quantity .2byte \quantity
.endm .endm
@ Adds decoration to the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) @ Adds decoration to the player's PC.
.macro adddecoration decoration:req .macro adddecoration decoration:req
.byte 0x4b .byte 0x4b
.2byte \decoration .2byte \decoration
.endm .endm
@ Removes a decoration from the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) @ Removes a decoration from the player's PC.
.macro removedecoration decoration:req .macro removedecoration decoration:req
.byte 0x4c .byte 0x4c
.2byte \decoration .2byte \decoration
.endm .endm
@ Checks for decoration in the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) @ Checks for decoration in the player's PC.
.macro checkdecor decoration:req .macro checkdecor decoration:req
.byte 0x4d .byte 0x4d
.2byte \decoration .2byte \decoration
.endm .endm
@ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or @ Checks if the player has enough space in their PC to hold decoration.
@ FALSE is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.) @ Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room.
.macro checkdecorspace decoration:req .macro checkdecorspace decoration:req
.byte 0x4e .byte 0x4e
.2byte \decoration .2byte \decoration
@@ -568,7 +574,7 @@
.endm .endm
@ Blocks script execution until the movements being applied to the specified (index) Object finish. @ 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 @ If the specified Object is 0, then the command will block script execution until all Objects
@ affected by applymovement finish their movements. If the specified Object is not currently being @ affected by applymovement finish their movements. If the specified Object is not currently being
@ manipulated with applymovement, then this command does nothing. @ manipulated with applymovement, then this command does nothing.
@ If no map is specified, then the current map is used. @ If no map is specified, then the current map is used.
@@ -583,9 +589,8 @@
.endif .endif
.endm .endm
@ Attempts to hide the specified (index) Object on the specified (map_group, map_num) map, @ Attempts to despawn the specified (index) 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 @ It also sets the object's visibility flag if it has one.
@ visibility flag, this command does nothing.
@ If no map is specified, then the current map is used. @ If no map is specified, then the current map is used.
.macro removeobject index:req, map .macro removeobject index:req, map
.ifb \map .ifb \map
@@ -598,8 +603,8 @@
.endif .endif
.endm .endm
@ Unsets the specified (index) Object's visibility flag on the specified (map_group, map_num) map if it has a valid one. @ Attempts to spawn the specified (index) Object the specified (map_group, map_num) map.
@ If the Object does not have a valid visibility flag, this command does nothing. @ Note that unlike removeobject this does not modify the OObject's flag.
@ If no map is specified, then the current map is used. @ If no map is specified, then the current map is used.
.macro addobject index:req, map .macro addobject index:req, map
.ifb \map .ifb \map
@@ -632,7 +637,7 @@
map \map map \map
.endm .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. @ If the script was called by an Object, then that Object will turn to face toward the player.
.macro faceplayer .macro faceplayer
.byte 0x5a .byte 0x5a
.endm .endm
@@ -643,7 +648,7 @@
.byte \direction .byte \direction
.endm .endm
@ If the Trainer flag for Trainer index is not set, this command does absolutely nothing. @ TODO
.macro trainerbattle type:req, trainer:req, local_id:req, pointer1:req, pointer2, pointer3, pointer4 .macro trainerbattle type:req, trainer:req, local_id:req, pointer1:req, pointer2, pointer3, pointer4
.byte 0x5c .byte 0x5c
.byte \type .byte \type
@@ -996,15 +1001,15 @@
.2byte \slot .2byte \slot
.endm .endm
@ Writes the name of the item at index item to the specified buffer. If the specified index is larger than @ Writes the name of the item at index item to the specified buffer. If the specified index is >= ITEMS_COUNT,
@ the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. @ then the name of ITEM_NONE ("????????") is buffered instead.
.macro bufferitemname out:req, item:req .macro bufferitemname out:req, item:req
.byte 0x80 .byte 0x80
.byte \out .byte \out
.2byte \item .2byte \item
.endm .endm
@ Writes the name of the decoration at index decoration to the specified buffer. In FireRed, this command is a nop. @ Writes the name of the decoration at index 'decoration' to the specified buffer.
.macro bufferdecorationname out:req, decoration:req .macro bufferdecorationname out:req, decoration:req
.byte 0x81 .byte 0x81
.byte \out .byte \out
@@ -1052,7 +1057,7 @@
.4byte \products .4byte \products
.endm .endm
@ Apparent clone of pokemartdecoration. @ Identical to pokemartdecoration, but with slight changes to the clerk dialogue. See uses of MART_TYPE_DECOR2.
.macro pokemartdecoration2 products:req .macro pokemartdecoration2 products:req
.byte 0x88 .byte 0x88
.4byte \products .4byte \products
@@ -1064,7 +1069,7 @@
.2byte \word .2byte \word
.endm .endm
@ Sets a berry tree's specific berry and growth stage. In FireRed, this command is a nop. @ Sets a berry tree's specific berry and growth stage.
.macro setberrytree tree_id:req, berry:req, growth_stage:req .macro setberrytree tree_id:req, berry:req, growth_stage:req
.byte 0x8a .byte 0x8a
.byte \tree_id .byte \tree_id
@@ -1072,60 +1077,63 @@
.byte \growth_stage .byte \growth_stage
.endm .endm
@ This allows you to choose a Pokemon to use in a contest. In FireRed, this command sets the byte at 0x03000EA8 to 0x01. @ This allows you to choose a Pokemon to use in a contest
.macro choosecontestmon .macro choosecontestmon
.byte 0x8b .byte 0x8b
.endm .endm
@ Starts a contest. In FireRed, this command is a nop. @ Starts a contest.
.macro startcontest .macro startcontest
.byte 0x8c .byte 0x8c
.endm .endm
@ Shows the results of a contest. In FireRed, this command is a nop. @ Shows the results of a contest.
.macro showcontestresults .macro showcontestresults
.byte 0x8d .byte 0x8d
.endm .endm
@ Starts a contest over a link connection. In FireRed, this command is a nop. @ Starts a contest over a link connection.
.macro contestlinktransfer .macro contestlinktransfer
.byte 0x8e .byte 0x8e
.endm .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 .macro random limit:req
.byte 0x8f .byte 0x8f
.2byte \limit .2byte \limit
.endm .endm
@ If check is 0x00, this command adds value to the player's money. @ Adds value to the player's money. If adding 'value' money would exceed MAX_MONEY, the player's money is set to MAX_MONEY.
.macro addmoney value:req, check:req @ If 'disable' is set to anything but 0 then this command does nothing.
.macro addmoney value:req, disable=0
.byte 0x90 .byte 0x90
.4byte \value .4byte \value
.byte \check .byte \disable
.endm .endm
@ If check is 0x00, this command subtracts value from the player's money. @ Subtracts value from the player's money. If the player has less than 'value' money, their money is set to 0.
.macro removemoney value:req, check:req @ If 'disable' is set to anything but 0 then this command does nothing.
.macro removemoney value:req, disable=0
.byte 0x91 .byte 0x91
.4byte \value .4byte \value
.byte \check .byte \disable
.endm .endm
@ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player @ 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.
@ 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, check:req .macro checkmoney value:req, disable=0
.byte 0x92 .byte 0x92
.4byte \value .4byte \value
.byte \check .byte \disable
.endm .endm
@ Spawns a secondary box showing how much money the player has. @ Spawns a secondary box showing how much money the player has.
.macro showmoneybox x:req, y:req, check:req @ If 'disable' is set to anything but 0 then this command does nothing.
.macro showmoneybox x:req, y:req, disable=0
.byte 0x93 .byte 0x93
.byte \x .byte \x
.byte \y .byte \y
.byte \check .byte \disable
.endm .endm
@ Hides the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out. @ Hides the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out.
@@ -1135,15 +1143,16 @@
.byte 0 @ \y .byte 0 @ \y
.endm .endm
@ Updates the secondary box spawned by showmoney. Consumes but does not use arguments. @ Updates the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out.
.macro updatemoneybox x:req, y:req @ If 'disable' is set to anything but 0 then this command does nothing.
.macro updatemoneybox disable=0
.byte 0x95 .byte 0x95
.byte \x .byte 0 @ \x
.byte \y .byte 0 @ \y
.byte 0 @ 1 = don't perform this command. Always 0 in vanilla. Why this is a thing is beyond me. .byte \disable
.endm .endm
@ Gets the price reduction for the index given. In FireRed, this command is a nop. @ Gets the price reduction for the index given.
.macro getpricereduction index:req .macro getpricereduction index:req
.byte 0x96 .byte 0x96
.2byte \index .2byte \index
@@ -1177,7 +1186,7 @@
.4byte \pointer .4byte \pointer
.endm .endm
@ Executes the specified field move animation. @ Executes the specified field effect animation.
.macro dofieldeffect animation:req .macro dofieldeffect animation:req
.byte 0x9c .byte 0x9c
.2byte \animation .2byte \animation
@@ -1202,12 +1211,12 @@
.2byte \heallocation .2byte \heallocation
.endm .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 .macro checkplayergender
.byte 0xa0 .byte 0xa0
.endm .endm
@ Plays the specified (species) Pokemon's cry. You can use waitcry to block script execution until the sound finishes. @ Plays the specified (species) Pokemon's cry. You can use waitmoncry to block script execution until the sound finishes.
.macro playmoncry species:req, mode:req .macro playmoncry species:req, mode:req
.byte 0xa1 .byte 0xa1
.2byte \species .2byte \species
@@ -1279,14 +1288,14 @@
.byte \direction .byte \direction
.endm .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 .macro opendoor x:req, y:req
.byte 0xac .byte 0xac
.2byte \x .2byte \x
.2byte \y .2byte \y
.endm .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 .macro closedoor x:req, y:req
.byte 0xad .byte 0xad
.2byte \x .2byte \x
@@ -1312,7 +1321,7 @@
.2byte \y .2byte \y
.endm .endm
@ In Emerald, this command consumes its parameters and does nothing. In FireRed, this command is a nop. @ Consumes its parameters and does nothing. It is implemented but unused in Ruby/Sapphire.
.macro addelevmenuitem a:req, b:req, c:req, d:req .macro addelevmenuitem a:req, b:req, c:req, d:req
.byte 0xb1 .byte 0xb1
.byte \a .byte \a
@@ -1321,27 +1330,33 @@
.2byte \d .2byte \d
.endm .endm
@ In FireRed and Emerald, this command is a nop. @ Does nothing. It is implemented but unused in Ruby/Sapphire.
.macro showelevmenu .macro showelevmenu
.byte 0xb2 .byte 0xb2
.endm .endm
@ Gets the number of coins the player has and stores it in the variable 'out'.
.macro checkcoins out:req .macro checkcoins out:req
.byte 0xb3 .byte 0xb3
.2byte \out .2byte \out
.endm .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 .macro addcoins count:req
.byte 0xb4 .byte 0xb4
.2byte \count .2byte \count
.endm .endm
@ 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 .macro removecoins count:req
.byte 0xb5 .byte 0xb5
.2byte \count .2byte \count
.endm .endm
@ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect @ 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. @ normal wild battles. You start the prepared battle with dowildbattle.
.macro setwildbattle species:req, level:req, item:req .macro setwildbattle species:req, level:req, item:req
.byte 0xb6 .byte 0xb6
@@ -1419,14 +1434,16 @@
.byte \y .byte \y
.endm .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 .macro incrementgamestat stat:req
.byte 0xc3 .byte 0xc3
.byte \stat .byte \stat
.endm .endm
@ Sets the destination that using an Escape Rope or Dig will take the player to. @ 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 @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro setescapewarp map:req, warp:req, x=0, y=0
.byte 0xc4 .byte 0xc4
map \map map \map
.byte \warp .byte \warp
@@ -1446,42 +1463,33 @@
.2byte \box .2byte \box
.endm .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.
@ Used only in FireRed/LeafGreen, does nothing in Emerald. @ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro textcolor color:req .macro textcolor color:req
.byte 0xc7 .byte 0xc7
.byte \color .byte \color
.endm .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.
@ Used only in FireRed/LeafGreen, does nothing in Emerald. @ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro loadhelp pointer:req .macro loadhelp pointer:req
.byte 0xc8 .byte 0xc8
.4byte \pointer .4byte \pointer
.endm .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.
@ Used only in FireRed/LeafGreen, does nothing in Emerald. @ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro unloadhelp .macro unloadhelp
.byte 0xc9 .byte 0xc9
.endm .endm
@ After using this command, all standard message boxes will use the signpost frame.
@ Used only in FireRed/LeafGreen, does nothing in Emerald. @ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro signmsg .macro signmsg
.byte 0xca .byte 0xca
.endm .endm
@ Ends the effects of signmsg, returning message box frames to normal.
@ Used only in FireRed/LeafGreen, does nothing in Emerald. @ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro normalmsg .macro normalmsg
.byte 0xcb .byte 0xcb
.endm .endm
@ Compares the value of a hidden variable to a dword.
@ Used only in FireRed/LeafGreen, does nothing in Emerald. @ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro comparehiddenvar a:req, value:req .macro comparehiddenvar a:req, value:req
.byte 0xcc .byte 0xcc
@@ -1489,26 +1497,25 @@
.4byte \value .4byte \value
.endm .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 .macro setmoneventlegal slot:req
.byte 0xcd .byte 0xcd
.2byte \slot .2byte \slot
.endm .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. @ 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 .macro checkmoneventlegal slot:req
.byte 0xce .byte 0xce
.2byte \slot .2byte \slot
.endm .endm
@ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the @ Jumps to the ram script saved from a Wonder Card. If there is no valid saved Wonder Card or if the
@ offset specified by the pointer at 0x020375C0. @ ram script is invalid then this does nothing.
.macro gotoram .macro gotowondercardscript
.byte 0xcf .byte 0xcf
.endm .endm
@ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot.
@ Used only in FireRed/LeafGreen, does nothing in Emerald. @ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro setworldmapflag worldmapflag:req .macro setworldmapflag worldmapflag:req
.byte 0xd0 .byte 0xd0
@@ -1516,7 +1523,9 @@
.endm .endm
@ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source] @ 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 @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro warpteleport2 map:req, warp:req, x=0, y=0
.byte 0xd1 .byte 0xd1
map \map map \map
.byte \warp .byte \warp
@@ -1545,7 +1554,7 @@
@ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects. @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects.
@ isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset @ isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset
@ the puzzle tiles start. In FireRed, this command is a nop. @ the puzzle tiles start.
.macro initrotatingtilepuzzle isTrickHouse:req .macro initrotatingtilepuzzle isTrickHouse:req
.byte 0xd5 .byte 0xd5
.2byte \isTrickHouse .2byte \isTrickHouse
@@ -1556,10 +1565,12 @@
.byte 0xd6 .byte 0xd6
.endm .endm
.macro warpmossdeepgym map:req, warpId:req, x:req, y:req @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro warpmossdeepgym map:req, warp:req, x=0, y=0
.byte 0xd7 .byte 0xd7
map \map map \map
.byte \warpId .byte \warp
.2byte \x .2byte \x
.2byte \y .2byte \y
.endm .endm
@@ -1603,12 +1614,14 @@
.4byte \pointer .4byte \pointer
.endm .endm
.macro warpsootopolislegend map:req, byte:req, word1:req, word2:req @ The player will warp to the coordinates of the given 'warp'.
@ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead.
.macro warpsootopolislegend map:req, warp:req, x=0, y=0
.byte 0xe0 .byte 0xe0
map \map map \map
.byte \byte .byte \warp
.2byte \word1 .2byte \x
.2byte \word2 .2byte \y
.endm .endm
.macro buffercontesttypestring out:req, word:req .macro buffercontesttypestring out:req, word:req
@@ -1617,10 +1630,9 @@
.2byte \word .2byte \word
.endm .endm
@ Writes the name of the specified (item) item to the specified buffer. If the specified item is a Berry (0x85 - 0xAE) or @ Writes the name of the specified (item) item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL
@ Poke Ball (0x4) and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). @ and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended).
@ If the specified item is the Enigma Berry, I have no idea what this command does (but testing showed no pluralization). @ If the specified item is >= ITEMS_COUNT then the name of ITEM_NONE ("????????") is buffered instead.
@ If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead.
.macro bufferitemnameplural out:req, item:req, quantity:req .macro bufferitemnameplural out:req, item:req, quantity:req
.byte 0xe2 .byte 0xe2
.byte \out .byte \out
@@ -1753,6 +1765,7 @@
MSGBOX_YESNO = 5 MSGBOX_YESNO = 5
MSGBOX_AUTOCLOSE = 6 MSGBOX_AUTOCLOSE = 6
MSGBOX_GETPOINTS = 9 MSGBOX_GETPOINTS = 9
MSGBOX_POKENAV = 10
YES = 1 YES = 1
NO = 0 NO = 0
@@ -1762,6 +1775,10 @@
callstd \type callstd \type
.endm .endm
@ 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 .macro giveitem item:req, amount=1
setorcopyvar VAR_0x8000, \item setorcopyvar VAR_0x8000, \item
setorcopyvar VAR_0x8001, \amount setorcopyvar VAR_0x8001, \amount

View File

@@ -99,7 +99,7 @@ gStdScripts::
.4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION .4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION
.4byte Std_RegisteredInMatchCall @ STD_REGISTER_MATCH_CALL .4byte Std_RegisteredInMatchCall @ STD_REGISTER_MATCH_CALL
.4byte Std_MsgboxGetPoints @ MSGBOX_GETPOINTS .4byte Std_MsgboxGetPoints @ MSGBOX_GETPOINTS
.4byte Std_10 .4byte Std_MsgboxPokenav @ MSGBOX_POKENAV
gStdScripts_End:: gStdScripts_End::
.include "data/maps/PetalburgCity/scripts.inc" .include "data/maps/PetalburgCity/scripts.inc"

View File

@@ -5,7 +5,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide::
lock lock
faceplayer faceplayer
goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
checkitem ITEM_SCANNER, 1 checkitem ITEM_SCANNER
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner goto_if_eq AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus

View File

@@ -27,7 +27,7 @@ AbandonedShip_Corridors_B1F_EventScript_TuberM::
AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor:: AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor::
lockall lockall
goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked
checkitem ITEM_STORAGE_KEY, 1 checkitem ITEM_STORAGE_KEY
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked
msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT

View File

@@ -53,7 +53,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom6::
AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door::
lockall lockall
goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
checkitem ITEM_ROOM_1_KEY, 1 checkitem ITEM_ROOM_1_KEY
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
@@ -68,7 +68,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door::
AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door::
lockall lockall
goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
checkitem ITEM_ROOM_2_KEY, 1 checkitem ITEM_ROOM_2_KEY
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
@@ -83,7 +83,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door::
AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door::
lockall lockall
goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
checkitem ITEM_ROOM_4_KEY, 1 checkitem ITEM_ROOM_4_KEY
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
@@ -98,7 +98,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door::
AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door::
lockall lockall
goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
checkitem ITEM_ROOM_6_KEY, 1 checkitem ITEM_ROOM_6_KEY
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT

View File

@@ -56,7 +56,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor::
end end
BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem:: BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem::
checkitemspace VAR_0x8009, 1 checkitemspace VAR_0x8009
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_BagFull goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_BagFull
copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8004, VAR_0x8008

View File

@@ -20,7 +20,7 @@ BattleFrontier_OutsideWest_EventScript_FerryAttendant::
lock lock
faceplayer faceplayer
msgbox BattleFrontier_OutsideWest_Text_MayISeeYourTicket, MSGBOX_DEFAULT msgbox BattleFrontier_OutsideWest_Text_MayISeeYourTicket, MSGBOX_DEFAULT
checkitem ITEM_SS_TICKET, 1 checkitem ITEM_SS_TICKET
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_OutsideWest_EventScript_NoSSTicket goto_if_eq BattleFrontier_OutsideWest_EventScript_NoSSTicket
message BattleFrontier_OutsideWest_Text_WhereWouldYouLikeToGo message BattleFrontier_OutsideWest_Text_WhereWouldYouLikeToGo

View File

@@ -5,7 +5,7 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo::
lock lock
faceplayer faceplayer
goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite
checkitem ITEM_METEORITE, 1 checkitem ITEM_METEORITE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite
msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT

View File

@@ -14,7 +14,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner::
end end
FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove:: FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove::
checkitem ITEM_HEART_SCALE, 1 checkitem ITEM_HEART_SCALE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale
msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO

View File

@@ -55,7 +55,7 @@ FortreeCity_EventScript_GymSign::
FortreeCity_EventScript_Kecleon:: FortreeCity_EventScript_Kecleon::
lock lock
faceplayer faceplayer
checkitem ITEM_DEVON_SCOPE, 1 checkitem ITEM_DEVON_SCOPE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq FortreeCity_EventScript_AskUseDevonScope goto_if_eq FortreeCity_EventScript_AskUseDevonScope
msgbox FortreeCity_Text_SomethingUnseeable, MSGBOX_DEFAULT msgbox FortreeCity_Text_SomethingUnseeable, MSGBOX_DEFAULT

View File

@@ -13,7 +13,7 @@ JaggedPass_OnResume:
end end
JaggedPass_EventScript_CheckHasMagmaEmblem:: JaggedPass_EventScript_CheckHasMagmaEmblem::
checkitem ITEM_MAGMA_EMBLEM, 1 checkitem ITEM_MAGMA_EMBLEM
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout
return return

View File

@@ -71,7 +71,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_VendingMachine::
lockall lockall
message LilycoveCity_DepartmentStoreRooftop_Text_WhichDrinkWouldYouLike message LilycoveCity_DepartmentStoreRooftop_Text_WhichDrinkWouldYouLike
waitmessage waitmessage
showmoneybox 0, 0, 0 showmoneybox 0, 0
goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseDrink goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseDrink
end end
@@ -102,27 +102,27 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_Lemonade::
end end
LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater:: LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater::
checkmoney 200, 0 checkmoney 200
return return
LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop:: LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop::
checkmoney 300, 0 checkmoney 300
return return
LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade:: LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade::
checkmoney 350, 0 checkmoney 350
return return
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater:: LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater::
removemoney 200, 0 removemoney 200
return return
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop:: LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop::
removemoney 300, 0 removemoney 300
return return
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade:: LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade::
removemoney 350, 0 removemoney 350
return return
LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
@@ -134,7 +134,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink
checkitemspace VAR_TEMP_0, 1 checkitemspace VAR_TEMP_0
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
compare VAR_TEMP_1, 0 compare VAR_TEMP_1, 0
@@ -143,7 +143,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop
compare VAR_TEMP_1, 2 compare VAR_TEMP_1, 2
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade
updatemoneybox 0, 0 updatemoneybox
bufferitemname 0, VAR_TEMP_0 bufferitemname 0, VAR_TEMP_0
playse SE_VEND playse SE_VEND
msgbox LilycoveCity_DepartmentStoreRooftop_Text_CanOfDrinkDroppedDown, MSGBOX_DEFAULT msgbox LilycoveCity_DepartmentStoreRooftop_Text_CanOfDrinkDroppedDown, MSGBOX_DEFAULT
@@ -154,7 +154,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
random 64 @ 1/64 chance of an additional drink dropping random 64 @ 1/64 chance of an additional drink dropping
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
checkitemspace VAR_TEMP_0, 1 checkitemspace VAR_TEMP_0
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
playse SE_VEND playse SE_VEND
@@ -166,7 +166,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
checkitemspace VAR_TEMP_0, 1 checkitemspace VAR_TEMP_0
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
playse SE_VEND playse SE_VEND

View File

@@ -114,7 +114,7 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontier::
LilycoveCity_Harbor_EventScript_GetEonTicketState:: LilycoveCity_Harbor_EventScript_GetEonTicketState::
setvar VAR_TEMP_E, 0 setvar VAR_TEMP_E, 0
goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, Common_EventScript_NopReturn goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, Common_EventScript_NopReturn
checkitem ITEM_EON_TICKET, 1 checkitem ITEM_EON_TICKET
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_E, 1 setvar VAR_TEMP_E, 1
@@ -125,7 +125,7 @@ LilycoveCity_Harbor_EventScript_GetEonTicketState::
LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: LilycoveCity_Harbor_EventScript_GetAuroraTicketState::
setvar VAR_TEMP_D, 0 setvar VAR_TEMP_D, 0
goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn
checkitem ITEM_AURORA_TICKET, 1 checkitem ITEM_AURORA_TICKET
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_D, 1 setvar VAR_TEMP_D, 1
@@ -136,7 +136,7 @@ LilycoveCity_Harbor_EventScript_GetAuroraTicketState::
LilycoveCity_Harbor_EventScript_GetOldSeaMapState:: LilycoveCity_Harbor_EventScript_GetOldSeaMapState::
setvar VAR_TEMP_C, 0 setvar VAR_TEMP_C, 0
goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn
checkitem ITEM_OLD_SEA_MAP, 1 checkitem ITEM_OLD_SEA_MAP
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_C, 1 setvar VAR_TEMP_C, 1
@@ -147,7 +147,7 @@ LilycoveCity_Harbor_EventScript_GetOldSeaMapState::
LilycoveCity_Harbor_EventScript_GetMysticTicketState:: LilycoveCity_Harbor_EventScript_GetMysticTicketState::
setvar VAR_TEMP_9, 0 setvar VAR_TEMP_9, 0
goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn
checkitem ITEM_MYSTIC_TICKET, 1 checkitem ITEM_MYSTIC_TICKET
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_9, 1 setvar VAR_TEMP_9, 1

View File

@@ -71,10 +71,10 @@ MauvilleCity_BikeShop_EventScript_AskSwitchBikes::
@ If the player does not have a bike on them Rydel assumes its stored in the PC @ If the player does not have a bike on them Rydel assumes its stored in the PC
MauvilleCity_BikeShop_EventScript_SwitchBikes:: MauvilleCity_BikeShop_EventScript_SwitchBikes::
msgbox MauvilleCity_BikeShop_Text_IllSwitchBikes, MSGBOX_DEFAULT msgbox MauvilleCity_BikeShop_Text_IllSwitchBikes, MSGBOX_DEFAULT
checkitem ITEM_ACRO_BIKE, 1 checkitem ITEM_ACRO_BIKE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach
checkitem ITEM_MACH_BIKE, 1 checkitem ITEM_MACH_BIKE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro
msgbox MauvilleCity_BikeShop_Text_OhYourBikeIsInPC, MSGBOX_DEFAULT msgbox MauvilleCity_BikeShop_Text_OhYourBikeIsInPC, MSGBOX_DEFAULT

View File

@@ -16,12 +16,12 @@ MauvilleCity_GameCorner_EventScript_CoinsClerk::
lock lock
faceplayer faceplayer
msgbox MauvilleCity_GameCorner_Text_ThisIsMauvilleGameCorner, MSGBOX_DEFAULT msgbox MauvilleCity_GameCorner_Text_ThisIsMauvilleGameCorner, MSGBOX_DEFAULT
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NeedCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NeedCoinCase
message MauvilleCity_GameCorner_Text_WereYouLookingForCoins message MauvilleCity_GameCorner_Text_WereYouLookingForCoins
waitmessage waitmessage
showmoneybox 0, 0, 0 showmoneybox 0, 0
showcoinsbox 1, 6 showcoinsbox 1, 6
goto MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault50 goto MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault50
@@ -46,12 +46,12 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins::
checkcoins VAR_TEMP_1 checkcoins VAR_TEMP_1
compare VAR_TEMP_1, (MAX_COINS + 1 - 50) compare VAR_TEMP_1, (MAX_COINS + 1 - 50)
goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins
checkmoney COINS_PRICE_50, 0 checkmoney COINS_PRICE_50
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney
addcoins 50 addcoins 50
removemoney COINS_PRICE_50, 0 removemoney COINS_PRICE_50
updatemoneybox 0, 0 updatemoneybox
updatecoinsbox 1, 6 updatecoinsbox 1, 6
playse SE_SHOP playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT
@@ -64,12 +64,12 @@ MauvilleCity_GameCorner_EventScript_Buy500Coins::
checkcoins VAR_TEMP_1 checkcoins VAR_TEMP_1
compare VAR_TEMP_1, (MAX_COINS + 1 - 500) compare VAR_TEMP_1, (MAX_COINS + 1 - 500)
goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins
checkmoney COINS_PRICE_500, 0 checkmoney COINS_PRICE_500
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney
addcoins 500 addcoins 500
removemoney COINS_PRICE_500, 0 removemoney COINS_PRICE_500
updatemoneybox 0, 0 updatemoneybox
updatecoinsbox 1, 6 updatecoinsbox 1, 6
playse SE_SHOP playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT
@@ -108,7 +108,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerDolls::
lock lock
faceplayer faceplayer
msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage
release release
@@ -229,7 +229,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerTMs::
lock lock
faceplayer faceplayer
msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage
release release
@@ -306,7 +306,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM32::
checkcoins VAR_TEMP_2 checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM32_COINS compare VAR_TEMP_2, TM32_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM32, 1 checkitemspace ITEM_TM32
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM32_COINS removecoins TM32_COINS
@@ -321,7 +321,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM29::
checkcoins VAR_TEMP_2 checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM29_COINS compare VAR_TEMP_2, TM29_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM29, 1 checkitemspace ITEM_TM29
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM29_COINS removecoins TM29_COINS
@@ -336,7 +336,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM35::
checkcoins VAR_TEMP_2 checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM35_COINS compare VAR_TEMP_2, TM35_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM35, 1 checkitemspace ITEM_TM35
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM35_COINS removecoins TM35_COINS
@@ -351,7 +351,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM24::
checkcoins VAR_TEMP_2 checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM24_COINS compare VAR_TEMP_2, TM24_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM24, 1 checkitemspace ITEM_TM24
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM24_COINS removecoins TM24_COINS
@@ -366,7 +366,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM13::
checkcoins VAR_TEMP_2 checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM13_COINS compare VAR_TEMP_2, TM13_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM13, 1 checkitemspace ITEM_TM13
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM13_COINS removecoins TM13_COINS
@@ -466,7 +466,7 @@ MauvilleCity_GameCorner_EventScript_ReceivedStarterDoll::
MauvilleCity_GameCorner_EventScript_PokefanM:: MauvilleCity_GameCorner_EventScript_PokefanM::
lock lock
faceplayer faceplayer
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_GameCorner_EventScript_TryGive20Coins goto_if_eq MauvilleCity_GameCorner_EventScript_TryGive20Coins
msgbox MauvilleCity_GameCorner_Text_NeedCoinCaseGoNextDoor, MSGBOX_DEFAULT msgbox MauvilleCity_GameCorner_Text_NeedCoinCaseGoNextDoor, MSGBOX_DEFAULT
@@ -534,7 +534,7 @@ MauvilleCity_GameCorner_EventScript_Woman::
MauvilleCity_GameCorner_EventScript_SlotMachine0:: MauvilleCity_GameCorner_EventScript_SlotMachine0::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
@@ -545,7 +545,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine0::
MauvilleCity_GameCorner_EventScript_SlotMachine1:: MauvilleCity_GameCorner_EventScript_SlotMachine1::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 1 setvar VAR_0x8004, 1
@@ -556,7 +556,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine1::
MauvilleCity_GameCorner_EventScript_SlotMachine2:: MauvilleCity_GameCorner_EventScript_SlotMachine2::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 2 setvar VAR_0x8004, 2
@@ -567,7 +567,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine2::
MauvilleCity_GameCorner_EventScript_SlotMachine3:: MauvilleCity_GameCorner_EventScript_SlotMachine3::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 3 setvar VAR_0x8004, 3
@@ -578,7 +578,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine3::
MauvilleCity_GameCorner_EventScript_SlotMachine4:: MauvilleCity_GameCorner_EventScript_SlotMachine4::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 4 setvar VAR_0x8004, 4
@@ -589,7 +589,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine4::
MauvilleCity_GameCorner_EventScript_SlotMachine5:: MauvilleCity_GameCorner_EventScript_SlotMachine5::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 5 setvar VAR_0x8004, 5
@@ -600,7 +600,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine5::
MauvilleCity_GameCorner_EventScript_SlotMachine6:: MauvilleCity_GameCorner_EventScript_SlotMachine6::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 6 setvar VAR_0x8004, 6
@@ -611,7 +611,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine6::
MauvilleCity_GameCorner_EventScript_SlotMachine7:: MauvilleCity_GameCorner_EventScript_SlotMachine7::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 7 setvar VAR_0x8004, 7
@@ -622,7 +622,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine7::
MauvilleCity_GameCorner_EventScript_SlotMachine8:: MauvilleCity_GameCorner_EventScript_SlotMachine8::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 8 setvar VAR_0x8004, 8
@@ -633,7 +633,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine8::
MauvilleCity_GameCorner_EventScript_SlotMachine9:: MauvilleCity_GameCorner_EventScript_SlotMachine9::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 9 setvar VAR_0x8004, 9
@@ -644,7 +644,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine9::
MauvilleCity_GameCorner_EventScript_SlotMachine10:: MauvilleCity_GameCorner_EventScript_SlotMachine10::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 10 setvar VAR_0x8004, 10
@@ -655,7 +655,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine10::
MauvilleCity_GameCorner_EventScript_SlotMachine11:: MauvilleCity_GameCorner_EventScript_SlotMachine11::
lockall lockall
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 11 setvar VAR_0x8004, 11

View File

@@ -6,7 +6,7 @@ MauvilleCity_House2_EventScript_Woman::
faceplayer faceplayer
goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_ReceivedCoinCase goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_ReceivedCoinCase
msgbox MauvilleCity_House2_Text_BuyHarborMailAtSlateport, MSGBOX_DEFAULT msgbox MauvilleCity_House2_Text_BuyHarborMailAtSlateport, MSGBOX_DEFAULT
checkitem ITEM_HARBOR_MAIL, 1 checkitem ITEM_HARBOR_MAIL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_House2_EventScript_AskToTradeForHarborMail goto_if_eq MauvilleCity_House2_EventScript_AskToTradeForHarborMail
release release

View File

@@ -107,15 +107,15 @@ MtChimney_EventScript_ArchieExitNorth::
MtChimney_EventScript_LavaCookieLady:: MtChimney_EventScript_LavaCookieLady::
lock lock
faceplayer faceplayer
showmoneybox 0, 0, 0 showmoneybox 0, 0
msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq MtChimney_EventScript_DeclineLavaCookie goto_if_eq MtChimney_EventScript_DeclineLavaCookie
checkmoney 200, 0 checkmoney 200
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MtChimney_EventScript_NotEnoughMoney goto_if_eq MtChimney_EventScript_NotEnoughMoney
msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT
checkitemspace ITEM_LAVA_COOKIE, 1 checkitemspace ITEM_LAVA_COOKIE
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq MtChimney_EventScript_RemoveMoney call_if_eq MtChimney_EventScript_RemoveMoney
giveitem ITEM_LAVA_COOKIE giveitem ITEM_LAVA_COOKIE
@@ -132,8 +132,8 @@ MtChimney_EventScript_BagIsFull::
end end
MtChimney_EventScript_RemoveMoney:: MtChimney_EventScript_RemoveMoney::
removemoney 200, 0 removemoney 200
updatemoneybox 0, 0 updatemoneybox
return return
MtChimney_EventScript_DeclineLavaCookie:: MtChimney_EventScript_DeclineLavaCookie::

View File

@@ -26,7 +26,7 @@ NewMauville_Entrance_EventScript_Door::
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp
waitmovement 0 waitmovement 0
msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT
checkitem ITEM_BASEMENT_KEY, 1 checkitem ITEM_BASEMENT_KEY
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor
msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO

View File

@@ -383,10 +383,10 @@ PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry::
specialvar VAR_RESULT, IsEnigmaBerryValid specialvar VAR_RESULT, IsEnigmaBerryValid
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkitem ITEM_ENIGMA_BERRY, 1 checkitem ITEM_ENIGMA_BERRY
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkpcitem ITEM_ENIGMA_BERRY, 1 checkpcitem ITEM_ENIGMA_BERRY
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
compare VAR_ENIGMA_BERRY_AVAILABLE, 0 compare VAR_ENIGMA_BERRY_AVAILABLE, 0

View File

@@ -37,7 +37,7 @@ Route109_SeashoreHouse_EventScript_BagFull::
end end
Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop::
showmoneybox 0, 0, 0 showmoneybox 0, 0
msgbox Route109_SeashoreHouse_Text_WantToBuySodaPop, MSGBOX_YESNO msgbox Route109_SeashoreHouse_Text_WantToBuySodaPop, MSGBOX_YESNO
compare VAR_RESULT, YES compare VAR_RESULT, YES
goto_if_eq Route109_SeashoreHouse_EventScript_BuySodaPop goto_if_eq Route109_SeashoreHouse_EventScript_BuySodaPop
@@ -47,15 +47,15 @@ Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop::
end end
Route109_SeashoreHouse_EventScript_BuySodaPop:: Route109_SeashoreHouse_EventScript_BuySodaPop::
checkmoney 300, 0 checkmoney 300
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney
checkitemspace ITEM_SODA_POP, 1 checkitemspace ITEM_SODA_POP
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace
msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT
removemoney 300, 0 removemoney 300
updatemoneybox 0, 0 updatemoneybox
giveitem ITEM_SODA_POP giveitem ITEM_SODA_POP
hidemoneybox hidemoneybox
release release

View File

@@ -210,7 +210,7 @@ Route111_EventScript_ViciousSandstormTriggerRight::
end end
Route111_EventScript_ViciousSandstormTrigger:: Route111_EventScript_ViciousSandstormTrigger::
checkitem ITEM_GO_GOGGLES, 1 checkitem ITEM_GO_GOGGLES
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Route111_EventScript_PreventRouteAccess goto_if_eq Route111_EventScript_PreventRouteAccess
setvar VAR_TEMP_3, 1 setvar VAR_TEMP_3, 1

View File

@@ -43,7 +43,7 @@ Route113_GlassWorkshop_EventScript_ExplainSootSack::
end end
Route113_GlassWorkshop_EventScript_CheckCollectedAsh:: Route113_GlassWorkshop_EventScript_CheckCollectedAsh::
checkitem ITEM_SOOT_SACK, 1 checkitem ITEM_SOOT_SACK
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq Route113_GlassWorkshop_EventScript_SootSackNotInBag goto_if_eq Route113_GlassWorkshop_EventScript_SootSackNotInBag
msgbox Route113_GlassWorkshop_Text_LetsSeeCollectedAshes, MSGBOX_DEFAULT msgbox Route113_GlassWorkshop_Text_LetsSeeCollectedAshes, MSGBOX_DEFAULT

View File

@@ -37,10 +37,10 @@ Route114_FossilManiacsTunnel_EventScript_FossilManiac::
lock lock
faceplayer faceplayer
goto_if_set FLAG_RECEIVED_REVIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_PlayerRevivedFossil goto_if_set FLAG_RECEIVED_REVIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_PlayerRevivedFossil
checkitem ITEM_ROOT_FOSSIL, 1 checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil
checkitem ITEM_CLAW_FOSSIL, 1 checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil
msgbox Route114_FossilManiacsTunnel_Text_LookInDesertForFossils, MSGBOX_DEFAULT msgbox Route114_FossilManiacsTunnel_Text_LookInDesertForFossils, MSGBOX_DEFAULT

View File

@@ -165,7 +165,7 @@ Route116_EventScript_BrineyTrigger::
Route116_EventScript_GlassesMan:: Route116_EventScript_GlassesMan::
lock lock
faceplayer faceplayer
checkitem ITEM_BLACK_GLASSES, 1 checkitem ITEM_BLACK_GLASSES
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq Route116_EventScript_PlayerHasGlasses goto_if_eq Route116_EventScript_PlayerHasGlasses
specialvar VAR_RESULT, FoundBlackGlasses specialvar VAR_RESULT, FoundBlackGlasses

View File

@@ -48,7 +48,7 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger::
lockall lockall
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp
waitmovement 0 waitmovement 0
showmoneybox 0, 0, 0 showmoneybox 0, 0
msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO
compare VAR_RESULT, YES compare VAR_RESULT, YES
goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone
@@ -57,17 +57,17 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger::
end end
Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone::
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase
call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon
checkmoney 500, 0 checkmoney 500
compare VAR_RESULT, 0 compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney
playse SE_SHOP playse SE_SHOP
msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT
removemoney 500, 0 removemoney 500
updatemoneybox 0, 0 updatemoneybox
msgbox Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls, MSGBOX_DEFAULT msgbox Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls, MSGBOX_DEFAULT
playfanfare MUS_OBTAIN_ITEM playfanfare MUS_OBTAIN_ITEM
message Route121_SafariZoneEntrance_Text_Received30SafariBalls message Route121_SafariZoneEntrance_Text_Received30SafariBalls

View File

@@ -29,16 +29,16 @@ Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard::
Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards:: Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards::
setvar VAR_TEMP_1, 0 setvar VAR_TEMP_1, 0
checkitem ITEM_RED_SHARD, 1 checkitem ITEM_RED_SHARD
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard
checkitem ITEM_YELLOW_SHARD, 1 checkitem ITEM_YELLOW_SHARD
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard
checkitem ITEM_BLUE_SHARD, 1 checkitem ITEM_BLUE_SHARD
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard
checkitem ITEM_GREEN_SHARD, 1 checkitem ITEM_GREEN_SHARD
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard
return return
@@ -248,7 +248,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard::
msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade
checkitemspace VAR_0x8009, 1 checkitemspace VAR_0x8009
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard
checkitem VAR_0x8008, 2 checkitem VAR_0x8008, 2

View File

@@ -69,10 +69,10 @@ RustboroCity_DevonCorp_2F_EventScript_FossilScientist::
compare VAR_FOSSIL_RESURRECTION_STATE, 1 compare VAR_FOSSIL_RESURRECTION_STATE, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_StillRegenerating goto_if_eq RustboroCity_DevonCorp_2F_EventScript_StillRegenerating
msgbox RustboroCity_DevonCorp_2F_Text_DevelopDeviceToResurrectFossils, MSGBOX_DEFAULT msgbox RustboroCity_DevonCorp_2F_Text_DevelopDeviceToResurrectFossils, MSGBOX_DEFAULT
checkitem ITEM_ROOT_FOSSIL, 1 checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil
checkitem ITEM_CLAW_FOSSIL, 1 checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil
release release
@@ -89,7 +89,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil::
msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
checkitem ITEM_CLAW_FOSSIL, 1 checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil
@@ -114,7 +114,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil::
msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
checkitem ITEM_ROOT_FOSSIL, 1 checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil

View File

@@ -29,7 +29,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert::
msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO
compare VAR_RESULT, NO compare VAR_RESULT, NO
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell
checkitemspace ITEM_SHELL_BELL, 1 checkitemspace ITEM_SHELL_BELL
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed
compare VAR_RESULT, 2 compare VAR_RESULT, 2
@@ -68,10 +68,10 @@ ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell::
end end
ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells:: ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells::
checkitem ITEM_SHOAL_SALT, 1 checkitem ITEM_SHOAL_SALT
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
checkitem ITEM_SHOAL_SHELL, 1 checkitem ITEM_SHOAL_SHELL
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT

View File

@@ -332,7 +332,7 @@ SlateportCity_Harbor_EventScript_NeedDive::
SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment:: SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment::
compare VAR_TEMP_1, 1 compare VAR_TEMP_1, 1
goto_if_eq SlateportCity_Harbor_EventScript_TradedScanner goto_if_eq SlateportCity_Harbor_EventScript_TradedScanner
checkitem ITEM_SCANNER, 1 checkitem ITEM_SCANNER
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner
goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished

View File

@@ -22,7 +22,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight::
end end
SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee::
showmoneybox 0, 0, 0 showmoneybox 0, 0
msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO
compare VAR_RESULT, YES compare VAR_RESULT, YES
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee
@@ -34,12 +34,12 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee::
end end
SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee:: SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee::
checkmoney 50, 0 checkmoney 50
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney
playse SE_SHOP playse SE_SHOP
removemoney 50, 0 removemoney 50
updatemoneybox 0, 0 updatemoneybox
msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT
setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1
hidemoneybox hidemoneybox

View File

@@ -72,7 +72,7 @@ SlateportCity_PokemonFanClub_EventScript_NoHighConditions::
end end
SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: SlateportCity_PokemonFanClub_EventScript_GiveRedScarf::
checkitemspace ITEM_RED_SCARF, 1 checkitemspace ITEM_RED_SCARF
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -83,7 +83,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveRedScarf::
end end
SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf::
checkitemspace ITEM_BLUE_SCARF, 1 checkitemspace ITEM_BLUE_SCARF
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -94,7 +94,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf::
end end
SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: SlateportCity_PokemonFanClub_EventScript_GivePinkScarf::
checkitemspace ITEM_PINK_SCARF, 1 checkitemspace ITEM_PINK_SCARF
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -105,7 +105,7 @@ SlateportCity_PokemonFanClub_EventScript_GivePinkScarf::
end end
SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf::
checkitemspace ITEM_GREEN_SCARF, 1 checkitemspace ITEM_GREEN_SCARF
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -116,7 +116,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf::
end end
SlateportCity_PokemonFanClub_EventScript_GiveYellowScarf:: SlateportCity_PokemonFanClub_EventScript_GiveYellowScarf::
checkitemspace ITEM_YELLOW_SCARF, 1 checkitemspace ITEM_YELLOW_SCARF
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT

View File

@@ -296,7 +296,7 @@ BerryBlender_EventScript_ExplainBlending1:
end end
BerryBlender_EventScript_TryUseBerryBlender1: BerryBlender_EventScript_TryUseBerryBlender1:
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender1NoCase goto_if_eq BerryBlender_EventScript_Blender1NoCase
specialvar VAR_RESULT, GetFirstFreePokeblockSlot specialvar VAR_RESULT, GetFirstFreePokeblockSlot
@@ -370,7 +370,7 @@ BerryBlender_EventScript_TryUseBerryBlender2:
specialvar VAR_RESULT, PlayerHasBerries specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender2NoBerries goto_if_eq BerryBlender_EventScript_Blender2NoBerries
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender2NoCase goto_if_eq BerryBlender_EventScript_Blender2NoCase
msgbox BerryBlender_Text_Okay, MSGBOX_DEFAULT msgbox BerryBlender_Text_Okay, MSGBOX_DEFAULT
@@ -436,7 +436,7 @@ BerryBlender_EventScript_TryUseBlender3:
specialvar VAR_RESULT, PlayerHasBerries specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender3NoBerries goto_if_eq BerryBlender_EventScript_Blender3NoBerries
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender3NoCase goto_if_eq BerryBlender_EventScript_Blender3NoCase
msgbox BerryBlender_Text_OhDear, MSGBOX_DEFAULT msgbox BerryBlender_Text_OhDear, MSGBOX_DEFAULT
@@ -473,7 +473,7 @@ BerryBlender_EventScript_BlendMasterNoBerries:
end end
BerryBlender_EventScript_TryBlendWithBlendMaster: BerryBlender_EventScript_TryBlendWithBlendMaster:
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_BlendMasterNoCase goto_if_eq BerryBlender_EventScript_BlendMasterNoCase
specialvar VAR_RESULT, PlayerHasBerries specialvar VAR_RESULT, PlayerHasBerries
@@ -542,7 +542,7 @@ BerryBlender_EventScript_ExpertMPlayerHasBerries:
end end
BerryBlender_EventScript_ExpertMNoBerries: BerryBlender_EventScript_ExpertMNoBerries:
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries
specialvar VAR_RESULT, GetFirstFreePokeblockSlot specialvar VAR_RESULT, GetFirstFreePokeblockSlot
@@ -575,7 +575,7 @@ BerryBlender_EventScript_BerryBlenderLink::
specialvar VAR_RESULT, PlayerHasBerries specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_LinkBlenderNoBerries goto_if_eq BerryBlender_EventScript_LinkBlenderNoBerries
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_LinkBlenderNoCase goto_if_eq BerryBlender_EventScript_LinkBlenderNoCase
specialvar VAR_RESULT, GetFirstFreePokeblockSlot specialvar VAR_RESULT, GetFirstFreePokeblockSlot

View File

@@ -154,8 +154,8 @@ BerryTree_EventScript_ItemUsePlantBerry::
end end
BerryTree_EventScript_WantToWater:: BerryTree_EventScript_WantToWater::
checkitem ITEM_WAILMER_PAIL, 1 checkitem ITEM_WAILMER_PAIL
compare VAR_RESULT, 0 compare VAR_RESULT, FALSE
goto_if_eq BerryTree_EventScript_DontWater goto_if_eq BerryTree_EventScript_DontWater
special ObjectEventInteractionGetBerryName special ObjectEventInteractionGetBerryName
msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO

View File

@@ -24,22 +24,20 @@ CableClub_EventScript_MysteryGiftMan::
specialvar VAR_RESULT, ShouldDistributeEonTicket specialvar VAR_RESULT, ShouldDistributeEonTicket
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq CableClub_EventScript_DistributeEonTicket goto_if_eq CableClub_EventScript_DistributeEonTicket
goto CableClub_EventScript_AlreadyGotEonTicket goto CableClub_EventScript_TryWonderCardScript
end end
CableClub_EventScript_AlreadyGotEonTicket:: CableClub_EventScript_TryWonderCardScript::
gotoram gotowondercardscript
@ Unused?
CableClub_EventScript_MysteryGiftThankYou:: CableClub_EventScript_MysteryGiftThankYou::
msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_NPC msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_NPC
end end
CableClub_EventScript_DistributeEonTicket:: CableClub_EventScript_DistributeEonTicket::
checkitem ITEM_EON_TICKET, 1 checkitem ITEM_EON_TICKET
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
goto_if_eq CableClub_EventScript_AlreadyGotEonTicket goto_if_eq CableClub_EventScript_TryWonderCardScript
goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_AlreadyGotEonTicket goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_TryWonderCardScript
msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT
giveitem ITEM_EON_TICKET giveitem ITEM_EON_TICKET
setflag FLAG_ENABLE_SHIP_SOUTHERN_ISLAND setflag FLAG_ENABLE_SHIP_SOUTHERN_ISLAND
@@ -1035,7 +1033,7 @@ CableClub_EventScript_DirectCornerAttendant::
end end
CableClub_EventScript_DirectCornerSelectService:: CableClub_EventScript_DirectCornerSelectService::
checkitem ITEM_POWDER_JAR, 1 checkitem ITEM_POWDER_JAR
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq CableClub_EventScript_DirectCornerNoBerry goto_if_eq CableClub_EventScript_DirectCornerNoBerry
goto_if_set FLAG_VISITED_MAUVILLE_CITY, CableClub_EventScript_DirectCornerSelectAllServices goto_if_set FLAG_VISITED_MAUVILLE_CITY, CableClub_EventScript_DirectCornerSelectAllServices

View File

@@ -4,13 +4,13 @@ MysteryGiftScript_AuroraTicket::
faceplayer faceplayer
vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained
vgoto_if_set FLAG_BATTLED_DEOXYS, AuroraTicket_Obtained vgoto_if_set FLAG_BATTLED_DEOXYS, AuroraTicket_Obtained
checkitem ITEM_AURORA_TICKET, 1 checkitem ITEM_AURORA_TICKET
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
vgoto_if_eq AuroraTicket_Obtained vgoto_if_eq AuroraTicket_Obtained
vmessage sText_AuroraTicketForYou vmessage sText_AuroraTicketForYou
waitmessage waitmessage
waitbuttonpress waitbuttonpress
checkitemspace ITEM_AURORA_TICKET, 1 checkitemspace ITEM_AURORA_TICKET
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
vgoto_if_eq AuroraTicket_NoBagSpace vgoto_if_eq AuroraTicket_NoBagSpace
giveitem ITEM_AURORA_TICKET giveitem ITEM_AURORA_TICKET

View File

@@ -5,13 +5,13 @@ MysteryGiftScript_MysticTicket::
vgoto_if_set FLAG_RECEIVED_MYSTIC_TICKET, MysticTicket_Obtained vgoto_if_set FLAG_RECEIVED_MYSTIC_TICKET, MysticTicket_Obtained
vgoto_if_set FLAG_CAUGHT_LUGIA, MysticTicket_Obtained vgoto_if_set FLAG_CAUGHT_LUGIA, MysticTicket_Obtained
vgoto_if_set FLAG_CAUGHT_HO_OH, MysticTicket_Obtained vgoto_if_set FLAG_CAUGHT_HO_OH, MysticTicket_Obtained
checkitem ITEM_MYSTIC_TICKET, 1 checkitem ITEM_MYSTIC_TICKET
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
vgoto_if_eq MysticTicket_Obtained vgoto_if_eq MysticTicket_Obtained
vmessage sText_MysticTicketForYou vmessage sText_MysticTicketForYou
waitmessage waitmessage
waitbuttonpress waitbuttonpress
checkitemspace ITEM_MYSTIC_TICKET, 1 checkitemspace ITEM_MYSTIC_TICKET
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
vgoto_if_eq MysticTicket_NoBagSpace vgoto_if_eq MysticTicket_NoBagSpace
giveitem ITEM_MYSTIC_TICKET giveitem ITEM_MYSTIC_TICKET

View File

@@ -4,13 +4,13 @@ MysteryGiftScript_OldSeaMap::
faceplayer faceplayer
vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained
vgoto_if_set FLAG_CAUGHT_MEW, OldSeaMap_Obtained vgoto_if_set FLAG_CAUGHT_MEW, OldSeaMap_Obtained
checkitem ITEM_OLD_SEA_MAP, 1 checkitem ITEM_OLD_SEA_MAP
compare VAR_RESULT, TRUE compare VAR_RESULT, TRUE
vgoto_if_eq OldSeaMap_Obtained vgoto_if_eq OldSeaMap_Obtained
vmessage sText_MysteryGiftOldSeaMapForYou vmessage sText_MysteryGiftOldSeaMapForYou
waitmessage waitmessage
waitbuttonpress waitbuttonpress
checkitemspace ITEM_OLD_SEA_MAP, 1 checkitemspace ITEM_OLD_SEA_MAP
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
vgoto_if_eq OldSeaMap_NoBagSpace vgoto_if_eq OldSeaMap_NoBagSpace
giveitem ITEM_OLD_SEA_MAP giveitem ITEM_OLD_SEA_MAP

View File

@@ -48,8 +48,8 @@ Route119_EventScript_Kecleon2::
end end
EventScript_Kecleon:: EventScript_Kecleon::
checkitem ITEM_DEVON_SCOPE, 1 checkitem ITEM_DEVON_SCOPE
compare VAR_RESULT, 1 compare VAR_RESULT, TRUE
goto_if_eq EventScript_AskUseDevonScope goto_if_eq EventScript_AskUseDevonScope
msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_DEFAULT msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_DEFAULT
release release

View File

@@ -405,7 +405,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock::
LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock:: LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock::
special Script_BufferContestLadyCategoryAndMonName special Script_BufferContestLadyCategoryAndMonName
msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT
checkitem ITEM_POKEBLOCK_CASE, 1 checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase
msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO

View File

@@ -1,55 +1,58 @@
.set ITEMID, VAR_0x8000
.set AMOUNT, VAR_0x8001
Std_ObtainItem:: Std_ObtainItem::
additem VAR_0x8000, VAR_0x8001 additem ITEMID, AMOUNT
copyvar VAR_0x8007, VAR_RESULT copyvar VAR_0x8007, VAR_RESULT
call EventScript_ObtainItemMessage call EventScript_ObtainItemMessage
return return
EventScript_ObtainItemMessage:: EventScript_ObtainItemMessage::
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 bufferitemnameplural 1, ITEMID, AMOUNT
checkitemtype VAR_0x8000 checkitemtype ITEMID
call EventScript_BufferPocketNameAndTryFanfare call EventScript_BufferPocketNameAndTryFanfare
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_ObtainedItem call_if_eq EventScript_ObtainedItem
compare VAR_0x8007, 0 compare VAR_0x8007, FALSE
call_if_eq EventScript_NoRoomForItem call_if_eq EventScript_NoRoomForItem
return return
EventScript_BufferPocketNameAndTryFanfare:: EventScript_BufferPocketNameAndTryFanfare::
switch VAR_RESULT switch VAR_RESULT
case POCKET_ITEMS, EventScript_BufferItemsPocket case POCKET_ITEMS, EventScript_BufferItemsPocket
case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket
case POCKET_POKE_BALLS, EventScript_BufferPokeballsPocket case POCKET_POKE_BALLS, EventScript_BufferPokeballsPocket
case POCKET_TM_HM, EventScript_BufferTMHMsPocket case POCKET_TM_HM, EventScript_BufferTMHMsPocket
case POCKET_BERRIES, EventScript_BufferBerriesPocket case POCKET_BERRIES, EventScript_BufferBerriesPocket
end end
EventScript_BufferItemsPocket:: EventScript_BufferItemsPocket::
bufferstdstring 2, STDSTRING_ITEMS bufferstdstring 2, STDSTRING_ITEMS
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
EventScript_BufferKeyItemsPocket:: EventScript_BufferKeyItemsPocket::
bufferstdstring 2, STDSTRING_KEYITEMS bufferstdstring 2, STDSTRING_KEYITEMS
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
EventScript_BufferPokeballsPocket:: EventScript_BufferPokeballsPocket::
bufferstdstring 2, STDSTRING_POKEBALLS bufferstdstring 2, STDSTRING_POKEBALLS
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
EventScript_BufferTMHMsPocket:: EventScript_BufferTMHMsPocket::
bufferstdstring 2, STDSTRING_TMHMS bufferstdstring 2, STDSTRING_TMHMS
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedTMHM call_if_eq EventScript_PlayFanfareObtainedTMHM
return return
EventScript_BufferBerriesPocket:: EventScript_BufferBerriesPocket::
bufferstdstring 2, STDSTRING_BERRIES bufferstdstring 2, STDSTRING_BERRIES
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem call_if_eq EventScript_PlayFanfareObtainedItem
return return
@@ -57,11 +60,11 @@ EventScript_ObtainedItem::
message gText_ObtainedTheItem message gText_ObtainedTheItem
waitfanfare waitfanfare
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
setvar VAR_RESULT, 1 setvar VAR_RESULT, TRUE
return return
EventScript_NoRoomForItem:: EventScript_NoRoomForItem::
setvar VAR_RESULT, 0 setvar VAR_RESULT, FALSE
return return
EventScript_PlayFanfareObtainedItem:: EventScript_PlayFanfareObtainedItem::
@@ -73,16 +76,16 @@ EventScript_PlayFanfareObtainedTMHM::
return return
Std_ObtainDecoration:: Std_ObtainDecoration::
adddecoration VAR_0x8000 adddecoration ITEMID
copyvar VAR_0x8007, VAR_RESULT copyvar VAR_0x8007, VAR_RESULT
call EventScript_ObtainDecorationMessage call EventScript_ObtainDecorationMessage
return return
EventScript_ObtainDecorationMessage:: EventScript_ObtainDecorationMessage::
bufferdecorationname 1, VAR_0x8000 bufferdecorationname 1, ITEMID
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_ObtainedDecor call_if_eq EventScript_ObtainedDecor
compare VAR_0x8007, 0 compare VAR_0x8007, FALSE
call_if_eq EventScript_NoRoomForDecor call_if_eq EventScript_NoRoomForDecor
return return
@@ -91,27 +94,27 @@ EventScript_ObtainedDecor::
message gText_ObtainedTheDecor message gText_ObtainedTheDecor
waitfanfare waitfanfare
msgbox gText_TheDecorWasTransferredToThePC, MSGBOX_DEFAULT msgbox gText_TheDecorWasTransferredToThePC, MSGBOX_DEFAULT
setvar VAR_RESULT, 1 setvar VAR_RESULT, TRUE
return return
EventScript_NoRoomForDecor:: EventScript_NoRoomForDecor::
setvar VAR_RESULT, 0 setvar VAR_RESULT, FALSE
return return
Std_FindItem:: Std_FindItem::
lock lock
faceplayer faceplayer
waitse waitse
copyvar VAR_0x8004, VAR_0x8000 copyvar VAR_0x8004, ITEMID
copyvar VAR_0x8005, VAR_0x8001 copyvar VAR_0x8005, AMOUNT
checkitemspace VAR_0x8000, VAR_0x8001 checkitemspace ITEMID, AMOUNT
copyvar VAR_0x8007, VAR_RESULT copyvar VAR_0x8007, VAR_RESULT
bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 bufferitemnameplural 1, ITEMID, AMOUNT
checkitemtype VAR_0x8000 checkitemtype ITEMID
call EventScript_BufferPocketNameAndTryFanfare call EventScript_BufferPocketNameAndTryFanfare
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
call_if_eq EventScript_PickUpItem call_if_eq EventScript_PickUpItem
compare VAR_0x8007, 0 compare VAR_0x8007, FALSE
call_if_eq EventScript_NoRoomToPickUpItem call_if_eq EventScript_NoRoomToPickUpItem
release release
return return
@@ -121,15 +124,15 @@ EventScript_PickUpItem::
additem VAR_0x8004, VAR_0x8005 additem VAR_0x8004, VAR_0x8005
specialvar VAR_RESULT, BufferTMHMMoveName specialvar VAR_RESULT, BufferTMHMMoveName
copyvar VAR_0x8008, VAR_RESULT copyvar VAR_0x8008, VAR_RESULT
compare VAR_0x8008, 1 compare VAR_0x8008, TRUE
call_if_eq EventScript_FoundTMHM call_if_eq EventScript_FoundTMHM
compare VAR_0x8008, 0 compare VAR_0x8008, FALSE
call_if_eq EventScript_FoundItem call_if_eq EventScript_FoundItem
waitfanfare waitfanfare
waitmessage waitmessage
bufferitemnameplural 1, VAR_0x8004, VAR_0x8005 bufferitemnameplural 1, VAR_0x8004, VAR_0x8005
pyramid_inchallenge pyramid_inchallenge
compare VAR_RESULT, 1 compare VAR_RESULT, TRUE
goto_if_eq EventScript_PutBattlePyramidItemInBag goto_if_eq EventScript_PutBattlePyramidItemInBag
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
return return
@@ -150,7 +153,7 @@ EventScript_FoundItem::
EventScript_NoRoomToPickUpItem:: EventScript_NoRoomToPickUpItem::
msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
setvar VAR_RESULT, 0 setvar VAR_RESULT, FALSE
return return
EventScript_HiddenItemScript:: EventScript_HiddenItemScript::
@@ -161,9 +164,9 @@ EventScript_HiddenItemScript::
bufferitemnameplural 1, VAR_0x8005, 1 bufferitemnameplural 1, VAR_0x8005, 1
checkitemtype VAR_0x8005 checkitemtype VAR_0x8005
call EventScript_BufferPocketNameAndTryFanfare call EventScript_BufferPocketNameAndTryFanfare
compare VAR_0x8007, 1 compare VAR_0x8007, TRUE
goto_if_eq EventScript_PickUpHiddenItem goto_if_eq EventScript_PickUpHiddenItem
compare VAR_0x8007, 0 compare VAR_0x8007, FALSE
goto_if_eq EventScript_NoRoomForHiddenItem goto_if_eq EventScript_NoRoomForHiddenItem
end end
@@ -171,9 +174,9 @@ EventScript_PickUpHiddenItem::
copyvar VAR_0x8008, VAR_0x8004 copyvar VAR_0x8008, VAR_0x8004
copyvar VAR_0x8004, VAR_0x8005 copyvar VAR_0x8004, VAR_0x8005
specialvar VAR_RESULT, BufferTMHMMoveName specialvar VAR_RESULT, BufferTMHMMoveName
compare VAR_RESULT, 1 compare VAR_RESULT, TRUE
goto_if_eq EventScript_FoundHiddenTMHM goto_if_eq EventScript_FoundHiddenTMHM
compare VAR_RESULT, 0 compare VAR_RESULT, FALSE
goto_if_eq EventScript_FoundHiddenItem goto_if_eq EventScript_FoundHiddenItem
end end

View File

@@ -1,5 +1,5 @@
Roulette_EventScript_Table1:: Roulette_EventScript_Table1::
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 0 setvar VAR_0x8004, 0
@@ -11,7 +11,7 @@ Roulette_EventScript_Table1::
end end
Roulette_EventScript_Table2:: Roulette_EventScript_Table2::
checkitem ITEM_COIN_CASE, 1 checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 1 setvar VAR_0x8004, 1

View File

@@ -34,7 +34,8 @@ Std_MsgboxGetPoints:
waitmessage waitmessage
return return
Std_10: @ Never used, pokenavcall is always used directly instead
Std_MsgboxPokenav:
pokenavcall 0x0 pokenavcall 0x0
waitmessage waitmessage
return return