//~silent
//白三三
@print ⌛️ 即将启动自动寻找红Boss功能……
[if] (arg0) != null
($bossName) = (arg0)
[if] (arg1) != null
($bossPlace) = (arg1)
($localVer) = 2022070401
($changeLog) = 🆕 优化血刀门的判断;等待模式下,智能等待最多10分钟。⭐️ 自动寻路打Boss,可设置通知方式。
($flowName) = 自动红boss
($flowCode) = zdhboss
($flowPath) = 根文件夹
($flowFinder) = 根文件夹
//($repourl) = https://cdn.jsdelivr.net/gh/mapleobserver/wsmud-script
($repourl) = http://wsmud-cdn.if404.com
@js ($version) = $.ajax({type: "GET", url: "(repourl)/version.txt", async: false, cache: false}).responseText;
[if] (version) != null
@js ($remoteVer) = var v = (version);v.(flowCode)
[if] (localVer) < (remoteVer) && (remoteVer) != null
[if] (UPnum) == null
($UPnum) = 0
[if] (UPnum) < 2
[if] (UPnum) == 1
@print 未获取到最新版本,使用备用地址再次尝试...
($repourl) = http://wsmud-cdn.if404.com
($UPnum) = (UPnum) + 1
[if] (flowPath) != 根文件夹 && (flowPath) != null
($flowSource) = (repourl)/(flowPath)/(flowName).flow.txt
[else]
($flowSource) = (repourl)/(flowName).flow.txt
[if] (flowFinder) == null
($flowFinder) = 根文件夹
@js WG.SendCmd("tm 当前(flowName)版本【(localVer)】,将开始自动更新至最新【(remoteVer)】。")
@print 检测到新版本,自动更新中,更新完成后将自动重启流程……
($f_ss)={"name":"(flowName)","source":"(flowSource)","finder":"(flowFinder)"}
@js var time = Date.parse( new Date());var f=(f_ss);var n=f["name"];var s=f["source"];var fd=f["finder"];WorkflowConfig.removeWorkflow({"name":n,"type":"flow","finder":fd});$.get(s,{stamp:time},function(data,status){WorkflowConfig.createWorkflow(n,data,fd);});
@await 2000
[else]
($UPnum) = null
[if] (UPnum) != null
@js WG.zmlfire({"name":"重启流程","zmlRun":"//~silent\n@call 自动红boss (bossName),(bossPlace)","zmlShow":0,"zmlType":"1"})
[exit]
[else]
($UPnum) = null
[if] (bossName) == null || (bossPlace) == null
#select ($bossName) = 此处主要用于设置参数,平常使用请通过【红boss报告】触发
 * Boss名字,浪翻云|庞斑|烛九阴|蚩尤|天僧,(bossName)
#select ($bossPlace) = 副本名称,树林|财主家|流氓巷|丽春院|神龙教|温府|五毒教|恒山|青城山|衡山|泰山|嵩山|云梦沼泽|白驼山|星宿海|冰火岛|移花宫|燕子坞|黑木崖|缥缈峰|光明顶|天龙寺|血刀门|古墓派|华山论剑,(bossPlace)
[(BossTanlong) == null]($BossTanlong) = 剑心+融合探龙
#select ($BossTanlong) = 找到Boss后是否叫杀,原地等待通知玩家|直接叫杀|自定义命令|剑心+融合探龙|剑心+正常探龙|融合探龙|正常探龙,(BossTanlong)
#input ($BossCustomKill) = 叫杀Boss自定义命令(上个选项需选自定义命令,多个命令用英文分号隔开,不要用@开头的命令),(BossCustomKill)
[(BossBefore) == null]($BossBefore) = $usezml 正常
#input ($BossBefore) = 进副本前后正常装备技能触发,(BossBefore)
[(BossSkill) == null]($BossSkill) = enable force none;$usezml 血剑
#input ($BossSkill) = 杀Boss前换装备技能触发(建议用自命令调用),(BossSkill)
#input ($BossRepeat) = 被连续打死几次后通知玩家处理(最多不超过5次),(BossRepeat)
[(BossWarning) == null]($BossWarning) = 语音播报
#select ($BossWarning) = 遭遇问题时发出警报(找到或找不到Boss、被连续打死多次等),不提示|弹窗提醒|提示音|语音播报|远程通知,(BossWarning)
[(BossAutoKill) == null]($BossAutoKill) = 关闭
#select ($BossAutoKill) = 以下选项开启后将自动进副本寻找Boss叫杀,同时将强制开启远程通知,请自行设置远程通知功能。
 * Boss刷新后直接自动执行,开启|关闭,(BossAutoKill)
#config
[if] (bossName) == null || (bossPlace) == null
@print 无Boss数据,流程终止。
[exit]
[if] (bossPlace) == 移花宫 || (bossPlace) == 黑木崖
[if] {b火折子}? == null
($logNeed) = (bossPlace)所需火折子不足,请先获取再进入。
@print (logNeed)}
[if] (bossPlace) == 黑木崖
[if] {b青龙堂令牌}? == null || {b白虎堂令牌}? == null || {b风雷堂令牌}? == null
($logNeed) = 黑木崖所需物品不足,请先扫荡获取才进去。
@print (logNeed)
[if] (logNeed) != null
@push ⚠️【Boss必需品缺失】(:name),(logNeed)
[exit]
($BossInfo)=notime
@print 🦁️ 本次目标:(bossPlace) - (bossName)
@cmdDelay 500
($fbArrayPath) = "树林":"'cr yz/lw/shangu 0 0','go west','go west','go west'","财主家":"'cr yz/cuifu/caizhu 1 0','go north','go north','look men;open men;go east','go west;go west'","流氓巷":"'cr yz/lmw/xiangzi1 0 0','go east','go north','go south;go east','go east'","丽春院":"'cr yz/lcy/dating 0 0','go up','go east','go west;go west','look tai;tui tai;go enter'","神龙教":"'cr bj/shenlong/haitan 0 0','go north','look bush;kan bush;go north','go north','go north','go south;go east','go east','go north','go north','go north'","温府":"'cr cd/wen/damen 0 0','look tree;climb tree','go north','go northeast','go east','go west;go north','go east','go west;go northwest','go southwest','go west','go east;go south','go west','go east;go north;go northeast;go north','look zhuang;tiao zhuang;tiao zhuang','go north'","五毒教":"'cr cd/wudu/damen 0 0','go east','go south','go west','go east;go east','go west;go south','go north;go north','go east','go east','go east','go north','go west'","恒山":"'cr wuyue/hengshan/daziling 0 0','go northup','go northwest','go northup','go southdown;go northwest','go northup','go northup','go north','go north','go south;go west','go north','go south;go east;go east','go north'","青城山":"'cr wuyue/qingcheng/shanlu 0 0','go westup','go north','go northup','go eastup','go northup','go north','go north','go north','go north','go south;go east','go north'","衡山":"'cr wuyue/henshan/hengyang 0 0','go west','go west','go west','go east;go east;go north','go north','go north','go west','go east;go east','go west;go south;go south;go south;go east','go east','go southeast','go south','go east','go south','go south'","泰山":"'cr wuyue/taishan/daizong 0 0','go northup','go northup','go northup','go northup','go northup','go northup','go northup','go northup','go northup'","嵩山":"'cr wuyue/songshan/taishi 0 0','go north','go north','go northup','go northeast','go northup','go northup','go westup','go westup','go eastdown;go eastdown','go northup','go north','go north','go north','go north','go south;go west','go east;go east'","云梦沼泽":"'cr cd/yunmeng/senlin 0 0','go east','go north','go east','go north','look wei;jump wei','go west;go south;go west;go north','look lu;kan lu;go north','go north','go north','go north'","白驼山":"'cr baituo/damen 0 0','go north','go north','go north','go north','go south;go south;go south;go west','go south','go north;go west','go west','go north','go north','go north'","星宿海":"'cr xingxiu/xxh6 0 0','go northeast','go north','go northwest','go southwest','go south','go north;go northeast','go north'","冰火岛":"'cr mj/bhd/haibian 1 0','go west','go west','go west','go west','go east;go east;go east;go east;go north','go north','go north','go north','go out;go west','look dong;zuan dong'","移花宫":"'cr huashan/yihua/shandao 1 0','go south','go south','go south','go south','go southeast','go northwest;go southwest','go southeast','go down','fire;go west','go west','go west','go north','go north'","燕子坞":"'cr murong/anbian 1 0','go east','go east','go east','go east','go east','go east','go west;go north','go east','go west','look pai;bai pai;bai pai;bai pai;go north','go south;go south;go west;go west;go south','go east','go south','go south','go east'","黑木崖":"'cr heimuya/shangu 0 0','go north','go north','go north','go south;go south;go south;go south','go south','go south','go north;go north;go north;go east','go north','go north','go north','go south;go south;go south;go south','go north;go east','push xiazi;go enter','go up','push xiazi;go enter','go up','push xiazi;go enter','go up','go east','go east','circle wan;go down','fire;push;go south','go east'","缥缈峰":"'cr lingjiu/shanjiao 1 0','go northup','go northup','go northup','zou tiesuo','go northup','go north','go north','go north','go west','go east;go east','go west;go north','go west','go east;go east','go west;go north','go north'","光明顶":"'cr mj/shanmen 0 0','go north','go west','go northwest','go north','go east','go east','go east','go west;go west;go west;go north','go north','go north','go east','go east','go west;go north','go east','go east;go west','go west','go south','go east;go north','go north','go north','go west','go north','go north','go south;go west'","天龙寺":"'cr tianlong/damen 1 0','go south','go south','go south','go north;go southwest','go south','go east','go south','go north;go east','go north'","血刀门":"'cr xuedao/shankou 0 0','go south','go east','go west;go south','go eastup','go enter'","古墓派":"'cr gumu/gumukou 1 0','go enter','go east','go north','go south;go east'","华山论剑":"'cr huashan/lunjian/leitaixia 0 0','go up','jump bi','go down','go north','go south;go south','go north;go west','go east;go east'"
@js ($fbPath) = var fba={(fbArrayPath)};fba.(bossPlace)
@js ($len) = [(fbPath)].length
stopstate
team out
[if] (:hp) < 30000
$to 扬州城-武庙
liaoshang
@until (:hp) >= 30000
stopstate
[if] (BossBefore) != null
(BossBefore)
@await 4000
@print ✈️ 开始自动寻路
($num) = 0
[while] (num) < (len)
@js ($path) = [(fbPath)][(num)]
($pathNow) = (:path)
($renum) = 0
[while] (:path) == (pathNow) && (:room 移花宫-花径,财主家-后院) == false
[if] (renum) > 2
[if] (:room 缥缈峰-百丈涧) == true
($result) = piaomiao
($logResult) = 【Boss寻踪】(:name):躲闪不足一万,无法通过(bossPlace)。
($num) = 99
[break]
$killall
@until (:combating) == false
@await 3000
($renum) = 0
[continue]
(path)
[if] (:combating) == true
@until (:combating) == false
@await 3000
@await 500
($renum) = (renum) + 1
[if] {r(bossName)}? != null
@print 🎯 已找到 => (bossName)
($result) = get
[break]
[while] (:room 移花宫-花径) == true && (yihua) != true
go south
@await 500
[if] (:room 移花宫-山道) == true
go south
@await 500
[continue]
[if] (:room 移花宫-花径) == false
($yihua) = true
[if] {r(bossName)}? != null
@print 🎯 已找到 => (bossName)
($result) = get
($num) = 99
[break]
[if] (:room 移花宫-邀月宫) == true && (flower) == null
look hua
@tip 你数了下大概有($flower)朵花
[else if] (:room 移花宫-宫主卧室) == true
look bed;pushstart bed
pushleft bed[(flower)]
@await 1000
pushright bed[8]
@await 1000
[else if] (:room 移花宫-桂花廊,移花宫-玫瑰廊,黑木崖-大厅,黑木崖-青龙堂大厅) == true
$killall
@until (:combating) == false
@await 3000
[else if] (:room 财主家-后院) == true
$killall
@until (:combating) == false
@await 3000
[if] {b东厢钥匙w}? == null
@print 没钥匙
go west
($num) = 99
[else]
look men;open men;go east
($num) = (num) + 1
[if] {r(bossName)}? != null
@print 🎯 已找到 => (bossName)
($result) = get
($num) = 99
[break]
@until (:combating) == false
@await 500
($num) = (num) + 1
// 找不到Boss
[if] (num) >= (len) && {r(bossName)}? == null && (logResult) == null
($result) = miss
($logResult) = 【Boss寻踪】(:name):在(bossPlace)找不到(bossName),即将自动退出副本……
// 原地等待通知玩家
[if] (BossTanlong) == 原地等待通知玩家 && (result) == get
($result) = wait
($logResult) = 【Boss寻踪】(:name):已在(:room)找到(bossName)。
[if] (BossWarning) == 不提示
($BossWarning) = 提示音
// 叫杀
[if] (BossRepeat) == null || (BossRepeat) <= 0
($BossRepeat) = 2
[if] (BossRepeat) > 5
($BossRepeat) = 5
($numKill) = 0
[while] (numKill) < (BossRepeat) && (BossTanlong) != 原地等待通知玩家 && (result) == get
// 换装备技能触发
[if] (BossSkill) != null
(BossSkill)
@await 5000
@print 技能冷却中,稍等片刻后会主动击杀……
@cd
[if] (bossPlace) == 血刀门 && "{r血刀老祖}?" != "null" && "{r血刀老祖的尸体}?" == "null"
($result) = xuedao
($logResult) = 【Boss寻踪】(:name):遇到血刀老祖,请手动处理。
[break]
[if] (BossTanlong) != 自定义命令
[if] (BossTanlong) == 剑心+融合探龙
@perform force.xin,unarmed.ref
[else if] (BossTanlong) == 剑心+正常探龙
@perform force.xin,unarmed.luo
[else if] (BossTanlong) == 融合探龙
@perform unarmed.ref
[else if] (BossTanlong) == 正常探龙
@perform unarmed.luo
[else]
(BossCustomKill)
$killall
@await 1000
[if] (bossPlace) == 血刀门 && "{r血刀老祖}?" != "null" && "{r血刀老祖的尸体}?" == "null"
@until "{r(bossName)}?" == "null" || (:living) == false
[else]
@until (:combating) == false || (:living) == false
@await 1000
[if] (:living) == false
[while] (:living) == false
[{b天师符y}?==null]shop 1 1
relive locale
@await 1000
@until (:living) == true
($numKill) = (numKill) + 1
[else]
[if] (bossName) == 天僧
@until {r天僧的尸体} != null
@await 1000
get all from {r(bossName)}?
get all from {r(bossName)}?
@tip 你身上($bagfull)太多了|你拿不下($bagfull)东西|你要从哪拿走什么东西|拿走任何东西|东西就在你身上|里面什么都没有|里面没有东西|尸体里拿出来|不要急,慢慢来
[if] (bagfull) != null
($bagfull) = null
($weqAry) = '动物皮毛','布衣','铁剑','钢刀','木棍','英雄巾','布鞋','铁戒指','簪子','长鞭','钓鱼竿','鱼饵','铁棍','铁杖','飞镖','铁镐','基本'
@js ($weqLen) = [(weqAry)].length
($weqNum) = 0
[while] (weqNum) < (weqLen)
@js ($weq) = [(weqAry)][(weqNum)]
[while] {b(weq)w}? != null
drop {b(weq)w}?
($weqNum) = (weqNum) + 1
@await 1000
get all from {r(bossName)}?
get all from {r(bossName)}?
@tip 你身上($bagfull)太多了|你拿不下($bagfull)东西|你要从哪拿走什么东西|拿走任何东西|东西就在你身上|里面什么都没有|里面没有东西|尸体里拿出来
[if] (bagfull) != null
($result) = full
($logResult) = 【Boss拾取】(:name),背包已满无法拾取,请尽快处理。
[break]
@await 3000
cr;cr over
($xluAry) = '香炉g','檀香炉b','沉香木鼎y','麝香铜鼎p','龙涎香熏o','龙脑古鼎r'
@js ($lenXlu) = [(xluAry)].length
($numXlu) = 0
[while] (numXlu) < (lenXlu)
@js ($xlu) = [(xluAry)][(numXlu)]
($xlu_1) = {b(xlu)}?
($xlu_2) = {b(xlu)}?# obj.id == "(xlu_1)" #
[if] "(xlu_2)" != "(xlu_1)" && "(xlu_1)" != "null" && "(xlu_2)" != "null"
packitem hc {b(xlu)}?
($numXlu) = (numXlu) + 1
@await 2000
@renew
@tidyBag
@await 2000
[if] (BossBefore) != null
(BossBefore)
@await 4000
$zdwk
[exit]
[if] (numKill) >= (BossRepeat)
($result) = fail
($logResult) = 【Boss警报】(:name),无法在 (bossPlace) 正常击杀(bossName)。
[if] (logResult) != null
[if] (BossWarning) == 提示音
@beep
[else if] (BossWarning) == 语音播报
$tts (logResult)
[else if] (BossWarning) == 远程通知
@push (logResult)
[else if] (BossWarning) == 弹窗提示
@js alert("(logResult)")
@print (logResult)
// 等待十分钟
[if] (result) == miss
@print (:hour):(:minute):(:second) 副本中找不到(bossName),即将自动退出副本……
[else]
($waittime) = 0
($bossID) = {r(bossName)}?
($BossInfo) = wait
@print (:hour):(:minute):(:second) 开始等待玩家处理,若10分钟内未处理,将自动退出副本……
@js Message.append(`
关闭智能等待
`)
@js $(".boss-quit").off("click")
@js $(".boss-quit").on("click", function(){ToRaid.perform(`//~silent\n@print 即将关闭智能等待……\n($BossInfo) = notime`);})
[while] (:room 副本区域) == true && "(bossID)" != "null" && (result) != miss
[if] (BossInfo) != wait
@print (:hour):(:minute):(:second) 已关闭智能等待,请玩家手动操作。
tm (:hour):(:minute):(:second) 已关闭智能等待,请玩家手动操作。
[exit]
@await 10000
tm (:hour):(:minute):(:second) 等待玩家处理
[if] (result) == full
@until {r(bossName)}? == null
[break]
[if] {r(bossName)}? == null || {r(bossName)}? != (bossID)
[if] {r(bossName)}? != (bossID) && {r(bossName)}? != null
($killover) = true
[else]
($timeout) = true
@print (:hour):(:minute):(:second) Boss已失踪。
tm (:hour):(:minute):(:second) Boss已失踪。
[if] (:combating) == true || (:living) == false
($waittime) = 0
($logWait) = null
@print 检测到叫杀Boss,重新计时。
tm (:hour):(:minute):(:second) 检测到叫杀Boss,重新计时。
@until (:combating) == false || (:living) == false
[if] (:living) == false
($waittime) = 0
($logWait) = null
@print 检测到叫杀Boss,重新计时。
tm (:hour):(:minute):(:second) 检测到叫杀Boss,重新计时。
($waittime) = (waittime) + 1
[if] (BossInfo) != wait
[continue]
[if] (waittime) == 30 && (killover) != true
@print (:hour):(:minute):(:second) 已等待5分钟,再次通知玩家。
($logWait) = ⚠️【Boss等待】(:name),已等待5分钟,超过10分钟未处理,将自动退出副本。
[if] (waittime) > 60 || (timeout) == true || (killover) == true
[if] (killover) == true
@print (:hour):(:minute):(:second) 已手动打死Boss,退出副本。
tm (:hour):(:minute):(:second) 已手动打死Boss,退出副本。
[else if] (waittime) > 60 || (timeout) == true
@print (:hour):(:minute):(:second) 超过10分钟未处理,退出副本。
tm (:hour):(:minute):(:second) 超过10分钟未处理,退出副本。
($logWait) = ⚠️【Boss等待】(:name),已超过10分钟未处理,自动退出副本。
[while] (:living) == false
relive
@await 500
cr;cr over
[break]
($BossInfo) = notime
[if] (logWait) != null
[if] (BossWarning) == 提示音
@beep
[else if] (BossWarning) == 语音播报
$tts (logWait)
[else if] (BossWarning) == 远程通知
@push (logWait)
@print (logWait)
[if] (:room 副本区域) == true
relive
@await 500
cr;cr over
stopstate
@renew
@tidyBag
@await 2000
[if] (BossBefore) != null
(BossBefore)
@await 4000
$zdwk