新闻动态   news
搜索   Search
你的位置:首页 > 新闻动态 > 官方新闻

GOM助手之梁山传奇比奇矿区脚本

2016/12/29 0:29:48      点击:

        GOM助手是市面上唯一一款支持GOM复古服版本的辅助,综合PK和挂机一体,今天来给大家分享一个梁山传奇挂机脚本。


--比奇矿区

local g_hpname="金创药(中)包"
local g_hpnum=1
local g_mpname="魔法药(中)包"
local g_mpnum=2
local g_hcname="地牢逃脱卷"
local g_hcnum=1
local g_sjname="随机传送卷包"
local g_sjnum=1
local g_hsfname="护身符(大)"
local g_hsfnum=3
local g_hdname="黄色药粉(少量)"
local g_hdnum=1
local g_ldname="灰色药粉(少量)"
local g_ldnum=0

function 回城()
	--存仓模块
	local bsave=是否需要存()
	if bsave then
		移动到范围2("0",301,257,5)
		等待(1500)
		坐标对话(301,257)
		等待(1500)
		选择("@storage")
		等待(1500)
		存()
	end
	--卖书
	if 是否需要卖(4) then
		移动到范围2("0",325,250,5)
		等待(1500)
		坐标对话(325,250)
		等待(1500)
		选择("@sell")
		等待(1500)
		卖(4)
	end
	--卖肉
	if 是否需要卖(40) then
		移动到范围2("0",313,271,5)
		等待(1500)
		坐标对话(313,271)
		等待(1500)
		选择("@sell")
		等待(1500)
		卖(40)
	end
	--卖戒指 && 修戒指
	local bsold=是否需要卖(22,23)
	local brepair7=是否需要修理(50,7) --右戒指
	local brepair8=是否需要修理(50,8) --左戒指
	if bsold or brepair7 or brepair8 then
		移动到范围2("0105",18,6,5)
		等待(1500)
		if bsold then
			坐标对话(18,6)
			等待(1500)
			选择("@sell")
			等待(1500)
			卖(22,23)
		end
		if brepair7 or brepair8 then
			坐标对话(18,6)
			等待(1500)
			选择("@repair")
			等待(1500)
			if brepair7 then
				修理(7)
			end
			if brepair8 then
				修理(8)
			end
		end
	end
	--卖手镯 && 修手镯
	local bsold=是否需要卖(24,26)
	local brepair5=是否需要修理(50,5) --右手镯
	local brepair6=是否需要修理(50,6) --左手镯
	if bsold or brepair5 or brepair6 then
		移动到范围2("0105",12,12,5)
		等待(1500)
		if bsold then
			坐标对话(12,12)
			等待(1500)
			选择("@sell")
			等待(1500)
			卖(24,26)
		end
		if brepair5 or brepair6 then
			坐标对话(12,12)
			等待(1500)
			选择("@repair")
			等待(1500)
			if brepair5 then
				修理(5)
			end
			if brepair6 then
				修理(6)
			end
		end
	end
	--项链 && 修项链
	local bsold=是否需要卖(19,20,21)
	local brepair3=是否需要修理(50,3) --项链
	if bsold or brepair3 then
		移动到范围2("0105",6,18,5)
		等待(1500)
		if bsold then
			坐标对话(6,18)
			等待(1500)
			选择("@sell")
			等待(1500)
			卖(19,20,21)
		end
		if brepair3 then
			坐标对话(6,18)
			等待(1500)
			选择("@repair")
			等待(1500)
			if brepair3 then
				修理(3)
			end
		end
	end
	--卖衣服、头盔 && 修理衣服、头盔
	bsold=是否需要卖(10,11,15)
	local brepair0=是否需要修理(50,0) --衣服
	local brepair4=是否需要修理(50,4) --头盔
	if bsold or brepair0 or brepair4 then
		移动到范围2("0106",19,6,5)
		等待(1500)
		if bsold then
			坐标对话(19,6)
			等待(1500)
			选择("@sell")
			等待(1500)
			卖(10,11,15)
		end
		if brepair0 or brepair4 then
			坐标对话(19,6)
			等待(1500)
			选择("@repair")
			等待(1500)
			if brepair0 then
				修理(0)
			end
			if brepair4 then
				修理(4)
			end
		end
	end
	--卖武器&&修武器
	bsold=是否需要卖(5,6)
	local brepair1=是否需要修理(50,1)
	if bsold or brepair1 then
		移动到范围2("0103",19,18,5)
		等待(1500)
		if bsold then
			坐标对话(19,18)
			等待(1500)
			选择("@sell")
			等待(1500)
			卖(5,6)
		end
		if brepair1 then
			坐标对话(19,18)
			等待(1500)
			选择("@repair")
			等待(1500)
			修理(1)
		end
	end
	--买药
	local hpnum=获取物品数量(g_hpname)
	local mpnum=获取物品数量(g_mpname)
	local buyhp=(hpnum>>去比奇矿区
	移动到范围2("0",661,218,5)
	等待(1500)
	坐标对话(664,214)
	等待(1500)
	--选择("@wakuang")
	选择("@kuangqu")
	等待(3000)
	return 挂机()
end

function 挂机()
	开始挂机()
	使用物品(g_hcname)
	等待(2000)
	return 回城()
end

do
	
	--挂机路线:根据需要自己设定挂机线路,可以不需要设置过图门点
	设置来回挂机路线()
	添加挂机路线点2("D401",20,150,3)
	添加挂机路线点2("D401",83,15,3)
	添加挂机路线点2("D401",87,56,3)
	添加挂机路线点2("D401",36,28,3)
	添加挂机路线点2("D401",99,97,3)
	添加挂机路线点2("D401",174,26,3)
	添加挂机路线点2("D401",154,155,3)
	添加挂机路线点2("D401",178,108,3)
	添加挂机路线点2("D402",23,133,3)
	添加挂机路线点2("D402",34,38,3)
	添加挂机路线点2("D402",156,17,3)
	添加挂机路线点2("D402",77,175,3)
	添加挂机路线点2("D402",91,82,3)
	添加挂机路线点2("D402",158,176,3)
	添加挂机路线点2("D402",195,82,3)
	添加挂机路线点2("D403",40,86,3)
	添加挂机路线点2("D403",91,22,3)
	添加挂机路线点2("D403",178,126,3)
	添加挂机路线点2("D403",105,13,3)
	添加挂机路线点2("D403",27,157,3)
	添加挂机路线点2("D403",110,159,3)
	添加挂机路线点2("D403",120,190,3)
	添加挂机路线点2("D404",154,24,3)
	添加挂机路线点2("D404",75,170,3)
	添加挂机路线点2("D404",14,150,3)
	添加挂机路线点2("D404",88,30,3)
	添加挂机路线点2("D404",130,42,3)
	--开始
	local mapid=获取地图id()
	if string.sub(mapid,1,2)=="D4" then
		挂机()
	elseif mapid=="0" then
		回城()
	else
		挂机()
	end
end