判断玩家是否开全图挂
来源:互联网 发布:做淘宝怎么发快递 编辑:程序博客网 时间:2024/05/22 02:07
全图挂检测1.原理:出来就能看到敌对的快乐的小绵羊,故判定为开挂。
//全图挂检测.原理:出来就能看到敌对的快乐的小绵羊,故判定为开挂。function jiaoyan_kaigua takes nothing returns nothingif not IsUnitInvisible(weiguo_kldxmy, Player(1)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 1 楼玩家( "+GetPlayerName (Player(1))+" )有开挂!!!|r" )endifif not IsUnitInvisible(weiguo_kldxmy, Player(2)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 2 楼玩家( "+GetPlayerName(Player(2))+" )有开挂!!!|r" )endifif not IsUnitInvisible(weiguo_kldxmy, Player(3)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 3 楼玩家( "+GetPlayerName(Player(3))+" )有开挂!!!|r" )endifif not IsUnitInvisible(weiguo_kldxmy, Player(4)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 4 楼玩家( "+GetPlayerName(Player(4))+" )有开挂!!!|r" )endifif not IsUnitInvisible(weiguo_kldxmy, Player(5)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 5 楼玩家( "+GetPlayerName(Player(5))+" )有开挂!!!|r" )endifif not IsUnitInvisible(shuguo_kldxmy, Player(7)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 6 楼玩家( "+GetPlayerName(Player(7))+" )有开挂!!!|r" )endifif not IsUnitInvisible(shuguo_kldxmy, Player(8)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 7 楼玩家( "+GetPlayerName(Player(8))+" )有开挂!!!|r" )endifif not IsUnitInvisible(shuguo_kldxmy, Player(9)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 8 楼玩家( "+GetPlayerName(Player(9))+" )有开挂!!!|r" )endifif not IsUnitInvisible(shuguo_kldxmy, Player(10)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 9 楼玩家( "+GetPlayerName(Player(10))+" )有开挂!!!|r" )endifif not IsUnitInvisible(shuguo_kldxmy, Player(11)) then call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到 10 楼玩家( "+GetPlayerName(Player(11))+" )有开挂!!!|r" )endifendfunction
全图挂检测2。原理:玩家选择了不可见的单位,故判断该玩家开挂了。
(我没有测试过,所以这种检测不确定是否有用。)
//全图挂检测1。原理:玩家选择了不可见的单位,故判断该玩家开挂了。(我没有测试过,所以这种检测不确定是否有用。)//(因为是该玩家选中单位触发的事件后马上检测,故基本排除了选中单位后单位移动到不可见位置的情况。)function Trig_jiaoyan_kaigua takes nothing returns nothinglocal player player_temp = null //触发的玩家local trigger trig = GetTriggeringTrigger() //触发的触发器local integer playerId = 0 //玩家索引,1楼是2 , 6楼是8 ,10楼是12local unit sel_unit = null //被选择的单位local integer i = 0loopset playerId = playerId + 1exitwhen trig == gg_jiaoyan_kaigua[playerId] endloopset player_temp = Player(playerId-1)//call DisplayTimedTextToForce(GetPlayersAll(),5.00, I2S(playerId) + "开始检测..." + I2S(GetUnitLevel ( GetHeroUnit(playerId)) ))if IsUnitSelected( GetHeroUnit(playerId),player_temp) then //选择自己的武将,则不用继续校验了。elseif playerId < 8 then //蜀国的玩家触发if IsUnitSelected( GetHeroUnit(8),player_temp) then set sel_unit = GetHeroUnit(8)elseif IsUnitSelected( GetHeroUnit(9),player_temp) then set sel_unit = GetHeroUnit(9)elseif IsUnitSelected( GetHeroUnit(10),player_temp) then set sel_unit = GetHeroUnit(10)elseif IsUnitSelected( GetHeroUnit(11),player_temp) then set sel_unit = GetHeroUnit(11)elseif IsUnitSelected( GetHeroUnit(12),player_temp) then set sel_unit = GetHeroUnit(12)endifelseif playerId >= 8 then //魏国的玩家触发if IsUnitSelected( GetHeroUnit(2),player_temp) then set sel_unit = GetHeroUnit(2)elseif IsUnitSelected( GetHeroUnit(3),player_temp) then set sel_unit = GetHeroUnit(3)elseif IsUnitSelected( GetHeroUnit(4),player_temp) then set sel_unit = GetHeroUnit(4)elseif IsUnitSelected( GetHeroUnit(5),player_temp) then set sel_unit = GetHeroUnit(5)elseif IsUnitSelected( GetHeroUnit(6),player_temp) then set sel_unit = GetHeroUnit(6)endifendif//sel_unit不为空则进一步检测if sel_unit != null and IsUnitInvisible(sel_unit, player_temp) then //该单位如果对该玩家不可见,但他又选择了,故判断该玩家开挂了。call DisplayTimedTextToForce(GetPlayersAll(),10.00, "|cFFFFFF00检测到玩家( "+GetPlayerName(player_temp)+" )有开挂!!!|r" )else//call DisplayTimedTextToForce(GetPlayersAll(),5.00, "没有检测玩家到开挂。" )endifcall DisableTrigger(GetTriggeringTrigger()) endfunction//玩家选择单位事件,通过 TriggerRegisterPlayerSelectionEventBJ 触发调用该函数function playerSelectUnitTrigger_Action takes nothing returns nothinglocal player player_temp = GetTriggerPlayer() //触发的玩家local integer playerId = GetConvertedPlayerId(player_temp) //玩家索引,1楼是2 , 6楼是8 ,10楼是12if not(IsTriggerEnabled(gg_jiaoyan_kaigua[playerId])) thencall EnableTrigger(gg_jiaoyan_kaigua[playerId]) endifendfunction
//选择单位触发器trigger gg_SelectUnitTrigger=null//判断指定玩家是否开挂触发器trigger array gg_jiaoyan_kaigua//蜀国快乐的小绵羊unit shuguo_kldxmy = null//魏国快乐的小绵羊unit weiguo_kldxmy = null
//初始化function Trig_init_Actions takes nothing returns nothinglocal integer i = 0//全图挂检测1call jiaoyan_kaigua()//全图挂检测2loop set i = i + 1set gg_jiaoyan_kaigua[i] = CreateTrigger()call DisableTrigger(gg_jiaoyan_kaigua[i]) call TriggerRegisterTimerEventPeriodic(gg_jiaoyan_kaigua[i],0.05) call TriggerAddAction(gg_jiaoyan_kaigua[i],function Trig_jiaoyan_kaigua) exitwhen i >= 13endloopset gg_SelectUnitTrigger = CreateTrigger()call TriggerRegisterAnyUnitEventBJ(gg_SelectUnitTrigger,EVENT_PLAYER_UNIT_SELECTED)call TriggerAddAction(gg_SelectUnitTrigger,function playerSelectUnitTrigger_Action)endfunction
下载了一个全图挂测试了一下。检测技术2有效。但必须玩家点击对方不可见的武将时才能检测出来。
检测技术1无效,可能是外挂没有使用这么粗暴的方法,检测技术1应该是竞技平台会检测。
阅读全文
0 0
- 判断玩家是否开全图挂
- 玩家
- 程序员面试金典——解题总结: 9.17中等难题 17.2判断井字游戏中某个玩家是否赢了游戏
- 判断玩家的选择——判断语句
- Unity中检测玩家、NPC等是否在视野内
- 判断玩家用户连续登录的 天数的php写法
- iOS 判断是否是否静音
- 字符串是否整数判断 、是否小数判断
- 判断文件是否存在
- 判断是否数字
- 判断cookie是否开启
- 判断是否为数字
- 判断是否IE6浏览器
- 判断是否连网
- 判断客户端是否断开
- 判断是否登陆
- 判断是否汉字
- 判断文件夹是否存在
- Redis常用命令
- jq实现循环遍历树形结构的CheckBox根据父级选中子级
- sql 更新标识列的当前最大id
- Ubuntu下安装并配置TexStudio
- ss-libev 源码解析udp篇 (1)
- 判断玩家是否开全图挂
- String、StringBuffer与StringBuilder之间区别
- 通过轮廓简单实现一个圆图
- FFMPEG类库打开流媒体的方法(需要传参数的时候)
- java 设计模式-单例模式
- linux--chown
- docker 安装showdoc
- jQuery——选中、不选中、全选、取消全选等复选框操作
- 转:在VS2013中安装配置boost_1_58_0库