ShowMessage("一般挂机脚本 $Rev: 213 $")

function _SMain(...)

	AI:SetAI("挂机")
	AI:SetParameter("初始化") 
	AI:SetParameter("加载","打图")
	AI:Start()

	AI:SetParameter("运行参数" , "答题" , 1 )

	local ExpTime = System:GetTickCount()
	local Exp = Player:GetData("EXP")

	while true do
		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
end

_SMain()