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()