shithub: pokecrystal

ref: 265d36c6b8bba5fd38baf426f5f80e1722c27b03
dir: /docs/map_scripts.md/

View raw version
# Map Scripts


## `const_value set 2`

### `const` *`MAPNAME_PERSONNAME`*


## `MapName_MapScriptHeader:`


## `.MapTriggers: db` *N*

### `maptrigger` *script*


## `.MapCallbacks: db` *N*

### `dbw` *type*, *script*


## Scripts


## Text

- **`text`**
- **`line`**
- **`cont`**
- **`para`**
- **`done`**


## `MapName_MapEventHeader:`

	; filler
	db 0, 0


## `.Warps: db` *N*

### `warp_def` *y*, *x*, *warp_id*, *map*


## `.XYTriggers: db` *N*

### `xy_trigger` *id*, *y*, *x*, `$0`, *script*, `$0`, `$0`


## `.Signposts: db` *N*

### `signpost` *y*, *x*, *type*, *script*

#### Signpost types:

- **`SIGNPOST_READ`**

- **`SIGNPOST_UP/DOWN/LEFT/RIGHT`**

- **`SIGNPOST_IFSET/IFNOTSET`**

  **`dw` *event_flag*, *script***

- **`SIGNPOST_ITEM`**

  **`dwb` *event_flag*, *item_id***

- **`SIGNPOST_COPY`**

## `.PersonEvents: db` *N*

### `person_event` *sprite*, *y*, *x*, *movement*, *ry*, *rx*, *hour*, *daytime*, *palette*, *type*, *range*, *script*, *event_flag*

#### Movement types:

- **`SPRITEMOVEDATA_ITEM_TREE`**

- **`SPRITEMOVEDATA_WANDER`**

- **`SPRITEMOVEDATA_SPINRANDOM_SLOW`**

- **`SPRITEMOVEDATA_WALK_UP_DOWN`**

- **`SPRITEMOVEDATA_WALK_LEFT_RIGHT`**

- **`SPRITEMOVEDATA_STANDING_UP/DOWN/LEFT/RIGHT`**

- **`SPRITEMOVEDATA_SPINRANDOM_FAST`**

- **`SPRITEMOVEDATA_SNORLAX`**

- **`SPRITEMOVEDATA_POKEMON`**

- **`SPRITEMOVEDATA_SUDOWOODO`**

- **`SPRITEMOVEDATA_SMASHABLE_ROCK`**

- **`SPRITEMOVEDATA_STRENGTH_BOULDER`**

- **`SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE`**

- **`SPRITEMOVEDATA_SPINCLOCKWISE`**

- **`SPRITEMOVEDATA_BIGDOLL`**

- **`SPRITEMOVEDATA_LAPRAS`**

#### Person types:

- **`PERSONTYPE_SCRIPT`**

- **`PERSONTYPE_ITEMBALL`**

  **`itemball` *item_id***

- **`PERSONTYPE_TRAINER`**

  **`trainer` *event_flag*, *group_id*, *trainer_id*, *seen_text*, *beaten_text*, *loss_text*, *script***