SaffronCity_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

SaffronCitySignpost1:
	db TX_COMPRESSED, $50, $91, $90, $64, $e7, $f1, $84, $1e, $e4
	db $c9, $4f, $0b, $1f, $49, $98, $1c, $23, $68, $5f, $7c, $d6, $c9
	db $d3, $40

SaffronCitySignpost2:
	db TX_COMPRESSED, $07, $2b, $e1, $24, $61, $02
	db $7e, $9e, $16, $39, $ee, $4d, $6e, $31, $46, $ab, $58, $c9
	db $b4, $d0

SaffronCitySignpost3:
	db TX_COMPRESSED, $53, $1f, $29, $b1, $93, $99, $c0, $1a, $70
	db $22, $6b, $03
	db $a7, $84, $2e, $06, $35, $82, $56, $1c, $82
	db $a7, $85, $51, $f5, $90, $be, $7c
	db $69, $a0

SaffronCitySignpost4:
	db TX_COMPRESSED, $50, $3e, $88, $4c, $6d, $0f
	db $84, $d6
	db $07, $4f, $09, $b4, $c9, $6b, $de
	db $d3, $c2, $62, $7b, $91, $66, $d6, $ae, $cd, $68
	db $a6, $80

SaffronCitySignpost5:
	db TX_COMPRESSED, $15, $5f, $a7, $0a, $01, $32, $91, $b3
	db $8a, $9e, $13, $10, $b4, $83
	db $a6, $80

SaffronCitySignpost6:
	db TX_COMPRESSED, $15, $de, $48, $77, $0a, $5e, $8c
	db $94, $d0

SaffronCitySignpost7:
	jumpstd pokecentersign

SaffronCitySignpost8:
	jumpstd martsign

SaffronCityNPC1:
	jumptextfaceplayer .text

.text
	db TX_COMPRESSED, $e1, $30, $88, $e9, $cc, $16, $17, $e0, $3f, $7b, $4e
	db $05, $ed, $59, $c4, $06, $54, $3e, $e6, $69
	db $32, $a8, $e9, $d6, $47, $63, $27, $3e
	db $a6, $80

SaffronCityNPC2:
	jumptextfaceplayer .text

.text
	db TX_COMPRESSED, $ae, $61, $af, $85, $a4, $40, $72, $be, $12
	db $3c, $52, $f4, $64, $35, $c5, $9b, $26, $4b, $e8
	db $25, $4f, $84, $18, $f3, $06, $4b, $0c, $b0, $d4, $4f

	db $00, $62, $71, $a4, $1e, $65, $86, $2b, $39, $69
	db $37, $81, $c0, $d6, $3c, $8f, $49, $1b, $47, $60, $a3, $08, $13
	db $ea, $ba, $7b, $93, $5f
	db $a9, $a0

SaffronCityNPC3:
	jumptextfaceplayer .text

.text
	db TX_COMPRESSED, $50, $3e, $88, $4c, $6d, $0f, $a2, $75
	db $0f, $72, $b0, $d4, $48, $12, $47, $ce, $18, $31

	db $ac, $02, $06, $46, $4e, $5a, $4c, $14, $45, $ea, $c0
	db $bd, $67, $98, $ac, $c6, $4e, $63, $e1, $59

	db $80, $32, $03, $0d, $61, $23, $e6, $4b, $de, $f4
	db $13, $d8, $2c, $66, $4c, $f4, $17
	db $a9, $a0

SaffronCityNPC4:
	jumptextfaceplayer .text

.text
	db TX_COMPRESSED, $75, $78, $a1, $d3, $ac, $8e, $c6, $4e
	db $5e, $e8, $c1, $86, $4e, $60, $c9, $36, $2b, $1f
	db $2a, $99, $1d, $82, $9d, $1a, $91, $cb, $48, $d1
	db $c6, $9a

SaffronCityNPC5:
	jumptextfaceplayer .text

.text
	db TX_COMPRESSED, $53, $0a, $e2, $0d, $96, $96, $3b
	db $04, $f2, $cf, $50, $12, $23, $f2, $d2, $60

	db $80, $64, $24, $b9, $bd, $e8, $6a, $82, $0c, $22, $3a
	db $6f, $54, $90, $cd, $59, $cc, $16, $17, $e0, $5a, $b0

	db $20, $10, $3c, $9c, $13, $1a, $4b, $0c, $b0
	db $bd, $d3, $d0, $63, $96, $93, $8c, $8e, $c1
	db $7a, $9a

SaffronCitySilphWorker:
	faceplayer
	opentext
	writetext .generic_opening_text
	closetext
	checkevent EVENT_SEEKING_OUT_SILPH_WORKER
	sif false
		end
	showemote 0, 6, 32
	opentext
	writetext .back_to_work_text
	closetext
	setevent EVENT_APPROACHED_SILPH_WORKER
	clearevent EVENT_SILPH_WORKER_NOT_UPSTAIRS
	warp SILPH_CO, 8, 41
	spriteface 0, 1
	spriteface 4, 3
	;playmusic MUSIC_BLUE
	opentext
	writetext .oak_meets_worker_text
	closetext

	applymovement 4, .blue_approaches_worker
	spriteface 4, 3

	playwaitsfx SFX_SPIDER_WEB
	playwaitsfx SFX_MORNING_SUN
	playwaitsfx SFX_BALL_POOF
	playwaitsfx SFX_RAGE
	playwaitsfx SFX_GIGA_DRAIN
	playwaitsfx SFX_MILK_DRINK
	playwaitsfx SFX_TITLE_SCREEN_ENTRANCE

	spriteface 4, 3
	spriteface 2, 2
	playsound SFX_MASTER_BALL
	opentext
	writetext .created_master_ball_text
	closetext
	spriteface 0, 2
	applymovement 4, .move_to_player
	spriteface 4, 3
	opentext
	verbosegiveitem MASTER_BALL, 1
	writetext .interested_in_battle_text
	setevent EVENT_CREATED_MASTERBALL
	closetext
	end

.blue_approaches_worker
	slow_step_right
	step_end

.move_to_player
	slow_step_down
	slow_step_down
	step_end

.generic_opening_text
	db TX_COMPRESSED, $07, $8d, $93, $96, $19, $c9, $dc, $40, $5f
	db $37, $b0, $59, $a1, $33, $46, $be
	db $34, $f1, $00

.back_to_work_text
	db TX_COMPRESSED, $6e, $9d, $bf, $c1, $55, $fa, $3b, $d5
	db $27, $aa, $d2, $5a, $23, $e7, $15, $eb, $2a, $50, $24
	db $55, $69, $38, $cf, $42, $ca, $95, $2f

	db $10, $0e, $8b, $22, $02, $b5, $82, $fc, $e9, $de
	db $27, $96, $d1, $22, $b3, $c0, $2b, $38, $3b
	db $c4, $aa, $c2, $19, $dd, $b3
	db $e3, $4f, $10

.oak_meets_worker_text
	db TX_COMPRESSED, $74, $59, $10, $18, $80, $ad, $60, $a2, $b0, $a1, $1c

	db $40, $0a, $af, $d1, $de, $a9, $38, $c7, $29, $a2, $02, $34
	db $7d, $ea, $8f, $bd, $98, $0c, $83, $42, $63, $42
	db $15, $02, $0b, $4b, $97, $a8, $52
	db $f5, $3c, $40

.created_master_ball_text
	db TX_COMPRESSED, $15, $5f, $a3, $bd, $52, $71, $8c, $20, $87, $32, $9c, $0a, $be

	db $20, $29, $e3

	db $e2, $00, $a4, $e9, $14, $a0, $20, $b5, $30, $0a
	db $de, $a8, $76, $43, $42, $06, $4e, $66

	db $80, $06, $35, $82, $83, $7c, $40, $57, $7a, $4b
	db $78, $c1, $8c, $97, $06, $48, $a0, $7d, $10
	db $95, $4d, $a1, $f4, $48, $d1, $61, $58, $2e

	db $20, $0a, $49, $c1, $5d, $45, $9a, $e0, $96, $f7, $bf
	db $78, $77, $2a, $1f, $7b, $19, $db, $65, $33, $48

	db $08, $00, $39, $5f, $09, $25, $43, $b4, $85, $ab
	db $7b, $0d, $1f, $78

	db $80, $50, $32, $32, $71, $d4, $e8, $d4, $8e, $02, $0b, $5f
	db $7a, $9e, $3f, $c7, $4e, $1e, $ce, $9d

	db $80, $04, $16, $a2, $74, $18, $e0, $5a, $5c, $06, $35, $82
	db $7b, $01, $ad, $17, $16, $77, $a3
	db $ea, $a1, $5d, $45, $9a, $e0, $96, $f7, $bc
	db $69, $e2

.interested_in_battle_text
	db TX_COMPRESSED, $ad, $67, $01, $05, $a9, $bd, $40
	db $5e, $19, $2c, $d6, $68, $b3, $cc, $19, $26
	db $aa, $07, $2b, $e1, $24, $57, $b7, $7d, $3a

	db $50, $0e, $a7, $2d, $1a, $11, $1d, $46, $42, $d7, $73
	db $f7, $9d, $16, $45, $21, $93, $30, $38, $45, $b4, $8b

	db $04, $01, $5b, $57, $1d, $44, $34, $20, $40, $50, $71
	db $d3, $cc, $85, $ae, $e7

	db $c0, $0a, $de, $a9, $4b, $0c, $7c, $e5, $49, $32, $01
	db $78, $c1, $8d, $70, $10, $5a, $95, $69, $2e
	db $6a, $a5, $7b, $77, $d3
	db $f5, $3c, $40

SaffronCity_MapEventHeader ;filler
	db 0, 0

;warps
	db 15
	warp_def $b, $20, 1, SAFFRON_FIGHTING_DOJO
	warp_def $b, $28, 31, SAFFRON_GYM
	warp_def $25, $23, 1, SAFFRON_MR_PSYCHIC
	warp_def 19, 15, 1, SAFFRON_COPYCATS_HOUSE
	warp_def $13, $1f, 1, SAFFRON_MART
	warp_def $d, $e, 2, SAFFRON_MAGNET_TRAIN
	warp_def $1d, $18, 1, SILPH_CO
	warp_def $25, $f, 1, SAFFRON_POKECENTER
	warp_def $5, $1a, 1, SAFFRON_GATES
	warp_def $1a, $4, 7, SAFFRON_GATES
	warp_def $1b, $4, 8, SAFFRON_GATES
	warp_def $2d, $1a, 3, SAFFRON_GATES
	warp_def $2d, $1b, 4, SAFFRON_GATES
	warp_def $1a, $2f, 5, SAFFRON_GATES
	warp_def $1b, $2f, 6, SAFFRON_GATES

	;xy triggers
	db 0

	;signposts
	db 8
	signpost 13, 25, SIGNPOST_LOAD, SaffronCitySignpost1
	signpost 13, 41, SIGNPOST_LOAD, SaffronCitySignpost2
	signpost 13, 33, SIGNPOST_LOAD, SaffronCitySignpost3
	signpost 29, 21, SIGNPOST_LOAD, SaffronCitySignpost4
	signpost 37, 33, SIGNPOST_LOAD, SaffronCitySignpost5
	signpost 13, 19, SIGNPOST_LOAD, SaffronCitySignpost6
	signpost 37, 16, SIGNPOST_READ, SaffronCitySignpost7
	signpost 19, 32, SIGNPOST_READ, SaffronCitySignpost8

	;people-events
	db 6
	person_event SPRITE_POKEFAN_M, 30, 19, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 0, -1, -1, 8 + PAL_OW_BROWN, 0, 0, SaffronCityNPC1, -1
	person_event SPRITE_FISHER, 39, 29, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 0, -1, -1, 8 + PAL_OW_GREEN, 0, 0, SaffronCityNPC2, -1
	person_event SPRITE_COOLTRAINER_F, 32, 36, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 0, -1, -1, 0, 0, 0, SaffronCityNPC3, -1
	person_event SPRITE_FISHER, 15, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 8 + PAL_OW_GREEN, 0, 0, SaffronCityNPC4, -1
	person_event SPRITE_YOUNGSTER, 27, 21, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 0, -1, -1, 8 + PAL_OW_RED, 0, 0, SaffronCitySilphWorker, EVENT_APPROACHED_SILPH_WORKER
	person_event SPRITE_YOUNGSTER, 22, 35, SPRITEMOVEDATA_WANDER, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SaffronCityNPC5, -1

