刀_肝图[0825]

--需要1.2.3或以上版本才可以使用! 
--需要勾选游戏为刀剑
--队形 优先选择有利 不利按照战斗的第二参数选择1-6
--支持道中重伤判断并退出脚本
--该脚本自行修改出阵地图和次数即可
--更多刀剑肝图脚本,请访问↓↓↓
--http://www.7moe.com/forum.php?mod=forumdisplay&fid=110

--2015.07.08 新增加了3个退出的条件(中伤轻伤检非),可自行设置
--2015.08.25 新增了队伍ID设置,新增是否无视等级提示的设置(1.3.4版本或以上版本)
---------------------------------------------------------------------
--这里是设置区域 一般只需修改这里的值即可

map_id = {1,1} 
--出击地图1-1

max_count = 5
--最多进入多少次地图(出击次数)

max_battle_count = 2
--最多进入多少次战斗点

formation = 4
--索敌失败后使用的阵型
--阵型1-6依次为 鱼鳞 横队 雁行 鹤翼 方阵 逆行 如果非1-6数值 则选择2

team_id = 1
--出击的队伍(1-4)

ignore_lv_msg = true
--是否无视等级提示

遇到检非不进入地图 = false
--好吧 不知道怎么翻译 直接用中文变量了 
--如果为true 则在出击时地图上有检非标记就会返回出击失败

战斗中遇到检非停止脚本 = false
--道中遇到检非打不打,false=不停止 true=停止

战斗中中伤停止脚本 = false
--false=不停止 true=停止

战斗中轻伤停止脚本 = false
--false=不停止 true=停止

Base.SetConfig("Sleep+?",100) --所有延时随机增加1-100
---------------------------------------------------------------------

--下面的东西不要乱改了! 就改上面的设置就行
function IsColorAll(array)
	n = 0
	ok = 0
	while(array[n] ~= nil)
	do
		if Base.IsColor(array[n][0],array[n][1],array[n][2])==true then
			ok = ok + 1
		end
		n= n+1
	end
	
	if ok==n then
		return true
	else
		return false
	end
end

function IsDmmunlocker() --判断界面是否正确
	array = {};count = {}
	array = {[0]=17,19,16777215};count[0] = array
	array = {[0]=52,15,16777215};count[1] = array
	array = {[0]=105,16,16777215};count[2] = array
	array = {[0]=165,16,16777215};count[3] = array
	return IsColorAll(count)
end

if IsDmmunlocker() == false then
	mode = 0
	if 战斗中遇到检非停止脚本 == true then
		mode = mode + 4
	end
	if 战斗中中伤停止脚本 == true then
		mode = mode + 1
	end	
	if 战斗中轻伤停止脚本 == true then
		mode = mode + 2
	end
	for n = 1, max_count do --循环次数
		a = "开始第:%d次"
		Win.Print(a:format(n))
		
		--出击
		if Tou.Sally(map_id[1],map_id[2],遇到检非不进入地图) == false then 
			Win.Print('无法出阵退出')
			break --无法出阵
		end
		
		--战斗
		ret = Tou.Battle(max_battle_count, formation, mode, team_id, ignore_lv_msg)
		if ret > 0 then 
			Win.Print('重伤中断脚本') --发现重伤了
			break
		end
		
		if ret == -1 then 
			Win.Print('检非中断脚本') --发现检非
			break
		end
		
		if ret == -2 then 
			Win.Print('超过等级 中断脚本') --发现检非
			break
		end
		Base.Sleep(2000)

	end

else
	Win.Print('检测到游戏内存在空白,坐标无法对应,脚本无法运行!') --发现重伤了
end

Win.Pop('脚本执行完毕!')

Last updated