找回密码
 点一下
查看: 1217|回复: 3

如何把这段反MH代码加入到我的地图中

[复制链接]
发表于 2011-12-7 20:30:35 | 显示全部楼层 |阅读模式
现在开MH的可真多 我从网上得到一个反MH代码 可是不知道怎么用 那位朋友能教教我或者帮忙用这段代码随便加个地图中
当然能帮我做出一个注入器就最好了  谢谢大家帮忙
function Trig_fanquantu1Conditions takes nothing returns boolean
    return((IsLocationVisibleToPlayer(Location(-7888.00,3600.00),Player(1))!=true)and(IsLocationVisibleToPlayer(Location(-7888.00,3600.00),Player(7))!=true))
endfunction
function Trig_fanquantu1Actions takes nothing returns nothing
    call DisplayTimedTextToForce(GetPlayersAll(),10.00,"|cFFFF0000(如有玩家读秒掉线)\n     是系统踢掉的作弊玩家!|r")
    call ConditionalTriggerExecute(gg_trg_Map_initialization1)
    call DestroyTrigger(gg_trg_Map_initialization1)
    call StartTimerBJ(udg_qingchuBUG1,false,0.50)
    call StartTimerBJ(udg_qingchuBUG2,false,0.60)
    call StartTimerBJ(udg_qingchuBUG3,false,0.70)
    call StartTimerBJ(udg_JC_MH[0],false,GetRandomReal(300.00,1200.00))
endfunction   
function InitTrig_fanquantu1 takes nothing returns nothing
    set gg_trg_fanquantu1=CreateTrigger()
    call TriggerRegisterTimerEventSingle(gg_trg_fanquantu1,GetRandomReal(300.00,600.00))
    call TriggerAddCondition(gg_trg_fanquantu1,Condition(function Trig_fanquantu1Conditions))
    call TriggerAddAction(gg_trg_fanquantu1,function Trig_fanquantu1Actions)
endfunction
function Trig_qingchubug1Actions takes nothing returns nothing
    call SetDoodadAnimation(udg_MHx,udg_MHy,300,'D000',false,"stand",false)
endfunction
function InitTrig_qingchubug1 takes nothing returns nothing
    set gg_trg_qingchubug1=CreateTrigger()
    call TriggerRegisterTimerExpireEventBJ(gg_trg_qingchubug1,udg_qingchuBUG1)
    call TriggerAddAction(gg_trg_qingchubug1,function Trig_qingchubug1Actions)
endfunction
function Trig_qingchubug2Actions takes nothing returns nothing
    set udg_MHDetect[0]=GetLastCreatedUnit()
    call UnitApplyTimedLifeBJ(1.00,'BTLF',udg_MHDetect[0])
    set udg_MHDetect[0]=null
endfunction
function InitTrig_qingchubug2 takes nothing returns nothing
    set gg_trg_qingchubug2=CreateTrigger()
    call TriggerRegisterTimerExpireEventBJ(gg_trg_qingchubug2,udg_qingchuBUG2)
    call TriggerAddAction(gg_trg_qingchubug2,function Trig_qingchubug2Actions)
endfunction
function Trig_qingchubug3Actions takes nothing returns nothing
    set udg_MHDetect[1]=GetLastCreatedUnit()
    call UnitApplyTimedLifeBJ(1.00,'BTLF',udg_MHDetect[1])
    set udg_MHDetect[1]=null
endfunction
function InitTrig_qingchubug3 takes nothing returns nothing
    set gg_trg_qingchubug3=CreateTrigger()
    call TriggerRegisterTimerExpireEventBJ(gg_trg_qingchubug3,udg_qingchuBUG3)
    call TriggerAddAction(gg_trg_qingchubug3,function Trig_qingchubug3Actions)
endfunction
function CameraComeback takes nothing returns nothing
    call DestroyTimer(GetExpiredTimer())
    call PanCameraToTimed(udg_CameraX,udg_CameraY,0)
    set bj_forLoopAIndex=0
    loop
        call SetFogStateRadius(Player(bj_forLoopAIndex),FOG_OF_WAR_MASKED,udg_MHx+300,udg_MHy+300,300,false)
        set bj_forLoopAIndex=bj_forLoopAIndex+1
        exitwhen bj_forLoopAIndex>11
    endloop
endfunction
function MapHack takes nothing returns nothing
    set udg_CameraX=GetCameraTargetPositionX()
    set udg_CameraY=GetCameraTargetPositionY()
    call PanCameraToTimed(udg_MHx,udg_MHy,0)
    call SetCameraTargetController(gg_unit_n00Q_0234,0,0,false)
    call SetDoodadAnimation(udg_MHx,udg_MHy,300,'D000',false,"death",false)
    set bj_forLoopAIndex=0
    loop
        call SetFogStateRadius(Player(bj_forLoopAIndex),FOG_OF_WAR_VISIBLE,udg_MHx+300,udg_MHy+300,300,false)
        set bj_forLoopAIndex=bj_forLoopAIndex+1
        exitwhen bj_forLoopAIndex>11
    endloop
    call SetUnitAnimation(udg_MHDetect[0],"death")
    call SetUnitAnimation(udg_MHDetect[1],"death")
    call TimerStart(CreateTimer(),0.05,false,function CameraComeback)
endfunction
function Trig_Map_HostCommand_Actions takes nothing returns nothing
    local integer index
    local string str
    local string chat=GetEventPlayerChatString()
    call DisplayTimedTextToPlayer(udg_LocalPlayer,0,0,1,"                      ...")
    call MapHack()
endfunction
function InitTrig_Map_initialization1 takes nothing returns nothing
    set udg_MHx=-7888
    set udg_MHy=3600
    set udg_LocalPlayer=GetLocalPlayer()
    call SetAltMinimapIcon("MiniMapBlank1.blp")
    set udg_MHDetect[0]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'e007',udg_MHx+300,udg_MHy+300,0)
    call UnitAddAbility(udg_MHDetect[0],'Agho')
    set udg_MHDetect[1]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'e007',udg_MHx,udg_MHy,0)
    set gg_trg_Map_initialization1=CreateTrigger()
    call DisableTrigger(gg_trg_Map_initialization1)
    call TriggerAddAction(gg_trg_Map_initialization1,function Trig_Map_HostCommand_Actions)
endfunction
function Trig_MapHack55Actions takes nothing returns nothing
    local integer ydl_localvar_step=GetStoredInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())),"0xCFDE6C76")
    set ydl_localvar_step=ydl_localvar_step+3
    call StoreInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())),"0xCFDE6C76",ydl_localvar_step)
    call StoreInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())),"0xECE825E7",ydl_localvar_step)
    call StoreInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step),"0x03A9E8E9",YDTriggerGCH2I(GetRectCenter(gg_rct_BUG2)))
    call SetUnitPositionLoc(GetEnteringUnit(),YDTriggerGCGet_location(I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step),"0x03A9E8E9"))
    call RemoveLocation(YDTriggerGCGet_location(I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step),"0x03A9E8E9"))
    call FlushStoredMission(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step))
endfunction
function InitTrig_MapHack55 takes nothing returns nothing
    set gg_trg_MapHack55=CreateTrigger()
    call TriggerRegisterEnterRectSimple(gg_trg_MapHack55,gg_rct_BUG3)
    call TriggerAddAction(gg_trg_MapHack55,function Trig_MapHack55Actions)
endfunction
function Trig_MapHackzixuanConditions takes nothing returns boolean
    return((IsLocationVisibleToPlayer(Location(-7888.00,3600.00),Player(1))!=true)and(IsLocationVisibleToPlayer(Location(-7888.00,3600.00),Player(7))!=true))
endfunction
function Trig_MapHackzixuanFunc010002002 takes nothing returns boolean
    return((GetUnitTypeId(GetFilterUnit())=='n011'))
endfunction
function Trig_MapHackzixuanFunc011A takes nothing returns nothing
    call SetUnitAnimation(GetEnumUnit(),"death")
    call SetUnitTimeScale(GetEnumUnit(),100.00)
    call YDWETimerRemoveUnit(0.50,GetEnumUnit())
endfunction
function Trig_MapHackzixuanActions takes nothing returns nothing
    set udg_D_BUG=Location(-7888.00,3600.00)
    set udg_D_BUG1=GetRectCenter(gg_rct_WEI_TavernsRect)
    set udg_D_jingtou_X=GetCameraTargetPositionX()
    set udg_D_jingtou_Y=GetCameraTargetPositionY()
    call DisplayTimedTextToForce(GetPlayersAll(),10.00,"|cFFFF0000(如有玩家读秒掉线)\n     是系统踢掉的作弊玩家!|r")
    call PanCameraToTimed(-7888.00,3600.00,0)
    call SetCameraTargetController(gg_unit_n00Q_0234,0,0,false)
    call CreateNUnitsAtLoc(100,'n011',Player(PLAYER_NEUTRAL_AGGRESSIVE),udg_D_BUG,bj_UNIT_FACING)
    set udg_DW_KSTB=GetUnitsInRectMatching(gg_rct_BUG,Condition(function Trig_MapHackzixuanFunc010002002))
    call ForGroupBJ(udg_DW_KSTB,function Trig_MapHackzixuanFunc011A)
    call StartTimerBJ(udg_Yinxing_DW[20],false,0.05)
    call StartTimerBJ(udg_JC_MH[1],false,GetRandomReal(300.00,1200.00))
    call DestroyTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_MapHackzixuan takes nothing returns nothing
    set gg_trg_MapHackzixuan=CreateTrigger()
    call TriggerRegisterTimerExpireEventBJ(gg_trg_MapHackzixuan,udg_JC_MH[0])
    call TriggerAddCondition(gg_trg_MapHackzixuan,Condition(function Trig_MapHackzixuanConditions))
    call TriggerAddAction(gg_trg_MapHackzixuan,function Trig_MapHackzixuanActions)
endfunction
function Trig_MapHack3Conditions takes nothing returns boolean
    return((GetUnitTypeId(GetDyingUnit())=='e007'))
endfunction
function Trig_MapHack3Actions takes nothing returns nothing
    call RemoveUnit(GetDyingUnit())
endfunction
function InitTrig_MapHack3 takes nothing returns nothing
    set gg_trg_MapHack3=CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_MapHack3,EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddCondition(gg_trg_MapHack3,Condition(function Trig_MapHack3Conditions))
    call TriggerAddAction(gg_trg_MapHack3,function Trig_MapHack3Actions)
endfunction
function Trig_MapHack3jsqActions takes nothing returns nothing
    call PanCameraToTimed(udg_D_jingtou_X,udg_D_jingtou_Y,0)
    set udg_D_jingtou_X=0.00
    set udg_D_jingtou_Y=0.00
    call GroupClear(udg_DW_KSTB)
    call DestroyGroup(udg_DW_KSTB)
    call RemoveLocation(udg_D_BUG)
    call RemoveLocation(udg_D_BUG1)
    call DestroyTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_MapHack3jsq takes nothing returns nothing
    set gg_trg_MapHack3jsq=CreateTrigger()
    call TriggerRegisterTimerExpireEventBJ(gg_trg_MapHack3jsq,udg_Yinxing_DW[20])
    call TriggerAddAction(gg_trg_MapHack3jsq,function Trig_MapHack3jsqActions)
endfunction
function Trig_MapHack6Conditions takes nothing returns boolean
    return((GetUnitTypeId(GetDyingUnit())=='n011'))
endfunction
function Trig_MapHack6Actions takes nothing returns nothing
    call RemoveUnit(GetDyingUnit())
endfunction
function InitTrig_MapHack6 takes nothing returns nothing
    set gg_trg_MapHack6=CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_MapHack6,EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddCondition(gg_trg_MapHack6,Condition(function Trig_MapHack6Conditions))
    call TriggerAddAction(gg_trg_MapHack6,function Trig_MapHack6Actions)
endfunction
function Trig_MapHack44Conditions takes nothing returns boolean
    return((GetUnitTypeId(GetEnteringUnit())!='n011')and(GetUnitTypeId(GetEnteringUnit())!='n00Q')and(GetUnitTypeId(GetEnteringUnit())!='e007'))
endfunction
function Trig_MapHack44Actions takes nothing returns nothing
    local integer ydl_localvar_step=GetStoredInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())),"0xCFDE6C76")
    set ydl_localvar_step=ydl_localvar_step+3
    call StoreInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())),"0xCFDE6C76",ydl_localvar_step)
    call StoreInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())),"0xECE825E7",ydl_localvar_step)
    call StoreInteger(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step),"0x03A9E8E9",YDTriggerGCH2I(GetRectCenter(gg_rct_BUG2)))
    call SetUnitPositionLoc(GetEnteringUnit(),YDTriggerGCGet_location(I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step),"0x03A9E8E9"))
    call RemoveLocation(YDTriggerGCGet_location(I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step),"0x03A9E8E9"))
    call FlushStoredMission(YDGC,I2S(YDTriggerGCH2I(GetTriggeringTrigger())*ydl_localvar_step))
endfunction
function InitTrig_MapHack44 takes nothing returns nothing
    set gg_trg_MapHack44=CreateTrigger()
    call TriggerRegisterEnterRectSimple(gg_trg_MapHack44,gg_rct_BUG)
    call TriggerAddCondition(gg_trg_MapHack44,Condition(function Trig_MapHack44Conditions))
    call TriggerAddAction(gg_trg_MapHack44,function Trig_MapHack44Actions)
endfunction
function Trig_zhuangshiwu1Actions takes nothing returns nothing
    set udg_D_jingtou_X=GetCameraTargetPositionX()
    set udg_D_jingtou_Y=GetCameraTargetPositionY()
    call DisplayTimedTextToForce(GetPlayersAll(),10.00,"|cFFFF0000(如有玩家读秒掉线)\n     是系统踢掉的作弊玩家!|r")
    call PanCameraToTimed(-7888.00,3600.00,0)
    call SetCameraTargetController(gg_unit_n00Q_0234,0,0,false)
    call SetDoodadAnimationRect(bj_mapInitialPlayableArea,'D004',"death",false)
    call StartTimerBJ(udg_Yinxing_DW[21],false,0.05)
    call DestroyTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_zhuangshiwu1 takes nothing returns nothing
    set gg_trg_zhuangshiwu1=CreateTrigger()
    call TriggerRegisterTimerExpireEventBJ(gg_trg_zhuangshiwu1,udg_JC_MH[1])
    call TriggerAddAction(gg_trg_zhuangshiwu1,function Trig_zhuangshiwu1Actions)
endfunction
function Trig_zhuangshiwu2Actions takes nothing returns nothing
    call SetDoodadAnimationRect(bj_mapInitialPlayableArea,'D004',"stand",false)
    call PanCameraToTimed(udg_D_jingtou_X,udg_D_jingtou_Y,0)
    set udg_D_jingtou_X=0.00
    set udg_D_jingtou_Y=0.00
    call DestroyTrigger(GetTriggeringTrigger())
endfunction
function InitTrig_zhuangshiwu2 takes nothing returns nothing
    set gg_trg_zhuangshiwu2=CreateTrigger()
    call TriggerRegisterTimerExpireEventBJ(gg_trg_zhuangshiwu2,udg_Yinxing_DW[21])
    call TriggerAddAction(gg_trg_zhuangshiwu2,function Trig_zhuangshiwu2Actions)
endfunction
发表于 2011-12-7 21:18:29 | 显示全部楼层
全局变量声明都没有嘛。。。。。。
目测是放置于自定义脚本,然后要用的时候直接调用?
回复

使用道具 举报

发表于 2011-12-7 21:58:59 | 显示全部楼层
放弃吧楼主,有个叫魔头的家伙至少拥有五种这段文字无法检测出来的MH
回复

使用道具 举报

发表于 2011-12-14 01:44:58 | 显示全部楼层
这种东西又需要新建触发器又需要申明全局变量(连类型都要你猜),导入起来很麻烦。
估计好不在哪,建议无视掉。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-11-24 03:32 , Processed in 0.190566 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表