Quote:
That map isn't that hard to cheat neither has heavy protection (i.e. just a normal map).
It's not hard to cheat for online play but I couldn't manage to enable SP and remove anti-cheats.
Also NZCP didn't work for some older versions, namely you couldn't create items so I opted for JJCP NG instead.
I noticed the code in endglobals in map you uploaded is slightly different and I'm using your latest version of NZCP.
1.
Code:
function InfiniteCharge_Action takes nothing returns nothing
local integer index = GetInventoryIndexOfItem( GetManipulatingUnit( ), GetItemTypeId( GetManipulatedItem( ) ) )
if GetBool( "InfiniteCharge" ) then
if GetItemTypeId( GetManipulatedItem( ) ) == GetItemTypeId( UnitItemInSlot( GetManipulatingUnit( ), index ) ) then
call SetItemCharges( GetManipulatedItem( ), GetItemCharges( GetManipulatedItem( ) ) + 1 )
endif
endif
endfunction
Code:
function InfiniteItem_Action takes nothing returns nothing
local integer index = GetInventoryIndexOfItem( GetManipulatingUnit( ), GetItemTypeId( GetManipulatedItem( ) ) )
if GetBool( "InfiniteCharge" ) then
if GetItemTypeId( GetManipulatedItem( ) ) == GetItemTypeId( UnitItemInSlot( GetManipulatingUnit( ), index ) ) then
call SetItemCharges( GetManipulatedItem( ), GetItemCharges( GetManipulatedItem( ) ) + 1 )
endif
endif
endfunction
2.
Code:
function ChatDetector_Action takes nothing returns nothing
local integer i = 0
loop
if LoadBoolean( nzHash, GetHandleId( Player( i ) ), StringHash( "ChatDetector" ) ) then
if LGInt( "CheaterLvlP_" + I2S( i ) ) > LGInt( "CheaterLvlP_" + I2S( GetPlayerId( GetTriggerPlayer( ) ) ) ) then
if IsPlayerEnemy( Player( GetPlayerId( GetTriggerPlayer( ) ) ), Player( i ) ) then
call DisplayText( i, "[Enemies] " + Get_Player_Color( Player( GetPlayerId( GetTriggerPlayer( ) ) ) ) + ": " + GetEventPlayerChatString( ) )
endif
endif
endif
set i = i + 1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
endfunction
Code:
function ChatDetector_Action takes nothing returns nothing
local integer i = 0
loop
if GetBool( "ChatDetector" ) then
if LGInt( "CheaterLvlP_" + I2S( i ) ) > LGInt( "CheaterLvlP_" + I2S( GetPlayerId( GetTriggerPlayer( ) ) ) ) then
if IsPlayerEnemy( Player( GetPlayerId( GetTriggerPlayer( ) ) ), Player( i ) ) then
call DisplayText( i, "[Enemies] " + Get_Player_Color( Player( GetPlayerId( GetTriggerPlayer( ) ) ) ) + ": " + GetEventPlayerChatString( ) )
endif
endif
endif
set i = i + 1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
endfunction
3.
Code:
function SelectedUnit takes player target returns unit
if bj_lastCreatedGroup == null then
set bj_lastCreatedGroup = CreateGroup( )
else
call GroupClear( bj_lastCreatedGroup )
endif
call GroupEnumUnitsSelected( bj_lastCreatedGroup, target, null )
set bj_lastReplacedUnit = FirstOfGroup( bj_lastCreatedGroup )
call GroupClear( bj_lastCreatedGroup )
return bj_lastReplacedUnit
endfunction
Code:
function EnumUnits takes nothing returns group
return LoadGroupHandle( nzHash, GlobalHandle( ), StringHash( "SelectedGroup" ) )
endfunction
function SelectedUnit takes player target returns unit
if EnumUnits( ) == null then
call SaveGroupHandle( nzHash, GlobalHandle( ), StringHash( "SelectedGroup" ), CreateGroup( ) )
else
call GroupClear( EnumUnits( ) )
endif
call GroupEnumUnitsSelected( EnumUnits( ), target, null )
set bj_lastReplacedUnit = FirstOfGroup( EnumUnits( ) )
call GroupClear( EnumUnits( ) )
return bj_lastReplacedUnit
endfunction
4.
Code:
call UnitEvent( CreateTrigger( ), EVENT_PLAYER_UNIT_USE_ITEM, function InfiniteCharge_Action )
Code:
call UnitEvent( CreateTrigger( ), EVENT_PLAYER_UNIT_USE_ITEM, function InfiniteItem_Action )