How to add anti-map hack to all map ? Like this map !

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

0168057292
Newcomer
Posts: 14
Joined: August 15th, 2007, 4:56 am

How to add anti-map hack to all map ? Like this map !

Post by 0168057292 »

Hi guys, i just wan ask how to add anti-maphack to all map ! Like this Dota allstars v6.49b AMH ! All can help search this map got edit what then it Anti-maphack! Then teach us to make our Map Anti map hack!
0168057292
Newcomer
Posts: 14
Joined: August 15th, 2007, 4:56 am

Re: How to add anti-map hack to all map ? Like this map !

Post by 0168057292 »

http://rapidshare.com/files/68269971/Do ... H.w3x.html

Like this map if we open MH it will kick we out from game !
User avatar
Xantan
Honorary wc3edit.net Traitor
Posts: 2507
Joined: February 1st, 2007, 4:11 pm
Location: NEVADA

Re: How to add anti-map hack to all map ? Like this map !

Post by Xantan »

doesn't kick me...
lol its made in gui...

but how to add this shitty system, made by a noob:

globals
Spoiler:
real udg_AMHS_FogPeriodicTimer=0
rect udg_AMHS_FogLightningRectangle=null
boolean udg_AMHS_FogDisableSingle=false
real udg_AMHS_FogY=0
real udg_AMHS_FogX=0
lightning udg_AMHS_FogCurrentBolt=null
integer udg_AMHS_DummyId=0
boolean udg_AMHS_InvisDetect=false
unit udg_AMHS_D1=null
unit udg_AMHS_D2=null
integer udg_AMHS_InvisBuffer=0
boolean udg_AMHS_SharedVision=false
real udg_AMHS_InvisX=0
real udg_AMHS_InvisY= 0
real udg_AMHS_InvisPeriodicTimer = 0
rect udg_AMHS_InvisLightningRectangle = null
player array udg_AMHS_AnalysePlayers
integer udg_AMHS_MaxPlayers=0
boolean udg_AMHS_InGame=false
gamecache udg_AMHS_Cache=null
boolean udg_AMHS_InGameOutPut=false
timer udg_AMHS_FogTimer=null
timer udg_AMHS_InvisTimer=null
trigger gg_trg_FogDetect_Engine=null
trigger gg_trg_FogDetect_Required_Variables=null
trigger gg_trg_InvisDetect_Engine=null
trigger gg_trg_InvisDetect_Required_Variables=null
trigger gg_trg_Initilize_Systems=null
trigger gg_trg_Initilize_Replay_Detect=null
integer lightning_area_rotator=0


functions (below endglobals)
Spoiler:
function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_AMHS_FogPeriodicTimer = 0
set udg_AMHS_FogDisableSingle = false
set udg_AMHS_FogY = 0
set udg_AMHS_FogX = 0
set udg_AMHS_DummyId = 0
set udg_AMHS_InvisDetect = false
set udg_AMHS_InvisBuffer = 0
set udg_AMHS_SharedVision = false
set udg_AMHS_InvisX = 0
set udg_AMHS_InvisY = 0
set udg_AMHS_InvisPeriodicTimer = 0
set udg_AMHS_MaxPlayers = 0
set udg_AMHS_InGame = false
set udg_AMHS_InGameOutPut = false
set udg_AMHS_FogTimer = CreateTimer()
set udg_AMHS_InvisTimer = CreateTimer()
endfunction

function AMHS_SortPlayersEnemy takes nothing returns string
local integer counter = 1
local integer firstplayer
local string output

loop
exitwhen counter > 12
if (GetPlayerSlotState(Player(counter -1)) == PLAYER_SLOT_STATE_PLAYING) and (GetPlayerController(Player(counter - 1)) == MAP_CONTROL_USER) then
set firstplayer = counter - 1
set output = I2S(firstplayer)
set counter = 13
endif
set counter = counter + 1
endloop

set counter = 1

loop
exitwhen counter > (12 - firstplayer)
if IsPlayerEnemy(Player(firstplayer),Player(counter + firstplayer)) and IsPlayerAlly(Player(counter - 1 + firstplayer),Player(counter + firstplayer)) == false then
set output = output + ";" + I2S(counter + firstplayer)
endif
set counter = counter + 1
endloop
set counter = 0
set firstplayer = 0
return output

endfunction

function AMHS_TopRight takes nothing returns rect
local rect r = bj_mapInitialPlayableArea
local real MaxX = GetRectMaxX(r)
local real MaxY = GetRectMaxY(r)
local rect output = Rect(MaxX - 3,MaxY - 3,MaxX,MaxY)
set MaxX = 0
set MaxY = 0
set r = null
return output
endfunction

function AMHS_TopLeft takes nothing returns rect
local rect r = bj_mapInitialPlayableArea
local real MinX = GetRectMinX(r)
local real MaxY = GetRectMaxY(r)
local rect output = Rect(MinX,MaxY - 3,MinX + 3,MaxY)
set MinX = 0
set MaxY = 0
set r = null
return output
endfunction

function AMHS_BottomRight takes nothing returns rect
local rect r = bj_mapInitialPlayableArea
local real MaxX = GetRectMaxX(r)
local real MinY = GetRectMinY(r)
local rect output = Rect(MaxX - 3,MinY,MaxX,MinY + 3)
set MaxX = 0
set MinY = 0
set r = null
return output
endfunction

function AMHS_BottomLeft takes nothing returns rect
local rect r = bj_mapInitialPlayableArea
local real MinY = GetRectMinY(r)
local real MinX = GetRectMinX(r)
local rect output = Rect(MinX,MinY + 3,MinX + 3,MinY)
set MinX = 0
set MinY = 0
set r = null
return output
endfunction

function AMHS_GetSyncedCameraX takes player p returns real
local real output = 99999999
if GetLocalPlayer() == p then
set output = GetCameraTargetPositionX()
endif
return output
endfunction

function AMHS_GetSyncedCameraY takes player p returns real
local real output = 99999999
if GetLocalPlayer() == p then
set output = GetCameraTargetPositionY()
endif
return output
endfunction

function AMHS_IsInGame takes nothing returns boolean
local boolean output
local integer counter = 1
local real currentx
local real currenty
local real x
local real y
local integer validplayer
set udg_AMHS_InGameOutPut = false

loop
exitwhen counter > 12
if GetPlayerSlotState(Player(counter - 1)) == PLAYER_SLOT_STATE_PLAYING and (GetPlayerController(Player(counter - 1)) == MAP_CONTROL_USER) then
set validplayer = counter - 1
set counter = 13
endif
set counter = counter + 1
endloop

set currentx = AMHS_GetSyncedCameraX(Player(validplayer))
set currenty = AMHS_GetSyncedCameraY(Player(validplayer))

call PauseGame(true)
call TriggerSleepAction(0)

if currentx != 99999999 and currenty != 99999999 then
call SetCameraPositionForPlayer(Player(validplayer),currentx+1,currenty + 1)
endif

call TriggerSleepAction(0)
call PauseGame(false)

set x = AMHS_GetSyncedCameraX(Player(validplayer))
if GetLocalPlayer() == Player(validplayer) then
if x == currentx + 1 then
set udg_AMHS_InGameOutPut = false
else
set udg_AMHS_InGameOutPut = true
endif
endif
if x != 99999999 then
call SetCameraPositionForPlayer(Player(validplayer),currentx,currenty)
endif
set counter = 0
set x = 0
set y = 0
set currentx = 0
set currenty = 0
set validplayer = 0
return udg_AMHS_InGameOutPut
endfunction

function AMHS_ReplayEngine takes nothing returns nothing
set udg_AMHS_InGame = AMHS_IsInGame()
endfunction

function AMHS_DisableFogEngine takes nothing returns nothing
call PauseTimer(udg_AMHS_FogTimer)
endfunction

function AMHS_EnableFogEngine takes nothing returns nothing
call ResumeTimer(udg_AMHS_FogTimer)
endfunction

function AMHS_DisableInvisEngine takes nothing returns nothing
call PauseTimer(udg_AMHS_InvisTimer)
endfunction

function AMHS_EnableInvisEngine takes nothing returns nothing
call ResumeTimer(udg_AMHS_InvisTimer)
endfunction

function AMHS_FogSetValues takes nothing returns nothing
set udg_AMHS_FogPeriodicTimer = 3
set udg_AMHS_FogLightningRectangle = AMHS_TopRight()
set udg_AMHS_FogDisableSingle = true
endfunction


function AMHS_FogBoltDestroyer takes nothing returns nothing
local timer t = GetExpiredTimer()
call PauseTimer(t)
call DestroyTimer(t)
call DestroyLightning(udg_AMHS_FogCurrentBolt)
endfunction

function AMHS_FogBoldDestroyerTimer takes nothing returns nothing
local timer t = CreateTimer()
call TimerStart(t,udg_AMHS_FogPeriodicTimer - 0.01,true,function AMHS_FogBoltDestroyer)
endfunction

function AMHS_FOG_Check takes nothing returns nothing
local fogmodifier temp = null
local integer counter = 1
local integer counter2
local boolean check
local unit dummy
local real x
local real y
local string EnemyPlayers
local player array AnalysePlayers
local integer i=0
local integer st
local string c
local integer maxplayers

set lightning_area_rotator = lightning_area_rotator + 1

//rotate the lightning area
if lightning_area_rotator == 0 then
set udg_AMHS_FogLightningRectangle = AMHS_TopLeft()
elseif lightning_area_rotator == 1 then
set udg_AMHS_FogLightningRectangle = AMHS_TopRight()
elseif lightning_area_rotator == 2 then
set udg_AMHS_FogLightningRectangle = AMHS_BottomRight()
elseif lightning_area_rotator == 3 then
set udg_AMHS_FogLightningRectangle = AMHS_BottomLeft()
set lightning_area_rotator = 0
endif

loop
exitwhen counter > 12
if GetPlayerSlotState(Player(counter -1)) == PLAYER_SLOT_STATE_PLAYING then
if IsVisibleToPlayer(udg_AMHS_FogX,udg_AMHS_FogY,Player(counter-1)) then
set temp = CreateFogModifierRect(Player(counter -1),FOG_OF_WAR_MASKED,udg_AMHS_FogLightningRectangle,true,false)
endif
set udg_AMHS_FogCurrentBolt = AddLightning("AMHS", true,udg_AMHS_FogX,udg_AMHS_FogY,udg_AMHS_FogX,udg_AMHS_FogY)
if temp != null then
call DestroyFogModifier(temp)
endif
call ExecuteFunc("AMHS_FogBoldDestroyerTimer")
endif
set counter = counter + 1
endloop
set counter = 0
endfunction

function AMHS_FogClearVariables takes nothing returns nothing
set udg_AMHS_FogCurrentBolt = null
set udg_AMHS_FogPeriodicTimer = 0
call RemoveRect(udg_AMHS_FogLightningRectangle)
set udg_AMHS_FogDisableSingle = false
set udg_AMHS_FogX = 0
set udg_AMHS_FogY = 0
endfunction

function AMHS_FogEngineStarter takes nothing returns nothing
set udg_AMHS_FogTimer = CreateTimer()
if bj_isSinglePlayer and udg_AMHS_FogDisableSingle then
call ExecuteFunc("AMHS_FogClearVariables")
else
call ExecuteFunc("AMHS_FogSetValues")
set udg_AMHS_FogX = GetRectMinX(udg_AMHS_FogLightningRectangle) + 1.5
set udg_AMHS_FogY = GetRectMinY(udg_AMHS_FogLightningRectangle) + 1.5
call TimerStart(udg_AMHS_FogTimer,udg_AMHS_FogPeriodicTimer, true, function AMHS_FOG_Check)
endif
endfunction

function AMHS_FogDetectEngine takes nothing returns nothing
if udg_AMHS_InGame != true then
call ExecuteFunc("AMHS_FogEngineStarter")
else
call ExecuteFunc("AMHS_FogClearVariables")
endif
endfunction

function InitTrig_FogDetect_Engine takes nothing returns nothing
set gg_trg_FogDetect_Engine = CreateTrigger( )
endfunction

function Trig_FogDetect_Required_Variables_Actions takes nothing returns nothing
set udg_AMHS_InGame = false
set udg_AMHS_Cache = GetLastCreatedGameCacheBJ()
set udg_AMHS_FogPeriodicTimer = 0.00
set udg_AMHS_FogLightningRectangle = GetPlayableMapRect()
set udg_AMHS_FogDisableSingle = true
set udg_AMHS_FogCurrentBolt = GetLastCreatedLightningBJ()
set udg_AMHS_FogX = 0.00
set udg_AMHS_FogY = 0.00
set udg_AMHS_FogTimer = GetLastCreatedTimerBJ()
endfunction

function InitTrig_FogDetect_Required_Variables takes nothing returns nothing
set gg_trg_FogDetect_Required_Variables = CreateTrigger( )
call TriggerAddAction( gg_trg_FogDetect_Required_Variables, function Trig_FogDetect_Required_Variables_Actions )
endfunction

function AMHS_InvisSetValues takes nothing returns nothing
set udg_AMHS_InvisPeriodicTimer = 0.5
set udg_AMHS_InvisLightningRectangle = AMHS_TopLeft()
set udg_AMHS_InvisBuffer = 20
set udg_AMHS_SharedVision = true
set udg_AMHS_DummyId = 'h000'
endfunction

function AMHS_Invis_Check takes nothing returns nothing
local integer counter = 1
local integer counter2 = 1
local boolean check
local unit dummy
local real x
local real y
local fogmodifier temp
if udg_AMHS_SharedVision then
set check = false
loop
exitwhen counter > udg_AMHS_MaxPlayers
set temp = CreateFogModifierRect(udg_AMHS_AnalysePlayers[counter -1],FOG_OF_WAR_VISIBLE,udg_AMHS_InvisLightningRectangle,true,false)
set udg_AMHS_D1 = CreateUnit(Player(15),udg_AMHS_DummyId,udg_AMHS_InvisX,udg_AMHS_InvisY,0)
call UnitApplyTimedLife(udg_AMHS_D1,udg_AMHS_DummyId,0.02)
if IsUnitVisible(udg_AMHS_D1,udg_AMHS_AnalysePlayers[counter - 1]) == false then
set udg_AMHS_D2 = CreateUnit(Player(15),udg_AMHS_DummyId,udg_AMHS_InvisX,udg_AMHS_InvisY,0)
call UnitApplyTimedLife(udg_AMHS_D2,udg_AMHS_DummyId,0.02)
call IssueTargetOrderById(udg_AMHS_D1,851983,udg_AMHS_D2)


else
loop
exitwhen counter2 > udg_AMHS_InvisBuffer
set x = GetRandomReal(GetRectMinX(bj_mapInitialPlayableArea), GetRectMaxX(bj_mapInitialPlayableArea))
set y = GetRandomReal(GetRectMinY(bj_mapInitialPlayableArea), GetRectMaxY(bj_mapInitialPlayableArea))
set udg_AMHS_D1 = CreateUnit(Player(15),udg_AMHS_DummyId,x,y,0)
call UnitApplyTimedLife(udg_AMHS_D1,udg_AMHS_DummyId,0.02)
if IsUnitVisible(udg_AMHS_D1,udg_AMHS_AnalysePlayers[counter - 1]) == false then
set check = true
set counter2 = udg_AMHS_InvisBuffer + 1
set udg_AMHS_D2 = CreateUnit(Player(15),udg_AMHS_DummyId,x,y,0)
call UnitApplyTimedLife(udg_AMHS_D2,udg_AMHS_DummyId,0.02)
endif
set counter2 = counter2 + 1
endloop
if check then

call IssueTargetOrderById(udg_AMHS_D1,851983,udg_AMHS_D2)
endif
call DestroyFogModifier(temp)
endif
set counter = counter + 1
endloop
else

set counter = 1
set check = false
loop
exitwhen counter > 12
set temp = CreateFogModifierRect(Player(counter -1),FOG_OF_WAR_VISIBLE,udg_AMHS_InvisLightningRectangle,true,false)
set udg_AMHS_D1 = CreateUnit(Player(15),udg_AMHS_DummyId,udg_AMHS_InvisX,udg_AMHS_InvisY,0)
call UnitApplyTimedLife(udg_AMHS_D1,udg_AMHS_DummyId,0.02)
if IsUnitVisible(udg_AMHS_D1,Player(counter - 1)) == false then
set udg_AMHS_D2 = CreateUnit(Player(15),udg_AMHS_DummyId,udg_AMHS_InvisX,udg_AMHS_InvisY,0)
call IssueTargetOrderById(udg_AMHS_D1,851983,udg_AMHS_D2)

call UnitApplyTimedLife(udg_AMHS_D2,udg_AMHS_DummyId,0.02)
else
loop
exitwhen counter2 > udg_AMHS_InvisBuffer
set x = GetRandomReal(GetRectMinX(bj_mapInitialPlayableArea), GetRectMaxX(bj_mapInitialPlayableArea))
set y = GetRandomReal(GetRectMinY(bj_mapInitialPlayableArea), GetRectMaxY(bj_mapInitialPlayableArea))
set udg_AMHS_D1 = CreateUnit(Player(15),udg_AMHS_DummyId,x,y,0)
call UnitApplyTimedLife(udg_AMHS_D1,udg_AMHS_DummyId,0.02)
if IsUnitVisible(udg_AMHS_D1,Player(counter - 1)) == false then
set check = true
set counter2 = udg_AMHS_InvisBuffer + 1
set udg_AMHS_D2 = CreateUnit(Player(15),udg_AMHS_DummyId,x,y,0)
call UnitApplyTimedLife(udg_AMHS_D2,udg_AMHS_DummyId,0.02)
endif
set counter2 = counter2 + 1
endloop
if check then
call IssueTargetOrderById(udg_AMHS_D1,851983,udg_AMHS_D2)


endif
call DestroyFogModifier(temp)
endif
set counter = counter + 1
endloop
endif
endfunction

function AMHS_InvisClearVariables takes nothing returns nothing
set udg_AMHS_InvisX = 0
set udg_AMHS_InvisY = 0
set udg_AMHS_InvisPeriodicTimer = 0
call RemoveRect(udg_AMHS_FogLightningRectangle)
set udg_AMHS_SharedVision = false
endfunction

function AMHS_InvisEngineStarter takes nothing returns nothing
local string EnemyPlayers
local integer counter = 1
local integer i=0
local integer st
local string c
set udg_AMHS_InvisTimer = CreateTimer()
call ExecuteFunc("AMHS_InvisSetValues")
set udg_AMHS_InvisX = GetRectMinX(udg_AMHS_InvisLightningRectangle) + 1.5
set udg_AMHS_InvisY = GetRectMinY(udg_AMHS_InvisLightningRectangle) + 1.5
set EnemyPlayers = AMHS_SortPlayersEnemy()
if udg_AMHS_SharedVision then
set EnemyPlayers=EnemyPlayers+";"
set st=0
loop
set c=SubString(EnemyPlayers, i, i+1)
exitwhen (c == "") or (c == null)
if (c == ";") then
set udg_AMHS_AnalysePlayers[counter - 1] = Player(S2I(SubString(EnemyPlayers, st, i)))
set counter = counter + 1
set st=i+1
endif
set i=i+1
endloop
set udg_AMHS_MaxPlayers = counter
endif
call TimerStart(udg_AMHS_InvisTimer,udg_AMHS_InvisPeriodicTimer, true, function AMHS_Invis_Check)
endfunction

function AMHS_InvisDetectEngine takes nothing returns nothing
if udg_AMHS_InGame != true then
call ExecuteFunc("AMHS_InvisEngineStarter")
else
call ExecuteFunc("AMHS_InvisClearVariables")
endif
endfunction

function InitTrig_InvisDetect_Engine takes nothing returns nothing
set gg_trg_InvisDetect_Engine = CreateTrigger( )
endfunction

function Trig_InvisDetect_Required_Variables_Actions takes nothing returns nothing
set udg_AMHS_InvisTimer = GetLastCreatedTimerBJ()
set udg_AMHS_SharedVision = false
set udg_AMHS_D1 = GetLastCreatedUnit()
set udg_AMHS_D2 = GetLastCreatedUnit()
set udg_AMHS_DummyId = 0
set udg_AMHS_AnalysePlayers[0] = GetEnumPlayer()
set udg_AMHS_MaxPlayers = 0
set udg_AMHS_InGame = false
set udg_AMHS_Cache = GetLastCreatedGameCacheBJ()
set udg_AMHS_InvisPeriodicTimer = 0.00
set udg_AMHS_InvisLightningRectangle = GetPlayableMapRect()
set udg_AMHS_InvisX = 0.00
set udg_AMHS_InvisY = 0.00
set udg_AMHS_InvisBuffer = 0
endfunction

function InitTrig_InvisDetect_Required_Variables takes nothing returns nothing
set gg_trg_InvisDetect_Required_Variables = CreateTrigger( )
call TriggerAddAction( gg_trg_InvisDetect_Required_Variables, function Trig_InvisDetect_Required_Variables_Actions )
endfunction

function Trig_Initilize_Systems_Actions takes nothing returns nothing
call ExecuteFunc("AMHS_FogDetectEngine")
call ExecuteFunc("AMHS_InvisDetectEngine")
endfunction

function InitTrig_Initilize_Systems takes nothing returns nothing
set gg_trg_Initilize_Systems = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Initilize_Systems, 90.0 )
call TriggerAddAction( gg_trg_Initilize_Systems, function Trig_Initilize_Systems_Actions )
endfunction

function Trig_Initilize_Replay_Detect_Actions takes nothing returns nothing
call CinematicModeBJ( true, GetPlayersAll() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_024" )
call ExecuteFunc("AMHS_ReplayEngine")
call PolledWait(7)
call CinematicModeBJ( false, GetPlayersAll() )
endfunction

function InitTrig_Initilize_Replay_Detect takes nothing returns nothing
set gg_trg_Initilize_Replay_Detect = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Initilize_Replay_Detect, 60.0 )
call TriggerAddAction( gg_trg_Initilize_Replay_Detect, function Trig_Initilize_Replay_Detect_Actions )
endfunction

function InitCustomTriggers takes nothing returns nothing
call InitTrig_FogDetect_Engine( )
call InitTrig_FogDetect_Required_Variables( )
call InitTrig_InvisDetect_Engine( )
call InitTrig_InvisDetect_Required_Variables( )
call InitTrig_Initilize_Systems( )
call InitTrig_Initilize_Replay_Detect( )
endfunction


function main (place locals with locals, place inittrigs at bottom
Spoiler:
local weathereffect we
local player p
local unit u
local integer unitID
local trigger t
local real life
local integer OO0IO0
local integer IIOO11O
local version v
local integer I01O1O
local integer i

call InitCustomTriggers()


That should do it, though you may need units/a object from the map... bah too lazy to look..
0168057292
Newcomer
Posts: 14
Joined: August 15th, 2007, 4:56 am

Re: How to add anti-map hack to all map ? Like this map !

Post by 0168057292 »

but this map like got 1 file inside ! please teach eh Xantan.....how to add Anti-map hack to all map !
User avatar
Shamanno1
Forum Staff
Posts: 912
Joined: October 21st, 2007, 6:17 am
Title: 11
Location: WorLd Of WaRcrAfT

Re: How to add anti-map hack to all map ? Like this map !

Post by Shamanno1 »

Umm does that thrigers for anti maphack work?Or i will use it for nothing?
~Everything changes~
I have met people who have no dreams, who have simply accepted their fate to work, exist, and die. They are the most miserable people I have ever known.
User avatar
colmo
V.I.P.
Posts: 329
Joined: June 13th, 2007, 4:42 pm
Title: Wc3 is for Nerds!!!!

Re: How to add anti-map hack to all map ? Like this map !

Post by colmo »

Its the triggers that ionut used i think..

It could work but if some1 uses skills like far-sight or the map is revealed or something then it could kick everyone and its super glitchy
...................................................................................................................
Image

[blinking]How Do You Like Me Now? Also Im Going To Capitolize Every Word That I Type From Now On Just To Be Annoying.[/blinking]