Ƿֹͣ(false)
ƶֵ_յֹϢ = -5
һͼ_յֹϢ = -1
һͼ_ = 1
سǷֵ_յֹϢ = -1
سǷֵ_ʱ = -2
շֵ_ɹ = 1
շֵ_ʧ = -1
շֵ_յֹϢ = -2
޸ʱ = ȡʱ()
function ޸()
    if ȡʱ()-޸ʱ > 1200000 then
        ʹƷ("޸ˮ")
        ޸ʱ = ȡʱ()
        ʱ(1000)
    end
end
ҩˮʱ = ȡʱ()
function ҩˮ()
    if ȡʱ()-ҩˮʱ > 60000 then
        ʹƷ("ˮ")
        ҩˮʱ = ȡʱ()
        ʱ(1000)
    end
end
function ()
    while true do
        ֵ = س()
        if Ƿֹͣ(true) then
            return շֵ_յֹϢ
        end
        ƶֵ= ƶ(319, 326)
        if Ƿֹͣ(true) then
            return շֵ_յֹϢ
        end
        ʱ(2000)
        NPCԻ("װ", "")
        ʱ(1000)
        if Ƿֹͣ(true) then
            return շֵ_յֹϢ
        end
        ѡԻĿ("@һ", 3000, false)
ѡԻĿ("@һ", 3000, false)
ѡԻĿ("@ͨ", 3000, false)
ѡԻĿ("@þ֮", 3000, false)
ѡԻĿ("@þ֮", 3000, false)
ѡԻĿ("@þ֮", 3000, false)
ѡԻĿ("@þ֮", 3000, false)
ѡԻĿ("@Ȩ", 3000, false)
ѡԻĿ("@Ȩ", 3000, false)
ѡԻĿ("@Ȩ", 3000, false)
ѡԻĿ("@Ȩ", 3000, false)
ѡԻĿ("@ƽ", 3000, false)
ѡԻĿ("@ƽ", 3000, false)
ѡԻĿ("@ƽ", 3000, false)
ѡԻĿ("@ƽ", 3000, false)
ѡԻĿ("@ƽ", 3000, false)
ѡԻĿ("@ƽ", 3000, false)
ѡԻĿ("@ң", 3000, false)
ѡԻĿ("@ŭն", 3000, false)
ѡԻĿ("@", 3000, false)
ѡԻĿ("@ȷ", 3000, false)
ѡԻĿ("@ ҳ", 3000, false)
ѡԻĿ("@֮", 3000, false)
ѡԻĿ("@֮Ȩ", 3000, false)
ѡԻĿ("@֮þ֮", 3000, false)
ѡԻĿ("@֮ƽ", 3000, false)
ѡԻĿ("@ȷ", 3000, false)
ѡԻĿ("@ ҳ", 3000, false)
ѡԻĿ("@ϵ", 3000, false)
ѡԻĿ("@ָ", 3000, false)
ѡԻĿ("@", 3000, false)
ѡԻĿ("@", 3000, false)
ѡԻĿ("@ͷ", 3000, false)
ѡԻĿ("@ָ", 3000, false)
ѡԻĿ("@", 3000, false)
ѡԻĿ("@", 3000, false)
ѡԻĿ("@ͷ", 3000, false)
ѡԻĿ("@ʥսָ", 3000, false)
ѡԻĿ("@ʥս", 3000, false)
ѡԻĿ("@ʥս", 3000, false)
ѡԻĿ("@ʥսͷ", 3000, false)
ѡԻĿ("@ȷ", 3000, false)
        if Ƿֹͣ(true) then
            return շֵ_յֹϢ
        end
        if ȡƷ() < 35 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
             ʹƷ("ʮͿ")
         ʱ(1000)
         end
     end                          ---ͼѭ---
     return һͼ_
end                          --[һͼ]----




״̬=""
while true do       ---һѭ---
    if ״̬ =="" then  ----------------һͼ
        ֵ = һͼ()
        if ֵ==һͼ_յֹϢ then
            return
        end
        if ֵ==һͼ_ then
            ״̬="ս"
        end
    end
    if ״̬ =="ս" then   ---------------ʼս
        ʼһ()
        ״̬="ȴս"
    end
    if ״̬ =="ȴս" then   ---------------ȴս
        ޸()
    end
    if ״̬ =="ȴս" then   ---------------ȴս
        ҩˮ()

        if ȡƷ() > 35 then
            ״̬=""
        end
        if ȡǰͼ() ~= "þʮ" then
            ״̬=""
        end
    end
    if ״̬ =="" then   ---------------
        ֹͣһ()
        ʱ(3000)
        if () == շֵ_ɹ then
            ״̬=""
        end
    end
    if Ƿֹͣ(true) then
        break 
    else
        ʱ(1000)
    end
end                 ---˳һѭ---
ֹͣһ()
