code:
;-------------------------------------------------
;�ŗL�R�}���h
;����n�R�}���h�A���x��X
;-------------------------------------------------
@COM443
TRYCALLFORM UNIQUE_COM_%NAME_UNIQUE_COM(TARGET)%
SIF RESULT == -1
	RETURN -1
TIME += 3
RETURN 1

@COM_ABLE443
;��~���͕s��
SIF FLAG:70 == 1
	RETURN 0
;���s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(443)
	RETURN RESULT
SIF TARGET <= 0
	RETURN 0
SIF !SHIRAHU(TARGET)
	RETURN 0
SIF CFLAG:���ӂ�
	RETURN 0
SIF !ABLE_UNIQUE_COM(TARGET)
	RETURN 0
RETURN 1

@NAME_UNIQUE_COM(CHARA)
#FUNCTIONS
#DIM CHARA
RETURNF GET_STR(0, "�L�����f�[�^", CHARA, "�ŗL�R�}���h")

@ABLE_UNIQUE_COM(CHARA)
#FUNCTION
#DIM CHARA
RETURNF GET_INT(0, "�L�����f�[�^", CHARA, "�ŗL�R�}���h���s�\")

;-------------------------------------------------
;�얲�p
;-------------------------------------------------
@UNIQUE_COM_���݂����_��
#DIM ���݂�����
IF FLAG:���݂����_��
	PRINTFORML �u�����_�񂵂Ă邶��Ȃ��v
	RETURN -1
ENDIF
IF !MAIN_MAP
	���݂����� = 30
ELSE
	���݂����� = 50
ENDIF
PRINTFORML �u�y���̑f�G�țޏ����������񂽂ׂ̈ɂ��݂����������Ă������v
PRINTFORML �u��50�J���X�}��A�������̂ł���H�v
SIF !MAIN_MAP
	PRINTFORML �u�_�ЂɏZ�ݍ��݂��Ă邤����30�ł�����v
CALL ASK_M("����",MONEY:2 >= ���݂�����,"��߂Ƃ�",1)
SIF RESULT
	RETURN -1
PRINTFORMW �u�܂��ǂ���I�����z������Č_�񂾂���ˁv
MONEY:2 -= ���݂�����
FLAG:���݂����_�� = 1

;-------------------------------------------------
;���p
;-------------------------------------------------
@UNIQUE_COM_�V���w��
IF FLAG:�V���w��
	PRINTFORML �u�����Ƃ��Ă邶��Ȃ��ł����v
	RETURN -1
ENDIF
PRINTFORML �u��\\3000�Ō��z���́u���v���킩��I�@���X�B�V�����Ƃ�܂��񂩁H�v
CALL ASK_M("����Ȃ�",1,"�w�ǂ���",MONEY >= 3000,"�J���X�}�ōw�ǂ���",MONEY:2 >= 10)
SELECTCASE RESULT
	CASE 0
		RETURN -1
	CASE 1
		MONEY -= 3000
	CASE 2
		MONEY:2 -= 10
ENDSELECT
PRINTFORMW ���X�B�V�����w�ǂ��邱�Ƃɂ��܂����B
PRINTFORMW ���������Ɍ_��̍X�V���s���܂��B
FLAG:�V���w�� = 1

;-------------------------------------------------
;�V�q�p
;-------------------------------------------------
@UNIQUE_COM_�V�󑀍�
IF CFLAG:MASTER:���݈ʒu == �V�E
	PRINTFORML �u�������ᖳ���ˁv
	RETURN -1
ENDIF
IF FLAG:�ُ�C��
	PRINTFORML �u���̓V�C�͕ς����Ȃ���v
	RETURN -1
ENDIF
IF GETBIT(TFLAG:������,6)
	PRINTFORML �u�����͂������Ȃ����v
	RETURN -1
ENDIF
PRINTFORML �u��G�c�ɂ������Ȃ����A�ʓ|����������v
$LOOP
CALL ASK_M("����",1,"�܂�",1,"�J",1, "��", DAY:2 == 4, "�p���c", 1)
SELECTCASE RESULT
	CASE 0
		;�J�Ȃ��m���œ�
		SIF INRANGE(TIME:5,4,7) && !RAND:7
			TIME:7 = 1
		;��Ȃ��m���Ń_�C�������h�_�X�g
		SIF INRANGE(TIME:5,8,13) && !RAND:7
			TIME:7 = 2
		TIME:5 = RAND:2
	CASE 1
		TIME:5 = RAND:2 + 2
	CASE 2
		;�����ς��悤�Ƃ���Ɠ�
		IF TIME:5 < 2 && !RAND:4
			TIME:7 = 1
		ELSE
			TIME:5 = 4 + RAND:4
		ENDIF
	CASE 3
		;�����ς��悤�Ƃ���ƃ_�C�������h�_�X�g
		IF TIME:5 < 2 && !RAND:4
			TIME:7 = 2
		ELSE
			TIME:5 = 8 + RAND:6
		ENDIF
	CASE 4
		PRINTFORML �u�o�J����Ȃ��́H�v
		RETURN -1
ENDSELECT

DOWNBASE:�C�� = 300
SETBIT TFLAG:������,6

;-------------------------------------------------
;���p
;-------------------------------------------------
@UNIQUE_COM_�痢��
PRINTFORML �u�ǂ������܂����H�v
CALL BROAD_HITOSAGASI

;-------------------------------------------------
;�`���m�p
;-------------------------------------------------
;�A�C�X�̒l�i�͋G�߂ɂ��ϓ�����i�Ă���ԍ����j
@UNIQUE_COM_�A�C�X�𔃂�
#DIM �A�C�X�˂���
#DIM �p�b�N�˂���
�A�C�X�˂��� = ICE_PRICE()
�p�b�N�˂��� = ICE_PRICE() * 9
PRINTL �u�A�C�X�ق����́H�v
PRINTFORML
PRINTFORML ������:\\%TOSTR(MONEY,"#,###")%
PRINTFORML
CALL EX_SHOPPING("�A�C�X", "���܂��Ă��������A�C�X", 0, �A�C�X�˂���)
CALL EX_SHOPPING("�A�C�X�߂��킹", "�݂�ȂŐH�ׂ悤", 1, �p�b�N�˂���)
PRINTFORML
PRINTL [100] ��߂�
INPUT
SELECTCASE RESULT
	CASE 0
		CALL BUY_ABLE(213, �A�C�X�˂���, 1)
	CASE 1
		CALL BUY_ABLE(213, �p�b�N�˂���, 10)
	CASE 100
		RETURN -1
	CASEELSE
ENDSELECT
RESTART

@ICE_PRICE
#FUNCTION
SELECTCASE DAY:2
CASE 1
	RETURNF 400
CASE 2
	RETURNF 500
CASE 3
	RETURNF 300
CASE 4
	RETURNF 200
ENDSELECT

;-------------------------------------------------
;���p
;-------------------------------------------------
@UNIQUE_COM_�g���ُo���T�[�r�X
PRINTFORML �u����A���������肩����H�v
PRINTFORML
CALL ASK_M("���܂Ȃ�", 1, "�|����s", !TFLAG:�o�����|��, "������s", ITEM:150)
SELECTCASE RESULT
CASE 0
	RETURN -1
CASE 1
	PRINTFORML �z�t�S�u������%GET_MAPNAME(MAIN_MAP)%�̑|���𗊂݂܂����H
	CALL PAY_YEN_OR_CM(3000,10)
	SIF !RESULT
		RETURN -1
	PRINTFORML �o�����|���T�[�r�X���˗����܂����B
	TFLAG:�o�����|�� = 1
CASE 2
	PRINTFORML �z�t�S�u�����ɉƒ�؉��̐����𗊂݂܂����H�i���������ς��j
	CALL PAY_YEN_OR_CM(15000,70)
	SIF !RESULT
		RETURN -1
	PRINTFORML ������s���˗����܂����B
	FLAG:������s = 1
ENDSELECT
RETURN 1

;-------------------------------------------------
;�i�Y�[�����p
;-------------------------------------------------
@UNIQUE_COM_�_�E�W���O
#DIM DYNAMIC CNT_TALK
#DIM DYNAMIC CNT_DOWSING
#DIM CAN_SLOT
#DIM CHK_SLOT
#DIM TMP_ID
IF !CNT_TALK
	PRINTFORML �u�ӂށB�T�����̑��k���v
	PRINTFORML �u�m���ɂ���͎��̐�啪�삾�ˁv
	PRINTFORMW �u����ł́A�ڂ����b�𕷂����Ă��炨�����v
	CNT_TALK ++
	CAN_SLOT = CAN_DOWSING()
	IF !CAN_SLOT
		PRINTFORML �u���������A���ɒT���������̂��Ȃ��̂Ƀ_�E�W���O���Ă�����Č������̂����H�v
		PRINTFORMW �u�������ł͖����񂾂�H�܂������c�v
		RETURN
	ENDIF
ELSE
	PRINTFORMW �u�܂��������邩�ȁH�v
ENDIF

FOR CHK_SLOT, 1, 6
	SIF !GETBIT(CAN_SLOT, CHK_SLOT)
		CONTINUE
	PRINTFORML [{CHK_SLOT}] - �˗�{CHK_SLOT}�@��%STR_DATA_IRAI(IRAI_SLOT:CHK_SLOT, "�˗���", IRAI_SLOT_TO_CLIENT(CHK_SLOT))%��
NEXT
PRINTFORML
PRINTFORML [0] - ��߂�
DO
	INPUT
	CHK_SLOT = RESULT
	SELECTCASE CHK_SLOT
	CASE 1 TO 5
		SIF !GETBIT(CAN_SLOT, CHK_SLOT)
			CONTINUE
		IF IRAI_SUB:CHK_SLOT
			PRINTFORML �u���������A���̈˗��Ȃ�������ׂ�����Ȃ����v
			CONTINUE
		ENDIF
		PRINTFORML �u�Ȃ�قǁv
		PRINTFORML �u�_�E�W���O�ɂ͑����̂��z�{�𒸂�����ǁA�\��Ȃ����ȁH�v
		CALL ASK_M("��߂Ă���", 1, "\\1000����̂���", MONEY >= 1000, "5CM����̂���", MONEY:2 >= 5)
		SELECTCASE RESULT
		CASE 0
			PRINTFORMW �u����A����͎c�O���v
			BREAK
		CASE 1
			MONEY -= 1000
		CASE 2
			MONEY:2 -= 5
		ENDSELECT
		CNT_DOWSING ++
		SELECTCASE IRAI_SLOT_TO_TASKNAME(CHK_SLOT)
		CASE "�{���i�l���j"
			CNT_DOWSING ++
			TMP_ID = IRAI_SLOT_TO_PERSON(CHK_SLOT)
			IRAI_SUB:CHK_SLOT = TMP_ID
			IF CALLNAME:TMP_ID == "�i�Y�[����"
			;�i�Y����͐l���ɑ΂��锽�����򂪑���������Ȃ�
			;���΂Ɏ���������Ȃ炱��Ȋ����ɂȂ邾�낤
				PRINTFORML �u����������y���f�������������Ɣ������Ă�񂾂��v
				PRINTFORML �u���̈˗��͎��Ɋ֘A������̂���Ȃ��̂��ȁH�v
				PRINTFORMW �u�Ȃ񂾂�����ȋC�������v
				BREAK
			ENDIF
			CALL DOWSING_TSUBUYAKI
			PRINTFORML �u���_���o����v
			PRINTFORML �u%CALLNAME:TMP_ID%���L�[�p�[�\�����v
			PRINTFORML �u���łɋ��ꏊ������o���Ă��������H�v
			CALL ASK_M("��߂Ă���", 1, "\\500����̂���", MONEY >= 500, "3CM����̂���", MONEY:2 >= 3)
			SELECTCASE RESULT
			CASE 0
				PRINTFORMW �u����A����͎c�O���v
				BREAK
			CASE 1
				MONEY -= 500
			CASE 2
				MONEY:2 -= 3
			ENDSELECT
			IF CFLAG:TMP_ID:���݈ʒu == SUKIMA()
				PRINTFORML �u���[��A���������肵�Ȃ��ȁv
				PRINTFORMW �u�������ɉ�͓̂���݂������ˁv
			ELSE
				PRINTFORMW �u�ޏ��͌��݁A�g%STR:(5000 + GET_MAPID(CFLAG:TMP_ID:���݈ʒu))%�h�̎��ӂɂ���悤���v
			ENDIF
		CASE "�{���i�ꏊ�j"
			CNT_DOWSING ++
			TMP_ID = IRAI_SLOT_TO_PLACE(CHK_SLOT)
			IRAI_SUB:CHK_SLOT = TMP_ID + 5000
			CALL DOWSING_TSUBUYAKI
			PRINTFORML �u���_���o����v
			PRINTFORML �u�N���ڎw���ׂ��ꏊ�́g%STR:(5000 + GET_MAPID(TMP_ID))%�h���v
			PRINTFORML �u�����Əڍׂȏ�񂪕K�v���ȁH�v

			CALL ASK_M("��߂Ă���", 1, "\\2000����̂���", MONEY >= 2000, "10CM����̂���", MONEY:2 >= 10)
			SELECTCASE RESULT
			CASE 0
				PRINTFORMW �u����A����͎c�O���v
				BREAK
			CASE 1
				MONEY -= 2000
			CASE 2
				MONEY:2 -= 10
			ENDSELECT
			IRAI_SUB:CHK_SLOT = TMP_ID
			PRINTFORMW �u%STR:(5000 + GET_MAPID(TMP_ID))%���ӁA���Ɂg%GET_PLACENAME(TMP_ID)%�h�̔����������ˁv
		CASEELSE
			PRINTFORMW �u����H�c�c���[��A���b�h�̒��q�����������ȁv
			PRINTFORML
			PRINTFORML �@�G���[�������i���O�̒񋟂����肢���܂��j
			PRINTFORML �@�N���b�N�ŃG���[���O����
			PRINTFORMW ����������
			PRINTFORML IRAI_SLOT:CHK_SLOT�@{IRAI_SLOT:CHK_SLOT}
			PRINTFORML IRAI_DATA:CHK_SLOT�@{IRAI_DATA:CHK_SLOT}
			CALL SHOW_IRAI_DATA(IRAI_SLOT:CHK_SLOT, CHK_SLOT)
			PRINTFORML
			PRINTFORML �������܂�
			PRINTFORMW �@�R�s�y�҂�
		ENDSELECT

	CASE 0
		IF CNT_DOWSING
			PRINTDATAL
				DATA �u�����ɗ��Ă����ȁH�v
				DATA �u�K�^���F���Ă�����v
				DATA �u���������̂����H�v
			ENDDATA
			PRINTFORMW �u�܁A�C���ɒT�����Ƃ��ˁv
		ELSE
			PRINTFORMW �u��₩���͂�߂Ă��炦�Ȃ����ȁv
		ENDIF
		RETURN
	CASEELSE
		$RETRY
		PRINTFORMW �u��A�������āH�v
		CONTINUE
	ENDSELECT
	BREAK
LOOP 1
RESTART

;����ς݈˗��̃_�E�W���O�۔���
;�߂�l��BIT�Ŋe�˗��̃_�E�W���O��
@CAN_DOWSING()
#FUNCTION
#DIM CHK_SLOT
#DIM DYNAMIC CAN_SLOT
FOR CHK_SLOT, 1, 6
	SIF !IRAI_SLOT_CAN_DOWSING(CHK_SLOT)
		CONTINUE
	SETBIT CAN_SLOT, CHK_SLOT
NEXT
RETURNF CAN_SLOT

;�X�̈˗��X���b�g�̃_�E�W���O�۔���
@IRAI_SLOT_CAN_DOWSING(CHK_SLOT)
#FUNCTION
#DIM CHK_SLOT
SIF IRAI_SLOT_TO_PROGRESS(CHK_SLOT) != "�˗���"
	RETURNF 0
SIF !GROUPMATCH(IRAI_SLOT_TO_TASKNAME(CHK_SLOT), "�{���i�l���j", "�{���i�ꏊ�j")
	RETURNF 0
RETURNF CHK_SLOT

;�_�E�W���O���̓Ƃ茾
@DOWSING_TSUBUYAKI
#DIMS COMMENT, 3
COMMENT:0 '= "�u�ق��c�c����́v"
STRDATA COMMENT:1
	DATA �u�c�c�����ԍi�荞�߂Ă������v
	DATA �u�ށA����ł͒��낪����Ȃ��ȁv
	DATA �u����A�����Ȃ�̂��v
	DATA �u�ł́A��������΁c�c�c�c�v
ENDDATA
STRDATA COMMENT:2
	DATA �u�c�c�����������Ƃ��v
	DATA �u�Ȃ񂾁A�ȒP�Ȃ��Ƃ���Ȃ����v
	DATA �u�悵�A���ꂾ�v
	DATA �u����ȂƂ��납�ȁv
ENDDATA
CALL PRINT_GROUP(COMMENT, 3)

;-------------------------------------------------
;�X�^�[�p
;-------------------------------------------------
@UNIQUE_COM_�C�z��T��
PRINTFORML �u�Ӂ[��A�N���T���Ă�́H�v
PRINTFORML �u�����˂��c�c�����Â������傤�����H�v
CALL ASK_M("����ς��", 1, "\\500������", MONEY >= 500, "3CM������", MONEY:2 >= 3)
SELECTCASE RESULT
CASE 0
	PRINTDATAW
		DATAFORM �u�ށ[�A%CALLNAME:MASTER%�̃P�`�v
		DATAFORM �u�c�c�͂��v
		DATAFORM �X�^�[�T�t�@�C�A�͖����ł�������ɂ݂��Ă���
	ENDDATA
	RETURN
CASE 1
	MONEY -= 500
CASE 2
	MONEY:2 -= 3
ENDSELECT
PRINTDATAW
	DATAFORM �u��[���v
	DATAFORM �u������[�v
	DATAFORM �u�����Â������[�v
	DATAFORM �u�b���킩��l���čD����v
	DATAFORM �X�^�[�T�t�@�C�A�͂����x��
ENDDATA
PRINTFORML �u���ꂶ��n�߂��ˁ�v
PRINTFORMW �u���[�Ɓc�c�v
PRINTFORML
CALL HITOSAGASI
PRINTFORMW

;-------------------------------------------------
;�������p
;��F�֌W�L���������A���͑����낤
;-------------------------------------------------
@UNIQUE_COM_�l����
#DIM PREV_DAY
#DIM IRAI_ABLE
#DIM CLIENT_ID
IF PREV_DAY == DAY
	PRINTFORMW �u�����͂��������Ă������H�v
	RETURN
ENDIF
PREV_DAY = DAY
PRINTFORMW �u���H�g�����Ă鏗�̎q��m��Ȃ����h�H�v

CALL CAN_IRAI_START
IRAI_ABLE = RESULT
IF IRAI_ABLE && IRAI_CHARA_TO_PROGRESS(TARGET) == "�˗������"
	PRINTFORML �u���邳�A�����Ɉ�l�ȁI�v
	CALL IRAI_START(TARGET)
	SIF IRAI_CHARA_TO_PROGRESS(TARGET) != "�˗���"
		PRINTFORMW �u������A���ʂ��̗���Œf�邩�H�v
	RETURN
ENDIF

CLIENT_ID = SEARCH_UNIQUE_COM_�l����()
SELECTCASE CLIENT_ID
CASE 0
	PRINTFORML �u���[��v
	PRINTFORMW �u���̒m�����ł͂��Ȃ��݂������ȁv
CASEELSE
	PRINTDATAL
		DATAFORM �u���[��v
		DATAFORM �u���[�Ɓv
		DATAFORM �u�������c�c�v
	ENDDATA
	PRINTDATAW
		DATAFORM �u%CALLNAME:CLIENT_ID%������Șb�����Ă��Ǝv���v
		DATAFORM �u%CALLNAME:CLIENT_ID%�����������Ă������ȁv
		DATAFORM �u%CALLNAME:CLIENT_ID%�������Ă�Ƃ��\�ŕ��������v
		DATAFORM �u%CALLNAME:CLIENT_ID%�̏��ɂł��s���Ă݂�΂����񂶂�Ȃ����H�v
		DATAFORM �u%CALLNAME:CLIENT_ID%�ɉ�ɍs���Ƃ����Ǝv�����v
	ENDDATA
ENDSELECT

@SEARCH_UNIQUE_COM_�l����
#FUNCTION
#DIM DYNAMIC CLIENT_ID, �L�����N�^�����
#DIM DYNAMIC CLIENT_CNT
FOR LOCAL:0, 1, CHARANUM
	SIF IRAI_CHARA_TO_PROGRESS(LOCAL:0) != "�˗������"
		CONTINUE
	CLIENT_ID:CLIENT_CNT = LOCAL:0
	CLIENT_CNT ++
NEXT
SIF !CLIENT_CNT
	RETURNF 0
RETURNF CLIENT_ID:(RAND:CLIENT_CNT)

;-------------------------------------------------
;�ɂƂ�p
;-------------------------------------------------
@UNIQUE_COM_����𔃂�
TFLAG:194 = 1
CALL ITEM_SALES
DRAWLINE
CALL LIST_ITEM("�͓�����")
DRAWLINE
PRINTL �u���Ȃ�������Ƃ���v
PRINTFORML �w������A�C�e����I��ł������� ������:\\%TOSTR(MONEY,"#,###")%
CALL SHOW_ITEM, "�͓�����", 3
PRINTL
DRAWLINE
PRINT [100] - �߂�@�@�@�@�@[101] - ����̉����@[102] - ����̊J��
INPUT
LOCAL = RESULT
SELECTCASE LOCAL
CASE 100
	RETURN -1
CASE 101
	CALL TOOL_CUSTOM
	SIF RESULT
		RETURN RESULT
CASE 102
	PRINTL �u�J���ɂ�git���K�v�Ȃ񂾁v
	PRINTW git�Ƃ͈�́c
	RETURN -1
CASEELSE
	SELECTCASE ITEMSTOCK(LOCAL)
	CASE 1, 4
		RETURN -1
	CASE 2
		PRINTW ���؂ł�
		RETURN -1
	CASE 3
		PRINTW ������������܂���
		RETURN -1
	CASE 5
		PRINTW ���ɏ\�������Ă��܂�
		RETURN -1
	CASEELSE
		SIF !INRANGE(LOCAL, 0, 100)
			RETURN -1
	ENDSELECT
	PRINTFORML %ITEMNAME:LOCAL%���w�����܂����H
	PRINTL [0] - �͂�  [1] - ������
	INPUT
	SIF RESULT
		RETURN -1
	ITEM:LOCAL ++
	MONEY -= ITEMPRICE:LOCAL / 3
	SIF INRANGE(LOCAL, 0, 39)
		SETBIT FLAG:�A�C�e���w���ς�, LOCAL
ENDSELECT
RESTART

;��������֐�
;����ł̓v�[����������
;�����A�C�e����������Ƃ���ɔ�剻����̂��ڂɌ�����̂œƗ�
;�w����RETURN -1�A�w�����Ȃ�����RETURN 0
;���������ɖ����ɓ��B����ƍw�����������ɂȂ�܂�
@TOOL_CUSTOM
#DIM �ԍ�_�ȈՃv�[��
GETNUM ITEM, "�ȈՃv�[��"
�ԍ�_�ȈՃv�[�� = RESULT

PRINTFORML ��������A�C�e����I��ł������� ������:\\%TOSTR(MONEY,"#,###")%
IF ITEM:�ȈՃv�[��
	LOCALS = [{�ԍ�_�ȈՃv�[��}] �ȈՃv�[��
	PRINTBUTTONLC LOCALS, �ԍ�_�ȈՃv�[��
ENDIF
PRINT [100] - ����ς��߂�
INPUT
SELECTCASE RESULT
CASE 100
	RETURN
CASE �ԍ�_�ȈՃv�[��
	SIF !ITEM:�ȈՃv�[��
		RETURN
	PRINTL �u�ǂ���������H�v
	PRINT ���݂̏�ԁF
	SIF GETBIT (FLAG:�v�[��, 0)
		PRINT [�������[�^�[]
	SIF GETBIT (FLAG:�v�[��, 1)
		PRINT [�����@�\]
	SIF GETBIT (FLAG:�v�[��, 2)
		PRINT [�V�����[]
	SIF GETBIT (FLAG:�v�[��, 3)
		PRINT [�s�v�c�ȖA]
	PRINTL

	IF !GETBIT (FLAG:�v�[��, 0)
		PRINTL [1] - ���[�^�[�i\5000�j�F�ړ��̕��S���Ȃ��Ȃ�
	ELSE
		SETCOLOR 150,150,150
		PRINTL [��] - ���[�^�[�F�ړ��̕��S���Ȃ��Ȃ�
		RESETCOLOR
	ENDIF
	IF !GETBIT (FLAG:�v�[��, 1)
		PRINTL [2] - �����@�\�i\5000�j�F�L���ꏊ�ł��낰��
	ELSE
		SETCOLOR 150,150,150
		PRINTL [��] - �����@�\�F�L���ꏊ�ł��낰��E�����C��v���C���ł���
		RESETCOLOR
	ENDIF
	IF !GETBIT (FLAG:�v�[��, 2)
		PRINTL [3] - �V�����[�i\5000�j�F�V�����[�Ő􂦂�E�������ł���
	ELSE
		SETCOLOR 150,150,150
		PRINTL [��] - �V�����[�F�V�����[�Ő􂦂�E�������ł���
		RESETCOLOR
	ENDIF
	SIF FLAG:�v�[�� < 7
		PRINTFORML [4] - �R�Ƃ������i�P�ɂ�\\5000�j
	IF FLAG:�v�[�� < 7
		PRINTL [?] - �H�H�H�H�H
	ELSEIF !GETBIT (FLAG:�v�[��, 3) && FLAG:�v�[�� < 8
		PRINTL [5] - �s�v�c�ȖA�i\5000�j�F�킩�����P�����R�Ɉړ��ł���悤�ɂȂ�
	ELSE
		SETCOLOR 150,150,150
		PRINTL [��] - �s�v�c�ȖA�F�킩�����P�����R�Ɉړ��ł���悤�ɂȂ�
		RESETCOLOR
		PRINTL ����ȏ�����ł��Ȃ�
	ENDIF

	PRINTL [100]����ς��߂�
	INPUT
	SELECTCASE RESULT
	CASE 100
		RETURN
	CASE 1
		IF !GETBIT (FLAG:�v�[��, 0) && MONEY >= 5000
			PRINTL �ړ��̕��S���Ȃ��Ȃ����I
			SETBIT FLAG:�v�[��, 0
			MONEY -= 5000
		ELSE
			RETURN
		ENDIF
	CASE 2
		IF !GETBIT (FLAG:�v�[��, 1) && MONEY >= 5000
			PRINTL �L���ꏊ�ł��낰��悤�ɂȂ����I
			PRINTL �����C��v���C���ł���悤�ɂȂ����I
			SETBIT FLAG:�v�[��, 1
			MONEY -= 5000
		ELSE
			RETURN
		ENDIF
	CASE 3
		IF !GETBIT (FLAG:�v�[��, 2) && MONEY >= 5000
			PRINTL �V�����[���g����悤�ɂȂ����I
			PRINTL ����肪�y�ɂȂ����I
			SETBIT FLAG:�v�[��, 2
			MONEY -= 5000
		ELSE
			RETURN
		ENDIF
	CASE 4
		IF FLAG:�v�[�� < 7
			PRINTL �F�X�@�\���ǉ����ꂽ�I && MONEY >= 5000 * (!GETBIT (FLAG:�v�[��, 0) + !GETBIT (FLAG:�v�[��, 1) + !GETBIT (FLAG:�v�[��, 2))
			MONEY -= 5000 * (!GETBIT (FLAG:�v�[��, 0) + !GETBIT (FLAG:�v�[��, 1) + !GETBIT (FLAG:�v�[��, 2))
			FLAG:�v�[�� = 7
		ELSE
			RETURN
		ENDIF
	CASE 5
		IF !GETBIT (FLAG:�v�[��, 3) && FLAG:�v�[�� < 8 && MONEY >= 5000
			PRINTL �킩�����P�ɕs�v�c�ȖA�𔃂��Ă������I
			FLAG:�v�[�� = 15
			MONEY -= 5000
		ELSE
			RETURN
		ENDIF
	ENDSELECT
CASEELSE
	RETURN
ENDSELECT
RETURN -1

;-------------------------------------------------
;���ƂĂ�p
;-------------------------------------------------
@UNIQUE_COM_��𔃂�
DRAWLINE
CALL LIST_ITEM("��������i")
DRAWLINE
PRINTFORML �w������A�C�e����I��ł������� ������:\\%TOSTR(MONEY,"#,###")%
PRINTL
VARSET LOCALS
CALL EX_SHOPPING("���[�V�����{�g��", "���[�V��������̑�r�B5�񕪂͂��肻�����B",0,1000)
CALL EX_SHOPPING("�R���h�[�������p�p�b�N", "50�������Ă�B",1,1000)
CALL EX_SHOPPING("�s���i5������j", "���邢�Ƒ��v��",2,5000)
CALL EX_SHOPPING("�����", "�D�ӂ�����₷���Ȃ�",250)
CALL EX_SHOPPING("������", "���p�̓_���ł���H",252)
CALL EX_SHOPPING("�h�{�h�����N", "�^�E����1000mg�z��",501)
CALL EX_SHOPPING("���͍�", "������������p�B",502)
CALL EX_SHOPPING("�E�R���h�����N", "���������ޑO��",510)
CALL EX_SHOPPING("���", "�P�K�����Ƃ����B�������ꏊ�Ɋ�����",520)
SIF TARGET == 53 && !ITEM:130
	CALL EX_SHOPPING("�e���u�J�^���v","���b�L�[�X�P�x���N���閲�̃A�C�e��",130)
DRAWLINE
PRINTL [100] ��߂�
INPUT
SELECTCASE RESULT
	CASE 0
		CALL BUY_ABLE(40,1000,5)
	CASE 1
		CALL BUY_ABLE(45,1000,50)
	CASE 2
		CALL BUY_ABLE(49,5000,5)
	CASE 130
		SIF TARGET == 53 && !ITEM:130
			CALL BOTTAKURI
	;�܂Ƃߔ����֐��ł������グ
	;�����̃A�C�e���͓��Ɋ����͂Ȃ��̂�@BUY_ABLE���g�p����K�R��������
	CASE 250, 252, 501, 502, 510, 520
		SELECTCASE ITEMSTOCK(RESULT)
		CASE 1, 4
		CASE 2
			PRINTW ���؂ł�
		CASE 3
			PRINTW ������������܂���
		CASE 5
			PRINTW ���ɏ\�������Ă��܂�
		CASEELSE
			CALL ITEM_MATOMEGAI(RESULT)
		ENDSELECT
	CASE 100
		RETURN -1
	CASEELSE
ENDSELECT
RESTART

@BOTTAKURI
SELECTCASE FLAG:�J�^���w����
CASE 0
	LOCAL = 1000
CASE 1 TO 3
	LOCAL = 10000
CASE 3 TO 10
	LOCAL = 20000
CASE 11 TO 20
	LOCAL = 30000
CASEELSE
	LOCAL = 50000
ENDSELECT
SIF TALENT:TARGET:���� && LOCAL >= 20000
	LOCAL /= 2

SIF !FLAG:�J�^���w����
	PRINTFORML �u���Ȃ炨�������i��\\{LOCAL}�I�����Ă��h���{�[�I�v
IF LOCAL <= 10000
ELSE
	IF TALENT:TARGET:����
		PRINTFORML �u%CALLNAME:MASTER%�Ȃ�\\{LOCAL}�ł�����v
	ELSE
		PRINTFORML �u����Ȃ�\\{LOCAL}�ɂȂ�����v
	ENDIF
	CALL ASK_M("�ӂ������",1, "�����܂�", MONEY >= LOCAL, "����Ȏ������闧��Ȃ́H", CFLAG:TARGET:��݈���� && !CFLAG:TARGET:��݈���)
	SELECTCASE RESULT
		CASE 0
			RETURN
		CASE 1
		CASE 2
			PRINTFORMW ��݂ƈ��������Ƀ^�_�ŃQ�b�g����
			ITEM:130 ++
			CFLAG:TARGET:��݈���� = 0
			RETURN
	ENDSELECT
ENDIF

IF MONEY >= LOCAL
	ITEM:130 ++
	MONEY -= LOCAL
	FLAG:�J�^���w���� ++
	PRINTFORMW \\{LOCAL}���x�����ēe���u�J�^���v���w������
ENDIF

;-------------------------------------------------
;�݂����[�p
;-------------------------------------------------
@UNIQUE_COM_����ŐH��
#DIM ���s�l���J�E���g
#DIM �����\�l��
#DIM ATSUKAN
#DIM OOMORI
#DIM KAIKEI
#DIM KAKAKU,2

���s�l���J�E���g = 1
�����\�l�� = 0
ATSUKAN = 0
KAIKEI = 0
OOMORI = 0
VARSET KAKAKU
SIF CAN_DRINK(MASTER)
	�����\�l�� = 1
FOR LOCAL,1,CHARANUM
	SIF !CFLAG:LOCAL:���s
		CONTINUE
	 SIF !TIME_PROGRESS(TCVAR:LOCAL:�󕠎���)
	 	CONTINUE
	���s�l���J�E���g ++
	SIF CAN_DRINK(LOCAL)
		�����\�l�� ++
NEXT
PRINTFORML �u��������Ⴂ�A{���s�l���J�E���g}���l�ˁv
KAKAKU:0 = 3 * ���s�l���J�E���g
KAKAKU:1 = 5 * ���s�l���J�E���g
CALL ASK_M("���Ă����荇�킹�@��l�O3CM",MONEY:2 >= KAKAKU:0 && TIME_PROGRESS(TCVAR:MASTER:�󕠎���),"���Ă����荇�킹�i��j�@��l�O5CM", MONEY:2 >= KAKAKU:1 && TIME_PROGRESS(TCVAR:MASTER:�󕠎���),"�e�C�N�A�E�g�@5CM",MONEY:2 >= 5 && !ITEM:���c����,"��߂�",1)
IF RESULT == 3
	PRINTFORML �u�܂����Ăˁv
	RETURN -1
ENDIF
IF RESULT == 2
	ITEM:���c���� ++
	MONEY:2 -= 5
	PRINTFORML �u��߂Ȃ������ɐH�ׂĂˁv
	SOURCE:���y += 200
	TFLAG:98 = 1
	TIME += 5
	RETURN 1
ENDIF
MONEY:2 -= KAKAKU:RESULT
KAIKEI = KAKAKU:RESULT

SIF RESULT == 1
	OOMORI = 1

IF MONEY:2 >= 2 * �����\�l��
	PRINTFORML �u��l2�J���X�}�ŔM��������H�v�i���C�E�C�͉񕜗ʃA�b�v�j
	CALL ASK_YN
	IF !RESULT
		ATSUKAN = 1
		KAIKEI += 2 * �����\�l��
		MONEY:2 -= 2 * �����\�l��
	ENDIF
ENDIF
;�M��
TFLAG:98 += 3
;���s���S���ŉ�

FOR LOCAL,0,CHARANUM
	SIF !CFLAG:LOCAL:���s && LOCAL
		CONTINUE
	 SIF !TIME_PROGRESS(TCVAR:LOCAL:�󕠎���)
	 	CONTINUE
	CALL EAT_YATSUME(LOCAL,OOMORI,ATSUKAN)
NEXT

SOURCE:���y += KAIKEI * 100
PRINTFORML �u���߂�{KAIKEI}�J���X�}�ɂȂ�܂��v
PRINTFORML �u�܂����Ăˁv
TIME += 30

@EAT_YATSUME(�Ώ�,ARG,ARG:1)
#DIM �񕜑O�̗�
#DIM �񕜑O�C��
#DIM �񕜑O����
#DIM �񕜌�̗�
#DIM �񕜌�C��
#DIM �񕜌㐸��
#DIM �Ώ�

�񕜑O�̗� = BASE:�Ώ�:�̗�
�񕜑O�C�� = BASE:�Ώ�:�C��
�񕜑O���� = BASE:�Ώ�:����

;�吷��̏ꍇ
IF ARG == 1
	CALL �����x�㏸(�Ώ�,"��H")
	CALL RECOVER_PERMIL(�Ώ�,100,"�̗�")
	CALL RECOVER_PERMIL(�Ώ�,200,"�C��")
	CALL RECOVER_PERMIL(�Ώ�,100,"����")
ELSE
	CALL �����x�㏸(�Ώ�,"�y�H")
	CALL RECOVER_PERMIL(�Ώ�,50,"�̗�")
	CALL RECOVER_PERMIL(�Ώ�,100,"�C��")
	CALL RECOVER_PERMIL(�Ώ�,50,"����")
ENDIF
IF �Ώ�
;�Œ�Ŋl������\�[�X
SOURCE:�Ώ�:���y = 1000
SOURCE:�Ώ�:� = 300

;ABL:�~�]���݂�
IF ABL:�Ώ�:�~�] <= 1
	SOURCE:�Ώ�:���y += (ABL:�Ώ�:�~�] * 60)
ELSEIF ABL:�Ώ�:�~�] <= 3
	SOURCE:�Ώ�:���y += 400 + (ABL:�Ώ�:�~�] * 60)
ELSEIF ABL:�Ώ�:�~�] <= 5
	SOURCE:�Ώ�:���y += 800 + (ABL:�Ώ�:�~�] * 60)
ELSEIF ABL:�Ώ�:�~�] <= 8
	SOURCE:�Ώ�:���y += 1000 + (ABL:�Ώ�:�~�] * 75)
ELSEIF ABL:�Ώ�:�~�] <= 11
	SOURCE:�Ώ�:���y += 1700 + (ABL:�Ώ�:�~�] * 75)
ELSE
	SOURCE:�Ώ�:���y += 2500 + (ABL:�Ώ�:�~�] * 35)
ENDIF

;ABL:�Ώ�:��d���_���݂�
IF ABL:�Ώ�:��d���_ <= 1
	SOURCE:�Ώ�:� += (ABL:�Ώ�:��d���_ * 30)
ELSEIF ABL:�Ώ�:��d���_ <= 3
	SOURCE:�Ώ�:� += 200 + (ABL:�Ώ�:��d���_ * 30)
ELSEIF ABL:�Ώ�:��d���_ <= 5
	SOURCE:�Ώ�:� += 500 + (ABL:�Ώ�:��d���_ * 30)
ELSEIF ABL:�Ώ�:��d���_ <= 8
	SOURCE:�Ώ�:� += 700 + (ABL:�Ώ�:��d���_ * 45)
ELSEIF ABL:�Ώ�:��d���_ <= 11
	SOURCE:�Ώ�:� += 1200 + (ABL:�Ώ�:��d���_ * 45)
ELSE
	SOURCE:�Ώ�:� += 1800 + (ABL:�Ώ�:��d���_ * 20)
ENDIF

;�D���x���݂�
IF CFLAG:�Ώ�:2 <= 500
	SOURCE:�Ώ�:���y += CFLAG:�Ώ�:2
ELSEIF CFLAG:�Ώ�:2 <= 5000
	SOURCE:�Ώ�:���y += 750 + (CFLAG:�Ώ�:2 - 500) / 3
ELSE
	SOURCE:�Ώ�:���y += 2000 + (CFLAG:�Ώ�:2 - 5000) / 4
ENDIF
SIF SOURCE:�Ώ�:���y < 0
	SOURCE:�Ώ�:���y = 0
SOURCE:�Ώ�:�� = 200 + 110 * ABL:�Ώ�:�]��
SOURCE:�Ώ�:���� = 200 + 110 * ABL:�Ώ�:�T�h���C

SIF TALENT:���V
	TIMES SOURCE:�Ώ�:���y , 1.50
ENDIF
;�M�����񂾏ꍇ
IF ARG:1 && CAN_DRINK(�Ώ�)
	TIMES SOURCE:�Ώ�:���y , 1.10
	CALL RECOVER_PERMIL(�Ώ�,50,"�C��")
	SIF �Ώ� != MASTER
		CALL KIGEN_CHANGE(�Ώ�,50,1)
	CALL DRUNKEN(�Ώ�,52)
ENDIF

�񕜌�̗� = BASE:�Ώ�:�̗�
�񕜌�C�� = BASE:�Ώ�:�C��
�񕜌㐸�� = BASE:�Ώ�:����

PRINTFORML �̗�+{ABS(�񕜌�̗� - �񕜑O�̗�)}�i%CALLNAME:�Ώ�%�j
PRINTFORML �C��+{ABS(�񕜌�C�� - �񕜑O�C��)}�i%CALLNAME:�Ώ�%�j
SIF ABS(�񕜌㐸�� - �񕜑O����) > 0
	PRINTFORML ����+{ABS(�񕜌㐸�� - �񕜑O����)}�i%CALLNAME:�Ώ�%�j
PRINTFORMW
TIME += 20
SIF ARG == 1
	TIME += 10

;-------------------------------------------------
;���P�p
;-------------------------------------------------
@UNIQUE_COM_�P�̏C��
PRINTFORML ���P�ɐ܂��ݎP�𒼂��Ă������
IF ITEM:��ꂽ�P
	PRINTFORMW �u�����Ƒ厖�Ɏg���Ă����Ă�v
	DOWNBASE:�C�� = 200
	SOURCE:���y += 1000
	ITEM:��ꂽ�P = 0
	ITEM:�܂��ݎP = 1
	TIME += 45
ELSE
	PRINTFORMW �u�厖�Ɏg���Ă����Ăˁv
	DOWNBASE:�C�� = 100
	SOURCE:���y += 1000 + ABL:�e�� * 50
	TFLAG:�D���x�{�[�i�X = FLAG:�P�ϋv�x / 10
	TFLAG:98 = FLAG:�P�ϋv�x / 1000
	FLAG:�P�ϋv�x = 0
ENDIF
TIME += 30

;-------------------------------------------------
;�i�ԗp
;-------------------------------------------------
@UNIQUE_COM_����𔄂�
#DIM ���ԍ�
#DIM ����
#DIM ���p��

PRINTFORML ������:\\%TOSTR(MONEY,"#,###")%
DRAWLINE
;�������Ă���f�ރA�C�e���̔��p�\���E�������X�g��
LOCAL:1 = 999
FOR LOCAL:0 ,600, 700
	SELECTCASE LOCAL:0
		CASE 600, 602, 610, 611, 616, 621, 626 TO 631, 636, 638, 639, 643 TO 645
			;�����Ă��Ă�����Ȃ��f�ނ����CASE�֒ǉ��@
		CASEELSE
			IF ITEM:(LOCAL:0)
				LOCALS:0 = [{LOCAL:0}] %ITEMNAME:(LOCAL:0), 16, LEFT%�~{ITEM:(LOCAL:0)}
				LOCAL:1 += STRLENS(LOCALS:0)
				SIF ITEM:(LOCAL:0) < 10
					LOCAL:1 ++
				IF LOCAL:1 > 90
					IF LOCAL:1 >= 999
					;�ŏ��̂݉��s���Ȃ�
					ELSE
						PRINTL
					ENDIF
					LOCAL:1 = 0
					PRINT �@�@
				ENDIF
				PRINTFORM [{LOCAL:0}] %ITEMNAME:(LOCAL:0), 16, LEFT%�~{ITEM:(LOCAL:0)}
				SIF ITEM:(LOCAL:0) < 10
					PRINT
				PRINT �@�@
				ENDIF
	ENDSELECT
NEXT
PRINTL
PRINTL �@�@[100] ��߂�
DRAWLINE
PRINTFORML �u���𔄂��Ă����̂�����H�v
$INPUT_LOOP01
INPUT
SELECTCASE RESULT
	CASE 100
		RETURN -1
	CASE 601, 603 TO 609, 612 TO 615, 617 TO 620, 622 TO 625, 632 TO 635, 637, 640, 641
		���ԍ� = RESULT
		���� = ITEM:(���ԍ�)
		IF ����
			SELECTCASE ���ԍ�
				CASE 601, 612, 635
					PRINTFORML �u%ITEMNAME:���ԍ�%�ˁB�����ł������炱���A�g���悤�ɂ���Ắc�c�ˁB
				CASE 603, 618
					PRINTFORML �u%ITEMNAME:���ԍ�%�ˁB���s�̐���Ƃ��ėL�������ǁc�c�ӂӁA�ǂ��g���Ă��炢�����̂�����H
				CASE 605, 624
					PRINTFORML �u%ITEMNAME:���ԍ�%�ˁB��l������Ɏ���o���ƁA���N�ł��Ȃ����ƂɂȂ邩�璍�ӂȂ����B
				CASE 654
					PRINTFORML �u%ITEMNAME:���ԍ�%�ˁB���@�܂ł��Ȃ��Ȃ�āA�Ȃ��Ȃ����|����Ȃ��B
				CASE 606, 609, 615, 625, 640
					PRINTFORML �u%ITEMNAME:���ԍ�%�c�I�@�悭��ɓ��ꂽ��ˁA����Ȃ��́B
				CASEELSE
					PRINTFORM �u%ITEMNAME:���ԍ�%�ˁB
			ENDSELECT
			PRINTFORM �@\\{(ITEMPRICE:(���ԍ�) / 2)}�Ŕ�����邯��ǁA�ǂ�����H�v
			SETCOLOR 0x777777
			PRINTFORML �@������܂����H(1�`{����}�̌�����́A0�Ŗ߂�)
			RESETCOLOR
			PRINTL
			PRINTBUTTON "[0] ��߂�", 0
			PRINT
			PRINTBUTTON "[1] 1��", 1
			PRINT
			IF ���� >= 5
				PRINTBUTTON "[5] 5��", 5
				PRINT
			ENDIF
			IF ���� >= 10
				PRINTBUTTON "[10] 10��", 10
				PRINT
			ENDIF
			$INPUT_LOOP02
			INPUT
			SELECTCASE RESULT
				CASE 0
					RESTART
				CASE 1 TO ����
					CLEARLINE 2
					���p�� = RESULT
					PRINTFORMW �u���肪�Ƃ��B���Ⴀ%ITEMNAME:���ԍ�%��{���p��}�A\\{(ITEMPRICE:(���ԍ�) / 2 * ���p��)}�Ŕ�����点�Ă��炤��v
					MONEY += (ITEMPRICE:(���ԍ�) / 2 * ���p��)
					ITEM:(���ԍ�) -= ���p��
					RESTART
				CASEELSE
					CLEARLINE 1
					GOTO INPUT_LOOP02
			ENDSELECT
		ELSE
			CLEARLINE 1
			GOTO INPUT_LOOP01
		ENDIF
	CASEELSE
		CLEARLINE 1
		GOTO INPUT_LOOP01
ENDSELECT
RESTART

path: 原版+前人整合等各种readme/パッチ/eraTW 4.711露店不具合修正+無縁塚新アイテムパッチ/ERB/コマンド関連/COMF/日常系/COMF443 固有コマンド.ERB


code:
;�̏W����
@COM445
#DIM �̏W��
#DIM �̏W�p���[
#DIM �̏W�p���[M
#DIM �̏W�p���[T
#DIM �y�n�̌b��
#DIM CHARA

;�����炳�܂Ȑl�̕~�n�ł̖��f�̏W�͂�߂�
SELECTCASE CFLAG:MASTER:���݈ʒu
	CASE ���z�̔�, 438
		IF ABL:[[�H��]]:�e�� < 5
			DRAWLINE
			PRINTFORML �����Ŗ��f�ō̏W������͔̂��Ɋ댯�ȋC������c
			RETURN -1
		ENDIF
	;�V�E�A����
	CASE �V�E, 833
		IF ABL:[[�V�q]]:�e�� < 5
			DRAWLINE
			PRINTFORML �����Ŗ��f�ō̏W������̂̓}�Y���C������c
			RETURN -1
		ENDIF
ENDSELECT

�̏W�� = 0
�̏W�p���[M = 0
�̏W�p���[T = 0
LOCAL:4 = 0

;�Q���Ҕ���
IF FLAG:�f�[�g���� && !FLAG:70
	CHARA = FLAG:�f�[�g����
ELSEIF TARGET && ABL:TARGET:�e�� >= 5 && !FLAG:70
	CHARA = TARGET
ELSE
	CHARA = 0
ENDIF

;�y�n�̌b�݁B���ւ���-25�`+25�̊Ԃ������_���ŕ����B�ނ���Q�l�ɁB
�y�n�̌b�� = FLAG:���ւ��C�x���g / 20 - 25

SIF ITEM:�O���̓V�H
	�y�n�̌b�� += 5

;�̏W�p���[�ݒ�
�̏W�p���[M = 10 + TALENT:MASTER:�̏WLv * 10 + ABL:MASTER:���{ * 5 + TFLAG:�K�^�␳ * 3
SIF ITEM:108
	�̏W�p���[M += 10

SIF CHARA && !FLAG:70
	�̏W�p���[T = 10 + TALENT:CHARA:�̏WLv * 10 + ABL:CHARA:���{ * 5
;�Q���҂ōł��p���[���������̂���ɁA1/2���������P�l�̃p���[�𑫂�
IF �̏W�p���[M >= �̏W�p���[T
	�̏W�p���[ = �̏W�p���[M + (�̏W�p���[T / 2)
ELSE
	�̏W�p���[ = �̏W�p���[T + (�̏W�p���[M / 2)
ENDIF

REPEAT 5
	REUSELASTLINE  \@ CHARA ? %CALLNAME:CHARA%�ƈꏏ�� #  \@�̏W��.%"." * COUNT%
	TWAIT 150, 1
REND
;�f�o�b�O�p
;LOCAL:6 = GATHERING_SPOT(CFLAG:MASTER:���݈ʒu)
;PRINTFORML {LOCAL:6}

$TREASURSARCH

;�̏W���̑I�o�iLOCAL:1�J�n�l�ALOCAL:2�I���l�ALOCAL:3 ���₷�l�j
;�����_���Ō����X�^�[�g�ʒu�����炵����A�����̌�����ς����肷��
SELECTCASE RAND:5
	CASE 0
		LOCAL:1 = 600 + RAND:40
		LOCAL:2 = 707
		LOCAL:3 = 1
	CASE 1
		LOCAL:1 = 706
		LOCAL:2 = 599
		LOCAL:3 = -1
	CASE 2
		LOCAL:1 = 640 - RAND:40
		LOCAL:2 = 599
		LOCAL:3 = -1
	CASEELSE
		LOCAL:1 = 600 + (5 * (RAND:9))
		LOCAL:2 = 707
		LOCAL:3 = 1
ENDSELECT

FOR LOCAL:0, LOCAL:1, LOCAL:2, LOCAL:3
	;�A�C�e���������łȂ��A�o�������𖞂����A���L������łȂ�
	SIF ITEMNAME:(LOCAL:0) == ""
		CONTINUE
	SIF ITEM:(LOCAL:0) == 99
		CONTINUE
	IF  GATHERING_PRODUCT(LOCAL:0, GATHERING_SPOT(CFLAG:MASTER:���݈ʒu)) >= 1 && GATHERING_SEASON(LOCAL:0)
		LOCAL:5 = ITEMPRICE:(LOCAL:0) + 1000
		;�̏W�p���[�{�␳�l �� ��A�C�e����p+1000 �������������
		IF �̏W�p���[ + �y�n�̌b�� >= SQRT(LOCAL:5)
			�̏W�� = LOCAL:0
			;���i10000�𒴂���󏭃A�C�e���͂P������ɓ���Ȃ��A����ȉ��̉��i�т͍̏W�p���[�ɉ����ĕ������肪�\��
			SELECTCASE LOCAL:5
				CASE 0 TO 2000
					TFLAG:194 = MAX((RAND:(SQRT(�̏W�p���[)) - 1), 1)
				CASE 2001 TO 4000
					TFLAG:194 = MAX((RAND:(SQRT(�̏W�p���[)) - 2), 1)
				CASE 4001 TO 7000
					TFLAG:194 = MAX((RAND:(SQRT(�̏W�p���[)) - 3), 1)
				CASE 7001 TO 10999
					TFLAG:194 = MAX((RAND:(SQRT(�̏W�p���[)) - 4), 1)
				CASEELSE
					TFLAG:194 = 1
			ENDSELECT
			BREAK
		ENDIF
	ENDIF
NEXT
;���s�񐔂��P�񑝂₷
LOCAL:4 ++
;�̏W�����C�ɓ���Ȃ��ꍇ�͈�������
IF �̏W�� != 0
	SETCOLOR 0x00FF00
	PRINTFORM %ITEMNAME:(�̏W��)%
	RESETCOLOR
	PRINTFORML �����������B�̏W���܂����H
	CALL ASK_YN
	IF !RESULT
		CLEARLINE 4
	ELSE
		CLEARLINE 4
		�̏W�� = 0
		TFLAG:194 = 0
		REPEAT 5
			REUSELASTLINE  \@ CHARA ? %CALLNAME:CHARA%�ƈꏏ�� #  \@�̏W��.%"." * COUNT%
			TWAIT 150, 1
		REND
	ENDIF
ENDIF

;���s�񐔂R��ȉ��ō̏W�����m�ۂ���Ă��Ȃ��ꍇ�̓��[�v
SIF LOCAL:4 <= 3 && �̏W�� == 0
	GOTO TREASURSARCH

;�A�C�e�����菈�� 99�ȏ�ɂȂ�Ȃ��悤�ɂ���
IF �̏W�� != 0
	IF ITEM:(�̏W��) + TFLAG:194 > 99
		ITEM:(�̏W��) = 99
	ELSE
		ITEM:(�̏W��) += TFLAG:194
	ENDIF
ENDIF

;��{�̌o��
EXP:MASTER:�̏W�o�� ++
SIF CHARA
	EXP:CHARA:�̏W�o�� ++

SIF ITEM:108 && !RAND:2
	EXP:MASTER:�̏W�o�� ++

SIF ABL:MASTER:���{ <= 2
	EXP:MASTER:�w�K�o�� ++

;�\�͍��ŋ����Ă��炤�E�����Ă�����
IF �̏W�p���[M >= �̏W�p���[T && CHARA
	EXP:CHARA:�̏W�o�� ++
ELSEIF CHARA
	EXP:MASTER:�̏W�o�� ++
ENDIF
IF ABL:MASTER:���{ >=  ABL:CHARA:���{ && CHARA
	EXP:CHARA:�w�K�o�� ++
ELSEIF CHARA
	EXP:MASTER:�w�K�o�� ++
ENDIF

;�f�[�g�o��
IF CHK_DATENOW(CFLAG:CHARA:�f�[�g��) && CHARA > 0
	EXP:MASTER:�f�[�g�o�� ++
	EXP:CHARA:�f�[�g�o�� ++
ENDIF

;���Ԓ�~����TSP��
IF FLAG:70
	BASE:MASTER:TSP -= 120
ELSE
	;���Ԍo��
	TIME += 60
	;�̗͌����͐퓬�\�͂ɂ���Č����}��
	DOWNBASE:MASTER:�̗� = 180 - (ABL:MASTER:�퓬�\�� * 15)
	DOWNBASE:MASTER:�C�� = 150
ENDIF

;�Q���҂̃\�[�X,����R�}���h�������󂯂Ȃ��̂ōT���߂�,������Ȃ��Ɣ���
IF CHARA > 0
	;�Œ�Ŋl������\�[�X
	SOURCE:CHARA:���y = 300
	SOURCE:CHARA:� = 50

	;ABL:�]�����݂�
	IF ABL:�]�� <= 1
		SOURCE:CHARA:���y += (ABL:�]�� * 40)
		SOURCE:CHARA:� += (ABL:�e�� * 20)
	ELSEIF ABL:�]�� <= 3
		SOURCE:CHARA:���y += 200 + (ABL:�]�� * 40)
		SOURCE:CHARA:� += 50 + (ABL:�e�� * 30)
	ELSEIF ABL:�]�� <= 5
		SOURCE:CHARA:���y += 500 + (ABL:�]�� * 40)
		SOURCE:CHARA:� += 200 + (ABL:�e�� * 30)
	ELSEIF ABL:�]�� <= 8
		SOURCE:CHARA:���y += 750 + (ABL:�]�� * 60)
		SOURCE:CHARA:� += 300 + (ABL:�e�� * 40)
	ELSEIF ABL:�]�� <= 11
		SOURCE:CHARA:���y += 1000 + (ABL:�]�� * 60)
		SOURCE:CHARA:� += 600 + (ABL:�e�� * 40)
	ELSE
		SOURCE:CHARA:���y += 1600 + (ABL:�]�� * 30)
		SOURCE:CHARA:� += 1000 + (ABL:�e�� * 20)
	ENDIF
	SIF CHARA != FLAG:�f�[�g����
		SOURCE:CHARA:� = 0

	;�D���x�݂͂Ȃ�

	SOURCE:CHARA:�� = 200 + 100 * ABL:�]��
	SOURCE:CHARA:���� = 200 + 100 * ABL:�T�h���C

	;�̏W���ʂ��݂�A�A�C�e�����i�ɉ����ĂƂ肠�����ݒ�
	IF �̏W��
		SELECTCASE ITEMPRICE:(�̏W��)
			CASE 1 TO 499
				TIMES SOURCE:CHARA:���y , 1.00
				TIMES SOURCE:CHARA:�� , 1.00
				TIMES SOURCE:CHARA:���� , 1.00
				SOURCE:CHARA:�B�� = 80
			CASE 500 TO 999
				TIMES SOURCE:CHARA:���y , 1.10
				TIMES SOURCE:CHARA:�� , 1.10
				TIMES SOURCE:CHARA:���� , 1.10
				SOURCE:CHARA:�B�� = 115
			CASE 1000 TO 2999
				TIMES SOURCE:CHARA:���y , 1.25
				TIMES SOURCE:CHARA:�� , 1.25
				TIMES SOURCE:CHARA:���� , 1.15
				SOURCE:CHARA:�B�� = 125
			CASE 3000 TO 5999
				TIMES SOURCE:CHARA:���y , 1.50
				TIMES SOURCE:CHARA:�� , 1.50
				TIMES SOURCE:CHARA:���� , 1.25
				SOURCE:CHARA:�B�� = 150
			CASE 6000 TO 9999
				TIMES SOURCE:CHARA:���y , 1.75
				TIMES SOURCE:CHARA:�� , 1.75
				TIMES SOURCE:CHARA:���� , 1.50
				SOURCE:CHARA:�B�� = 200
			CASE 10000 TO 14999
				TIMES SOURCE:CHARA:���y , 2.00
				TIMES SOURCE:CHARA:�� , 2.00
				TIMES SOURCE:CHARA:���� , 1.75
				SOURCE:CHARA:�B�� = 300
			CASEELSE
				TIMES SOURCE:CHARA:���y , 2.25
				TIMES SOURCE:CHARA:�� , 2.25
				TIMES SOURCE:CHARA:���� , 2.00
				SOURCE:CHARA:�B�� = 350
		ENDSELECT
	;������Ȃ�
	ELSE
		TIMES SOURCE:CHARA:���y , 0.50
		TIMES SOURCE:CHARA:�� , 0.50
		TIMES SOURCE:CHARA:���� , 0.50
	ENDIF
	;�̏W���̃L�����ɉ������ŗL�����i�㏑���j
	SELECTCASE �̏W��
		;�J�G��
		CASE 706
		;�`���m
			IF CHARA == [[�`���m]]
				TIMES SOURCE:CHARA:���y , 2.00
				TIMES SOURCE:CHARA:�� , 2.00
				TIMES SOURCE:CHARA:���� , 2.00
			;�z�K�q
			ELSEIF CHARA == [[�z�K�q]]
				TIMES SOURCE:CHARA:���y , 0.50
				TIMES SOURCE:CHARA:�� , 0.50
				TIMES SOURCE:CHARA:���� , 0.50
			ELSE
				TIMES SOURCE:CHARA:���y , 1.25
				TIMES SOURCE:CHARA:�� , 1.00
				TIMES SOURCE:CHARA:���� , 1.00
			ENDIF
			SOURCE:CHARA:�B�� = 110
	ENDSELECT
ENDIF

;�t���O�����n��
TFLAG:SELECTCOM�̕��� = �̏W��

RETURN 1

;-------------------------------------------------
;���s�\����
;-------------------------------------------------
;�̏W����
@COM_ABLE445
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(445)
	RETURN RESULT
;�̏W�ł���ꏊ�ł���
SIF !GATHERING_SPOT(CFLAG:MASTER:���݈ʒu)
	RETURN 0
;�f�[�g���̓f�[�g����Ƃ���
SIF FLAG:�f�[�g���� && TARGET != FLAG:�f�[�g����
	RETURN 0
;������
SIF CFLAG:MASTER:����
	RETURN 0
SIF CFLAG:���ӂ�
	RETURN 0
;�̗́E�C�͕s��
SIF BASE:MASTER:�C�� < 650 || BASE:MASTER:�̗� < 680
	RETURN 0
;���Ԓ�~�����\�i���j
;SIF FLAG:70
;	RETURN 0
RETURN 1

;-----------------------------------------------------------
;���݈ʒu����̏W�X�|�b�g������o���֐�
;ARG		���݈ʒu
;RETURN		0 �Y���Ȃ�	1�`30 �X�A����	31�`60 ���n		61�` ����
;COMMENT	�ꏊ��ǉ������ꍇ�ACASE��ύX�̎�
;-----------------------------------------------------------
@GATHERING_SPOT(ARG)
#FUNCTION
IF !AT_HOME(MASTER)
;�T�u�}�b�v�Ȃǂł̔���
	SELECTCASE ARG
		CASE 50				;�d���̑��
			SIF MAIN_MAP != 0
				RETURNF 1
		CASE �Ίp�̒|��		;430 ���C���}�b�v�ł́u�n�����v���w�肷�邽�ߏ��O
			SIF MAIN_MAP != 4
				RETURNF 2
		CASE �����̋u
			RETURNF 3
		CASE ���z�̔�
			RETURNF 4
		CASE �Ďv�̓�
			RETURNF 5
		CASE �Ö؂̑��		;530
			SIF MAIN_MAP != 5
				RETURNF 6
		CASE 630	;�O�r�̐�`���E�ɂ�����}���q�K ���C���}�b�v�������ɂ���������K�v���邩��
			RETURNF 7
		CASE 740	;�d���̎R�E�R�[�ɂ�����}���q�K
			SIF MAIN_MAP != 7
				RETURNF 7
		CASE �ފ�
			RETURNF 8
		CASE �[�̎��C
			SIF MAIN_MAP != 7
				RETURNF 11
		CASE ��i�̋u
			SIF MAIN_MAP != 8
				RETURNF 12
		CASE �V�E
			RETURNF 13
		CASE ���с`���l
			RETURNF 14
		CASE ���̌�
			SIF MAIN_MAP != 3
				RETURNF 31
		CASE �O�r�̐�
			RETURNF 32
		CASE �����̑�
			SIF MAIN_MAP != 7
				RETURNF 33
		CASE ���寂̒r
			SIF MAIN_MAP != 7
				RETURNF 34
		CASE ��V�̑�
			SIF MAIN_MAP != 8
				RETURNF 35
		CASE �R�̌�
			SIF MAIN_MAP != 8
				RETURNF 36
		CASE �n���̐[��
			SIF MAIN_MAP != 9
				RETURNF 37
		CASE ��n
			RETURNF 61
		CASE ������
			RETURNF 62
		CASE �Ԍ���n���Z���^�[
			RETURNF 64
		CASE �ܔM�n����
			RETURNF 65
		CASE ���z����
			SIF MAIN_MAP != 9
				RETURNF 66
		CASE �Â��̊C
			RETURNF 67
	ENDSELECT
ELSE
	;���C���}�b�v�ł̔���
	SELECTCASE MAIN_MAP
		CASE 0
			;����_�ЁF����̐X
			SIF ARG == 25
				RETURNF 1
		CASE 1
			;���@���F��n
			SIF ARG == 121
				RETURNF 61
		CASE 3
			;�g���فF�Δ�
			SIF ARG == 343
				RETURNF 31
		CASE 4
			;�i�����F�Ίp�̒|�сA�����̋u�A���z�̔�
			SELECTCASE ARG
				CASE 433
					RETURNF 2
				CASE 436
					RETURNF 3
				CASE 438
					RETURNF 4
			ENDSELECT
		CASE 5
			;���@�̐X�F�����ˁA�L�m�R�Q���n�A�Ďv�̓��A�Ö؂̑��
			SELECTCASE ARG
				CASE 506
					RETURNF 62
				CASE 507
					RETURNF 63
				CASE 509
					RETURNF 5
				CASE 540
					RETURNF 6
			ENDSELECT
		CASE 7
			;�d���̎R�R�[�F��֑������A�����̑�A�����A���寂̒r
			SELECTCASE ARG
				CASE 702
					RETURNF 9
				CASE 703
					RETURNF 33
				CASE 705
					RETURNF 10
				CASE 708
					RETURNF 34
			ENDSELECT
		CASE 8
			;�d���̎R�R���F����A��̗��A�ΔȁA����
			SELECTCASE ARG
				CASE 805
					RETURNF 12
				CASE 806
					RETURNF 35
				CASE 814
					RETURNF 36
				CASE 833
					RETURNF 13
			ENDSELECT
		CASE 9
			;�n��F�ܔM�n���ՁA��݁A�c���̒�
			SELECTCASE ARG
				CASE 928
					RETURNF 65
				CASE 945
					RETURNF 37
				CASE 948
					RETURNF 66
			ENDSELECT
	ENDSELECT
ENDIF
RETURNF 0

;-------------------------------------------------
;���̍̏W�X�|�b�g�ł̍̏W���̏o�����������֐�
;�A�C�e���ԍ�ARG:0
;GATHERING_SPOT(ARG)�̕Ԃ�lARG:1�i�̏W�X�|�b�g�j  ��
;�o���ۂ𐔎��ŕԂ� �o��==1 ��o��==0
;�A�C�e����ǉ������ꍇ�́AGROUPMATCH���ɂ��ꂼ��ǋL
;-------------------------------------------------
@GATHERING_PRODUCT(ARG:0, ARG:1)
#FUNCTION

SELECTCASE ARG:1
	;����̐X�A�d���̑��
	CASE 1
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 607, 608, 611, 612, 616, 619, 621, 622, 626, 627, 628, 636)
			RETURNF 1
	;�Ίp�̒|��
	CASE 2
		SIF GROUPMATCH(ARG:0, 607, 608, 611, 612, 613, 618, 619, 629, 635, 640)
			RETURNF 1
	;�����̋u
	CASE 3
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 603, 612, 616, 620, 626, 627, 631, 636, 638)
			RETURNF 1
	;���z�̔�
	CASE 4
		SIF GROUPMATCH(ARG:0, 612, 613, 614, 615, 617, 618, 619, 620, 623, 624, 626, 627)
			RETURNF 1
	;�Ďv�̓�
	CASE 5
		SIF GROUPMATCH(ARG:0, 612, 614, 619, 624, 631, 632, 638)
			RETURNF 1
	;�Ö؂̑��
	CASE 6
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 603, 604, 605, 607, 608, 611, 612, 616, 618, 621, 622, 623, 625, 626, 627, 628)
			RETURNF 1
	;�}���q�K
	CASE 7
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 603, 607, 608, 611, 612, 616, 617, 619, 621, 622, 626, 627, 628)
			RETURNF 1
	;�ފ�
	CASE 8
		SIF GROUPMATCH(ARG:0, 600, 601, 607, 608, 612, 614, 620, 624, 638)
			RETURNF 1
	;�R���E��֑�����
	CASE 9
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 607, 608, 611, 612, 616, 617, 621, 622, 626, 627, 628, 636)
			RETURNF 1
	;�R���E����
	CASE 10
		SIF GROUPMATCH(ARG:0, 611, 613, 616, 619, 621, 622, 623, 633)
			RETURNF 1
	;�[�̎��C
	CASE 11
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 607, 608, 611, 612, 613, 616, 617, 619, 621, 622, 623, 626, 627, 628, 633)
			RETURNF 1
	;��i�̋u�A����
	CASE 12
		SIF GROUPMATCH(ARG:0, 602, 603, 607, 608, 611, 612, 615, 616, 619, 621, 622, 625, 626, 627, 628)
			RETURNF 1
	;�V�E�A����
	CASE 13
		SIF GROUPMATCH(ARG:0, 615, 623, 630)
			RETURNF 1
	;���с`���l
	CASE 14
		SIF GROUPMATCH(ARG:0, 607, 608, 613, 615, 617, 618, 624, 625, 630)
			RETURNF 1
	;���̌΁A�Δ�(�g����)
	CASE 31
		SIF GROUPMATCH(ARG:0, 606, 607, 608, 609, 611, 612, 617, 624, 633, 706)
			RETURNF 1
	;�O�r�̐�
	CASE 32
		SIF GROUPMATCH(ARG:0, 607, 608, 612, 614, 631, 638, 706)
			RETURNF 1
	;�����̑�
	CASE 33
		SIF GROUPMATCH(ARG:0, 606, 607, 609, 611, 612, 618, 635, 706)
			RETURNF 1
	;���寂̒r
	CASE 34
		SIF GROUPMATCH(ARG:0, 604, 612, 620, 631, 636, 706)
			RETURNF 1
	;��V�̑�A��̗�
	CASE 35
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 606, 609, 611, 613, 631, 634, 706)
			RETURNF 1
	;�R�̌΁A�Δȁi�d���̎R�R���j
	CASE 36
		SIF GROUPMATCH(ARG:0, 606, 607, 609, 611, 612, 618, 632, 706)
			RETURNF 1
	;�n���̐[���A���
	CASE 37
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 604, 606, 609, 620, 631, 633, 636, 706)
			RETURNF 1
	;��n
	CASE 61
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 604, 614, 620, 631, 636, 638)
			RETURNF 1
	;������
	CASE 62
		SIF GROUPMATCH(ARG:0, 604, 606, 609, 631, 634, 635, 636, 638, 643, 644, 645)
			RETURNF 1
	;�L�m�R�Q���n
	CASE 63
		SIF GROUPMATCH(ARG:0, 600, 601, 602, 603, 604, 605, 605, 629)
			RETURNF 1
	;�Ԍ���n���Z���^�[
	CASE 64
		SIF GROUPMATCH(ARG:0, 632, 634, 637)
			RETURNF 1
	;�ܔM�n����
	CASE 65
		SIF GROUPMATCH(ARG:0, 631, 634, 635, 637, 638)
			RETURNF 1
	;���z�����A�c���̒�
	CASE 66
		SIF GROUPMATCH(ARG:0, 602, 604, 631, 632, )
			RETURNF 1
	;�Â��̊C
	CASE 67
		SIF GROUPMATCH(ARG:0, 639)
			RETURNF 1
ENDSELECT
RETURNF 0

;-------------------------------------------------
;�̏W���̋G�߂��Ƃ̏o������
;�A�C�e���ԍ�ARG:0�̋G�߂��Ƃ�
;�o���ۂ𐔎��ŕԂ��֐� �o��==1 ��o��==0
;�A�C�e����ǉ������ꍇ�́ACASE�ɒǋL
;-------------------------------------------------
@GATHERING_SEASON(ARG:0)
#FUNCTION

LOCAL = DAY:2
SIF GatheringSeason
	LOCAL = GatheringSeason

SELECTCASE LOCAL
	;�t:
	CASE 1
		SELECTCASE ARG:0
			CASE 600 TO 602, 604 TO 608, 610 TO 613, 616, 618 TO 627, 629, 631 TO 640, 643, 706
				RETURNF 1
		ENDSELECT
	;��
	CASE 2
		SELECTCASE ARG:0
			CASE 600 TO 601, 603, 606 TO 608, 612 TO 613, 618 TO 627, 630 TO 640, 644, 706
				RETURNF 1
		ENDSELECT
	;�H
	CASE 3
		SELECTCASE ARG:0
			CASE 600 TO 608, 611 TO 614, 616 TO 623, 625 TO 628, 631 TO 640, 645, 706
				RETURNF 1
		ENDSELECT
	;�~
	CASE 4
		;�V�E�A�n��A���ƃL�m�R�Q���n�͉ĂƂ݂Ȃ��č̏W�\
		IF GROUPMATCH(GATHERING_SPOT(CFLAG:MASTER:���݈ʒu), 13, 14, 37, 63, 64, 65, 66, 67)
			SELECTCASE ARG:0
				CASE 600 TO 601, 603, 606 TO 608, 612 TO 613, 618 TO 627, 630 TO 640, 706
					RETURNF 1
			ENDSELECT
		ELSE
			SELECTCASE ARG:0
				CASE 606, 609, 615, 620, 631 TO 635, 637 TO 640
					RETURNF 1
			ENDSELECT
		ENDIF
ENDSELECT
RETURNF 0

@SHOW_GATHERING_LIST
#DIM PLACE
PRINTFORML �̏W�ꏊ�ꗗ
CALL COLORMESSAGE(@"�����f�ށ@",C_YELLOW)
CALL COLORMESSAGE(@"�����f�ށ@",C_P_GREEN)
CALL COLORMESSAGE(@"�ō����f��",C_AQUA)
PRINTFORML
DRAWLINE
PRINTFORMLC [1] ����̐X�E�d���̑��
PRINTFORMLC [2] �Ίp�̒|��
PRINTFORMLC [3] �����̋u
PRINTFORMLC [4] ���z�̔�
PRINTFORMLC [5] �Ďv�̓�
PRINTFORMLC [6] �Ö؂̑��
PRINTFORMLC [7] �}���q�K
PRINTFORMLC [8] �ފ�
PRINTFORMLC [9] �R���E��֑�����
PRINTFORMLC [10] �R���E����
PRINTFORMLC [11] �[�̎��C
PRINTFORMLC [12] ��i�̋u�A����
PRINTFORMLC [13] �V�E�A����
PRINTFORMLC [14] ���с`���l
PRINTFORMLC [31] ���̌΁A�Δ�(�g����)
PRINTFORMLC [32] �O�r�̐�
PRINTFORMLC [33] �����̑�
PRINTFORMLC [34] ���寂̒r
PRINTFORMLC [35] ��V�̑�A��̗�
PRINTFORMLC [36] �R�̌΁A�Δȁi�d���̎R�R���j
PRINTFORMLC [37] �n���̐[���A���
PRINTFORMLC [61] ��n
PRINTFORMLC [62] ������
PRINTFORMLC [63] �L�m�R�Q���n
PRINTFORMLC [64] �Ԍ���n���Z���^�[
PRINTFORMLC [65] �ܔM�n����
PRINTFORMLC [66] ���z�����A�c���̒�
PRINTFORMLC [67] �Â��̊C
PRINTFORML
DRAWLINE
PRINTFORML [99] ��߂�
INPUT
PLACE = RESULT
SELECTCASE PLACE
	CASE 99
		RETURN -1
	CASEELSE
		CALL SHOW_GATHERING_ITEM(PLACE)
		PRINTFORMW
		CLEARLINE 1
		RESTART
ENDSELECT

@SHOW_GATHERING_LIST_SELECT(PLACE)
#DIM PLACE
DRAWLINE
PRINTFORML �̏W�\���ꗗ
CALL COLORMESSAGE(@"�����f�ށ@",C_YELLOW)
CALL COLORMESSAGE(@"�����f�ށ@",C_P_GREEN)
CALL COLORMESSAGE(@"�ō����f��",C_AQUA)
PRINTFORML
DRAWLINE

SELECTCASE PLACE
	CASE 99
		RETURN -1
	CASEELSE
		CALL SHOW_GATHERING_ITEM(PLACE)
		PRINTFORML
		DRAWLINE
		PRINTFORMW
ENDSELECT

@SHOW_GATHERING_ITEM(PLACE)
#DIM PLACE

FOR LOCAL,600,710
	IF GATHERING_PRODUCT(LOCAL, PLACE)
		LOCALS = %ITEMNAME:LOCAL%
		IF ITEMPRICE:LOCAL >= 1000
			SETCOLOR C_YELLOW
			SIF ABL:MASTER:���{ < 1
				LOCALS = �H�H�H
		ENDIF
		IF ITEMPRICE:LOCAL >= 3000
			SETCOLOR C_P_GREEN
			SIF ABL:MASTER:���{ < 2
				LOCALS = �H�H�H
		ENDIF
		IF ITEMPRICE:LOCAL >= 10000
			SETCOLOR C_AQUA
			SIF ABL:MASTER:���{ < 3
				LOCALS = �H�H�H
		ENDIF
		;�G�ߏ����𖞂����Ă��Ȃ��ꍇ�͊D�F�\�L��
		SIF !GATHERING_SEASON(LOCAL)
			SETCOLOR 0x606060

		PRINTFORM %LOCALS%�@
	ENDIF
	RESETCOLOR
NEXT

;-----------------------------
;�����Ŏw�肵�����i�͈͓��̑f�ނ̒����烉���_���ɓ���
;-----------------------------
@GetRandMaterial(QYT, PriceRange:0, PriceRange:1)
#DIM PriceRange, 2
#DIM cArray, 100
#DIM cNumber
#DIM Chosen
#DIM QYT
cNumber = 0
FOR LOCAL, 600, 700
	SIF ITEMNAME:LOCAL == ""
		CONTINUE
	;�A�C�e�����i���
	SIF ITEMPRICE:LOCAL > PriceRange:0
		CONTINUE
	;�����ȗ���
	SIF ITEMPRICE:LOCAL < PriceRange:1
		CONTINUE
	SIF ITEM:LOCAL >= 99
		CONTINUE
	cArray:cNumber = LOCAL
	cNumber ++
NEXT
SIF !cNumber
	RETURN

FOR LOCAL,0,QYT
	Chosen = RAND:cNumber
	ITEM:(cArray:Chosen) ++
	CALL COLORMESSAGE(@"%ITEMNAME:(cArray:Chosen)%����ɓ��ꂽ",C_YELLOW,1)
NEXT

repo_name: akadiya/eratw

path: 原版+前人整合等各种readme/パッチ/eraTW 4.711露店不具合修正+無縁塚新アイテムパッチ/ERB/コマンド関連/COMF/日常系/COMF445 採集する.ERB

license: unknown


code:
;�I�X���J��
@COM447
#DIM ����
#DIM ���l�p���[M
#DIM ���l�p���[T
#DIM ���l�p���[
#DIM ���q��
#DIM ���p�l
#DIM ���v���p�l
#DIM CHARA
#DIM GoodsID, 6
#DIM GoodsQty, 6
#DIM GoodsSold, 6
#DIM Lineup
#DIM LinesToErase

;���p�A�C�e���̎�ނ𑝂₷�Ƃ��́A��  ���������Ă�������
;�Ǘ��҂��͂����肵�Ă���l�̕~�n�ł̖��f�ł̏����͂��Ȃ�
IF STALL_PERMISSION(CFLAG:MASTER:���݈ʒu)
	DRAWLINE
	PRINTFORML �����Ŗ��f�ŏ���������͖̂��ɂȂ肻�����c����Ɛe�����Ȃ����ق����������낤
	RETURN -1
ENDIF

���l�p���[ = 0
���l�p���[M = 0
���l�p���[T = 0
���p�l = 0
���v���p�l = 0
Lineup = 0
VARSET LOCAL
VARSET GoodsID
VARSET GoodsQty
VARSET GoodsSold
DRAWLINE
PRINTL
;���q�����Z�o���A�ɂ��킢������
���q�� = STALL_SHOPPER(STALL_SPOT(CFLAG:MASTER:���݈ʒu)) + IN_ROOM_NUMBER(CFLAG:MASTER:���݈ʒu)
;PRINTFORML {���q��}�l
IF AT_HOME()
	PRINTFORMS NAME_FROM_PLACE(CFLAG:MASTER:���݈ʒu)
ELSE
	PRINTFORM %DATENAME_SPOT()%
ENDIF
SELECTCASE ���q��
	CASE 0
		PRINTFORML �ɂ͐l���q��l���Ȃ��c
	CASE 1 TO 5
		PRINTFORML �͊ՎU�Ƃ��Ă���
	CASE 6 TO 10
		PRINTFORML �ɂ��Ȃ��Ȃ��������������
	CASE 11 TO 20
		PRINTFORML �͂��������̂ɂ��킢�������Ă���
	CASE 21 TO 30
		PRINTFORML �͂Ȃ��Ȃ��ɂ�����Ă���
	CASEELSE
		PRINTFORML �͗����̗]�n���Ȃ����炢�̂ɂ��킢���I
ENDSELECT
PRINTL
PRINTFORML ���āA���𔄂낤���c
DRAWLINE

;�P�ڂ̃A�C�e������X�^�[�g
Lineup = 1
$SELECT_LOOP
;LinesToErase �����s���̌v�Z�ɗ��p
LinesToErase = 1
;�������Ă���A�C�e���̔��p�\���E�������X�g��
LOCAL:10 = 999
FOR LOCAL, 351, 710
	SELECTCASE LOCAL
		CASE 399 TO 499, 520 TO 599, 601 TO 610, 612 TO 615, 617 TO 625, 630 TO 642, 646 TO 699
			;�������Ă��Ă�����Ȃ��A�C�e�������CASE�֒ǉ�
		CASEELSE
			;�A�C�e���������ƁA�i�����ł̖�i�̔���e��
			IF ITEM:(LOCAL) > 0 || (STALL_SPOT(CFLAG:MASTER:���݈ʒu) == 5 && INRANGE(LOCAL, 501, 511))
				LOCALS:0 = [{LOCAL}] %ITEMNAME:(LOCAL), 16, LEFT%�~{ITEM:(LOCAL)}
				LOCAL:10 += STRLENS(LOCALS:0)
				SIF ITEM:(LOCAL) < 10
					LOCAL:10 ++
				IF LOCAL:10 > 90
					IF LOCAL:10 >= 999
					;�ŏ��̂݉��s���Ȃ�
					ELSE
						LinesToErase ++
						PRINTL
					ENDIF
					LOCAL:10 = 0
					PRINT �@�@
				ENDIF
				IF GROUPMATCH(LOCAL, GoodsID:1, GoodsID:2, GoodsID:3, GoodsID:4, GoodsID:5)
					SETCOLOR 0x666666
					PRINTPLAINFORM [{LOCAL}] %ITEMNAME:(LOCAL), 16, LEFT%�~{ITEM:(LOCAL)}
					RESETCOLOR
				ELSE
					PRINTFORM [{LOCAL}] %ITEMNAME:(LOCAL), 16, LEFT%�~{ITEM:(LOCAL)}
				ENDIF
				SIF ITEM:(LOCAL) < 10
					PRINT
				PRINT �@�@
			ENDIF
	ENDSELECT
NEXT
PRINTL
DRAWLINE
PRINTL �@�@[999] �I�X���J���̂���߂�
LinesToErase += 3
IF Lineup > 1
	PRINTL �@�@[1000] ���̏��i�ŘI�X���J��
	DRAWLINE
	SIF Lineup > 1
		PRINTFORML ���蕨�P�F%ITEMNAME:(GoodsID:1)%�~{GoodsQty:1}
	SIF Lineup > 2
		PRINTFORML ���蕨�Q�F%ITEMNAME:(GoodsID:2)%�~{GoodsQty:2}
	SIF Lineup > 3
		PRINTFORML ���蕨�R�F%ITEMNAME:(GoodsID:3)%�~{GoodsQty:3}
	SIF Lineup > 4
		PRINTFORML ���蕨�S�F%ITEMNAME:(GoodsID:4)%�~{GoodsQty:4}
	DRAWLINE
	LinesToErase += 3 + (Lineup - 1)
ENDIF
PRINTL
PRINTFORML {Lineup}�߂̔��蕨��I��ł�������
LinesToErase += 2
$INPUT_LOOP01
INPUT
SELECTCASE RESULT
	CASE 999
		RETURN -1
	CASE 1000
		IF Lineup > 1
			CLEARLINE 2
			GOTO SET_SALE
		ELSE
			CLEARLINE 1
			GOTO INPUT_LOOP01
		ENDIF
	;�������A�C�e��������CASE�ɒǉ�
	CASE 351 TO 398, 500 TO 512, 600, 611, 616, 626 TO 629, 643 TO 645, 700 TO 708
		;GoodsID�ɔ���ɏo���A�C�e���̔ԍ��𗬂�����
		GoodsID:Lineup = RESULT
		;�A�C�e�����������̏ꍇ�A�A�C�e�����������ĂȂ��ꍇ�A�i�����ł̖�i�̔��͂�蒼��
		IF ITEMNAME:(GoodsID:Lineup) == "" || ITEM:(GoodsID:Lineup) <= 0  || (STALL_SPOT(CFLAG:MASTER:���݈ʒu) == 5 && INRANGE(LOCAL, 501, 511))
			CLEARLINE 1
			GoodsID:Lineup = 0
			GOTO INPUT_LOOP01
		ENDIF
		;�d���I��h�~
		IF Lineup > 1
			FOR LOCAL, 1, Lineup
				IF GoodsID:Lineup == GoodsID:LOCAL
					CLEARLINE 1
					GoodsID:Lineup = 0
					GOTO INPUT_LOOP01

				ENDIF
			NEXT
		ENDIF
		���� = ITEM:(GoodsID:Lineup)
		SETCOLOR 0x777777
		PRINTFORML �@%ITEMNAME:(GoodsID:Lineup)%����������܂����H(1�`{����}�̌�����́A0�Ŗ߂�)
		RESETCOLOR
		PRINTL
		PRINTBUTTON "[0] ��߂�", 0
		PRINT
		PRINTBUTTON "[1] 1��", 1
		PRINT
		IF ���� >= 5
			PRINTBUTTON "[5] 5��", 5
			PRINT
		ENDIF
		IF ���� >= 10
			PRINTBUTTON "[10] 10��", 10
			PRINT
		ENDIF
		IF ���� >= 20
			PRINTBUTTON "[20] 20��", 20
			PRINT
		ENDIF
		LinesToErase += 3
		$INPUT_LOOP02
		INPUT
		SELECTCASE RESULT
			CASE 0
				CLEARLINE 3
				LinesToErase -= 3
				GoodsID:Lineup = 0
				RETURN -1
			CASE 1 TO ����
				CLEARLINE (LinesToErase + 1)
				;GoodsQty�ɔ���ɏo�����𗬂�����
				GoodsQty:Lineup = RESULT
			CASEELSE
				CLEARLINE 1
				GOTO INPUT_LOOP02
		ENDSELECT
	CASEELSE
		CLEARLINE 1
		GOTO INPUT_LOOP01
ENDSELECT

IF Lineup < 5
	Lineup ++
	GOTO SELECT_LOOP
ELSE
	PRINTFORML ���蕨�P�F%ITEMNAME:(GoodsID:1)%�~{GoodsQty:1}
	PRINTFORML ���蕨�Q�F%ITEMNAME:(GoodsID:2)%�~{GoodsQty:2}
	PRINTFORML ���蕨�R�F%ITEMNAME:(GoodsID:3)%�~{GoodsQty:3}
	PRINTFORML ���蕨�S�F%ITEMNAME:(GoodsID:4)%�~{GoodsQty:4}
	PRINTFORML ���蕨�T�F%ITEMNAME:(GoodsID:5)%�~{GoodsQty:5}
	PRINTL
	PRINTFORML ���̏��i�ŘI�X���J���܂����H
	CALL ASK_YN
	IF !RESULT
		CLEARLINE 1
	ELSE
		RETURN -1
	ENDIF
ENDIF

;���i�I�����I���A�\�͎Z��ֈڂ�
$SET_SALE

;�Q���Ҕ���
IF FLAG:�f�[�g����
	CHARA = FLAG:�f�[�g����
ELSEIF TARGET && ABL:TARGET:�e�� >= 10
	CHARA = TARGET
ELSE
	CHARA = 0
ENDIF

;���l�p���[�ݒ�
���l�p���[M = ABL:MASTER:�b�p�Z�\ * 25 + ABL:MASTER:���{ * 10 + TFLAG:�K�^�␳ * 3

SIF CHARA
	���l�p���[T = ABL:CHARA:�b�p�Z�\ * 25 + ABL:CHARA:���{ * 10
;�Q���҂ōł��p���[���������̂���ɁA1/2���������P�l�̃p���[�𑫂�
IF ���l�p���[M >= ���l�p���[T
	���l�p���[ = ���l�p���[M + (���l�p���[T / 2)
ELSE
	���l�p���[ = ���l�p���[T + (���l�p���[M / 2)
ENDIF

DRAWLINE
PRINTFORML �J�X�I
PRINTL

FOR COUNT, 0, ���q��

	SELECTCASE RAND:6
		CASE 0
			REUSELASTLINE \@ CHARA ? %CALLNAME:CHARA%�ƈꏏ�� #  \@������.....
		CASE 1
			REUSELASTLINE �����������[
		CASE 2
			REUSELASTLINE ����Ă�����Ⴂ���Ă������[��
		CASE 3
			REUSELASTLINE �y�l�D���܂���@�l�؂���󂯂��܂��z
		CASE 4
			REUSELASTLINE ���q����A�Ȃ��Ȃ����ڂ������ł���
		CASEELSE
			REUSELASTLINE �����̂��삳��A���������Ƃ��܂���[
	ENDSELECT
	TWAIT 750, 1

	$SARCH_START

	IF GoodsID:5
		LOCAL = RAND:6
	ELSEIF GoodsID:4
		LOCAL = RAND:5
	ELSEIF GoodsID:3
		LOCAL = RAND:4
	ELSEIF GoodsID:2
		LOCAL = RAND:3
	ELSE
		LOCAL = RAND:2
	ENDIF

	IF LOCAL == 0
		SETCOLOR C_L_GRAY
		PRINTDATAL
			DATAFORM �@�u�����Ƃ܂��Ă��炦�Ȃ��H�v�@�c�c�������܂��Ă��˂�
			DATAFORM �@�����Ȏq���w�����킦�ď��i�����Ă������A�e�䂳��Ɏ��������Ă����Ă��܂����c
			DATAFORM �@�q�̓`���`���Ɖ��ڂŏ��i�����Ă������A����������Ƌ������l�q�œ����čs���Ă��܂����c
			DATAFORM �@������ׂ�ȋq���A���Ԙb�������ċA���čs�����c
			DATAFORM �@��ʂ菤�i���ᖡ���āA�Y�ނ��Ԃ�͌����Ȃ�����A�q�͋����čs�����c
			DATAFORM �@�l�؂�������􂵂��c
			DATAFORM �@�f�ʂ肳�ꂽ�c
			DATAFORM �@���i����˂���ƁA�q�͗��������Ă��܂����c
		ENDDATA
		RESETCOLOR
		GOTO SARCH_END
	;�݌Ƀ[���̏ꍇ�́A�ēx�I��
	ELSEIF GoodsQty:LOCAL ==  GoodsSold:LOCAL
		GOTO SARCH_START
	ENDIF

	;�������ݒ�
	���� = MAX(RAND:(5 + ABL:MASTER:�b�p�Z�\), 1)
	;����������i�̍݌ɂ�葽���ꍇ�̏���
	SIF (���� + GoodsSold:LOCAL) > GoodsQty:LOCAL
		���� = GoodsQty:LOCAL - GoodsSold:LOCAL

	SETCOLOR C_YELLOW
	PRINTFORM %ITEMNAME:(GoodsID:LOCAL)%��{����}�A
	;���p�l��ݒ�
	���p�l = STALL_PRICE_SET(���l�p���[, GoodsID:LOCAL, ����)
	PRINTFORML \\{���p�l}�Ŕ��ꂽ�I
	RESETCOLOR

;	��������ɉ����ăe�L�X�g
;	SELECTCASE STALL_PRICE_SET(���l�p���[, GoodsID:LOCAL, ����, 1)
;		CASE 0 TO 50
;			PRINTFORML �����@����Ă��܂����c
;		CASE 51 TO 100
;			PRINTFORML �s�ꉿ�i�Ŕ��ꂽ�c
;		CASE 101 TO 150
;			PRINTFORML ������Ɖ��i���グ�Ĕ������c
;		CASEELSE
;			PRINTFORML ��肭�ۂߍ��݁A���l�������Ԓނ�グ���c
;	ENDSELECT

	;GoodsSold�ɔ��ꂽ���𗬂�����
	GoodsSold:LOCAL += ����
	���v���p�l += ���p�l

	$SARCH_END
	TWAIT 300, 1
	LOCAL:3 ++
	;���ׂĂ̏��i�𔄂�������甲����
	IF GoodsSold:1 == GoodsQty:1 && GoodsSold:2 == GoodsQty:2 && GoodsSold:3 == GoodsQty:3 && GoodsSold:4 == GoodsQty:4 && GoodsSold:5 == GoodsQty:5
		PRINTL
		PRINTFORML �������I
		BREAK
	ENDIF
NEXT

LOCAL:3 = MAX((25 - LOCAL:3), 5)

IF GoodsSold:1 != GoodsQty:1 || GoodsSold:2 != GoodsQty:2 || GoodsSold:3 != GoodsQty:2 || GoodsSold:4 != GoodsQty:4 || GoodsSold:5 != GoodsQty:5
	PRINTL
	REPEAT LOCAL:3
		REUSELASTLINE  .%"." * COUNT%
		TWAIT 150, 1
	REND
ENDIF
PRINTFORMW ���낻��X���܂��ɂ��悤
DRAWLINE
PRINTFORMW ����̏����̐��ʁc

SETCOLOR 0x00FF00
;���ꂽ����񋓁A�����ɃA�C�e�������炷
FOR LOCAL, 1, 6
	IF GoodsQty:LOCAL
		PRINTFORM �@%ITEMNAME:(GoodsID:LOCAL)%��
		IF GoodsSold:LOCAL
			PRINTFORM {GoodsSold:LOCAL}
			SELECTCASE GoodsID:LOCAL
				CASE 627, 644
					PRINTFORMW �r���ꂽ
				CASE 707, 708
					PRINTFORMW �����ꂽ
				CASEELSE
					PRINTFORMW ���ꂽ
			ENDSELECT
		ELSE
			PRINTFORMW �����ς蔄��Ȃ������c
		ENDIF
		ITEM:(GoodsID:LOCAL) -= GoodsSold:LOCAL
	ENDIF
NEXT
RESETCOLOR
PRINTL
;���v���p�l�̕\�L�A�����ɔ��㕪�̋��𑝂₷
IF ���v���p�l
	PRINTFORM ���v��
	SETCOLOR 0x00FF00
	PRINTFORM \\{���v���p�l}
	RESETCOLOR
	PRINTFORMW �ׂ̖��ɂȂ����I
	MONEY += ���v���p�l
	TFLAG:193 = 1
	TFLAG:194 = ���v���p�l
ELSE
	PRINTFORMW �S���ׂ����o�Ȃ������c
	TFLAG:193 = 0
ENDIF

;��{�̌o��
EXP:MASTER:��b�o�� += ���q��
SIF CHARA
	EXP:CHARA:��b�o�� += ���q��

SIF ABL:MASTER:���{ <= 3
	EXP:MASTER:�w�K�o�� ++

;�\�͍��ŋ����Ă��炤�E�����Ă�����
IF ABL:MASTER:���{ >=  ABL:CHARA:���{ && CHARA
	EXP:CHARA:�w�K�o�� ++
ELSEIF CHARA
	EXP:MASTER:�w�K�o�� ++
ENDIF

;�f�[�g�o��
IF CHK_DATENOW(CFLAG:CHARA:�f�[�g��) && CHARA > 0
	EXP:MASTER:�f�[�g�o�� ++
	EXP:CHARA:�f�[�g�o�� ++
ENDIF

;���Ԍo��
TIME += 120
;�̗́E�C�͌����͗��q���ɂ���đ���
DOWNBASE:MASTER:�̗� = MAX(15 * ���q��, 150)
DOWNBASE:MASTER:�C�� = MAX(20 * ���q��, 200)

;�Q���҂̃\�[�X,����R�}���h�������󂯂Ȃ��̂ōT���߂�,����Ȃ��ƌ���
IF CHARA > 0
	;�Œ�Ŋl������\�[�X
	SOURCE:CHARA:���y = 300
	SOURCE:CHARA:� = 50

	;ABL:�]�����݂�
	IF ABL:�]�� <= 1
		SOURCE:CHARA:���y += (ABL:�]�� * 30)
		SOURCE:CHARA:� += (ABL:�e�� * 15)
	ELSEIF ABL:�]�� <= 3
		SOURCE:CHARA:���y += 200 + (ABL:�]�� * 20)
		SOURCE:CHARA:� += 50 + (ABL:�e�� * 15)
	ELSEIF ABL:�]�� <= 5
		SOURCE:CHARA:���y += 500 + (ABL:�]�� * 20)
		SOURCE:CHARA:� += 200 + (ABL:�e�� * 15)
	ELSEIF ABL:�]�� <= 8
		SOURCE:CHARA:���y += 750 + (ABL:�]�� * 30)
		SOURCE:CHARA:� += 300 + (ABL:�e�� * 20)
	ELSEIF ABL:�]�� <= 11
		SOURCE:CHARA:���y += 1000 + (ABL:�]�� * 30)
		SOURCE:CHARA:� += 600 + (ABL:�e�� * 20)
	ELSE
		SOURCE:CHARA:���y += 1600 + (ABL:�]�� * 15)
		SOURCE:CHARA:� += 1000 + (ABL:�e�� * 10)
	ENDIF
	SIF CHARA != FLAG:�f�[�g����
		SOURCE:CHARA:� = 0

	;�D���x�݂͂Ȃ�

	SOURCE:CHARA:�� = 200 + 100 * ABL:�]��
	SOURCE:CHARA:���� = 200 + 100 * ABL:�T�h���C

	;���p���ʂ��݂�A���v���p�l�ɉ����ĂƂ肠�����ݒ�
	IF ���v���p�l
		SELECTCASE ���v���p�l
			CASE 1 TO 2000
				TIMES SOURCE:CHARA:���y , 1.00
				TIMES SOURCE:CHARA:�� , 1.00
				TIMES SOURCE:CHARA:���� , 1.00
				SOURCE:CHARA:�B�� = 80
			CASE 2001 TO 4000
				TIMES SOURCE:CHARA:���y , 1.10
				TIMES SOURCE:CHARA:�� , 1.10
				TIMES SOURCE:CHARA:���� , 1.10
				SOURCE:CHARA:�B�� = 115
			CASE 4001 TO 7000
				TIMES SOURCE:CHARA:���y , 1.25
				TIMES SOURCE:CHARA:�� , 1.25
				TIMES SOURCE:CHARA:���� , 1.15
				SOURCE:CHARA:�B�� = 125
			CASE 7001 TO 10000
				TIMES SOURCE:CHARA:���y , 1.50
				TIMES SOURCE:CHARA:�� , 1.50
				TIMES SOURCE:CHARA:���� , 1.25
				SOURCE:CHARA:�B�� = 150
			CASE 10001 TO 20000
				TIMES SOURCE:CHARA:���y , 1.75
				TIMES SOURCE:CHARA:�� , 1.75
				TIMES SOURCE:CHARA:���� , 1.50
				SOURCE:CHARA:�B�� = 200
			CASE 20001 TO 40000
				TIMES SOURCE:CHARA:���y , 2.00
				TIMES SOURCE:CHARA:�� , 2.00
				TIMES SOURCE:CHARA:���� , 1.75
				SOURCE:CHARA:�B�� = 300
			CASEELSE
				TIMES SOURCE:CHARA:���y , 2.25
				TIMES SOURCE:CHARA:�� , 2.25
				TIMES SOURCE:CHARA:���� , 2.00
				SOURCE:CHARA:�B�� = 350
		ENDSELECT
	;����Ȃ�����
	ELSE
		TIMES SOURCE:CHARA:���y , 0.20
		TIMES SOURCE:CHARA:�� , 0.20
		TIMES SOURCE:CHARA:���� , 0.20
	ENDIF
ENDIF

RETURN 1

;-------------------------------------------------
;���s�\����
;-------------------------------------------------
;�I�X���J��
@COM_ABLE447
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(447)
	RETURN RESULT
;�I�X���J����ꏊ�ł���
SIF !STALL_SPOT(CFLAG:MASTER:���݈ʒu)
	RETURN 0
;�f�[�g���̓f�[�g����Ƃ���
SIF FLAG:�f�[�g���� && TARGET != FLAG:�f�[�g����
	RETURN 0
;������
SIF CFLAG:MASTER:����
	RETURN 0
SIF CFLAG:���ӂ�
	RETURN 0
;�̗́E�C�͕s��
SIF BASE:MASTER:�C�� < 300 || BASE:MASTER:�̗� < 400
	RETURN 0
;���Ԓ�~��
SIF FLAG:70
	RETURN 0
RETURN 1

;-----------------------------------------------------------
;���݈ʒu���I�X���J����ꏊ�����肷��
;ARG		���݈ʒu
;RETURN		0 �Y���Ȃ�	1�`�e�I�X�n�_��Ԃ�
;COMMENT	�ꏊ��ǉ������ꍇ�ACASE��ύX�̎�
;-----------------------------------------------------------
@STALL_SPOT(ARG)
#FUNCTION
IF !AT_HOME(MASTER)
;�T�u�}�b�v�Ȃǂł̔���
	SELECTCASE ARG
		CASE 20				;�_�Ћ����i����_�Ёj
			RETURNF 1
		CASE 130			;���@������
			RETURNF 2
		CASE 210			;�L��i�l���j
			RETURNF 3
		CASE 310			;���̌�
			RETURNF 4
		CASE 450			;�i����
			RETURNF 5
		CASE 510			;�X�̓����
			RETURNF 6
		CASE 610			;���L�̓�
			RETURNF 7
		CASE 720			;�����̑�
			RETURNF 8
		CASE 820			;��i�̋u
			RETURNF 9
		CASE 840			;���_�Ћ���
			RETURNF 10
		CASE 890			;�V�E
			RETURNF 11
		CASE 930			;���n���X��
			RETURNF 12
		CASE 1050			;���̓s
			RETURNF 13
	ENDSELECT
ELSE
	;���C���}�b�v�ł̔���
	SELECTCASE MAIN_MAP
		CASE 0
			;����_�ЁF����
			SIF ARG == 2
				RETURNF 1
		CASE 1
			;���@���F����
			SIF ARG == 102
				RETURNF 2
		CASE 2
			;�l���F�����L��
			SIF ARG == 202
				RETURNF 3
		CASE 3
			;�g���فF�Δ�
			SIF ARG == 343
				RETURNF 4
		CASE 4
			;�i�����F�i���������
			SIF ARG == 401
				RETURNF 5
		CASE 5
			;���@�̐X�F���@�̍L��
			SIF ARG == 508
				RETURNF 6
		CASE 7
			;�d���̎R�R�[�F�����̑�
			SIF ARG == 703
				RETURNF 8
		CASE 8
			;�d���̎R�R���F����A���_�ЁE�����A�L���V�X
			SELECTCASE ARG
				CASE 805
					RETURNF 9
				CASE 811
					RETURNF 10
				CASE 832
					RETURNF 11
			ENDSELECT
		CASE 9
			;�n��F��ʂ�
			SIF ARG == 931
				RETURNF 12
	ENDSELECT
ENDIF
RETURNF 0

;-----------------------------------------------------------
;���݈ʒu�ŘI�X���J���ۂ̂������肵�����q��������o��
;�j�Փ��A�V�C�A���Ԃł��␳��������
;ARG		STALL_SPOT��RETURN�l
;RETURN		���q��
;COMMENT	�ꏊ��ǉ������ꍇ�ACASE��ύX�̎�
;-----------------------------------------------------------
@STALL_SHOPPER(ARG)
#FUNCTION

RANDOMIZE (DAY:0 + TIME:0)

SELECTCASE ARG
	CASE 1	;����_��  �P�̗��q���Ȃ���  �Փ��̓h���Ƒ�����
		LOCAL:0 = RAND:5
		SIF FESTIVAL() == "����"
			LOCAL:0 += MAX(RAND:50, 35)
		SIF GROUPMATCH(FESTIVAL(), "����", "���Ղ�", "���[", "���~", "���_�u��S�\���v", "�\�ܖ�", "���n��", "�ߕ�", "��A��")
			LOCAL:0 += MAX(RAND:40, 25)
	CASE 2	;���@��  �l���ɋ߂��̂�
		LOCAL:0 = MAX(RAND:12, 2)
		SIF GROUPMATCH(FESTIVAL(), "����", "���~", "���n��", "��A��")
			LOCAL:0 += MAX(RAND:35, 15)
	CASE 3	;�l��  �S��
		LOCAL:0 = MAX(RAND:35, 10)
		SIF IS_WEEKEND(DAY)
			LOCAL:0 += RAND:15
		SIF GROUPMATCH(FESTIVAL(), "����", "�z���C�g�f�[", "���n��", "�o�����^�C���f�[", "�N���X�}�X�C��", "�N���X�}�X")
			LOCAL:0 += RAND:15
	CASE 4	;���̌ΌΔ�  ����܂�l�ʂ�́c
		LOCAL:0 = RAND:5
		SIF GROUPMATCH(FESTIVAL(), "�z���C�g�f�[", "���n��", "�n���E�B��", "�o�����^�C���f�[", "�N���X�}�X�C��", "�N���X�}�X")
			LOCAL:0 += MAX(RAND:30, 15)
	CASE 5	;�i���������  ��@�Ȃ̂ł���Ȃ��
		LOCAL:0 = MAX(RAND:14, 3)
	CASE 6	;���@�̐X  �q�͗���̂��c�H
		LOCAL:0 = RAND:5
		SIF GROUPMATCH(FESTIVAL(), "����", "���[", "���~", "�\�ܖ�", "���n��", "��A��")
			LOCAL:0 += MAX(RAND:30, 20)
	CASE 7	;���L�̓�  ���ɂ��I�X���o�Ă�ݒ�Ȃ̂�
		LOCAL:0 = MAX(RAND:30, 7)
		SIF GROUPMATCH(FESTIVAL(), "���~")
			LOCAL:0 += MAX(RAND:30, 20)
	CASE 8	;�����̑�  �����l�͓̉������̌o�ό�
		LOCAL:0 = MAX(RAND:25, 15)
		SIF IS_WEEKEND(DAY)
			LOCAL:0 += RAND:15
		SIF GROUPMATCH(FESTIVAL(), "����", "���n��")
			LOCAL:0 += RAND:15
	CASE 9	;�d���̎R����  �V��̓꒣��
		LOCAL:0 = MAX(RAND:20, 5)
		SIF IS_WEEKEND(DAY)
			LOCAL:0 += RAND:15
		SIF GROUPMATCH(FESTIVAL(), "����", "���_�u��S�\���v", "���n��")
			LOCAL:0 += RAND:15
	CASE 10	;���_��  �����̂������ŏ����}�V�ɂȂ����H
		LOCAL:0 = MAX(RAND:10, 4)
		SIF GROUPMATCH(FESTIVAL(), "����", "����", "���Ղ�", "���[", "���~", "���_�u��S�\���v", "�\�ܖ�", "���n��", "�ߕ�", "��A��")
			LOCAL:0 += MAX(RAND:30, 20)
	CASE 11	;�L���V�X  �V�l���������͂���̂��c
		LOCAL:0 = MAX(RAND:20, 2)
		SIF IS_WEEKEND(DAY)
			LOCAL:0 += RAND:15
		SIF GROUPMATCH(FESTIVAL(), "����", "���[", "�\�ܖ�", "���n��", "�ߕ�", "��A��")
			LOCAL:0 += RAND:15
	CASE 12	;�n���ʂ�  �d�������̐������܂�
		LOCAL:0 = MAX(RAND:35, 15)
		SIF GROUPMATCH(FESTIVAL(), "����", "���n��")
			LOCAL:0 += RAND:15
	CASE 13	;���̓s  ���l�̋�����������̂��āc
		LOCAL:0 = MAX(RAND:25, 2)
ENDSELECT
;���ԕ␳�@�n���ʂ�ƌ��̓s�͎��ԁE�V��␳�������Ȃ�
IF !GROUPMATCH(ARG, 12, 13)
	;���ԕ␳
	SELECTCASE TIME:2
		CASE 1
			TIMES LOCAL:0, 0.3
		CASE 2
			TIMES LOCAL:0, 0.8
		CASE 3 TO 4
			;�␳�Ȃ�
		CASE 5
			TIMES LOCAL:0, 0.8
		CASE 6
			TIMES LOCAL:0, 0.5
		CASEELSE
			TIMES LOCAL:0, 0.2
	ENDSELECT
	;�V��␳
	SELECTCASE TIME:5
		CASE 0 TO 3
			;�␳�Ȃ�
		CASE 4, 6, 7
			TIMES LOCAL:0, 0.4
		CASEELSE
			TIMES LOCAL:0, 0.1
	ENDSELECT
ENDIF

RETURNF LOCAL:0

;-----------------------------------------------------------
;���݈ʒu�ŘI�X���J���ۂ̐e�������������
;ARG		���݈ʒu
;RETURN		0 ����	1 �s����
;COMMENT	�ꏊ��ǉ������ꍇ�ACASE��ύX�̎�
;-----------------------------------------------------------
@STALL_PERMISSION(ARG)
#FUNCTION
IF !AT_HOME(MASTER)
;�T�u�}�b�v�Ȃǂł̔���
	SELECTCASE ARG
		CASE 20				;�_�Ћ����i����_�Ёj
			SIF ABL:[[�얲]]:�e�� < 5
				RETURNF 1
		CASE 130			;���@������
			SIF ABL:[[���@]]:�e�� < 5
				RETURNF 1
		CASE 450			;�i����
			SIF ABL:[[�i��]]:�e�� < 5 && ABL:[[�P��]]:�e�� < 5
				RETURNF 1
		CASE 720			;�����̑�
			SIF ABL:[[�ɂƂ�]]:�e�� < 5
				RETURNF 1
		CASE 820			;��i�̋u
			SIF ABL:[[��]]:�e�� < 5 && ABL:[[�͂���]]:�e�� < 5
				RETURNF 1
		CASE 840			;���_�Ћ���
			SIF ABL:[[���c]]:�e�� < 5 && ABL:[[�_�ގq]]:�e�� < 5 && ABL:[[�z�K�q]]:�e�� < 5
				RETURNF 1
		CASE 890			;�V�E
			SIF ABL:[[�V�q]]:�e�� < 5
				RETURNF 1
	ENDSELECT
ELSE
	;���C���}�b�v�ł̔���
	SELECTCASE MAIN_MAP
		CASE 0
			;����_�ЁF����
			SIF ARG == 2 && ABL:[[�얲]]:�e�� < 5
				RETURNF 1
		CASE 1
			;���@���F����
			SIF ARG == 102 && ABL:[[���@]]:�e�� < 5
				RETURNF 1
		CASE 4
			;�i�����F�i���������
			SIF ARG == 401 && (ABL:[[�i��]]:�e�� < 5 && ABL:[[�P��]]:�e�� < 5)
				RETURNF 1
		CASE 7
			;�d���̎R�R�[�F�����̑�
			SIF ARG == 703 && ABL:[[�ɂƂ�]]:�e�� < 5
				RETURNF 1
		CASE 8
			;�d���̎R�R���F����A���_�ЁE�����A�L���V�X
			SELECTCASE ARG
				CASE 805
					SIF ABL:[[��]]:�e�� < 5 && ABL:[[�͂���]]:�e�� < 5
						RETURNF 1
				CASE 811
					SIF ABL:[[���c]]:�e�� < 5 && ABL:[[�_�ގq]]:�e�� < 5 && ABL:[[�z�K�q]]:�e�� < 5
						RETURNF 1
				CASE 832
					SIF ABL:[[�V�q]]:�e�� < 5
						RETURNF 1
			ENDSELECT
	ENDSELECT
ENDIF
RETURNF 0

;-----------------------------------------------------------
;�I�X�łP�l�̗��q��������Ŕ����������Z�o
;ARG:0		���l�p���[
;ARG:1		����A�C�e���ԍ�
;ARG:2		���ꂽ��
;ARG:3		0 = �w���z��Ԃ�, 1=������Ԃ��@�ȗ���0
;RETURN		�w���z
;-----------------------------------------------------------
@STALL_PRICE_SET(ARG:0, ARG:1, ARG:2, ARG:3 = 0)
#FUNCTION
#DIM ����
#DIM �w���z
#DIM �␳���i

;�������A�C�e�����i�́i���l�p���[�̔����`���l�p���[�j���ɐݒ�
���� = MAX(RAND:(ARG:0), (ARG:0 / 2))

�␳���i = ITEMPRICE:(ARG:1) / 2

;�␳���i�̌���
SELECTCASE ARG:1
	;��؂����{���牓���Ɖ��l���オ��
	CASE 351 TO 361
		SIF DAY:2 == 3
			TIMES �␳���i, 1.3
	CASE 362 TO 374
		SIF DAY:2 == 4
			TIMES �␳���i, 1.3
	CASE 375 TO 386
		SIF DAY:2 == 1
			TIMES �␳���i, 1.3
	CASE 387 TO 398
		SIF DAY:2 == 2
			TIMES �␳���i, 1.3
	;���i����
	CASE 500
		�␳���i += 150
	CASE 600
		�␳���i += 150
	CASE 611
		�␳���i += 145
	CASE 616
		�␳���i += 200
	CASE 626
		�␳���i += 125
	CASE 627
		�␳���i += 200
	CASE 628
		�␳���i += 50
	CASE 707
		�␳���i += 250
	CASE 708
		�␳���i += 350
ENDSELECT

;�I�X�̏ꏊ�ɂ��␳
SELECTCASE STALL_SPOT(CFLAG:MASTER:���݈ʒu)
	CASE 1	;����_��

	CASE 2	;���@��

	CASE 3	;�l��  �R�̍K�n���ɕ␳
		SIF GROUPMATCH(ARG:1, 600, 611, 616, 626, 627, 628, 629, 707, 708)
			TIMES �␳���i, 1.3
	CASE 4	;���̌ΌΔ�

	CASE 5	;�i���������  �ɂ񂶂�
		SIF GROUPMATCH(ARG:1, 388)
			TIMES �␳���i, 1.5
	CASE 6	;���@�̐X

	CASE 7	;���L�̓�

	CASE 8	;�����̑�  ���イ�聪  �������ȁ�
		SIF GROUPMATCH(ARG:1, 362)
			TIMES �␳���i, 1.5
		SIF GROUPMATCH(ARG:1, 707, 708)
			TIMES �␳���i, 0.5
	CASE 9	;�d���̎R����  ��������
		SIF GROUPMATCH(ARG:1, 707, 708)
			TIMES �␳���i, 1.3
	CASE 10	;���_��  ���z���蕨�i��  �J�G������
		SIF GROUPMATCH(ARG:1, 643, 644, 645)
			TIMES �␳���i, 1.3
		SIF GROUPMATCH(ARG:1, 706)
			TIMES �␳���i, 1.5
		SIF GROUPMATCH(ARG:1, 643, 644, 645)
			TIMES �␳���i, 1.5
	CASE 11	;�L���V�X  �R�̍K�n��
		SIF GROUPMATCH(ARG:1, 600, 611, 616, 626, 627, 628, 629, 707, 708)
			TIMES �␳���i, 1.3
	CASE 12	;�n���ʂ�  ���
		SIF INRANGE(ARG:1, 351, 398)
			TIMES �␳���i, 1.3
	CASE 13	;���̓s  �R�̍K�n��
		SIF GROUPMATCH(ARG:1, 600, 611, 616, 626, 627, 628, 629, 707, 708)
			TIMES �␳���i, 1.3
ENDSELECT

�w���z = �␳���i * ARG:2 * ���� / 100

IF ARG:3 == 0
	RETURNF �w���z
ELSE
	RETURNF ����
ENDIF

path: 原版+前人整合等各种readme/パッチ/eraTW 4.711露店不具合修正+無縁塚新アイテムパッチ/ERB/コマンド関連/COMF/日常系/COMF447 露店を開く.ERB


code:
;-------------------------------------------------
;�A�C�e�����
;-------------------------------------------------
@COM490
#DIM �񕜑O�̗͂P
#DIM �񕜑O�C�͂P
#DIM �񕜑O���͂P
#DIM �񕜌�̗͂P
#DIM �񕜌�C�͂P
#DIM �񕜌㐸�͂P
#DIM �񕜑O�̗͂Q
#DIM �񕜑O�C�͂Q
#DIM �񕜑O���͂Q
#DIM �񕜌�̗͂Q
#DIM �񕜌�C�͂Q
#DIM �񕜌㐸�͂Q
#DIM �Ώ�
#DIM �S��
#DIM CLIENT_ID
#DIM �����ւ̉�A
#DIM �g�p�A�C�e��
�񕜑O�̗͂P = BASE:MASTER:�̗�
�񕜑O�C�͂P = BASE:MASTER:�C��
�񕜑O���͂P = BASE:MASTER:����
�񕜑O�̗͂Q = BASE:TARGET:�̗�
�񕜑O�C�͂Q = BASE:TARGET:�C��
�񕜑O���͂Q = BASE:TARGET:����
VARSET LOCAL
VARSET LOCALS
�Ώ� = MASTER
�����ւ̉�A = 0
PRINTL �����g���܂����H
$LOOP
DRAWLINE
FOR LOCAL,120, 699
	IF �Ώ�
		IF �g�p�\�A�C�e��(LOCAL) == 2 && ITEM:LOCAL
			PRINTFORM [{LOCAL}] %ITEMNAME:LOCAL, 18, LEFT%
			SIF LOCAL > 99	;��X�̂��Ƃ��l���Ďd����
				PRINT
			SIF ITEM:LOCAL < 10
				PRINT
			PRINTFORM �@{ITEM:LOCAL}�@
			SETCOLOR C_L_GRAY
				PRINTFORML %ITEM_EXPLANATION(LOCAL)%
			RESETCOLOR
		ENDIF
	ELSE
		IF �g�p�\�A�C�e��(LOCAL) && ITEM:LOCAL
			PRINTFORM [{LOCAL}] %ITEMNAME:LOCAL, 18, LEFT%
			SIF LOCAL > 99
				PRINT
			SIF ITEM:LOCAL < 10
				PRINT
			PRINTFORM �@{ITEM:LOCAL}�@
			SETCOLOR C_L_GRAY
				PRINTFORML %ITEM_EXPLANATION(LOCAL)%
			RESETCOLOR
		ENDIF
	ENDIF
NEXT
PRINTL
DRAWLINE
PRINTFORML [900] �R���N�V�����̃X�L�}�����d�l�؂�ւ��i����\@ FLAG:C�X�L�}�����d�l ? ON# OFF\@�j
IF TARGET && SHIRAHU(TARGET)
	SIF �Ώ�
		SETCOLOR C_YELLOW
	PRINTFORMLC [998] %CALLNAME:TARGET%�Ɏg��
	RESETCOLOR
ENDIF

PRINTLC [999] ��߂�
INPUT
�g�p�A�C�e�� = RESULT
IF DRUG(�g�p�A�C�e��,�Ώ�)
	PRINTL �����͂�����߂Ă�����
	GOTO LOOP
ENDIF
IF ITEM_SWEETS(�g�p�A�C�e��) && !TIME_PROGRESS(TCVAR:�Ώ�:�f�U�[�g�󕠎���)
	PRINTL �܂��H�ׂ����Ȃ�
	GOTO LOOP
ENDIF
IF RESULT == 900
	FLAG:C�X�L�}�����d�l = !FLAG:C�X�L�}�����d�l
	PRINTFORMW �����d�l��\@ FLAG:C�X�L�}�����d�l ? ON# OFF\@�ɂ��܂���
	GOTO LOOP
ENDIF
SELECTCASE �g�p�A�C�e��
	CASE 120
		IF �Ώ� == MASTER
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			PRINTL �c�c�`�[�v�Ȗ�������
			CALL RECOVER(MASTER,50, "�̗�", "�`���R�ɂ���")
			TCVAR:�Ώ�:�f�U�[�g�󕠎��� = 1440 * DAY + TIME + 180
			LOCAL:1 ++
		ENDIF
	CASE 121
		IF �Ώ� == MASTER
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			CALL RECOVER(MASTER,300, "�̗�", "�`���R�ɂ���")
			CALL RECOVER(MASTER,300, "�C��", "�`���R�ɂ���")
			TCVAR:�Ώ�:�f�U�[�g�󕠎��� = 1440 * DAY + TIME + 180
			LOCAL:1 ++
		ENDIF
	CASE 122
		IF �Ώ� == MASTER
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			PRINTFORML ���܂��I
			CALL RECOVER(MASTER,500, "�̗�", "�`���R�ɂ���")
			CALL RECOVER(MASTER,500, "�C��", "�`���R�ɂ���")
			TCVAR:�Ώ�:�f�U�[�g�󕠎��� = 1440 * DAY + TIME + 180
			LOCAL:1 ++
		ENDIF
	CASE 123
		IF �Ώ� == MASTER
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			PRINTFORML ����������I
			CALL RECOVER(MASTER,1000, "�̗�", "�`���R�ɂ���")
			CALL RECOVER(MASTER,1000, "�C��", "�`���R�ɂ���")
			TCVAR:�Ώ�:�f�U�[�g�󕠎��� = 1440 * DAY + TIME + 180
			LOCAL:1 ++
		ENDIF
	CASE 212
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			LOCAL:1 ++
			CALL RECOVER(MASTER,100, "�̗�", "����������ɂ���")
			TCVAR:�Ώ�:�f�U�[�g�󕠎��� = 1440 * DAY + TIME + 180
	CASE 213
		SIF TARGET && SHIRAHU(TARGET)
			PRINT ��l�����
			PRINTDATA
				DATAFORM �w�A�C�X�x
				DATAFORM �w�Ⓚ�~�J���x
				DATAFORM �w������t�����\�[�_�A�C�X�x
				DATAFORM �w��ň�g�̂��܂��A�C�X�x
				DATAFORM �w�`���[�y�b�g�x
				DATAFORM �w�p�s�R�x
				DATAFORM �w�����̋l�܂����~���N�o�[�x
				DATAFORM �w�A�Y�L�o�[�x
				DATAFORM �w�X�C�J�o�[�x
				DATAFORM �w�K�c���A�Ƃ݂���x
				DATAFORM �w�u���b�N�T���_�[�A�C�X�x
				DATAFORM �w�ጩ�啟�x
			ENDDATA
		PRINTFORML ��H�ׂ�
			CALL RECOVER(MASTER,150, "�C��", "�A�C�X�ɂ���")
			TCVAR:MASTER:�f�U�[�g�󕠎��� = 1440 * DAY + TIME + 180
			IF  TARGET && SHIRAHU(TARGET)
				CALL RECOVER(TARGET,150, "�C��", "�A�C�X�ɂ���")
				TCVAR:�f�U�[�g�󕠎��� = 1440 * DAY + TIME + 180
			ENDIF
		LOCAL:1 ++
	CASE 215
		PRINTFORML %ITEMNAME:�g�p�A�C�e��%���g����
		SETBIT TCVAR:MASTER:���ʂȂ���, 0
		LOCAL:1 ++
	CASE 352
		PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
		CALL RECOVER(�Ώ�,50, "�C��", "�C�`�S�ɂ���")
		SIF �Ώ� == (NO:9)
			CALL RECOVER(�Ώ�,50, "�C��", "�C�`�S�ɂ���")
		LOCAL:1 ++
	CASE 364
		IF FLAG:70 == 1
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			CALL RECOVER(MASTER,100, "�C��", "�X�C�J�ɂ���")
		ELSE
			PRINTFORML �F��%ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			FOR �S��, 0, CHARANUM
				SIF CFLAG:�S��:���݈ʒu != CFLAG:MASTER:���݈ʒu
					CONTINUE
				SIF !SHIRAHU(�S��)
					CONTINUE
				CALL RECOVER(�S��,100, "�C��", "�X�C�J�ɂ���")
			NEXT
		ENDIF
		LOCAL:1 ++
	;CASE 400
	;	PRINTFORML %CALLNAME:MASTER%��%ITEMNAME:�g�p�A�C�e��%���J����
	;	CALL COM401
	;	LOCAL:1 ++
	CASE 500
		PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
		PRINTL �}�Y�C�I������t�I
		CALL RECOVER(�Ώ�,100, "�̗�", "�`�ɂ���")
		CALL RECOVER(�Ώ�,200, "�C��", "�`�ɂ���")
		LOCAL:1 ++
	CASE 501
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			CALL RECOVER(�Ώ�,200, "�̗�", "�h�{�h�����N�ɂ���")
			CALL RECOVER(�Ώ�,100, "�C��", "�h�{�h�����N�ɂ���")
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 502
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			SIF GETBIT(TALENT:�Ώ�:����, 1)
				CALL RECOVER(�Ώ�,300, "����", "���͍܂ɂ���")
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 503
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			PRINTL �ӂ����Ƃ����ςA�܂񂽁[��I
			CALL RECOVER(�Ώ�,500, "�̗�", "�M���M���y�ɂ���")
			CALL RECOVER(�Ώ�,300, "�C��", "�M���M���y�ɂ���")
			CFLAG:�Ώ�:385 = 60
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	;CASE 504
	;		IF FLAG:70
	;			PRINTFORML ���Ԓ�~���������Ă���g����
	;			GOTO LOOP
	;		ENDIF
	;		IF CFLAG:MASTER:���݈ʒu != CFLAG:MASTER:�����ʒu
	;			PRINTFORML ����͎����ň�����
	;			GOTO LOOP
	;		ENDIF
	;		PRINTFORML �X�g�����O���������ɂ����r�[�A�����̗͂Ŏv�l�͂ڂ₯�A���ׂĂ��ǂ��ł��悭�Ȃ��Ă���
	;		PRINTFORML %CALLNAME:MASTER%�͊ʂ��󂯂Ȃ������𖳈ׂɉ߂������c
	;		�����ւ̉�A = 1
	CASE 505	;�M���M���M���w
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			PRINTL �Q�S���Ԑ킦�����ȋC������c�I
			CALL RECOVER(�Ώ�,800, "�̗�", "�M���M���M���w�ɂ���")
			CALL RECOVER(�Ώ�,600, "�C��", "�M���M���M���w�ɂ���")
			CFLAG:�Ώ�:���C�o�܂� = 180
			CFLAG:�Ώ�:�O�� = 1
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 506
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			PRINTL ���܂��́~�~�~�œV���Ղ��I
			CALL RECOVER(�Ώ�,200, "�̗�", "���͍܁w�V���ʔj�x�ɂ���")
			CALL RECOVER(�Ώ�,200, "�C��", "���͍܁w�V���ʔj�x�ɂ���")
			CALL RECOVER(�Ώ�,600, "����", "���͍܁w�V���ʔj�x�ɂ���")
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 507
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			CALL RECOVER(�Ώ�,150, "�C��", "�|�[�V�����ɂ���")
			CALL RECOVER(�Ώ�,150, "TSP", "�|�[�V�����ɂ���")
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 508
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			PRINTL ���͂��݂Ȃ����Ă���c
			CALL RECOVER(�Ώ�,300, "�C��", "�}�W�b�N�|�[�V�����ɂ���")
			CALL RECOVER(�Ώ�,600, "TSP", "�}�W�b�N�|�[�V�����ɂ���")
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 509
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			CALL RECOVER(�Ώ�,200, "�C��", "�j���|�[�V�����ɂ���")
			CFLAG:�Ώ�:���C�o�܂� = 240
			CFLAG:�Ώ�:�O�� = 1
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 510
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			PRINTL �̋@�\�����܂�A�����ɂ����Ȃ���
			TFLAG:�����~�� = 1
			LOCAL:1 ++
	CASE 511	;�G���N�T�[
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			PRINTL ��ꂪ�ޕ��ւƐ�����񂾁c�I
			CALL RECOVER(�Ώ�, MAXBASE:�Ώ�:�̗�, "�̗�", "�G���N�T�[�ɂ���")
			CALL RECOVER(�Ώ�,9999, "�C��", "�G���N�T�[�ɂ���")
			SIF �Ώ� == MASTER
				CALL RECOVER(�Ώ�,9999, "TSP", "�G���N�T�[�ɂ���")
			CALL RECOVER(�Ώ�,9999, "����", "�G���N�T�[�ɂ���")
			CFLAG:�Ώ�:���C�o�܂� = 300
			TCVAR:�Ώ�:���� = 1
			LOCAL:1 ++
	CASE 512	;��O
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
			PRINTL �q��łȂ��͂��݂Ȃ���c�c�I
			CALL BUFF_BASE(�Ώ�, BASE_�̗�, MAX(MAXBASE:�Ώ�:�̗� / 5, 500))
			CALL BUFF_BASE(�Ώ�, BASE_�C��, MAX(MAXBASE:�Ώ�:�C�� / 5, 500))
			CALL BUFF_BASE(�Ώ�, BASE_����, MAX(MAXBASE:�Ώ�:���� / 5, 500))
			LOCAL:1 ++
	CASE 520
			IF !TFLAG:�L�X�}�[�N
				PRINTFORML ���g���Ă��Ӗ����Ȃ�
				GOTO LOOP
			ELSE
				PRINTFORML %CALLNAME:MASTER%��%ITEMNAME:�g�p�A�C�e��%�������ăL�X�}�[�N���B����
				TFLAG:��� = 1
				LOCAL:1 ++
			ENDIF
	CASE 521
			IF FLAG:70
				PRINTFORML ���Ԓ�~���������Ă���g����
				GOTO LOOP
			ENDIF
			PRINTFORML %CALLNAME:MASTER%�͈Տ����J����
			PRINTFORML �Վ҂��o�Ă���
			PRINTFORMW
			IF CFLAG:1:���݈ʒu == CFLAG:MASTER:���݈ʒu
				PRINTFORML ���������얲�͈Վ҂̓��ڊ|���Ă��P���_��U�艺�낵��
				PRINTFORML ����Վ҂͂Q�Ɋ����Ă��܂���
				FOR LOCAL,1,CHARANUM
					IF CFLAG:LOCAL:���݈ʒu == CFLAG:MASTER:���݈ʒu
						BASE:LOCAL:���� = MAXBASE:LOCAL:����
						BASE:LOCAL:���[�h = 0
					ENDIF
				NEXT
				LOCAL:1 ++
			ELSE
				PRINTFORML �u��p��ʂ��Đi�ނׂ��������Ă�낤�v
				$EKISYA
				CALL ASK_M("�����̉^��", !GETBIT(FLAG:999, 1), "�����Ă���l��T��", 1, "�ܐ؂�", BASE:MASTER:TSP >= 20, "�~���_�̐΂̉���(100�J���X�})", MONEY:2 >= 100, "�T���Y�A�b�v", 1, "�����ɂ���", 1)
				SELECTCASE RESULT
					CASE 0
						SELECTCASE RAND:10
							CASE 0
								TFLAG:�K�^�␳ = 3
								PRINTFORML �u��D�����A�����ł������ɍs������ǂ����H�v
							CASE 1 TO 3
								TFLAG:�K�^�␳ = 1
								PRINTFORML �u�ǍD���A���܂��Ă�����Ƃ�����΂��Ƃ����v
							CASE 4,5
								PRINTFORML �u�悭���Ȃ��������Ȃ��v
							CASE 6 TO 8
								TFLAG:�K�^�␳ = -1
								PRINTFORML �u�ᒲ���A�����͂���ȁv
							CASE 9
								TFLAG:�K�^�␳ = -3
								PRINTFORML �u�c�c�Ă�őʖڂ��ȁA��l�������Ă���v
						ENDSELECT
					CASE 1
						CLIENT_ID = SEARCH_UNIQUE_COM_�l����()
						IF !CLIENT_ID
							PRINTFORML �u���[�ށA���ɉ���������ȁv
							PRINTFORML �u�����Č����Ύ����A�ޏ��ɑ_���Ă���v
							PRINTFORML ����͂ǂ��ɂ��Ȃ�Ȃ�������
						ELSE
							PRINTFORML �u%CALLNAME:CLIENT_ID%���菕�������߂Ă���悤�����v
						ENDIF
					CASE 2
						PRINTFORMW %CALLNAME:MASTER%�͈Վ҂����Ă���ƉՂ��Ă���
						PRINTFORMW �c�c�Ȃ񂾂��̒܂́B
						PRINTFORML �l�Ԃ�߂܂����A�s�[���Ȃ̂��m��Ȃ����A������Ȃ�ł��L�΂��������B
						PRINTFORML ���퐶���ŕs�ւ���Ȃ��̂��H���l��������������~�����������ǂ����悤�Ƃ͎v��Ȃ��̂��H
						PRINTFORML �����͂��f���P�[�g�ȕ����ɐG���Ă������悤�ɖ����`�F�b�N���Ă��邼�B
						PRINTFORML ����ȑO�ɉ����Ɉ����|���Đ��ܔ��������ƂɂȂ�����ɂ�����Ȃ����B
						PRINTFORMW ��ꉘ�ꂪ���܂��ĕs�����B
						PRINTFORMW �䖝�ł��Ȃ��Ȃ���%CALLNAME:MASTER%�͎��Ԃ��~�߂ĈՎ҂̒܂𒚔J�ɐ؂葵����
						PRINTFORMW %CALLNAME:MASTER%�͑傫�ȒB�����𖡂�����c�c
						PRINTFORML ����ˑR�܂��Z���Ȃ����Վ҂͍��f���Ă���c�c
						CALL RECOVER_PERMIL(�Ώ�,40,"�C��")
						BASE:MASTER:TSP -= 20
					CASE 3
						PRINTFORML �N�̂����􂷂�H
						FOR LOCAL,1,CHARANUM
							SIF CFLAG:LOCAL:�̖ړ���
								PRINTFORMLC [{LOCAL}] %CALLNAME:LOCAL%
						NEXT
						PRINTFORML
						DRAWLINE
						PRINTFORML [999] ��߂�
						INPUT
						IF RESULT == 999
							GOTO EKISYA
						ELSEIF CFLAG:RESULT:�̖ړ���
							PRINTFORML �u������������͂悭�Ȃ��Ǝv�����v
							PRINTFORMW �Վ҂�����畡�G�ȋV��������s���ƁA�~���_�̐΂��X�Ɍ����������ꋎ����
							TIME += 25
							CFLAG:RESULT:�̖ړ��� = 0
							MONEY:2 -= 100
						ENDIF
					CASE 4
						PRINTFORML %CALLNAME:MASTER%�͈Վ҂Ǝ��������킵�����ŃT���Y�A�b�v������
						PRINTFORML �Վ҂͂��΂��S�O������A�͋����T���Y�A�b�v��Ԃ��Ă���
						PRINTFORMW �ӂ���͗F������
						GOTO EKISYA
					CASE 5
						PRINTFORML %CALLNAME:MASTER%�͎��Ԃ��~�߈Վ҂̕���E�����A���̉�����_�ւ̋����Ƃ���
						CALL BUFF_BASE(MASTER,BASE_TSP,100,1)
						PRINTFORMW �m��ʊԂɉ�����E�����ꂽ�Վ҂͗��������Ȃ�������
				ENDSELECT
				PRINTFORMW
				DRAWLINE
				$EKISYA_DIVIDE
				PRINTFORML �얲������A�Վ҂̓��ڊ|���Ă��P���_��U�艺�낵��
				PRINTFORML ����Վ҂͂Q�Ɋ����Ă��܂���
				PRINTFORMW �얲�͋����Ă�����
				FOR LOCAL,1,CHARANUM
					IF CFLAG:LOCAL:���݈ʒu == CFLAG:MASTER:���݈ʒu
						BASE:LOCAL:���� = MAXBASE:LOCAL:����
						BASE:LOCAL:���[�h = 0
					ENDIF
				NEXT
				LOCAL:1 ++
			ENDIF
	CASE 530
		CALL SET_MIRADA
		IF RESULT == -1
			RETURN -1
		ELSE
			LOCAL:1 ++
		ENDIF
	CASE 550
		IF !TIME_PROGRESS(TCVAR:�Ώ�:�󕠎���)
			PRINTFORML %CALLNAME:�Ώ�%�͂܂��󕠂ɂȂ��ĂȂ�
			GOTO LOOP
		ELSE
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
			CALL �����x�㏸(�Ώ�,"�y�H")
			CALL RECOVER_PERMIL(�Ώ�,40,"�̗�")
			CALL RECOVER_PERMIL(�Ώ�,80,"�C��")
			CALL RECOVER_PERMIL(�Ώ�,50,"����")
			LOCAL:1 ++
		ENDIF
	CASE 626	;�L�C�`�S
		PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
		CALL RECOVER(�Ώ�,50, "�C��", "�L�C�`�S�ɂ���")
		LOCAL:1 ++
	CASE 628	;�A�P�r
		PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
		CALL RECOVER(�Ώ�,80, "�̗�", "�A�P�r�ɂ���")
		CALL RECOVER(�Ώ�,80, "�C��", "�A�P�r�ɂ���")
		LOCAL:1 ++
	CASE 630	;�响
		PRINTFORML %ITEMNAME:�g�p�A�C�e��%��H�ׂ�
		PRINTL �͂��݂Ȃ���c�c�I
		CALL BUFF_BASE(�Ώ�, BASE_�̗�, MAX(MAXBASE:�Ώ�:�̗� / 10, 500))
		CALL BUFF_BASE(�Ώ�, BASE_�C��, MAX(MAXBASE:�Ώ�:�C�� / 10, 500))
		SIF GETBIT(TALENT:�Ώ�:����, 1)
			CALL BUFF_BASE(�Ώ�, BASE_����, MAX(MAXBASE:�Ώ�:���� / 10, 500))
		LOCAL:1 ++
	CASE 643	;���ȃ��[����
		IF !KITCHEN(CFLAG:MASTER:���݈ʒu) &&  CFLAG:MASTER:���݈ʒu != 29 &&  CFLAG:MASTER:���݈ʒu != 42 &&  CFLAG:MASTER:���݈ʒu != �����X
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%�̗e�킩��˂����o�����̂܂܂�������
			PRINTFORML �C�}�C�`�c
			CALL RECOVER(�Ώ�,100, "�̗�", "���ȃ��[�����ɂ���")
			CALL RECOVER(�Ώ�,100, "�C��", "���ȃ��[�����ɂ���")
		ELSE
			PRINTFORML %ITEMNAME:�g�p�A�C�e��%�𒲗����ĐH�ׂ�
			PRINTFORML �ӂ��[��[���I
			CALL RECOVER(�Ώ�,600, "�̗�", "���ȃ��[�����ɂ���")
			CALL RECOVER(�Ώ�,500, "�C��", "���ȃ��[�����ɂ���")
			CALL �����x�㏸(�Ώ�,"�y�H")
			EXP:�Ώ�:�����o�� += 1
		ENDIF
		LOCAL:1 ++
	CASE 644	;�r�R�[��
		PRINTFORML %ITEMNAME:�g�p�A�C�e��%������
		PRINTFORML �ӂ��c
		CALL RECOVER(�Ώ�,700, "�C��", "�r�R�[���ɂ���")
		LOCAL:1 ++
	CASE 645	;�ʋl�ۑ��H
		SELECTCASE RAND:30
		CASE 0 TO 5
			PRINTFORML �₫�Ƃ�̊ʋl���J�����H�ׂ�
			CALL RECOVER(�Ώ�,750, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,250, "�C��", "�ʋl�ۑ��H�ɂ���")
			CALL �����x�㏸(�Ώ�,"�y�H")
		CASE 6 TO 11
			PRINTFORML ���΂̖��X�ς̊ʋl���J�����H�ׂ�
			CALL RECOVER(�Ώ�,400, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,300, "�C��", "�ʋl�ۑ��H�ɂ���")
			CALL �����x�㏸(�Ώ�,"�y�H")
			EXP:�Ώ�:�w�K�o�� += 5
		CASE 12 TO 15
			PRINTFORML �p���̊ʋl���J�����H�ׂ�
			CALL RECOVER(�Ώ�,600, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,600, "�C��", "�ʋl�ۑ��H�ɂ���")
			CALL �����x�㏸(�Ώ�,"��H")
		CASE 16 TO 19
			PRINTFORML ���̊ʋl���J�����H�ׂ�
			CALL RECOVER(�Ώ�,100, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,1000, "�C��", "�ʋl�ۑ��H�ɂ���")
			CALL �����x�㏸(�Ώ�,"�f�U�[�g")
		CASE 20 TO 23
			PRINTFORML �V�`���[�̊ʋl���J�����H�ׂ�
			CALL RECOVER(�Ώ�,1000, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,500, "�C��", "�ʋl�ۑ��H�ɂ���")
			CALL �����x�㏸(�Ώ�,"��H")
		CASE 24
			PRINTFORML ���[�^�[�̊ʋl���J�����H�ׂ�
			CALL RECOVER(�Ώ�,200, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,300, "�C��", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,1000, "����", "�ʋl�ۑ��H�ɂ���")
			CALL �����x�㏸(�Ώ�,"�y�H")
		CASE 25
			PRINTFORML �j�V���̊ʋl���J�����H�ׂ�
			PRINTFORML ���͂ɂ����܂����L�C���Y���I�I
			CALL RECOVER(�Ώ�,600, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,-1000, "�C��", "�ʋl�ۑ��H�ɂ���")
			CALL �����x�㏸(�Ώ�,"�y�H")
			EXP:�Ώ�:�|���o�� += 20
		CASE 26
			PRINTFORML ���Ă��邾���ōK���ȋC���ɂȂ�鎇�F�̊ʂ̊J�������݂�
			PRINTFORMW ����ǁ[��
			PRINTFORML �K���Ȋʂ�%CALLNAME:�Ώ�%���������ݔ�������
			CALL RECOVER(�Ώ�,-5000, "�̗�",)
		CASE 27
			PRINTFORML ���m�̌��ꂪ�L���ꂽ�ΐF�̊ʂ��J������̓���H�ׂ�
			SETCOLOR 0 , 255, 0
			PRINTFORMW �{���ɐH�ׂĂ��܂����̂��H
			RESETCOLOR
			PRINTFORML ���������������ƂƂ���%CALLNAME:�Ώ�%�̈ӎ��͞N�O�Ƃ���
			CALL RECOVER(�Ώ�,100, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,-5000, "�C��",)
			CALL �����x�㏸(�Ώ�,"�y�H")
		CASE 28
			PRINTFORML 500�ƋL���ꂽ�������ʂ��J������
			PRINTFORMW �����Ă����ꗱ�̐Ԃ����܂�%CALLNAME:�Ώ�%�͐ێ悵��
			CALL RECOVER(�Ώ�,9999, "�̗�", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,9999,"�C��", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,9999, "����", "�ʋl�ۑ��H�ɂ���")
			CALL RECOVER(�Ώ�,9999, "TSP", "�ʋl�ۑ��H�ɂ���")
		CASE 29
			PRINTFORML 忂��G��ŕ���ꂽ���g�����ʂ��J������
			PRINTFORMW ��������Ƌl�܂����P�������%CALLNAME:�Ώ�%�͐H����
			CALL RECOVER(�Ώ�,5000, "TSP", "�ʋl�ۑ��H�ɂ���")
		SIF GETBIT(TALENT:�Ώ�:����, 1)
			PRINTFORML %CALLNAME:�Ώ�%�̐��킪�^���ԂɔR����I
			MAXBASE:�Ώ�:���� += 50
			CALL �����x�㏸(�Ώ�,"�y�H")
		ENDSELECT
			LOCAL:1 ++
	CASE 646
	CASE 998
		IF �Ώ�
			�Ώ� = MASTER
		ELSEIF SHIRAHU(TARGET) && TARGET
			�Ώ� = TARGET
		ENDIF
		GOTO LOOP
	CASE 999
		RETURN -1
	CASEELSE
		GOTO LOOP
ENDSELECT
IF LOCAL:1
	IF !FLAG:70
		TIME += 5
	ELSE
		BASE:MASTER:TSP -= 5
	ENDIF
	ITEM:�g�p�A�C�e�� -= 1
	�񕜌�̗͂P = BASE:�Ώ�:�̗�
	�񕜌�C�͂P = BASE:�Ώ�:�C��
	�񕜌㐸�͂P = BASE:�Ώ�:����
	�񕜌�̗͂Q = BASE:�Ώ�:�̗�
	�񕜌�C�͂Q = BASE:�Ώ�:�C��
	�񕜌㐸�͂Q = BASE:�Ώ�:����
	;@RECOVER�Ƃ̓�d�\�L������邽�߂ɁA100�������񕜗ʂɂƂ���̂̂݁A�ȉ��̕\�L���s��
	IF GROUPMATCH(�g�p�A�C�e��, 120, 352, 626, 628)
		SETCOLOR C_GREEN
		IF !�Ώ�
			SIF ABS(�񕜌�̗͂P - �񕜑O�̗͂P)
				PRINTFORML �̗́{{ABS(�񕜌�̗͂P - �񕜑O�̗͂P)}�i%CALLNAME:�Ώ�%�j
			SIF ABS(�񕜌�C�͂P - �񕜑O�C�͂P)
				PRINTFORML �C�́{{ABS(�񕜌�C�͂P - �񕜑O�C�͂P)}�i%CALLNAME:�Ώ�%�j
			SIF ABS(�񕜌㐸�͂P - �񕜑O���͂P)
				PRINTFORML ���́{{ABS(�񕜌㐸�͂P - �񕜑O���͂P)}�i%CALLNAME:�Ώ�%�j
		ELSE
			SIF ABS(�񕜌�̗͂Q - �񕜑O�̗͂Q)
				PRINTFORML �̗́{{ABS(�񕜌�̗͂Q - �񕜑O�̗͂Q)}�i%CALLNAME:�Ώ�%�j
			SIF ABS(�񕜌�C�͂Q - �񕜑O�C�͂Q)
				PRINTFORML �C�́{{ABS(�񕜌�C�͂Q - �񕜑O�C�͂Q)}�i%CALLNAME:�Ώ�%�j
			SIF ABS(�񕜌㐸�͂Q - �񕜑O���͂Q)
				PRINTFORML ���́{{ABS(�񕜌㐸�͂Q - �񕜑O���͂Q)}�i%CALLNAME:�Ώ�%�j
		ENDIF
		RESETCOLOR
	ENDIF
	SIF �����ւ̉�A
		CALL OYASUMI
	RETURN 0
ENDIF

@SET_MIRADA
PRINTFORML �Ώۂ�I��ł��������B
PRINTFORML ���F�͊��ɗL���A�s���N�͊��Ɋח��f�������Ă���L�����ł��B
FOR LOCAL,1,CHARANUM
	;SIF TALENT:LOCAL:�s������
	;	CONTINUE
	SIF CFLAG:LOCAL:�o��
		CONTINUE
	SIF CFLAG:LOCAL:�̖ړ���
		SETCOLOR C_YELLOW
	SIF TALENT:LOCAL:�Z�t�� || TALENT:LOCAL:����
		SETCOLOR C_PINK
	PRINTFORMLC [{LOCAL}] %CALLNAME:LOCAL%
	RESETCOLOR
NEXT
PRINTFORML
DRAWLINE
PRINTFORML [999] ��߂�
INPUT
SIF !INRANGE(RESULT,1,CHARANUM)
	RETURN -1
SIF CFLAG:RESULT:�̖ړ���
	RETURN -1
SIF TALENT:RESULT:�Z�t�� || TALENT:RESULT:����
	RETURN -1
PRINTFORMW %CALLNAME:RESULT%�̂��Ƃ��v�������ׂȂ���~���_�̐΂���������ƁA�΂͂�������ƌ���тт�
CFLAG:RESULT:�̖ړ��� = 1
RETURN 1

@�g�p�\�A�C�e��(ARG)
;1����MASTER�̂݁A2���Ƃ��Ȃ��ȊO�ɂ��g����
#FUNCTION
SELECTCASE ARG
	CASE 120 TO 123, 215, 364, 500, 510, 520, 521, 530
		RETURNF 1
	CASE 212, 213, 352, 501 TO 503, 505 TO 509, 511, 512, 550, 626, 628, 630, 643 TO 645
		RETURNF 2
	CASEELSE
		RETURNF 0
ENDSELECT

@DRUG(ARG,ARG:1)
#FUNCTION
SIF GROUPMATCH(ARG, 501, 502, 503, 505, 506, 507, 508, 509, 511) && TCVAR:(ARG:1):����
	RETURNF 1

@ITEM_SWEETS(ARG)
#FUNCTION
SIF GROUPMATCH(ARG, 120, 121, 123, 124, 212, 213)
	RETURNF 1

;�A�C�e��
@COM_ABLE490
;�ړ����s����
SIF !TFLAG:100
	RETURN 0
;�ꊇ�Ǘ�
SIF GLOBAL_COMABLE(490)
	RETURN RESULT
SIF CFLAG:MASTER:���ӂ�
	RETURN 0
RETURN 1

path: 原版+前人整合等各种readme/パッチ/eraTW 4.711露店不具合修正+無縁塚新アイテムパッチ/ERB/コマンド関連/COMF/日常系/COMF490 アイテム.ERB


code:
[�I�X�s��C��+�����˃A�C�e���ǉ��p�b�`]

[����]
���p�b�`�̓Z�[�u�f�[�^�̃o�b�N�A�b�v������Ă���
eraTW4.711�ɓK�p���邱�Ƃ𐄏����܂�

(������@eraTW4.711)

�E�I�X�ɂ�����E�R���̕\�����폜
�E���i�I����[0]��߂��I�ԂƑ���s�\�ɂȂ�s������}�C��
(�I�V�p�b�`��ҁ����p�b�`��҂Ȃ̂ŏ��肪�킩�炸�\����Ȃ�)

�E�I�X���i��3�A�C�e����ǉ��y�ѐ��򔄔��ɂ�����3�A�C�e���폜
�E�����˂ɍō����f�ނ�ǉ�(�I�X�ɂ�锄�p��z��)
�@����ɏ]�����_�ЂɐV�A�C�e���ƃJ�G���̉��i�␳��ǉ�

[�G��]
�����e�ł��B
eraTW�ɂ����鎑���҂��ɘI�X������������+���͂̉i�v����㏸���~���������̂ō쐬���܂���
��ʒ����A�C�e�������~���������̂ł��̂܂ܘI�X���p�\�ȍ̏W�A�C�e����ǉ����܂���

�����_�����ʂ̊ʋl�ۑ��H�ȊO�͐响�Ə�ʒ����A�C�e���ȉ��̌��ʂɒ������Ă��܂�

�ꉞ�ō����f��+�G�ߌ���ł��̂ŉ��i�␳���ǉ����܂����i����ς�N�C�Y�ɂ��ĂȂ�������...�j
�ʋl�ۑ��H������ʂ����Ȃ߂ł��̂ŏ���ɋ����������̂Ȃ甄�����ق����}�V�ł���

�{���Ȃ�Ή��l9000������̕����擾+���i�␳�A�C�e�����쐬�����������̂ł���
�o�����X�ێ��Ƒ��A�C�e������j�Q�h�~�̈׌����点�Ă��������܂���
�ǉ�����̂Ȃ�Â��̊C�ƒn��}�b�v������ł��傤����(�J���X�}�ɂ��ĂȂ��ł��傤����)

���z����A�C�e���ł��̂œs���̂��������˂ɔz�u���Ă��܂�
�~�G�ɂ�����X�̗ؓ����j�Q���Ȃ��悤�ɓ���\�G�߂𕪂��Ă��܂�

���̕׋��s��+�Z���X�̌��@���L��N�\�R�ɂȂ�����Ă邩������܂���̂�
�ӂɂ�����Ȃ��ꍇ�͂��̃p�b�`�𖳎����Ē����č\���܂���

path: 原版+前人整合等各种readme/パッチ/eraTW 4.711露店不具合修正+無縁塚新アイテムパッチ/リドミ.txt


code:
スレ271の>>491の交互挿入の射精時の問題、とりあえず改良してみました。
が、FOR文をいじくったりしてるので、バグ出る可能性高いと思います。
このパッチを導入する際は、バク検出の人柱になることを承知の上で導入してください。

以下、本パッチでの変更点

EVENT_MESSAGE_ORGASM.ERB
712行目の交互挿入の膣内射精時に、TARGETとTFLAG:152が同一であった場合
別の射精文に変更されるように、IF文に条件追加。

KOJO_MESSAGE.ERB
263行目のFOR文を昇順から降順に変更。
多分、ここが1番悪影響出やすい部分だと思います。
289行目にRESETCOLORを追加。

備考
現状だと、相互挿入の射精時にあなたの絶頂が2回表示されます。
これも解決したいですけど、これを変えようとすると
PALAM_MESSAGE_Aに引数を渡すように改良するしか思い浮かばなかったので、
作業量が膨大のため、放置することにしました。

path: 原版+前人整合等各种readme/パッチ/eraTW 4.760用 交互挿入問題解決パッチ(仮)/README.txt


path: 原版+前人整合等各种readme/パッチ/eraTW Ver4.692用_バイツァ・ダストのキス未経験調整パッチVer.20190505/patchs_readme.txt


code:
==============================================================================
### ���ӎ��� ###
������́ueraTW Ver4.692�p_���u�ω摜�p�b�`Ver.20190502�v�̋������t�@�C���݂̂̃p�b�`�ł��B
�P�Ƃł͓��삵�܂���B

==============================================================================
### ���̑� ###
���̃p�b�`�Ɋւ��Ă͎��R�ɉ��ρE�Ĕz�z���Ă�����č\���܂���B�A�����s�v�ł��B

�摜���\�[�X���̉摜���쌠�Ɋւ��ẮA�摜����җl�ɋA�����܂��B
������Ɋւ��Ă͉摜���\�[�X���� readme �����m�F�������B

==============================================================================
�p�b�`����ҁF�Ȃ�ƂȂ����u�ω摜�p�b�`���������l


code:
==============================================================================
### �����菇 ###
01: eraTW4.692(�摜�����ς�) �ɂ��̃p�b�`���㏑�����Ă��������B
* �\�� eraTW4.692(�摜�����ς�)�̃o�b�N�A�b�v��Y�ꂸ��
==============================================================================
### ���ӎ��� ###
������̃o�b�`�͎��p�łł��B
�Z�[�u�f�[�^�̈�Ȃǂ̕ύX�����邽�߁A�o�b�`�ł̏㏑�����s���O��eraTW�{�̂̃R�s�[�Ȃǂ��s���A�o�b�N�A�b�v���Ƃ��Ă���㏑�����Ă��������B
* �摜�p�[�c���Ƃ̎g�p�����Ȃǂ͊��S�Ƀ����_���ɂ��Ă���܂��A���̂��ߎ�ʂ̏��Ȃ���F�Ȃǂ͕��ʂ̊�F���o�ɂ����Ȃ��Ă��܂��B
* �����E�C���劽�}�ł��I�@�Ƃ������L���������Ȃǂ̐ݒ肪�ׂ������ĐS���܂ꂽ��B

### Q&A ###
Q1: �Ȃ񂩂₯�Ɋ�F�����q�΂�����o��񂾂��ǁH
A1: �d�l�ł��B���Ԃ�p���c���D���l���o��̂Ŗ������Ȃ����������Ă���̂ł��傤�B
* �{���Ȃ�l���ł͕��ʂ̊�F���o�₷������Ȃǂ̑Ή����K�v�ȉӏ������S�ɕ��蓊���Ă܂��B�����Ă��������B

Q2: �X�q���d�ɂ��Ԃ��Ă���A���^�����炩�ɂ��������Ȃ��H
A2: �d�l�ł��B�ŋ߂̗��s�肩�������͈ٕς̉e���Ƃ����Ǝv���܂��A����̛ޏ��Ɉ˗����Ă��������B
* �{���͖X�q�⎨�Ȃǂ̎�ʂ͓�d�őI������Ȃ��悤�ȏC�����K�v�Ȃ̂ł����A�ʓ|�Ȃ̂ł��Ƃ��̂�c�ق�ɂ��܂�B

Q3: �d���┒�T�V��Ƃ��̓������܂������Ȃ��񂾂��ǁA�蔲���ł��傤���H
A3: �����ł��A�蔲�c�ł͂Ȃ��d�l�ł��B
* �{���̓L�����̎����Ȃǂ��擾���A����ɏ������p�[�c��I�Ԃׂ��Ȃ̂ł����A�߂����߂�ǂ��˂�B

Q4: �{��}�[�N���X�q�̌��ɉB��Č����Ȃ��񂾂��ǁA����̓o�O�ł���ˁH
A4: �X�q��[������Ă���ƁA�ꌩ�ł͓{���Ă��邩�ǂ�����������Â炢�Ƃ��������ɑ������d�l�ł��c�����܂���A�R�ł��B
* �`�揇���𒲐�����΂�������Ɠ{��}�[�N����ԏ�ɂ���Ǝv���܂����A��₱�����˂񂠂����B

Q5: �O�̃��u�q�摜�ɖ߂�������ł����ǂ�����΂����ł����H
A5: �ޏ���͋]���ƂȂ����̂��A�p�b�`��҂̑Ӗ��́c
* �ݒ�ł�ON/OFF�Ȃǂ�����ΑΉ��ł���̂ł����A�����̃��u�q�Ƃ̌��ˍ����Ƃ�����̂Ō��ݑΉ����Ă܂���B

Q6: �ӂ����A���C�̕ۑ����Ă����u�q�������񂭂Ȃ�����B�ǂ����Ă����˂�I
A6: �m���ȁi�Q�X��j
* �L�����Z�[�u�̈�ɉ摜�p�[�c�������ۑ����Ă���֌W��A���ɕۑ��ς݂̃��u�q�͓�����ԂƂȂ�܂��B
* �o�b�N�A�b�v���g�����A�Z�[�u�f�[�^����������TW4.692�Ɉڂ��Ε\�������Ǝv���܂��B

### �p�b�`���C�������������� ###
���摜�p�b�`�̎d�g�݂Ɋւ��ā�
�uERB/�X�e�[�^�X�\���֘A/CN_GRAPHIC/Main.ERH�v
�@�F����p�[�c�摜�̓o�^

�uERB/�X�e�[�^�X�\���֘A/CN_GRAPHIC/Main.ERB�v
�@�F�̏ڍ׎w��

�uERB/�R�}���h�֘A/COMF/����n/MOBGIRL_GENERATOR2.ERB�v
�@�p�[�c�g�ݍ��킹�̕����񐶐��ACSTR �ւ̕ۑ�

�uERB/�X�e�[�^�X�\���֘A/IMAGE2.ERB�v
�@CSTR�ɕۑ�������������g���ĉ摜����

���摜�����Ɋւ��ā�
 @CN_CREATE_IMAGE �ɕ�����𒼐ڎw�肵�ĉ摜�������s�����Ƃ��\�ł��B

�����^�𑝂₵������
�uERB/�R�}���h�֘A/COMF/����n/MOBGIRL_GENERATOR2.ERB�v��@GET_CN_STR_HAIR(HAIR_TYPE)���C�����Ă��������B
* ��{�͑O���ƌ�딯���w�肵�A����ȊO�Ƀ��{����t�����Ȃǂ�����΂�����ǋL����`�ł��B

�����F�┧�̐F�𑝂₵������
�uERB/�X�e�[�^�X�\���֘A/CN_GRAPHIC/Main.ERB�v�Ŕz�F�̒ǉ�
* era���_old�́u�L�����N�^�[�Ȃ�Ƃ��@�v�p�N���č�����̂Ŕz�F�w��̏ڍׂ͕s���B
* �ǉ��F�i[�I:11][��:12][��:13]�j�Ȃ񂩂͐ԁE�E�΂̐��l�Ɣ��E�D�E���̒l�����Ȃ��炻����ۂ��w�肵�܂����B

�uERB/�X�e�[�^�X�\���֘A/CN_GRAPHIC/Main.ERH�v�ŐF���̍��ڒǉ�
* ��Ƃ��āA�y�F��ǉ��������̂ł����[��:13]�̉���[�y:14]���L�ڂ��Ă��������B

�uCSV/Str.csv�v�̔ėp�F�ɒǉ�

�uERB/�R�}���h�֘A/COMF/����n/MOBGIRL_GENERATOR2.ERB�v�� ���L�����Ȃǂ� RAND:13 ���� RAND:14 �ɕύX����B
�@EYE_COLOR_TYPE   = %STR:(RAND:13 + 2050)%

==============================================================================
### ���̑� ###
���̃p�b�`�Ɋւ��Ă͎��R�ɉ��ρE�Ĕz�z���Ă�����č\���܂���B�A�����s�v�ł��B

�摜���\�[�X���̉摜���쌠�Ɋւ��ẮA�摜����җl�ɋA�����܂��B
������Ɋւ��Ă͉摜���\�[�X���� readme �����m�F�������B

==============================================================================
�p�b�`����ҁF�Ȃ�ƂȂ����u�ω摜�p�b�`���������l


path: 原版+前人整合等各种readme/パッチ/eraTW Ver4.692用_時計画像パッチVer.20190505/ERB/ステータス表示関連/INFO.ERB


code:
0,�x�e�t���O
1,SYS_EVENT�N���t���O
2,�j�[�\�b�N�X���p
3,����̗L��
4,��Փx
5,�Q�[�����[�h
6,��i�e�L�X�g�ݒ�
7,����e�L�X�g�ݒ�
;�e�L�X�g��\�����Ȃ��ݒ莞		FLAG:6=0 FLAG:7=-1
;��i�e�L�X�g�̂ݐݒ莞		FLAG:6=1 FLAG:7=-1
;����e�L�X�g+��i�e�L�X�g�ݒ莞	FLAG:6=1 FLAG:7= 2
9,���ւ��C�x���g
10,�ח��l��
11,����
12,�{���̗݌v�D���x�㏸��

15,�Z�ݍ��݃L����
;�_�Ђ̏Z�ݍ��݃C�x���g�ł���Ă����L�����̓o�^�ԍ����L�^
;�ΏۃL������CFLAG:�_�ЍݏZ�����A�����ʒu��16�̃{������

16,�󂫕����L����
17,���C�l��
;����ł�FLAG:17��@EVENTTURNEND�Ń��Z�b�g�����̂Ŏg�p�������ꍇ�C�����ĉ�����
18,���ӎD�g�p
19,������
20,����
;Str3000��Q��
21,�����I�v�V����
;(bit=0:���j���[�蓮����,1:�ٕ������s��,2:�򕨍����s��,10:�������t��_����,11:�������t��_�Z��,12:�������t��_����)

;����֌W---------
30,����J�Ãt���O,;(0=����Ȃ� 1=�얲�̋C����𐷂�)
31,����K��,;(�d���ʂƂ��Đݒ肳���)
32,������
33,�J�n����
34,�J�n��
35,�Q���l��
36,���V�󒆎~�t���O;(0=�Ȃ� 1=���~����)
37,���������
;-----------------

41,�˗��X���b�g�P
42,�˗��X���b�g�Q
43,�˗��X���b�g�R
44,�˗��X���b�g�S
45,�˗��X���b�g�T

50,�ǉ����l�g

;FLAG:50�`59 �e�K��҂̖K��t���O�@����������CFLAG:���_���K�Ɉڍs�����
;FLAG:50:bit�\�L:0������,1��݂�,2�傿���,3�H,4���,5���~���A,6�A���X,7���S��,8���S���A9-10-11�v���Y�����o�[�Y,12�d��,13-14-15���_��,16���O��,17�݂����[,18�����,19�f�P�l,20-21-22�R�̐_�l����,23�V�q,24�ߋ肳��,25-26-27�n��g,28�i�Y�[,29��������[��,30�ʂ�,31�͂��Ă�,32�ؐ�,33�G����,34�����q,35����,
;FLAG:50:bit�\�L:36����,37���C�Y,38���Ƃ�l,39�t���������,40�ɂƂ��,41���,42�Ă�,43�p�`�F,44�Ђ����,45�_�q�l,(46������,�Ӗ��Ȃ�),47�߁[���,48����,49�p���X�B,50��������,51�P�l,52�e�T,53�E�V,54��,55���l,56���[��,57�䂤�����,58�}�~�]�E,59����,(60�j���ہE�Ӗ��Ȃ�),61�i��,62�Ԕ؊�,63���e�B
;FLAG:51:bit�\�L:0���f�B,1����,2�×t,3���q,4��,5����,6�@�q,7�����[,8�L�X��,9���}��,10���,11�����T,12��,13���q,14�F��,15�ɂ��ɂ��,16�g�W,17�t�g,18�킩����,19�فX,20����,21����,22����,23�˕P,24�L�P,25���C�Z��,26���q,27�_�Y,28���q,29���L,30�}�C,31俎q,32����,33���,34�h���~�[,35�T�O��,
;FLAG:51:bit�\�L:36�N���E���s�[�X,37����,38�w�J,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63

70,���Ԓ�~
71,�I�i��
72,����
73,�f�[�g����
74,�A�C�e���w���ς�
75,�V���w��
76,���݂����_��
77,�s������s�܂���
80,�C��
81,�ō��C��
82,�Œ�C��
83,�~���m��
84,���g��
85,������s
86,�R���N�V�����X�L�}
87,C�X�L�}�����d�l
88,����������
89,�ُ�C��
90,����
91,��ؖ��f�C���[
92,���10�A�K�`���L�����y�[��
93,���������i�i��
94,���������i�w����
95,���������i����
96,�P�ϋv�x
97,�~���_�x��
98,���u�q�Ǘ�

200,�C�⒆�f
;300�`499�͎g�p���ʂ��Ɓi�A�b�v�f�[�g�Ń��Z�b�g��������܂��j
;550�`559,�e�L�����̊�|���ɂ�闈�K�t���O
560,��|�����e
561,���͋�����
562,��|��
563,�d���\�l��
564,������T
565,������T2
566,���l���T
567,���l���T2

580,�q��F��
581,���f�[�g��
;601�`690,�e�K��҂̂΂�����t���O

700,�l���p���c�퐔
701,���щ����V�X�e��
702,���щ����V�X�e���Q
703,�D���x�{�[�i�X�擾��
704,�ʎ��{�[�i�X�擾��
705,�p���c�{�[�i�X�擾��
706,�ח��{�[�i�X�擾��
707,�s�܂��{�[�i�X�擾��
708,�Z�\�{�[�i�X�擾��
709,�e�������{�[�i�X�擾��

800,���P�̍앨
801,���P�̐A���Ă���̓���
802,���P�̐���x
803,���P�ɐ������Ȃ�����
804,���Q�̍앨
805,���Q�̐A���Ă���̓���
806,���Q�̐���x
807,���Q�ɐ������Ȃ�����

;����l���Ȃ��p
820,�n��
821,���d���̐���
822,�N�v
823,�_����Փx
824,�n��ݕt��
825,�N�n�ݕt��
826,�ԍω��؉�
827,���n�[����
828,�ݐώ��n�]��
829,�O����n�]��

;�g���J�W�m�֘A�t���O830-839
;�J�����w����VIP���[�������ɍ�������d�l�ł܂肫��Ȃ��ĕۗ���
830,�J�����w��

831,�J���X�}����
832,�J���X�}�l�C
833,�J���X�}�ϓ���
834,�J���X�}�ϓ��ݐ�
835,��������N
836,������
837,���l�C
838,���ϓ���
839,���ϓ��ݐ�
840,�O��J���X�}�ݒ茎
841,�J�W�m�K���

850,�|������
851,���̑̊i
852,�J�^���w����
853,�p���c�A��
860,��
861,�Ō�Ɏ����ɖK�ꂽ��
862,�����ł̗ݐύw���z
863,�����̗ݐϓ]�����v
864,�����̔��p���t���O
865,�������拭��
;900-910 ���u�D���x

998,�����f�[�g����
;�f�[�g����̃L�����ԍ��i�[
999,���݂����Ǝ����֌W
;bit�\�L 0:���݂����I����, 1:���݂���������������, 2:�����I����, 3:��������ւ��\
1000,�o�[�W�����A�b�v����
;1001�`1999,�I�v�V�����y�уo���A���g�����ݒ�
1001,���Օi�����w��
1002,�S�~�\��OFF
1003,�\�͕\���ꗗ
1004,�\�͕\���ڍ�
1005,���ł��Q����
1006,��D
1007,������������
1008,�X�e�\���p
1009,�e�X�g�v���C�p�I�i�o����������
1010,���܌o��
1011,�ݖ{
1012,�ݖ{�ԋp����
1013,�N�C�b�N�t�B���^;�ibit,0=onoff,1=V,2=A,3=����,4=�A�C�e��,5=��d,6=SM 7=�Z�N�n���j
1014,�����~�܂�
1015,�����|��
1016,�u�Ԉړ�
1017,�Z�ݍ��݃C�x���g
1018,AA�\��
1019,�ړ���\��
1020,���z
1021,�[�ˎ{��
1022,�v�[��
;(bit,0=���� 1=���� 2=�V�����[ 3=�s�v�c�ȖA)
1023,�o�֐l��
1024,�𗬗��K���[�h
1025,�D�P�X�C�b�`
1026,USERCOM�t�B���^
;�ibit,0=����\�� 1=�����ς��� 2=�\�͕\�� 3=�\�͕\���i�}�X�^�[�j4=�u�t�B���^ 5=�`�t�B���^ 6=�����t�B���^ 7=����t�B���^ 8=��d�t�B���^ 9=�H 10=�Z�N�n���t�B���^ 11=�R�}���h�t�B���^ 12=����\�� 13=�������~�߈ړ��j
1027,�E�ߑI��,;(1=�S�� 2=���E��)
1028,�@�m���[�h
1029,�p���c�D�_,;(1=���񂭂��˂� 2=����E��������)
1030,�Ȃ肫��
1031,����F
1032,Look�\���p���[
1033,Look�\���p����
1034,�\�͕\�L
1035,�J�E���^�[�n�̕�����
1036,�Z�N�V�[�p���c�ǉ�
1037,�X�L�b�v���[�u
1038,���E
1039,ABLUP�ȗ�
1040,�b�㐫��
1041,�摜�\���ݒ�,;ON/OFF
1042,�摜�\��,;ON/OFF ���\���l��
1043,�摜�\���ʒu,;PRINT_TARGET_IMAGE�̕`��align�l 0=center 1=left
1044,�A�j���[�V����,;�摜�A�j���[�V�����ݒ� ���J��Ԃ��� 0�`5
1045,�摜�g�\��,;�摜�ɘg�����邩 ON/OFF
1046,�ː��摜���,;0�`2�@0.�f��+���ʉ��@1.�f�ʂ̂݁@2.���ʉ��̂�
1047,�����G���,;0�ŗ����G 1�Ŋ�G
1048,�}�G�\��,;�}�G�̂�(����ʃA�j��)�̕\���ݒ�@AA�̑ւ�(�󐸂̂ق�)�ɂ͌����Ȃ����
1049,�}���A�j���t�B���^,;�}���A�j����\�����Ȃ��悤�ɂ���(bit 0=�}���� 1=�Ⓒ 2=�ː�)
1050,�p���c���W�󋵃^�C�vB

1051,�e�j����,;bit 1=���o�����ł��L�^ 2=�y�j�X�ł��L�^
1055,�Ǝ��A���t�B���^

1060,�ח��H���ω�
1061,�����֎~
1062,���m�����r���֎~
1063,�q���`��
1064,�D�ӗ����Z�k
1065,�q���̐���
1066,�I�[�g�b��
1067,�˗��X���[
;1100�`1299,�e�����̐l��

;1500�`1599�͊y�������p