NaljoBorderWest_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

NaljoBorderWestNPC1:
	db TX_COMPRESSED, $15, $d2, $02, $85, $2f, $46, $43, $5a, $25, $ac
	db $13, $d6, $18, $82, $1e, $a9, $45, $60

	db $bc, $01, $b9, $b0, $1c, $59, $ef, $7a, $0a, $27
	db $72, $f5, $86, $2b, $33, $c2, $34
	db $21, $52, $0d, $96, $96, $3b, $05, $12, $6b, $3f
	db $53, $40

NaljoBorderWestNPC2:
	db TX_COMPRESSED, $76, $4e, $82, $96, $93, $8a, $cd, $17, $03
	db $83, $d6, $93, $8a, $cd, $17, $13, $a0, $c7
	db $34, $03, $29, $d2, $32, $72, $c3, $19, $0b, $e2, $0e
	db $cd, $e1, $92, $39, $07, $4e, $04, $98, $a6, $39, $ef, $2d, $1f

	db $10, $1c, $01, $25, $32, $5e, $a9, $1c, $1d, $cc, $02
	db $b7, $b9, $5e, $92, $cf, $3c
	db $69, $a0

NaljoBorderWestBadgeCheck:
	checkevent EVENT_BADGE_CHECKER
	sif true
		end
	opentext
	writetext .initial_call_text
	spriteface PLAYER, LEFT
	writetext .badge_check_description_text
	checkcode VAR_BADGES
	sif <, 8, then
		writetext .not_enough_badges_text
		playwaitsfx SFX_WRONG
		writetext .come_back_text
		closetext
		applymovement PLAYER, .move_back
		end
	sendif
	setevent EVENT_BADGE_CHECKER
	writetext .got_all_badges_text
	playwaitsfx SFX_DEX_FANFARE_50_79
	jumptext .allowed_to_enter_text

.move_back
	step_down
	step_end

.initial_call_text
	db TX_COMPRESSED, $63, $a4, $e6, $04, $92, $d2, $6b, $3f
	db $53, $c4

.badge_check_description_text
	db TX_COMPRESSED, $75, $19, $d2, $40, $93, $a0, $a6, $f7, $a1
	db $a9, $e0, $41, $6a, $58, $63, $48, $39, $69
	db $30, $15, $6a, $c4, $4b, $0c, $b4, $9c, $72, $0e, $9c, $09
	db $1e, $c7, $3d, $e5, $a3, $83, $c2, $02, $0b, $51, $3a, $0c
	db $60, $36, $e7, $4f, $51, $70, $c7, $ca
	db $6d, $e5, $7b, $9e, $4d, $1e
	db $a7, $88

.got_all_badges_text
	db TX_COMPRESSED, $50, $20, $d9, $bd, $65, $ae, $ea, $f8

	db $80, $72, $85, $a6, $03, $8c, $87, $bd, $36, $6c
	db $f2, $f6, $f7, $b0, $38, $4b, $49, $c0, $7e, $f6, $9c
	db $0a, $a1, $2d, $cf, $26, $8f
	db $53, $40

.allowed_to_enter_text
	db TX_COMPRESSED, $72, $85, $a9, $ab, $38, $20, $d6, $f8, $ee, $cf
	db $2f, $58, $61, $92, $cd, $7e
	db $a6, $80

.not_enough_badges_text
	db TX_COMPRESSED, $50, $15, $ac, $17, $e7, $42, $15, $24, $4e, $8d, $48
	db $de, $04, $16, $a6, $42, $4a, $64, $4e, $83
	db $1a, $a3, $20, $5a, $e5, $3e
	db $a6, $80

.come_back_text
	db TX_COMPRESSED, $6d, $0b, $e7, $15, $eb, $2a, $52, $a4, $99
	db $1e, $04, $16, $98, $0e, $32, $1e, $f4, $d9, $b3
	db $ca, $a3, $1f, $29, $b8, $1c, $25, $a4, $df
	db $f5, $3c, $40

NaljoBorderWest_MapEventHeader ;filler
	db 0, 0

;warps
	db 4
	warp_def $13, $4, 1, ROUTE_68
	warp_def $13, $5, 1, ROUTE_68
	warp_def $2, $5, 1, NALJO_BORDER_WARPROOM
	warp_def $c, $11, 1, NALJO_BORDER_EAST

	;xy triggers
	db 2
	xy_trigger 0, $f, $4, $0, NaljoBorderWestBadgeCheck, $0, $0
	xy_trigger 0, $f, $5, $0, NaljoBorderWestBadgeCheck, $0, $0

	;signposts
	db 0

	;people-events
	db 2
	person_event SPRITE_OFFICER, 15, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_TEXTFP, 0, NaljoBorderWestNPC1, -1
	person_event SPRITE_OFFICER, 13, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_BROWN, PERSONTYPE_TEXTFP, 0, NaljoBorderWestNPC2, EVENT_ROUTE_63_TRAINER_2

