ScriptName aaaKimachuuEndOfTheCenturyBook Extends ObjectReference

Faction property f01 auto
Faction property f02 auto
GlobalVariable property g01 auto
Message Property mes01 Auto
Message Property mes02 Auto
Quest Property MQ101 Auto

Event OnRead()
	If g01.GetValueInt() == 1
		Return
	EndIf

	Utility.Wait(1.0)

	If MQ101.IsRunning()
		If MQ101.GetStage() < 800
			mes02.Show()
			Return
		EndIf
	EndIf

	Int intIndex
	intIndex = mes01.Show()

	If intIndex == 0
		f02.SetAlly(f01)
		g01.SetValueInt(1)
	Else
		;cancel
	EndIf
endEvent