--天墉城
--天妖劫入口

--脚本号
x101015_g_scriptId=101015

--事件交互入口
function x101015_OnDefaultEvent( scene,selfId ,targetId)
	-- body
	BeginEvent(scene)
	AddText(scene,"我來看看你們有沒有資格向我挑戰！")

	AddNumText(scene,x101015_g_scriptId,"向他挑戰（3-5人）",-2,0)
    AddNumText(scene,x101015_g_scriptId,"便捷組隊",-1,1,0, 300)
	EndEvent(scene)
	DispatchEventList(scene,selfId,targetId,true)
end




--事件列表选中一项

function x101015_OnEventRequest( scene,selfId,targetId,eventId ,index)
	-- body
	if index==0 then
		SetMonCsId(scene, targetId, 405)
		if(GotoCopyScene(scene, selfId, 405, true)) then
			AddTeamInfo(scene, selfId, targetId)
		end
		local MonRoleId = GetMonRoleId(scene, targetId)
		SetUserCsParm(scene, selfId, 0, MonRoleId)
	elseif index == 1 then
		BeginEvent(scene)
		EndEvent(scene)	
		DispatchEventList(scene,selfId,targetId)
	end

end