H2I protection?
Moderator: Cheaters
-
- Newcomer
- Posts: 1
- Joined: November 22nd, 2009, 4:29 am
H2I protection?
what is H2I protection? and how do you remove it?
-
- Spice Pirate
- Posts: 862
- Joined: January 29th, 2009, 5:35 pm
- Title: LHC
- Location: Canada
Re: H2I protection?
H2I is a protection that formerly used the return bug, and now GetHandleId to get the ID for a handle (handle being most variable types) in the map, and using that to check if the map script has been altered.
The easiest way to disable this is to search the script for "handle" without quotation marks. You'll come up with either a call for the native GetHandleId, or a function similar to this, if you're on the old versions of WC3:
If you find a function like above, find any place it's called from. A simple function for H2I protection, using the function above, would be like this:
If the map wasn't altered, h2i(u) would have the value 321654, thus not crashing WC3. Most changes to the script, however (like adding cheats) will change the value, and you'll crash once that function is executed. To remove the crash, just comment out the line "call crash_wc3()" by putting two forward slashes (//) before it.
Hopefully this helps you. If you need any clarification on stuff, just let me know.
The easiest way to disable this is to search the script for "handle" without quotation marks. You'll come up with either a call for the native GetHandleId, or a function similar to this, if you're on the old versions of WC3:
Code: Select all
function h2i takes handle h returns integer
return h
return 0
endfunction
If you find a function like above, find any place it's called from. A simple function for H2I protection, using the function above, would be like this:
Code: Select all
function crash_wc3 takes nothing returns nothing
call ExecuteFunc("crashy crash")
endfunction
function h2i_prot takes nothing returns nothing
local unit u = CreateUnit(Player(15),'hpea',0,0,0)
if(h2i(u)!=321654)then // random value, just as an example
call crash_wc3()
endif
call RemoveUnit(u)
set u = null
endfunction
If the map wasn't altered, h2i(u) would have the value 321654, thus not crashing WC3. Most changes to the script, however (like adding cheats) will change the value, and you'll crash once that function is executed. To remove the crash, just comment out the line "call crash_wc3()" by putting two forward slashes (//) before it.
Hopefully this helps you. If you need any clarification on stuff, just let me know.
Spoiler: