找回密码
 注册
搜索
查看: 2048|回复: 25

master修改绝情谷水潭似乎把判断都改了的,新的代码

  [复制链接]
门派:明教
发表于 2017-12-30 18:13:58 | 显示全部楼层 |阅读模式
本帖最后由 xiren@tj 于 2017-12-30 18:16 编辑

function Togudi()       
    exe('cuo shupi;cuo shupi;cuo shupi;cuo shupi;cuo shupi;cuo shupi;cuo shupi;cuo shupi;cuo shupi;bang song;pa down')
    fastLocate()
    return check_busy(Goyadi,1)
end
function Goyadi()
    if string.find(locl.room,'谷底') then
                return walk_wait()
        elseif string.find(locl.room,'崖壁') then               
               exe("pa down")
            fastLocate()
                return check_busy(Goyadi,1)
        end
end
function Toqiaobi()
    exe('pa yabi')
    fastLocate()
    return check_busy(Goqiaobi,1)
end
function Goqiaobi()
    if string.find(locl.room,'峭壁') then
                return walk_wait()
    elseif string.find(locl.room,'崖壁') then
            exe("pa up")
            fastLocate()
                return check_busy(Goqiaobi,1)
        end
end
function jqg_checkencb(job)
        if job then
                tmp.jqgjob = job
                return checkBags(jqg_checkencb2)
        end
end
function jqg_checkencb2()
        if tmp.jqgjob then
                check_busy(tmp.jqgjob,0.5)
        end
end
function Totanan()
    DeleteTriggerGroup("qqs")
    create_trigger_t('qqs1','^>*\\s*你要往哪里潜?$','','qQydok')
    create_trigger_t('qqs2','^>*\\s*由于重力不够,你无法继续下潜!$','','qQyderorr')
    SetTriggerOption("qqs1","group","qqs")
    SetTriggerOption("qqs2","group","qqs")
    EnableTriggerGroup("qqs",true)   
        exe('#10(jian shi)')
        return jqg_checkencb(totanan_checkencumbrance)
end
function totanan_checkencumbrance()
        if Bag["ENCB"].value and Bag["ENCB"].value > 100 then
                exe('#5(drop stone)')               
                jqg_checkencb(totanan_checkencumbrance)
        elseif Bag["ENCB"].value > 50 then
                exe('tiao tan')
                return create_timer_s('gotanan',1,'qQianshui')
        else
                exe('#5(jian shi)')
                return jqg_checkencb(totanan_checkencumbrance)
        end
end
function qQianshui()
    exe('qian down')
end
function qQyderorr()
        dis_all()
        check_halt(qQyderorrgetstone)
end
function qQyderorrgetstone()
        exe('pa up;jian shi;tiao tan')
        create_timer_s('gotanan',1,'qQianshui')
end
function qQydok()
    DeleteTriggerGroup("qqs")
    DeleteTimer('gotanan')       
        checkBags(qQyd_dropstone)       
        --return check_busy(qQyd_dropstone)       
end

function qQyd_dropstone()
        if not Bag["ENCB"] or not Bag["ENCB"].value then
                exe('#25(drop stone)')
        else
                if Bag['大石块'] and Bag['大石块'].cnt then
                        exe('#' .. Bag['大石块'].cnt .. '(drop da shikuai)')               
                end
                if Bag['鹅卵石'] and Bag['鹅卵石'].cnt then
                        exe('#' .. Bag['鹅卵石'].cnt .. '(drop e luanshi)')               
                end
                if Bag['小石头'] and Bag['小石头'].cnt then
                        exe('#' .. Bag['小石头'].cnt .. '(drop xiao shitou)')               
                end       
        end
        return jqg_checkencb(totanan_check_qqup_encumbrance)       
end
function totanan_check_qqup_encumbrance()
        if Bag["ENCB"].value and Bag["ENCB"].value < 40 then               
                exe('qian zuoshang')
                return check_busy(qQup,1)
        else
                exe('#5(drop stone)')
                return jqg_checkencb(totanan_check_qqup_encumbrance)               
        end
end
function qQup()
    exe("qian up")
    return check_busy(qQsover,1)
end
function qQsover()
    exe("pa up")
    exe("#5(drop stone)")
        return walk_wait()
end
function Hgudi()   
        exe("#10(jian shi)")       
        return jqg_checkencb(Hgudi_checkencumbrance)
end
function Hgudi_checkencumbrance()
        if Bag["ENCB"].value and Bag["ENCB"].value > 100 then
                exe('#5(drop stone)')                       
                return jqg_checkencb(Hgudi_checkencumbrance)
        elseif Bag["ENCB"].value > 50 then
                exe('tiao tan')
                fastLocate()
                return jqg_checkencb(Hyadi)
        else
                exe('#5(jian shi)')       
                return jqg_checkencbs(Hgudi_checkencumbrance)       
        end
end

function Hyadi()
    if string.find(locl.room,'谷底水潭') then
                if not Bag["ENCB"] or not Bag["ENCB"].value then
                        exe('#10(drop stone)')
                end
                if Bag['大石块'] and Bag['大石块'].cnt then
                        exe('#' .. Bag['大石块'].cnt .. '(drop da shikuai)')               
                end
                if Bag['鹅卵石'] and Bag['鹅卵石'].cnt then
                        exe('#' .. Bag['鹅卵石'].cnt .. '(drop e luanshi)')               
                end
                if Bag['小石头'] and Bag['小石头'].cnt then
                        exe('#' .. Bag['小石头'].cnt .. '(drop xiao shitou)')               
                end
                checkBags()
                exe('qian up')               
                DeleteTriggerGroup("qqs")
                create_trigger_t('qqs1','^>*\\s*你要往哪里潜?$','','hhqok')
                SetTriggerOption("qqs1","group","qqs")
                EnableTriggerGroup("qqs",true)
                create_timer_s('hyadi',1,'hQianshui')
    elseif string.find(locl.room,'水底通道') or string.find(locl.room,'水潭表面') then
                exe('qian down')
                DeleteTriggerGroup("qqs")
                create_trigger_t('qqs1','^>*\\s*你要往哪里潜?$','','hhqok')
                create_trigger_t('qqs2','^>*\\s*由于重力不够,你无法继续下潜!$','','hQyderror')
                SetTriggerOption("qqs1","group","qqs")
                SetTriggerOption("qqs2","group","qqs")
                EnableTriggerGroup("qqs",true)
                fastLocate()
                return jqg_checkencb(Hyadi)       
    end
end
function hQyderror()
        dis_all()
        check_halt(hQyderrorgetstone)       
end
function hQyderrorgetstone()
        exe('pa up;jian shi;tiao tan')
        create_timer_s('hyadi',1,'Hyadi')
end
function hQianshui()       
    exe('qian up')
end
function hhqok()
    DeleteTriggerGroup("hqs")
    DeleteTimer('hyadi')
    return check_halt(hhqok2)
end
function hhqok2()
        exe('pa up')
        return walk_wait()
end

评分

1

查看全部评分

门派:明教
 楼主| 发表于 2017-12-30 18:15:50 | 显示全部楼层
下潜负重似乎都被master修改了,具体是多少也不清楚。
而且因为属性变化,石头所占的负重比例也不同了。
新的代码应该可以修复。
仍然是替换lujing.lua相关文件,注意其中多加了两个fuction
门派:古墓派
发表于 2017-12-30 19:39:11 | 显示全部楼层
给大脸妹32个赞                    
门派:桃花岛
发表于 2017-12-30 21:18:07 | 显示全部楼层
大赞 顶一下 我马上替换
门派:天龙寺
发表于 2017-12-30 22:02:48 | 显示全部楼层
顶大脸妹,我已经换好了                 
门派:华山派
发表于 2017-12-30 23:18:40 | 显示全部楼层
E:\MUSHS01\lua\lujing.lua:600: attempt to call field '?' (a nil value)
stack traceback:
        E:\MUSHS01\lua\lujing.lua:600: in function <E:\MUSHS01\lua\lujing.lua:580>


师姐我一直报错,是什么原因??
门派:天龙寺
发表于 2017-12-31 01:27:25 | 显示全部楼层
大脸妹,有错误

<!-- Produced by MUSHclient v 4.84 - www.mushclient.com -->


Run-time error
World: tj.sjever.net
Function/Sub: beiok called by trigger
Reason: 正在处理触发器 "check_bei1"
C:\MUSHS3\lua\lujing.lua:2170: attempt to call global 'jqg_checkencbs' (a nil value)
stack traceback:
        C:\MUSHS3\lua\lujing.lua:2170: in function <C:\MUSHS3\lua\lujing.lua:2160>
        (tail call): ?


门派:明教
 楼主| 发表于 2017-12-31 02:55:20 | 显示全部楼层
不好意思单词打错了
门派:明教
 楼主| 发表于 2017-12-31 02:55:57 | 显示全部楼层
function Hgudi_checkencumbrance()
        if Bag["ENCB"].value and Bag["ENCB"].value > 100 then
                exe('#5(drop stone)')                       
                return jqg_checkencb(Hgudi_checkencumbrance)
        elseif Bag["ENCB"].value > 50 then
                exe('tiao tan')
                fastLocate()
                return jqg_checkencb(Hyadi)
        else
                exe('#5(jian shi)')       
                return jqg_checkencb(Hgudi_checkencumbrance)       
        end
end


复制的时候单词打错了
门派:桃花岛
发表于 2017-12-31 08:09:31 | 显示全部楼层
function Hgudi_checkencumbrance()
        if Bag["ENCB"].value and Bag["ENCB"].value > 100 then
                exe('#5(drop stone)')                        
                return jqg_checkencb(Hgudi_checkencumbrance)
        elseif Bag["ENCB"].value > 50 then
                exe('tiao tan')
                fastLocate()
                return jqg_checkencb(Hyadi)
        else
                exe('#5(jian shi)')        
                return jqg_checkencbs(Hgudi_checkencumbrance)        
        end
end

多了个“s”?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|书剑永恒MUD ( 闽ICP备14012032号|闽公网安备 35050202000162号 )

GMT+8, 2025-8-6 16:13 , Processed in 0.057724 second(s), 28 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表