жǷ("ڹ涨ʱûȷ֤")
Ƿֹͣ(false)
-------Ѱ·ֵ-------
Ѱ·ֵ_Ѱ·ɹ=2
Ѱ·ֵ_쳣=-1
Ѱ·ֵ_ʼѰ·ʧ=-2
Ѱ·ֵ_ٴѰ·ʧ=-3
Ѱ·ֵ_·㴦ʧ=-4
Ѱ·ֵ_յֹϢ=-5
Ѱ·ֵ_С=-8
Ѱ·ֵ_=-9

-------ԻNPCֵ-------
ԻNPCֵ_յϢ=1
ԻNPCֵ_쳣=0
ԻNPCֵ_յֹϢ=-1
ԻNPCֵ_ʱ=-2
ԻNPCֵ_ûзNPC=-3

-------NPCֵ-------
NPCֵ_յϢ=1
NPCֵ_쳣=0
NPCֵ_յֹϢ=-1
NPCֵ_ʱ=-2

-------ʹûձ䷵ֵ-------
ʹûձ䷵ֵ_յϢ=1
ʹûձ䷵ֵ_쳣=0
ʹûձ䷵ֵ_յֹϢ=-1
ʹûձ䷵ֵ_ʱ=-2
ʹûձ䷵ֵ_ûб=-3

-------֤뷵ֵ-------
֤뷵ֵ_յϢ=1
֤뷵ֵ_쳣=0
֤뷵ֵ_յֹϢ=-1
֤뷵ֵ_֤볤쳣=-2
֤뷵ֵ_ʱ=-3
֤뷵ֵ_NPC쳣=-4

-------Էֵ-------
Էֵ_յϢ=1
Էֵ_쳣=0
Էֵ_յֹϢ=-1
Էֵ_ʱ=-2

-------С˷ֵ-------
С˷ֵ_=1
С˷ֵ_쳣=0
С˷ֵ_յֹϢ=-1
С˷ֵ_ʱ=-2

-------Ϸֵ-------
Ϸֵ_=1
Ϸֵ_쳣=0
Ϸֵ_յֹϢ=-1
Ϸֵ_ʱ=-2

-------ضֵַ-------
ضֵַ_ɹ=1
ضֵַ_쳣=0
ضֵַ_յֹϢ=-1
ضֵַ_ʱ=-2
ضֵַ_=-3
ضֵַ_ûзĿ=-4

while true do       ---ѭ---

  while true do    ----ѭʼ
    if ȡƷ()>=30 then    -----ʱжϿʼ
      while true do     ------ѭʼ
        Ƿ=true
         Էֵ=("@1",true)
        if Էֵ==Էֵ_յֹϢ then
          ֹͣһ()
          return
        elseif Էֵ~=Էֵ_յϢ then
          Ƿ=false
        else
          --ֵȴ
        end

        ------  ԻĿ Ծϵл   ----
        if Ƿ then
          NPCֵ=NPC("@ջԾ",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ ڡϵл   ----
        if Ƿ then
          NPCֵ=NPC("@ڡ",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ ݺϵл   ----
        if Ƿ then
          NPCֵ=NPC("@ݺ",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ ϵл   ----
        if Ƿ then
          NPCֵ=NPC("@",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ Īаϵл   ----
        if Ƿ then
          NPCֵ=NPC("@Īа",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ ϵл   ----
        if Ƿ then
          NPCֵ=NPC("@հA",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ Ӱϵл   ----
        if Ƿ then
          NPCֵ=NPC("@ӰA",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ ϵл   ----
        if Ƿ then
          NPCֵ=NPC("@A",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ סϵл   ----
        if Ƿ then
          NPCֵ=NPC("@տסA",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end


        ------  ԻĿ ơϵл   ----
        if Ƿ then
          NPCֵ=NPC("@ջơA",true)
          if NPCֵ==NPCֵ_յֹϢ then
            return
          elseif NPCֵ~=NPCֵ_յϢ then
            Ƿ=false
          else
            --ֵȴ
          end
        end

        if Ƿ then
          break
        end
        if Ƿֹͣ(true)==true then
          ֹͣһ()
          return
        end
      end     ------ѭ
    end     -----ʱжϽ
    ʱ(1000)
-----------жǷ-----------
-----------жǷ-----------
-----------жǷǿƴ-----------
    Ҫ½Ϸ=false
    Ҫس=false
    if жǷ() then            -----------жǷ-----------
      ʾ("","⵽,С˺Ӳһһ")
      Ҫ½Ϸ=true
    elseif жǷ(false) then         -----------жǷ-----------
      ʾ("ǿƵ","⵽ﱻѻϵͳǿƵ,С˺Ӳһһ")
      Ҫ½Ϸ=true
    elseif ȡǰͼ()~=һͼ then -----------жǷǿƴ-----------

    end
    -------С---------
    if Ҫ½Ϸ==true then
      С˷ֵ=ϷС()
      if С˷ֵ==С˷ֵ_յֹϢ then
        ֹͣһ()
        return
      elseif С˷ֵ==С˷ֵ_ then
        -----ɹС,ʼϷ
      else
        ("Сʧ","Сʧ,ӡ")
        ֹͣһ()
        return
      end
      Ϸֵ=Ϸ()
      if Ϸֵ==Ϸֵ_յֹϢ then
        return
      elseif Ϸֵ==Ϸֵ_ then
        ʱ(2000)
        Ҫس=true
      else
        ("Ϸʧ","Ϸʧ,ӡ")
        return
      end
    end
    -------Ҫس---------
    if Ҫس then
      while ȡǰͼ()~="ʡ" do     ------سѭʼ
        ʹƷ("شʯ")
        for i=0,4         -----жûлسǳɹ
        do
          if ȡǰͼ()=="ʡ" then
            ֹͣһ()
            break
          end
          if Ƿֹͣ(true)==true then
            ֹͣһ()
            return
          end
          ʱ(1000)
        end           -----жûлسǳɹ
        if ȡǰͼ()=="ʡ" then
          break
        end
      end           ------سѭѾسˡ
      break
    end
    if Ƿֹͣ(true)==true then
      ֹͣһ()
      return
    end
  end        ----ѭ
  if Ƿֹͣ(true)==true then
    ֹͣһ()
    return
  end
end       ---ѭ---
------
------
