灵X高级设置教程巡逻坐标设置,高效率
能进来可能都是灵X的忠实用户,不好意思,先向大家赔个不是,我其实是不懂,向大家请教的。别扔鸡蛋,大家互相交流一下心得。来之则安之,都请留下你的足迹吧!
有一个问题一直困惑了我很久:灵X文件夹里有一个文件名为LingX.lua的文件,用记事本打开,加入自定义打怪坐标,挂机后,灵X能把所有坐标跑完,第二遍就不按设置的坐标打怪,这是哪个地方设置错了,请指点!
以下是我改动后挂骨魔洞二层的LingX.lua内容,红字部分是我改动的
--如果你了解Lua脚本编程的话,修改下面脚本,可以定制自己的辅助工具,否则不要轻易改动,或者备份后改动 --功能函数 --CallHero() --召唤或者收回英雄 --Warning(string) --本地log文件 --keybd_event --模拟按键 --mouse_event --模拟鼠标 --UseItem("随机传送卷") --主号使用道具 --UseHeroBestItem() --英雄使用大药 --UseHeroNormalItem() --英雄使用红药 --SetTargetPoint(x,y,moveonly) --向目标点移动 --IsEnableAI() --是否在挂机 --Logout() --小退
function GameMapInfo(mapname,file) ---通知地图名称 --跨地图设置开始 if mapname~=nil and file~=nil then id=mapname..file g_MapName=mapname --Warning(id) --可以打印出当前的地图名称和地图文件名,方便加地图 if g_MapName=="苍月岛" then --前往尸魔洞一层 在 KeyBoardMessage 函数里面实现 ShowMessage("挂机地图选择:") ShowMessage("alt+1: 尸魔洞") ShowMessage("alt+2: 骨魔洞") end if g_MapName=="盟重省" then ShowMessage("挂机地图选择:") ShowMessage("alt+1: 蜈蚣洞") end if g_MapName=="比奇省" then ShowMessage("地图选择:") ShowMessage("alt+1: 毒蛇山谷") end if g_MapName=="毒蛇山谷" then ShowMessage("地图选择:") ShowMessage("alt+1: 盟重省") end
if g_MapName=="魔龙城1" then ShowMessage("前往魔龙东郊") SetTargetPoint("",472,376,true)--前往魔龙东郊 end if IsEnableAI() then MapPoint("骨魔洞二层","",101,203,false) MapPoint("骨魔洞二层","",107,223,false) MapPoint("骨魔洞二层","",130,237,false) MapPoint("骨魔洞二层","",176,223,false) MapPoint("骨魔洞二层","",140,265,false) MapPoint("骨魔洞二层","",155,287,false) MapPoint("骨魔洞二层","",114,311,false) MapPoint("骨魔洞二层","",78,265,false) MapPoint("骨魔洞二层","",93,339,false) MapPoint("骨魔洞二层","",79,368,false) MapPoint("骨魔洞二层","",52,371,false) MapPoint("骨魔洞二层","",26,271,false) MapPoint("骨魔洞二层","",24,249,false) MapPoint("骨魔洞二层","",51,268,false) MapPoint("骨魔洞二层","",79,282,false) MapPoint("骨魔洞二层","",48,237,false) MapPoint("骨魔洞二层","",64,231,false) MapPoint("骨魔洞二层","",47,208,false) MapPoint("骨魔洞二层","",63,198,false) MapPoint("骨魔洞二层","",113,199,false) MapPoint("骨魔洞二层","",115,154,false) MapPoint("骨魔洞二层","",125,159,false) MapPoint("骨魔洞二层","",145,141,false) MapPoint("骨魔洞二层","",101,203,false) MapPoint("骨魔洞二层","",107,223,false) MapPoint("骨魔洞二层","",130,237,false) MapPoint("骨魔洞二层","",176,223,false) MapPoint("骨魔洞二层","",140,265,false) MapPoint("骨魔洞二层","",155,287,false) MapPoint("骨魔洞二层","",114,311,false) MapPoint("骨魔洞二层","",78,265,false) MapPoint("骨魔洞二层","",93,339,false) MapPoint("骨魔洞二层","",79,368,false) MapPoint("骨魔洞二层","",95,397,false) MapPoint("骨魔洞二层","",69,414,false) MapPoint("骨魔洞二层","",69,459,false) MapPoint("骨魔洞二层","",52,371,false) MapPoint("骨魔洞二层","",26,271,false) MapPoint("骨魔洞二层","",24,249,false) MapPoint("骨魔洞二层","",51,268,false) MapPoint("骨魔洞二层","",79,282,false) MapPoint("骨魔洞二层","",48,237,false) MapPoint("骨魔洞二层","",64,231,false) MapPoint("骨魔洞二层","",47,208,false) MapPoint("骨魔洞二层","",63,198,false)
--下面是复杂一点的旧版设置 if g_MapName=="一线天" then SetTargetPoint(file,13,83,false) --去邪恶势力 end if g_MapName=="邪恶势力" then SetTargetPoint(file,64,82,false) --去传奇部落 end if g_MapName=="传奇部落" then SetTargetPoint(file,69,65,false) --去黑暗地带 end
if g_MapName=="尸魔洞一层" then SetTargetPoint(file,50,24,false) end if g_MapName=="尸魔洞二层" then SetTargetPoint(file,176,36,false) --这个点主要为了从3层返回时用的 SetTargetPoint(file,36,226,false) --去第3层 end if g_MapName=="尸魔洞三层" then SetTargetPoint(file,17,55,false) --跑远点, SetTargetPoint(file,92,76,false) --然后返回二层 end if g_MapName=="骨魔洞一层" then SetTargetPoint(file,153,187,false) g_Floor=1 end if g_MapName=="骨魔洞二层" then SetTargetPoint(file,165,28,false) --这个点主要为了从3层返回时用的 SetTargetPoint(file,136,188,false) --去第3层 g_Floor=2 end if g_MapName=="骨魔洞三层" then if g_Floor==4 then --从4层返回的 SetTargetPoint(file,88,164,false) --去二层 else SetTargetPoint(file,49,86,false) --去四层 end g_Floor=3 end if g_MapName=="骨魔洞四层" then SetTargetPoint(file,12,173,false) --跑远点 SetTargetPoint(file,13,29,false) --回三层 g_Floor=4 end if g_MapName=="骨魔洞五层" then SetTargetPoint(file,155,160,true) --意外到五层马上回四层 end end end --跨地图设置结束 end
function MouseMessage(msg,x,y,data) --鼠标消息 if msg~=nil and x~=nil and y~=nil and data~=nil then if msg==519 then keybd_event(162,29,0,0) mouse_event(8,0,0,0,0) mouse_event(16,0,0,0,0) keybd_event(162,29,2,0) elseif msg==522 then if data >0 then--up keybd_event(113,0,0,0) keybd_event(113,0,2,0) end if data <0 then--down keybd_event(112,0,0,0) keybd_event(112,0,2,0) end end end end
function KeyBoardMessage(Code,Ctrl,Shift,Alt) --键盘消息 if Code~=nil and Ctrl~=nil and Shift~=nil and Alt~=nil then if g_MapName and g_MapName=="盟重省" and Alt and Code==66 then --Alt+b回安全区 SetTargetPoint("",330,330,true) end if g_MapName and g_MapName=="苍月岛" and Alt and Code==66 then --Alt+b回安全区 SetTargetPoint("",142,332,true) end if g_MapName and g_MapName=="苍月岛" and Alt and Code==49 then --alt+1 前往尸魔洞一层 ShowMessage("前往尸魔洞一层") SetTargetPoint("",528,611,true)--前往尸魔洞一层 end if g_MapName and g_MapName=="苍月岛" and Alt and Code==50 then --alt+2 前往尸魔洞一层 ShowMessage("前往骨魔洞一层") SetTargetPoint("",549,126,true)--前往骨魔洞一层 end if g_MapName and g_MapName=="盟重省" and Alt and Code==49 then --alt+1 前往蜈蚣洞 ShowMessage("前往蜈蚣洞") SetTargetPoint("",139,85,true)--前往蜈蚣洞 end
if g_MapName and g_MapName=="魔龙城" and Alt and Code==49 then --alt+1 前往魔龙东郊 ShowMessage("前往魔龙东郊") SetTargetPoint("",472,376,true)--前往魔龙东郊 end if g_MapName and g_MapName=="比奇省" and Alt and Code==49 then --alt+1 毒蛇 ShowMessage("前往毒蛇山谷") SetTargetPoint("",674,82,true)--前往蜈蚣洞 end if g_MapName and g_MapName=="毒蛇山谷" and Alt and Code==49 then --alt+1 前往盟重省 ShowMessage("前往盟重省") SetTargetPoint("",300,59,true)--前往蜈蚣洞 end end end
全力为各位传奇玩家原创最好的文章,九四一传奇私服发布网!
|