x020194_g_scriptId=020194


x020194_g_BossId = 960201
x020194_g_BossPos = {59.41, 61.83, 1.81} -- x, z, f

x020194_g_CopySceneStage = 0
x020194_g_BossRoleBaseId = 1

x020194_g_Mission = 3059

function x020194_OnCopySceneOpen(scene)
	--print("x020194_OnCopySceneOpen------------------------------------------")
	SetCopySceneParam(scene, x020194_g_CopySceneStage, 0)
end

function x020194_OnObjEnter(scene, objId)
	if IsUser(objId) then
		local stage = GetCopySceneParam(scene, x020194_g_CopySceneStage)
		--print("stage:"..stage.."---------------------------------------------------------------")
		if stage == 0 then
			local role = GetMonsterRoleBaseIdByCombatPower(scene, objId, x020194_g_BossId)
			CreateMonster(scene, role, x020194_g_BossPos[3], x020194_g_BossPos[1], x020194_g_BossPos[2])
			SetCopySceneParam(scene, x020194_g_BossRoleBaseId, role)
			SetCopySceneParam(scene, x020194_g_CopySceneStage, 1)
		end
		SynCsStageData(scene, objId)
		AutoCombat(scene, objId, true)
	end
end

function x020194_OnObjDie( scene, objId, rolebaseId, killerId)
	local role = GetCopySceneParam(scene, x020194_g_BossRoleBaseId)
	if role == rolebaseId then
		RecordExp(scene, rolebaseId)
		--AcceptMission(scene, killerId, x020194_g_Mission)
		SetCopySceneSuccess(scene)
		ChangeJob8CopySceneEnd(scene, 1)
	end
end

function x020194_OnCopySceneTimeOut(scene)
	SetCopySceneFail(scene)
	ChangeJob8CopySceneEnd(scene, 0)
end