Ƿֹͣ(false)
ƶֵ_յֹϢ = -5
һͼ_յֹϢ = -1
һͼ_ = 1
سǷֵ_յֹϢ = -1
سǷֵ_ʱ = -2
շֵ_ɹ = 1
շֵ_ʧ = -1
շֵ_յֹϢ = -2
޸ʱ = ȡʱ()
function ޸()
    if ȡʱ()-޸ʱ > 2400000 then
        if ƷǷ("޸ˮ") == false then
            ̳Ʒ("޸ˮ")
            ʱ(1000)
        end         --жƷǷ----
        if Ƿֹͣ(true) then
            return -1
        end
        ʹƷ("޸ˮ")
        ޸ʱ = ȡʱ()
        ʱ(1000)
    end
end
function ()
    while true do
        ("@")
        ʱ(1000)
        if Ƿֹͣ(true) then
            return շֵ_յֹϢ
        end
        ѡԻĿ("@ϴ", 2000, false)
        if Ƿֹͣ(true) then
            return շֵ_յֹϢ
        end
        if ȡƷ() < 50 then
            return  շֵ_ɹ
        end
    end
end
function س()
    ۼƼƴ=0
    while ȡǰͼ() ~= "ʡ" do
        if ƷǷ("سǾ") == false then
            ̳Ʒ("سǾ")
            ʱ(1000)
        end         --жƷǷ----
        if Ƿֹͣ(true) then
            return -1
        end
        ʹƷ("سǾ")
        ʱ(1000)
        ۼƼƴ=ۼƼƴ+1
        if ۼƼƴ>=5 then
            return -2
        end
    end         --[жϵͼѭ]----
    return 1
end         --[س]----
function һͼ()
    while ȡǰͼ() ~= "氵" do       ---ͼѭ---
        س()
        if ȡǰͼ() == "ʡ" then
            ƶֵ= ƶ(321, 329)
            if ƶֵ == ƶֵ_յֹϢ then
                return һͼ_յֹϢ
            end
            NPCԻ("氵", "")
            if Ƿֹͣ(true) then
                return һͼ_յֹϢ
            end
            ʱ(1000)
            ѡԻĿ("@h1", 2000, false)
        ----Ҫýű----
        end 
        if Ƿֹͣ(true) then
            return һͼ_յֹϢ
        end
    end                          ---ͼѭ---
    return һͼ_
end                          --[һͼ]----




״̬=""
while true do       ---һѭ---
    if ״̬ =="" then  ----------------һͼ
        ֵ = һͼ()
        if ֵ==һͼ_յֹϢ then
            return
        end
        if ֵ==һͼ_ then
            ״̬="ս"
        end
    end
    if ״̬ =="ս" then   ---------------ʼս
        ʼһ()
        ״̬="ȴս"
    end
    if ״̬ =="ȴս" then   ---------------ȴս
        ޸()
        if ȡƷ() > 50 then
            ״̬=""
        end
        if ȡǰͼ() ~= "氵" then
            ״̬=""
        end
    end
    if ״̬ =="" then   ---------------
        ֹͣһ()
        ʱ(3000)
        if () == շֵ_ɹ then
            ״̬=""
        end
    end
    if Ƿֹͣ(true) then
        break 
    else
        ʱ(1000)
    end
end                 ---˳һѭ---
ֹͣһ()
