a=0
local =ȡɵͼ()
local =0.7

function ()
      if ȡԼbuff״̬("")~=1 and ȡԼbuff״̬("")~=1 then 
          Ѱ· (100, 82)
          ()
           ("۱") 
          ȴ ()
          if Ի ("Ҫ")==true then
            ȴ ()
            Ի ("״α")
            ȴ ()
          else
            Ի ("ٴα")
            ȴ ()  
          end
  
      end    
end

function ɿ()
    () 
    local n=0; 	
    if ȡԼbuff״̬("")==1 then
       ·(100, 82)
       local Id=ѰҶ("۱",5)
       if Id>0 and ȡ״̬()~=5 then
         LUA_ʹü(3107,Id)         
       end	   
       return;
    end   
   if ȡԼbuff״̬("")==1 then
      ·(100, 144)
      local Id=ѰҶ("",5)
      if Id>0 and ȡ״̬()~=5 then  
         LUA_ʹü(3106,Id)
      end
   end
end

while true do
  local ͼ=ȡͼ()
  if ~= ͼ then
     local Ƿа=ذ()
     if Ƿа==false then
         ӡϢ("ûмûгУ")
         break;
     end
  else
    local  ʱ=ȡʱ();	
    if Ѱı (ʱ, "", 1, 0) > 0then       
       ɿ()
    elseif Ѱı (ʱ, "ʼ", 1, 0) > 0  then       
	   if ȡԼbuff״̬("")==1 then
           ·(100, 144)
	   else
	       ()
       end 
    elseif Ѱı (ʱ, "ʧ", 1, 0) > 0 then
       Ѱ· (100, 82)
        ("۱") 
       ȴ (1) 
       Ի ("ȡľ")
       ȴ (1)
       Ի ("ֱȡľ") 
       ȴ (2)
       local ı=ȡʾ()
       if Ѱı(ı, "ȡľ")~=-1 then
           ӡϢ("۱ɣľѾȡ")
           break;
       end 
    elseif ʱ=="-1" then
        Ѱ· (100, 82) 
        ȴ (1)             
    end
  end
  ȴ () 
end

