function n3301_touch(npcId)
xz=flag.GetValue(6001) --主线旗标
local n=flag.GetValue(22222)
if n==0 thenglobal.BeginScene()
ui.Dialog(90072,0,0,715,0,0)
ui.Dialog(90073,0,0,1,0,0)
ui.Dialog(90074,0,0,715,0,0)
ui.Dialog(90075,0,0,715,0,0)
ui.Dialog(90076,0,0,715,0,0)
ui.Dialog(90077,0,0,715,0,0)
global.EndScene()
flag.SetValue(22222,1)
elseif n==1 then
rx=battle.GetRndNumber(1,5)
if (rx==1 or rx==4 or rx==5)
thenui.Popo(90078,1,npcId,0)
elseif rx==2 then
ui.Popo(90073,1,npcId,0)
elseif rx==3 thenui.Popo(90079,1,npcId,0)
end
end
player.AddTitleList(6052,1) if player.GetTitleStat(6052)~=1 then player.AddEquip(6052,1,1) player.AddTitleList(6052,1)
end
end