ShowMessage("һһű $Rev: 213 $")

function _SMain(...)

	while true do
		AI:SetAI("һ")
		AI:SetParameter("ʼ") 
		AI:SetParameter("","ͼ")
		AI:Start()
		AI:SetParameter("в" , "" , 1 )
		local ExpTime = System:GetTickCount()
		
		while true do
			local Exp = Player:GetData("EXP")
			if AI:IsStop() == true  then
				break 
			end
		
			local NowExp = Player:GetData("EXP")
			local NowTime = System:GetTickCount()
			if NowExp ~= Exp then
				Exp = NowExp
				ExpTime = NowTime
			else
				local interval = NowTime - ExpTime
				-- 20޾,ֹͣű
				if interval > 1200000 then 
					break
				end
			end
			System:Sleep(1000)
		end

		AI:SetAI("һ")
		AI:SetParameter("ʼ") 
		AI:SetParameter("","Զͼ")
		AI:Start()
		AI:SetParameter("в" , "" , 1 )
		while true do
			if AI:IsStop() == true  then
				break 
			end
			System:Sleep(1000)
		end

		local NowTime = System:GetTickCount()
		local interval = NowTime - ExpTime
		if interval < 10000 then 
			break
		end
	end

end

_SMain()